diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index fa452446e87..e6ce8dc2e73 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -37,7 +37,6 @@ var/list/admin_verbs_admin = list( /client/proc/jumptoturf, /*allows us to jump to a specific turf*/ /client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/ /client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcomm*/ - /client/proc/cmd_admin_destroy_shuttle, /* Destroys the emergency shuttle, allowing us to import a new shuttle template. Or just horribly fuck with the game. */ /client/proc/cmd_admin_import_shuttle, /* Imports a emergency shuttle from a template, and sends it to its round start location. Probably should destroy the old one first.*/ /client/proc/check_words, /*displays cult-words*/ /client/proc/check_ai_laws, /*shows AI and borg laws*/ /client/proc/manage_silicon_laws, /* Allows viewing and editing silicon laws. */ diff --git a/code/modules/admin/verbs/shuttles.dm b/code/modules/admin/verbs/shuttles.dm deleted file mode 100644 index afee5a250bc..00000000000 --- a/code/modules/admin/verbs/shuttles.dm +++ /dev/null @@ -1,117 +0,0 @@ -/proc/emergency_sanity_check() - if(shuttle_master.emergency.mode != SHUTTLE_IDLE) - var/confirm = alert(src, "Modification of the emergency shuttle while it is not idle can be highly dangerous, and may result in WEIRD UNPREDICTABLE SHIT. Are you SURE you want to continue? Obviously if you're not touching the emergency shuttle, then you're probably fine.", "Confirm", "Yes", "No") - if(confirm == "Yes") - return TRUE - else - return FALSE - else - return TRUE - -/client/proc/cmd_admin_destroy_shuttle() - set category = "Admin" - set name = "Shuttle Destroy" - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - - if(!emergency_sanity_check()) - return - - var/list/names = list() - var/obj/docking_port/mobile/M - for (var/atom/AM in shuttle_master.mobile) - M = AM - names += M.name - - var/selected = input("Select shuttle to DESTROY", "Shuttles") as null|anything in names - - var/decide_against_msg = "You decide against destroying a shuttle." - - if(!selected) - to_chat(src, decide_against_msg) - return - - var/confirm = alert(src, "Are you sure you want to destroy [selected]?", "Confirm", "Yes", "No") - - if(confirm != "Yes") - to_chat(src, decide_against_msg) - return - - var/destroyed = FALSE - for (var/atom/AM in shuttle_master.mobile) - M = AM - if(M.name == selected) - M.jumpToNullSpace() - destroyed = TRUE - break - - if(!destroyed) - to_chat(src, "Something went wrong, the selected shuttle doesn't exist anymore.") - return - - log_admin("[key_name_admin(usr)] - ShuttleDestroy: [M]") - message_admins("[key_name_admin(usr)] has used ShuttleDestroy on [selected]
") - feedback_add_details("admin_verb","SHTDEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/cmd_admin_import_shuttle() - set category = "Admin" - set name = "Shuttle Import" - - if (!holder) - to_chat(src, "Only administrators may use this command.") - return - - if(!emergency_sanity_check()) - return - - var/datum/map_template/template - var/map = input(usr, "Choose a Shuttle Template to import","Import Shuttle Template") as null|anything in shuttle_templates - if(!map) - return - template = shuttle_templates[map] - - if(alert(usr,"Confirm importing of [map]","Shuttle Import Confirm","Yes","No") != "Yes") - return - - var/turf/T = get_turf(locate("landmark*Shuttle Import")) - if(!T) - to_chat(usr, "Shuttle import landmark not found. Aborting.") - template.load(T, centered = TRUE) - - var/obj/docking_port/mobile/M - - for(var/S in template.get_affected_turfs(T,centered = TRUE)) - for (var/AM in S) - if(istype(AM, /obj/docking_port/mobile)) - if(!M) - M = AM - else - to_chat(usr,"More than one mobile docking port was detected ([AM]), this is a BAD THING, TELL A CODER.") - if(istype(AM, /obj/docking_port/stationary)) - to_chat(usr, "REEEEEEEEEEEE! THE LOADED TEMPLATE HAS [AM], A STATIONARY DOCKING PORT, THIS IS A BAD THING FIX IT. TELL A CODER. WE CAN DELETE IT BUT IT SHOULD NOT BE THERE.") - var/obj/docking_port/stationary/bad = AM - bad.i_know_what_im_doing = TRUE - qdel(bad) - - if(!M) - to_chat(usr, "The loaded template didn't have a mobile docking port! The template has been deleted.") - for(var/S in template.get_affected_turfs(T,centered = TRUE)) - var/turf/T0 = S - for(var/atom/AM in T0.GetAllContents()) - if(istype(AM, /mob/dead)) - continue - qdel(AM) - qdel(S) - return - - var/status = M.dockRoundstart() - if(status) - log_admin("The imported shuttle [map]/[M] failed to travel to its roundstart \ - location (error code [status]). Please fix or delete the imported shuttle \ - before continuing any more shuttle import hijinks.") - - log_admin("[key_name_admin(usr)] - ShuttleImport: [map] - [M]") - message_admins("[key_name_admin(usr)] has used ShuttleImport: [map] - [M]
") - feedback_add_details("admin_verb","SHTIMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! \ No newline at end of file diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 5900d91bea3..20a06d7fc63 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -212,10 +212,15 @@ /obj/docking_port/mobile/New() ..() + + + +/obj/docking_port/mobile/initialize() + var/area/A = get_area(src) + if(!timid) register() - var/area/A = get_area(src) if(istype(A, /area/shuttle)) areaInstance = A @@ -227,6 +232,7 @@ #ifdef DOCKING_PORT_HIGHLIGHT highlight("#0f0") #endif + ..() /obj/docking_port/mobile/register() if(!shuttle_master) @@ -245,6 +251,9 @@ /obj/docking_port/mobile/Destroy() if(i_know_what_im_doing) shuttle_master.mobile -= src + areaInstance = null + destination = null + previous = null . = ..() //this is a hook for custom behaviour. Maybe at some point we could add checks to see if engines are intact diff --git a/paradise.dme b/paradise.dme index 98fd669a975..f87236a134d 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1046,7 +1046,6 @@ #include "code\modules\admin\verbs\pray.dm" #include "code\modules\admin\verbs\randomverbs.dm" #include "code\modules\admin\verbs\serialization.dm" -#include "code\modules\admin\verbs\shuttles.dm" #include "code\modules\admin\verbs\space_transitions.dm" #include "code\modules\admin\verbs\striketeam.dm" #include "code\modules\admin\verbs\striketeam_syndicate.dm"