mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Update arrow and quiver classnames
Vanilla development commit:
1561c3cfd8
This commit is contained in:
@@ -7,7 +7,7 @@ class Wooden_Arrow : Recipe {
|
|||||||
};
|
};
|
||||||
output[] =
|
output[] =
|
||||||
{
|
{
|
||||||
{"WoodenArrow","CfgMagazines",4}
|
{"1Rnd_Arrow_Wood","CfgMagazines",4}
|
||||||
};
|
};
|
||||||
required[] =
|
required[] =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,8 +72,10 @@ class 1Rnd_Bolt_Explosive : CA_Magazine
|
|||||||
ammo = "explosive_bolt";
|
ammo = "explosive_bolt";
|
||||||
};
|
};
|
||||||
|
|
||||||
//TODO: Remove legacy
|
/*
|
||||||
class WoodenArrow : 1Rnd_Arrow_Wood {};
|
//TODO: Remove legacy
|
||||||
class Quiver : 12Rnd_Quiver_Wood {};
|
class WoodenArrow : 1Rnd_Arrow_Wood {};
|
||||||
class Tranquiliser_Bolt : 1Rnd_Bolt_Tranquilizer {};
|
class Quiver : 12Rnd_Quiver_Wood {};
|
||||||
class Crossbow_EX_Bolt : 1Rnd_Bolt_Explosive {};
|
class Tranquiliser_Bolt : 1Rnd_Bolt_Tranquilizer {};
|
||||||
|
class Crossbow_EX_Bolt : 1Rnd_Bolt_Explosive {};
|
||||||
|
*/
|
||||||
@@ -6,7 +6,7 @@ class WoodenArrowF : WeaponHolderBase {
|
|||||||
|
|
||||||
class eventHandlers
|
class eventHandlers
|
||||||
{
|
{
|
||||||
init = "[(_this select 0),'cfgMagazines','WoodenArrow'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';";
|
init = "[(_this select 0),'cfgMagazines','1Rnd_Arrow_Wood'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class WeaponHolder_ItemCrowbar: WeaponHolderBase
|
class WeaponHolder_ItemCrowbar: WeaponHolderBase
|
||||||
|
|||||||
@@ -34,11 +34,9 @@ if (_classname isKindOf "TrapBear") exitWith { deleteVehicle _holder; };
|
|||||||
player playActionNow "PutDown";
|
player playActionNow "PutDown";
|
||||||
|
|
||||||
//Adding random chance of arrow is re-usable on pickup
|
//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; };
|
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"];
|
_claimedBy = _holder getVariable["claimed","0"];
|
||||||
|
|
||||||
if (_claimedBy != _playerID) exitWith { format[localize "str_player_beinglooted",_text] call dayz_rollingMessages; };
|
if (_claimedBy != _playerID) exitWith { format[localize "str_player_beinglooted",_text] call dayz_rollingMessages; };
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
private ["_qty_arrows","_qty_quivers","_qty_quiverarrows"];
|
private ["_qty_arrows","_qty_quivers","_qty_quiverarrows"];
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
|
||||||
_qty_arrows = {_x == "WoodenArrow"} count magazines player;
|
_qty_arrows = {_x == "1Rnd_Arrow_Wood"} count magazines player;
|
||||||
_qty_quivers = {_x == "Quiver"} 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_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;
|
_qty_quiverarrows = _qty_arrows min 6;
|
||||||
|
|
||||||
for "_x" from 1 to _qty_quiverarrows do {
|
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;
|
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;
|
disableSerialization;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
|
||||||
_qty_arrows = {_x == "WoodenArrow"} count magazines player;
|
_qty_arrows = {_x == "1Rnd_Arrow_Wood"} count magazines player;
|
||||||
_qty_quivers = {_x == "Quiver"} count magazines player;
|
_qty_quivers = {_x == "12Rnd_Quiver_Wood"} count magazines player;
|
||||||
|
|
||||||
_control = uiNamespace getVariable 'uiControl';
|
_control = uiNamespace getVariable 'uiControl';
|
||||||
_qty_quiverarrows = gearSlotAmmoCount _control;
|
_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_quivers > 1) exitWith { localize "str_quiver_reachlimit" call dayz_rollingMessages;};
|
||||||
if (_qty_quiverfreeslots > 0) then {
|
if (_qty_quiverfreeslots > 0) then {
|
||||||
_qty_arrows2add = _qty_quiverfreeslots min _qty_arrows;
|
_qty_arrows2add = _qty_quiverfreeslots min _qty_arrows;
|
||||||
player removeMagazine "Quiver";
|
player removeMagazine "12Rnd_Quiver_Wood";
|
||||||
for "_x" from 1 to _qty_arrows2add do {
|
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;
|
format[localize "str_quiver_addarrows",_qty_arrows2add] call dayz_rollingMessages;
|
||||||
} else {
|
} else {
|
||||||
localize "str_quiver_full" call dayz_rollingMessages;
|
localize "str_quiver_full" call dayz_rollingMessages;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ private ["_qty_quivers","_control","_qty_quiverarrows","_empty","_emptymagslotco
|
|||||||
disableSerialization;
|
disableSerialization;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
|
||||||
_qty_quivers = {_x == "Quiver"} count magazines player;
|
_qty_quivers = {_x == "12Rnd_Quiver_Wood"} count magazines player;
|
||||||
_control = uiNamespace getVariable 'uiControl';
|
_control = uiNamespace getVariable 'uiControl';
|
||||||
_qty_quiverarrows = gearSlotAmmoCount _control;
|
_qty_quiverarrows = gearSlotAmmoCount _control;
|
||||||
|
|
||||||
@@ -14,19 +14,19 @@ _empty = [player] call BIS_fnc_invSlotsEmpty;
|
|||||||
_emptymagslotcount = _empty select 4; //empty magazines slots
|
_emptymagslotcount = _empty select 4; //empty magazines slots
|
||||||
|
|
||||||
if (_qty_quivers > 1) exitWith { localize "str_quiver_reachlimit" call dayz_rollingMessages;};
|
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 {
|
if (_emptymagslotcount > 0) then {
|
||||||
player removeMagazine "Quiver";
|
player removeMagazine "12Rnd_Quiver_Wood";
|
||||||
player addMagazine "WoodenArrow";
|
player addMagazine "1Rnd_Arrow_Wood";
|
||||||
player addMagazine "WoodenArrow";
|
player addMagazine "1Rnd_Arrow_Wood";
|
||||||
} else {
|
} else {
|
||||||
localize "str_player_24" call dayz_rollingMessages; //Error
|
localize "str_player_24" call dayz_rollingMessages; //Error
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if (_emptymagslotcount > 0) then {
|
if (_emptymagslotcount > 0) then {
|
||||||
player removeMagazine "Quiver";
|
player removeMagazine "12Rnd_Quiver_Wood";
|
||||||
player addMagazine "WoodenArrow";
|
player addMagazine "1Rnd_Arrow_Wood";
|
||||||
player addMagazine ["Quiver",_qty_quiverarrows-1];
|
player addMagazine ["12Rnd_Quiver_Wood",_qty_quiverarrows-1];
|
||||||
} else {
|
} else {
|
||||||
localize "str_player_24" call dayz_rollingMessages; //Error
|
localize "str_player_24" call dayz_rollingMessages; //Error
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ if (count _inventory > 0) then {
|
|||||||
_val = -1;
|
_val = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_item == "BoltSteel") then { _item = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
|
if (_item == "BoltSteel") then { _item = "1Rnd_Arrow_Wood" }; // Convert BoltSteel to WoodenArrow
|
||||||
if (dayz_classicBloodBagSystem) then {
|
if (dayz_classicBloodBagSystem) then {
|
||||||
if (_item in dayz_typedBags) then { _item = "ItemBloodbag" };
|
if (_item in dayz_typedBags) then { _item = "ItemBloodbag" };
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ actionMonitor = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_classname == "WoodenArrow") then {
|
if (_classname == "1Rnd_Arrow_Wood") then {
|
||||||
[_holder,_type,_classname,_name] spawn actionMonitor;
|
[_holder,_type,_classname,_name] spawn actionMonitor;
|
||||||
} else {
|
} else {
|
||||||
s_player_holderPickup = _holder addAction [format[(localize "str_init_take"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
|
s_player_holderPickup = _holder addAction [format[(localize "str_init_take"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
|
||||||
|
|||||||
@@ -680,7 +680,7 @@ class FSM
|
|||||||
" //Magazines" \n
|
" //Magazines" \n
|
||||||
" _countr = 0;" \n
|
" _countr = 0;" \n
|
||||||
" {" \n
|
" {" \n
|
||||||
" if (_x == ""BoltSteel"") then { _x = ""WoodenArrow"" }; // Convert BoltSteel to WoodenArrow" \n
|
" if (_x == ""BoltSteel"") then { _x = ""1Rnd_Arrow_Wood"" }; // Convert BoltSteel to WoodenArrow" \n
|
||||||
" if (dayz_classicBloodBagSystem) then {" \n
|
" if (dayz_classicBloodBagSystem) then {" \n
|
||||||
" if (_x in dayz_typedBags) then {_x = ""ItemBloodbag""};" \n
|
" if (_x in dayz_typedBags) then {_x = ""ItemBloodbag""};" \n
|
||||||
" } else {" \n
|
" } else {" \n
|
||||||
|
|||||||
Reference in New Issue
Block a user