Update Painkillers and Antibiotics

- Painkillers are in different pill counts available now, same as antibiotics
- the strings of painkillers and antibiotics have the pill count displayed in the name
This commit is contained in:
A Man
2020-04-06 20:03:14 +02:00
parent 9aeceebb6f
commit b4b8860cf0
12 changed files with 456 additions and 104 deletions

View File

@@ -1,27 +1,46 @@
private "_unit";
private ["_unit","_medsUsed"];
_unit = (_this select 3) select 0;
call fnc_usec_medic_removeActions;
r_action = false;
player removeMagazine "ItemPainkiller";
if (vehicle player == player) then {
//not in a vehicle
player playActionNow "Gear";
};
if (_unit == player) then {
//Self Healing
[player,player] call player_medPainkiller;
localize "str_actions_medical_painkillers_self" call dayz_rollingMessages;
if (count _this > 2) then {
_unit = (_this select 3) select 0;
_medsUsed = nil;
} else {
// Heal another player
PVDZ_send = [_unit,"Painkiller",[_unit,player]];
publicVariableServer "PVDZ_send";
// Give humanity
20 call player_humanityChange;
format [localize "str_actions_medical_painkillers_give",(name _unit)] call dayz_rollingMessages;
_unit = _this select 0;
_medsUsed = _this select 1;
};
if (isNil "_medsUsed") then {
{
if (_x in magazines player) exitWith {
// Set painkillers if not defined (used when giving to somebody)
_medsUsed = _x;
};
} count ["ItemPainkiller","ItemPainkiller1","ItemPainkiller2","ItemPainkiller3","ItemPainkiller4","ItemPainkiller5","ItemPainkiller6"];
};
if !(isNil "_medsUsed") then {
//Remove one table from the box.
[_medsUsed,"medical"] call dayz_reduceItems;
call fnc_usec_medic_removeActions;
r_action = false;
if (vehicle player == player) then {
//not in a vehicle
player playActionNow "Gear";
};
if (_unit == player) then {
//Self Healing
[player,player] call player_medPainkiller;
localize "str_actions_medical_painkillers_self" call dayz_rollingMessages;
} else {
// Heal another player
PVDZ_send = [_unit,"Painkiller",[_unit,player]];
publicVariableServer "PVDZ_send";
// Give humanity
20 call player_humanityChange;
format [localize "str_actions_medical_painkillers_give",(name _unit)] call dayz_rollingMessages;
};
};

View File

@@ -311,52 +311,52 @@ fnc_usec_damageBleed = {
[0,0,0];
};
while {1 == 1} do {
scopeName "main";
waitUntil {(vehicle _unit == _unit)};
while {1 == 1} do {
scopeName "main";
waitUntil {(vehicle _unit == _unit)};
if ((dayz_bleedingeffect == 2) or (dayz_bleedingeffect == 3)) then {
//Blood partical
_point = "Logic" createVehicleLocal getPosATL _unit;
_source = "#particlesource" createVehicleLocal getPosATL _unit;
_source setParticleParams
/* Sprite */ [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 1],"", // File,Ntieth,Index,Count,Loop(Bool)
/* Type */ "Billboard",
/* TimmerPer */ 1,
/* Lifetime */ 0.2,
/* Position */ [0,0,0],
/* MoveVelocity */ [0,0,0.5],
/* Simulation */ 1,0.32,0.1,0.05, //rotationVel,weight,volume,rubbing
/* Scale */ [0.05,0.25],
/* Color */ [[0.2,0.01,0.01,1],[0.2,0.01,0.01,0]],
/* AnimSpeed */ [0.1],
/* randDirPeriod */ 0,
/* randDirIntesity */ 0,
/* onTimerScript */ "",
/* DestroyScript */ "",
/* Follow */ _point];
_source setParticleRandom [2, [0, 0, 0], [0.0, 0.0, 0.0], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
_source setDropInterval 0.02;
_point attachTo [_unit,_modelPos,_wound];
};
uiSleep 5;
while {((_unit getVariable["USEC_injured",true]) && {alive _unit})} do {
scopeName "loop";
if (vehicle _unit != _unit) then {
BreakOut "loop";
};
uiSleep 1;
};
deleteVehicle _source;
deleteVehicle _point;
if (!(_unit getVariable["USEC_injured",false])) then {
BreakOut "main";
};
if ((dayz_bleedingeffect == 2) or (dayz_bleedingeffect == 3)) then {
//Blood partical
_point = "Logic" createVehicleLocal getPosATL _unit;
_source = "#particlesource" createVehicleLocal getPosATL _unit;
_source setParticleParams
/* Sprite */ [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 1],"", // File,Ntieth,Index,Count,Loop(Bool)
/* Type */ "Billboard",
/* TimmerPer */ 1,
/* Lifetime */ 0.2,
/* Position */ [0,0,0],
/* MoveVelocity */ [0,0,0.5],
/* Simulation */ 1,0.32,0.1,0.05, //rotationVel,weight,volume,rubbing
/* Scale */ [0.05,0.25],
/* Color */ [[0.2,0.01,0.01,1],[0.2,0.01,0.01,0]],
/* AnimSpeed */ [0.1],
/* randDirPeriod */ 0,
/* randDirIntesity */ 0,
/* onTimerScript */ "",
/* DestroyScript */ "",
/* Follow */ _point];
_source setParticleRandom [2, [0, 0, 0], [0.0, 0.0, 0.0], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
_source setDropInterval 0.02;
_point attachTo [_unit,_modelPos,_wound];
};
uiSleep 5;
while {((_unit getVariable["USEC_injured",true]) && {alive _unit})} do {
scopeName "loop";
if (vehicle _unit != _unit) then {
BreakOut "loop";
};
uiSleep 1;
};
deleteVehicle _source;
deleteVehicle _point;
if (!(_unit getVariable["USEC_injured",false])) then {
BreakOut "main";
};
};
deleteVehicle _source;
deleteVehicle _point;
};