mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Merge pull request #1775 from oiad/master
Rename plot pole and dze_BuildChecks changes.
This commit is contained in:
@@ -288,7 +288,7 @@ class ItemPlotDeed: CA_Magazine {
|
|||||||
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
|
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
|
||||||
neednearby[] = {"workshop"};
|
neednearby[] = {"workshop"};
|
||||||
requiretools[] = {"ItemToolbox"};
|
requiretools[] = {"ItemToolbox"};
|
||||||
output[] = {{"30m_plot_kit",1}};
|
output[] = {{"plot_pole_kit",1}};
|
||||||
input[] = {{"ItemPlotDeed",1},{"ItemGoldBar10oz",2}};
|
input[] = {{"ItemPlotDeed",1},{"ItemGoldBar10oz",2}};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -407,4 +407,4 @@ class ItemBloodbag: CA_Magazine
|
|||||||
script = "spawn player_useMeds;";
|
script = "spawn player_useMeds;";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ class wood_ramp_kit: CA_Magazine
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class 30m_plot_kit: CA_Magazine
|
class plot_pole_kit: CA_Magazine
|
||||||
{
|
{
|
||||||
scope = public;
|
scope = public;
|
||||||
count = 1;
|
count = 1;
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class Category_678 {
|
|||||||
buy[] = {2,"ItemGoldBar"};
|
buy[] = {2,"ItemGoldBar"};
|
||||||
sell[] = {1,"ItemGoldBar"};
|
sell[] = {1,"ItemGoldBar"};
|
||||||
};
|
};
|
||||||
class 30m_plot_kit {
|
class plot_pole_kit {
|
||||||
type = "trade_items";
|
type = "trade_items";
|
||||||
buy[] = {6,"ItemGoldBar10oz"};
|
buy[] = {6,"ItemGoldBar10oz"};
|
||||||
sell[] = {6,"ItemGoldBar10oz"};
|
sell[] = {6,"ItemGoldBar10oz"};
|
||||||
|
|||||||
@@ -458,9 +458,9 @@ class Plastic_Pole_EP1_DZ: Sign_1L_Noentry_EP1
|
|||||||
|
|
||||||
scope = public;
|
scope = public;
|
||||||
offset[] = {0,2.5,0.3};
|
offset[] = {0,2.5,0.3};
|
||||||
displayName = "30m Plot Pole";
|
displayName = $STR_EPOCH_PLAYER_246;
|
||||||
vehicleClass = "Fortifications";
|
vehicleClass = "Fortifications";
|
||||||
removeoutput[] = {{"30m_plot_kit",1}};
|
removeoutput[] = {{"plot_pole_kit",1}};
|
||||||
requireplot = 0;
|
requireplot = 0;
|
||||||
nounderground = 0;
|
nounderground = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//Checks if item is near a plot, if the player is plot owner or friendly, if there are too many items, and if the player has required tools
|
//Checks if item is near a plot, if the player is plot owner or friendly, if there are too many items, and if the player has required tools
|
||||||
private ["_requireplot","_distance","_canBuild","_friendlies","_nearestPole","_ownerID","_pos","_item","_classname","_isPole","_isLandFireDZ","_needText","_findNearestPoles","_findNearestPole","_IsNearPlot","_buildables","_center"];
|
private ["_requireplot","_distance","_canBuild","_friendlies","_nearestPole","_ownerID","_pos","_item","_classname","_isPole","_isLandFireDZ","_findNearestPoles","_findNearestPole","_IsNearPlot","_buildables","_center","_toolCheck","_plotcheck","_buildcheck","_isfriendly","_isowner","_require"];
|
||||||
|
|
||||||
_pos = _this select 0;
|
_pos = _this select 0;
|
||||||
_item = _this select 1;
|
_item = _this select 1;
|
||||||
@@ -9,33 +9,31 @@ _requireplot = DZE_requireplot;
|
|||||||
// "Unable to build trader nearby."
|
// "Unable to build trader nearby."
|
||||||
if (!canbuild) exitWith {dayz_actionInProgress = false; format[localize "STR_EPOCH_PLAYER_136",localize "STR_EPOCH_TRADER"] call dayz_rollingMessages; [false, false];};
|
if (!canbuild) exitWith {dayz_actionInProgress = false; format[localize "STR_EPOCH_PLAYER_136",localize "STR_EPOCH_TRADER"] call dayz_rollingMessages; [false, false];};
|
||||||
|
|
||||||
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
|
if (isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
|
||||||
_requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
|
_requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
|
||||||
};
|
};
|
||||||
_isPole = (_classname == "Plastic_Pole_EP1_DZ");
|
_isPole = (_classname == "Plastic_Pole_EP1_DZ");
|
||||||
_isLandFireDZ = (_classname == "Land_Fire_DZ");
|
_isLandFireDZ = (_classname == "Land_Fire_DZ");
|
||||||
_needText = localize "str_epoch_player_246";
|
|
||||||
|
|
||||||
_distance = if (_isPole) then {DZE_PlotPole select 1} else {DZE_PlotPole select 0};
|
_distance = if (_isPole) then {DZE_PlotPole select 1} else {DZE_PlotPole select 0};
|
||||||
_canBuild = false;
|
_canBuild = false;
|
||||||
_nearestPole = objNull;
|
_nearestPole = objNull;
|
||||||
_ownerID = 0;
|
_ownerID = 0;
|
||||||
_friendlies = [];
|
_friendlies = [];
|
||||||
_needText = localize "str_epoch_player_246";
|
|
||||||
|
|
||||||
_plotcheck = [player, false] call FNC_find_plots;
|
_plotcheck = [player, false] call FNC_find_plots;
|
||||||
_IsNearPlot = _plotcheck select 1;
|
_IsNearPlot = _plotcheck select 1;
|
||||||
_nearestPole = _plotcheck select 2;
|
_nearestPole = _plotcheck select 2;
|
||||||
|
|
||||||
if(_isPole && {_IsNearPlot > 0}) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_44",_distance] call dayz_rollingMessages; [_canBuild, _isPole];};
|
if (_isPole && {_IsNearPlot > 0}) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_44",_distance] call dayz_rollingMessages; [_canBuild, _isPole];};
|
||||||
|
|
||||||
if(_IsNearPlot == 0) then {
|
if (_IsNearPlot == 0) then {
|
||||||
if (_requireplot == 0 || {_isLandFireDZ}) then {
|
if (_requireplot == 0 || {_isLandFireDZ}) then {
|
||||||
_canBuild = true;
|
_canBuild = true;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_ownerID = _nearestPole getVariable["CharacterID","0"];
|
_ownerID = _nearestPole getVariable["CharacterID","0"];
|
||||||
if(dayz_characterID == _ownerID) then {
|
if (dayz_characterID == _ownerID) then {
|
||||||
_canBuild = true;
|
_canBuild = true;
|
||||||
} else {
|
} else {
|
||||||
if (DZE_permanentPlot) then {
|
if (DZE_permanentPlot) then {
|
||||||
@@ -54,7 +52,16 @@ if(_IsNearPlot == 0) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if(!_canBuild) exitWith { dayz_actionInProgress = false; format[localize "STR_EPOCH_PLAYER_135",_needText,_distance] call dayz_rollingMessages; [_canBuild, _isPole];};
|
if (!_canBuild) exitWith {
|
||||||
|
dayz_actionInProgress = false;
|
||||||
|
if (_isNearPlot == 0) then {
|
||||||
|
format[localize "STR_EPOCH_PLAYER_135",localize "str_epoch_player_246",_distance] call dayz_rollingMessages;
|
||||||
|
} else {
|
||||||
|
localize "STR_EPOCH_PLAYER_134" call dayz_rollingMessages;
|
||||||
|
};
|
||||||
|
[_canBuild, _isPole];
|
||||||
|
};
|
||||||
|
|
||||||
// Also count safes, lockboxes, vanilla buildables, tents and stashes against DZE_BuildingLimit
|
// Also count safes, lockboxes, vanilla buildables, tents and stashes against DZE_BuildingLimit
|
||||||
_buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"];
|
_buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"];
|
||||||
_center = if (isNull _nearestPole) then {_pos} else {_nearestPole};
|
_center = if (isNull _nearestPole) then {_pos} else {_nearestPole};
|
||||||
@@ -67,4 +74,4 @@ if (_toolCheck) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//When calling this function in another script use a silent exitWith, unless you have something special to say. i.e. if (!(_canBuild select 0)) exitWith{};
|
//When calling this function in another script use a silent exitWith, unless you have something special to say. i.e. if (!(_canBuild select 0)) exitWith{};
|
||||||
[_canBuild, _isPole];
|
[_canBuild, _isPole];
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ class PartWoodLumber
|
|||||||
{
|
{
|
||||||
weight = 2;
|
weight = 2;
|
||||||
};
|
};
|
||||||
class 30m_plot_kit
|
class plot_pole_kit
|
||||||
{
|
{
|
||||||
weight = 0.02;
|
weight = 0.02;
|
||||||
};
|
};
|
||||||
@@ -226,4 +226,4 @@ class ItemFuelBarrelEmpty
|
|||||||
class ItemOilBarrel
|
class ItemOilBarrel
|
||||||
{
|
{
|
||||||
weight = 140;
|
weight = 140;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11357,7 +11357,7 @@
|
|||||||
<Czech>Stavba již probíhá.</Czech>
|
<Czech>Stavba již probíhá.</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_EPOCH_PLAYER_41">
|
<Key ID="STR_EPOCH_PLAYER_41">
|
||||||
<English>Cannot build, too many objects within %1m.</English>
|
<English>You cannot build, too many objects within %1m.</English>
|
||||||
<German>Bau nicht möglich, zu viele Objekte innerhalb von %1m.</German>
|
<German>Bau nicht möglich, zu viele Objekte innerhalb von %1m.</German>
|
||||||
<Russian>Нельзя построить, слишком много объектов в пределах %1м.</Russian>
|
<Russian>Нельзя построить, слишком много объектов в пределах %1м.</Russian>
|
||||||
<Dutch>Kan niet bouwen, teveel objecten binnen %1.</Dutch>
|
<Dutch>Kan niet bouwen, teveel objecten binnen %1.</Dutch>
|
||||||
@@ -11365,7 +11365,7 @@
|
|||||||
<Czech>Nelze postavit, v okruhu %1m je přiliš mnoho předmětů.</Czech>
|
<Czech>Nelze postavit, v okruhu %1m je přiliš mnoho předmětů.</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_EPOCH_PLAYER_42">
|
<Key ID="STR_EPOCH_PLAYER_42">
|
||||||
<English>Cannot build while in a vehicle.</English>
|
<English>You cannot build while in a vehicle.</English>
|
||||||
<German>Bau innerhalb eine Fahrzeuges nicht möglich.</German>
|
<German>Bau innerhalb eine Fahrzeuges nicht möglich.</German>
|
||||||
<Russian>Нельзя строить, находясь в транспорте.</Russian>
|
<Russian>Нельзя строить, находясь в транспорте.</Russian>
|
||||||
<Dutch>Je kunt niet bouwen als je je in een voertuig bevindt.</Dutch>
|
<Dutch>Je kunt niet bouwen als je je in een voertuig bevindt.</Dutch>
|
||||||
@@ -11373,16 +11373,15 @@
|
|||||||
<Czech>Nelze stavět, pokud jste ve vozidle.</Czech>
|
<Czech>Nelze stavět, pokud jste ve vozidle.</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_EPOCH_PLAYER_43">
|
<Key ID="STR_EPOCH_PLAYER_43">
|
||||||
<English>Cannot build while in combat.</English>
|
<English>You cannot build while in combat.</English>
|
||||||
<German>Bau während eines Kampfes nicht möglich.</German>
|
<German>Bau während eines Kampfes nicht möglich.</German>
|
||||||
<Russian>Нельзя строить во время боя.</Russian>
|
<Russian>Нельзя строить во время боя.</Russian>
|
||||||
<Spanish>Cannot build while in combat.</Spanish>
|
|
||||||
<Dutch>Bouwen is niet mogelijk tijdens een conflictsituatie.</Dutch>
|
<Dutch>Bouwen is niet mogelijk tijdens een conflictsituatie.</Dutch>
|
||||||
<French>Impossible de construire en combat.</French>
|
<French>Impossible de construire en combat.</French>
|
||||||
<Czech>Nelze stavět v boji.</Czech>
|
<Czech>Nelze stavět v boji.</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_EPOCH_PLAYER_44">
|
<Key ID="STR_EPOCH_PLAYER_44">
|
||||||
<English>Cannot build plot pole within %1m of an existing plot.</English>
|
<English>You cannot build plot pole within %1m of an existing plot.</English>
|
||||||
<German>Grundstück-Markierung kann nicht innerhalb %1m von einem bestehenden Grundstück erbaut werden.</German>
|
<German>Grundstück-Markierung kann nicht innerhalb %1m von einem bestehenden Grundstück erbaut werden.</German>
|
||||||
<Russian>Нельзя построить столб в пределах %1м. от существующего столба.</Russian>
|
<Russian>Нельзя построить столб в пределах %1м. от существующего столба.</Russian>
|
||||||
<Dutch>Kan bouw-paal niet bouwen op minder als %1m afstand van een bestaand bouwterrein.</Dutch>
|
<Dutch>Kan bouw-paal niet bouwen op minder als %1m afstand van een bestaand bouwterrein.</Dutch>
|
||||||
@@ -11867,8 +11866,11 @@
|
|||||||
<French>%1 est rempli(e) à %2 pourcents de sa capacité.</French>
|
<French>%1 est rempli(e) à %2 pourcents de sa capacité.</French>
|
||||||
<Czech>%1 je naplněno do %2 procent kapacity.</Czech>
|
<Czech>%1 je naplněno do %2 procent kapacity.</Czech>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_EPOCH_PLAYER_134">
|
||||||
|
<English>You do not have access to build on this plot.</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_EPOCH_PLAYER_135">
|
<Key ID="STR_EPOCH_PLAYER_135">
|
||||||
<English>This building needs a %1 within %2 meters</English>
|
<English>This item needs a %1 within %2 meters</English>
|
||||||
<German>Dieses Gebäude benötitgt ein(e) %1 innerhalb von %2 Metern.</German>
|
<German>Dieses Gebäude benötitgt ein(e) %1 innerhalb von %2 Metern.</German>
|
||||||
<Russian>Этому строению требуется %1 в пределах %2 метров</Russian>
|
<Russian>Этому строению требуется %1 в пределах %2 метров</Russian>
|
||||||
<Dutch>Dit gebouw heeft een %1 binnen %2 meter nodig.</Dutch>
|
<Dutch>Dit gebouw heeft een %1 binnen %2 meter nodig.</Dutch>
|
||||||
@@ -16265,7 +16267,7 @@
|
|||||||
<German>Plot Freunde</German>
|
<German>Plot Freunde</German>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_EPOCH_BUILD_FAIL_ROAD">
|
<Key ID="STR_EPOCH_BUILD_FAIL_ROAD">
|
||||||
<English>Cannot build on a road.</English>
|
<English>You cannot build on a road.</English>
|
||||||
<German>Du kannst nicht auf einer Straße bauen.</German>
|
<German>Du kannst nicht auf einer Straße bauen.</German>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_EPOCH_BUILD_FAIL_MOVED">
|
<Key ID="STR_EPOCH_BUILD_FAIL_MOVED">
|
||||||
@@ -16273,7 +16275,7 @@
|
|||||||
<German>Du hast dich zu weit, vom ursprünglichen Ort, an dem du bauen wolltest, bewegt (innerhalb %1 Meter).</German>
|
<German>Du hast dich zu weit, vom ursprünglichen Ort, an dem du bauen wolltest, bewegt (innerhalb %1 Meter).</German>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_EPOCH_BUILD_FAIL_HEIGHT">
|
<Key ID="STR_EPOCH_BUILD_FAIL_HEIGHT">
|
||||||
<English>Cannot move up or down more than %1 meters</English>
|
<English>You cannot move up or down more than %1 meters</English>
|
||||||
<German>Kann nicht mehr als %1 Meter nach oben oder unten bewegen.</German>
|
<German>Kann nicht mehr als %1 Meter nach oben oder unten bewegen.</German>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_EPOCH_BUILD_FAIL_TOO_FAR">
|
<Key ID="STR_EPOCH_BUILD_FAIL_TOO_FAR">
|
||||||
|
|||||||
@@ -214,6 +214,15 @@ UPDATE character_data SET Backpack = REPLACE(Backpack, '"cinder_wall_kit"', '"ha
|
|||||||
UPDATE character_data SET Inventory = REPLACE(Inventory, '"cinder_wall_kit"', '"half_cinder_wall_kit"') WHERE INSTR(Inventory, '"cinder_wall_kit"') > 0;
|
UPDATE character_data SET Inventory = REPLACE(Inventory, '"cinder_wall_kit"', '"half_cinder_wall_kit"') WHERE INSTR(Inventory, '"cinder_wall_kit"') > 0;
|
||||||
UPDATE object_data SET Inventory = REPLACE(Inventory, '"cinder_wall_kit"', '"half_cinder_wall_kit"') WHERE INSTR(Inventory, '"cinder_wall_kit"') > 0;
|
UPDATE object_data SET Inventory = REPLACE(Inventory, '"cinder_wall_kit"', '"half_cinder_wall_kit"') WHERE INSTR(Inventory, '"cinder_wall_kit"') > 0;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 30m_plot_kit was renamed to plot_pole_kit for sanity
|
||||||
|
-- ----------------------------
|
||||||
|
|
||||||
|
UPDATE `Traders_DATA` SET `item` = '["plot_pole_kit",1]' WHERE `item` = '["30m_plot_kit",1]';
|
||||||
|
UPDATE character_data SET Backpack = REPLACE(Backpack, '"30m_plot_kit"', '"plot_pole_kit"') WHERE INSTR(Backpack, '"30m_plot_kit"') > 0;
|
||||||
|
UPDATE character_data SET Inventory = REPLACE(Inventory, '"30m_plot_kit"', '"plot_pole_kit"') WHERE INSTR(Inventory, '"30m_plot_kit"') > 0;
|
||||||
|
UPDATE object_data SET Inventory = REPLACE(Inventory, '"30m_plot_kit"', '"plot_pole_kit"') WHERE INSTR(Inventory, '"30m_plot_kit"') > 0;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Updated shotgun ammo names from 1.8.7
|
-- Updated shotgun ammo names from 1.8.7
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user