mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Basic - Bloodbag size matters
This commit is contained in:
parent
437db22ab8
commit
d752dd50d0
@ -50,11 +50,17 @@ class ACE_Medical_Actions {
|
|||||||
displayNameProgress = "$STR_ACE_Medical_Transfusing_Blood";
|
displayNameProgress = "$STR_ACE_Medical_Transfusing_Blood";
|
||||||
requiredMedic = 1;
|
requiredMedic = 1;
|
||||||
treatmentTime = 20;
|
treatmentTime = 20;
|
||||||
items[] = {{"ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250"}};
|
items[] = {"ACE_bloodIV"};
|
||||||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag));
|
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag));
|
||||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||||
litter[] = {};
|
litter[] = {};
|
||||||
};
|
};
|
||||||
|
class BloodIV_500: BloodIV {
|
||||||
|
items[] = {"ACE_bloodIV_500"};
|
||||||
|
};
|
||||||
|
class BloodIV_250: BloodIV {
|
||||||
|
items[] = {"ACE_bloodIV_250"};
|
||||||
|
};
|
||||||
class BodyBag: Bandage {
|
class BodyBag: Bandage {
|
||||||
displayName = "$STR_ACE_Medical_PlaceInBodyBag";
|
displayName = "$STR_ACE_Medical_PlaceInBodyBag";
|
||||||
displayNameProgress = "$STR_ACE_Medical_PlacingInBodyBag";
|
displayNameProgress = "$STR_ACE_Medical_PlacingInBodyBag";
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target"];
|
private ["_caller", "_target", "_treatmentClassname"];
|
||||||
_caller = _this select 0;
|
_caller = _this select 0;
|
||||||
_target = _this select 1;
|
_target = _this select 1;
|
||||||
|
_treatmentClassname = _this select 3;
|
||||||
|
|
||||||
[[_target], QUOTE(DFUNC(treatmentBasic_bloodbagLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
[[_target, _treatmentClassname], QUOTE(DFUNC(treatmentBasic_bloodbagLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The patient <OBJECT>
|
* 0: The patient <OBJECT>
|
||||||
|
* 1: Treatment Classname <STRING>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* nil
|
* nil
|
||||||
@ -14,8 +15,15 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
#define BLOODBAGHEAL 70
|
#define BLOODBAGHEAL 70
|
||||||
|
|
||||||
private ["_target","_blood"];
|
PARAMS_2(_target,_treatmentClassname);
|
||||||
_target = _this select 0;
|
|
||||||
|
|
||||||
_blood = ((_target getVariable [QGVAR(bloodVolume), 100]) + BLOODBAGHEAL) min 100;
|
private ["_blood", "_bloodAdded"];
|
||||||
|
|
||||||
|
_bloodAdded = switch (true) do {
|
||||||
|
case (_treatmentClassname == "BloodIV_250"): {0.25 * BLOODBAGHEAL};
|
||||||
|
case (_treatmentClassname == "BloodIV_500"): {0.5 * BLOODBAGHEAL};
|
||||||
|
default {BLOODBAGHEAL};
|
||||||
|
};
|
||||||
|
|
||||||
|
_blood = ((_target getVariable [QGVAR(bloodVolume), 100]) + _bloodAdded) min 100;
|
||||||
_target setVariable [QGVAR(bloodVolume), _blood, true];
|
_target setVariable [QGVAR(bloodVolume), _blood, true];
|
||||||
|
Loading…
Reference in New Issue
Block a user