diff --git a/code/datums/helper_datums/map_template.dm b/code/datums/helper_datums/map_template.dm index fc0fe700a86..7ec318311b2 100644 --- a/code/datums/helper_datums/map_template.dm +++ b/code/datums/helper_datums/map_template.dm @@ -113,6 +113,7 @@ if(!config.disable_space_ruins) // so we don't unnecessarily clutter start-up preloadRuinTemplates() preloadShelterTemplates() + preloadShuttleTemplates() /proc/preloadRuinTemplates() // Still supporting bans by filename diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 7c77ca6099f..eaec5c96f13 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -455,8 +455,10 @@ if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED) // There is a serious threat we gotta move no time to give them five minutes. shuttle_master.emergency.request(null, 0.5, null, " Automatic Crew Transfer", 1) + shuttle_master.emergency.canRecall = FALSE else shuttle_master.emergency.request(null, 1, null, " Automatic Crew Transfer", 0) + shuttle_master.emergency.canRecall = FALSE if(user) log_game("[key_name(user)] has called the shuttle.") message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 9639cd6ab4f..2021275731e 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -5,7 +5,6 @@ icon_keyboard = "tech_key" var/auth_need = 3 var/list/authorized = list() - var/canrecall = TRUE /obj/machinery/computer/emergency_shuttle/attackby(obj/item/weapon/card/W, mob/user, params) if(stat & (BROKEN|NOPOWER)) @@ -92,6 +91,9 @@ var/datum/announcement/priority/emergency_shuttle_called = new(0, new_sound = sound('sound/AI/shuttlecalled.ogg')) var/datum/announcement/priority/emergency_shuttle_recalled = new(0, new_sound = sound('sound/AI/shuttlerecalled.ogg')) + var/canRecall = TRUE//no bad condom, do not recall the crew transfer shuttle! + + /obj/docking_port/mobile/emergency/register() if(!..()) return 0 //shuttle master not initialized @@ -146,6 +148,9 @@ emergency_shuttle_called.Announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][shuttle_master.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]") /obj/docking_port/mobile/emergency/cancel(area/signalOrigin) + if(!canRecall) + return + if(mode != SHUTTLE_CALL) return diff --git a/code/modules/shuttle/shuttle_manipulator.dm b/code/modules/shuttle/shuttle_manipulator.dm index 14b72bad821..3b701bc641e 100644 --- a/code/modules/shuttle/shuttle_manipulator.dm +++ b/code/modules/shuttle/shuttle_manipulator.dm @@ -72,14 +72,16 @@ data["templates"] = list() var/list/templates = data["templates"] data["templates_tabs"] = list() - data["selected"] = list() - + data["selected"] = null for(var/shuttle_id in shuttle_templates) var/datum/map_template/shuttle/S = shuttle_templates[shuttle_id] if(!templates[S.port_id]) data["templates_tabs"] += S.port_id + // The first found shuttle type will be our default + if(!existing_shuttle) + existing_shuttle = shuttle_master.getShuttle(S.port_id) templates[S.port_id] = list( "port_id" = S.port_id, "templates" = list()) @@ -149,6 +151,12 @@ selected_menu_key = href_list["selectMenuKey"] return 1 // return 1 forces an update to all Nano uis attached to src + if(href_list["select_template_category"]) + var/chosen_shuttle_id = href_list["select_template_category"] + selected = null + existing_shuttle = shuttle_master.getShuttle(chosen_shuttle_id) + return 1 + if(href_list["select_template"]) if(S) existing_shuttle = shuttle_master.getShuttle(S.port_id) diff --git a/nano/templates/shuttle_manipulator.tmpl b/nano/templates/shuttle_manipulator.tmpl index 9e83853c089..2fefd0ff648 100644 --- a/nano/templates/shuttle_manipulator.tmpl +++ b/nano/templates/shuttle_manipulator.tmpl @@ -31,53 +31,90 @@ Title: Shuttle Manipulator UI Shuttle Status: {{:value.status}}