mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
Upgrades the coat racks and adds security labcoats (#12264)
This commit is contained in:
@@ -4,8 +4,11 @@
|
||||
icon = 'icons/obj/coatrack.dmi'
|
||||
icon_state = "coatrack0"
|
||||
var/obj/item/clothing/suit/coat
|
||||
var/list/allowed = list(/obj/item/clothing/suit/storage/toggle/labcoat, /obj/item/clothing/suit/storage/toggle/det_trench,
|
||||
/obj/item/clothing/suit/storage/toggle/forensics, /obj/item/clothing/suit/storage/toggle/trench)
|
||||
var/obj/item/clothing/head/hat
|
||||
var/list/allowed_coats = list(/obj/item/clothing/suit/storage/toggle/labcoat, /obj/item/clothing/suit/storage/toggle/det_trench,
|
||||
/obj/item/clothing/suit/storage/toggle/forensics, /obj/item/clothing/suit/storage/toggle/trench,
|
||||
/obj/item/clothing/suit/storage/det_jacket)
|
||||
var/list/allowed_hats = list(/obj/item/clothing/head/det, /obj/item/clothing/head/beret/security, /obj/item/clothing/head/softcap/security)
|
||||
|
||||
/obj/structure/coatrack/attack_hand(mob/user as mob)
|
||||
if (!ishuman(user))
|
||||
@@ -15,36 +18,44 @@
|
||||
if (!user.can_use_hand())
|
||||
return
|
||||
if(coat)
|
||||
user.visible_message("[user] takes [coat] off \the [src].", "You take [coat] off the \the [src]")
|
||||
coat.forceMove(get_turf(user))
|
||||
user.visible_message("[user] takes [coat] off \the [src].", SPAN_NOTICE("You take [coat] off the \the [src]."))
|
||||
user.put_in_hands(coat)
|
||||
coat = null
|
||||
update_icon()
|
||||
else if(hat)
|
||||
user.visible_message("[user] takes [hat] off \the [src].", SPAN_NOTICE("You take [hat] off the \the [src]."))
|
||||
user.put_in_hands(hat)
|
||||
hat = null
|
||||
update_icon()
|
||||
|
||||
/obj/structure/coatrack/attackby(obj/item/W as obj, mob/user as mob)
|
||||
var/can_hang = 0
|
||||
if(is_type_in_list(W, allowed))
|
||||
can_hang = 1
|
||||
if (can_hang && !coat)
|
||||
user.visible_message("[user] hangs [W] on \the [src].", "You hang [W] on the \the [src]")
|
||||
if (is_type_in_list(W, allowed_coats) && !coat)
|
||||
user.visible_message("[user] hangs [W] on \the [src].", SPAN_NOTICE("You hang [W] on the \the [src]."))
|
||||
coat = W
|
||||
user.drop_from_inventory(coat, src)
|
||||
update_icon()
|
||||
else if (is_type_in_list(W, allowed_hats) && !hat)
|
||||
user.visible_message("[user] hangs [W] on \the [src].", SPAN_NOTICE("You hang [W] on the \the [src]."))
|
||||
hat = W
|
||||
user.drop_from_inventory(hat, src)
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You cannot hang [W] on [src]</span>")
|
||||
to_chat(user, SPAN_NOTICE("You cannot hang [W] on [src]."))
|
||||
return ..()
|
||||
|
||||
/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
var/can_hang = 0
|
||||
if(is_type_in_list(mover, allowed))
|
||||
can_hang = 1
|
||||
|
||||
if (can_hang && !coat)
|
||||
if (is_type_in_list(mover, allowed_coats) && !coat)
|
||||
src.visible_message("[mover] lands on \the [src].")
|
||||
coat = mover
|
||||
coat.forceMove(src)
|
||||
update_icon()
|
||||
return 0
|
||||
if (is_type_in_list(mover, allowed_hats) && !hat)
|
||||
src.visible_message("[mover] lands on \the [src].")
|
||||
hat = mover
|
||||
hat.forceMove(src)
|
||||
update_icon()
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
@@ -54,4 +65,10 @@
|
||||
if(istype(coat, /obj/item/clothing/suit/storage/toggle))
|
||||
var/obj/item/clothing/suit/storage/toggle/T = coat
|
||||
T.icon_state = initial(T.icon_state)
|
||||
T.opened = FALSE
|
||||
add_overlay("coat_[coat.icon_state]")
|
||||
if (hat)
|
||||
if(istype(hat, /obj/item/clothing/head/softcap/security/idris) || istype(hat, /obj/item/clothing/head/softcap/security/corp))
|
||||
add_overlay("hat_softcap_[hat.icon_state]")
|
||||
else
|
||||
add_overlay("hat_[hat.icon_state]")
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
new /obj/item/storage/backpack/satchel/leather(src)
|
||||
new /obj/item/clothing/suit/storage/det_jacket(src)
|
||||
new /obj/item/clothing/under/det(src)
|
||||
new /obj/item/clothing/suit/storage/toggle/labcoat(src)
|
||||
new /obj/item/clothing/suit/storage/toggle/labcoat/security(src)
|
||||
new /obj/item/clothing/under/det/black(src)
|
||||
new /obj/item/clothing/under/det/classic(src)
|
||||
new /obj/item/clothing/accessory/badge/investigator(src)
|
||||
|
||||
Reference in New Issue
Block a user