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, ...) . = ..()