Ghosts with antagHUD enabled can now see AI/borg laws on examine.

This commit is contained in:
PsiOmega
2015-03-17 07:44:56 +01:00
parent 7f68403ae4
commit 9d2ba41a3a
6 changed files with 24 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
/mob/living/silicon/ai/examine(mob/user)
if(!..(user))
return
var/msg = ""
if (src.stat == DEAD)
msg += "<span class='deadsay'>It appears to be powered-down.</span>\n"
@@ -23,5 +23,14 @@
msg += "</span>"
msg += "*---------*</span>"
usr << msg
return
user << msg
user.showLaws(src)
return
/mob/proc/showLaws(var/mob/living/silicon/S)
return
/mob/dead/observer/showLaws(var/mob/living/silicon/S)
if(antagHUD || is_admin(src))
S.laws.show_laws(src)

View File

@@ -39,4 +39,5 @@
msg += "\nIt is [pose]"
user << msg
user.showLaws(src)
return

View File

@@ -162,13 +162,12 @@
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
/mob/living/silicon/Stat()
..()
statpanel("Status")
if (src.client.statpanel == "Status")
if(statpanel("Status"))
show_station_time()
show_emergency_shuttle_eta()
show_system_integrity()
show_malf_ai()
..()
// this function displays the stations manifest in a separate window
/mob/living/silicon/proc/show_station_manifest()

View File

@@ -84,13 +84,13 @@
if(istype(A, /mob/living/silicon/ai))
return 1
return 0
/mob/proc/isAI()
return 0
/mob/living/silicon/ai/isAI()
return 1
/mob/proc/isRobot()
return 0
@@ -154,7 +154,7 @@ proc/hassensorlevel(A, var/level)
var/obj/item/clothing/under/U = H.w_uniform
return U.sensor_mode >= level
return 0
proc/getsensorlevel(A)
var/mob/living/carbon/human/H = A
if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under))
@@ -162,6 +162,11 @@ proc/getsensorlevel(A)
return U.sensor_mode
return SUIT_SENSOR_OFF
/proc/is_admin(var/mob/user)
return check_rights(R_ADMIN, 0, user) != 0
/proc/hsl2rgb(h, s, l)
return //TODO: Implement

View File

@@ -222,7 +222,7 @@
return law_sets
/obj/nano_module/law_manager/proc/is_malf(var/mob/user)
return is_admin(user) || (owner.isAI() && owner.mind.special_role == "malfunction")
return is_admin(user) || (owner.mind && (owner.mind.special_role == "malfunction" || owner.mind.special_role == "traitor"))
/obj/nano_module/law_manager/proc/is_slaved()
if(owner.isRobot())

View File

@@ -1,5 +1,2 @@
/obj/nano_module/proc/can_still_topic()
return CanUseTopic(usr, list(), default_state) == STATUS_INTERACTIVE
/obj/nano_module/proc/is_admin(var/mob/user)
return check_rights(R_ADMIN, 0, user) != 0