diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 65bc9c5d9c2..775f4e224c4 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -76,6 +76,13 @@
if(ourcard.panel_open)
to_chat(user, "\The [ourcard] won't fit in the recharger with its panel open.")
return
+ if(ourcard.pai)
+ if(ourcard.pai.stat == CONSCIOUS)
+ to_chat(user, "\The [ourcard] boops... it doesn't need to be recharged!")
+ return
+ else
+ to_chat(user, "\The [ourcard] doesn't have a personality!")
+ return
user.drop_item()
G.loc = src
@@ -140,10 +147,11 @@
else if(pcard.pai.fireloss)
pcard.pai.adjustFireLoss(-1)
else
- pcard.forceMove(get_turf(src))
- pcard.pai.full_restore()
charging = null
update_icon()
+ src.visible_message("\The [src] ejects the [pcard]!")
+ pcard.forceMove(get_turf(src))
+ pcard.pai.full_restore()
//VOREStation Edit End
else
var/obj/item/weapon/cell/C = charging.get_cell()
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index 4fae67a9f9e..a944d8c1721 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -58,6 +58,9 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
/obj/item/device/paicard/attack_ghost(mob/user as mob)
if(pai != null) //Have a person in them already?
return ..()
+ if(is_damage_critical())
+ to_chat(usr, "That card is too damaged to activate!")
+ return
var/time_till_respawn = user.time_till_respawn()
if(time_till_respawn == -1) // Special case, never allowed to respawn
to_chat(usr, "Respawning is not allowed!")
@@ -132,6 +135,9 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
// VOREStation Edit End
/obj/item/device/paicard/proc/access_screen(mob/user)
+ if(is_damage_critical())
+ to_chat(user, "WARNING: CRITICAL HARDWARE FAILURE, SERVICE DEVICE IMMEDIATELY")
+ return
if (!in_range(src, user))
return
user.set_machine(src)
diff --git a/code/game/objects/items/devices/paicard_vr.dm b/code/game/objects/items/devices/paicard_vr.dm
index 723218348ba..d5ec060a461 100644
--- a/code/game/objects/items/devices/paicard_vr.dm
+++ b/code/game/objects/items/devices/paicard_vr.dm
@@ -19,9 +19,11 @@ var/global/list/paikeys = list()
if(panel_open)
panel_open = FALSE
user.visible_message("\The [user] secured \the [src]'s maintenance panel.")
- else
+ playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
+ else if(pai)
panel_open = TRUE
user.visible_message("\The [user] opened \the [src]'s maintenance panel.")
+ playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
if(istype(I,/obj/item/device/robotanalyzer))
if(!panel_open)
to_chat(user, "The panel isn't open. You will need to unscrew it to open it.")
@@ -153,41 +155,69 @@ var/global/list/paikeys = list()
else
to_chat(user,"Speech Synthesizer: missing")
- if(istype(I,/obj/item/paiparts/cell) && cell == PP_MISSING)
- user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
- cell = PP_FUNCTIONAL
- user.drop_from_inventory(I)
- qdel(I)
- if(istype(I,/obj/item/paiparts/processor) && processor == PP_MISSING)
- user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
- processor = PP_FUNCTIONAL
- user.drop_from_inventory(I)
- qdel(I)
- if(istype(I,/obj/item/paiparts/board) && board == PP_MISSING)
- user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
- board = PP_FUNCTIONAL
- user.drop_from_inventory(I)
- qdel(I)
- if(istype(I,/obj/item/paiparts/capacitor) && capacitor == PP_MISSING)
- user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
- capacitor = PP_FUNCTIONAL
- user.drop_from_inventory(I)
- qdel(I)
- if(istype(I,/obj/item/paiparts/projector) && projector == PP_MISSING)
- user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
- projector = PP_FUNCTIONAL
- user.drop_from_inventory(I)
- qdel(I)
- if(istype(I,/obj/item/paiparts/emitter) && emitter == PP_MISSING)
- user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
- emitter = PP_FUNCTIONAL
- user.drop_from_inventory(I)
- qdel(I)
- if(istype(I,/obj/item/paiparts/speech_synthesizer) && speech_synthesizer == PP_MISSING)
- user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
- speech_synthesizer = PP_FUNCTIONAL
- user.drop_from_inventory(I)
- qdel(I)
+ if(istype(I,/obj/item/paiparts/cell))
+ if(cell == PP_MISSING)
+ if(do_after(user, 3 SECONDS))
+ user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
+ cell = PP_FUNCTIONAL
+ user.drop_from_inventory(I)
+ qdel(I)
+ else
+ to_chat(user, "You would need to remove the installed [I] first!")
+ if(istype(I,/obj/item/paiparts/processor))
+ if(processor == PP_MISSING)
+ if(do_after(user, 3 SECONDS))
+ user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
+ processor = PP_FUNCTIONAL
+ user.drop_from_inventory(I)
+ qdel(I)
+ else
+ to_chat(user, "You would need to remove the installed [I] first!")
+ if(istype(I,/obj/item/paiparts/board))
+ if(board == PP_MISSING)
+ if(do_after(user, 3 SECONDS))
+ user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
+ board = PP_FUNCTIONAL
+ user.drop_from_inventory(I)
+ qdel(I)
+ else
+ to_chat(user, "You would need to remove the installed [I] first!")
+ if(istype(I,/obj/item/paiparts/capacitor))
+ if(capacitor == PP_MISSING)
+ if(do_after(user, 3 SECONDS))
+ user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
+ capacitor = PP_FUNCTIONAL
+ user.drop_from_inventory(I)
+ qdel(I)
+ else
+ to_chat(user, "You would need to remove the installed [I] first!")
+ if(istype(I,/obj/item/paiparts/projector))
+ if(projector == PP_MISSING)
+ if(do_after(user, 3 SECONDS))
+ user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
+ projector = PP_FUNCTIONAL
+ user.drop_from_inventory(I)
+ qdel(I)
+ else
+ to_chat(user, "You would need to remove the installed [I] first!")
+ if(istype(I,/obj/item/paiparts/emitter))
+ if(emitter == PP_MISSING)
+ if(do_after(user, 3 SECONDS))
+ user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
+ emitter = PP_FUNCTIONAL
+ user.drop_from_inventory(I)
+ qdel(I)
+ else
+ to_chat(user, "You would need to remove the installed [I] first!")
+ if(istype(I,/obj/item/paiparts/speech_synthesizer))
+ if(speech_synthesizer == PP_MISSING)
+ if(do_after(user, 3 SECONDS))
+ user.visible_message("\The [user] installs \the [I] into \the [src].","You install \the [I] into \the [src].")
+ speech_synthesizer = PP_FUNCTIONAL
+ user.drop_from_inventory(I)
+ qdel(I)
+ else
+ to_chat(user, "You would need to remove the installed [I] first!")
/obj/item/device/paicard/attack_self(mob/user)
if(!panel_open)
@@ -210,6 +240,12 @@ var/global/list/paikeys = list()
parts |= "speech synthesizer"
var/choice = tgui_input_list(user, "Which part would you like to remove?", "Remove part", parts)
+ if(choice)
+ playsound(src, 'sound/items/pickup/component.ogg', vary = TRUE)
+ else
+ return
+ if(!do_after(user, 3 SECONDS))
+ return
switch(choice)
if("cell")
if(cell == PP_FUNCTIONAL)
@@ -311,6 +347,8 @@ var/global/list/paikeys = list()
desc = "It's broken scrap from a pAI card!"
icon = 'icons/obj/paicard.dmi'
icon_state = "broken"
+ pickup_sound = 'sound/items/pickup/card.ogg'
+ drop_sound = 'sound/items/drop/card.ogg'
/obj/item/paiparts/Initialize()
. = ..()
pixel_x = rand(-10,10)
diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm
index 9eb80c6e0f6..86ef6cca5a0 100644
--- a/code/modules/mob/living/silicon/pai/pai_vr.dm
+++ b/code/modules/mob/living/silicon/pai/pai_vr.dm
@@ -76,12 +76,16 @@
/mob/living/silicon/pai/proc/full_restore()
adjustBruteLoss(- bruteloss)
adjustFireLoss(- fireloss)
- spawn(100)
+ do_after(src, 1 SECONDS)
card.setEmotion(16)
- spawn(500)
stat = CONSCIOUS
+ do_after(src, 5 SECONDS)
+ var/mob/observer/dead/ghost = src.get_ghost()
+ if(ghost)
+ ghost.notify_revive("Someone is trying to revive you. Re-enter your body if you want to be revived!", 'sound/effects/pai-restore.ogg', source = card)
canmove = TRUE
card.setEmotion(15)
+ playsound(card, 'sound/effects/pai-restore.ogg', 50, FALSE)
card.visible_message("\The [card] chimes.", runemessage = "chime")
/mob/living/silicon/pai/proc/pai_nom(var/mob/living/T in oview(1))
diff --git a/sound/effects/pai-restore.ogg b/sound/effects/pai-restore.ogg
new file mode 100644
index 00000000000..858b519a10c
Binary files /dev/null and b/sound/effects/pai-restore.ogg differ