mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
Fixes runtime when clicking an empty coat hanger with empty hand. (#22577)
* prevents runtime if the hanger is clicked when its empty * changes recommended on code chat * Update code/game/objects/structures/coathanger.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --------- Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -6,8 +6,10 @@
|
||||
var/obj/item/clothing/suit/coat
|
||||
var/list/allowed = list(/obj/item/clothing/suit/storage/labcoat, /obj/item/clothing/suit/storage/det_suit)
|
||||
|
||||
/obj/structure/coatrack/attack_hand(mob/user as mob)
|
||||
user.visible_message("[user] takes [coat] off \the [src].", "You take [coat] off the \the [src]")
|
||||
/obj/structure/coatrack/attack_hand(mob/user)
|
||||
if(isnull(coat))
|
||||
return
|
||||
user.visible_message("[user] takes [coat] off [src].", "You take [coat] off [src]")
|
||||
if(!user.put_in_active_hand(coat))
|
||||
coat.forceMove(get_turf(user))
|
||||
coat = null
|
||||
|
||||
Reference in New Issue
Block a user