From ba6f19e7bb32c107e3d1d3ebb41c3d8c7af16019 Mon Sep 17 00:00:00 2001 From: vbawol Date: Fri, 11 Nov 2016 16:43:48 -0600 Subject: [PATCH] b653 pt1 - fixed a typo in takeCrypto and updated private array - moved epoch_2DCtrlHeartbeat to is Critical logic so it only beats when critical (todo make slower faster based on high or low status) --- Sources/epoch_code/compile/setup/masterLoop/Event1.sqf | 2 +- .../compile/epoch_trading/EPOCH_server_takeCrypto.sqf | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf index 2ebe8349..937a8a6f 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf @@ -91,8 +91,8 @@ EPOCH_currentTargetMode = _currentTargetMode; _forceUpdate = "forceUpdate" in _criticalAttributes; _forceFatigue = "forceFatigue" in _criticalAttributes; _forceBloodRise = "forceBloodRise" in _criticalAttributes; + [_curCtrl,0.55] call epoch_2DCtrlHeartbeat; }; - [_curCtrl,0.55] call epoch_2DCtrlHeartbeat; // todo make this reversable or even limited to a color range. _color = [_playerLimitMin,_playerLimitMax,_currentVarVal,1] call EPOCH_colorRange; _curCtrl ctrlSetTextColor _color; diff --git a/Sources/epoch_server/compile/epoch_trading/EPOCH_server_takeCrypto.sqf b/Sources/epoch_server/compile/epoch_trading/EPOCH_server_takeCrypto.sqf index d28779ff..b711305a 100644 --- a/Sources/epoch_server/compile/epoch_trading/EPOCH_server_takeCrypto.sqf +++ b/Sources/epoch_server/compile/epoch_trading/EPOCH_server_takeCrypto.sqf @@ -12,7 +12,9 @@ Github: https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeTrade.sqf */ -private ["_current_crypto","_player","_object","_getCrypto"]; +//[[[cog import generate_private_arrays ]]] +private ["_getCrypto"]; +//[[[end]]] params ["_player",["_token","",[""]],"_object"]; if !([_player,_token] call EPOCH_server_getPToken) exitWith {}; @@ -21,10 +23,10 @@ if (_player distance _object > 10) exitWith {}; _getCrypto = _object getVariable["Crypto", 0]; if (_getCrypto > 0) then { - // remove crypto from object _object setVariable["Crypto", nil, true]; + // send data back to player [_player,_getCrypto] call EPOCH_server_effectCrypto; // debug and logging. - diag_log format["Epoch: ADMIN: %1 picked up %2 Crypto from object %3 with puid %4 at %5", getPlayerUID _player, _current_crypto, [_object, typeOf _object],_object getVariable['PUID', ''],getposATL _object]; + diag_log format["Epoch: ADMIN: %1 picked up %2 Crypto from object %3 with puid %4 at %5", getPlayerUID _player, _getCrypto, [_object, typeOf _object],_object getVariable['PUID', ''],getposATL _object]; };