mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-26 03:36:02 +03:00
Add bloodbag cooldown
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
private ["_unit","_blood","_lowBlood","_injured","_inPain","_lastused","_animState","_started","_finished","_timer","_i","_isMedic","_duration","_rhVal","_bloodBagArrayNeeded","_BBneeded","_bbselect","_bloodBagNeeded","_badBag","_wholeBag","_bagFound","_bagToRemove","_forceClose","_bloodType","_rh","_bloodBagArray","_bbarray_length","_bloodBagWholeNeeded","_haswholebag","_r","_transfusionInfection"];
|
||||
private ["_unit","_blood","_lowBlood","_injured","_inPain","_animState","_started","_finished","_timer","_i","_isMedic","_duration","_rhVal","_bloodBagArrayNeeded","_BBneeded","_bbselect","_bloodBagNeeded","_badBag","_wholeBag","_bagFound","_bagToRemove","_forceClose","_bloodType","_rh","_bloodBagArray","_bbarray_length","_bloodBagWholeNeeded","_haswholebag","_r","_transfusionInfection"];
|
||||
|
||||
// bleed.sqf
|
||||
_unit = _this select 0;
|
||||
@@ -8,8 +8,7 @@ _blood = _unit getVariable ["USEC_BloodQty", 0];
|
||||
_lowBlood = _unit getVariable ["USEC_lowBlood", false];
|
||||
_injured = _unit getVariable ["USEC_injured", false];
|
||||
_inPain = _unit getVariable ["USEC_inPain", false];
|
||||
_lastused = _unit getVariable ["LastTransfusion",-(DZE_selfTransfuse_Values select 2)];
|
||||
if (time - _lastused <= DZE_selfTransfuse_Values select 2) exitWith {localize "str_actions_medical_18" call dayz_rollingMessages;};
|
||||
if (time - dayz_lastSelfTransfusion <= DZE_selfTransfuse_Values select 2) exitWith {localize "str_actions_medical_18" call dayz_rollingMessages;};
|
||||
|
||||
call gear_ui_init;
|
||||
closeDialog 0;
|
||||
@@ -128,7 +127,7 @@ while {r_doLoop and (_i < 12)} do {
|
||||
|
||||
if (((_blood >= r_player_bloodTotal) and !_badBag and _bagFound) or (_i == 12)) then {
|
||||
diag_log format ["TRANSFUSION: completed blood transfusion successfully (_i = %1)", _i];
|
||||
_unit setVariable ["LastTransfusion",time,false];
|
||||
dayz_lastSelfTransfusion = time;
|
||||
if (_transfusionInfection) then {r_player_infected = true; player setVariable["USEC_infected",true,true];};
|
||||
localize "str_actions_medical_transfusion_successful" call dayz_rollingMessages;
|
||||
r_doLoop = false;
|
||||
|
||||
Reference in New Issue
Block a user