mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
add a setting for 'basic' blood bags
This commit is contained in:
parent
4e0f3e53e0
commit
92fc4ec14b
@ -9,4 +9,13 @@ GVAR(SELECTIONS) = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
|
||||
|
||||
GVAR(STATE_MACHINE) = (configFile >> "ACE_Medical_StateMachine") call FUNC(createStateMachine);
|
||||
|
||||
[
|
||||
QGVAR(basicIVBags),
|
||||
"CHECKBOX",
|
||||
["Basic IV Bags", "IV Bags fill up lost blood instantly"], //@todo
|
||||
"ACE Medical", // @todo
|
||||
true,
|
||||
true
|
||||
] call CBA_Settings_fnc_init;
|
||||
|
||||
ADDON = true;
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
// IV Change per second calculation:
|
||||
// 250ml should take 60 seconds to fill. 250ml/60s = 4.166ml/s.
|
||||
#define IV_CHANGE_PER_SECOND 4.166 // in milliliters per second
|
||||
#define IV_CHANGE_PER_SECOND ([4.166, 1000] select GVAR(basicIVBags)) // in milliliters per second
|
||||
|
||||
// chance per second to get knocked out due to blood loss
|
||||
#define BLOOD_LOSS_KNOCK_OUT_CHANCE 0.1 // 10%
|
||||
|
@ -40,8 +40,6 @@ PREP(treatmentEpipen);
|
||||
//PREP(treatmentEpipenLocal);
|
||||
PREP(treatmentMedication);
|
||||
PREP(treatmentMedicationLocal);
|
||||
PREP(treatmentBloodbag);
|
||||
PREP(treatmentBloodbagLocal);
|
||||
PREP(treatmentIV);
|
||||
PREP(treatmentIVLocal);
|
||||
PREP(treatmentCPR);
|
||||
|
@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
* Callback when the bloodbag treatment is complete
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
* 2: Body part <STRING>
|
||||
* 3: Treatment class name <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_caller", "_target", "_treatmentClassname"];
|
||||
|
||||
[QGVAR(treatmentBloodbagLocal), [_target, _treatmentClassname], _target] call CBA_fnc_targetEvent;
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
* Local callback when the bloodbag treatment is complete
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The patient <OBJECT>
|
||||
* 1: Treatment Classname <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
#define BLOODBAGHEAL 70
|
||||
|
||||
params ["_target", "_treatmentClassname"];
|
||||
|
||||
private _bloodAdded = switch (true) do {
|
||||
case (_treatmentClassname == "BloodIV_250"): {0.25 * BLOODBAGHEAL};
|
||||
case (_treatmentClassname == "BloodIV_500"): {0.5 * BLOODBAGHEAL};
|
||||
default {BLOODBAGHEAL};
|
||||
};
|
||||
|
||||
private _blood = ((_target getVariable [QEGVAR(medical,bloodVolume), DEFAULT_BLOOD_VOLUME]) + _bloodAdded) min DEFAULT_BLOOD_VOLUME;
|
||||
_target setVariable [QEGVAR(medical,bloodVolume), _blood, true];
|
Loading…
Reference in New Issue
Block a user