mirror of
https://github.com/ApfelTeeSaft/PlanetFleet.git
synced 2026-08-26 19:33:38 +00:00
minor fixes and improvements
This commit is contained in:
@@ -11,9 +11,11 @@ AbilityType = {
|
||||
LOAD_SPEED = 8,
|
||||
DRAW_RATE = 9,
|
||||
DRAW_SPEED = 10,
|
||||
HACK_RANGE = 11
|
||||
HACK_RANGE = 11,
|
||||
UNIT_UNLOCK = 12
|
||||
}
|
||||
|
||||
abilities = {
|
||||
{type = AbilityType.SPEED, gameObjType = 0, ammount = .4, gameObjIds = {UnitId.WAR_MECH}}
|
||||
{type = AbilityType.SPEED, gameObjType = 0, ammount = .4, gameObjIds = {UnitId.WAR_MECH}},
|
||||
{type = AbilityType.UNIT_UNLOCK, gameObjType = 0, gameObjIds = {UnitId.WAR_MECH}},
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
TechnologyId = {
|
||||
TechId = {
|
||||
APT = 0,
|
||||
EFT = 1,
|
||||
PCT = 2,
|
||||
@@ -7,7 +7,7 @@ TechnologyId = {
|
||||
|
||||
technologies = {
|
||||
{
|
||||
id = TechnologyId.APT,
|
||||
id = TechId.APT,
|
||||
name = 'Advanced power technology',
|
||||
cost = 1000,
|
||||
icon = '',
|
||||
@@ -17,7 +17,7 @@ technologies = {
|
||||
abilities = {0},
|
||||
},
|
||||
{
|
||||
id = TechnologyId.EFT,
|
||||
id = TechId.EFT,
|
||||
name = 'Energy field technology',
|
||||
cost = 1000,
|
||||
icon = '',
|
||||
@@ -27,7 +27,7 @@ technologies = {
|
||||
abilities = {},
|
||||
},
|
||||
{
|
||||
id = TechnologyId.PCT,
|
||||
id = TechId.PCT,
|
||||
name = 'Plasma casting technology',
|
||||
cost = 1000,
|
||||
icon = '',
|
||||
@@ -37,7 +37,7 @@ technologies = {
|
||||
abilities = {},
|
||||
},
|
||||
{
|
||||
id = TechnologyId.FPT,
|
||||
id = TechId.FPT,
|
||||
name = 'Fusion power technology',
|
||||
cost = 1000,
|
||||
icon = '',
|
||||
|
||||
@@ -231,6 +231,7 @@ namespace battleship{
|
||||
return varVec;
|
||||
}
|
||||
|
||||
//TODO clean this method up
|
||||
void Game::initTechnologies(){
|
||||
technologies.clear();
|
||||
|
||||
@@ -264,7 +265,7 @@ namespace battleship{
|
||||
|
||||
Ability ability;
|
||||
ability.type = techTable["type"];
|
||||
ability.ammount = techTable["ammount"];
|
||||
ability.ammount = techTable["ammount"].get_or(0);
|
||||
ability.gameObjType = techTable["gameObjType"];
|
||||
ability.gameObjIds = parseTechTable(i, techKey, "numGameObjIds", "gameObjIds");
|
||||
abilities.push_back(ability);
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace battleship{
|
||||
inline std::vector<Player*>& getPlayers(){return players;}
|
||||
inline Player* getPlayer(int id){return players[id];}
|
||||
inline int getNumPlayers(){return players.size();}
|
||||
inline Technology getTechnology(int id){return technologies[id];}
|
||||
private:
|
||||
Game(){}
|
||||
void resetLuaGameObjects();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "player.h"
|
||||
#include "structure.h"
|
||||
#include "projectile.h"
|
||||
#include "stateManager.h"
|
||||
#include "activeGameState.h"
|
||||
#include "resourceDeposit.h"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
namespace battleship{
|
||||
class ResourceDeposit;
|
||||
class Projectile;
|
||||
class Unit;
|
||||
|
||||
class Player {
|
||||
public:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "researchStruct.h"
|
||||
#include "player.h"
|
||||
#include "game.h"
|
||||
|
||||
namespace battleship{
|
||||
using namespace std;
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ namespace battleship{
|
||||
int researchCost, generationRate, generationSpeed, researchStatus = 0;
|
||||
std::vector<int> researchQueue;
|
||||
|
||||
bool canUpdateResearch(){return vb01::getTime() - lastGenTime > generationRate;}
|
||||
bool canUpdateResearch(){return vb01::getTime() - lastUpdateTime > generationRate;}
|
||||
void generateResearch();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user