Skip to content

Commit

Permalink
[MIRROR] table knives are utensils, removed /kitchen/ path chunk from…
Browse files Browse the repository at this point in the history
… utensils
  • Loading branch information
Spookerton authored and SierraHelper committed Nov 21, 2024
1 parent 57b4430 commit 11f5681
Show file tree
Hide file tree
Showing 38 changed files with 192 additions and 193 deletions.
2 changes: 1 addition & 1 deletion code/datums/outfits/tournament.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
head = /obj/item/clothing/head/chefhat
uniform = /obj/item/clothing/under/rank/chef
suit = /obj/item/clothing/suit/chef
r_hand = /obj/item/material/kitchen/rollingpin
r_hand = /obj/item/material/rollingpin
l_pocket = /obj/item/material/knife/combat
r_pocket = /obj/item/material/knife/combat

Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/kitchen/smartfridge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
icon_contents = "food"
accepted_types = list(
/obj/item/reagent_containers/food/snacks,
/obj/item/material/kitchen/utensil
/obj/item/material/utensil
)

/obj/machinery/smartfridge/drying_rack
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/vending/dinnerware.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/obj/item/reagent_containers/glass/beaker/bowl =2,
/obj/item/tray = 8,
/obj/item/material/knife/kitchen = 3,
/obj/item/material/kitchen/rollingpin = 2,
/obj/item/material/rollingpin = 2,
/obj/item/serving_bowl = 20,
/obj/item/reagent_containers/food/drinks/pitcher = 2,
/obj/item/reagent_containers/food/drinks/flask/vacuumflask = 4,
Expand Down
5 changes: 2 additions & 3 deletions code/game/objects/items/weapons/grenades/explosive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@
/obj/item/material/shard,
/obj/item/reagent_containers/syringe,
/obj/item/pen,
/obj/item/material/knife/table,
/obj/item/material/kitchen/utensil
)
/obj/item/material/utensil
)

/obj/item/grenade/frag/makeshift/Initialize()
det_time = rand(5,100) // Fuse is randomized.
Expand Down
131 changes: 72 additions & 59 deletions code/game/objects/items/weapons/material/kitchen.dm
Original file line number Diff line number Diff line change
@@ -1,138 +1,151 @@
/obj/item/material/kitchen
/obj/item/material/utensil
icon = 'icons/obj/machines/kitchen.dmi'
worth_multiplier = 1.1

/*
* Utensils
*/
/obj/item/material/kitchen/utensil
w_class = ITEM_SIZE_TINY
thrown_force_multiplier = 1
origin_tech = list(TECH_MATERIAL = 1)
attack_verb = list("attacked", "stabbed", "poked")
max_force = 5
max_force = 8
force_multiplier = 0.1 // 6 when wielded with hardness 60 (steel)
thrown_force_multiplier = 0.25 // 5 when thrown with weight 20 (steel)
puncture = TRUE
default_material = MATERIAL_ALUMINIUM
applies_material_name = TRUE

/// Descriptive string for currently loaded food object
var/loaded

/// Whether the utensil is able to collect reagents from food
var/scoop_food = TRUE

var/loaded //Descriptive string for currently loaded food object.
var/scoop_food = 1

/obj/item/material/kitchen/utensil/New()
..()
/obj/item/material/utensil/Initialize()
. = ..()
if (prob(60))
src.pixel_y = rand(0, 4)
create_reagents(5)
return
pixel_y = rand(0, 4)
if (material.conductive)
obj_flags |= OBJ_FLAG_CONDUCTIBLE
if (scoop_food)
create_reagents(5)

/obj/item/material/kitchen/utensil/use_after(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if (!istype(M))
return FALSE

/obj/item/material/utensil/use_after(mob/living/carbon/subject, mob/living/carbon/user)
if (!istype(subject))
return FALSE
if (reagents.total_volume > 0)
if(M == user)
if(!M.can_eat(loaded))
if(subject == user)
if(!subject.can_eat(loaded))
return TRUE
switch(M.get_fullness())
switch(subject.get_fullness())
if (0 to 50)
to_chat(M, SPAN_DANGER("You ravenously stick \the [src] into your mouth and gobble the food!"))
to_chat(subject, SPAN_DANGER("You ravenously stick \the [src] into your mouth and gobble the food!"))
if (50 to 150)
to_chat(M, SPAN_NOTICE("You hungrily chew the food on \the [src]."))
to_chat(subject, SPAN_NOTICE("You hungrily chew the food on \the [src]."))
if (150 to 350)
to_chat(M, SPAN_NOTICE("You chew the food on \the [src]."))
to_chat(subject, SPAN_NOTICE("You chew the food on \the [src]."))
if (350 to 550)
to_chat(M, SPAN_NOTICE("You unwillingly chew the food on \the [src]."))
to_chat(subject, SPAN_NOTICE("You unwillingly chew the food on \the [src]."))
if (550 to INFINITY)
to_chat(M, SPAN_WARNING("You cannot take one more bite from \the [src]!"))
to_chat(subject, SPAN_WARNING("You cannot take one more bite from \the [src]!"))
return TRUE

else
user.visible_message(SPAN_WARNING("\The [user] begins to feed \the [M]!"))
if (!M.can_force_feed(user, loaded) || !do_after(user, 5 SECONDS, M, DO_PUBLIC_UNIQUE))
user.visible_message(SPAN_WARNING("\The [user] begins to feed \the [subject]!"))
if (!subject.can_force_feed(user, loaded) || !do_after(user, 5 SECONDS, subject, DO_PUBLIC_UNIQUE))
return TRUE

if (user.get_active_hand() != src)
return TRUE
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)
subject.visible_message(SPAN_NOTICE("\The [user] feeds some [loaded] to \the [subject] with \the [src]."))
reagents.trans_to_mob(subject, reagents.total_volume, CHEM_INGEST)
playsound(subject.loc,'sound/items/eatfood.ogg', rand(10,40), TRUE)
ClearOverlays()
return TRUE
else
to_chat(user, SPAN_WARNING("You don't have anything on \the [src]."))
return TRUE


/obj/item/material/kitchen/utensil/fork
/obj/item/material/utensil/knife
name = "table knife"
desc = "A simple table knife, used to cut up individual portions of food."
icon = 'icons/obj/weapons/knife.dmi'
icon_state = "table"
item_state = "knife"
scoop_food = FALSE
edge = TRUE
attack_verb = list("slashed", "stabbed", "cut")
item_flags = ITEM_FLAG_CAN_HIDE_IN_SHOES

/obj/item/material/utensil/knife/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/utensil/knife/silver/default_material = MATERIAL_SILVER
/obj/item/material/utensil/knife/titanium/default_material = MATERIAL_TITANIUM


/obj/item/material/utensil/fork
name = "fork"
desc = "It's a fork. Sure is pointy."
icon_state = "fork"

/obj/item/material/kitchen/utensil/fork/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/kitchen/utensil/fork/silver/default_material = MATERIAL_SILVER
/obj/item/material/kitchen/utensil/fork/titanium/default_material = MATERIAL_TITANIUM
/obj/item/material/utensil/fork/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/utensil/fork/silver/default_material = MATERIAL_SILVER
/obj/item/material/utensil/fork/titanium/default_material = MATERIAL_TITANIUM


/obj/item/material/kitchen/utensil/spoon
/obj/item/material/utensil/spoon
name = "spoon"
desc = "It's a spoon. You can see your own upside-down face in it."
icon_state = "spoon"
attack_verb = list("attacked", "poked")
force_multiplier = 0.1 //2 when wielded with weight 20 (steel)

/obj/item/material/kitchen/utensil/spoon/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/kitchen/utensil/spoon/silver/default_material = MATERIAL_SILVER
/obj/item/material/kitchen/utensil/spoon/titanium/default_material = MATERIAL_TITANIUM
/obj/item/material/utensil/spoon/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/utensil/spoon/silver/default_material = MATERIAL_SILVER
/obj/item/material/utensil/spoon/titanium/default_material = MATERIAL_TITANIUM


/obj/item/material/kitchen/utensil/spork
/obj/item/material/utensil/spork
name = "spork"
desc = "It's a spork. It's much like a fork, but much blunter."
icon_state = "spork"

/obj/item/material/kitchen/utensil/spork/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/kitchen/utensil/spork/silver/default_material = MATERIAL_SILVER
/obj/item/material/kitchen/utensil/spork/titanium/default_material = MATERIAL_TITANIUM
/obj/item/material/utensil/spork/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/utensil/spork/silver/default_material = MATERIAL_SILVER
/obj/item/material/utensil/spork/titanium/default_material = MATERIAL_TITANIUM


/obj/item/material/kitchen/utensil/foon
/obj/item/material/utensil/foon
name = "foon"
desc = "It's a foon. It's much like a spoon, but much sharper."
icon_state = "foon"

/obj/item/material/kitchen/utensil/foon/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/kitchen/utensil/foon/silver/default_material = MATERIAL_SILVER
/obj/item/material/kitchen/utensil/foon/titanium/default_material = MATERIAL_TITANIUM
/obj/item/material/utensil/foon/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/utensil/foon/silver/default_material = MATERIAL_SILVER
/obj/item/material/utensil/foon/titanium/default_material = MATERIAL_TITANIUM


/obj/item/storage/box/silverware
name = "silverware box"
startswith = list(
/obj/item/material/knife/table/silver = 4,
/obj/item/material/kitchen/utensil/fork/silver = 4,
/obj/item/material/kitchen/utensil/spoon/silver = 4
/obj/item/material/utensil/knife/silver = 4,
/obj/item/material/utensil/fork/silver = 4,
/obj/item/material/utensil/spoon/silver = 4
)

/*
* Rolling Pins
*/

/obj/item/material/kitchen/rollingpin
/obj/item/material/rollingpin
name = "rolling pin"
desc = "Used to knock out the Bartender."
icon = 'icons/obj/machines/kitchen.dmi'
icon_state = "rolling_pin"
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
default_material = MATERIAL_WOOD
max_force = 15
force_multiplier = 0.7 // 10 when wielded with weight 15 (wood)
thrown_force_multiplier = 1 // as above

/obj/item/material/kitchen/rollingpin/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/kitchen/rollingpin/aluminium/default_material = MATERIAL_ALUMINIUM
/obj/item/material/rollingpin/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/rollingpin/aluminium/default_material = MATERIAL_ALUMINIUM


/obj/item/material/kitchen/rollingpin/use_before(mob/living/target, mob/living/user)
/obj/item/material/rollingpin/use_before(mob/living/target, mob/living/user)
. = FALSE
if ((MUTATION_CLUMSY in user.mutations) && prob(50) && user.unEquip(src))
var/datum/pronouns/pronouns = user.choose_from_pronouns()
Expand Down
35 changes: 11 additions & 24 deletions code/game/objects/items/weapons/material/knives.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//knives for stabbing and slashing and so on and so forth
/obj/item/material/knife //master obj
/obj/item/material/knife
abstract_type = /obj/item/material/knife
name = "the concept of a knife"
desc = "You call that a knife? This is a master item - berate the admin or mapper who spawned this!"
icon = 'icons/obj/weapons/knife.dmi'
Expand All @@ -17,23 +17,6 @@
edge = TRUE
item_flags = ITEM_FLAG_CAN_HIDE_IN_SHOES

//table knives
/obj/item/material/knife/table
name = "table knife"
desc = "A simple table knife, used to cut up individual portions of food."
icon_state = "table"
default_material = MATERIAL_ALUMINIUM
max_force = 7
force_multiplier = 0.1
sharp = FALSE
attack_verb = list("prodded")
applies_material_name = FALSE
w_class = ITEM_SIZE_TINY

/obj/item/material/knife/table/plastic/default_material = MATERIAL_PLASTIC
/obj/item/material/knife/table/silver/default_material = MATERIAL_SILVER
/obj/item/material/knife/table/titanium/default_material = MATERIAL_TITANIUM


/obj/item/material/knife/unathi
name = "dueling knife"
Expand All @@ -44,13 +27,14 @@
applies_material_colour = FALSE
w_class = ITEM_SIZE_NORMAL

//kitchen knives

/obj/item/material/knife/kitchen
name = "kitchen knife"
icon_state = "kitchenknife"
desc = "A general purpose chef's knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
applies_material_name = FALSE


/obj/item/material/knife/kitchen/cleaver
name = "butcher's cleaver"
desc = "A heavy blade used to process food, especially animal carcasses."
Expand All @@ -59,13 +43,14 @@
force_multiplier = 0.18
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")


/obj/item/material/knife/kitchen/cleaver/bronze
name = "master chef's cleaver"
desc = "A heavy blade used to process food. This one is so fancy, it must be for a truly exceptional chef. There aren't any here, so what it's doing here is anyone's guess."
default_material = MATERIAL_BRONZE
force_multiplier = 1 //25 with material bronze
force_multiplier = 1


//fighting knives
/obj/item/material/knife/combat
name = "combat knife"
desc = "A blade with a saw-like pattern on the reverse edge and a heavy handle."
Expand All @@ -74,14 +59,15 @@
base_parry_chance = 30
w_class = ITEM_SIZE_SMALL

//random stuff

/obj/item/material/knife/hook
name = "meat hook"
desc = "A sharp, metal hook what sticks into things."
icon_state = "hook_knife"
item_state = "hook_knife"
sharp = FALSE


/obj/item/material/knife/ritual
name = "ritual knife"
desc = "The unearthly energies that once powered this blade are now dormant."
Expand All @@ -91,7 +77,7 @@
applies_material_colour = FALSE
applies_material_name = FALSE

//Utility knives

/obj/item/material/knife/utility
name = "utility knife"
desc = "An utility knife with a polymer handle, commonly used through human space."
Expand All @@ -100,6 +86,7 @@
force_multiplier = 0.2
w_class = ITEM_SIZE_SMALL


/obj/item/material/knife/utility/lightweight
name = "lightweight utility knife"
desc = "A lightweight utility knife made out of a steel alloy."
Expand Down
Loading

0 comments on commit 11f5681

Please sign in to comment.