+ added "each" to the sell menu for mags.
+ fixed sell message to display actual in out counts traded in bulk.
+made pack vault text red.
+ reduced zombie alert when attempting to crack vault.
+ potential fix for vehicle damage spam at server start.
This commit is contained in:
vbawol
2013-02-03 12:42:17 -06:00
parent ad3ad6e642
commit 1b68d0399d
6 changed files with 16 additions and 16 deletions

View File

@@ -90,7 +90,7 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
_in = 1;
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,_textPart,_textCurrency];
_Display = format["Sell %1 for %2 %3", _textPart, _sqty, _textCurrency];
_Display = format["Sell %1 for %2 %3 each", _textPart, _sqty, _textCurrency];
_part = player addAction [_Display, _File,[_sname,_name,_out,_in,"sell",_textPart,_textCurrency,_header], _order, true, true, "",""];
diag_log format["DEBUG TRADER: %1", _part];

View File

@@ -132,7 +132,7 @@ if (_bulkqty >= 1) then {
};
// [player,"repair",0,false] call dayz_zombieSpeak;
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
cutText [format[("Traded %1 %2 for %3 %4"),(_qty_in*_qty),_textPartIn,(_qty_out*_qty),_textPartOut], "PLAIN DOWN"];
} else {
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
};

View File

@@ -211,7 +211,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
//Packing my tent
if(cursorTarget isKindOf "TentStorage" and _canDo and _ownerID == dayz_characterID) then {
if ((s_player_packtent < 0) and (player distance cursorTarget < 3)) then {
if (s_player_packtent < 0) then {
s_player_packtent = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
@@ -222,12 +222,12 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
//Allow owner to unlock vault
if(cursorTarget isKindOf "VaultStorageLocked" and _canDo and _ownerID != "0") then {
if (_ownerID == dayz_playerUID) then {
if ((s_player_unlockvault < 0) and (player distance cursorTarget < 3)) then {
if (s_player_unlockvault < 0) then {
s_player_unlockvault = player addAction ["Unlock Vault", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
if(_hasToolbox) then{
if ((s_player_unlockvault < 0) and (player distance cursorTarget < 3)) then {
if (s_player_unlockvault < 0) then {
s_player_unlockvault = player addAction ["Crack Vault", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""];
};
};
@@ -240,12 +240,13 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
//Allow owner to pack vault
if(cursorTarget isKindOf "VaultStorage" and _canDo and _ownerID != "0" and _ownerID == dayz_playerUID) then {
if ((s_player_packvault < 0) and (player distance cursorTarget < 3)) then {
s_player_packvault = player addAction ["Pack Vault", "\z\addons\dayz_code\actions\vault_pack.sqf",cursorTarget, 0, false, true, "",""];
};
if ((s_player_lockvault < 0) and (player distance cursorTarget < 3)) then {
s_player_lockvault = player addAction ["Lock Vault", "\z\addons\dayz_code\actions\vault_lock.sqf",cursorTarget, 0, false, true, "",""];
};
if ((s_player_packvault < 0) and (player distance cursorTarget < 3)) then {
s_player_packvault = player addAction ["<t color='#ff0000'>Pack Vault</t>", "\z\addons\dayz_code\actions\vault_pack.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_packvault;
s_player_packvault = -1;
@@ -300,9 +301,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
// All Traders
if (_isMan and !_isPZombie and (s_last_trader != _traderType) and _traderType in serverTraders) then {
s_last_trader = _traderType;
if (_isMan and !_isPZombie and _traderType in serverTraders) then {
if (s_player_parts_crtl < 0) then {
@@ -350,7 +349,6 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
} else {
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
s_player_parts_crtl = -1;
s_last_trader = objNUll
};
@@ -434,7 +432,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
//s_player_madsci_crtl = -1;
s_player_parts_crtl = -1;
s_last_trader = objNull;
dayz_myCursorTarget = objNull;
// lock unlock vehicles
s_player_lockUnlock_crtl = -1;

View File

@@ -106,7 +106,7 @@ if(_allowunlock) then {
player playActionNow "Medic";
sleep 3;
[player,"repair",0,false] call dayz_zombieSpeak;
null = [player,50,true,(getPosATL player)] spawn player_alertZombies;
null = [player,25,true,(getPosATL player)] spawn player_alertZombies;
sleep 5;
cutText ["Combination incorrect, vault is still locked.", "PLAIN DOWN"];
};

View File

@@ -127,7 +127,6 @@ dayz_resetSelfActions = {
s_player_barkdog = -1;
s_player_warndog = -1;
s_player_followdog = -1;
s_last_trader = -1;
s_player_repair_crtl = -1;
};
call dayz_resetSelfActions;

View File

@@ -150,8 +150,11 @@ switch (_type) do {
if ( (time - _lastUpdate) > 5) then {
call _object_damage;
} else {
diag_log format["DEBUG: Added to NeedUpdate=%1",_object];
if(_object not in needUpdate_objects) then {
diag_log format["DEBUG: Added to NeedUpdate=%1",_object];
needUpdate_objects set [count needUpdate_objects, _object];
};
};
};
case "killed": {