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