Fix door and plot management display text for mustBeClose

Also removed unneeded uiNamespace vars.
This commit is contained in:
ebaydayz
2016-11-08 19:27:05 -05:00
parent e3bb7e11b9
commit eedf7dd12c
6 changed files with 25 additions and 30 deletions

View File

@@ -10,7 +10,6 @@ class AT_Zupa_BlueButton: ZSC_RscButtonMenu {
class AdvancedTrading class AdvancedTrading
{ {
idd = 711197; idd = 711197;
onLoad = "uiNamespace setVariable ['AdvancedTrading', _this select 0]";
class Controls { class Controls {
class RscText_ATBackground1: ZSC_RscText class RscText_ATBackground1: ZSC_RscText
{ {

View File

@@ -1,7 +1,7 @@
class DoorManagement class DoorManagement
{ {
idd = 711195; idd = 711195;
onLoad = "uiNamespace setVariable ['DoorManagement', _this select 0]"; onLoad = "if (DZE_doorManagementMustBeClose) then {(_this select 0) displayCtrl 7108 ctrlSetText localize 'STR_EPOCH_HUMANS_NEARBY';};";
class Controls { class Controls {
class RscText_7100: ZSC_RscTextT class RscText_7100: ZSC_RscTextT
{ {
@@ -80,7 +80,7 @@ class DoorManagement
class RscText_7108: ZSC_RscTextT class RscText_7108: ZSC_RscTextT
{ {
idc = 7108; idc = 7108;
text = $STR_EPOCH_HUMANS_NEARBY; text = $STR_MP_PLAYERS;
x = 0.31 * safezoneW + safezoneX; x = 0.31 * safezoneW + safezoneX;
y = 0.38 * safezoneH + safezoneY; y = 0.38 * safezoneH + safezoneY;
w = 0.13 * safezoneW; w = 0.13 * safezoneW;

View File

@@ -1,7 +1,7 @@
class PlotManagement class PlotManagement
{ {
idd = 711194; idd = 711194;
onLoad = "uiNamespace setVariable ['PlotManagement', _this select 0]"; onLoad = "if (DZE_plotManagementMustBeClose) then {(_this select 0) displayCtrl 7015 ctrlSetText localize 'STR_EPOCH_HUMANS_NEARBY';};";
class Controls { class Controls {
class RscText_7000: ZSC_RscTextT class RscText_7000: ZSC_RscTextT
{ {
@@ -92,8 +92,8 @@ class PlotManagement
class RscText_7008: ZSC_RscTextT class RscText_7008: ZSC_RscTextT
{ {
idc = -1; idc = 7015;
text = $STR_EPOCH_HUMANS_NEARBY; text = $STR_MP_PLAYERS;
x = 0.31 * safezoneW + safezoneX; x = 0.31 * safezoneW + safezoneX;
y = 0.38 * safezoneH + safezoneY; y = 0.38 * safezoneH + safezoneY;
w = 0.13 * safezoneW; w = 0.13 * safezoneW;

View File

@@ -17,7 +17,7 @@ Please see configVariables.sqf for the value of gems (DZE_GemWorthArray) and the
*/ */
private ["_objectID","_objectUID","_target","_objects","_requirements","_count","_objects_filtered","_ctrl","_itemText","_type","_amount","_success","_wealth","_message1","_message2","_option"]; private ["_objectID","_objectUID","_target","_objects","_requirements","_count","_objects_filtered","_itemText","_type","_amount","_success","_wealth","_message1","_message2","_option","_line1","_line2","_plotDialog"];
disableSerialization; disableSerialization;
if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_ACTIONS_2" call dayz_rollingMessages;}; if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_ACTIONS_2" call dayz_rollingMessages;};
@@ -36,6 +36,9 @@ _objects = nearestObjects [_target, DZE_maintainClasses, DZE_maintainRange];
_objects_filtered = []; _objects_filtered = [];
_requirements = []; _requirements = [];
_count = 0; _count = 0;
_plotDialog = findDisplay 711194;
_line1 = _plotDialog displayCtrl 7012;
_line2 = _plotDialog displayCtrl 7013;
_req = { _req = {
private ["_count","_amount","_itemText"]; private ["_count","_amount","_itemText"];
@@ -48,7 +51,7 @@ _req = {
}; };
_maintain = { _maintain = {
private ["_requirements","_count","_amount","_itemText","_wealth","_success","_message1","_message2","_ctrl","_enoughMoney","_moneyInfo"]; private ["_requirements","_count","_amount","_itemText","_wealth","_success","_message1","_message2","_enoughMoney","_moneyInfo"];
_count = count (_this select 0); _count = count (_this select 0);
_requirements = _count call _req; _requirements = _count call _req;
@@ -96,10 +99,8 @@ _maintain = {
["Working",0,[100,15,10,0]] call dayz_NutritionSystem; ["Working",0,[100,15,10,0]] call dayz_NutritionSystem;
if (DZE_permanentPlot) then { if (DZE_permanentPlot) then {
_ctrl = (uiNamespace getVariable "PlotManagement") displayCtrl 7012; _line1 ctrlSetText _message1;
_ctrl ctrlSetText _message1; _line2 ctrlSetText _message2;
_ctrl = (uiNamespace getVariable "PlotManagement") displayCtrl 7013;
_ctrl ctrlSetText _message2;
} else { } else {
_message1 call dayz_rollingMessages; _message1 call dayz_rollingMessages;
}; };
@@ -114,10 +115,8 @@ _maintain = {
}; };
_message2 = " "; _message2 = " ";
if (DZE_permanentPlot) then { if (DZE_permanentPlot) then {
_ctrl = (uiNamespace getVariable "PlotManagement") displayCtrl 7012; _line1 ctrlSetText _message1;
_ctrl ctrlSetText _message1; _line2 ctrlSetText _message2;
_ctrl = (uiNamespace getVariable "PlotManagement") displayCtrl 7013;
_ctrl ctrlSetText _message2;
} else { } else {
_message1 call dayz_rollingMessages; _message1 call dayz_rollingMessages;
}; };
@@ -147,8 +146,7 @@ switch _option do {
if (_count == 0) then { if (_count == 0) then {
_message1 = localize "STR_EPOCH_PLOTMANAGEMENT_MAINTAIN_NONE"; _message1 = localize "STR_EPOCH_PLOTMANAGEMENT_MAINTAIN_NONE";
if (DZE_permanentPlot) then { if (DZE_permanentPlot) then {
_ctrl = (uiNamespace getVariable "PlotManagement") displayCtrl 7012; _line1 ctrlSetText _message1;
_ctrl ctrlSetText _message1;
} else { } else {
_message1 call dayz_rollingMessages; _message1 call dayz_rollingMessages;
}; };
@@ -161,8 +159,7 @@ switch _option do {
_message1 = format [localize "STR_EPOCH_PLOTMANAGEMENT_MAINTAIN_PRICE", _count,_requirements select 1,""]; _message1 = format [localize "STR_EPOCH_PLOTMANAGEMENT_MAINTAIN_PRICE", _count,_requirements select 1,""];
}; };
if (DZE_permanentPlot) then { if (DZE_permanentPlot) then {
_ctrl = (uiNamespace getVariable "PlotManagement") displayCtrl 7012; _line1 ctrlSetText _message1;
_ctrl ctrlSetText _message1;
} else { } else {
_message1 call dayz_rollingMessages; _message1 call dayz_rollingMessages;
}; };
@@ -175,8 +172,7 @@ switch _option do {
}; };
if (_count != count _objects) then { if (_count != count _objects) then {
if (DZE_permanentPlot) then { if (DZE_permanentPlot) then {
_ctrl = (uiNamespace getVariable "PlotManagement") displayCtrl 7013; _line2 ctrlSetText _message2;
_ctrl ctrlSetText _message2;
} else { } else {
_message2 call dayz_rollingMessages; _message2 call dayz_rollingMessages;
}; };

View File

@@ -16,5 +16,5 @@ if (_count / DZE_BuildingLimit * 100 > 75) then {
_colour = "#ff0000"; _colour = "#ff0000";
}; };
_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7014); _ctrl = findDisplay 711194 displayCtrl 7014;
_ctrl ctrlSetStructuredText parseText format["<t color='%3'>%1 / %2</t>" , _count, DZE_BuildingLimit,_colour]; _ctrl ctrlSetStructuredText parseText format["<t color='%3'>%1 / %2</t>" , _count, DZE_BuildingLimit,_colour];

View File

@@ -8,7 +8,7 @@ dayz_matchboxCount = false; // Enable match stick count. After five uses matches
dayz_toolBreaking = false; //Sledgehammer, crowbar and pickaxe have a chance to break when used. dayz_toolBreaking = false; //Sledgehammer, crowbar and pickaxe have a chance to break when used.
dayz_waterBottleBreaking = false; // Water bottles have a chance to break when boiling and require duct tape to fix dayz_waterBottleBreaking = false; // Water bottles have a chance to break when boiling and require duct tape to fix
dayz_tameDogs = false; // Allow taming dogs with raw meat dayz_tameDogs = false; // Allow taming dogs with raw meat
dayz_townGenerator = false; // Spawn vanilla map junk instead of Epoch DynamicDebris. Currently only compatible with Chernarus. Need to add coordinates for other maps. dayz_townGenerator = false; // Spawn vanilla map junk instead of Epoch DynamicDebris. Currently only compatible with Chernarus.
dayz_townGeneratorBlackList = []; // Town generator will not spawn junk within 150m of these positions. Example for Chernarus trader cities: [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]] dayz_townGeneratorBlackList = []; // Town generator will not spawn junk within 150m of these positions. Example for Chernarus trader cities: [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]]
DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with
@@ -27,7 +27,7 @@ DZE_DeathMsgDynamicText = false; // Display death messages as dynamicText in the
DZE_DeathMsgCutText = false; // Display death messages as cutText DZE_DeathMsgCutText = false; // Display death messages as cutText
DZE_DeathScreen = true; // True=Use Epoch death screen (Trade city obituaries have been amended) False=Use DayZ death screen (You are dead) DZE_DeathScreen = true; // True=Use Epoch death screen (Trade city obituaries have been amended) False=Use DayZ death screen (You are dead)
DZE_HaloJump = true; // Enable halo jumping out of air vehicles above 400m DZE_HaloJump = true; // Enable halo jumping out of air vehicles above 400m
DZE_NameTags = 1; // Name displays when looking at player up close 0 = Off, 1= On, 2 = Player choice DZE_NameTags = 0; // Name displays when looking at player up close 0 = Off, 1= On, 2 = Player choice
DZE_ForceNameTagsInTrader = false; // Force name display when looking at player up close in traders. Overrides player choice. DZE_ForceNameTagsInTrader = false; // Force name display when looking at player up close in traders. Overrides player choice.
DZE_HumanityTargetDistance = 25; // Distance to show name tags (red for bandit, blue for hero, green for friend) DZE_HumanityTargetDistance = 25; // Distance to show name tags (red for bandit, blue for hero, green for friend)
DZE_HeartBeat = false; // Enable heartbeat sound when looking at bandit (<= -3000 humanity) up close DZE_HeartBeat = false; // Enable heartbeat sound when looking at bandit (<= -3000 humanity) up close
@@ -35,7 +35,7 @@ DZE_HeliLift = true; // Enable Epoch heli lift system
DZE_RestrictSkins = []; // Clothes that players are not allowed to wear. i.e. ["Skin_GUE_Soldier_CO_DZ","Skin_GUE_Soldier_2_DZ"] etc. DZE_RestrictSkins = []; // Clothes that players are not allowed to wear. i.e. ["Skin_GUE_Soldier_CO_DZ","Skin_GUE_Soldier_2_DZ"] etc.
DZE_UI = "vanilla"; //"vanilla","epoch","dark" UI status icons style. Dark accommodates color blind people. DZE_UI = "vanilla"; //"vanilla","epoch","dark" UI status icons style. Dark accommodates color blind people.
DZE_VanillaUICombatIcon = true; //Display or hide combat UI icon if using DZE_UI = "vanilla"; otherwise it has no affect. DZE_VanillaUICombatIcon = true; //Display or hide combat UI icon if using DZE_UI = "vanilla"; otherwise it has no affect.
MaxAmmoBoxes = 3; // Max number of random Supply_Crate_DZE to spawn around the map MaxAmmoBoxes = 3; // Max number of random Supply_Crate_DZE filled with vehicle ammo to spawn around the map
MaxMineVeins = 50; // Max number of random mine veins to spawn around the map MaxMineVeins = 50; // Max number of random mine veins to spawn around the map
timezoneswitch = 0; // Changes murderMenu times with this offset in hours. timezoneswitch = 0; // Changes murderMenu times with this offset in hours.
DZE_SafeZonePosArray = []; //Prevent players in safeZones from being killed if their vehicle is destroyed. Format is [[[3D POS], RADIUS],[[3D POS], RADIUS]]; Ex. DZE_SafeZonePosArray = [[[6325.6772,7807.7412,0],150],[[4063.4226,11664.19,0],150]]; DZE_SafeZonePosArray = []; //Prevent players in safeZones from being killed if their vehicle is destroyed. Format is [[[3D POS], RADIUS],[[3D POS], RADIUS]]; Ex. DZE_SafeZonePosArray = [[[6325.6772,7807.7412,0],150],[[4063.4226,11664.19,0],150]];
@@ -51,10 +51,10 @@ DZE_salvageLocked = true; //Enable or disable salvaging of locked vehicles, usef
DZE_ConfigTrader = true; // Use config files for traders instead of database. Loads faster and uses less network traffic. False enables database traders with legacy trader menu. DZE_ConfigTrader = true; // Use config files for traders instead of database. Loads faster and uses less network traffic. False enables database traders with legacy trader menu.
DZE_serverLogTrades = true; // Log trades to server RPT (sent with publicVariableServer on every trade) DZE_serverLogTrades = true; // Log trades to server RPT (sent with publicVariableServer on every trade)
DZE_GemWorthArray = [["ItemTopaz",15000], ["ItemObsidian",20000], ["ItemSapphire",25000], ["ItemAmethyst",30000], ["ItemEmerald",35000], ["ItemCitrine",40000], ["ItemRuby",45000]]; //array of gem prices, works only in advanced trading DZE_GemWorthArray = [["ItemTopaz",15000], ["ItemObsidian",20000], ["ItemSapphire",25000], ["ItemAmethyst",30000], ["ItemEmerald",35000], ["ItemCitrine",40000], ["ItemRuby",45000]]; //array of gem prices, works only in advanced trading
DZE_SaleRequiresKey = false; //Require the player has the key for a vehicle in order to sell it. The key can be in the player's toolbelt or backpack, or the vehicle's inventory. False by default DZE_SaleRequiresKey = false; //Require the player has the key for a vehicle in order to sell it. The key can be in the player's toolbelt, backpack, or the vehicle's inventory.
DZE_TRADER_SPAWNMODE = false; // Vehicles purchased at traders will be parachuted in DZE_TRADER_SPAWNMODE = false; // Vehicles purchased at traders will be parachuted in
Z_AT_FolderLocation = '\z\addons\dayz_code\actions\AdvancedTrading'; Z_AT_FolderLocation = '\z\addons\dayz_code\actions\AdvancedTrading';
Z_VehicleDistance = 40; // Distance that a vehicle needs to be to see it's content or to sell it. Z_VehicleDistance = 40; // Distance a vehicle needs to be to see its content or sell it.
Z_AllowTakingMoneyFromBackpack = true; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your backpack. Z_AllowTakingMoneyFromBackpack = true; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your backpack.
Z_AllowTakingMoneyFromVehicle = true; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your vehicle. Z_AllowTakingMoneyFromVehicle = true; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your vehicle.
Z_SingleCurrency = false; // Does your server use a single currency system? Z_SingleCurrency = false; // Does your server use a single currency system?
@@ -64,7 +64,7 @@ DZE_MoneyStorageClasses = []; // If using single currency this is an array of ob
// Plot Management and Plot for Life // Plot Management and Plot for Life
DZE_permanentPlot = true; // Plot ownership saves after death. Enables Plot for Life by @RimBlock and Plot Management by @DevZupa. DZE_permanentPlot = true; // Plot ownership saves after death. Enables Plot for Life by @RimBlock and Plot Management by @DevZupa.
DZE_plotManagementMustBeClose = true; //Players must be within 10m of pole to be added as a plot friend. DZE_plotManagementMustBeClose = false; //Players must be within 10m of pole to be added as a plot friend.
DZE_PlotManagementAdmins = []; //Array of admin PlayerUIDs enclosed in quotations, UIDs in this list are able to access every pole's management menu and delete or build any buildable with a pole nearby DZE_PlotManagementAdmins = []; //Array of admin PlayerUIDs enclosed in quotations, UIDs in this list are able to access every pole's management menu and delete or build any buildable with a pole nearby
DZE_MaxPlotFriends = 6; //Maximum number of friends allowed on a plot pole. DZE_MaxPlotFriends = 6; //Maximum number of friends allowed on a plot pole.
DZE_PlotOwnership = true; //allows plot owner to take ownership of buildables (excluding lockable items) near a plot pole. Useful for servers that allow base capturing so the new owner can modify/delete/upgrade existing structures DZE_PlotOwnership = true; //allows plot owner to take ownership of buildables (excluding lockable items) near a plot pole. Useful for servers that allow base capturing so the new owner can modify/delete/upgrade existing structures
@@ -82,7 +82,7 @@ DZE_buildMaxHeightDistance = 10; // Max distance player can raise or lower objec
// Door Management // Door Management
DZE_doorManagement = true; // Enable Door Management by @DevZupa. DZE_doorManagement = true; // Enable Door Management by @DevZupa.
DZE_doorManagementMustBeClose = true; //Players must be within 10m of door to be added as a door friend. DZE_doorManagementMustBeClose = false; //Players must be within 10m of door to be added as a door friend.
DZE_doorManagementAdmins = []; //Array of admin PlayerUIDs enclosed in quotations, UIDs in this list are able to access every door's management menu and open it DZE_doorManagementAdmins = []; //Array of admin PlayerUIDs enclosed in quotations, UIDs in this list are able to access every door's management menu and open it
DZE_doorManagementAllowManualCode = true; //Allows opening doors still using PIN DZE_doorManagementAllowManualCode = true; //Allows opening doors still using PIN
DZE_doorManagementMaxFriends = 10; //Maximum number of friends allowed on a door. DZE_doorManagementMaxFriends = 10; //Maximum number of friends allowed on a door.