Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/datums/components/bakeable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
used_tray.AddToPlate(baked_result)

if(positive_result)
new /obj/effect/abstract/smell/oven/good(used_oven.loc)
new /obj/effect/abstract/smell/oven/good(used_oven)
BLACKBOX_LOG_FOOD_MADE(baked_result.type)
else
new /obj/effect/abstract/smell/oven/bad(used_oven.loc)
new /obj/effect/abstract/smell/oven/bad(used_oven)

SEND_SIGNAL(parent, COMSIG_ITEM_BAKED, baked_result)
qdel(parent)
Expand Down
3 changes: 2 additions & 1 deletion code/datums/elements/decals/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
. = ..()
RegisterSignal(as_item, COMSIG_ATOM_GET_EXAMINE_NAME, PROC_REF(get_examine_name), TRUE)
RegisterSignal(as_item, COMSIG_ATOM_COLOR_UPDATED, PROC_REF(on_color_update), TRUE)
RegisterSignal(as_item, COMSIG_ORGAN_SURGICALLY_REMOVED, PROC_REF(Detach), TRUE)

/datum/element/decal/blood/Detach(atom/source)
UnregisterSignal(source, list(COMSIG_ATOM_GET_EXAMINE_NAME, COMSIG_ATOM_COLOR_UPDATED))
UnregisterSignal(source, list(COMSIG_ATOM_GET_EXAMINE_NAME, COMSIG_ATOM_COLOR_UPDATED, COMSIG_ORGAN_SURGICALLY_REMOVED))
if (isitem(source))
var/obj/item/source_item = source
REMOVE_KEEP_TOGETHER(source_item, type)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/wounds/scars/_scars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
if(WOUND_SEVERITY_LOSS)
msg = "[victim.p_Their()] [limb.plaintext_zone] [description]." // different format
msg = span_notice("<i><b>[msg]</b></i>")
return "\t[msg]"
return msg

/// Whether a scar can currently be seen by the viewer
/datum/scar/proc/is_visible(mob/viewer)
Expand Down
28 changes: 15 additions & 13 deletions code/game/objects/effects/decals/cleanable/humans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,16 @@

/// Add the passed smell with the passed category to the blood
/// Can optionally pass a multiplier which affects both intensity and radius
/obj/effect/decal/cleanable/blood/proc/add_smell(smell, category, multiplier = 1)
var/intensity = max(floor(bloodiness * 0.2 * multiplier), SMELL_INTENSITY_FAINT)
var/radius = round(bloodiness * 0.04 * multiplier)
/obj/effect/decal/cleanable/blood/proc/add_tracked_smell(smell, category, multiplier = 1)
var/effective_bloodiness = min(bloodiness, BLOOD_AMOUNT_PER_DECAL * 2)
var/intensity = max(floor(effective_bloodiness * 0.1 * multiplier), SMELL_INTENSITY_FAINT)
var/radius = round(effective_bloodiness * 0.02 * multiplier)
AddElement(/datum/element/simple_smell, \
smell = smell, \
smell_basetype = /datum/smell/blood, \
category = category, \
smell = smell, \
intensity = intensity, \
radius = radius, \
id = "dna", \
smell_basetype = /datum/smell/blood, \
)
LAZYADD(smell_elements_present, list(list(
"smell" = smell,
Expand All @@ -198,18 +198,17 @@
unique_smells["[blood.scent_text]-[blood.scent_category]"] += 1
for(var/blood_smell, count in unique_smells)
var/resplit_smell = splittext(blood_smell, "-")
add_smell(text2path(resplit_smell[1]) || resplit_smell[1], resplit_smell[2], count / GET_ATOM_BLOOD_DNA_LENGTH(src))
add_tracked_smell(text2path(resplit_smell[1]) || resplit_smell[1], resplit_smell[2], count / GET_ATOM_BLOOD_DNA_LENGTH(src))
last_bloodiness_refresh = bloodiness

/obj/effect/decal/cleanable/blood/proc/clear_smells()
for(var/list/smell_element as anything in smell_elements_present)
RemoveElement(/datum/element/simple_smell, \
smell = smell_element["smell"], \
smell_basetype = /datum/smell/blood, \
category = smell_element["category"], \
smell = smell_element["smell"], \
intensity = smell_element["intensity"], \
radius = smell_element["radius"], \
id = "dna", \
smell_basetype = /datum/smell/blood, \
)
LAZYREMOVE(smell_elements_present, list(smell_element))

Expand Down Expand Up @@ -374,7 +373,7 @@
very_bloody = TRUE
icon_state = pick("trails_1", "trails_2")

/obj/effect/decal/cleanable/blood/trail/add_smell(smell, category, multiplier)
/obj/effect/decal/cleanable/blood/trail/add_tracked_smell(smell, category, multiplier)
if(!isturf(loc))
return // fake
return ..()
Expand Down Expand Up @@ -499,7 +498,7 @@
. = ..()
setDir(pick(GLOB.cardinals))
AddElement(/datum/element/swabable, CELL_LINE_TABLE_SLUDGE, CELL_VIRUS_TABLE_GENERIC, rand(2,4), 10)
AddElement(/datum/element/simple_smell, /datum/smell/decay, SMELL_INTENSITY_STRONG, 1)
add_smell(smell = /datum/smell/decay, intensity = SMELL_INTENSITY_STRONG, radius = 1)

/obj/effect/decal/cleanable/blood/drip
name = "drop of blood"
Expand All @@ -511,7 +510,7 @@
dry_desc = "A dried spattering."
drying_time = 1 MINUTES

/obj/effect/decal/cleanable/blood/drip/add_smell(smell, category, multiplier)
/obj/effect/decal/cleanable/blood/drip/add_tracked_smell(smell, category, multiplier)
if(!isturf(loc))
return // fake
return ..()
Expand Down Expand Up @@ -658,6 +657,9 @@
if(splatter_strength)
src.splatter_strength = splatter_strength

/obj/effect/decal/cleanable/blood/hitsplatter/add_tracked_smell(smell, category, multiplier)
return // ephemeral

/obj/effect/decal/cleanable/blood/hitsplatter/proc/expire()
if(isturf(loc) && !skip)
playsound(src, 'sound/effects/wounds/splatter.ogg', 60, TRUE, -1)
Expand Down
10 changes: 5 additions & 5 deletions code/game/objects/effects/decals/cleanable/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
leave_smell()

/obj/effect/decal/cleanable/vomit/proc/leave_smell()
AddElement(/datum/element/simple_smell, "vomit", SMELL_INTENSITY_STRONG, 1)
add_smell(smell = "vomit", intensity = SMELL_INTENSITY_STRONG, radius = 1)

/obj/effect/decal/cleanable/vomit/attack_hand(mob/user, list/modifiers)
. = ..()
Expand Down Expand Up @@ -336,7 +336,7 @@
/obj/effect/decal/cleanable/garbage/Initialize(mapload)
. = ..()
AddElement(/datum/element/swabable, CELL_LINE_TABLE_SLUDGE, CELL_VIRUS_TABLE_GENERIC, rand(2,4), 15)
AddElement(/datum/element/simple_smell, "rotting garbage", SMELL_INTENSITY_MODERATE, 2, "stench")
add_smell(category = "stench", smell = "rotting garbage", intensity = SMELL_INTENSITY_MODERATE, radius = 2)

/obj/effect/decal/cleanable/ants
name = "space ants"
Expand Down Expand Up @@ -454,9 +454,9 @@
return INITIALIZE_HINT_QDEL

if(burn_stacks)
burn_amount = max(min(burn_stacks, 10), 1)

AddElement(/datum/element/simple_smell, "fuel", floor(SMELL_INTENSITY_MODERATE * burn_amount * 0.1), 1, "stench")
burn_amount = clamp(burn_stacks, 1, 10)
if(burn_amount > 1)
add_smell(category = "stench", smell = "fuel", intensity = floor(SMELL_INTENSITY_MODERATE * burn_amount * 0.1), radius = 1)

/obj/effect/decal/cleanable/fuel_pool/fire_act(exposed_temperature, exposed_volume)
. = ..()
Expand Down
7 changes: 4 additions & 3 deletions code/game/objects/effects/decals/cleanable/robots.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@

/obj/effect/decal/cleanable/oil/Initialize(mapload, list/datum/disease/diseases)
. = ..()
AddElement(/datum/element/easy_ignite) // NON-MODULE CHANGE
AddElement(/datum/element/simple_smell, /datum/smell/oil, SMELL_INTENSITY_STRONG, 2) // NON-MODULE CHANGE
add_blood_DNA(list("CRUDE OIL" = /datum/blood_type/oil)) // NON-MODULE CHANGE : For bloody shoes // Yeah don't think about it too much
// NON-MODULE CHANGE
AddElement(/datum/element/easy_ignite)
add_smell(smell = /datum/smell/oil, intensity = SMELL_INTENSITY_STRONG, radius = 2)
add_blood_DNA(list("CRUDE OIL" = /datum/blood_type/oil))

/obj/effect/decal/cleanable/oil/streak
icon_state = "streak1"
Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/items/cigs_lighters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/cigarette/proc/handle_reagents(mob/living/carbon/smoker, seconds_per_tick)
reagents.expose_temperature(heat, 0.05)
if(reagents.has_reagent(/datum/reagent/drug/nicotine, 1, check_subtypes = TRUE))
new /obj/effect/abstract/smell/cigarette_smoke(get_turf(smoker || src))
new /obj/effect/abstract/smell/cigarette_smoke/lingering(get_turf(src))
new /obj/effect/abstract/smell/cigarette_smoke(src)
new /obj/effect/abstract/smell/cigarette_smoke(smoker)
if(reagents.total_volume <= 0) //may have reacted and gone to 0 after expose_temperature
return

Expand Down
8 changes: 1 addition & 7 deletions code/game/objects/items/storage/backpack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,7 @@
/datum/component/bloody_spreader,\
blood_dna = list("UNKNOWN DNA" = /datum/blood_type/animal),\
)
AddComponent(
/datum/component/complex_smell, \
duration = INFINITY, \
smell = "meat", \
intensity = SMELL_INTENSITY_STRONG, \
radius = 2, \
)
add_smell(smell = "meat", intensity = SMELL_INTENSITY_STRONG, radius = 2)
atom_storage.storage_sound = 'sound/effects/blobattack.ogg'

/*
Expand Down
12 changes: 10 additions & 2 deletions code/game/objects/structures/bonfire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@
bonfire_burn()
particles = new /particles/bonfire()
START_PROCESSING(SSobj, src)
AddElement(/datum/element/simple_smell, "smoke", SMELL_INTENSITY_STRONG, 5)
AddElement(/datum/element/simple_smell, \
smell = "smoke", \
intensity = SMELL_INTENSITY_STRONG, \
radius = 5, \
)

/obj/structure/bonfire/fire_act(exposed_temperature, exposed_volume)
start_burning()
Expand Down Expand Up @@ -174,7 +178,11 @@
set_light(0)
QDEL_NULL(particles)
STOP_PROCESSING(SSobj, src)
RemoveElement(/datum/element/simple_smell, "smoke", SMELL_INTENSITY_STRONG, 5)
RemoveElement(/datum/element/simple_smell, \
smell = "smoke", \
intensity = SMELL_INTENSITY_STRONG, \
radius = 5, \
)

/obj/structure/bonfire/buckle_mob(mob/living/buckled_mob, force = FALSE, check_loc = TRUE)
if(..())
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/headpike.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
if(mapload)
CheckParts()
pixel_x = rand(-8, 8)
AddElement(/datum/element/simple_smell, /datum/smell/decay, SMELL_INTENSITY_MODERATE, 2)
add_smell(smell = /datum/smell/decay, intensity = SMELL_INTENSITY_MODERATE, radius = 2)

/obj/structure/headpike/Destroy()
QDEL_NULL(victim)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fishing/fish/_fish.dm
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
register_context()
register_item_context()

AddElement(/datum/element/simple_smell, "fish", SMELL_INTENSITY_WEAK, 2)
add_smell(smell = "fish", intensity = SMELL_INTENSITY_WEAK, radius = 2)

/obj/item/fish/add_item_context(atom/source, list/context, obj/item/held_item, mob/user)
if(HAS_TRAIT(source, TRAIT_CATCH_AND_RELEASE))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/food_and_drinks/machinery/deep_fryer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
audible_message(span_notice("[src] dings!"))
else if (cook_time >= DEEPFRYER_BURNTIME && !frying_burnt)
frying_burnt = TRUE
new /obj/effect/abstract/smell/oven/bad/fryer(loc)
new /obj/effect/abstract/smell/oven/bad/fryer(src)

use_energy(active_power_usage)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/food_and_drinks/machinery/oven.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
baked_item.fire_act(1000) //Hot hot hot!

if(SPT_PROB(10, seconds_per_tick))
new /obj/effect/abstract/smell/oven/bad(loc)
new /obj/effect/abstract/smell/oven/bad(src)

set_smoke_state(worst_cooked_food_state)
update_appearance()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/food_and_drinks/recipes/soup_mixtures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

testing("Soup reaction finished with a total react volume of [react_vol] and [length(pot.added_ingredients)] ingredients. Cleaning up.")
clean_up(holder, reaction, react_vol)
new /obj/effect/abstract/smell/oven/good(get_turf(pot))
new /obj/effect/abstract/smell/oven/good(pot)

/**
* Cleans up the ingredients and adds whatever leftover reagents to the mixture
Expand Down
2 changes: 1 addition & 1 deletion code/modules/forensics/_forensics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@

/// Updates the blood displayed on parent
/datum/forensics/proc/check_blood()
if(!isitem(parent) || isorgan(parent)) // organs don't spawn with blood decals by default
if(!isitem(parent))
return
if(!length(blood_DNA))
return
Expand Down
21 changes: 13 additions & 8 deletions code/modules/forensics/forensics_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@
var/blood_type_to_use = all_dna[all_dna[1]]
return find_blood_type(blood_type_to_use).color

/obj/item/organ/get_blood_dna_color()
if(isnull(blood_dna_info))
return COLOR_BLOOD
var/blood_type_to_use = blood_dna_info[blood_dna_info[1]]
return find_blood_type(blood_type_to_use).color

/// Adds blood dna to the atom
/atom/proc/add_blood_DNA(list/blood_DNA_to_add) //ASSOC LIST DNA = BLOODTYPE
return FALSE
Expand Down Expand Up @@ -144,14 +150,13 @@
for(var/some_dna, blood_type in blood_DNA_to_add)
var/datum/blood_type/blood = find_blood_type(blood_type)
if(blood.scent_text)
AddComponent( \
/datum/component/complex_smell, \
duration = duration, \
smell = blood.scent_text, \
category = blood.scent_category, \
smell_basetype = /datum/smell/blood, \
intensity = intensity, \
radius = radius, \
add_smell(
duration = duration,
base_type = /datum/smell/blood,
smell = blood.scent_text,
category = blood.scent_category,
intensity = intensity,
radius = radius,
)

/obj/item/add_blood_DNA(list/blood_DNA_to_add)
Expand Down
13 changes: 11 additions & 2 deletions code/modules/hydroponics/grown/flowers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@
distill_reagent = /datum/reagent/consumable/ethanol/vermouth
drop_sound = 'maplestation_modules/sound/items/drop/herb.ogg'
pickup_sound = 'maplestation_modules/sound/items/pickup/herb.ogg'
juice_typepath = /datum/reagent/medicine/painkiller/oxycodone

/obj/item/food/grown/poppy/Initialize(mapload, obj/item/seeds/new_seed)
. = ..()
AddElement(/datum/element/simple_smell, "flowers", SMELL_INTENSITY_WEAK, 1, "fragrance")
add_smell(category = "fragrance", smell = "flowers", intensity = SMELL_INTENSITY_WEAK, radius = 1)

/obj/item/food/grown/poppy/grind(datum/reagents/target_holder, mob/user)
. = ..()
if(!.)
return
target_holder.add_reagent(/datum/reagent/perfume, round(seed.potency * pick(0.01, 0.02, 0.03), CHEMICAL_VOLUME_ROUNDING))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this just be a reagent gene? This feels way too snowflaked for my liking.

And yes, that would also allow making perfumes from any plant, which sounds funny. Eau de Gatfruit

Copy link
Owner Author

@MrMelbert MrMelbert Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wanted to get it in as a proof of concept where it can be expanded upon later, ie. different plants giving different scents


// Lily
/obj/item/seeds/poppy/lily
Expand All @@ -55,6 +62,7 @@
name = "lily"
desc = "A beautiful white flower."
icon_state = "lily"
juice_typepath = null

//Spacemans's Trumpet
/obj/item/seeds/poppy/lily/trumpet
Expand Down Expand Up @@ -111,6 +119,7 @@
name = "geranium"
desc = "A beautiful blue flower."
icon_state = "geranium"
juice_typepath = null

///Fraxinella seeds.
/obj/item/seeds/poppy/geranium/fraxinella
Expand Down Expand Up @@ -315,7 +324,7 @@

/obj/item/food/grown/rose/Initialize(mapload, obj/item/seeds/new_seed)
. = ..()
AddElement(/datum/element/simple_smell, "roses", SMELL_INTENSITY_WEAK, 1, "fragrance")
add_smell(category = "fragrance", smell = "roses", intensity = SMELL_INTENSITY_WEAK, radius = 1)

/obj/item/food/grown/rose/equipped(mob/user, slot, initial)
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/hydroponics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@

/obj/machinery/hydroponics/soil/Initialize(mapload)
. = ..()
AddElement(/datum/element/simple_smell, "fresh soil", SMELL_INTENSITY_WEAK, 1)
add_smell(smell = "fresh soil", intensity = SMELL_INTENSITY_WEAK, radius = 1)

/obj/machinery/hydroponics/soil/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/screwdriver)
return NONE
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@
age_text = "very old"
if(101 to INFINITY)
age_text = "withering away"
. += list(span_notice("[p_They()] appear[p_s()] to be [age_text]."))
. += list(span_info("[p_They()] appear[p_s()] to be [age_text]."))

/// Reports the height difference between src and user
/mob/living/carbon/proc/get_height_difference(mob/user)
Expand Down Expand Up @@ -693,7 +693,7 @@
if(6 to INFINITY)
. += " [p_Theyre()] also significantly taller than a typical [dna.species]."

return span_notice(.)
return span_info(.)

/// Returns the mob height modified by traits purely
/mob/living/carbon/human/proc/get_visual_height()
Expand Down Expand Up @@ -735,7 +735,7 @@
if(!.)
return

return span_notice(.)
return span_info(.)


/mob/living/carbon/human/proc/get_visual_strength()
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/human/dummy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy)
ORGAN_SLOT_EYES, ORGAN_SLOT_EARS, ORGAN_SLOT_TONGUE, ORGAN_SLOT_LIVER, ORGAN_SLOT_STOMACH))
var/obj/item/organ/current_organ = get_organ_slot(slot) //Time to cache it lads
if(current_organ)
current_organ.blood_dna_info = null // ensure no DNA exists
current_organ.Remove(src, special = TRUE) //Please don't somehow kill our dummy
SSwardrobe.stash_object(current_organ)

var/datum/species/current_species = dna.species
for(var/organ_path in current_species.mutant_organs)
var/obj/item/organ/current_organ = get_organ_by_type(organ_path)
if(current_organ)
current_organ.blood_dna_info = null // ensure no DNA exists
current_organ.Remove(src, special = TRUE) //Please don't somehow kill our dummy
SSwardrobe.stash_object(current_organ)

Expand Down
Loading
Loading