Fixes the rice bowl trash item (#11441)

This commit is contained in:
Alberyk
2021-03-15 21:36:44 +01:00
committed by GitHub
parent f1fd48c33e
commit e918fd8610
3 changed files with 19 additions and 8 deletions
+12 -7
View File
@@ -208,18 +208,23 @@
/obj/item/trash/ricetub
name = "empty rice tub"
icon_state = "ricetub"
var/has_chopsticks = FALSE
/obj/item/trash/ricetub/attackby(obj/item/W, mob/living/user)
if(istype(W, /obj/item/material/kitchen/utensil/fork/chopsticks))
var/obj/item/trash/ricetub_s/T = new()
to_chat(user, SPAN_NOTICE("You reattach the [W] to \the [src]"))
src.Destroy()
W.Destroy()
user.put_in_inactive_hand(T) //Because the chopsticks are in the active hand
qdel(W)
has_chopsticks = TRUE
update_icon()
/obj/item/trash/ricetub_s
name = "empty rice tub"
icon_state = "ricetub_s"
/obj/item/trash/ricetub/update_icon()
if(has_chopsticks)
icon_state = "ricetub_s"
else
icon_state = "ricetub"
/obj/item/trash/ricetub/sticks
has_chopsticks = TRUE
/obj/item/trash/seaweed
name = "empty moss pack"