Advertisement
MGT

ExileServer_system_territory_maintenance_recalculateDueDate

MGT
Nov 30th, 2015
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.98 KB | None | 0 0
  1. /**
  2.  * Exile Mod
  3.  * www.exilemod.com
  4.  * © 2015 Exile Mod Team
  5.  *
  6.  * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  7.  * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  8.  */
  9.  
  10. private["_flag","_currentTimestamp","_timePayed","_timePayedMinutes","_maintenancePeriod","_maintenancePeriodMinutes","_nukeTime"];
  11. _flag = _this;
  12. _currentTimestamp = call ExileServer_util_time_currentTime;
  13. _timePayed = _flag getVariable ["ExileTerritoryLastPayed", _currentTimestamp];
  14. _timePayedMinutes = _timePayed call ExileServer_util_time_toMinutes;
  15. _maintenancePeriod = getNumber(missionConfigFile >> "CfgTerritories" >> "protectionPeriod");
  16. _maintenancePeriodMinutes = _maintenancePeriod * 1440;
  17. _nukeTime = _timePayedMinutes + _maintenancePeriodMinutes;
  18. _flag setVariable ["ExileTerritoryMaintenanceDue", _timePayed call ExileServer_util_time_toArma, true]; // Changed _nukeTime to _timePayed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement