SHARE
TWEET

fnc_treatmentBasic_bloodbagLocal.sqf

a guest Jan 12th, 2017 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * Author: KoffeinFlummi
  3.  * Local callback when the bloodbag treatment is complete
  4.  *
  5.  * Arguments:
  6.  * 0: The patient <OBJECT>
  7.  * 1: Treatment Classname <STRING>
  8.  *
  9.  * Return Value:
  10.  * nil
  11.  *
  12.  * Public: No
  13.  */
  14.  
  15. #include "script_component.hpp"
  16. #define BLOODBAGHEAL 70
  17.  
  18. params ["_target", "_treatmentClassname"];
  19.  
  20. private _bloodAdded = switch (true) do {
  21.     case (_treatmentClassname == "BloodIV_250"): {0.25 * BLOODBAGHEAL};
  22.     case (_treatmentClassname == "BloodIV_500"): {0.5 * BLOODBAGHEAL};
  23.     default {BLOODBAGHEAL};
  24. };
  25.  
  26. private _blood = ((_target getVariable [QGVAR(bloodVolume), 100]) + _bloodAdded) min 100;
  27. _target setVariable [QGVAR(bloodVolume), _blood, true];
RAW Paste Data
Top