From 9f608fdf4438be338c94a47690ac1fd978c28685 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Fri, 14 Oct 2016 16:26:57 -0400 Subject: [PATCH] Add humanity gain for giving splint to other players Vanilla commit: https://github.com/DayZMod/DayZ/commit/879d6ee4bf637687db8e755ac7ab6d6eb0f44920 --- SQF/dayz_code/medical/brokeBones.sqf | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/medical/brokeBones.sqf b/SQF/dayz_code/medical/brokeBones.sqf index 42cc2d162..38aaf945b 100644 --- a/SQF/dayz_code/medical/brokeBones.sqf +++ b/SQF/dayz_code/medical/brokeBones.sqf @@ -1,4 +1,4 @@ -private ["_started","_finished","_animState","_isMedic","_id","_unit","_item"]; +private ["_started","_finished","_animState","_isMedic","_id","_unit","_item","_humanityGain"]; _unit = (_this select 3) select 0; _item = (_this select 3) select 1; @@ -50,8 +50,14 @@ if (_finished) then { //give to remote player, ie the player fixed another player //Give humanity reward to player giving the morphine to another player. - if (_item in ["ItemMorphine"]) then { - [50,0] call player_humanityChange; + _humanityGain = switch true do { + case (_item == "ItemMorphine"): { 50 }; + case (_item == "equip_woodensplint"): { 25 }; + default { 0 }; + }; + + if (_humanityGain > 0) then { + [_humanityGain,0] call player_humanityChange; }; };