Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 public static Matrix GetBaseEnemyFleetTrans(App app, Kerberos.Sots.GameStates.StarSystem starSystem)
 {
     return(GhostShip.GetSpawnTransform(app, starSystem));
 }