public static Spectre ResumeEncounter(GameDatabase gamedb) { Spectre spectre = new Spectre(); PlayerInfo playerInfo = gamedb.GetPlayerInfos().ToList <PlayerInfo>().FirstOrDefault <PlayerInfo>((Func <PlayerInfo, bool>)(x => { if (!x.isStandardPlayer) { return(x.Name.Contains(nameof(Spectre))); } return(false); })); spectre.PlayerId = playerInfo.ID; List <DesignInfo> list = gamedb.GetDesignInfosForPlayer(spectre.PlayerId).ToList <DesignInfo>(); spectre._smallDesignId = list.First <DesignInfo>((Func <DesignInfo, bool>)(x => x.DesignSections[0].FilePath.EndsWith("small_specter.section"))).ID; spectre._mediumDesignId = list.First <DesignInfo>((Func <DesignInfo, bool>)(x => x.DesignSections[0].FilePath.EndsWith("medium_specter.section"))).ID; spectre._bigDesignId = list.First <DesignInfo>((Func <DesignInfo, bool>)(x => x.DesignSections[0].FilePath.EndsWith("big_specter.section"))).ID; return(spectre); }
public static Spectre InitializeEncounter(GameDatabase gamedb, AssetDatabase assetdb) { Spectre spectre = new Spectre(); spectre.PlayerId = gamedb.InsertPlayer(nameof(Spectre), "specters", new int?(), assetdb.RandomEncounterPrimaryColor, new Vector3(0.0f), "", "\\base\\factions\\specters\\avatars\\Specters_Avatar.tga", 0.0, 0, false, false, false, 0, AIDifficulty.Normal); DesignInfo design1 = new DesignInfo(spectre.PlayerId, "Small Spectre", new string[1] { string.Format("factions\\{0}\\sections\\{1}", (object)"specters", (object)"small_specter.section") }); DesignInfo design2 = new DesignInfo(spectre.PlayerId, "Medium Spectre", new string[1] { string.Format("factions\\{0}\\sections\\{1}", (object)"specters", (object)"medium_specter.section") }); DesignInfo design3 = new DesignInfo(spectre.PlayerId, "Big Spectre", new string[1] { string.Format("factions\\{0}\\sections\\{1}", (object)"specters", (object)"big_specter.section") }); spectre._smallDesignId = gamedb.InsertDesignByDesignInfo(design1); spectre._mediumDesignId = gamedb.InsertDesignByDesignInfo(design2); spectre._bigDesignId = gamedb.InsertDesignByDesignInfo(design3); return(spectre); }
public static Matrix GetBaseEnemyFleetTrans(App app, int systemID) { return(Spectre.GetSpawnTransform(app, systemID)); }