diff --git a/code/modules/admin/verbs/antag-ooc.dm b/code/modules/admin/verbs/antag-ooc.dm index af9d69c40c7..f8251796ff8 100644 --- a/code/modules/admin/verbs/antag-ooc.dm +++ b/code/modules/admin/verbs/antag-ooc.dm @@ -28,3 +28,12 @@ M << "" + create_text_tag("aooc", "Antag-OOC:", M.client) + " [display_name]: [msg]" log_ooc("(ANTAG) [key] : [msg]") + +// Checks if a newly joined player is an antag, and adds the AOOC verb if they are. +// Because they're tied to client objects, this gets removed every time you disconnect. +/client/proc/add_aooc_if_necessary() + if (!src.mob || !src.mob.mind) + return + + if (player_is_antag(src.mob.mind)) + src.verbs += /client/proc/aooc diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 45d3a861ee9..033b910149c 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -284,6 +284,9 @@ if (outdated_greeting_info) server_greeting.display_to_client(src, outdated_greeting_info) + // Check code/modules/admin/verbs/antag-ooc.dm for definition + add_aooc_if_necessary() + ////////////// //DISCONNECT// ////////////// diff --git a/html/changelogs/skull132-aooc_fix.yml b/html/changelogs/skull132-aooc_fix.yml new file mode 100644 index 00000000000..d4cfce77b7e --- /dev/null +++ b/html/changelogs/skull132-aooc_fix.yml @@ -0,0 +1,12 @@ +author: Skull132 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixed a bug where A-OOC was removed from antagonists upon a disconnect. It's now added back in during a reconnect."