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"
@@ -3681,7 +3681,7 @@
name = "packed rice bowl"
desc = "Boiled rice packed in a sealed plastic tub with the Nojosuru Foods logo on it. There appears to be a pair of chopsticks clipped to the side."
icon_state = "ricetub"
trash = /obj/item/trash/ricetub_s
trash = /obj/item/trash/ricetub/sticks
filling_color = "#A66829"
center_of_mass = list("x"=17, "y"=16)
reagents_to_add = list(/decl/reagent/nutriment = 5)
+6
View File
@@ -0,0 +1,6 @@
author: Alberyk
delete-after: True
changes:
- bugfix: "Fixed the rice bowl deleting itself."