mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-23 04:22:13 +03:00
Update arrow and quiver classnames
Vanilla development commit:
1561c3cfd8
This commit is contained in:
@@ -34,11 +34,9 @@ if (_classname isKindOf "TrapBear") exitWith { deleteVehicle _holder; };
|
||||
player playActionNow "PutDown";
|
||||
|
||||
//Adding random chance of arrow is re-usable on pickup
|
||||
_broken = if ((_classname == "WoodenArrow") && {[0.15] call fn_chance}) then {true} else {false};
|
||||
_broken = if ((_classname == "1Rnd_Arrow_Wood") && {[0.15] call fn_chance}) then {true} else {false};
|
||||
if (_broken) exitWith { deleteVehicle _holder; localize "str_broken_arrow" call dayz_rollingMessages; };
|
||||
|
||||
uiSleep 0.25; //Why are we waiting? Animation
|
||||
|
||||
_claimedBy = _holder getVariable["claimed","0"];
|
||||
|
||||
if (_claimedBy != _playerID) exitWith { format[localize "str_player_beinglooted",_text] call dayz_rollingMessages; };
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
private ["_qty_arrows","_qty_quivers","_qty_quiverarrows"];
|
||||
call gear_ui_init;
|
||||
|
||||
_qty_arrows = {_x == "WoodenArrow"} count magazines player;
|
||||
_qty_quivers = {_x == "Quiver"} count magazines player;
|
||||
_qty_arrows = {_x == "1Rnd_Arrow_Wood"} count magazines player;
|
||||
_qty_quivers = {_x == "12Rnd_Quiver_Wood"} count magazines player;
|
||||
|
||||
//if (_qty_quivers > 0) exitWith { localize "str_quiver_reachlimit" call dayz_rollingMessages;};
|
||||
if (_qty_arrows < 2) exitWith { localize "str_quiver_notenougharrows" call dayz_rollingMessages;}; //Not enough arrows to create quiver
|
||||
if (_qty_arrows < 2) exitWith { localize "str_quiver_notenougharrows" call dayz_rollingMessages;}; //Not enough arrows to create 12Rnd_Quiver_Wood
|
||||
|
||||
_qty_quiverarrows = _qty_arrows min 6;
|
||||
|
||||
for "_x" from 1 to _qty_quiverarrows do {
|
||||
player removeMagazine "WoodenArrow";
|
||||
player removeMagazine "1Rnd_Arrow_Wood";
|
||||
};
|
||||
player addMagazine ["Quiver",_qty_quiverarrows];
|
||||
player addMagazine ["12Rnd_Quiver_Wood",_qty_quiverarrows];
|
||||
format[localize "str_quiver_createsuccess",_qty_quiverarrows] call dayz_rollingMessages;
|
||||
|
||||
@@ -3,8 +3,8 @@ private ["_qty_arrows","_qty_quivers","_control","_qty_quiverarrows","_qty_quive
|
||||
disableSerialization;
|
||||
call gear_ui_init;
|
||||
|
||||
_qty_arrows = {_x == "WoodenArrow"} count magazines player;
|
||||
_qty_quivers = {_x == "Quiver"} count magazines player;
|
||||
_qty_arrows = {_x == "1Rnd_Arrow_Wood"} count magazines player;
|
||||
_qty_quivers = {_x == "12Rnd_Quiver_Wood"} count magazines player;
|
||||
|
||||
_control = uiNamespace getVariable 'uiControl';
|
||||
_qty_quiverarrows = gearSlotAmmoCount _control;
|
||||
@@ -13,11 +13,11 @@ _qty_quiverfreeslots = 12-_qty_quiverarrows;
|
||||
//if (_qty_quivers > 1) exitWith { localize "str_quiver_reachlimit" call dayz_rollingMessages;};
|
||||
if (_qty_quiverfreeslots > 0) then {
|
||||
_qty_arrows2add = _qty_quiverfreeslots min _qty_arrows;
|
||||
player removeMagazine "Quiver";
|
||||
player removeMagazine "12Rnd_Quiver_Wood";
|
||||
for "_x" from 1 to _qty_arrows2add do {
|
||||
player removeMagazine "WoodenArrow";
|
||||
player removeMagazine "1Rnd_Arrow_Wood";
|
||||
};
|
||||
player addMagazine ["Quiver",_qty_quiverarrows+_qty_arrows2add];
|
||||
player addMagazine ["12Rnd_Quiver_Wood",_qty_quiverarrows+_qty_arrows2add];
|
||||
format[localize "str_quiver_addarrows",_qty_arrows2add] call dayz_rollingMessages;
|
||||
} else {
|
||||
localize "str_quiver_full" call dayz_rollingMessages;
|
||||
|
||||
@@ -3,7 +3,7 @@ private ["_qty_quivers","_control","_qty_quiverarrows","_empty","_emptymagslotco
|
||||
disableSerialization;
|
||||
call gear_ui_init;
|
||||
|
||||
_qty_quivers = {_x == "Quiver"} count magazines player;
|
||||
_qty_quivers = {_x == "12Rnd_Quiver_Wood"} count magazines player;
|
||||
_control = uiNamespace getVariable 'uiControl';
|
||||
_qty_quiverarrows = gearSlotAmmoCount _control;
|
||||
|
||||
@@ -14,19 +14,19 @@ _empty = [player] call BIS_fnc_invSlotsEmpty;
|
||||
_emptymagslotcount = _empty select 4; //empty magazines slots
|
||||
|
||||
if (_qty_quivers > 1) exitWith { localize "str_quiver_reachlimit" call dayz_rollingMessages;};
|
||||
if (_qty_quiverarrows == 2) then { //remove quiver - add 2 arrows
|
||||
if (_qty_quiverarrows == 2) then { //remove 12Rnd_Quiver_Wood - add 2 arrows
|
||||
if (_emptymagslotcount > 0) then {
|
||||
player removeMagazine "Quiver";
|
||||
player addMagazine "WoodenArrow";
|
||||
player addMagazine "WoodenArrow";
|
||||
player removeMagazine "12Rnd_Quiver_Wood";
|
||||
player addMagazine "1Rnd_Arrow_Wood";
|
||||
player addMagazine "1Rnd_Arrow_Wood";
|
||||
} else {
|
||||
localize "str_player_24" call dayz_rollingMessages; //Error
|
||||
};
|
||||
} else {
|
||||
if (_emptymagslotcount > 0) then {
|
||||
player removeMagazine "Quiver";
|
||||
player addMagazine "WoodenArrow";
|
||||
player addMagazine ["Quiver",_qty_quiverarrows-1];
|
||||
player removeMagazine "12Rnd_Quiver_Wood";
|
||||
player addMagazine "1Rnd_Arrow_Wood";
|
||||
player addMagazine ["12Rnd_Quiver_Wood",_qty_quiverarrows-1];
|
||||
} else {
|
||||
localize "str_player_24" call dayz_rollingMessages; //Error
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user