mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-05 15:03:48 +00:00
Coat racks. Can hold either labcoat or detective coat.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
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/mirror/attack_hand(mob/user as mob)
|
||||
/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]")
|
||||
if(!user.put_in_active_hand(coat))
|
||||
coat.loc = get_turf(user)
|
||||
@@ -17,24 +17,27 @@
|
||||
var/can_hang = 0
|
||||
for (var/T in allowed)
|
||||
if(istype(W,T))
|
||||
cam_hang = 1
|
||||
if (can_hang)
|
||||
user.visible_message("[user] hangs [coat] on \the [src].", "You hang [coat] on the \the [src]")
|
||||
can_hang = 1
|
||||
if (can_hang && !coat)
|
||||
user.visible_message("[user] hangs [W] on \the [src].", "You hang [W] on the \the [src]")
|
||||
coat = W
|
||||
user.drop_item(src)
|
||||
coat.loc = src
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='notice'>You cannot hang [W] on [src]</span>"
|
||||
return ..()
|
||||
|
||||
/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
var/can_hang = 0
|
||||
for (var/T in allowed)
|
||||
if(istype(mover,T))
|
||||
cam_hang = 1
|
||||
can_hang = 1
|
||||
|
||||
if (can_hang)
|
||||
if (can_hang && !coat)
|
||||
src.visible_message("[mover] lands on \the [src].")
|
||||
coat = mover
|
||||
coat.loc = src
|
||||
update_icon()
|
||||
return 0
|
||||
else
|
||||
@@ -42,7 +45,9 @@
|
||||
|
||||
/obj/structure/coatrack/update_icon()
|
||||
overlays.Cut()
|
||||
if (istype(W, /obj/item/clothing/suit/storage/labcoat))
|
||||
overlays += image(iconn, icon_state = "coat_lab")
|
||||
if (istype(W, /obj/item/clothing/suit/storage/det_suit))
|
||||
overlays += image(iconn, icon_state = "coat_det")
|
||||
if (istype(coat, /obj/item/clothing/suit/storage/labcoat))
|
||||
overlays += image(icon, icon_state = "coat_lab")
|
||||
if (istype(coat, /obj/item/clothing/suit/storage/labcoat/cmo))
|
||||
overlays += image(icon, icon_state = "coat_cmo")
|
||||
if (istype(coat, /obj/item/clothing/suit/storage/det_suit))
|
||||
overlays += image(icon, icon_state = "coat_det")
|
||||
Reference in New Issue
Block a user