Changes the silicon is_malf/is_traitor procs to utilize the new antag datums.

This commit is contained in:
PsiOmega
2015-03-22 17:43:20 +01:00
parent 59ec34e410
commit e0538df294
5 changed files with 18 additions and 13 deletions

View File

@@ -92,7 +92,7 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
/mob/living/silicon/proc/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
if (!is_special_character(src) || mind.original != src)
if (!is_malf_or_traitor(src))
if(zeroth_law_borg)
laws.set_zeroth_law(zeroth_law_borg.law)
else if(zeroth_law)

View File

@@ -142,6 +142,12 @@ AI MODULES
return 0
..()
/obj/item/weapon/aiModule/oneHuman/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Only [targetName] is an employee."
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]"
/obj/item/weapon/aiModule/oneHuman/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Only [targetName] is an employee."
if (!target.is_malf_or_traitor()) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
@@ -149,8 +155,6 @@ AI MODULES
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 ********************/

View File

@@ -310,13 +310,6 @@ var/list/ai_verbs_default = list(
//usr <<"You can only change your display once!"
//return
/mob/living/silicon/ai/proc/is_malf()
if(ticker.mode.name == "AI malfunction")
for (var/datum/mind/malfai in malf.current_antagonists)
if (mind == malfai)
return malf
return 0
// displays the malf_ai information if the AI is the malf
/mob/living/silicon/ai/show_malf_ai()
if(malf && malf.hacked_apcs.len >= 3)

View File

@@ -333,3 +333,14 @@
for(var/obj/machinery/camera/C in A.cameras())
cameratext += "[(cameratext == "")? "" : "|"]<A HREF=?src=\ref[src];switchcamera=\ref[C]>[C.c_tag]</A>"
src << "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])"
/mob/living/silicon/proc/is_traitor()
return mind && (mind in traitors.current_antagonists)
/mob/living/silicon/proc/is_malf()
return mind && (mind in malf.current_antagonists)
/mob/living/silicon/proc/is_malf_or_traitor()
return is_traitor() || is_malf()

View File

@@ -216,9 +216,6 @@
/obj/nano_module/law_manager/proc/is_malf(var/mob/user)
return (is_admin(user) && !owner.is_slaved()) || owner.is_malf_or_traitor()
/mob/living/silicon/proc/is_malf_or_traitor()
return mind && (mind.special_role == "malfunction" || mind.special_role == "traitor")
/mob/living/silicon/proc/is_ai_malf()
return 0