Skip to content

Change to morphine handling...Β #958

@morgoth0

Description

@morgoth0

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions