mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
config macro, script tweaks
This commit is contained in:
parent
2285717acd
commit
384c4bc55e
@ -1,3 +1,23 @@
|
||||
#define MACRO_PORTABLELIGHTSACTIONS(var1) \
|
||||
class ACE_Actions { \
|
||||
class ACE_MainActions { \
|
||||
displayName = CSTRING(MainAction); \
|
||||
selection = ""; \
|
||||
distance = 2; \
|
||||
condition = "true"; \
|
||||
class ACE_SwitchLamp { \
|
||||
displayName = CSTRING(var1); \
|
||||
condition = QUOTE(alive _target); \
|
||||
statement = QUOTE([ARR_1(_target)] call DFUNC(switchLamp)); \
|
||||
selection = ""; \
|
||||
distance = 2; \
|
||||
showDisabled = 0; \
|
||||
priority = -1; \
|
||||
}; \
|
||||
}; \
|
||||
}; \
|
||||
class ACE_SelfActions {}
|
||||
|
||||
class CfgVehicles {
|
||||
class ACE_Module;
|
||||
class ACE_ModuleInteraction: ACE_Module {
|
||||
@ -610,91 +630,24 @@ class CfgVehicles {
|
||||
scope = 2;
|
||||
GVAR(switchLampClass) = "Land_PortableLight_single_off_F";
|
||||
XEH_ENABLED;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = CSTRING(MainAction);
|
||||
selection = "";
|
||||
distance = 2;
|
||||
condition = "true";
|
||||
class ACE_SwitchLamp {
|
||||
displayName = CSTRING(TurnOff);
|
||||
condition = QUOTE(alive _target);
|
||||
statement = QUOTE([ARR_1(_target)] call DFUNC(switchLamp));
|
||||
selection = "";
|
||||
distance = 2;
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_SelfActions {};
|
||||
MACRO_PORTABLELIGHTSACTIONS(TurnOff);
|
||||
};
|
||||
class Land_PortableLight_single_off_F: Land_PortableLight_single_F {
|
||||
scope = 1;
|
||||
GVAR(switchLampClass) = "Land_PortableLight_single_F";
|
||||
GVAR(switchLampOff) = 1;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = CSTRING(MainAction);
|
||||
selection = "";
|
||||
distance = 2;
|
||||
condition = "true";
|
||||
class ACE_SwitchLamp {
|
||||
displayName = CSTRING(TurnOn);
|
||||
condition = QUOTE(alive _target);
|
||||
statement = QUOTE([ARR_1(_target)] call DFUNC(switchLamp));
|
||||
selection = "";
|
||||
distance = 2;
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
MACRO_PORTABLELIGHTSACTIONS(TurnOn);
|
||||
};
|
||||
class Land_PortableLight_double_F: Land_PortableLight_single_F {
|
||||
scope = 2;
|
||||
GVAR(switchLampClass) = "Land_PortableLight_double_off_F";
|
||||
XEH_ENABLED;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = CSTRING(MainAction);
|
||||
selection = "";
|
||||
distance = 2;
|
||||
condition = "true";
|
||||
class ACE_SwitchLamp {
|
||||
displayName = CSTRING(TurnOff);
|
||||
condition = QUOTE(alive _target);
|
||||
statement = QUOTE([ARR_1(_target)] call DFUNC(switchLamp));
|
||||
selection = "";
|
||||
distance = 2;
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_SelfActions {};
|
||||
MACRO_PORTABLELIGHTSACTIONS(TurnOff);
|
||||
};
|
||||
class Land_PortableLight_double_off_F: Land_PortableLight_double_F {
|
||||
scope = 1;
|
||||
GVAR(switchLampClass) = "Land_PortableLight_double_F";
|
||||
GVAR(switchLampOff) = 1;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = CSTRING(MainAction);
|
||||
selection = "";
|
||||
distance = 2;
|
||||
condition = "true";
|
||||
class ACE_SwitchLamp {
|
||||
displayName = CSTRING(TurnOn);
|
||||
condition = QUOTE(alive _target);
|
||||
statement = QUOTE([ARR_1(_target)] call DFUNC(switchLamp));
|
||||
selection = "";
|
||||
distance = 2;
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_SelfActions {};
|
||||
MACRO_PORTABLELIGHTSACTIONS(TurnOn);
|
||||
};
|
||||
};
|
||||
|
@ -31,10 +31,11 @@ private ["_vectors", "_pos", "_reflectors", "_hitpointsdmg"];
|
||||
_vectors = [vectorDir _object, vectorUp _object];
|
||||
_pos = getPosATL _object;
|
||||
|
||||
_reflectors = (configfile >> "CfgVehicles" >> _objectClass >> "Reflectors") call BIS_fnc_getCfgSubClasses;
|
||||
_reflectors = "true" configClasses (configfile >> "CfgVehicles" >> _objectClass >> "Reflectors");
|
||||
_hitpointsdmg = [];
|
||||
{
|
||||
_hitpoint = getText (configfile >> "CfgVehicles" >> _objectClass >> "Reflectors" >> _x >> "hitpoint");
|
||||
private "_hitpoint";
|
||||
_hitpoint = getText (_x >> "hitpoint");
|
||||
_hitpointsdmg pushback [_hitpoint, _object getHit _hitpoint];
|
||||
nil
|
||||
} count _reflectors;
|
||||
|
Loading…
Reference in New Issue
Block a user