ACE3/addons/cargo/CfgEden.hpp
SilentSpike fea2326488 Add cargo eden attributes (#4780)
- Add a ace_cargo_space attribute to vehicles to alter how much cargo they can carry.
- Add an ace_cargo_size attribute to objects to alter how much cargo space they consume.
- Add two public functions `fnc_setSize.sqf` and `fnc_setSpace.sqf` to update the cargo size/space respectively of any given object.
- Deprecate cargo makeLoadable module and public function.
- Added some macros to get the space/size of a config, making code more readable in places.
2017-05-31 23:54:57 +01:00

38 lines
1.6 KiB
C++

class Cfg3DEN {
class Object {
class AttributeCategories {
class ace_attributes {
class Attributes {
class GVAR(space) {
displayName = CSTRING(space_edenName);
tooltip = CSTRING(space_edenDesc);
property = QGVAR(space);
control = "Edit";
expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSpace););
defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(space),0));
validate = "number";
condition = "objectHasInventoryCargo";
typeName = "NUMBER";
};
class GVAR(size) {
displayName = CSTRING(size_edenName);
tooltip = CSTRING(size_edenDesc);
property = QGVAR(size);
control = "Edit";
// Expression only runs on the server, must handle actions for all machines and future JIPs (Why BI?!)
expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSize););
defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(size),-1));
validate = "number";
condition = "1-objectBrain";
typeName = "NUMBER";
};
};
};
};
};
};