diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 90e3f3a73cae..1b9eebeff1c0 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -536,6 +536,30 @@ SUBSYSTEM_DEF(shuttle) user.client.debug_variables(port.current_ship) return TRUE + if("blist") + var/obj/docking_port/mobile/port = locate(params["id"]) in mobile + if(!port || !port.current_ship) + return + var/datum/overmap/ship/controlled/port_ship = port.current_ship + var/temp_loc = input(user, "Select outpost to modify ship blacklist status for", "Get Em Outta Here") as null|anything in SSovermap.outposts + if(!temp_loc) + return + var/datum/overmap/outpost/please_leave = temp_loc + if(please_leave in port_ship.blacklisted) + if(tgui_alert(user, "Rescind ship blacklist?", "Maybe They Aren't So Bad", list("Yes", "No")) == "Yes") + port_ship.blacklisted &= ~please_leave + message_admins("[key_name_admin(user)] unblocked [port_ship] from [please_leave].") + log_admin("[key_name_admin(user)] unblocked [port_ship] from [please_leave].") + return TRUE + var/reason = input(user, "Provide a reason for blacklisting, which will be displayed on docking attempts", "Bar Them From The Pearly Gates", "Contact local law enforcement for more information.") + if(please_leave in port_ship.blacklisted) //in the event two admins are blacklisting a ship at the same time + if(tgui_alert(user, "Ship is already blacklisted, overwrite current reason with your own?", "I call the shots here", list("Yes", "No")) != "Yes") + return TRUE + port_ship.blacklisted[please_leave] = reason + message_admins("[key_name_admin(user)] blacklisted [port_ship] from landing at [please_leave] with reason: [reason]") + log_admin("[key_name_admin(user)] blacklisted [port_ship] from landing at [please_leave] with reason: [reason]") + return TRUE + if("fly") for(var/obj/docking_port/mobile/M as anything in mobile) if(REF(M) == params["id"]) diff --git a/code/modules/overmap/objects/outpost/outpost.dm b/code/modules/overmap/objects/outpost/outpost.dm index 158827693335..774057b68a08 100644 --- a/code/modules/overmap/objects/outpost/outpost.dm +++ b/code/modules/overmap/objects/outpost/outpost.dm @@ -211,6 +211,9 @@ ) return FALSE + if(src in dock_requester.blacklisted) + return new /datum/docking_ticket(_docking_error = "Docking request denied: [dock_requester.blacklisted[src]]") + adjust_dock_to_shuttle(h_dock, dock_requester.shuttle_port) return new /datum/docking_ticket(h_dock, src, dock_requester) diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index da35c3b9df9c..1779192f0cb2 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -63,6 +63,9 @@ ///Time that next job slot change can occur COOLDOWN_DECLARE(job_slot_adjustment_cooldown) + ///Stations the ship has been blacklisted from landing at, associative station = reason + var/list/blacklisted = list() + /datum/overmap/ship/controlled/Rename(new_name, force = FALSE) var/oldname = name if(!..() || (!COOLDOWN_FINISHED(src, rename_cooldown) && !force)) @@ -128,6 +131,7 @@ QDEL_NULL(shipkey) QDEL_LIST(manifest) job_slots.Cut() + blacklisted.Cut() for(var/a_key in applications) if(isnull(applications[a_key])) continue diff --git a/tgui/packages/tgui/interfaces/ShuttleManipulator.js b/tgui/packages/tgui/interfaces/ShuttleManipulator.js index f6a142bfd1d2..0608bb3a047e 100644 --- a/tgui/packages/tgui/interfaces/ShuttleManipulator.js +++ b/tgui/packages/tgui/interfaces/ShuttleManipulator.js @@ -92,6 +92,15 @@ export const ShuttleManipulatorStatus = (props, context) => { }) } /> +