fix liquid transfer (#9581)

This commit is contained in:
Kashargul
2024-12-06 09:57:38 +01:00
committed by GitHub
parent 1e3d0f5d8b
commit c01568e213
2 changed files with 8 additions and 5 deletions

View File

@@ -4,12 +4,15 @@
if(!target || !istype(target))
return
if(iscarbon(target))
var/mob/living/carbon/C = target
if(isliving(target))
if(type == CHEM_VORE)
var/datum/reagents/R = target_belly.reagents
if(!R)
R = new /datum/reagents(amount)
target_belly.reagents = R
return trans_to_holder(R, amount, multiplier, copy)
if(type == CHEM_INGEST)
if(type == CHEM_INGEST && iscarbon(target))
var/mob/living/carbon/C = target
var/datum/reagents/R = C.ingested
return C.ingest(src, R, amount, multiplier, copy)

View File

@@ -163,7 +163,7 @@
return FALSE
if(!Adjacent(TR) || !Adjacent(TG))
return //No long distance transfer
if(!TR.reagents.get_free_space())
if(!TB.reagents?.get_free_space())
to_chat(user, span_vnotice("[TB] is full!"))
return FALSE
@@ -186,7 +186,7 @@
return FALSE
if(!Adjacent(TR) || !Adjacent(TG))
return //No long distance transfer
if(!TR.reagents.get_free_space())
if(!TB.reagents?.get_free_space())
to_chat(user, span_vnotice("[TR]'s [lowertext(TB.name)] is full!"))
return FALSE