[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

🆑
add: Screwdriver cocktails now work as the world's worst screwdriver
/🆑

* The screwdriver cocktail is now the world's worst screwdriver

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-11-04 10:57:19 -07:00
committed by GitHub
co-authored by tralezab
parent 0f08de665c
commit 44612df948
2 changed files with 35 additions and 0 deletions
@@ -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))
@@ -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, ...)
. = ..()