mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 10:26:28 +03:00
@@ -1,40 +1,70 @@
|
||||
class ItemMetalSheet: CA_Magazine
|
||||
class ItemMetalSheet: CA_Magazine //Construection,farm,indestrial,castle
|
||||
{
|
||||
scope = public;
|
||||
scope = 2;
|
||||
count = 1;
|
||||
type = 256;
|
||||
displayName = $STR_BLD_name_ItemMetalSheet;//"Corrugated Sheet"
|
||||
picture = "\z\addons\dayz_buildings\equip\item_sheetmetal.paa";
|
||||
model = "z\addons\dayz_buildings\models\sheet_metal.p3d";
|
||||
descriptionShort = $STR_BLD_desc_ItemMetalSheet;//"Metal Sheeting"
|
||||
};
|
||||
class ItemConcreteBlock: CA_Magazine
|
||||
};
|
||||
|
||||
class ItemConcreteBlock: CA_Magazine //Construection,indestrial
|
||||
{
|
||||
scope = public;
|
||||
scope = 2;
|
||||
count = 1;
|
||||
type = 256;
|
||||
displayName = $STR_BLD_name_ItemConcreteBlock;//"Concrete Block"
|
||||
picture = "\z\addons\dayz_buildings\equip\concreteblock.paa";
|
||||
model = "z\addons\dayz_buildings\models\concreteblock.p3d";
|
||||
descriptionShort = $STR_BLD_desc_ItemConcreteBlock;//"Concrete Block"
|
||||
};
|
||||
class ItemRSJ: CA_Magazine
|
||||
};
|
||||
|
||||
class ItemRSJ: CA_Magazine //Construection,farm,indestrial,castle
|
||||
{
|
||||
scope = public;
|
||||
scope = 2;
|
||||
count = 1;
|
||||
type = 256;
|
||||
displayName = $STR_BLD_name_ItemRSJ;//"Steel Beam"
|
||||
picture = "\z\addons\dayz_buildings\equip\item_rsj.paa";
|
||||
model = "z\addons\dayz_buildings\models\rsj.p3d";
|
||||
descriptionShort = $STR_BLD_desc_ItemRSJ;//"Steel RSJ Support Beam"
|
||||
};
|
||||
class ItemScrews: CA_Magazine
|
||||
};
|
||||
|
||||
class ItemScrews: CA_Magazine //Construection,farm,indestrial,castle,residential
|
||||
{
|
||||
scope = public;
|
||||
scope = 2;
|
||||
count = 1;
|
||||
type = 256;
|
||||
displayName = "Loose Screws";//"Box of screws for metal"
|
||||
picture = "\z\addons\dayz_buildings\equip\item_screws.paa";
|
||||
model = "z\addons\dayz_buildings\models\screws.p3d";
|
||||
descriptionShort = $STR_BLD_desc_ItemScrews;//"Box of screws"
|
||||
};
|
||||
|
||||
class ItemBagScrews: CA_Magazine//Construection,indestrial,supermarket
|
||||
{
|
||||
scope = 2;
|
||||
count = 1;
|
||||
type = 256;
|
||||
displayName = $STR_BLD_name_ItemScrews;//"Box of screws for metal"
|
||||
picture = "\z\addons\dayz_buildings\equip\item_screws.paa";
|
||||
model = "z\addons\dayz_buildings\models\screws.p3d";
|
||||
descriptionShort = $STR_BLD_desc_ItemScrews;//"Box of screws"
|
||||
};
|
||||
|
||||
class ItemActions {
|
||||
class Spilt {
|
||||
text = "Spilt Box";
|
||||
script = "; [_this] call fn_spiltBag;";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
ItemScrews //Construection,farm,indestrial,castle,residential
|
||||
ItemBagScrews //(LowChance)Construection,(LowChance)indestrial,supermarket
|
||||
ItemRSJ //Construection,farm,indestrial,castle
|
||||
ItemConcreteBlock //Construection,indestrial
|
||||
ItemMetalSheet //Construection,farm,indestrial,castle
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ if (_startMaintenance) then {
|
||||
//publicVariableServer "PVDZ_object_replace";
|
||||
};
|
||||
|
||||
_cursorTarget setVariable["Maintenance",true,true];
|
||||
_cursorTarget setVariable["Maintenance",false,true];
|
||||
|
||||
localize "str_maintenanceDone" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
private ["_brokein","_isOk","_hasSledgeHammer","_gps","_vars","_hasToolbox","_hasCrowbar","_limit","_proceed","_counter",
|
||||
"_dis","_sfx","_roll","_animState","_started","_finished","_isMedic","_isGate"];
|
||||
"_dis","_sfx","_roll","_animState","_started","_finished","_isMedic","_isGate","_values"];
|
||||
|
||||
_target = _this select 3;
|
||||
_pos = getPos _target;
|
||||
@@ -25,6 +25,15 @@ _proceed = false;
|
||||
_counter = 0;
|
||||
_brokein = false;
|
||||
|
||||
//[ChanceToBreakin,SledgeChance,CowbarChance]
|
||||
_values = switch (1==1) do {
|
||||
case (_isWoodenGate): { [0.04,0.30,0.20] };
|
||||
case (_isMetalGate): { [0.02,0.60,0.40] };
|
||||
default { [] };
|
||||
};
|
||||
|
||||
if ( (count _values) == 0 ) exitwith {};
|
||||
|
||||
while {_isOk} do {
|
||||
//Check if we have the tools to start
|
||||
_hasSledgeHammer = "ItemSledge" in items player;
|
||||
@@ -85,32 +94,21 @@ while {_isOk} do {
|
||||
|
||||
//Everything happened as it should
|
||||
if(_finished) then {
|
||||
//Add to Counter
|
||||
//Add to Counter
|
||||
_counter = _counter + 1;
|
||||
|
||||
if (_isMetalGate) then {
|
||||
//start chance to gain access.
|
||||
if ([0.02] call fn_chance) then {
|
||||
_isOk = false;
|
||||
_proceed = true;
|
||||
_brokein = true;
|
||||
_target setVariable ["isOpen", "1", true];
|
||||
};
|
||||
};
|
||||
|
||||
if (_isWoodenGate) then {
|
||||
if ([0.04] call fn_chance) then {
|
||||
_isOk = false;
|
||||
_proceed = true;
|
||||
_brokein = true;
|
||||
_target setVariable ["isOpen", "1", true];
|
||||
};
|
||||
//start chance to gain access.
|
||||
if ([(_values select 0)] call fn_chance) then {
|
||||
_isOk = false;
|
||||
_proceed = true;
|
||||
_brokein = true;
|
||||
_target setVariable ["isOpen", "1", true];
|
||||
};
|
||||
};
|
||||
|
||||
if (dayz_toolBreaking) then {
|
||||
//Chances to damage tools
|
||||
if ([0.30] call fn_chance) then {
|
||||
if ([(_values select 1)] call fn_chance) then {
|
||||
player removeWeapon "ItemSledge";
|
||||
player addMagazine "ItemSledgeHandle";
|
||||
player addMagazine "ItemSledgeHead";
|
||||
@@ -118,7 +116,7 @@ while {_isOk} do {
|
||||
localize "STR_BLD_BREAKIN_BROKEN_SLEDGE" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
if ([0.20] call fn_chance) then {
|
||||
if ([(_values select 2)] call fn_chance) then {
|
||||
player removeWeapon "ItemCrowbar";
|
||||
player addWeapon "ItemCrowbarBent";
|
||||
|
||||
|
||||
@@ -10,39 +10,43 @@ private["_obj","_total","_damage"];
|
||||
|
||||
//Object the EH is assigned too
|
||||
_obj = _this select 0;
|
||||
//Total damage of the object
|
||||
_total = (damage _obj);
|
||||
|
||||
//Modify damage done based on level of fence
|
||||
if !((_this select 4) in ["PipeBomb","explosive_bolt","Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo"]) exitwith { false };
|
||||
|
||||
_damage = switch (1==1) do {
|
||||
case ((typeof _obj) in ["WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","WoodenFence_7","WoodenGate_2","WoodenGate_3","WoodenGate_4"]): { 0.5 };
|
||||
//case ((typeof _obj) in ["WoodenFence_6","WoodenFence_7","WoodenGate_4"]): { 0.35 };
|
||||
default { 1 };
|
||||
case ((_this select 4) in ["PipeBomb"]): { 0.5 }; //High explosive
|
||||
case ((_this select 4) in ["explosive_bolt"]): { 0.25 }; //Medium explosive, maybe grenades and other such items.
|
||||
case ((_this select 4) in ["Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo"]): { 0.00001 }; //Melee damage
|
||||
default { 0 };
|
||||
};
|
||||
|
||||
//Is the object local
|
||||
if (local _obj) then {
|
||||
//is damage being done aboue 0 (should always be) not needed.
|
||||
if (_damage > 0) then {
|
||||
//Server running or client
|
||||
if (!isServer) then {
|
||||
//If its a client send to server get the ownering player and send damage to that player
|
||||
PVDZ_veh_Save = [_obj,"objWallDamage",(_total + _damage)];
|
||||
publicVariableServer "PVDZ_veh_Save";
|
||||
} else {
|
||||
//Server running the EH, update object to db
|
||||
[_obj,"objWallDamage",(_total + _damage)] call server_updateObject;
|
||||
};
|
||||
//Server running or client
|
||||
if (isServer) then {
|
||||
if !(_obj in needUpdate_FenceObjects) then {
|
||||
needUpdate_FenceObjects set [count needUpdate_FenceObjects, _obj];
|
||||
};
|
||||
|
||||
//TotalDamage Set by the server
|
||||
_obj setDamage (damage _obj) + _damage;
|
||||
|
||||
//diag_log format["Server Reporting - %1",needUpdate_FenceObjects];
|
||||
} else {
|
||||
//send to server then back to owning client/server
|
||||
PVDZ_send = [_obj,"objWallDamage",_this];
|
||||
publicVariableServer "PVDZ_send";
|
||||
//If its a client send to server for saving and damage setting.
|
||||
PVDZ_fence_Update = [_obj,(damage _obj) + _damage];
|
||||
publicVariableServer "PVDZ_fence_Update";
|
||||
|
||||
//diag_log ("Client Reporting");
|
||||
};
|
||||
|
||||
//Logging.
|
||||
diag_log format["INFO - %1(%3) - %2(%4)",_obj,_damage,(typeof _obj),_total];
|
||||
//} else {
|
||||
// //We really coulde just send to server and have the server setDamage
|
||||
// //send to server then back to owning client/server
|
||||
// PVDZ_send = [_obj,"objWallDamage",_this];
|
||||
// publicVariableServer "PVDZ_send";
|
||||
//};
|
||||
|
||||
|
||||
diag_log format["Object: %1, Damage:%2(%4), Projectile:%3",typeof (_this select 0),((damage _obj) + _damage),(_this select 4),(damage _obj)];
|
||||
|
||||
// all "HandleDamage event" functions should return the effective damage that the engine will record for that part
|
||||
0
|
||||
false
|
||||
@@ -35,7 +35,8 @@ if (!isNull _cursorTarget and !_inVehicle and (player distance _cursorTarget < 4
|
||||
//building System
|
||||
_text = getText (configFile >> "CfgVehicles" >> typeOf _cursorTarget >> "displayName");
|
||||
|
||||
if ((_cursorTarget iskindof "DZ_buildables") and isText(configFile >> "CfgVehicles" >> (typeOf _cursorTarget) >> "Upgrade" >> "create") and !_ownerBuildLock) then {
|
||||
/*
|
||||
if ((_cursorTarget iskindof "DZ_buildables") and !_ownerBuildLock) then {
|
||||
if (s_player_building < 0) then {
|
||||
if (isText (configFile >> "CfgVehicles" >> (typeof _cursorTarget) >> "Upgrade" >> "create")) then {
|
||||
s_player_building = player addAction [format[localize "str_upgrade",_text], "\z\addons\dayz_code\actions\object_upgradebuilding.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
@@ -54,6 +55,7 @@ if (!isNull _cursorTarget and !_inVehicle and (player distance _cursorTarget < 4
|
||||
player removeAction s_player_maintenance;
|
||||
s_player_maintenance = -1;
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
if ((((getPlayerUID player) in _ownerArray) or (count _ownerArray == 0) or ((typeof _cursorTarget) in ["WoodenFence_1_foundation","WoodenGate_foundation"])) and !_ownerBuildLock) then {
|
||||
|
||||
@@ -81,12 +81,13 @@ if (isServer) then {
|
||||
"PVDZ_plr_SwitchMove" addPublicVariableEventHandler {((_this select 1) select 0) switchMove ((_this select 1) select 1);}; //Needed to execute switchMove on server machine. rSwitchMove only executes on other clients
|
||||
"PVDZ_obj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishObj}; //Used by built items (Epoch and Vanilla)
|
||||
"PVDZ_veh_Save" addPublicVariableEventHandler {(_this select 1) call server_updateObject};
|
||||
"PVDZ_fence_Update" addPublicVariableEventHandler {(_this select 1) call server_addtoFenceUpdateArray};
|
||||
"PVDZ_plr_Login1" addPublicVariableEventHandler {_id = (_this select 1) call server_playerLogin};
|
||||
"PVDZ_plr_Login2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
|
||||
"PVDZ_plr_LoginRecord" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_recordLogin};
|
||||
"PVDZ_obj_Destroy" addPublicVariableEventHandler {(_this select 1) call server_deleteObj};
|
||||
"PVDZ_send" addPublicVariableEventHandler {(_this select 1) call server_sendToClient};
|
||||
"PVDZ_dayzCarBomb" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\actions\detonate_bomb.sqf";};
|
||||
//"PVDZ_dayzCarBomb" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\actions\detonate_bomb.sqf";};
|
||||
//[player,[medical Array]];
|
||||
"PVDZ_playerMedicalSync" addPublicVariableEventHandler { (_this select 1) call server_medicalSync; ((_this select 1) select 0) setVariable["Medical",((_this select 1) select 1),false]; }; //diag_log format["%1 - %2",((_this select 1) select 0),((_this select 1) select 1)]; };
|
||||
|
||||
|
||||
@@ -569,6 +569,7 @@ TimeOutDisplayed = false;
|
||||
if (isServer) then {
|
||||
dead_bodyCleanup = [];
|
||||
needUpdate_objects = [];
|
||||
needUpdate_FenceObjects = [];
|
||||
//dayz_spawnCrashSite_clutterCutter=0; // helicrash spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
|
||||
//dayz_spawnInfectedSite_clutterCutter=0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
|
||||
//Objects to remove when killed.
|
||||
|
||||
@@ -1716,11 +1716,11 @@
|
||||
<German>Bauansicht deaktiviert.</German>
|
||||
</Key>
|
||||
<Key ID="str_maintenance">
|
||||
<English>%1 Maintenance</English>
|
||||
<Russian>%1 Обслуживание</Russian>
|
||||
<French>Entretien de la %1</French>
|
||||
<Czech>Údržba %1</Czech>
|
||||
<German>%1 - Wartung</German>
|
||||
<English>Maintenance</English>
|
||||
<Russian>Обслуживание</Russian>
|
||||
<French>Entretien de la</French>
|
||||
<Czech>Údržba</Czech>
|
||||
<German>Wartung</German>
|
||||
</Key>
|
||||
<Key ID="str_disassembly">
|
||||
<English>%1 Disassembly</English>
|
||||
|
||||
Reference in New Issue
Block a user