diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 709677b5fd7..4fb316a8410 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -306,8 +306,7 @@ if(chem in spray_chems) var/datum/reagents/holder = new() holder.add_reagent(chem_buttons[chem], 10) //I hope this is the correct way to do this. - holder.expose(occupant, VAPOR, 0) - holder.trans_to(occupant, 10) + holder.trans_to(occupant, 10, method = VAPOR) playsound(src.loc, 'sound/effects/spray2.ogg', 50, TRUE, -6) if(user) log_combat(user, occupant, "sprayed [chem] into", addition = "via [src]") diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index d1ba0ebf129..066c2568554 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -331,8 +331,7 @@ R += "[A.name] ([num2text(A.volume)]" mechsyringe.icon_state = initial(mechsyringe.icon_state) mechsyringe.icon = initial(mechsyringe.icon) - mechsyringe.reagents.expose(M, INJECT) - mechsyringe.reagents.trans_to(M, mechsyringe.reagents.total_volume, transfered_by = originaloccupant) + mechsyringe.reagents.trans_to(M, mechsyringe.reagents.total_volume, transfered_by = originaloccupant, method = INJECT) M.take_bodypart_damage(2) log_combat(originaloccupant, M, "shot", "syringegun") break diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 4059a05a5f8..7c8e4c064d2 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -427,8 +427,7 @@ if(affected_turfs.len) fraction /= affected_turfs.len for(var/t in affected_turfs) - reagents.expose(t, TOUCH, fraction * volume_multiplier) - reagents.trans_to(t, ., volume_multiplier, transfered_by = user) + reagents.trans_to(t, ., volume_multiplier, transfered_by = user, method = TOUCH) check_empty(user) /obj/item/toy/crayon/attack(mob/M, mob/user) @@ -447,9 +446,7 @@ var/eaten = use_charges(user, 5, FALSE) if(check_empty(user)) //Prevents divsion by zero return - var/fraction = min(eaten / reagents.total_volume, 1) - reagents.expose(M, INGEST, fraction * volume_multiplier) - reagents.trans_to(M, eaten, volume_multiplier, transfered_by = user) + reagents.trans_to(M, eaten, volume_multiplier, transfered_by = user, method = INGEST) // check_empty() is called during afterattack else ..() @@ -673,9 +670,7 @@ H.lip_color = paint_color H.update_body() var/used = use_charges(user, 10, FALSE) - var/fraction = min(1, used / reagents.maximum_volume) - reagents.expose(user, VAPOR, fraction * volume_multiplier) - reagents.trans_to(user, used, volume_multiplier, transfered_by = user) + reagents.trans_to(user, used, volume_multiplier, transfered_by = user, method = VAPOR) return (OXYLOSS) @@ -742,9 +737,7 @@ else target.set_opacity(initial(target.opacity)) . = use_charges(user, 2) - var/fraction = min(1, . / reagents.maximum_volume) - reagents.expose(target, TOUCH, fraction * volume_multiplier) - reagents.trans_to(target, ., volume_multiplier, transfered_by = user) + reagents.trans_to(target, ., volume_multiplier, transfered_by = user, method = VAPOR) if(pre_noise || post_noise) playsound(user.loc, 'sound/effects/spray.ogg', 5, TRUE, 5) diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index 9aa8e286a1b..f037962ff06 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -419,8 +419,7 @@ return var/used_amount = injection_amount/usage_ratio - reagents.expose(user, INJECT,injection_amount,0) - reagents.trans_to(user,used_amount,multiplier=usage_ratio) + reagents.trans_to(user,used_amount,multiplier=usage_ratio, method = INJECT) update_icon() user.update_inv_back() //for overlays update diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index a3baa7e0d7d..c6e8d784d72 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -234,8 +234,7 @@ mob_occupant.Unconscious((mob_occupant.bodytemperature * unconscious_factor) * 2000) if(beaker) if(reagent_transfer == 0) // Magically transfer reagents. Because cryo magic. - beaker.reagents.trans_to(occupant, 1, efficiency * 0.25) // Transfer reagents. - beaker.reagents.expose(occupant, VAPOR) + beaker.reagents.trans_to(occupant, 1, efficiency * 0.25, method = VAPOR) // Transfer reagents. air1.gases[/datum/gas/oxygen][MOLES] -= max(0,air1.gases[/datum/gas/oxygen][MOLES] - 2 / efficiency) //Let's use gas for this air1.garbage_collect() if(++reagent_transfer >= 10 * efficiency) // Throttle reagent transfer (higher efficiency will transfer the same amount but consume less from the beaker). diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 8b389098f17..dad0d39e3f4 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -47,8 +47,7 @@ SEND_SIGNAL(src, COMSIG_DRINK_DRANK, M, user) var/fraction = min(gulp_size/reagents.total_volume, 1) checkLiked(fraction, M) - reagents.expose(M, INGEST, fraction) - reagents.trans_to(M, gulp_size, transfered_by = user) + reagents.trans_to(M, gulp_size, transfered_by = user, method = INGEST) playsound(M.loc,'sound/items/drink.ogg', rand(10,50), TRUE) if(iscarbon(M)) var/mob/living/carbon/carbon_drinker = M diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index 4dbe65a4175..c70ebc2d300 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -90,10 +90,7 @@ M.visible_message("[user] fed [M] from [src].", \ "[user] fed you from [src].") log_combat(user, M, "fed", reagents.log_list()) - - var/fraction = min(10/reagents.total_volume, 1) - reagents.expose(M, INGEST, fraction) - reagents.trans_to(M, 10, transfered_by = user) + reagents.trans_to(M, 10, transfered_by = user, method = INGEST) playsound(M.loc,'sound/items/drink.ogg', rand(10,50), TRUE) return 1 diff --git a/code/modules/food_and_drinks/food/snacks_other.dm b/code/modules/food_and_drinks/food/snacks_other.dm index 06b6bc30e14..b4cace10799 100644 --- a/code/modules/food_and_drinks/food/snacks_other.dm +++ b/code/modules/food_and_drinks/food/snacks_other.dm @@ -485,9 +485,7 @@ if(iscarbon(loc)) var/mob/living/carbon/C = loc if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob - var/fraction = min(REAGENTS_METABOLISM/reagents.total_volume, 1) - reagents.expose(C, INGEST, fraction) - if(!reagents.trans_to(C, REAGENTS_METABOLISM)) + if(!reagents.trans_to(C, REAGENTS_METABOLISM, method = INGEST)) reagents.remove_any(REAGENTS_METABOLISM) return reagents.remove_any(REAGENTS_METABOLISM) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 59f19869ba5..36e8ec89455 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -456,9 +456,7 @@ var/mob/living/L = target if(L.reagents && L.can_inject(null, 0)) var/injecting_amount = max(1, G.seed.potency*0.2) // Minimum of 1, max of 20 - var/fraction = min(injecting_amount/G.reagents.total_volume, 1) - G.reagents.expose(L, INJECT, fraction) - G.reagents.trans_to(L, injecting_amount) + G.reagents.trans_to(L, injecting_amount, method = INJECT) to_chat(target, "You are pricked by [G]!") log_combat(G, L, "pricked and attempted to inject reagents from [G] to [L]. Last touched by: [G.fingerprintslast].") diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 898c133a8a9..df2acb52b74 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -181,8 +181,8 @@ if(..()) if(reagents.total_volume) if(M.reagents) - reagents.expose(M, INJECT, reagents.total_volume) - reagents.trans_to(M, reagents.total_volume, transfered_by = user) + + reagents.trans_to(M, reagents.total_volume, transfered_by = user, method = INJECT) /obj/item/pen/sleepy/Initialize() diff --git a/code/modules/projectiles/projectile/bullets/dart_syringe.dm b/code/modules/projectiles/projectile/bullets/dart_syringe.dm index 5ad3f75bebd..51870d9a20d 100644 --- a/code/modules/projectiles/projectile/bullets/dart_syringe.dm +++ b/code/modules/projectiles/projectile/bullets/dart_syringe.dm @@ -15,8 +15,7 @@ if(blocked != 100) // not completely blocked if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body. ..() - reagents.expose(M, INJECT) - reagents.trans_to(M, reagents.total_volume) + reagents.trans_to(M, reagents.total_volume, method = INJECT) return BULLET_ACT_HIT else blocked = 100 diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 6711be55a1e..b151e4ef071 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -40,13 +40,14 @@ to_chat(M, "You feel a tiny prick!") to_chat(user, "You inject [M] with [src].") var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1) - reagents.expose(M, INJECT, fraction) + if(M.reagents) var/trans = 0 if(!infinite) - trans = reagents.trans_to(M, amount_per_transfer_from_this, transfered_by = user) + trans = reagents.trans_to(M, amount_per_transfer_from_this, transfered_by = user, method = INJECT) else + reagents.expose(M, INJECT, fraction) trans = reagents.copy_to(M, amount_per_transfer_from_this) to_chat(user, "[trans] unit\s injected. [reagents.total_volume] unit\s remaining in [src].") log_combat(user, M, "injected", src, "([contained])") diff --git a/code/modules/surgery/dental_implant.dm b/code/modules/surgery/dental_implant.dm index 7986f03b489..6bfe57311ab 100644 --- a/code/modules/surgery/dental_implant.dm +++ b/code/modules/surgery/dental_implant.dm @@ -38,7 +38,6 @@ to_chat(owner, "You grit your teeth and burst the implanted [target.name]!") log_combat(owner, null, "swallowed an implanted pill", target) if(target.reagents.total_volume) - target.reagents.expose(owner, INGEST) - target.reagents.trans_to(owner, target.reagents.total_volume, transfered_by = owner) + target.reagents.trans_to(owner, target.reagents.total_volume, transfered_by = owner, method = INGEST) qdel(target) return TRUE