mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
0321545098
* Add enable setting * Update test * Optimize eden macro * Fix bad command name in eden * Apply suggestions from code review Co-authored-by: jonpas <jonpas33@gmail.com> * Cleanup unused argument * Handle RHS config * Optimize init function a little * Improve macro Co-authored-by: jonpas <jonpas33@gmail.com> * compats and leftovers * function header (sorry jonpas) * add enabled check to initSupplyVehicle * use toString * fix validate * inheritance cleanup --------- Co-authored-by: jonpas <jonpas33@gmail.com> Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
26 lines
1.1 KiB
C++
26 lines
1.1 KiB
C++
#define VANILLA_REARMCARGO (if (getAmmoCargo _this > 0) then {getAmmoCargo _this} else {-1})
|
|
#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default})
|
|
#define DEFAULT_REARMCARGO GET_NUMBER(configOf _this >> 'GVAR(defaultSupply)',VANILLA_REARMCARGO)
|
|
|
|
class Cfg3DEN {
|
|
class Object {
|
|
class AttributeCategories {
|
|
class ace_attributes {
|
|
class Attributes {
|
|
class GVAR(rearmCargo) {
|
|
displayName = CSTRING(rearmCargo_edenName);
|
|
tooltip = CSTRING(rearmCargo_edenDesc);
|
|
property = QGVAR(rearmCargo);
|
|
control = "EditShort";
|
|
expression = QUOTE(if (_value != DEFAULT_REARMCARGO) then {[ARR_2(_this,_value)] call DFUNC(makeSource)});
|
|
defaultValue = QUOTE(DEFAULT_REARMCARGO);
|
|
validate = "number";
|
|
condition = "(1-objectBrain)*(1-objectAgent)";
|
|
typeName = "NUMBER";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|