mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Fixes Stacking with the Check AI Laws verb (#27497)
This commit is contained in:
@@ -795,30 +795,34 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
var/ai_number = 0
|
||||
var/list/messages = list()
|
||||
for(var/mob/living/silicon/S in GLOB.mob_list)
|
||||
if(istype(S, /mob/living/silicon/decoy) && !S.client)
|
||||
continue
|
||||
ai_number++
|
||||
if(isAI(S))
|
||||
to_chat(usr, "<b>AI [key_name(S, TRUE)]'s laws:</b>")
|
||||
messages += "<b>AI [key_name(S, TRUE)]'s laws:</b>"
|
||||
else if(isrobot(S))
|
||||
var/mob/living/silicon/robot/R = S
|
||||
to_chat(usr, "<b>CYBORG [key_name(S, TRUE)]'s [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independent)"] laws:</b>")
|
||||
messages += "<b>CYBORG [key_name(S, TRUE)]'s [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independent)"] laws:</b>"
|
||||
else if(ispAI(S))
|
||||
var/mob/living/silicon/pai/P = S
|
||||
to_chat(usr, "<b>pAI [key_name(S, TRUE)]'s laws:</b>")
|
||||
to_chat(usr, "[P.pai_law0]")
|
||||
messages += "<b>pAI [key_name(S, TRUE)]'s laws:</b>"
|
||||
messages += "[P.pai_law0]"
|
||||
if(P.pai_laws)
|
||||
to_chat(usr, "[P.pai_laws]")
|
||||
messages += "[P.pai_laws]"
|
||||
continue // Skip showing normal silicon laws for pAIs - they don't have any
|
||||
else
|
||||
to_chat(usr, "<b>SILICON [key_name(S, TRUE)]'s laws:</b>")
|
||||
messages += "<b>SILICON [key_name(S, TRUE)]'s laws:</b>"
|
||||
|
||||
if(S.laws == null)
|
||||
to_chat(usr, "[key_name(S, TRUE)]'s laws are null. Contact a coder.")
|
||||
messages += "[key_name(S, TRUE)]'s laws are null. Contact a coder."
|
||||
else
|
||||
S.laws.show_laws(usr)
|
||||
messages += S.laws.return_laws_text()
|
||||
if(!ai_number)
|
||||
to_chat(usr, "<b>No AI's located.</b>")//Just so you know the thing is actually working and not just ignoring you.
|
||||
messages += "<b>No AI's located.</b>" //Just so you know the thing is actually working and not just ignoring you.
|
||||
|
||||
to_chat(usr, chat_box_examine(messages.Join("\n")))
|
||||
|
||||
log_admin("[key_name(usr)] checked the AI laws")
|
||||
message_admins("[key_name_admin(usr)] checked the AI laws")
|
||||
|
||||
Reference in New Issue
Block a user