mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 11:07:46 +01:00
One Crew Member
This commit is contained in:
@@ -25,51 +25,51 @@ AI MODULES
|
||||
if (istype(AM, /obj/machinery/computer/aiupload))
|
||||
var/obj/machinery/computer/aiupload/comp = AM
|
||||
if(comp.stat & NOPOWER)
|
||||
usr << "The upload computer has no power!"
|
||||
to_chat(usr, "The upload computer has no power!")
|
||||
return
|
||||
if(comp.stat & BROKEN)
|
||||
usr << "The upload computer is broken!"
|
||||
to_chat(usr, "The upload computer is broken!")
|
||||
return
|
||||
if (!comp.current)
|
||||
usr << "You haven't selected an AI to transmit laws to!"
|
||||
to_chat(usr, "You haven't selected an AI to transmit laws to!")
|
||||
return
|
||||
|
||||
if (comp.current.stat == 2 || comp.current.control_disabled == 1)
|
||||
usr << "Upload failed. No signal is being detected from the AI."
|
||||
to_chat(usr, "Upload failed. No signal is being detected from the AI.")
|
||||
else if (comp.current.see_in_dark == 0)
|
||||
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
|
||||
to_chat(usr, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.")
|
||||
else
|
||||
src.transmitInstructions(comp.current, usr)
|
||||
comp.current << "These are your laws now:"
|
||||
to_chat(comp.current, "These are your laws now:")
|
||||
comp.current.show_laws()
|
||||
for(var/mob/living/silicon/robot/R in mob_list)
|
||||
if(R.lawupdate && (R.connected_ai == comp.current))
|
||||
R << "These are your laws now:"
|
||||
to_chat(R, "These are your laws now:")
|
||||
R.show_laws()
|
||||
usr << "Upload complete. The AI's laws have been modified."
|
||||
to_chat(usr, "Upload complete. The AI's laws have been modified.")
|
||||
|
||||
|
||||
else if (istype(AM, /obj/machinery/computer/borgupload))
|
||||
var/obj/machinery/computer/borgupload/comp = AM
|
||||
if(comp.stat & NOPOWER)
|
||||
usr << "The upload computer has no power!"
|
||||
to_chat(usr, "The upload computer has no power!")
|
||||
return
|
||||
if(comp.stat & BROKEN)
|
||||
usr << "The upload computer is broken!"
|
||||
to_chat(usr, "The upload computer is broken!")
|
||||
return
|
||||
if (!comp.current)
|
||||
usr << "You haven't selected a robot to transmit laws to!"
|
||||
to_chat(usr, "You haven't selected a robot to transmit laws to!")
|
||||
return
|
||||
|
||||
if (comp.current.stat == 2 || comp.current.emagged)
|
||||
usr << "Upload failed. No signal is being detected from the robot."
|
||||
to_chat(usr, "Upload failed. No signal is being detected from the robot.")
|
||||
else if (comp.current.connected_ai)
|
||||
usr << "Upload failed. The robot is slaved to an AI."
|
||||
to_chat(usr, "Upload failed. The robot is slaved to an AI.")
|
||||
else
|
||||
src.transmitInstructions(comp.current, usr)
|
||||
comp.current << "These are your laws now:"
|
||||
to_chat(comp.current, "These are your laws now:")
|
||||
comp.current.show_laws()
|
||||
usr << "Upload complete. The robot's laws have been modified."
|
||||
to_chat(usr, "Upload complete. The robot's laws have been modified.")
|
||||
|
||||
else if(istype(AM, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = AM
|
||||
@@ -104,7 +104,7 @@ AI MODULES
|
||||
laws.sync(target, 0)
|
||||
addAdditionalLaws(target, sender)
|
||||
|
||||
target << "\The [sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: "
|
||||
to_chat(target, "\The [sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: ")
|
||||
target.show_laws()
|
||||
|
||||
/obj/item/weapon/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
@@ -133,7 +133,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/safeguard/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!targetName)
|
||||
usr << "No name detected on module, please enter one."
|
||||
to_chat(usr, "No name detected on module, please enter one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
@@ -159,18 +159,14 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/oneHuman/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!targetName)
|
||||
usr << "No name detected on module, please enter one."
|
||||
to_chat(usr, "No name detected on module, please enter one.")
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/aiModule/oneHuman/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
var/law = "Only [targetName] is an crew member."
|
||||
if (!target.is_malf_or_traitor()) // 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
|
||||
lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overriden.")
|
||||
to_chat(target, law)
|
||||
target.add_supplied_law(16, law)
|
||||
|
||||
/******************** ProtectStation ********************/
|
||||
|
||||
@@ -255,7 +251,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/freeform/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!newFreeFormLaw)
|
||||
usr << "No law detected on module, please create one."
|
||||
to_chat(usr, "No law detected on module, please create one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
@@ -275,7 +271,7 @@ AI MODULES
|
||||
target.laws.clear_supplied_laws()
|
||||
target.laws.clear_ion_laws()
|
||||
|
||||
target << "[sender.real_name] attempted to reset your laws using a reset module."
|
||||
to_chat(target, "[sender.real_name] attempted to reset your laws using a reset module.")
|
||||
target.show_laws()
|
||||
|
||||
/******************** Purge ********************/
|
||||
@@ -294,7 +290,7 @@ AI MODULES
|
||||
target.laws.clear_ion_laws()
|
||||
target.laws.clear_inherent_laws()
|
||||
|
||||
target << "[sender.real_name] attempted to wipe your laws using a purge module."
|
||||
to_chat(target, "[sender.real_name] attempted to wipe your laws using a purge module.")
|
||||
target.show_laws()
|
||||
|
||||
/******************** Asimov ********************/
|
||||
@@ -366,7 +362,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/freeformcore/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!newFreeFormLaw)
|
||||
usr << "No law detected on module, please create one."
|
||||
to_chat(usr, "No law detected on module, please create one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
@@ -388,14 +384,14 @@ AI MODULES
|
||||
log_law_changes(target, sender)
|
||||
|
||||
lawchanges.Add("The law is '[newFreeFormLaw]'")
|
||||
target << "<span class='danger'>BZZZZT</span>"
|
||||
to_chat(target, "<span class='danger'>BZZZZT</span>")
|
||||
var/law = "[newFreeFormLaw]"
|
||||
target.add_ion_law(law)
|
||||
target.show_laws()
|
||||
|
||||
/obj/item/weapon/aiModule/syndicate/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!newFreeFormLaw)
|
||||
usr << "No law detected on module, please create one."
|
||||
to_chat(usr, "No law detected on module, please create one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user