mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-15 01:46:41 +01:00
modular chemical reactions for hydroponics trays
This commit is contained in:
@@ -534,8 +534,12 @@
|
||||
if(istype(reagent_source, /obj/item/reagent_containers/food/snacks) || istype(reagent_source, /obj/item/reagent_containers/pill))
|
||||
qdel(reagent_source)
|
||||
|
||||
if(S.on_tray(H, split, user) >= 1)
|
||||
if(myseed)
|
||||
myseed.on_chem_reaction(S)
|
||||
lastuser = user
|
||||
for(var/datum/reagent/R in S.reagent_list)
|
||||
if(R.on_tray(H, R.volume, user) >= 1)
|
||||
lastuser = user
|
||||
|
||||
S.clear_reagents()
|
||||
qdel(S)
|
||||
|
||||
@@ -36,10 +36,11 @@
|
||||
|
||||
for(var/obj/machinery/hydroponics/H in trays)
|
||||
var/datum/reagents/temp_reagents = new /datum/reagents()
|
||||
temp_reagents.my_atom = H
|
||||
|
||||
source.reagents.trans_to(temp_reagents, split)
|
||||
H.applyChemicals(temp_reagents)
|
||||
for(var/datum/reagent/R in temp_reagents.reagent_list)
|
||||
if(R.on_tray(H, R.volume, src) >= 1)
|
||||
tray.lastuser = src
|
||||
|
||||
temp_reagents.clear_reagents()
|
||||
qdel(temp_reagents)
|
||||
|
||||
@@ -78,8 +78,8 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
return
|
||||
|
||||
//Hyperstation Edit: Hydroponics trays reactions, idea stolen from citadel but not directly referenced
|
||||
/datum/reagent/proc/on_tray(/obj/machinery/hydroponics/T, volume, mob/user, override = FALSE) //See hyperstation's reagent module
|
||||
if(!tray.myseed)
|
||||
/datum/reagent/proc/on_tray(obj/machinery/hydroponics/T, volume, mob/user) //See hyperstation's reagent module
|
||||
if(!T.myseed)
|
||||
return 0
|
||||
return -1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user