/// <summary> /// Add Fodder /// </summary> /// <param name="AddAmount"></param> public void Add(double AddAmount) { this._AvailableDays = this._AvailableDays + AddAmount; if (LabourChanged != null) { LabourChanged.Invoke(this, new EventArgs()); } }
/// <summary> /// Set Amount of Fodder /// </summary> /// <param name="NewValue"></param> public void Set(double NewValue) { this._AvailableDays = NewValue; if (LabourChanged != null) { LabourChanged.Invoke(this, new EventArgs()); } }
/// <summary> /// Remove Fodder /// </summary> /// <param name="RemoveAmount"></param> public void Remove(double RemoveAmount) { if (this._AvailableDays - RemoveAmount < 0) { string message = "Tried to remove more " + this.Name + " than exists." + Environment.NewLine + "Current Amount: " + this._AvailableDays + Environment.NewLine + "Tried to Remove: " + RemoveAmount; Summary.WriteWarning(this, message); this._AvailableDays = 0; } else { this._AvailableDays = this._AvailableDays - RemoveAmount; } if (LabourChanged != null) { LabourChanged.Invoke(this, new EventArgs()); } }