Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to morphine handling... #958

Open
morgoth0 opened this issue Nov 9, 2017 · 0 comments
Open

Change to morphine handling... #958

morgoth0 opened this issue Nov 9, 2017 · 0 comments
Milestone

Comments

@morgoth0
Copy link
Contributor

morgoth0 commented Nov 9, 2017

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

@vbawol vbawol added this to the 1.3 milestone Jun 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants