Gives admins the storyteller Narrate Panel. (#22551)

As per title

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2026-06-02 17:06:59 +00:00
committed by GitHub
co-authored by Matt Atlas
parent 8374bb3547
commit 667e8d3984
4 changed files with 79 additions and 11 deletions
+7
View File
@@ -1453,3 +1453,10 @@ var/global/enabled_spooking = 0
to_world(FONT_LARGE(EXAMINE_BLOCK_ODYSSEY(SPAN_NOTICE("The scenario canonicity has been changed to [SPAN_BOLD(canonicity)] by an administrator."))))
log_and_message_admins("has set the Odyssey canonicity to [canonicity]", usr)
feedback_add_details("admin_verb","SEOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/open_narrate_panel()
set category = "Special Verbs.Narration/Messaging"
set name = "Narrate Panel"
var/datum/tgui_module/narrate_panel/NP = new /datum/tgui_module/narrate_panel(usr)
NP.ui_interact(usr)
+3 -1
View File
@@ -106,7 +106,8 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
/client/proc/toggle_aooc,
/client/proc/force_away_mission,
/client/proc/alooc,
/client/proc/create_portal
/client/proc/create_portal,
/datum/admins/proc/open_narrate_panel
))
GLOBAL_LIST_INIT(admin_verbs_ban, list(
@@ -430,6 +431,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
/client/proc/force_away_mission,
/client/proc/profiler_start,
/client/proc/create_portal,
/datum/admins/proc/open_narrate_panel
))
GLOBAL_LIST_INIT(admin_verbs_mod, list(
+11 -10
View File
@@ -16,49 +16,50 @@
if(.)
return
var/mob/abstract/ghost/ghost = ui.user
if(!istype(ghost))
var/mob/abstract/ghost/narrate_user = ui.user
var/is_admin = check_rights(R_ADMIN, user = ui.user)
if(!istype(narrate_user) && !is_admin)
return FALSE
if(action == "narrate")
var/narrate_text = sanitizeSafe(params["narrate_text"])
if(!length(narrate_text))
to_chat(ghost, SPAN_WARNING("No text was supplied!"))
to_chat(narrate_user, SPAN_WARNING("No text was supplied!"))
return FALSE
var/narrate_style = params["narrate_style"]
if(!narrate_style)
to_chat(ghost, SPAN_WARNING("No text style was supplied!"))
to_chat(narrate_user, SPAN_WARNING("No text style was supplied!"))
return FALSE
var/narrate_size = text2num(params["narrate_size"])
if(!isnum(narrate_size))
to_chat(ghost, SPAN_WARNING("No text size was supplied!"))
to_chat(narrate_user, SPAN_WARNING("No text size was supplied!"))
return FALSE
var/narrate_range = text2num(params["narrate_range"])
if(!isnum(narrate_range))
to_chat(ghost, SPAN_WARNING("No narrate range was supplied!"))
to_chat(narrate_user, SPAN_WARNING("No narrate range was supplied!"))
return FALSE
var/narrate_location = params["narrate_location"]
if(!narrate_location)
to_chat(ghost, SPAN_WARNING("No narrate location was supplied!"))
to_chat(narrate_user, SPAN_WARNING("No narrate location was supplied!"))
return FALSE
var/list/mobs_to_message = list()
switch(narrate_location)
if("View")
for(var/mob/M in get_hearers_in_view(narrate_range, ghost))
for(var/mob/M in get_hearers_in_view(narrate_range, narrate_user))
mobs_to_message |= M
if("Range")
for(var/mob/M in get_hearers_in_range(narrate_range, ghost))
for(var/mob/M in get_hearers_in_range(narrate_range, narrate_user))
mobs_to_message |= M
if("Z-Level")
for(var/mob/M in GLOB.player_list)
if(GET_Z(M) == ghost.z)
if(GET_Z(M) == narrate_user.z)
mobs_to_message |= M
if("Global")