Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reagent holder rework #6903

Draft
wants to merge 90 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
2a6175e
rename reagent holder
silicons Oct 19, 2024
73002e9
rename
silicons Oct 19, 2024
7b55b1e
new reagent system???
silicons Oct 19, 2024
76aafe4
all that
silicons Oct 20, 2024
bfbf1df
that
silicons Oct 20, 2024
6a8969d
update
silicons Oct 20, 2024
5d39447
yikes
silicons Oct 20, 2024
22efa16
dme
silicons Oct 20, 2024
f31af24
things
silicons Oct 21, 2024
4edd4dd
mods
silicons Oct 21, 2024
5ff87c2
that
silicons Oct 21, 2024
f131604
That
silicons Oct 21, 2024
0b449ec
that
silicons Oct 21, 2024
4f77cba
Merge remote-tracking branch 'upstream/master' into reagents-reactions
silicons Oct 22, 2024
797113c
typo
silicons Oct 22, 2024
ef9f7c5
that
silicons Oct 22, 2024
9cf7dbd
Merge branch 'reagents-reactions' of https://github.com/silicons/Cita…
silicons Oct 22, 2024
d6710c6
rewrite that
silicons Oct 22, 2024
baea218
actually no ph, not yet
silicons Oct 22, 2024
acdeeef
thing
silicons Oct 23, 2024
bb4213a
that
silicons Oct 24, 2024
ffbda9b
that
silicons Oct 24, 2024
dc21c0b
logging
silicons Oct 25, 2024
8477858
fix and improve
silicons Oct 26, 2024
fd1ff66
fix and improve
silicons Oct 26, 2024
1e1a759
Fixes
silicons Oct 26, 2024
4f07230
Fix
silicons Oct 26, 2024
4651c50
oop
silicons Oct 26, 2024
67ae9f6
fix
silicons Oct 26, 2024
dd7c4da
Fix
silicons Oct 26, 2024
ac65ea1
sigh
silicons Oct 26, 2024
3c880cf
that
silicons Oct 26, 2024
b5b23c1
Fix
silicons Oct 26, 2024
26adb84
Fix
silicons Oct 26, 2024
27a2934
fix
silicons Oct 26, 2024
45b03ef
fix
silicons Oct 26, 2024
4887d57
algorithm fix
silicons Oct 26, 2024
9bdcd3a
algorithm fix
silicons Oct 26, 2024
2351e1e
algorithm fix
silicons Oct 26, 2024
4951333
that
silicons Oct 27, 2024
93f796b
that
silicons Oct 27, 2024
d93cee6
Merge remote-tracking branch 'upstream/master' into reagents-reactions
silicons Oct 28, 2024
322ab62
fix
silicons Oct 28, 2024
aae7f35
sigh
silicons Oct 28, 2024
bac3155
sigh
silicons Oct 28, 2024
e522ff3
fuck
silicons Oct 31, 2024
b0ed6f4
updates
silicons Oct 31, 2024
9b8af3d
Merge remote-tracking branch 'citrp/master' into reagents-holders
silicons Nov 2, 2024
f1eea9d
Fix
silicons Nov 2, 2024
04a2bd9
sigh
silicons Nov 2, 2024
759b7b5
Fix
silicons Nov 2, 2024
44c0fc3
Merge remote-tracking branch 'upstream/master' into reagents-holders
silicons Nov 5, 2024
9caef8c
updates
silicons Nov 5, 2024
a9d53ad
fixes
silicons Dec 7, 2024
5ed6655
Merge remote-tracking branch 'citrp/master' into reagents-holders
silicons Dec 7, 2024
5c16ea7
that
silicons Dec 7, 2024
e5d6ff6
fixes
silicons Dec 7, 2024
e98ccde
fixes
silicons Dec 7, 2024
99644bd
that
silicons Dec 7, 2024
6265f95
changes
silicons Dec 7, 2024
9e5aed4
regex
silicons Dec 7, 2024
505e4ae
that
silicons Dec 9, 2024
19e2291
t
silicons Dec 9, 2024
bb3194f
hell
silicons Dec 9, 2024
e3d1aa9
that
silicons Dec 9, 2024
ccafa84
prune unused
silicons Dec 9, 2024
200ce70
this is actually hell
silicons Dec 9, 2024
0b734e6
replaces
silicons Dec 9, 2024
8875bd4
just yank that
silicons Dec 9, 2024
725bbb3
Merge remote-tracking branch 'upstream/master' into reagents-holders
silicons Dec 10, 2024
7a15749
update
silicons Dec 10, 2024
66c795b
update
silicons Dec 10, 2024
ff6d77d
That
silicons Dec 10, 2024
8bc168a
fix
silicons Dec 10, 2024
03e369a
Fix
silicons Dec 10, 2024
54e264d
Merge remote-tracking branch 'upstream/master' into reagents-holders
silicons Dec 12, 2024
a60c7f0
metab rate
silicons Dec 12, 2024
59f976f
fix
silicons Dec 12, 2024
a432fb0
separate it out
silicons Dec 13, 2024
00803dd
this
silicons Dec 13, 2024
d07bb59
changes
silicons Dec 13, 2024
28ce7d2
updates
silicons Dec 13, 2024
dbb8878
that
silicons Dec 13, 2024
619dcad
resolve
silicons Dec 13, 2024
014f2a2
Merge remote-tracking branch 'upstream/master' into reagents-holders
silicons Dec 13, 2024
6211dd7
sigh
silicons Dec 13, 2024
ec2be41
that
silicons Dec 20, 2024
bfbe331
dont bother
silicons Dec 21, 2024
c3a01a3
Merge remote-tracking branch 'citrp/master' into reagents-holders
silicons Dec 22, 2024
6c94133
fix
silicons Dec 22, 2024
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
36 changes: 29 additions & 7 deletions citadel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,6 @@
#include "code\game\objects\items\signs.dm"
#include "code\game\objects\items\spritechanger.dm"
#include "code\game\objects\items\throwing.dm"
#include "code\game\objects\items\toys.dm"
#include "code\game\objects\items\trash.dm"
#include "code\game\objects\items\upgradekit.dm"
#include "code\game\objects\items\circuitboards\broken.dm"
Expand Down Expand Up @@ -1801,6 +1800,8 @@
#include "code\game\objects\items\tools\weldingtool.dm"
#include "code\game\objects\items\tools\wirecutters.dm"
#include "code\game\objects\items\tools\wrench.dm"
#include "code\game\objects\items\toys\balloon.dm"
#include "code\game\objects\items\toys\toys.dm"
#include "code\game\objects\items\weapons\AI_modules.dm"
#include "code\game\objects\items\weapons\autopsy.dm"
#include "code\game\objects\items\weapons\barrier_tape.dm"
Expand Down Expand Up @@ -1932,7 +1933,7 @@
#include "code\game\objects\structures\loot_piles.dm"
#include "code\game\objects\structures\low_wall.dm"
#include "code\game\objects\structures\map_blocker.dm"
#include "code\game\objects\structures\medical_stand_vr.dm"
#include "code\game\objects\structures\medical_stand.dm"
#include "code\game\objects\structures\mineral_bath.dm"
#include "code\game\objects\structures\mirror.dm"
#include "code\game\objects\structures\mop_bucket.dm"
Expand Down Expand Up @@ -3718,7 +3719,11 @@
#include "code\modules\mob\living\bot\mulebot.dm"
#include "code\modules\mob\living\bot\secbot.dm"
#include "code\modules\mob\living\bot\SLed209bot.dm"
#include "code\modules\mob\living\carbon\blood_fragment.dm"
#include "code\modules\mob\living\carbon\blood_holder.dm"
#include "code\modules\mob\living\carbon\blood_mixture.dm"
#include "code\modules\mob\living\carbon\breathe.dm"
#include "code\modules\mob\living\carbon\carbon-blood.dm"
#include "code\modules\mob\living\carbon\carbon-defense.dm"
#include "code\modules\mob\living\carbon\carbon-hands.dm"
#include "code\modules\mob\living\carbon\carbon.dm"
Expand Down Expand Up @@ -4668,17 +4673,18 @@
#include "code\modules\random_map\noise\tundra.dm"
#include "code\modules\reagents\exposedprocs.dm"
#include "code\modules\reagents\reagent_containers.dm"
#include "code\modules\reagents\chemistry\_readme.dm"
#include "code\modules\reagents\chemistry\chemical_reaction-legacy.dm"
#include "code\modules\reagents\chemistry\chemical_reaction.dm"
#include "code\modules\reagents\chemistry\colors.dm"
#include "code\modules\reagents\chemistry\helpers.dm"
#include "code\modules\reagents\chemistry\machinery.dm"
#include "code\modules\reagents\chemistry\metabolism.dm"
#include "code\modules\reagents\chemistry\reagent.dm"
#include "code\modules\reagents\chemistry\reagent_holder-color.dm"
#include "code\modules\reagents\chemistry\reagent_holder-helpers.dm"
#include "code\modules\reagents\chemistry\reagent_holder-legacy.dm"
#include "code\modules\reagents\chemistry\reagent_holder-metabolism.dm"
#include "code\modules\reagents\chemistry\reagent_holder-reactions.dm"
#include "code\modules\reagents\chemistry\reagent_holder.dm"
#include "code\modules\reagents\chemistry\reagent_metabolism.dm"
#include "code\modules\reagents\chemistry\wiki_generation.dm"
#include "code\modules\reagents\chemistry\reactions\automata.dm"
#include "code\modules\reagents\chemistry\reactions\carpet.dm"
Expand All @@ -4701,13 +4707,31 @@
#include "code\modules\reagents\chemistry\reagents\Chemistry-Reagents-Other.dm"
#include "code\modules\reagents\chemistry\reagents\Chemistry-Reagents-Toxins.dm"
#include "code\modules\reagents\chemistry\reagents\Chemistry-Topical.dm"
#include "code\modules\reagents\chemistry\reagents\core\acid.dm"
#include "code\modules\reagents\chemistry\reagents\core\blood.dm"
#include "code\modules\reagents\chemistry\reagents\core\elements.dm"
#include "code\modules\reagents\chemistry\reagents\core\ethanol.dm"
#include "code\modules\reagents\chemistry\reagents\core\toxin.dm"
#include "code\modules\reagents\chemistry\reagents\core\water.dm"
#include "code\modules\reagents\chemistry\reagents\nutrition\nutriment.dm"
#include "code\modules\reagents\chemistry\reagents\nutrition\nutriment\coating.dm"
#include "code\modules\reagents\chemistry\reagents\other\adminordrazine.dm"
#include "code\modules\reagents\chemistry\reagents\other\carpet.dm"
#include "code\modules\reagents\chemistry\reagents\other\chalk_dust.dm"
#include "code\modules\reagents\chemistry\reagents\other\cleaner.dm"
#include "code\modules\reagents\chemistry\reagents\other\crayon_dust.dm"
#include "code\modules\reagents\chemistry\reagents\other\holywater.dm"
#include "code\modules\reagents\chemistry\reagents\other\luminol.dm"
#include "code\modules\reagents\chemistry\reagents\other\marker_ink.dm"
#include "code\modules\reagents\chemistry\reagents\other\paint.dm"
#include "code\modules\reagents\chemistry\reagents\pyrotechnics\thermite.dm"
#include "code\modules\reagents\distilling\Distilling-Recipes.dm"
#include "code\modules\reagents\distilling\distilling.dm"
#include "code\modules\reagents\items\hypospray.dm"
#include "code\modules\reagents\items\hypovial.dm"
#include "code\modules\reagents\items\spray.dm"
#include "code\modules\reagents\items\spray\squirt.dm"
#include "code\modules\reagents\items\spray\waterflower.dm"
#include "code\modules\reagents\machinery\chem_master.dm"
#include "code\modules\reagents\machinery\reagent_dispenser.dm"
#include "code\modules\reagents\machinery\dispenser\cartridge.dm"
Expand Down Expand Up @@ -4737,8 +4761,6 @@
#include "code\modules\reagents\reagent_containers\patch.dm"
#include "code\modules\reagents\reagent_containers\pill.dm"
#include "code\modules\reagents\reagent_containers\pill_vr.dm"
#include "code\modules\reagents\reagent_containers\spray.dm"
#include "code\modules\reagents\reagent_containers\spray_vr.dm"
#include "code\modules\reagents\reagent_containers\syringes.dm"
#include "code\modules\reagents\reagent_containers\syringes_vr.dm"
#include "code\modules\reagents\reagent_containers\unidentified_hypospray.dm"
Expand Down
48 changes: 13 additions & 35 deletions code/datums/components/crafting/crafting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@
if(istype(I, /obj/item/reagent_containers))
var/obj/item/reagent_containers/RC = I
if(RC.is_open_container())
for(var/datum/reagent/A in RC.reagents.reagent_list)
.["other"][A.type] += A.volume
// todo: this shouldn't be by type.
for(var/id in RC.reagents.reagent_volumes)
var/datum/reagent/A = SSchemistry.fetch_reagent(id)
.["other"][A.type] += RC.reagents.reagent_volumes[id]
.["other"][I.type] += 1

/datum/component/personal_crafting/proc/check_tools(atom/a, datum/crafting_recipe/R, list/contents)
Expand Down Expand Up @@ -235,34 +237,17 @@
surroundings = get_environment(a, R.blacklist)
surroundings -= Deletion
if(ispath(A, /datum/reagent))
var/datum/reagent/RG = new A
var/datum/reagent/RGNT
var/datum/reagent/wanted_reagent = SSchemistry.fetch_reagent(A)
while(amt > 0)
var/obj/item/reagent_containers/RC = locate() in surroundings
RG = RC.reagents.get_reagent(RG.id)
if(RG)
if(!locate(RG.type) in Deletion)
Deletion += new RG.type()
if(RG.volume > amt)
RG.volume -= amt
data = RG.data
RC.reagents.conditional_update(RC)
RG = locate(RG.type) in Deletion
RG.volume = amt
RG.data += data
surroundings -= RC
if(RC.reagents?.reagent_volumes?[wanted_reagent.id])
var/removing_volume = RC.reagents.reagent_volumes[wanted_reagent.id]
removing_volume = min(removing_volume, amt)
RC.reagents.remove_reagent(wanted_reagent.id, removing_volume)
amt -= removing_volume
if(amt <= 0)
continue main_loop
else
surroundings -= RC
amt -= RG.volume
RC.reagents.reagent_list -= RG
RC.reagents.conditional_update(RC)
RGNT = locate(RG.type) in Deletion
RGNT.volume += RG.volume
RGNT.data += RG.data
qdel(RG)
RC.on_reagent_change()
else
surroundings -= RC
else if(ispath(A, /obj/item/stack))
var/obj/item/stack/S
var/obj/item/stack/SD
Expand Down Expand Up @@ -296,14 +281,7 @@
for(var/M in R.parts)
partlist[M] = R.parts[M]
for(var/A in R.parts)
if(istype(A, /datum/reagent))
var/datum/reagent/RG = locate(A) in Deletion
if(RG.volume > partlist[A])
RG.volume = partlist[A]
. += RG
Deletion -= RG
continue
else if(istype(A, /obj/item/stack))
if(istype(A, /obj/item/stack))
var/obj/item/stack/ST = locate(A) in Deletion
if(ST.amount > partlist[A])
ST.amount = partlist[A]
Expand Down
4 changes: 2 additions & 2 deletions code/datums/material_container.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@
/**
* basically, divides by given resources and takes lowest.
*/
/datum/material_container/proc/has_multiple(list/wanted, multiplier = 1)
/datum/material_container/proc/has_multiple(list/wanted)
if(isnull(stored))
return 0
. = INFINITY
for(var/key in wanted)
if(!wanted[key])
continue
. = min(., stored[key] / (wanted[key] * multiplier))
. = min(., stored[key] / wanted[key])
if(!.)
return

Expand Down
28 changes: 11 additions & 17 deletions code/datums/recipe/recipe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
else
return -1

if ((reagents?(reagents.len):(0)) < avail_reagents.reagent_list.len)
if ((reagents?(reagents.len):(0)) < avail_reagents.reagent_volumes.len)
return 0
return .

Expand Down Expand Up @@ -268,26 +268,20 @@
if (RECIPE_REAGENT_MAX)
//We want the highest of each.
//Iterate through everything in buffer. If the target has less than the buffer, then top it up
for (var/datum/reagent/R in temp.reagents.reagent_list)
var/rvol = tempholder.reagents.get_reagent_amount(R.id)
if (rvol < R.volume)
//Transfer the difference
temp.reagents.trans_id_to(tempholder, R.id, R.volume-rvol)
for(var/id in temp.reagents.reagent_volumes)
var/volume = temp.reagents.reagent_volumes[id]
if(tempholder.reagents.reagent_volumes[id] < volume)
temp.reagents.trans_id_to(tempholder, id, volume - tempholder.reagents.reagent_volumes[id])

if (RECIPE_REAGENT_MIN)
//Min is slightly more complex. We want the result to have the lowest from each side
//But zero will not count. Where a side has zero its ignored and the side with a nonzero value is used
for (var/datum/reagent/R in temp.reagents.reagent_list)
var/rvol = tempholder.reagents.get_reagent_amount(R.id)
if (rvol == 0) //If the target has zero of this reagent
temp.reagents.trans_id_to(tempholder, R.id, R.volume)
//Then transfer all of ours

else if (rvol > R.volume)
//if the target has more than ours
//Remove the difference
tempholder.reagents.remove_reagent(R.id, rvol-R.volume)

for(var/id in temp.reagents.reagent_volumes)
var/volume = temp.reagents.reagent_volumes[id]
if(!tempholder.reagents.reagent_volumes[id])
temp.reagents.trans_id_to(tempholder, id, volume)
else if(tempholder.reagents.reagent_volumes[id] > volume)
temp.reagents.remove_reagent(id, tempholder.reagents.reagent_volumes[id] - volume)

if (results.len > 1)
//If we're here, then holder is a buffer containing the total reagents for all the results.
Expand Down
16 changes: 9 additions & 7 deletions code/game/atoms/_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@

//? Chemistry
// todo: properly finalize the semantics of this variable and what it's for.
// todo: should this variable even exist? most atoms don't need this, and we can easily have an APi
// to fetch a relevant holder upon being inspected by an analyzer.
var/datum/reagent_holder/reagents = null

//? Detective Work
Expand Down Expand Up @@ -297,7 +299,6 @@
found += A.search_contents_for(path,filter_path)
return found


// called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set.
// see code/modules/mob/mob_movement.dm for more.
/atom/proc/relaymove()
Expand Down Expand Up @@ -671,12 +672,13 @@

/atom/proc/CheckParts(list/parts_list)
for(var/A in parts_list)
if(istype(A, /datum/reagent))
if(!reagents)
reagents = new()
reagents.reagent_list.Add(A)
reagents.conditional_update()
else if(ismovable(A))
// todo: i don't know why we do this in crafting but crafting needs fucking refactored lmao
// if(istype(A, /datum/reagent))
// if(!reagents)
// reagents = new()
// reagents.reagent_list.Add(A)
// reagents.conditional_update()
if(ismovable(A))
var/atom/movable/M = A
M.forceMove(src)

Expand Down
10 changes: 5 additions & 5 deletions code/game/atoms/atom-examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@
if(reagents)
if(reagents.reagents_holder_flags & TRANSPARENT)
. += "It contains:"
if(length(reagents.reagent_list))
if(reagents.total_volume)
var/has_alcohol = FALSE
if(user.can_see_reagents()) //Show each individual reagent
for(var/datum/reagent/current_reagent as anything in reagents.reagent_list)
for(var/datum/reagent/current_reagent as anything in reagents.get_reagent_datums())
if(!has_alcohol && istype(current_reagent,/datum/reagent/ethanol))
has_alcohol = TRUE
. += "&bull; [round(current_reagent.volume, 0.01)] units of [current_reagent.name]"
. += "&bull; [round(reagents.reagent_volumes[current_reagent.id], 0.01)] units of [current_reagent.name]"
else //Otherwise, just show the total volume
var/total_volume = 0
for(var/datum/reagent/current_reagent as anything in reagents.reagent_list)
for(var/datum/reagent/current_reagent as anything in reagents.get_reagent_datums())
if(!has_alcohol && istype(current_reagent,/datum/reagent/ethanol))
has_alcohol = TRUE
total_volume += current_reagent.volume
total_volume += reagents.reagent_volumes[current_reagent.id]
. += "[total_volume] units of various reagents"
if(has_alcohol)
. += "It smells of alcohol."
Expand Down
8 changes: 4 additions & 4 deletions code/game/atoms/movable/pulling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@
if(H.species.species_flags & NO_BLOOD)
bloodtrail = 0
else
var/blood_volume = H.vessel.get_reagent_amount("blood")
var/blood_volume = H.blood_holder.get_total_volume()
if(blood_volume < H.species?.blood_volume * H.species?.blood_level_fatal)
bloodtrail = 0 //Most of it's gone already, just leave it be
else
H.vessel.remove_reagent("blood", 1)
H.blood_holder?.draw(1)
if(bloodtrail)
var/turf/location = M.loc
if(istype(location, /turf/simulated))
Expand All @@ -144,11 +144,11 @@
if(H.species.species_flags & NO_BLOOD)
bloodtrail = 0
else
var/blood_volume = H.vessel.get_reagent_amount("blood")
var/blood_volume = H.blood_holder.get_total_volume()
if(blood_volume < H.species?.blood_volume * H.species?.blood_level_fatal)
bloodtrail = 0 //Most of it's gone already, just leave it be
else
H.vessel.remove_reagent("blood", 1)
H.blood_holder?.draw(1)
if(bloodtrail)
if(istype(location, /turf/simulated))
location.add_blood(M)
Expand Down
4 changes: 1 addition & 3 deletions code/game/dna/dna_modifier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,7 @@
data["beakerVolume"] = 0
if(connected.beaker)
data["beakerLabel"] = connected.beaker.label_text ? connected.beaker.label_text : null
if (connected.beaker.reagents && connected.beaker.reagents.reagent_list.len)
for(var/datum/reagent/R in connected.beaker.reagents.reagent_list)
data["beakerVolume"] += R.volume
data["beakerVolume"] = connected.beaker.reagents?.total_volume || 0

// update the ui if it exists, returns null if no ui is passed/found
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
Expand Down
4 changes: 2 additions & 2 deletions code/game/gamemodes/changeling/powers/epinephrine_overdose.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
description = "Reduces stun times, but causing toxicity due to high concentration."
reagent_state = REAGENT_LIQUID
color = "#C8A5DC"
metabolism = REM * 2
metabolism_rate = REM * 2
overdose = 5 //This is intentionally low, as we want the ling to take some tox damage, to discourage spamming the ability.

/datum/reagent/epinephrine/affect_blood(mob/living/carbon/M, alien, removed)
/datum/reagent/epinephrine/legacy_affect_blood(mob/living/carbon/M, alien, removed, datum/reagent_metabolism/metabolism)
if(alien == IS_DIONA)
return
M.add_chemical_effect(CE_SPEEDBOOST, 3)
Expand Down
4 changes: 2 additions & 2 deletions code/game/gamemodes/cult/construct_spells.dm
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@
var/mob/living/carbon/human/H = owner
if(!H.should_have_organ(O_HEART))
return 1
if(H.vessel.remove_reagent("blood", amount))
return 1
if(H.erase_checked_blood(amount))
return TRUE
return 0

/obj/item/spell/construct/afterattack(atom/target, mob/user, clickchain_flags, list/params)
Expand Down
2 changes: 0 additions & 2 deletions code/game/gamemodes/cult/narsie.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ var/global/list/narsie_list = list()

if (dist <= consume_range && !istype(A, /turf/space))
var/turf/T = A
if(T.holy)
T.holy = 0 //Nar-Sie doesn't give a shit about sacred grounds.
T.cultify()

/obj/singularity/narsie/proc/old_narsie(const/atom/A)
Expand Down
6 changes: 3 additions & 3 deletions code/game/machinery/Sleeper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@
beaker.reagents,
min(
remaining_beaker_volume_for_dialysis * (3 / 4),
length(occupant.reagents.reagent_list) * 3,
length(occupant.reagents.reagent_volumes) * 3,
),
dialysis_reagent_filter_flags,
)
occupant.vessel.trans_to_holder(beaker.reagents, filtered_volume * (1 / 3))
occupant.take_blood_legacy(beaker, filtered_volume * (1 / 3))
else
toggle_filter()

Expand All @@ -268,7 +268,7 @@
beaker.reagents,
min(
beaker.reagents.maximum_volume - beaker.reagents.total_volume,
length(occupant.ingested.reagent_list) * 3,
length(occupant.ingested.reagent_volumes) * 3,
),
dialysis_reagent_filter_flags,
)
Expand Down
Loading
Loading