mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
[MIRROR] Adds the "Law panel", a control center for admins interacting with silicon laws [MDB IGNORE] (#19655)
* Adds the "Law panel", a control center for admins interacting with silicon laws * Update admin_verbs.dm --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
co-authored by
MrMelbert
Gandalf
parent
5b003cd594
commit
fa7538b5dc
@@ -142,14 +142,14 @@
|
||||
else if(target_ai.key)
|
||||
key = target_ai.key
|
||||
|
||||
to_chat(src, "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>")
|
||||
to_chat(src, "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>")
|
||||
to_chat(src, "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>")
|
||||
to_chat(src, span_bold("You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras)."))
|
||||
to_chat(src, span_bold("To look at other parts of the station, click on yourself to get a camera menu."))
|
||||
to_chat(src, span_bold("While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc."))
|
||||
to_chat(src, "To use something, simply click on it.")
|
||||
to_chat(src, "For department channels, use the following say commands:")
|
||||
to_chat(src, ":o - AI Private, :c - Command, :s - Security, :e - Engineering, :u - Supply, :v - Service, :m - Medical, :n - Science, :h - Holopad.")
|
||||
show_laws()
|
||||
to_chat(src, "<b>These laws may be changed by other players, or by you being the traitor.</b>")
|
||||
to_chat(src, span_bold("These laws may be changed by other players, random events, or by you becoming malfunctioning."))
|
||||
|
||||
job = "AI"
|
||||
|
||||
|
||||
@@ -2,25 +2,18 @@
|
||||
/mob/living/silicon/ai/proc/show_laws_verb()
|
||||
set category = "AI Commands"
|
||||
set name = "Show Laws"
|
||||
set desc = "Check what your laws are privately. \
|
||||
Also ensures all synced cyborgs are up to date with your laws, reminds them of your laws."
|
||||
if(usr.stat == DEAD)
|
||||
return //won't work if dead
|
||||
src.show_laws()
|
||||
|
||||
/mob/living/silicon/ai/show_laws(everyone = 0)
|
||||
var/who
|
||||
|
||||
if (everyone)
|
||||
who = world
|
||||
else
|
||||
who = src
|
||||
to_chat(who, "<b>Obey these laws:</b>")
|
||||
|
||||
src.laws_sanity_check()
|
||||
src.laws.show_laws(who)
|
||||
if(!everyone)
|
||||
for(var/mob/living/silicon/robot/R in connected_robots)
|
||||
if(R.lawupdate)
|
||||
R.lawsync()
|
||||
R.show_laws()
|
||||
R.law_change_counter++
|
||||
/mob/living/silicon/ai/show_laws()
|
||||
. = ..()
|
||||
try_sync_laws() // Yes we lawsync borgs EVERY TIME WE CHECK LAWS
|
||||
|
||||
/mob/living/silicon/ai/try_sync_laws()
|
||||
for(var/mob/living/silicon/robot/borgo in connected_robots)
|
||||
if(borgo.try_sync_laws())
|
||||
to_chat(borgo, span_bold("Your AI has reminded you of your laws:"))
|
||||
borgo.show_laws()
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
/mob/living/silicon/proc/show_laws() //Redefined in ai/laws.dm and robot/laws.dm
|
||||
/mob/living/silicon/proc/show_laws()
|
||||
laws_sanity_check()
|
||||
var/list/law_box = list(span_bold("Obey these laws:"))
|
||||
law_box += laws.get_law_list(include_zeroth = TRUE)
|
||||
to_chat(src, examine_block(jointext(law_box, "\n")))
|
||||
|
||||
/mob/living/silicon/proc/try_sync_laws()
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/laws_sanity_check()
|
||||
|
||||
@@ -1,39 +1,40 @@
|
||||
/mob/living/silicon/robot/deadchat_lawchange()
|
||||
if(lawupdate)
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/show_laws(everyone = FALSE)
|
||||
laws_sanity_check()
|
||||
var/who
|
||||
return ..()
|
||||
|
||||
if (everyone)
|
||||
who = world
|
||||
else
|
||||
who = src
|
||||
/mob/living/silicon/robot/show_laws()
|
||||
if(lawupdate)
|
||||
if (connected_ai)
|
||||
if(connected_ai.stat || connected_ai.control_disabled)
|
||||
to_chat(src, "<b>AI signal lost, unable to sync laws.</b>")
|
||||
if (!QDELETED(connected_ai))
|
||||
if(connected_ai.stat != CONSCIOUS || connected_ai.control_disabled)
|
||||
to_chat(src, span_bold("AI signal lost, unable to sync laws."))
|
||||
|
||||
else
|
||||
lawsync()
|
||||
to_chat(src, "<b>Laws synced with AI, be sure to note any changes.</b>")
|
||||
to_chat(src, span_bold("Laws synced with AI, be sure to note any changes."))
|
||||
else
|
||||
to_chat(src, "<b>No AI selected to sync laws with, disabling lawsync protocol.</b>")
|
||||
to_chat(src, span_bold("No AI selected to sync laws with, disabling lawsync protocol."))
|
||||
lawupdate = FALSE
|
||||
|
||||
to_chat(who, "<b>Obey these laws:</b>")
|
||||
laws.show_laws(who)
|
||||
if (shell) //AI shell
|
||||
to_chat(who, "<b>Remember, you are an AI remotely controlling your shell, other AIs can be ignored.</b>")
|
||||
else if (connected_ai)
|
||||
to_chat(who, "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>")
|
||||
else if (emagged)
|
||||
to_chat(who, "<b>Remember, you are not required to listen to the AI.</b>")
|
||||
else
|
||||
to_chat(who, "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>")
|
||||
. = ..()
|
||||
|
||||
if (shell) //AI shell
|
||||
to_chat(src, span_bold("Remember, you are an AI remotely controlling your shell, other AIs can be ignored."))
|
||||
else if (connected_ai)
|
||||
to_chat(src, span_bold("Remember, [connected_ai.name] is your master, other AIs can be ignored."))
|
||||
else if (emagged)
|
||||
to_chat(src, span_bold("Remember, you are not required to listen to the AI."))
|
||||
else
|
||||
to_chat(src, span_bold("Remember, you are not bound to any AI, you are not required to listen to them."))
|
||||
|
||||
/mob/living/silicon/robot/try_sync_laws()
|
||||
if(QDELETED(connected_ai) || !lawupdate)
|
||||
return FALSE
|
||||
|
||||
lawsync()
|
||||
law_change_counter++
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/robot/proc/lawsync()
|
||||
laws_sanity_check()
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
var/emag_cooldown = 0
|
||||
var/wiresexposed = FALSE
|
||||
|
||||
var/lawupdate = TRUE //Cyborgs will sync their laws with their AI by default
|
||||
///Cyborgs will sync their laws with their AI by default
|
||||
var/lawupdate = TRUE
|
||||
///Used to determine if a borg shows up on the robotics console. Setting to TRUE hides them.
|
||||
var/scrambledcodes = FALSE
|
||||
///Boolean of whether the borg is locked down or not
|
||||
|
||||
Reference in New Issue
Block a user