From 2d6b011a1326e4cf595b0a18762f032a3d30dfc2 Mon Sep 17 00:00:00 2001
From: Skies-Of-Blue <86762641+Skies-Of-Blue@users.noreply.github.com>
Date: Mon, 11 Mar 2024 19:20:03 -0700
Subject: [PATCH] pAI Update: NO GODS NO KINGS NO MASTERS & A Couple Radio
Fixes (#2806)
## About The Pull Request
Ports:
- https://github.com/BeeStation/BeeStation-Hornet/pull/4990
- https://github.com/tgstation/tgstation/pull/55215
- https://github.com/tgstation/tgstation/pull/57033
## Why It's Good For The Game
pAIs are in a weird space of being the only positronic in-setting who
MUST bound to a master by law. That doesn't really gel with the rest of
our lore. Giving installers the ability to remove that Master-Servant
relationship would be nice I think, especially considering pAIs tend to
ignore it anyways.
Also bugs are bad, okay?
## Changelog
:cl:
add: a pAI's master can now clear the pAI's zeroth law
fix: pAIs are now able to fully utilize installed encryption keys
through their integrated transceiver's menu when they have the
encryption key software upgrade
fix: binary encryption keys work in pAIs that have downloaded the
encryption key software
/:cl:
---
code/game/objects/items/devices/paicard.dm | 12 +++++++++++-
code/game/objects/items/devices/radio/headset.dm | 2 --
code/modules/mob/living/silicon/pai/pai_say.dm | 2 +-
code/modules/mob/living/silicon/pai/software.dm | 1 +
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index 41a8f59509a5..dd6a19548afd 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -30,7 +30,11 @@
if(pai)
if(!pai.master_dna || !pai.master)
dat += "Imprint Master DNA
"
- dat += "Installed Personality: [pai.name]
"
+ dat += "Prime directive:
"
+ if(pai.laws.zeroth)
+ dat +="[pai.laws.zeroth]
"
+ else
+ dat +="None
"
dat += "Prime directive:
[pai.laws.zeroth]
"
for(var/slaws in pai.laws.supplied)
dat += "Additional directives:
[slaws]
"
@@ -48,6 +52,7 @@
var/mob/living/carbon/human/H = user
if(H.real_name == pai.master || H.dna.unique_enzymes == pai.master_dna)
dat += "\[[pai.canholo? "Disable" : "Enable"] holomatrix projectors\]
"
+ dat += "\[Remove Prime directive\]
"
dat += "\[Reset speech synthesis module\]
"
dat += "\[Wipe current pAI personality\]
"
else
@@ -79,6 +84,7 @@
pai.master = M.real_name
pai.master_dna = M.dna.unique_enzymes
to_chat(pai, "You have been bound to a new master.")
+ pai.laws.set_zeroth_law("Serve your master.")
pai.emittersemicd = FALSE
if(href_list["wipe"])
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
@@ -89,6 +95,10 @@
to_chat(pai, "Your mental faculties leave you.")
to_chat(pai, "oblivion... ")
qdel(pai)
+ if(href_list["clear_zero"])
+ if((input("Are you CERTAIN you wish to remove this pAI's Prime directive? This action cannot be undone.", "Clear Directive") in list("Yes", "No")) == "Yes")
+ if(pai)
+ pai.laws.clear_zeroth_law()
if(href_list["fix_speech"])
pai.stuttering = 0
pai.slurring = 0
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index 07968246a5ae..574dd88e5cc4 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -335,8 +335,6 @@ GLOBAL_LIST_INIT(channel_tokens, list(
/obj/item/radio/headset/silicon/pai
name = "\proper mini Integrated Subspace Transceiver "
- subspace_transmission = FALSE
-
/obj/item/radio/headset/silicon/ai
name = "\proper Integrated Subspace Transceiver "
diff --git a/code/modules/mob/living/silicon/pai/pai_say.dm b/code/modules/mob/living/silicon/pai/pai_say.dm
index b44d2cd0870c..cb12258317ba 100644
--- a/code/modules/mob/living/silicon/pai/pai_say.dm
+++ b/code/modules/mob/living/silicon/pai/pai_say.dm
@@ -5,4 +5,4 @@
..(message)
/mob/living/silicon/pai/binarycheck()
- return 0
+ return radio?.translate_binary
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index 08e41f3bee44..061c4a74a4b1 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -355,6 +355,7 @@ GLOBAL_LIST_INIT(pai_faces_icons, list(
if("encryptionkeys")
if(href_list["toggle"])
encryptmod = TRUE
+ radio.subspace_transmission = TRUE
if("translator")
if(href_list["toggle"]) //This is permanent.