diff --git a/code/game/objects/items/tongs.dm b/code/game/objects/items/tongs.dm new file mode 100644 index 00000000000000..8e7753bf488493 --- /dev/null +++ b/code/game/objects/items/tongs.dm @@ -0,0 +1,100 @@ +/// Tongs, let you pick up and feed people food from further away. +/obj/item/kitchen/tongs + name = "tongs" + desc = "So you never have to touch anything with your dirty, unwashed hands." + reach = 2 + icon_state = "tongs" + base_icon_state = "tongs" + inhand_icon_state = "fork" // close enough + attack_verb_continuous = list("pinches", "tongs", "nips") + attack_verb_simple = list("pinch", "tong", "nip") + /// What are we holding in our tongs? + var/obj/item/tonged + /// Sound to play when we click our tongs together + var/clack_sound = 'sound/items/handling/component_drop.ogg' + /// Time to wait between clacking sounds + var/clack_delay = 2 SECONDS + /// Have we clacked recently? + COOLDOWN_DECLARE(clack_cooldown) + +/obj/item/kitchen/tongs/Destroy(force) + QDEL_NULL(tonged) + return ..() + +/obj/item/kitchen/tongs/examine(mob/user) + . = ..() + if (!isnull(tonged)) + . += span_notice("It is holding [tonged].") + +/obj/item/kitchen/tongs/dropped(mob/user, silent) + . = ..() + drop_tonged() + +/obj/item/kitchen/tongs/attack_self(mob/user, modifiers) + . = ..() + if(.) + return TRUE + if (!isnull(tonged)) + drop_tonged() + return TRUE + if (!COOLDOWN_FINISHED(src, clack_cooldown)) + return TRUE + user.visible_message(span_notice("[user] clacks [user.p_their()] [src] together like a crab. Click clack!")) + click_clack() + return TRUE + +/// Release the food we are holding +/obj/item/kitchen/tongs/proc/drop_tonged() + if (isnull(tonged)) + return + visible_message(span_notice("[tonged] falls to the ground!")) + var/turf/location = drop_location() + tonged.forceMove(location) + tonged.do_drop_animation(location) + +/// Play a clacking sound and appear closed, then open again +/obj/item/kitchen/tongs/proc/click_clack() + COOLDOWN_START(src, clack_cooldown, clack_delay) + playsound(src, clack_sound, vol = 100, vary = FALSE) + icon_state = "[base_icon_state]_closed" + var/delay = min(0.5 SECONDS, clack_delay / 2) // Just in case someone's been fucking with the cooldown + addtimer(CALLBACK(src, PROC_REF(clack)), delay, TIMER_DELETE_ME) + +/// Plays a clacking sound and appear open +/obj/item/kitchen/tongs/proc/clack() + playsound(src, clack_sound, vol = 100, vary = FALSE) + icon_state = base_icon_state + +/obj/item/kitchen/tongs/Exited(atom/movable/leaving, direction) + . = ..() + if (leaving != tonged) + return + tonged = null + update_appearance(UPDATE_ICON) + +/obj/item/kitchen/tongs/pre_attack(obj/item/attacked, mob/living/user, params) + if (!isnull(tonged)) + attacked.attackby(tonged, user) + return TRUE + if (isliving(attacked)) + if (COOLDOWN_FINISHED(src, clack_cooldown)) + click_clack() + return ..() + if (!IsEdible(attacked) || attacked.w_class > WEIGHT_CLASS_NORMAL || !isnull(tonged)) + return ..() + tonged = attacked + attacked.do_pickup_animation(src) + attacked.forceMove(src) + update_appearance(UPDATE_ICON) + +/obj/item/kitchen/tongs/update_overlays() + . = ..() + if (isnull(tonged)) + return + var/mutable_appearance/held_food = new /mutable_appearance(tonged.appearance) + held_food.layer = layer + held_food.plane = plane + held_food.transform = held_food.transform.Scale(0.7, 0.7) + held_food.pixel_x = 6 + held_food.pixel_y = 6 + . += held_food diff --git a/code/modules/cargo/packs/organic.dm b/code/modules/cargo/packs/organic.dm index 73c98cb4b3ab32..eb26d5ec907f77 100644 --- a/code/modules/cargo/packs/organic.dm +++ b/code/modules/cargo/packs/organic.dm @@ -299,10 +299,12 @@ ONLY 5000 BUX GET NOW! Contains a grill and fuel." cost = CARGO_CRATE_VALUE * 8 crate_type = /obj/structure/closet/crate - contains = list(/obj/item/stack/sheet/mineral/coal/five, - /obj/machinery/grill/unwrenched, - /obj/item/reagent_containers/cup/soda_cans/monkey_energy, - ) + contains = list( + /obj/item/stack/sheet/mineral/coal/five, + /obj/item/kitchen/tongs, + /obj/item/reagent_containers/cup/soda_cans/monkey_energy, + /obj/machinery/grill/unwrenched, + ) crate_name = "grilling starter kit crate" /datum/supply_pack/organic/grillfuel diff --git a/code/modules/jobs/job_types/cook.dm b/code/modules/jobs/job_types/cook.dm index a3f03c2d9b13dd..e96bae827fa9b7 100644 --- a/code/modules/jobs/job_types/cook.dm +++ b/code/modules/jobs/job_types/cook.dm @@ -33,13 +33,14 @@ // Adds up to 100, don't mess it up mail_goodies = list( /obj/item/storage/box/ingredients/random = 40, - /obj/item/reagent_containers/cup/bottle/caramel = 8, - /obj/item/reagent_containers/condiment/flour = 8, - /obj/item/reagent_containers/condiment/rice = 8, - /obj/item/reagent_containers/condiment/ketchup = 8, - /obj/item/reagent_containers/condiment/enzyme = 8, - /obj/item/reagent_containers/condiment/soymilk = 8, + /obj/item/reagent_containers/cup/bottle/caramel = 7, + /obj/item/reagent_containers/condiment/flour = 7, + /obj/item/reagent_containers/condiment/rice = 7, + /obj/item/reagent_containers/condiment/ketchup = 7, + /obj/item/reagent_containers/condiment/enzyme = 7, + /obj/item/reagent_containers/condiment/soymilk = 7, /obj/item/kitchen/spoon/soup_ladle = 6, + /obj/item/kitchen/tongs = 6, /obj/item/knife/kitchen = 4, /obj/item/knife/butcher = 2, ) diff --git a/code/modules/research/designs/autolathe/service_designs.dm b/code/modules/research/designs/autolathe/service_designs.dm index ea65fe3ef380e2..687e85d64361bb 100644 --- a/code/modules/research/designs/autolathe/service_designs.dm +++ b/code/modules/research/designs/autolathe/service_designs.dm @@ -142,6 +142,18 @@ ) departmental_flags = DEPARTMENT_BITFLAG_SERVICE +/datum/design/tongs + name = "Tongs" + id = "tongs" + build_type = AUTOLATHE | PROTOLATHE | AWAY_LATHE + materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 2) + build_path = /obj/item/kitchen/tongs + category = list( + RND_CATEGORY_INITIAL, + RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_KITCHEN, + ) + departmental_flags = DEPARTMENT_BITFLAG_SERVICE + /datum/design/tray name = "Serving Tray" id = "servingtray" diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index d12ebfaca1e4d6..16bd5a8ebdd542 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -114,6 +114,7 @@ "titaniumglass", "toner_large", "toner", + "tongs", "toy_armblade", "toy_balloon", "toygun", diff --git a/code/modules/vending/drinnerware.dm b/code/modules/vending/drinnerware.dm index 2e00d9d2a01a41..c37750a2d3d8e4 100644 --- a/code/modules/vending/drinnerware.dm +++ b/code/modules/vending/drinnerware.dm @@ -14,6 +14,7 @@ /obj/item/kitchen/spoon/soup_ladle = 3, /obj/item/clothing/suit/apron/chef = 2, /obj/item/kitchen/rollingpin = 2, + /obj/item/kitchen/tongs = 2, /obj/item/knife/kitchen = 2, ), ), diff --git a/icons/obj/service/kitchen.dmi b/icons/obj/service/kitchen.dmi index cb47ddf35a2a6b..aeafe2591e9bdf 100644 Binary files a/icons/obj/service/kitchen.dmi and b/icons/obj/service/kitchen.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 972ed35951e699..8bafcd9ea69b82 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2157,6 +2157,7 @@ #include "code\game\objects\items\taster.dm" #include "code\game\objects\items\teleportation.dm" #include "code\game\objects\items\theft_tools.dm" +#include "code\game\objects\items\tongs.dm" #include "code\game\objects\items\toy_mechs.dm" #include "code\game\objects\items\toys.dm" #include "code\game\objects\items\trash.dm"