mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Changes the silicon is_malf/is_traitor procs to utilize the new antag datums.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 ********************/
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user