This commit is contained in:
Zuhayr
2016-01-14 00:33:31 +10:30
committed by PsiOmegaDelta
parent d9a27133bd
commit cc4c86c995
2 changed files with 24 additions and 22 deletions

View File

@@ -14,6 +14,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/scoop_food = 1
/obj/item/weapon/material/kitchen/utensil/New()
..()
@@ -80,6 +81,7 @@
desc = "A knife for eating with. Can cut through any food."
icon_state = "knife"
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
scoop_food = 0
// Identical to the tactical knife but nowhere near as stabby.
// Kind of like the toy esword compared to the real thing.

View File

@@ -119,32 +119,32 @@
// Eating with forks
if(istype(W,/obj/item/weapon/material/kitchen/utensil))
var/obj/item/weapon/material/kitchen/utensil/U = W
if(U.scoop_food)
if(!U.reagents)
U.create_reagents(5)
if(!U.reagents)
U.create_reagents(5)
if (U.reagents.total_volume > 0)
user << "\red You already have something on your [U]."
return
if (U.reagents.total_volume > 0)
user << "\red You already have something on your [U]."
user.visible_message( \
"[user] scoops up some [src] with \the [U]!", \
"\blue You scoop up some [src] with \the [U]!" \
)
src.bitecount++
U.overlays.Cut()
U.loaded = "[src]"
var/image/I = new(U.icon, "loadedfood")
I.color = src.filling_color
U.overlays += I
reagents.trans_to_obj(U, min(reagents.total_volume,5))
if (reagents.total_volume <= 0)
qdel(src)
return
user.visible_message( \
"[user] scoops up some [src] with \the [U]!", \
"\blue You scoop up some [src] with \the [U]!" \
)
src.bitecount++
U.overlays.Cut()
U.loaded = "[src]"
var/image/I = new(U.icon, "loadedfood")
I.color = src.filling_color
U.overlays += I
reagents.trans_to_obj(U, min(reagents.total_volume,5))
if (reagents.total_volume <= 0)
qdel(src)
return
if (is_sliceable())
//these are used to allow hiding edge items in food that is not on a table/tray
var/can_slice_here = isturf(src.loc) && ((locate(/obj/structure/table) in src.loc) || (locate(/obj/machinery/optable) in src.loc) || (locate(/obj/item/weapon/tray) in src.loc))