no drinking soup with fork & utensils no longer destroy trash item (#8117)

This commit is contained in:
Wowzewow (Wezzy)
2020-01-30 23:59:05 +01:00
committed by GitHub
parent 123847d313
commit 0c1d2d35c7
6 changed files with 168 additions and 124 deletions
+6
View File
@@ -152,3 +152,9 @@
/obj/item/trash/cookiesnack
name = "\improper Carps Ahoy! miniature cookies"
icon_state = "cookiesnack"
/obj/item/trash/stew
name = "empty pot"
icon = 'icons/obj/food.dmi'
icon_state = "stew_empty"
drop_sound = 'sound/items/drop/shovel.ogg'
@@ -15,6 +15,7 @@
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
var/loaded //Descriptive string for currently loaded food object.
var/is_liquid = FALSE //whether you've got liquid on your utensil
var/scoop_food = 1
/obj/item/material/kitchen/utensil/New()
@@ -43,21 +44,25 @@
if (fullness > (550 * (1 + M.overeatduration / 2000)))
to_chat(M, "You cannot force anymore food down!")
return
M.visible_message("<span class='notice'>\The [user] eats some [loaded] from \the [src].</span>")
M.visible_message(span("notice", "\The [user] [is_liquid ? "drinks" : "eats"] some [loaded] from \the [src]."))
else
if (fullness > (550 * (1 + M.overeatduration / 2000)))
to_chat(M, "You cannot force anymore food down their throat!")
return
user.visible_message("<span class='warning'>\The [user] begins to feed \the [M]!</span>")
user.visible_message(span("warning", "\The [user] begins to feed \the [M]!"))
if(!(M.can_force_feed(user, loaded) && do_mob(user, M, 5 SECONDS)))
return
M.visible_message("<span class='notice'>\The [user] feeds some [loaded] to \the [M] with \the [src].</span>")
M.visible_message(span("notice", "\The [user] feeds some [loaded] to \the [M] with \the [src]."))
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
if(is_liquid)
playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
is_liquid = FALSE
else
playsound(user.loc, 'sound/items/eatfood.ogg', rand(10, 50), 1)
cut_overlays()
return
else
to_chat(user, "<span class='warning'>You don't have anything on \the [src].</span>") //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK)
to_chat(user, span("warning", "You don't have anything on \the [src].")) //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK)
return
/obj/item/material/kitchen/utensil/fork
@@ -103,7 +108,7 @@
/obj/item/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob, var/target_zone)
if ((user.is_clumsy()) && prob(50))
to_chat(user, "<span class='warning'>You accidentally cut yourself with \the [src].</span>")
to_chat(user, span("warning", "You accidentally cut yourself with \the [src]."))
user.take_organ_damage(20)
return
return ..()
@@ -127,7 +132,7 @@
/obj/item/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob, var/target_zone)
if ((user.is_clumsy()) && prob(50))
to_chat(user, "<span class='warning'>\The [src] slips out of your hand and hits your head.</span>")
to_chat(user, span("warning", "\The [src] slips out of your hand and hits your head."))
user.drop_from_inventory(src)
user.take_organ_damage(10)
user.Paralyse(2)