public void RemoveModification(ServerModification serverModification) { if (modifications.Contains(serverModification)) { modifications.Remove(serverModification); } }
public void AddModification(ServerModification serverModification) { if (!modifications.Contains(serverModification)) { modifications.Add(serverModification); } }
private void Update() { modification = modificationManager.ProcessModifications(); CalculateTemperatureChangePerSecond(); CalculateTemperature(); CheckTemperatureLimits(); AddVisualizationsPerSecondToTotal(); }
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); }