public void Serialize(DataSerializer s) { AutobudgetElectricity d = Singleton <AutobudgetManager> .instance.container.AutobudgetElectricity; s.WriteBool(d.Enabled); s.WriteInt32(d.AutobudgetBuffer); s.WriteInt32(d.BudgetMaxValue); s.WriteBool(d.PauseWhenBudgetTooHigh); }
public void Deserialize(DataSerializer s) { AutobudgetElectricity d = Singleton <AutobudgetManager> .instance.container.AutobudgetElectricity; d.Enabled = s.ReadBool(); d.AutobudgetBuffer = s.ReadInt32(); d.BudgetMaxValue = s.ReadInt32(); d.PauseWhenBudgetTooHigh = s.ReadBool(); }
public void InitObjects() { if (AutobudgetElectricity == null) { AutobudgetElectricity = new AutobudgetElectricity(); } if (AutobudgetWater == null) { AutobudgetWater = new AutobudgetWater(); } if (AutobudgetGarbage == null) { AutobudgetGarbage = new AutobudgetGarbage(); } if (AutobudgetHealthcare == null) { AutobudgetHealthcare = new AutobudgetHealthcare(); } if (AutobudgetEducation == null) { AutobudgetEducation = new AutobudgetEducation(); } if (AutobudgetPolice == null) { AutobudgetPolice = new AutobudgetPolice(); } if (AutobudgetFire == null) { AutobudgetFire = new AutobudgetFire(); } if (AutobudgetRoad == null) { AutobudgetRoad = new AutobudgetRoad(); } if (AutobudgetPost == null) { AutobudgetPost = new AutobudgetPost(); } if (AutobudgetTaxi == null) { AutobudgetTaxi = new AutobudgetTaxi(); } AllAutobudgetObjects.Clear(); AllAutobudgetObjects.Add(AutobudgetElectricity); AllAutobudgetObjects.Add(AutobudgetWater); AllAutobudgetObjects.Add(AutobudgetGarbage); AllAutobudgetObjects.Add(AutobudgetHealthcare); AllAutobudgetObjects.Add(AutobudgetEducation); AllAutobudgetObjects.Add(AutobudgetPolice); AllAutobudgetObjects.Add(AutobudgetFire); AllAutobudgetObjects.Add(AutobudgetRoad); AllAutobudgetObjects.Add(AutobudgetPost); AllAutobudgetObjects.Add(AutobudgetTaxi); }