mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-22 03:16:27 +03:00
It makes no sense to rename the identical DayZ PVs to have an E in their name. I don't see any good reason it was done in the first place. All it accomplishes is breaking script compatibility between the two mods and requiring different publicvariable.txt filters. The only time it makes sense is for custom Epoch variables that aren't used in vanilla. All admins have to do to update custom scripts is swap the names according to the change log. Note I've submitted a pull request to replace PVDZ_veh_Save with PVDZ_obj_Save in official too because they are duplicates.
39 lines
1.6 KiB
Plaintext
39 lines
1.6 KiB
Plaintext
private["_item","_config","_onLadder","_classname","_text","_consume","_hastrapitem","_location","_object"];
|
|
|
|
_item = _this;
|
|
_config = configFile >> "CfgWeapons" >> _item;
|
|
|
|
if (r_action_count != 1) exitWith { cutText [localize "str_player_actionslimit", "PLAIN DOWN"]; };
|
|
|
|
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
|
if (_onLadder) exitWith { r_action_count = 0; cutText [localize "str_player_21", "PLAIN DOWN"]};
|
|
|
|
call gear_ui_init;
|
|
|
|
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
|
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
|
_consume = ([] + getArray (_config >> "magazines")) select 0;
|
|
|
|
_hastrapitem = _item in magazines player;
|
|
|
|
if (!_hastrapitem) exitWith { r_action_count = 0; cutText [format [localize "str_player_31",_text,localize "str_player_31_place"] , "PLAIN DOWN"]};
|
|
|
|
player removeMagazine _item;
|
|
_location = getPosATL player;
|
|
|
|
player playActionNow "PutDown";
|
|
uiSleep 1;
|
|
|
|
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
|
_object setDir (getDir player);
|
|
|
|
_object setVariable ["armed", false, true];
|
|
|
|
PVDZ_obj_Publish = [dayz_characterID,_object,[getDir _object, getPosATL _object],[["armed", _object getVariable "armed"]]];
|
|
publicVariableServer "PVDZ_obj_Publish";
|
|
diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish];
|
|
|
|
player reveal _object;
|
|
|
|
r_action_count = 0;
|
|
cutText [format [localize "str_build_01",_text], "PLAIN DOWN"]; |