mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-24 09:29:21 +03:00
Customize self transfusion settings
This commit is contained in:
@@ -525,7 +525,9 @@ if(isNil "DZE_DamageBeforeMaint") then {
|
||||
if(isNil "DZE_StaticConstructionCount") then {
|
||||
DZE_StaticConstructionCount = 0;
|
||||
};
|
||||
|
||||
if (isNil "DZE_selfTransfuse_Values") then {
|
||||
DZE_selfTransfuse_Values = [12000, 15, 300];
|
||||
};
|
||||
|
||||
// needed on server
|
||||
if(isNil "DZE_PlotPole") then {
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
// animHealed.sqf
|
||||
private ["_array","_unit","_display","_control","_rndInfection","_TransfusionInfection"];
|
||||
private ["_selfTransValues","_unit","_display","_control","_rndInfection","_TransfusionInfection"];
|
||||
disableserialization;
|
||||
_unit = _this select 0;
|
||||
|
||||
_rndInfection = (random 15);
|
||||
_TransfusionInfection = (_rndInfection < 1);
|
||||
|
||||
if (_unit == player) then {
|
||||
r_player_blood = r_player_bloodTotal;
|
||||
if ((count _this) > 1) then {
|
||||
_selfTransValues = _this select 1;
|
||||
r_player_blood = (_selfTransValues select 0);
|
||||
_TransfusionInfection = ((random (_selfTransValues select 1)) < 1);
|
||||
} else {
|
||||
r_player_blood = r_player_bloodTotal;
|
||||
};
|
||||
r_player_lowblood = false;
|
||||
10 fadeSound 1;
|
||||
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused"];
|
||||
private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused","_timeout"];
|
||||
if (!DZE_SelfTransfuse) exitWith {};
|
||||
_unit = player;
|
||||
_lastused = selfTransfusionTime;
|
||||
if ((round(time - _lastused)) <= 300) exitWith {cutText [format[(localize "str_actions_medical_18"),(300 - (round(time - _lastused)))] , "PLAIN DOWN"]};
|
||||
_timeout = (DZE_selfTransfuse_Values select 3);
|
||||
if ((round(time - _lastused)) <= _timeout) exitWith {cutText [format[(localize "str_actions_medical_18"),(_timeout - (round(time - _lastused)))] , "PLAIN DOWN"]};
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
@@ -46,7 +47,7 @@ if (_finished) then {
|
||||
if (vehicle player != player) then {
|
||||
(findDisplay 106) closeDisplay 0;
|
||||
};
|
||||
[_unit] call player_medTransfuse;
|
||||
[_unit, DZE_selfTransfuse_Values] call player_medTransfuse;
|
||||
};
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
|
||||
Reference in New Issue
Block a user