From 12c4688fe45bfd57789d5068279bb893f7fcf760 Mon Sep 17 00:00:00 2001 From: grungussuss <96586172+Sadboysuss@users.noreply.github.com> Date: Thu, 6 Jun 2024 22:33:09 +0300 Subject: [PATCH] making installing card readers and airlock electronics into closets easier and more intuitive. (#83664) ## About The Pull Request Before, you would have to weld the closet to perform any actions with its electronics, now it only needs it to be closed and unlocked. ## Why It's Good For The Game I think having to weld the locker before installing electronics didn't make sense, nor was it intuitive as after asking any player how to do it - they would say you can't since no one knew you had to weld it, in part this can be blamed by the examine tips but I think this is much better. ## Changelog :cl: qol: you now don't need to weld a closet to install/uninstall electronics/card readers. /:cl: --- .../objects/structures/crates_lockers/closets.dm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index acbd7bfa395..9aef99482a0 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -382,7 +382,7 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets) context[SCREENTIP_CONTEXT_RMB] = anchored ? "Unanchor" : "Anchor" screentip_change = TRUE - if(!locked && (welded || !can_weld_shut)) + if(!locked && !opened && (welded || !can_weld_shut)) if(!secure) if(!broken && can_install_electronics && istype(held_item, /obj/item/electronics/airlock)) context[SCREENTIP_CONTEXT_LMB] = "Install Electronics" @@ -644,7 +644,7 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets) /// check if we can install airlock electronics in this closet /obj/structure/closet/proc/can_install_airlock_electronics(mob/user) - if(secure || !can_install_electronics || !(welded || !can_weld_shut)) + if(secure || !can_install_electronics || opened) return FALSE if(broken) @@ -659,9 +659,11 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets) /// check if we can unscrew airlock electronics from this closet /obj/structure/closet/proc/can_unscrew_airlock_electronics(mob/user) - if(!secure || !(welded || !can_weld_shut)) + if(!secure || opened) + return FALSE + if(card_reader_installed) + balloon_alert(user, "attached to reader!") return FALSE - if(locked) balloon_alert(user, "unlock first!") return FALSE @@ -670,7 +672,7 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets) /// check if we can install card reader in this closet /obj/structure/closet/proc/can_install_card_reader(mob/user) - if(card_reader_installed || !can_install_electronics || !length(access_choices) || !(welded || !can_weld_shut)) + if(card_reader_installed || !can_install_electronics || !length(access_choices) || opened) return FALSE if(broken) @@ -689,7 +691,7 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets) /// check if we can pry out the card reader from this closet /obj/structure/closet/proc/can_pryout_card_reader(mob/user) - if(!card_reader_installed || !(welded || !can_weld_shut)) + if(!card_reader_installed || opened) return FALSE if(locked)