From 5bc36166a70ccb9421d7e960e967a97b64de1bb1 Mon Sep 17 00:00:00 2001 From: oiad Date: Sat, 8 Oct 2016 12:51:21 +1300 Subject: [PATCH 1/2] Rename plot pole from "30m_plot_kit" to "plot_pole_kit" Sanity change since the plot pole is not fixed at 30 meters and is configurable. --- SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp | 4 ++-- SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp | 2 +- .../Category/FriendlyBuildingSupplies.hpp | 2 +- SQF/dayz_code/Configs/CfgVehicles/DZE/Prop_Defs.hpp | 4 ++-- .../R3F_Weight/Magazines/BuildingSupplies.hpp | 4 ++-- Server Files/SQL/1.0.6_Updates.sql | 9 +++++++++ 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp index 369bb4c46..00719984d 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp @@ -288,7 +288,7 @@ class ItemPlotDeed: CA_Magazine { script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; - output[] = {{"30m_plot_kit",1}}; + output[] = {{"plot_pole_kit",1}}; input[] = {{"ItemPlotDeed",1},{"ItemGoldBar10oz",2}}; }; }; @@ -407,4 +407,4 @@ class ItemBloodbag: CA_Magazine script = "spawn player_useMeds;"; }; }; -}; \ No newline at end of file +}; diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp index 23878cc4a..b834e84e0 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/Misc.hpp @@ -375,7 +375,7 @@ class wood_ramp_kit: CA_Magazine }; }; }; -class 30m_plot_kit: CA_Magazine +class plot_pole_kit: CA_Magazine { scope = public; count = 1; diff --git a/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyBuildingSupplies.hpp b/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyBuildingSupplies.hpp index f3fb3e3e5..96d9fc5b7 100644 --- a/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyBuildingSupplies.hpp +++ b/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyBuildingSupplies.hpp @@ -99,7 +99,7 @@ class Category_678 { buy[] = {2,"ItemGoldBar"}; sell[] = {1,"ItemGoldBar"}; }; - class 30m_plot_kit { + class plot_pole_kit { type = "trade_items"; buy[] = {6,"ItemGoldBar10oz"}; sell[] = {6,"ItemGoldBar10oz"}; diff --git a/SQF/dayz_code/Configs/CfgVehicles/DZE/Prop_Defs.hpp b/SQF/dayz_code/Configs/CfgVehicles/DZE/Prop_Defs.hpp index a39bfc3e4..1b6bac386 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/DZE/Prop_Defs.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/DZE/Prop_Defs.hpp @@ -458,9 +458,9 @@ class Plastic_Pole_EP1_DZ: Sign_1L_Noentry_EP1 scope = public; offset[] = {0,2.5,0.3}; - displayName = "30m Plot Pole"; + displayName = $STR_EPOCH_PLAYER_246; vehicleClass = "Fortifications"; - removeoutput[] = {{"30m_plot_kit",1}}; + removeoutput[] = {{"plot_pole_kit",1}}; requireplot = 0; nounderground = 0; }; diff --git a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/BuildingSupplies.hpp b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/BuildingSupplies.hpp index 8781f69c3..6f37e613b 100644 --- a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/BuildingSupplies.hpp +++ b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/BuildingSupplies.hpp @@ -167,7 +167,7 @@ class PartWoodLumber { weight = 2; }; -class 30m_plot_kit +class plot_pole_kit { weight = 0.02; }; @@ -226,4 +226,4 @@ class ItemFuelBarrelEmpty class ItemOilBarrel { weight = 140; -}; \ No newline at end of file +}; diff --git a/Server Files/SQL/1.0.6_Updates.sql b/Server Files/SQL/1.0.6_Updates.sql index 09b177cee..fbcbcaba6 100644 --- a/Server Files/SQL/1.0.6_Updates.sql +++ b/Server Files/SQL/1.0.6_Updates.sql @@ -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 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 -- ---------------------------- From 78fac8733363af717b4d1102e42dfe451e3236f4 Mon Sep 17 00:00:00 2001 From: oiad Date: Sat, 8 Oct 2016 12:53:25 +1300 Subject: [PATCH 2/2] dze_BuildChecks changes This changes the reasons to be more understandable about why you can't build somewhere. Some localization fixes to be more englishy. --- SQF/dayz_code/compile/dze_buildChecks.sqf | 25 +++++++++++++++-------- SQF/dayz_code/stringtable.xml | 18 ++++++++-------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/SQF/dayz_code/compile/dze_buildChecks.sqf b/SQF/dayz_code/compile/dze_buildChecks.sqf index 83ce65efd..9c3ea1c57 100644 --- a/SQF/dayz_code/compile/dze_buildChecks.sqf +++ b/SQF/dayz_code/compile/dze_buildChecks.sqf @@ -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 -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; _item = _this select 1; @@ -9,33 +9,31 @@ _requireplot = DZE_requireplot; // "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(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then { +if (isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then { _requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot"); }; _isPole = (_classname == "Plastic_Pole_EP1_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}; _canBuild = false; _nearestPole = objNull; _ownerID = 0; _friendlies = []; -_needText = localize "str_epoch_player_246"; _plotcheck = [player, false] call FNC_find_plots; _IsNearPlot = _plotcheck select 1; _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 { _canBuild = true; }; } else { _ownerID = _nearestPole getVariable["CharacterID","0"]; - if(dayz_characterID == _ownerID) then { + if (dayz_characterID == _ownerID) then { _canBuild = true; } else { 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 _buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"]; _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{}; -[_canBuild, _isPole]; \ No newline at end of file +[_canBuild, _isPole]; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index f089550f5..aabf7afa2 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -11357,7 +11357,7 @@ Stavba již probíhá. - Cannot build, too many objects within %1m. + You cannot build, too many objects within %1m. Bau nicht möglich, zu viele Objekte innerhalb von %1m. Нельзя построить, слишком много объектов в пределах %1м. Kan niet bouwen, teveel objecten binnen %1. @@ -11365,7 +11365,7 @@ Nelze postavit, v okruhu %1m je přiliš mnoho předmětů. - Cannot build while in a vehicle. + You cannot build while in a vehicle. Bau innerhalb eine Fahrzeuges nicht möglich. Нельзя строить, находясь в транспорте. Je kunt niet bouwen als je je in een voertuig bevindt. @@ -11373,16 +11373,15 @@ Nelze stavět, pokud jste ve vozidle. - Cannot build while in combat. + You cannot build while in combat. Bau während eines Kampfes nicht möglich. Нельзя строить во время боя. - Cannot build while in combat. Bouwen is niet mogelijk tijdens een conflictsituatie. Impossible de construire en combat. Nelze stavět v boji. - Cannot build plot pole within %1m of an existing plot. + You cannot build plot pole within %1m of an existing plot. Grundstück-Markierung kann nicht innerhalb %1m von einem bestehenden Grundstück erbaut werden. Нельзя построить столб в пределах %1м. от существующего столба. Kan bouw-paal niet bouwen op minder als %1m afstand van een bestaand bouwterrein. @@ -11867,8 +11866,11 @@ %1 est rempli(e) à %2 pourcents de sa capacité. %1 je naplněno do %2 procent kapacity. + + You do not have access to build on this plot. + - This building needs a %1 within %2 meters + This item needs a %1 within %2 meters Dieses Gebäude benötitgt ein(e) %1 innerhalb von %2 Metern. Этому строению требуется %1 в пределах %2 метров Dit gebouw heeft een %1 binnen %2 meter nodig. @@ -16265,7 +16267,7 @@ Plot Freunde - Cannot build on a road. + You cannot build on a road. Du kannst nicht auf einer Straße bauen. @@ -16273,7 +16275,7 @@ Du hast dich zu weit, vom ursprünglichen Ort, an dem du bauen wolltest, bewegt (innerhalb %1 Meter). - Cannot move up or down more than %1 meters + You cannot move up or down more than %1 meters Kann nicht mehr als %1 Meter nach oben oder unten bewegen.