Tweaks and optimizations of front end

This commit is contained in:
Pax1601
2023-07-05 20:14:48 +02:00
parent ec91376da2
commit 1af98cc54f
13 changed files with 215 additions and 165 deletions

View File

@@ -53,6 +53,7 @@ namespace DataIndex {
ammo,
contacts,
activePath,
lastIndex,
endOfData = 255
};
}
@@ -94,7 +95,7 @@ public:
unsigned int getDataPacket(char*& data);
unsigned int getID() { return ID; }
void getData(stringstream& ss, unsigned long long time, bool refresh);
void getData(stringstream& ss, unsigned long long time);
Coords getActiveDestination() { return activeDestination; }
virtual void changeSpeed(string change) {};
@@ -122,6 +123,9 @@ public:
void triggerUpdate(unsigned char datumIndex);
bool hasFreshData(unsigned long long time);
bool checkFreshness(unsigned char datumIndex, unsigned long long time);
/********** Setters **********/
virtual void setCategory(string newValue) { updateValue(category, newValue, DataIndex::category); }
virtual void setAlive(bool newValue) { updateValue(alive, newValue, DataIndex::alive); }

View File

@@ -20,7 +20,7 @@ public:
void updateExportData(lua_State* L, double dt = 0);
void updateMissionData(json::value missionData);
void runAILoop();
string getUnitData(stringstream &ss, unsigned long long time, bool refresh);
string getUnitData(stringstream &ss, unsigned long long time);
void deleteUnit(unsigned int ID, bool explosion);
void acquireControl(unsigned int ID);