diff --git a/code/game/objects/items/AI_modules/_AI_modules.dm b/code/game/objects/items/AI_modules/_AI_modules.dm index df9e5150da0..853bebe9db6 100644 --- a/code/game/objects/items/AI_modules/_AI_modules.dm +++ b/code/game/objects/items/AI_modules/_AI_modules.dm @@ -30,23 +30,29 @@ /obj/item/ai_module/examine(mob/user as mob) . = ..() - if(Adjacent(user)) - show_laws(user) + var/examine_laws = display_laws() + . += "\n" + examine_laws /obj/item/ai_module/attack_self(mob/user as mob) ..() - show_laws(user) + to_chat(user, examine_block(display_laws())) + +/// Returns a text display of the laws for the module. +/obj/item/ai_module/proc/display_laws() + // Used to assemble the laws to show to an examining user. + var/assembled_laws = "" + + if(laws.len) + assembled_laws += "Programmed Law[(laws.len > 1) ? "s" : ""]:
" + for(var/law in laws) + assembled_laws += "\"[law]\"
" + + return assembled_laws ///what this module should do if it is mapload spawning on a unique AI station trait round. /obj/item/ai_module/proc/handle_unique_ai() return SHOULD_QDEL_MODULE //instead of the roundstart bid to un-unique the AI, there will be a research requirement for it. -/obj/item/ai_module/proc/show_laws(mob/user as mob) - if(laws.len) - to_chat(user, "Programmed Law[(laws.len > 1) ? "s" : ""]:") - for(var/law in laws) - to_chat(user, "\"[law]\"") - //The proc other things should be calling /obj/item/ai_module/proc/install(datum/ai_laws/law_datum, mob/user) if(!bypass_law_amt_check && (!laws.len || laws[1] == "")) //So we don't loop trough an empty list and end up with runtimes.