mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
fix liquid transfer (#9581)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user