[MIRROR] moves law outputs to a block (#11706)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-19 15:48:39 -07:00
committed by GitHub
parent 9efbeb86af
commit 19006d64ac
13 changed files with 51 additions and 54 deletions

View File

@@ -577,13 +577,11 @@
target.lawsync()
return TRUE
if("notify_laws")
to_chat(target, span_danger("Law Notice"))
target.laws.show_laws(target)
to_chat(target, span_danger("Law Notice\n") + target.laws.get_formatted_laws())
if(isAI(target))
var/mob/living/silicon/ai/our_ai = target
for(var/mob/living/silicon/robot/R in our_ai.connected_robots)
to_chat(R, span_danger("Law Notice"))
R.laws.show_laws(R)
to_chat(R, span_danger("Law Notice\n") + R.laws.get_formatted_laws())
if(ui.user != target)
to_chat(ui.user, span_notice("Laws displayed."))
return TRUE
@@ -613,7 +611,7 @@
target.clear_supplied_laws()
target.clear_inherent_laws()
target.laws = new global.using_map.default_law_type
target.laws.show_laws(target)
to_chat(target, span_danger("Laws updated!\n") + target.laws.get_formatted_laws())
target.hud_used?.update_robot_modules_display()
else
target.emagged = 1
@@ -625,7 +623,7 @@
if(target.bolt)
if(!target.bolt.malfunction)
target.bolt.malfunction = MALFUNCTION_PERMANENT
target.laws.show_laws(target)
to_chat(target, span_danger("Laws updated!\n") + target.laws.get_formatted_laws())
target.hud_used?.update_robot_modules_display()
return TRUE

View File

@@ -101,40 +101,29 @@
else
if(!recipient)
if(holder)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: Client not found."))
if(msg)
to_chat(src, msg)
else
current_ticket.MessageNoRecipient(msg)
return
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = tgui_input_text(src, "Message:", "Private message to [key_name(recipient, 0, 0)]", multiline = TRUE, encode = FALSE)
//clean the message if it's not sent by a high-rank admin
if(!check_rights(R_SERVER|R_DEBUG, FALSE)||irc)//no sending html to the poor bots
msg = trim(sanitize(copytext(msg,1,MAX_MESSAGE_LEN)))
if(!msg)
return
if(prefs.muted & MUTE_ADMINHELP)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: You are unable to use admin PM-s (muted)."))
return
if (src.handle_spam_prevention(MUTE_ADMINHELP))
return
if(!recipient)
if(holder)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: Client not found."))
else
current_ticket.MessageNoRecipient(msg)
return
if(prefs.muted & MUTE_ADMINHELP)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: You are unable to use admin PM-s (muted)."))
return
if (src.handle_spam_prevention(MUTE_ADMINHELP))
return
//clean the message if it's not sent by a high-rank admin
if(!check_rights(R_SERVER|R_DEBUG, FALSE)||irc)//no sending html to the poor bots
msg = trim(sanitize(copytext(msg,1,MAX_MESSAGE_LEN)))
if(!msg)
if(!recipient)
if(holder)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: Client not found."))
to_chat(src, msg)
else
current_ticket.MessageNoRecipient(msg)
return
var/rawmsg = msg