Skip to content

Commit

Permalink
pAI Update: NO GODS NO KINGS NO MASTERS & A Couple Radio Fixes (#2806)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Ports:
- BeeStation/BeeStation-Hornet#4990
- tgstation/tgstation#55215
- tgstation/tgstation#57033
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## 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?
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## 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:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
Skies-Of-Blue authored Mar 12, 2024
1 parent 8aac689 commit 2d6b011
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
12 changes: 11 additions & 1 deletion code/game/objects/items/devices/paicard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
if(pai)
if(!pai.master_dna || !pai.master)
dat += "<a href='byond://?src=[REF(src)];setdna=1'>Imprint Master DNA</a><br>"
dat += "Installed Personality: [pai.name]<br>"
dat += "Prime directive: <br>"
if(pai.laws.zeroth)
dat +="[pai.laws.zeroth]<br>"
else
dat +="None<br>"
dat += "Prime directive: <br>[pai.laws.zeroth]<br>"
for(var/slaws in pai.laws.supplied)
dat += "Additional directives: <br>[slaws]<br>"
Expand All @@ -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 += "<A href='byond://?src=[REF(src)];toggle_holo=1'>\[[pai.canholo? "Disable" : "Enable"] holomatrix projectors\]</a><br>"
dat += "<A href='byond://?src=[REF(src)];clear_zero=1'>\[Remove Prime directive\]</a><br>"
dat += "<A href='byond://?src=[REF(src)];fix_speech=1'>\[Reset speech synthesis module\]</a><br>"
dat += "<A href='byond://?src=[REF(src)];wipe=1'>\[Wipe current pAI personality\]</a><br>"
else
Expand Down Expand Up @@ -79,6 +84,7 @@
pai.master = M.real_name
pai.master_dna = M.dna.unique_enzymes
to_chat(pai, "<span class='notice'>You have been bound to a new master.</span>")
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")
Expand All @@ -89,6 +95,10 @@
to_chat(pai, "<span class='userdanger'>Your mental faculties leave you.</span>")
to_chat(pai, "<span class='rose'>oblivion... </span>")
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
Expand Down
2 changes: 0 additions & 2 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/pai/pai_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
..(message)

/mob/living/silicon/pai/binarycheck()
return 0
return radio?.translate_binary
1 change: 1 addition & 0 deletions code/modules/mob/living/silicon/pai/software.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2d6b011

Please sign in to comment.