diff --git a/code/defines/global.dm b/code/defines/global.dm
index a2e3eef5ece..5e58dde1824 100644
--- a/code/defines/global.dm
+++ b/code/defines/global.dm
@@ -103,6 +103,7 @@ var
list/bombers = list( )
list/admin_log = list ( )
list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
+ list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
list/admins = list( )
list/shuttles = list( )
list/reg_dna = list( )
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index 92f350cc5a2..1779b08e19c 100644
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -114,6 +114,9 @@ AI MODULES
/obj/item/weapon/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
target << "[sender] has uploaded a change to the laws you must follow, using a [name]. From now on: "
+ var/time = time2text(world.realtime,"hh:mm:ss")
+ lawchanges.Add("[time] : [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
+
/******************** Modules ********************/
@@ -135,6 +138,8 @@ AI MODULES
var/law = text("Safeguard [], and you may overrule rules 1-3 if necessary to safeguard them.", targetName)
target << law
target.add_supplied_law(4, law)
+ lawchanges.Add("The law specified [targetName]")
+
/******************** OneHuman ********************/
@@ -156,9 +161,11 @@ AI MODULES
if (!checktraitor(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
target << law
target.set_zeroth_law(law)
+ lawchanges.Add("The law specified [targetName]")
else
target << "[sender.real_name] attempted to modify your zeroth law." // And lets them know that someone tried. --NeoFite
target << "It would be in your best interest to play along with [sender.real_name] that [law]"
+ lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overriden.")
/******************** ProtectStation ********************/
@@ -282,6 +289,7 @@ AI MODULES
if(!lawpos || lawpos < 15)
lawpos = 15
target.add_supplied_law(lawpos, law)
+ lawchanges.Add("The law was '[newFreeFormLaw]'")
/******************** Reset ********************/
@@ -380,6 +388,7 @@ AI MODULES
..()
var/law = "[newFreeFormLaw]"
target.add_inherent_law(law)
+ lawchanges.Add("The law is '[newFreeFormLaw]'")
/******************** Robocop ********************/
/*
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 6a03a8116ab..092c07fa692 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -1255,6 +1255,11 @@ var/showadminmessages = 1
for(var/sig in lastsignalers)
dat += "[sig]
"
usr << browse(dat, "window=lastsignalers;size=800x500")
+ if("list_lawchanges")
+ var/dat = "Showing last [length(lawchanges)] law changes.