Skip to content

Commit

Permalink
Fix incorrect usage of liquids.remove_any (#2524)
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy authored Jul 3, 2024
1 parent 8f5fbfb commit de2f841
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 4 additions & 7 deletions code/modules/mob/living/carbon/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,11 @@
adjustOxyLoss(3)
failed_last_breath = TRUE
if(oxyloss <= OXYGEN_DAMAGE_CHOKING_THRESHOLD && stat == CONSCIOUS)
to_chat(src, "<span class='userdanger'>You hold in your breath!</span>")
to_chat(src, span_userdanger("You hold in your breath!"))
else
//Try and drink water
var/datum/reagents/tempr = our_turf.liquids.take_reagents_flat(CHOKE_REAGENTS_INGEST_ON_BREATH_AMOUNT)
tempr.trans_to(src, tempr.total_volume, methods = INGEST)
qdel(tempr)
visible_message("<span class='warning'>[src] chokes on water!</span>", \
"<span class='userdanger'>You're choking on water!</span>")
our_turf.liquids.liquid_group.transfer_to_atom(src, CHOKE_REAGENTS_INGEST_ON_BREATH_AMOUNT)
visible_message(span_warning("[src] chokes on water!"), span_userdanger("You're choking on water!"))
return FALSE
if(isopenturf(our_turf))
var/turf/open/open_turf = our_turf
Expand All @@ -142,7 +139,7 @@

var/breath_moles = 0
if(environment)
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath_moles = environment.total_moles() * BREATH_PERCENTAGE

breath = loc.remove_air(breath_moles)
else //Breathe from loc as obj again
Expand Down
4 changes: 1 addition & 3 deletions monkestation/code/modules/liquids/liquid_pump.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@
var/target_siphon_amt = (T.liquids.liquid_group.total_reagent_volume * pump_speed_percentage) + pump_speed_flat
if(target_siphon_amt > free_space)
target_siphon_amt = free_space
var/datum/reagents/tempr = T.liquids.take_reagents_flat(target_siphon_amt)
tempr.trans_to(reagents, tempr.total_volume)
qdel(tempr)
T.liquids.liquid_group.transfer_to_atom(src, target_siphon_amt)
return

/obj/structure/liquid_pump/update_icon()
Expand Down

0 comments on commit de2f841

Please sign in to comment.