Skip to content

Commit

Permalink
Coat Rack Removal Fix (Aurorastation#19300)
Browse files Browse the repository at this point in the history
Fixes removing both the hat and coat from coat racks when only one is
selected.
  • Loading branch information
1Sparky1 authored Jun 2, 2024
1 parent bcf81df commit d665940
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/game/objects/structures/coatrack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions html/changelogs/coat-rack-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author: Sparky_hotdog

delete-after: True
changes:
- bugfix: "Fixes coat racks always removing both hats and coats, when only one is selected."

0 comments on commit d665940

Please sign in to comment.