mirror of
https://github.com/acemod/ACE3.git
synced 2025-07-25 04:42:48 +00:00
Privates
This commit is contained in:
@ -14,6 +14,8 @@ params ["_unit", "_vehicle", "_hitPoint", "_classname"];
|
|||||||
TRACE_4("params",_unit,_vehicle,_hitPoint,_classname);
|
TRACE_4("params",_unit,_vehicle,_hitPoint,_classname);
|
||||||
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
|
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
|
||||||
|
|
||||||
|
private ["_hitPointDamage", "_newDamage", "_wheel"];
|
||||||
|
|
||||||
_wheel = objNull;
|
_wheel = objNull;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -24,7 +26,7 @@ _wheel = objNull;
|
|||||||
if (isNull _wheel) exitwith {};
|
if (isNull _wheel) exitwith {};
|
||||||
|
|
||||||
// get current hitpoint damage
|
// get current hitpoint damage
|
||||||
private "_hitPointDamage";
|
|
||||||
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
|
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
|
||||||
_newDamage = (1 - (damage _wheel)) / 4; // require 4 tracks to fully replace one side
|
_newDamage = (1 - (damage _wheel)) / 4; // require 4 tracks to fully replace one side
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@ params ["_unit", "_vehicle", "_hitPoint", "_classname"];
|
|||||||
TRACE_4("params",_unit,_vehicle,_hitPoint,_classname);
|
TRACE_4("params",_unit,_vehicle,_hitPoint,_classname);
|
||||||
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
|
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
|
||||||
|
|
||||||
|
private["_hitPointDamage", "_wheel"];
|
||||||
|
|
||||||
_wheel = objNull;
|
_wheel = objNull;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -24,7 +26,6 @@ _wheel = objNull;
|
|||||||
if (isNull _wheel) exitwith {};
|
if (isNull _wheel) exitwith {};
|
||||||
|
|
||||||
// get current hitpoint damage
|
// get current hitpoint damage
|
||||||
private "_hitPointDamage";
|
|
||||||
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
|
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
|
||||||
|
|
||||||
// can't replace not destroyed wheel
|
// can't replace not destroyed wheel
|
||||||
|
@ -14,6 +14,8 @@ params ["_unit", "_vehicle", "_hitPoint", "_classname"];
|
|||||||
TRACE_4("params",_unit,_vehicle,_hitPoint,_classname);
|
TRACE_4("params",_unit,_vehicle,_hitPoint,_classname);
|
||||||
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
|
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
|
||||||
|
|
||||||
|
private ["_hitPointDamage", "_wheel"];
|
||||||
|
|
||||||
_wheel = objNull;
|
_wheel = objNull;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -24,7 +26,6 @@ _wheel = objNull;
|
|||||||
if (isNull _wheel) exitwith {};
|
if (isNull _wheel) exitwith {};
|
||||||
|
|
||||||
// get current hitpoint damage
|
// get current hitpoint damage
|
||||||
private "_hitPointDamage";
|
|
||||||
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
|
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
|
||||||
|
|
||||||
// can't replace not destroyed wheel
|
// can't replace not destroyed wheel
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
params ["_caller", "_target", "_hitPoint", "_className"];
|
params ["_caller", "_target", "_hitPoint", "_className"];
|
||||||
TRACE_4("params",_calller,_target,_hitPoint,_className);
|
TRACE_4("params",_calller,_target,_hitPoint,_className);
|
||||||
|
|
||||||
private ["_config", "_engineerRequired", "_items", "_locations", "_return", "_condition", "_vehicleStateCondition"];
|
private["_callbackProgress", "_callerAnim", "_calller", "_condition", "_config", "_consumeItems", "_displayText", "_engineerRequired", "_iconDisplayed", "_items", "_locations", "_repairTime", "_repairTimeConfig", "_return", "_usersOfItems", "_vehicleStateCondition", "_wpn"];
|
||||||
|
|
||||||
_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);
|
_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);
|
||||||
if !(isClass _config) exitwith {false}; // or go for a default?
|
if !(isClass _config) exitwith {false}; // or go for a default?
|
||||||
@ -157,7 +157,7 @@ _repairTime = if (isNumber (_config >> "repairingTime")) then {
|
|||||||
if (typeName _repairTimeConfig == "SCALAR") exitwith {
|
if (typeName _repairTimeConfig == "SCALAR") exitwith {
|
||||||
_repairTimeConfig;
|
_repairTimeConfig;
|
||||||
};
|
};
|
||||||
[_caller, _target, _selectionName, _className] call _repairTimeConfig;
|
[_caller, _target, _hitPoint, _className] call _repairTimeConfig;
|
||||||
};
|
};
|
||||||
0;
|
0;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user