예제 #1
0
        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
 static void Prefix(ref int startingTile)
 {
     if (VesselManager.FormVessel)
     {
         startingTile = EmbarkShipUtility.AdjacentOceanTile(startingTile);
     }
 }
예제 #3
0
 static void Postfix(LordJob_FormAndSendCaravan __instance)
 {
     if (EmbarkShipUtility.EmbarkUIActive)
     {
         VesselManager.AddVesselEmbark(__instance, EmbarkShipUtility.FindShipyardInMap(((MapParent)Find.WorldSelector.SingleSelectedObject).Map));
     }
 }
예제 #4
0
        private static void MoveAction()
        {
            Vessel sourceWorldObject = (Vessel)Find.WorldSelector.SingleSelectedObject;

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