コード例 #1
0
ファイル: DE_Ships.cs プロジェクト: DemonEin/DE_Ships
        static void Postfix(ref IEnumerable <Gizmo> __result, SettlementBase __instance)
        {
            if (EmbarkShipUtility.AdjacentOceanTile(__instance.Tile) == -1)
            {
                return;
            }
            List <Gizmo> newResult = new List <Gizmo>();

            foreach (Gizmo gizmo in __result)
            {
                newResult.Add(gizmo);
            }
            //FEATURE NOT IMPLEMENTED

            /*
             * //adds an embark ship button for every shipyard in the map
             * foreach (Zone zone in __instance.Map.zoneManager.AllZones)
             * {
             *  if (zone is Zone_Shipyard)
             *  {
             *      newResult.Add(EmbarkShipUtility.EmbarkCommand());
             *      (Command)newResult.Last()).def
             *  }
             * }
             */
            newResult.Add(EmbarkShipUtility.EmbarkCommand());
            newResult.Add(ShipMoverTest.MoveCommand());
            __result = newResult;
        }
コード例 #2
0
ファイル: DE_Ships.cs プロジェクト: DemonEin/DE_Ships
 static void Prefix(ref int startingTile)
 {
     if (VesselManager.FormVessel)
     {
         startingTile = EmbarkShipUtility.AdjacentOceanTile(startingTile);
     }
 }
コード例 #3
0
ファイル: DE_Ships.cs プロジェクト: DemonEin/DE_Ships
 static void Postfix(LordJob_FormAndSendCaravan __instance)
 {
     if (EmbarkShipUtility.EmbarkUIActive)
     {
         VesselManager.AddVesselEmbark(__instance, EmbarkShipUtility.FindShipyardInMap(((MapParent)Find.WorldSelector.SingleSelectedObject).Map));
     }
 }
コード例 #4
0
ファイル: DE_Ships.cs プロジェクト: DemonEin/DE_Ships
        private static void MoveAction()
        {
            Vessel sourceWorldObject = (Vessel)Find.WorldSelector.SingleSelectedObject;

            sourceWorldObject.Tile = EmbarkShipUtility.AdjacentOceanTile(sourceWorldObject.Tile);
        }