From 266b1a2afea2fb58a159e845ca44992ff411104c Mon Sep 17 00:00:00 2001 From: VerySoft Date: Wed, 29 Jun 2022 00:08:44 -0400 Subject: [PATCH] Last one??? --- code/game/machinery/recharger.dm | 12 +- code/game/objects/items/devices/paicard.dm | 6 + code/game/objects/items/devices/paicard_vr.dm | 110 ++++++++++++------ code/modules/mob/living/silicon/pai/pai_vr.dm | 8 +- sound/effects/pai-restore.ogg | Bin 0 -> 11619 bytes 5 files changed, 96 insertions(+), 40 deletions(-) create mode 100644 sound/effects/pai-restore.ogg 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 0000000000000000000000000000000000000000..858b519a10cbc5897b48837d6043fba8bbe2f3f4 GIT binary patch literal 11619 zcmeHM3sh6by8d?(LVy4P0u2~xkbp@<8$zH&(S}HP2?7BW6g&{#D#}AzsI}clurx&q z7!e|+sE{HRRD9v``m09Bb>H9kh?Ty4JZpy=&cd&tleOXZF13 zoB8Me{(pz1r9}b>UW9~sNM9W_S(UK^+ zvt(8wW7hNEg`4E@j;5jVn2fCS8DTkToaGtH1%~c9K^&3LT_h9ZmrY^F%3owuZaC2D#|HfQ96~jRmZa>79on3a%UKV1tmMscd+~ty6?$l5( zD_P7d>?@B3qQU#V`An7Cm*%8$nH^JEG<7ygl}J!t29d{*y?n?e>8R9~Hd!?!^rjbm z<2}Y!$t5uily{q>vXr%Ji*`s*Wv*vnco9`{o2@$L##667A#Ar(Q9OC2Yi|iVzAQ46 zm1v8CJjWbVX}b@?_qs00$)t16B-*%rzH>bLUL zTY07ohc;8_0ANTXn5VPZofYiP-E1?Od8`qEFAdcTR5t{c-3qMa##Xu*;_wH}Ze4AL zC^9q;1PG6y%d?rrhIYvSw0duKV~n~nT|H7#MpLcZK>{3rf`$>#jr0l7`1M9bU)-O0 zSHam!Mi1s zYXkQcRBl!ul#JBop6w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