mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Extend DZE_GodModeBase to built items (#1898)
This now makes buildables properly apply godmode instead of having to wait till restart for: * Being built * Being upgraded * Being downgraded master
This commit is contained in:
@@ -88,6 +88,7 @@
|
||||
[FIXED] A potential undefined error on bear trap trigger. @oiad
|
||||
[FIXED] A few floating loot positions in firestation.
|
||||
[FIXED] Blocked a duping method involving changing clothes. Thanks to Sercan for reporting. @oiad
|
||||
[FIXED] Buildables now properly apply godmode if enabled during the restart window. @oiad
|
||||
|
||||
[NOTE] The fixes below are included in the 1.0.6 Build C server package released December 29th, 2016 (http://dayzepoch.com/a2dayzepoch.php)
|
||||
[FIXED] Hive child 309 errors that resulted in broken saving of newly built storage object inventory. @icomrade
|
||||
|
||||
@@ -588,6 +588,10 @@ if (_canBuild select 0) then {
|
||||
publicVariableServer "PVDZ_obj_Publish";
|
||||
};
|
||||
};
|
||||
if (DZE_GodModeBase && {!(_classname in DZE_GodModeBaseExclude)}) then {
|
||||
_tmpbuilt addEventHandler ["HandleDamage",{false}];
|
||||
_tmpbuilt enableSimulation false;
|
||||
};
|
||||
} else { //if magazine was not removed, cancel publish
|
||||
deleteVehicle _tmpbuilt;
|
||||
localize "str_epoch_player_46" call dayz_rollingMessages;
|
||||
@@ -610,4 +614,4 @@ if (_canBuild select 0) then {
|
||||
};
|
||||
};
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -469,6 +469,10 @@ if (_canBuild select 0) then {
|
||||
publicVariableServer "PVDZ_obj_Publish";
|
||||
};
|
||||
};
|
||||
if (DZE_GodModeBase && {!(_classname in DZE_GodModeBaseExclude)}) then {
|
||||
_tmpbuilt addEventHandler ["HandleDamage",{false}];
|
||||
_tmpbuilt enableSimulation false;
|
||||
};
|
||||
} else {
|
||||
deleteVehicle _tmpbuilt;
|
||||
localize "str_epoch_player_46" call dayz_rollingMessages;
|
||||
@@ -489,4 +493,4 @@ if (_canBuild select 0) then {
|
||||
};
|
||||
};
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -104,6 +104,11 @@ if ((count _upgrade) > 0) then {
|
||||
|
||||
format[localize "str_epoch_player_142",_text] call dayz_rollingMessages;
|
||||
|
||||
if (DZE_GodModeBase && {!(_classname in DZE_GodModeBaseExclude)}) then {
|
||||
_object addEventHandler ["HandleDamage",{false}];
|
||||
_object enableSimulation false;
|
||||
};
|
||||
|
||||
if (DZE_permanentPlot) then {
|
||||
_ownerID = _obj getVariable["ownerPUID","0"];
|
||||
_object setVariable ["ownerPUID",_ownerID,true];
|
||||
|
||||
@@ -125,6 +125,10 @@ if ((count _upgrade) > 0) then {
|
||||
} else {
|
||||
format[localize "str_epoch_player_159",_text] call dayz_rollingMessages;
|
||||
};
|
||||
if (DZE_GodModeBase && {!(_classname in DZE_GodModeBaseExclude)}) then {
|
||||
_object addEventHandler ["HandleDamage",{false}];
|
||||
_object enableSimulation false;
|
||||
};
|
||||
if (DZE_permanentPlot) then {
|
||||
_ownerID = _obj getVariable["ownerPUID","0"];
|
||||
if (_ownerID == "0") then { _ownerID = dayz_playerUID; }; //APFL is on but UID is 0 so we will claim it to record the ownership.
|
||||
|
||||
@@ -23,7 +23,7 @@ if ([_object, "Server"] call check_publishobject) then {
|
||||
_key call server_hiveWrite;
|
||||
|
||||
if !(_object isKindOf "TrapItems") then {
|
||||
if (DZE_GodModeBase) then {
|
||||
if (DZE_GodModeBase && {!(_type in DZE_GodModeBaseExclude)}) then {
|
||||
_object addEventHandler ["HandleDamage", {false}];
|
||||
} else {
|
||||
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
||||
@@ -42,4 +42,4 @@ else {
|
||||
#ifdef OBJECT_DEBUG
|
||||
diag_log ("PUBLISH: *NOT* created " + (_type ) + " (not allowed)");
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
@@ -65,9 +65,9 @@ _key call server_hiveWrite;
|
||||
_object setVariable ["lastUpdate",time];
|
||||
_object setVariable ["ObjectUID", _uid,true];
|
||||
// _object setVariable ["CharacterID",_charID,true];
|
||||
if (DZE_GodModeBase) then {
|
||||
_object addEventHandler ["HandleDamage", {false}];
|
||||
}else{
|
||||
if (DZE_GodModeBase && {!(_class in DZE_GodModeBaseExclude)}) then {
|
||||
_object addEventHandler ["HandleDamage",{false}];
|
||||
} else {
|
||||
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
||||
};
|
||||
// Test disabling simulation server side on buildables only.
|
||||
@@ -75,4 +75,4 @@ _object enableSimulation false;
|
||||
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
|
||||
diag_log ("PUBLISH: " + str(_activatingPlayer) + " upgraded " + (_class) + " with ID " + str(_uid));
|
||||
diag_log ("PUBLISH: " + str(_activatingPlayer) + " upgraded " + (_class) + " with ID " + str(_uid));
|
||||
|
||||
Reference in New Issue
Block a user