private void InitDesigns(GameDatabase db) { List <DesignInfo> list = db.GetDesignInfosForPlayer(this.PlayerId).ToList <DesignInfo>(); this._guardianDesignId = db.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, this.PlayerId, "Swarm Guardian", "swarm", "guardian.section"); this._swarmerDesignId = db.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, this.PlayerId, "Swarm Swarmer", "swarm", "swarmer.section"); this._hiveStage1DesignId = db.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, this.PlayerId, "Swarm Hive", "swarm", "hive_stage1.section"); this._larvalQueenDesignId = db.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, this.PlayerId, "Swarm Larval Queen", "swarm", "larval_queen.section"); this._swarmQueenDesignId = db.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, this.PlayerId, "Swarm Queen", "swarm", "swarm_queen.section"); }
public void InitDesigns(GameDatabase db) { List <DesignInfo> list = db.GetDesignInfosForPlayer(this.PlayerId).ToList <DesignInfo>(); this._slaveDiskDesignId = db.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, this.PlayerId, "Slave Disk", "slavers", "br_slavedisk.section"); this._wraithAbductorDesignId = db.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, this.PlayerId, "Slaver Wraith Abductor", "slavers", "cr_wraith_abductor.section"); this._scavengerDesignId = db.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, this.PlayerId, "Slaver Scavenger", "slavers", "cr_mis_scavenger.section", "cr_cmd.section", "cr_eng_fusion.section"); DesignInfo designInfo1 = db.GetDesignInfo(this._slaveDiskDesignId); DesignInfo designInfo2 = db.GetDesignInfo(this._scavengerDesignId); designInfo1.Role = ShipRole.SLAVEDISK; designInfo2.Role = ShipRole.SCAVENGER; db.UpdateDesign(designInfo1); db.UpdateDesign(designInfo2); }
public static AsteroidMonitor ResumeEncounter(GameDatabase gamedb) { AsteroidMonitor asteroidMonitor = new AsteroidMonitor(); PlayerInfo playerInfo = gamedb.GetPlayerInfos().ToList <PlayerInfo>().FirstOrDefault <PlayerInfo>((Func <PlayerInfo, bool>)(x => { if (!x.isStandardPlayer) { return(x.Name.Contains("Asteroid Monitor")); } return(false); })); asteroidMonitor.PlayerId = playerInfo != null ? playerInfo.ID : gamedb.InsertPlayer("Asteroid Monitor", "morrigirelics", new int?(), new Vector3(0.0f), new Vector3(0.0f), "", "\\base\\factions\\morrigirelics\\avatars\\Morrigirelics_Avatar.tga", 0.0, 0, false, false, false, 0, AIDifficulty.Normal); List <DesignInfo> list = gamedb.GetDesignInfosForPlayer(asteroidMonitor.PlayerId).ToList <DesignInfo>(); asteroidMonitor._monitorDesignId = gamedb.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, asteroidMonitor.PlayerId, "Monitor", "morrigirelics", "sn_monitor.section"); asteroidMonitor._monitorCommandDesignId = gamedb.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, asteroidMonitor.PlayerId, "Monitor Command", "morrigirelics", "sn_monitorcommander.section"); return(asteroidMonitor); }
public static GhostShip InitializeEncounter(GameDatabase gamedb, AssetDatabase assetdb) { GhostShip ghostShip = new GhostShip(); ghostShip.PlayerId = gamedb.InsertPlayer("Ghost Ship", "ghostship", new int?(), assetdb.RandomEncounterPrimaryColor, new Vector3(0.0f), "", "\\base\\factions\\ghostship\\avatars\\Ghostship_Avatar.tga", 0.0, 0, false, false, false, 0, AIDifficulty.Normal); List <DesignInfo> list = gamedb.GetDesignInfosForPlayer(ghostShip.PlayerId).ToList <DesignInfo>(); ghostShip._designId = gamedb.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, ghostShip.PlayerId, "The Flying Dutchman", "ghostship", "lv_SFS.section"); int fleetID = gamedb.InsertFleet(ghostShip.PlayerId, 0, 0, 0, "Ghost Ship", FleetType.FL_NORMAL); gamedb.InsertShip(fleetID, ghostShip._designId, null, (ShipParams)0, new int?(), 0); return(ghostShip); }
public static GhostShip ResumeEncounter(GameDatabase gamedb) { GhostShip ghostShip = new GhostShip(); PlayerInfo playerInfo = gamedb.GetPlayerInfos().ToList <PlayerInfo>().FirstOrDefault <PlayerInfo>((Func <PlayerInfo, bool>)(x => { if (!x.isStandardPlayer) { return(x.Name.Contains("Ghost Ship")); } return(false); })); ghostShip.PlayerId = playerInfo == null?gamedb.InsertPlayer("Ghost Ship", "ghostship", new int?(), new Vector3(0.0f), new Vector3(0.0f), "", "\\base\\factions\\ghostship\\avatars\\Ghostship_Avatar.tga", 0.0, 0, false, false, false, 0, AIDifficulty.Normal) : playerInfo.ID; List <DesignInfo> list = gamedb.GetDesignInfosForPlayer(ghostShip.PlayerId).ToList <DesignInfo>(); ghostShip._designId = gamedb.AddOrGetEncounterDesignInfo((IEnumerable <DesignInfo>)list, ghostShip.PlayerId, "The Flying Dutchman", "ghostship", "lv_SFS.section"); return(ghostShip); }