Customize self transfusion settings

This commit is contained in:
icomrade
2014-05-27 12:40:42 -04:00
parent 90b128f4ba
commit 985d205ec2
4 changed files with 17 additions and 9 deletions

View File

@@ -4,6 +4,7 @@
[ADDED] Variable DZE_ForceNameTagsInTrader to force name tags in traders. @Skaronator @Fank
[ADDED] Switch seats in all vehicles. @icomrade
[ADDED] Self transfusions (works in vehicles) must be enabled in mission using DZE_SelfTransfuse. @icomrade
[NOTE] You may customize transfusion settings for self transfusions using DZE_selfTransfuse_Values = [blood amount, infection chance, cool-down (seconds)]; @icomrade
[ADDED] Default player skin for fresh spawns, selected randomly DZE_defaultSkin = [["Male skin1","Male skin2"],["Female skin1","Female skin2"]]. @icomrade
[ADDED] The USEC CH53 Super Stallion to the dynamic vehicle lists & trader. @Namindu @raginruffalo
[ADDED] The BAF Merlin has been added to the neutral aircraft trader under Unarmed Helicopters. @raginruffalo

View File

@@ -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 {

View File

@@ -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 {
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;

View File

@@ -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;