eee
This commit is contained in:
@@ -35,12 +35,12 @@
|
||||
else
|
||||
for(var/A in reagents.reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if(!can_give_in_direction(direction, R))
|
||||
if(!can_give_in_direction(direction, R.type))
|
||||
continue
|
||||
var/new_amount
|
||||
if(R.volume < amount)
|
||||
new_amount = amount - R.volume
|
||||
reagents.trans_id_to(target.parent, R, amount)
|
||||
reagents.trans_id_to(target.parent, R.type, amount)
|
||||
amount = new_amount
|
||||
if(amount <= 0)
|
||||
break
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
if(!istype(parent, /obj/machinery/plumbing/reaction_chamber))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
/datum/component/plumbing/reaction_chamber/can_give(amount, reagent)
|
||||
/datum/component/plumbing/reaction_chamber/can_give(amount, reagent, datum/ductnet/net)
|
||||
. = ..()
|
||||
var/obj/machinery/plumbing/reaction_chamber/RC = parent
|
||||
if(!. || !RC.emptying)
|
||||
@@ -21,7 +21,7 @@
|
||||
var/has_reagent = FALSE
|
||||
for(var/A in reagents.reagent_list)
|
||||
var/datum/reagent/RD = A
|
||||
if(RT == RD)
|
||||
if(RT == RD.type)
|
||||
has_reagent = TRUE
|
||||
if(RD.volume < RC.required_reagents[RT])
|
||||
process_request(min(RC.required_reagents[RT] - RD.volume, MACHINE_REAGENT_TRANSFER) , RT, dir)
|
||||
@@ -30,14 +30,9 @@
|
||||
process_request(min(RC.required_reagents[RT], MACHINE_REAGENT_TRANSFER), RT, dir)
|
||||
return
|
||||
|
||||
RC.reagent_flags &= ~NO_REACT
|
||||
reagents.flags &= ~NO_REACT
|
||||
reagents.handle_reactions()
|
||||
if(reagents.fermiIsReacting)
|
||||
return
|
||||
RC.emptying = TRUE
|
||||
|
||||
/datum/component/plumbing/reaction_chamber/can_give(amount, reagent, datum/ductnet/net)
|
||||
. = ..()
|
||||
var/obj/machinery/plumbing/reaction_chamber/RC = parent
|
||||
if(!. || !RC.emptying)
|
||||
return FALSE
|
||||
RC.emptying = TRUE //If we move this up, it'll instantly get turned off since any reaction always sets the reagent_total to zero. Other option is make the reaction update
|
||||
//everything for every chemical removed, wich isn't a good option either.
|
||||
RC.on_reagent_change() //We need to check it now, because some reactions leave nothing left.
|
||||
|
||||
Reference in New Issue
Block a user