From 44612df9486b77e52ca88c8dc9063ee8f7f8ecc7 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 4 Nov 2022 18:57:19 +0100 Subject: [PATCH] [MIRROR] The screwdriver cocktail is now the world's worst screwdriver [MDB IGNORE] (#17354) * The screwdriver cocktail is now the world's worst screwdriver (#70862) ## About The Pull Request Screwdriver cocktail now secretly works as a screwdriver... just, the worst one ever. How the fuck are you doing that?! ## Why It's Good For The Game It's funny and I bet someone has tried this before ## Changelog :cl: add: Screwdriver cocktails now work as the world's worst screwdriver /:cl: * The screwdriver cocktail is now the world's worst screwdriver Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com> --- .../chemistry/reagents/alcohol_reagents.dm | 33 +++++++++++++++++++ .../reagent_containers/cups/drinkingglass.dm | 2 ++ 2 files changed, 35 insertions(+) diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index a59f059da31..a2a1e846918 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -657,6 +657,39 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer." chemical_flags = REAGENT_CAN_BE_SYNTHESIZED +/datum/reagent/consumable/ethanol/screwdrivercocktail/on_transfer(atom/atom, methods = TOUCH, trans_volume) + if(!(methods & INGEST)) + return ..() + + if(src == atom.reagents.get_master_reagent() && istype(atom, /obj/item/reagent_containers/cup/glass/drinkingglass)) + var/obj/item/reagent_containers/cup/glass/drinkingglass/drink = atom + drink.tool_behaviour = TOOL_SCREWDRIVER + var/list/reagent_change_signals = list( + COMSIG_REAGENTS_ADD_REAGENT, + COMSIG_REAGENTS_NEW_REAGENT, + COMSIG_REAGENTS_REM_REAGENT, + COMSIG_REAGENTS_DEL_REAGENT, + COMSIG_REAGENTS_CLEAR_REAGENTS, + COMSIG_REAGENTS_REACTED, + ) + RegisterSignal(drink.reagents, reagent_change_signals, .proc/on_reagent_change) + + return ..() + +/datum/reagent/consumable/ethanol/screwdrivercocktail/proc/on_reagent_change(datum/reagents/reagents) + SIGNAL_HANDLER + if(src != reagents.get_master_reagent()) + var/obj/item/reagent_containers/cup/glass/drinkingglass/drink = reagents.my_atom + drink.tool_behaviour = initial(drink.tool_behaviour) + UnregisterSignal(reagents, list( + COMSIG_REAGENTS_ADD_REAGENT, + COMSIG_REAGENTS_NEW_REAGENT, + COMSIG_REAGENTS_REM_REAGENT, + COMSIG_REAGENTS_DEL_REAGENT, + COMSIG_REAGENTS_CLEAR_REAGENTS, + COMSIG_REAGENTS_REACTED, + )) + /datum/reagent/consumable/ethanol/screwdrivercocktail/on_mob_life(mob/living/carbon/drinker, delta_time, times_fired) var/obj/item/organ/internal/liver/liver = drinker.getorganslot(ORGAN_SLOT_LIVER) if(HAS_TRAIT(liver, TRAIT_ENGINEER_METABOLISM)) diff --git a/code/modules/reagents/reagent_containers/cups/drinkingglass.dm b/code/modules/reagents/reagent_containers/cups/drinkingglass.dm index bcf37422af4..aaa6d5ee5c1 100644 --- a/code/modules/reagents/reagent_containers/cups/drinkingglass.dm +++ b/code/modules/reagents/reagent_containers/cups/drinkingglass.dm @@ -15,6 +15,8 @@ drop_sound = 'sound/items/handling/drinkglass_drop.ogg' pickup_sound = 'sound/items/handling/drinkglass_pickup.ogg' custom_price = PAYCHECK_LOWER + //the screwdriver cocktail can make a drinking glass into the world's worst screwdriver. beautiful. + toolspeed = 25 /obj/item/reagent_containers/cup/glass/drinkingglass/on_reagent_change(datum/reagents/holder, ...) . = ..()