Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds quick "Command Announcement" button for Game Masters #355

Merged
merged 4 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ var/list/roundstart_mod_verbs = list(
add_verb(src, /client/proc/open_resin_panel)
add_verb(src, /client/proc/open_sound_panel)
add_verb(src, /client/proc/toggle_join_xeno)
add_verb(src, /client/proc/admin_marine_announcement)
add_verb(src, /client/proc/game_master_rename_platoon)
add_verb(src, /client/proc/toggle_vehicle_blockers)
add_verb(src, /client/proc/toggle_ai_xeno_weeding)
Expand Down
16 changes: 16 additions & 0 deletions code/modules/admin/game_master/extra_buttons/marine_announce.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/client/proc/admin_marine_announcement()
set name = "Command Announcement"
set category = "Game Master.Extras"

if(!check_rights(R_ADMIN))
return

var/body = tgui_input_text(src, "Enter the body text for the announcement.", title = "Announcement Body", multiline = TRUE, encode = FALSE)
if(!body)
return
var/title = tgui_input_text(src, "Enter the title of the announcement. Leave blank for the default title.", title = "Announcement Title")
if(!title)
title = COMMAND_ANNOUNCE
marine_announcement(body, "[title]")
message_admins("[key_name_admin(src)] has made an admin command announcement.")
log_admin("[key_name_admin(src)] made an admin command announcement: [body]")
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,7 @@
#include "code\modules\admin\game_master\resin_panel.dm"
#include "code\modules\admin\game_master\sound_panel.dm"
#include "code\modules\admin\game_master\extra_buttons\fire_support_menu.dm"
#include "code\modules\admin\game_master\extra_buttons\marine_announce.dm"
#include "code\modules\admin\game_master\extra_buttons\rappel_menu.dm"
#include "code\modules\admin\game_master\extra_buttons\rename_platoon.dm"
#include "code\modules\admin\game_master\extra_buttons\toggle_ai_xeno_weeding.dm"
Expand Down
Loading