public static Government FromEDName(string from) { string tidiedFrom = from == null ? null : from.Replace(";", "").ToLowerInvariant(); Government result = GOVERNMENTS.FirstOrDefault(v => v.edname.ToLowerInvariant() == tidiedFrom); if (result == null) { Logging.Report("Unknown Government ED name " + from); result = new Government(from, tidiedFrom); } return result; }
public DockedEvent(DateTime timestamp, string system, string station, Superpower allegiance, string faction, State factionstate, Economy economy, Government government, SecurityLevel security) : base(timestamp, NAME) { this.system = system; this.station = station; this.allegiance = (allegiance == null ? Superpower.None.name : allegiance.name); this.faction = faction; this.factionstate = (factionstate == null ? State.None.name : factionstate.name); this.economy = (economy == null ? Economy.None.name : economy.name); this.government = (government == null ? Government.None.name : government.name); this.security = (security == null ? SecurityLevel.Low.name : security.name); }
public JumpedEvent(DateTime timestamp, string system, decimal x, decimal y, decimal z, decimal fuelused, decimal fuelremaining, Superpower allegiance, string faction, State factionstate, Economy economy, Government government, SecurityLevel security) : base(timestamp, NAME) { this.system = system; this.x = x; this.y = y; this.z = z; this.fuelused = fuelused; this.fuelremaining = fuelremaining; this.allegiance = (allegiance == null ? Superpower.None.name : allegiance.name) ; this.faction = faction; this.factionstate = (factionstate == null ? State.None.name : factionstate.name); this.economy = (economy == null ? Economy.None.name : economy.name); this.government = (government == null ? Government.None.name : government.name); this.security = (security == null ? SecurityLevel.None.name : security.name); }