mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Introduces cargo weight and draw argument properties to units across backend, frontend, and Python API. Adds related commands, data extraction, and registration logic, enabling setting and reading of cargo weight and custom draw arguments for units. Includes new API examples and updates to interfaces, data types, and Lua backend for full feature integration.
30 lines
757 B
C++
30 lines
757 B
C++
#pragma once
|
|
#include "framework.h"
|
|
#include "utils.h"
|
|
#include "dcstools.h"
|
|
#include "luatools.h"
|
|
#include "Unit.h"
|
|
|
|
#define AIR_DEST_DIST_THR 2000 // Meters
|
|
|
|
class AirUnit : public Unit
|
|
{
|
|
public:
|
|
AirUnit(json::value json, unsigned int ID);
|
|
|
|
virtual void setDefaults(bool force = false);
|
|
virtual void setState(unsigned char newState);
|
|
|
|
virtual void changeSpeed(string change) = 0;
|
|
virtual void changeAltitude(string change) = 0;
|
|
virtual double getDestinationReachedThreshold() { return AIR_DEST_DIST_THR; }
|
|
|
|
virtual void setRacetrackLength(double newValue);
|
|
virtual void setRacetrackAnchor(Coords newValue);
|
|
virtual void setRacetrackBearing(double newValue);
|
|
|
|
virtual void setCargoWeight(double newValue);
|
|
|
|
protected:
|
|
virtual void AIloop();
|
|
}; |