/// <summary> /// Performs the custom processing of the outgoing problem timer. /// </summary> /// <param name="buildingId">The ID of the building to process.</param> /// <param name="oldValue">The old value of the outgoing problem timer.</param> /// <param name="newValue">The new value of the outgoing problem timer.</param> public void ProcessOutgoingProblems(ushort buildingId, byte oldValue, byte newValue) { // We have only few customers at night - that's an intended behavior. // To avoid commercial buildings from collapsing due to lack of customers, // we force the problem timer to pause at night time. if (timeInfo.IsNightTime || timeInfo.Now.Minute % ProblemTimersInterval != 0 || minuteProcessed) { buildingManager.SetOutgoingProblemTimer(buildingId, oldValue); } }
/// <summary> /// Performs the custom processing of the outgoing problem timer. /// </summary> /// <param name="buildingId">The ID of the building to process.</param> /// <param name="outgoingProblemTimer">The previous value of the outgoing problem timer.</param> public void ProcessBuildingProblems(ushort buildingId, byte outgoingProblemTimer) { // We have only few customers at night - that's an intended behavior. // To avoid commercial buildings from collapsing due to lack of customers, // we force the problem timer to pause at night time. // In the daytime, the timer is running slower. if (timeInfo.IsNightTime || timeInfo.Now.Minute % ProblemTimersInterval != 0 || freezeProblemTimers) { buildingManager.SetOutgoingProblemTimer(buildingId, outgoingProblemTimer); } }