mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added backend code for health display
And fixed the issue of ground units not being deleted correctly
This commit is contained in:
@@ -48,6 +48,7 @@ namespace DataIndex {
|
||||
operateAs,
|
||||
shotsScatter,
|
||||
shotsIntensity,
|
||||
health,
|
||||
lastIndex,
|
||||
endOfData = 255
|
||||
};
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#pragma once
|
||||
#include "framework.h"
|
||||
|
||||
class Measure
|
||||
{
|
||||
public:
|
||||
Measure(json::value value, long long time): value(value), time(time) {};
|
||||
|
||||
void setValue(json::value newValue) { value = newValue; }
|
||||
void setTime(long long newTime) { time = newTime; }
|
||||
json::value getValue() { return value; }
|
||||
long long getTime() { return time; }
|
||||
|
||||
private:
|
||||
json::value value;
|
||||
long long time;
|
||||
|
||||
};
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "utils.h"
|
||||
#include "dcstools.h"
|
||||
#include "luatools.h"
|
||||
#include "measure.h"
|
||||
#include "logger.h"
|
||||
#include "commands.h"
|
||||
#include "datatypes.h"
|
||||
@@ -107,6 +106,7 @@ public:
|
||||
virtual void setOperateAs(unsigned char newValue) { updateValue(operateAs, newValue, DataIndex::operateAs); }
|
||||
virtual void setShotsScatter(unsigned char newValue) { updateValue(shotsScatter, newValue, DataIndex::shotsScatter); }
|
||||
virtual void setShotsIntensity(unsigned char newValue) { updateValue(shotsIntensity, newValue, DataIndex::shotsIntensity); }
|
||||
virtual void setHealth(unsigned char newValue) { updateValue(health, newValue, DataIndex::health); }
|
||||
|
||||
/********** Getters **********/
|
||||
virtual string getCategory() { return category; };
|
||||
@@ -152,6 +152,7 @@ public:
|
||||
virtual unsigned char getOperateAs() { return operateAs; }
|
||||
virtual unsigned char getShotsScatter() { return shotsScatter; }
|
||||
virtual unsigned char getShotsIntensity() { return shotsIntensity; }
|
||||
virtual unsigned char getHealth() { return health; }
|
||||
|
||||
protected:
|
||||
unsigned int ID;
|
||||
@@ -200,6 +201,7 @@ protected:
|
||||
Coords activeDestination = Coords(NULL);
|
||||
unsigned char shotsScatter = 2;
|
||||
unsigned char shotsIntensity = 2;
|
||||
unsigned char health = 100;
|
||||
|
||||
/********** Other **********/
|
||||
unsigned int taskCheckCounter = 0;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "utils.h"
|
||||
#include "dcstools.h"
|
||||
#include "luatools.h"
|
||||
#include "measure.h"
|
||||
#include "logger.h"
|
||||
#include "commands.h"
|
||||
#include "datatypes.h"
|
||||
|
||||
Reference in New Issue
Block a user