Coat Rack Removal Fix (#19300)

Fixes removing both the hat and coat from coat racks when only one is
selected.
This commit is contained in:
Sparky
2024-06-02 18:43:24 +00:00
committed by GitHub
parent bcf81df9ed
commit d665940bb9
2 changed files with 9 additions and 2 deletions
+4 -2
View File
@@ -11,18 +11,20 @@
/obj/structure/coatrack/attack_hand(mob/user as mob)
if(use_check_and_message(user))
return
add_fingerprint(user)
if(coat && hat)
var/response = ""
response = alert(user, "Do you remove the coat, or the hat?", "Coat Rack Selection", "Coat", "Hat", "Cancel")
if(response == "Coat")
remove_coat(user)
return
if(response == "Hat")
remove_hat(user)
return
if(coat)
remove_coat(user)
if(hat)
else if(hat)
remove_hat(user)
add_fingerprint(user)
return
/obj/structure/coatrack/proc/remove_coat(mob/user as mob)