void AddIfNotExists(WurmSeasonDefinition wurmSeasonDefinition) { if (!definitions.Exists(definition => definition.Id == wurmSeasonDefinition.Id)) { definitions.Add(wurmSeasonDefinition); } }
public WurmSeasonOutputItem(WurmSeasonDefinition wurmSeasonDefinition, double compareOffset, WurmDateTime currentWDT) { seasonDefinition = wurmSeasonDefinition; LengthDays = seasonDefinition.DayEnd - seasonDefinition.DayBegin + 1; CompareOffset = compareOffset; Update(currentWDT); }
void SetDefaultDefinition(Guid id, [NotNull] string name, int dayBegin, int dayEnd) { var def = new WurmSeasonDefinition(true) { Id = id, SeasonName = name, DayBegin = dayBegin, DayEnd = dayEnd }; defaultDefinitions.Add(def); }