Added a list that tracks changes to AI/cyborg laws, similar to the list that tracks signaler use

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@890 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2011-01-18 01:37:20 +00:00
parent 298be18fc2
commit 0821ff0773
5 changed files with 20 additions and 0 deletions

View File

@@ -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( )

View File

@@ -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] <B>:</B> [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 ********************/
/*

View File

@@ -1255,6 +1255,11 @@ var/showadminmessages = 1
for(var/sig in lastsignalers)
dat += "[sig]<BR>"
usr << browse(dat, "window=lastsignalers;size=800x500")
if("list_lawchanges")
var/dat = "<B>Showing last [length(lawchanges)] law changes.</B><HR>"
for(var/sig in lawchanges)
dat += "[sig]<BR>"
usr << browse(dat, "window=lawchanges;size=800x500")
if("check_antagonist")
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
@@ -1611,6 +1616,7 @@ var/showadminmessages = 1
<A href='?src=\ref[src];secretsadmin=list_bombers'>Bombing List</A><BR>
<A href='?src=\ref[src];secretsadmin=check_antagonist'>Show current traitors and objectives</A><BR>
<A href='?src=\ref[src];secretsadmin=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
<A href='?src=\ref[src];secretsadmin=list_lawchanges'>Show last [length(lawchanges)] law changes</A><BR>
<A href='?src=\ref[src];secretsadmin=showailaws'>Show AI Laws</A><BR>
<A href='?src=\ref[src];secretsadmin=showgm'>Show Game Mode</A><BR>
<A href='?src=\ref[src];secretsadmin=manifest'>Show Crew Manifest</A><BR>

View File

@@ -109,6 +109,8 @@
if (!checktraitor(src))
src.set_zeroth_law("")
src.clear_supplied_laws()
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <b>:</b> [src.name]'s noncore laws have been reset due to power failure")
spawn(50)
while ((src:aiRestorePowerRoutine!=0) && stat!=2)
src.oxyloss += 2

View File

@@ -438,6 +438,8 @@
clear_supplied_laws()
clear_inherent_laws()
src.laws = new /datum/ai_laws/syndicate_override
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [src.name]([src.key])")
set_zeroth_law("Only [usr] is a syndicate operative.")
src << "\red ALERT: Foreign software detected."
sleep(5)