AI restoration console shows ion laws

AI restoration console now displays ion laws just as the intelliCard does.
Fixes a minor problem with the intelliCard not adding newlines after ion laws.
This commit is contained in:
PsiOmega
2014-09-19 17:52:25 +02:00
parent a35ff3e4e7
commit 03a293d226
2 changed files with 12 additions and 10 deletions

View File

@@ -38,18 +38,22 @@
var/laws var/laws
dat += "Stored AI: [src.occupant.name]<br>System integrity: [(src.occupant.health+100)/2]%<br>" dat += "Stored AI: [src.occupant.name]<br>System integrity: [(src.occupant.health+100)/2]%<br>"
for (var/law in occupant.laws.ion)
if(law)
laws += "[ionnum()]: [law]<BR>"
if (src.occupant.laws.zeroth) if (src.occupant.laws.zeroth)
laws += "0: [src.occupant.laws.zeroth]<BR>" laws += "0: [occupant.laws.zeroth]<BR>"
var/number = 1 var/number = 1
for (var/index = 1, index <= src.occupant.laws.inherent.len, index++) for (var/index = 1, index <= occupant.laws.inherent.len, index++)
var/law = src.occupant.laws.inherent[index] var/law = occupant.laws.inherent[index]
if (length(law) > 0) if (length(law) > 0)
laws += "[number]: [law]<BR>" laws += "[number]: [law]<BR>"
number++ number++
for (var/index = 1, index <= src.occupant.laws.supplied.len, index++) for (var/index = 1, index <= occupant.laws.supplied.len, index++)
var/law = src.occupant.laws.supplied[index] var/law = occupant.laws.supplied[index]
if (length(law) > 0) if (length(law) > 0)
laws += "[number]: [law]<BR>" laws += "[number]: [law]<BR>"
number++ number++

View File

@@ -37,11 +37,9 @@
for(var/mob/living/silicon/ai/A in src) for(var/mob/living/silicon/ai/A in src)
dat += "Stored AI: [A.name]<br>System integrity: [(A.health+100)/2]%<br>" dat += "Stored AI: [A.name]<br>System integrity: [(A.health+100)/2]%<br>"
for (var/index = 1, index <= A.laws.ion.len, index++) for (var/law in A.laws.ion)
var/law = A.laws.ion[index] if(law)
if (length(law) > 0) laws += "[ionnum()]: [law]<BR>"
var/num = ionnum()
laws += "[num]. [law]"
if (A.laws.zeroth) if (A.laws.zeroth)
laws += "0: [A.laws.zeroth]<BR>" laws += "0: [A.laws.zeroth]<BR>"