Example #1
0
        public static SecurityLevel FromName(string from)
        {
            SecurityLevel result = SECURITYLEVELS.FirstOrDefault(v => v.name == from);

            if (result == null)
            {
                Logging.Report("Unknown Security Level name " + from);
            }
            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 static SecurityLevel FromEDName(string from)
 {
     string tidiedFrom = from == null ? null : from.ToLowerInvariant();
     SecurityLevel result = SECURITYLEVELS.FirstOrDefault(v => v.edname.ToLowerInvariant() == tidiedFrom);
     if (result == null)
     {
         Logging.Report("Unknown Security Level ED name " + from);
         result = new SecurityLevel(from, tidiedFrom);
     }
     return result;
 }
Example #4
0
        public static SecurityLevel FromEDName(string from)
        {
            string        tidiedFrom = from == null ? null : from.ToLowerInvariant();
            SecurityLevel result     = SECURITYLEVELS.FirstOrDefault(v => v.edname.ToLowerInvariant() == tidiedFrom);

            if (result == null)
            {
                Logging.Report("Unknown Security Level ED name " + from);
                result = new SecurityLevel(from, tidiedFrom);
            }
            return(result);
        }
 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);
 }