New station trait: Spiked Drinks (#87084)

## About The Pull Request

Adds a new "Spiked Drinks" station trait which makes soda vendors have a
65% chance of dispensing drinks spiked with various booze. Most likely
it'll be relatively harmless but there's a small chance of getting
funkier mixtures instead.

## Why It's Good For The Game

Its a rare-ish (3 weight) trait that mixes up the pool and fucks with
some of the crew a bit. Some round variety and potential for shenanigans
is always good.

## Changelog
🆑
add: New station trait "Spiked Drinks" that will add booze to most sodas
has been added to rotation.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
SmArtKar
2024-10-09 17:42:38 +02:00
committed by GitHub
co-authored by Ghom
parent 2f30e7f19d
commit 79c56ebc04
7 changed files with 60 additions and 7 deletions
+4
View File
@@ -1086,6 +1086,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define STATION_TRAIT_UNIQUE_AI "station_trait_unique_ai"
#define STATION_TRAIT_UNNATURAL_ATMOSPHERE "station_trait_unnatural_atmosphere"
#define STATION_TRAIT_VENDING_SHORTAGE "station_trait_vending_shortage"
#define STATION_TRAIT_SPIKED_DRINKS "station_trait_spiked_drinks"
///Deathmatch traits
#define TRAIT_DEATHMATCH_EXPLOSIVE_IMPLANTS "deathmath_explosive_implants"
@@ -1311,6 +1312,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
///Trait which allows mobs to parry mining mob projectiles
#define TRAIT_MINING_PARRYING "mining_parrying"
///Trait which silences all chemical reactions in its container
#define TRAIT_SILENT_REACTIONS "silent_reactions"
/**
*
* This trait is used in some interactions very high in the interaction chain to allow
+2
View File
@@ -77,6 +77,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_WADDLING" = TRAIT_WADDLING,
"TRAIT_WAS_RENAMED" = TRAIT_WAS_RENAMED,
"TRAIT_WEATHER_IMMUNE" = TRAIT_WEATHER_IMMUNE,
"TRAIT_SILENT_REACTIONS" = TRAIT_SILENT_REACTIONS,
),
/datum/controller/subsystem/economy = list(
"TRAIT_MARKET_CRASHING" = TRAIT_MARKET_CRASHING,
@@ -111,6 +112,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"STATION_TRAIT_UNIQUE_AI" = STATION_TRAIT_UNIQUE_AI,
"STATION_TRAIT_UNNATURAL_ATMOSPHERE" = STATION_TRAIT_UNNATURAL_ATMOSPHERE,
"STATION_TRAIT_VENDING_SHORTAGE" = STATION_TRAIT_VENDING_SHORTAGE,
"STATION_TRAIT_SPIKED_DRINKS" = STATION_TRAIT_SPIKED_DRINKS,
),
/datum/deathmatch_lobby = list(
"TRAIT_DEATHMATCH_EXPLOSIVE_IMPLANTS" = TRAIT_DEATHMATCH_EXPLOSIVE_IMPLANTS,
+1
View File
@@ -22,6 +22,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_SCARY_FISHERMAN" = TRAIT_SCARY_FISHERMAN,
"TRAIT_SNOWSTORM_IMMUNE" = TRAIT_SNOWSTORM_IMMUNE,
"TRAIT_WEATHER_IMMUNE" = TRAIT_WEATHER_IMMUNE,
"TRAIT_SILENT_REACTIONS" = TRAIT_SILENT_REACTIONS,
),
/mob = list(
"TRAIT_ABDUCTOR_SCIENTIST_TRAINING" = TRAIT_ABDUCTOR_SCIENTIST_TRAINING,
@@ -756,4 +756,13 @@
advisory_string += "The ongoing blizzard has interfered with our surveillance equipment, and we cannot provide an accurate threat summary at this time. We advise you to stay safe and avoid traversing the area around the station."
return advisory_string
/datum/station_trait/spiked_drinks
name = "Spiked Drinks"
trait_type = STATION_TRAIT_NEGATIVE
weight = 3
cost = STATION_TRAIT_COST_LOW
show_in_report = TRUE
report_message = "Due to a mishap at the Robust Softdrinks Megafactory, some drinks may contain traces of ethanol or psychoactive chemicals."
trait_to_give = STATION_TRAIT_SPIKED_DRINKS
#undef GLOW_NEBULA
@@ -381,7 +381,7 @@
holder.adjust_thermal_energy(heat_energy * SPECIFIC_HEAT_DEFAULT, 0, CHEMICAL_MAXIMUM_TEMPERATURE)
//Give a chance of sounds
if(prob(5))
if(prob(5) && !HAS_TRAIT(holder.my_atom, TRAIT_SILENT_REACTIONS))
holder.my_atom.audible_message(span_notice("[icon2html(holder.my_atom, viewers(DEFAULT_MESSAGE_RANGE, src))] [reaction.mix_message]"))
if(reaction.mix_sound)
playsound(get_turf(holder.my_atom), reaction.mix_sound, 80, TRUE)
@@ -183,7 +183,7 @@
if(num_reactions)
SEND_SIGNAL(src, COMSIG_REAGENTS_REACTION_STEP, num_reactions, seconds_per_tick)
if(length(mix_message)) //This is only at the end
if(length(mix_message) && !HAS_TRAIT(my_atom, TRAIT_SILENT_REACTIONS)) //This is only at the end
my_atom.audible_message(span_notice("[icon2html(my_atom, viewers(DEFAULT_MESSAGE_RANGE, src))] [mix_message.Join()]"))
if(!LAZYLEN(reaction_list))
@@ -210,9 +210,12 @@
stack_trace("The equilibrium datum currently processing in this reagents datum had a desynced holder to the ending reaction. src holder:[my_atom] | equilibrium holder:[equilibrium.holder.my_atom] || src type:[my_atom.type] | equilibrium holder:[equilibrium.holder.my_atom.type]")
LAZYREMOVE(reaction_list, equilibrium)
var/reaction_message = equilibrium.reaction.mix_message
if(equilibrium.reaction.mix_sound)
playsound(get_turf(my_atom), equilibrium.reaction.mix_sound, 80, TRUE)
var/reaction_message = null
if (!HAS_TRAIT(my_atom, TRAIT_SILENT_REACTIONS))
reaction_message = equilibrium.reaction.mix_message
if(equilibrium.reaction.mix_sound)
playsound(get_turf(my_atom), equilibrium.reaction.mix_sound, 80, TRUE)
qdel(equilibrium)
update_total()
SEND_SIGNAL(src, COMSIG_REAGENTS_REACTED, .)
@@ -256,7 +259,7 @@
if(result == reagent.type)
mix_message += end_reaction(equilibrium)
any_stopped = TRUE
if(length(mix_message))
if(length(mix_message) && !HAS_TRAIT(my_atom, TRAIT_SILENT_REACTIONS))
my_atom.audible_message(span_notice("[icon2html(my_atom, viewers(DEFAULT_MESSAGE_RANGE, src))][mix_message.Join()]"))
return any_stopped
@@ -326,7 +329,7 @@
var/list/seen = viewers(4, get_turf(my_atom))
var/iconhtml = icon2html(cached_my_atom, seen)
if(cached_my_atom)
if(!ismob(cached_my_atom)) // No bubbling mobs
if(!ismob(cached_my_atom) && !HAS_TRAIT(my_atom, TRAIT_SILENT_REACTIONS)) // No bubbling mobs
if(selected_reaction.mix_sound)
playsound(get_turf(cached_my_atom), selected_reaction.mix_sound, 80, TRUE)
my_atom.audible_message(span_notice("[iconhtml] [selected_reaction.mix_message]"))
+34
View File
@@ -36,6 +36,40 @@
extra_price = PAYCHECK_CREW
payment_department = ACCOUNT_SRV
var/static/list/spiking_booze = list(
// Your "common" spiking booze
/datum/reagent/consumable/ethanol/vodka = 5,
/datum/reagent/consumable/ethanol/beer = 5,
/datum/reagent/consumable/ethanol/whiskey = 5,
/datum/reagent/consumable/ethanol/gin = 5,
/datum/reagent/consumable/ethanol/rum = 5,
// A bit rarer, can be dangerous if you take too much
/datum/reagent/consumable/ethanol/thirteenloko = 3,
/datum/reagent/consumable/ethanol/absinthe = 3,
/datum/reagent/consumable/ethanol/hooch = 3,
/datum/reagent/consumable/ethanol/moonshine = 3,
// Gets funky here
/datum/reagent/consumable/ethanol/beepsky_smash = 1,
/datum/reagent/consumable/ethanol/gargle_blaster = 1,
/datum/reagent/consumable/ethanol/neurotoxin = 1,
)
/obj/machinery/vending/cola/on_dispense(obj/item/vended_item)
// 35% chance that your drink will be safe, as safe pure acid and sugar that these drinks probably are can be
if(!onstation || !HAS_TRAIT(SSstation, STATION_TRAIT_SPIKED_DRINKS) || !prob(65))
return
// Don't fill booze with more booze
if (isnull(vended_item.reagents) || vended_item.reagents.has_reagent(/datum/reagent/consumable/ethanol, check_subtypes = TRUE))
return
var/removed_volume = vended_item.reagents.remove_all(rand(5, vended_item.reagents.maximum_volume * 0.5))
if (!removed_volume)
return
// Don't want bubbling sodas when we add some rum to cola
ADD_TRAIT(vended_item, TRAIT_SILENT_REACTIONS, VENDING_MACHINE_TRAIT)
vended_item.reagents.add_reagent(pick_weight(spiking_booze), removed_volume)
vended_item.reagents.handle_reactions()
REMOVE_TRAIT(vended_item, TRAIT_SILENT_REACTIONS, VENDING_MACHINE_TRAIT)
/obj/item/vending_refill/cola
machine_name = "Robust Softdrinks"
icon_state = "refill_cola"