TGUI pAI Hotfix 1 (#63160)

Adds a new ui state so that players can access the paicard tgui while it's slotted in their PDA (inside the pda wasn't technically in the user's close inventory).
Adds some documentation for the pAI candidate file
Users now get notifications if they can't save files (guest keys).
pAIs previously had NO on screen indicator of hack progress, so I've given them a progressbar over the door
More visual output for pAIs
More output for edge cases
More documentation
Fixes #63161
This commit is contained in:
Jeremiah
2021-12-03 20:16:52 +00:00
committed by GitHub
parent 6a6e5433b8
commit 307ab2ab6b
11 changed files with 62 additions and 18 deletions
@@ -678,6 +678,7 @@ GLOBAL_LIST_EMPTY(PDAs)
pai.attack_self(U)
if("2") // Eject pAI device
usr.put_in_hands(pai)
pai.slotted = FALSE
to_chat(usr, span_notice("You remove the pAI from the [name]."))
//SKILL FUNCTIONS===================================
@@ -1085,6 +1086,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if(!user.transferItemToLoc(C, src))
return
pai = C
pai.slotted = TRUE
to_chat(user, span_notice("You slot \the [C] into [src]."))
update_appearance()
updateUsrDialog()
+6 -2
View File
@@ -11,8 +11,12 @@
custom_premium_price = PAYCHECK_HARD * 1.25
///don't spam alert messages.
var/alert_cooldown
/// If the pAIcard is slotted in a PDA
var/slotted = FALSE
/// Any pAI personalities inserted
var/mob/living/silicon/pai/pai
var/emotion_icon = "off" ///what emotion icon we have. handled in /mob/living/silicon/pai/Topic()
///what emotion icon we have. handled in /mob/living/silicon/pai/Topic()
var/emotion_icon = "off"
resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE
/obj/item/paicard/suicide_act(mob/living/user)
@@ -63,7 +67,7 @@
ui.open()
/obj/item/paicard/ui_state(mob/user)
return GLOB.inventory_state
return GLOB.paicard_state
/obj/item/paicard/ui_data(mob/user)
. = ..()