From 26448d7016530702c3b3911b29aa103c1abec936 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sun, 21 May 2017 07:57:17 -0500 Subject: [PATCH] Removes the mess added with recalling with a message --- code/__HELPERS/unsorted.dm | 2 +- code/__HELPERS/unsorted.dm.rej | 29 ++++++++++++++++ code/_globalvars/lists/flavor_misc.dm.rej | 8 +++++ code/controllers/subsystem/shuttle.dm.rej | 42 +++++++++++++++++++++++ code/modules/admin/topic.dm.rej | 10 ++++++ code/modules/admin/verbs/randomverbs.dm | 13 +++++++ 6 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 code/__HELPERS/unsorted.dm.rej create mode 100644 code/_globalvars/lists/flavor_misc.dm.rej create mode 100644 code/controllers/subsystem/shuttle.dm.rej create mode 100644 code/modules/admin/topic.dm.rej diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index f35a6eaa15..10ee2dfb0c 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -723,7 +723,7 @@ Turf and target are seperate in case you want to teleport some distance from a t //Irregular objects var/icon/AMicon = icon(AM.icon, AM.icon_state) var/icon/AMiconheight = AMicon.Height() - var/icon/AMiconwidth = AMicon.Width() + var/icon/AMiconwidth = AMicon.Width() if(AMiconheight != world.icon_size || AMiconwidth != world.icon_size) pixel_x_offset += ((AMicon.Width()/world.icon_size)-1)*(world.icon_size*0.5) pixel_y_offset += ((AMicon.Height()/world.icon_size)-1)*(world.icon_size*0.5) diff --git a/code/__HELPERS/unsorted.dm.rej b/code/__HELPERS/unsorted.dm.rej new file mode 100644 index 0000000000..fe515ad2d7 --- /dev/null +++ b/code/__HELPERS/unsorted.dm.rej @@ -0,0 +1,29 @@ +diff a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm (rejected hunks) +@@ -1415,25 +1415,4 @@ GLOBAL_PROTECT(valid_HTTPSGet) + var/obj/item/organ/brain/brain = occupant + mob_occupant = brain.brainmob + +- return mob_occupant +- +-/proc/msglog_admins(text) +- message_admins(text) +- log_admin(text) +- +-/proc/trigger_centcom_recall() +- if(SSshuttle.emergency.mode != SHUTTLE_CALL) +- return +- +- var/time = rand(600, 1200) +- var/message = pick(GLOB.annoyed_admiral_messages) +- +- message = input("Enter message from the on-call admiral to be put in the recall report.", "Annoyed Admiral Message", message) as text|null +- +- if(!message) +- return +- +- message_admins("[key_name_admin(usr)] triggered a Centcom recall in [time/10] seconds, with the annoyed admiral message of: [message]") +- log_game("[key_name(usr)] triggered a Centcom recall in [time/10] seconds, with the annoyed admiral message of: [message]") +- +- addtimer(CALLBACK(SSshuttle, /datum/controller/subsystem/shuttle/.proc/centcom_recall, SSshuttle.emergency.timer, message), time) ++ return mob_occupant +\ No newline at end of file diff --git a/code/_globalvars/lists/flavor_misc.dm.rej b/code/_globalvars/lists/flavor_misc.dm.rej new file mode 100644 index 0000000000..8782e4a8d6 --- /dev/null +++ b/code/_globalvars/lists/flavor_misc.dm.rej @@ -0,0 +1,8 @@ +diff a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm (rejected hunks) +@@ -162,4 +162,4 @@ GLOBAL_LIST_INIT(numbers_as_words, list("One", "Two", "Three", "Four", + + GLOBAL_LIST_INIT(station_numerals, greek_letters + phonetic_alphabet + numbers_as_words + generate_number_strings()) + +-GLOBAL_LIST_INIT(annoyed_admiral_messages, list("Do you know how expensive these stations are?","Stop wasting my time.","I was sleeping, thanks a lot.","Stand and fight you cowards!","You knew the risks coming in.","Stop being paranoid.","Whatever's broken just build a new one.","No.", "null","Error: No comment given.", "It's a good day to die!")) ++GLOBAL_LIST_INIT(admiral_messages, list("Do you know how expensive these stations are?","Stop wasting my time.","I was sleeping, thanks a lot.","Stand and fight you cowards!","You knew the risks coming in.","Stop being paranoid.","Whatever's broken just build a new one.","No.", "null","Error: No comment given.", "It's a good day to die!")) +\ No newline at end of file diff --git a/code/controllers/subsystem/shuttle.dm.rej b/code/controllers/subsystem/shuttle.dm.rej new file mode 100644 index 0000000000..131ec0c7e2 --- /dev/null +++ b/code/controllers/subsystem/shuttle.dm.rej @@ -0,0 +1,42 @@ +diff a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm (rejected hunks) +@@ -217,30 +217,25 @@ SUBSYSTEM_DEF(shuttle) + log_game("[key_name(user)] has called the shuttle.") + message_admins("[key_name_admin(user)] has called the shuttle. (TRIGGER CENTCOM RECALL)") + +-/datum/controller/subsystem/shuttle/proc/centcom_recall(old_timer, annoyed_admiral_message) ++/datum/controller/subsystem/shuttle/proc/centcom_recall(old_timer, admiral_message) + if(emergency.mode != SHUTTLE_CALL || emergency.timer != old_timer) + return +- + emergency.cancel(/area/centcom) +- msglog_admins("Shuttle has been recalled from Centcom.") +- +- addtimer(CALLBACK(src, .proc/centcom_recall2, annoyed_admiral_message), 50) + +-/datum/controller/subsystem/shuttle/proc/centcom_recall2(annoyed_admiral_message) +- if(!annoyed_admiral_message) +- annoyed_admiral_message = pick(GLOB.annoyed_admiral_messages) +- var/intercepttext = "NanoTrasen Update: Request For Shuttle.
\ +- To whom it may concern:

\ ++ if(!admiral_message) ++ admiral_message = pick(GLOB.admiral_messages) ++ var/intercepttext = "NanoTrasen Update: Request For Shuttle.
\ ++ To whom it may concern:

\ + We have taken note of the situation upon [station_name()] and have come to the \ +- conclusion that it does not warrant the abandonment of the station.
\ ++ conclusion that it does not warrant the abandonment of the station.
\ + If you do not agree with our opinion we suggest that you open a direct \ +- line with us and explain the nature of your crisis.

\ ++ line with us and explain the nature of your crisis.

\ + This message has been automatically generated based upon readings from long \ + range diagnostic tools. To assure the quality of your request every finalized report \ +- is reviewed by an on-call rear admiral.
\ ++ is reviewed by an on-call rear admiral.
\ + Rear Admiral's Notes: \ +- [annoyed_admiral_message]" +- print_command_report(intercepttext, announce=TRUE) ++ [admiral_message]" ++ print_command_report(intercepttext, announce = TRUE) + + // Called when an emergency shuttle mobile docking port is + // destroyed, which will only happen with admin intervention diff --git a/code/modules/admin/topic.dm.rej b/code/modules/admin/topic.dm.rej new file mode 100644 index 0000000000..ea6bf81fab --- /dev/null +++ b/code/modules/admin/topic.dm.rej @@ -0,0 +1,10 @@ +diff a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm (rejected hunks) +@@ -285,7 +285,7 @@ + if(!check_rights(R_ADMIN)) + return + +- trigger_centcom_recall() ++ usr.client.trigger_centcom_recall() + + else if(href_list["toggle_continuous"]) + if(!check_rights(R_ADMIN)) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index b82d1f65e2..09dfcf4d69 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1194,3 +1194,16 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits message_admins(msg) admin_ticket_log(target, msg) log_admin("[key_name(usr)] punished [key_name(target)] with [punishment].") + + +/client/proc/trigger_centcom_recall() + if(!holder) + return + var/message = pick(GLOB.admiral_messages) + message = input("Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message) as text|null + + if(!message) + return + + message_admins("[key_name_admin(usr)] triggered a Centcom recall, with the admiral message of: [message]") + log_game("[key_name(usr)] triggered a Centcom recall, with the message of: [message]") \ No newline at end of file