public static Superpower FromName(string from)
        {
            Superpower result = SUPERPOWERS.FirstOrDefault(v => v.name == from);

            if (result == null)
            {
                Logging.Report("Unknown Superpower name " + from);
            }
            return(result);
        }
예제 #2
0
        public static Superpower From(string from)
        {
            Superpower result = FromName(from);

            if (result == null)
            {
                result = FromEDName(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);
 }
예제 #4
0
        public static Superpower FromName(string from)
        {
            if (from == null)
            {
                return(null);
            }

            Superpower result = SUPERPOWERS.FirstOrDefault(v => v.name == from);

            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);
 }
예제 #6
0
파일: Power.cs 프로젝트: Deekfoz/EDDI
 private Power(string edname, Superpower allegiance, string headquarters) : base(edname, edname)
 {
     this.Allegiance   = allegiance;
     this.headquarters = headquarters;
 }