Add Better "DZE_ForceNameTagsInTrader" system

This commit is contained in:
Skaronator
2014-02-23 18:19:53 +01:00
parent 945ad16332
commit e54cce6845
3 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
private ["_traderName","_showText","_enterORleave"];
_traderName = _this select 0;
_showText = _this select 1;
_enterORleave = _this select 2;
switch _enterORleave do {
case "enter": {
if (_showText) then {
cutText [format [localize "STR_EPOCH_TRADER_ENTER", _traderName], "PLAIN DOWN"];
};
canbuild = false;
inTraderCity = _traderName;
isInTraderCity = true;
};
case "leave": {
if (_showText) then {
cutText [format [localize "STR_EPOCH_TRADER_LEAVE", _traderName], "PLAIN DOWN"];
};
canbuild = true;
inTraderCity = "Any";
isInTraderCity = false;
};
};

View File

@@ -188,7 +188,7 @@ if (!isNull _humanityTarget and isPlayer _humanityTarget and alive _humanityTarg
_color = "color='#3333ff'";
};
};
if(_humanityTarget getVariable ["DZE_display_name", false]) then {
if((_humanityTarget getVariable ["DZE_display_name", false]) or (DZE_ForceNameTagsInTrader && isInTraderCity)) then {
_string = format["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size];
};
};

View File

@@ -295,6 +295,7 @@ r_action_repair = false;
r_action_targets = [];
r_pitchWhine = false;
r_isBandit = false;
isInTraderCity = false;
DZE_PROTOBOX = objNull;