EpochModTeam / Epoch

Epoch Survival Game Mode for ARMA 3
http://epochmod.com/
Other
92 stars 82 forks source link

Change to morphine handling... #958

Open morgoth0 opened 6 years ago

morgoth0 commented 6 years ago

Just putting this out there for comments. Right now morphine just heals a bit of damage (and has effects on player stats, which are nothing to do with this issue) but cannot be applied to another player who is the cursor target. Suggesting that morphine be used to just heal a broken leg and add support for applying to another player. In order to do that the relevant section of EPOCH_consumeitem.sqf could be changed to:

` case 16: { // Morphine _vehicles = player nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 6]; _vehicle = cursorTarget; if !(_vehicle in _vehicles) then { _vehicle = player; };

    _legDamage = _vehicle getHitPointDamage "HitLegs";
    if (_legDamage > 0.5) then {
        if (_item call _removeItem) then {
            [_vehicle] spawn {
                params ["_vehicle"];
                if (player == vehicle player) then {
                    closeDialog 0;
                    player playMove 'AinvPknlMstpSnonWrflDnon_medic0';
                    player playMove 'AinvPknlMstpSnonWrflDnon_medicEnd';
                    uisleep 5;
                };
                [_vehicle,[["HitLegs",0.5]],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];

                if (_vehicle isEqualTo player) then {
                    ["Injected yourself with morphine", 5] call Epoch_message;
                } else {
                    ["Injected other player with morphine", 5] call Epoch_message;
                };
            };
        };
    } else {
        ["Nothing needs morphine at this time... shame!", 5] call Epoch_message;
    };
};

`

CfgItemInteractions can be left as it is with the thirst, toxicity affects as they are.

If people agree I will do a pull request, Cheers, Grahame