Exemple #1
0
 public void RemoveModification(ServerModification serverModification)
 {
     if (modifications.Contains(serverModification))
     {
         modifications.Remove(serverModification);
     }
 }
Exemple #2
0
 public void AddModification(ServerModification serverModification)
 {
     if (!modifications.Contains(serverModification))
     {
         modifications.Add(serverModification);
     }
 }
Exemple #3
0
 private void Update()
 {
     modification = modificationManager.ProcessModifications();
     CalculateTemperatureChangePerSecond();
     CalculateTemperature();
     CheckTemperatureLimits();
     AddVisualizationsPerSecondToTotal();
 }
Exemple #4
0
        public ServerModification ProcessModifications()
        {
            ServerModification result = new ServerModification();

            for (int i = 0; i < modifications.Count; i++)
            {
                result.VisualizationsPerSecondBoost           += modifications[i].VisualizationsPerSecondBoost;
                result.MaxTemperatureBoost                    += modifications[i].MaxTemperatureBoost;
                result.MinTemperatureBoost                    += modifications[i].MinTemperatureBoost;
                result.InstantTemperatureChangeBoost          += modifications[i].InstantTemperatureChangeBoost;
                modifications[i].InstantTemperatureChangeBoost = 0;
                result.TemperatureChangePerSecondBoost        += modifications[i].TemperatureChangePerSecondBoost;
                result.BlockCooldownTimeBoost                 += modifications[i].BlockCooldownTimeBoost;
            }
            return(result);
        }