mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Stops unessassary reactions from occurring in plumbing machines (#95125)
## About The Pull Request This PR stops reactions from occurring in plumbing machines except for 2 - Reaction chamber - Acclimator This means you can now have a tank containing welding fuel, carbon & hydrogen and not worry about them reacting to create oil ## Why its good for the game - Makes the game run faster. Calling `handle_reactions()` is an expensive operation and should not be done needlessly - Makes life for players easier. We don't want chemicals reacting before they reach the reaction chamber & acclimator and making them obsolete. It now allows them to do their job properly **Dependencies** - #95077 - #95084 After they are merged. Part of their code needs to be rewritten here. This also deletes the redundant splitter sprite ## Changelog 🆑 qol: except for plumbing reaction chamber & acclimator, no reactions will occur inside plumbing machines /🆑
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
. = ..()
|
||||
if(!reagents.holder_full())
|
||||
return
|
||||
reagents.flags &= ~NO_REACT
|
||||
myacclimator.acclimate_state = reagents.chem_temp > myacclimator.target_temperature ? AC_COOLING : AC_HEATING
|
||||
myacclimator.update_appearance(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
/obj/machinery/plumbing/fermenter = 30,
|
||||
/obj/machinery/plumbing/liquid_pump = 35, //extracting chemicals from ground is one way of creation
|
||||
/obj/machinery/plumbing/disposer = 10,
|
||||
/obj/machinery/plumbing/buffer = 10, //creates chemicals as it waits for other buffers containing other chemicals and when mixed creates new chemicals
|
||||
),
|
||||
|
||||
//category 2 distributors i.e devices which inject , move around , remove chemicals from the network
|
||||
@@ -62,9 +61,10 @@
|
||||
"Storage" = list(
|
||||
/obj/machinery/plumbing/tank = 20,
|
||||
/obj/machinery/plumbing/acclimator = 10,
|
||||
/obj/machinery/plumbing/buffer = 10,
|
||||
/obj/machinery/plumbing/bottler = 50,
|
||||
/obj/machinery/plumbing/pill_press = 20,
|
||||
/obj/machinery/iv_drip/plumbing = 20
|
||||
/obj/machinery/iv_drip/plumbing = 20,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"manifold",
|
||||
"pipe_input",
|
||||
"filter",
|
||||
"splitter_tri",
|
||||
"splitter",
|
||||
"beacon",
|
||||
"pipe_output",
|
||||
"tank",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
///Plumbing machinery is always gonna need reagents, so we might aswell put it here
|
||||
var/buffer = 50
|
||||
///Flags for reagents, like INJECTABLE, TRANSPARENT bla bla everything thats in DEFINES/reagents.dm
|
||||
var/reagent_flags = TRANSPARENT
|
||||
var/reagent_flags = TRANSPARENT | NO_REACT
|
||||
|
||||
/obj/machinery/plumbing/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -52,9 +52,6 @@
|
||||
if(amount <= 0)
|
||||
return FALSE
|
||||
|
||||
//Set up new reagents to inherit the old ongoing reactions
|
||||
transfer_reactions(target_holder)
|
||||
|
||||
var/list/cached_reagents = reagent_list
|
||||
var/transfer_amount
|
||||
var/transfered_amount
|
||||
@@ -100,10 +97,6 @@
|
||||
break
|
||||
update_total()
|
||||
|
||||
//handle reactions
|
||||
target_holder.handle_reactions()
|
||||
handle_reactions()
|
||||
|
||||
return total_transfered_amount
|
||||
|
||||
///Excludes catalysts during the emptying process
|
||||
@@ -190,9 +183,6 @@
|
||||
if(amount <= 0)
|
||||
return FALSE
|
||||
|
||||
//Set up new reagents to inherit the old ongoing reactions
|
||||
transfer_reactions(target_holder)
|
||||
|
||||
var/working_volume
|
||||
var/catalyst_volume
|
||||
var/transfer_amount
|
||||
@@ -247,10 +237,6 @@
|
||||
break
|
||||
update_total()
|
||||
|
||||
//handle reactions
|
||||
target_holder.handle_reactions()
|
||||
handle_reactions()
|
||||
|
||||
return total_transfered_amount
|
||||
|
||||
|
||||
@@ -302,9 +288,6 @@
|
||||
if(amount <= 0)
|
||||
return FALSE
|
||||
|
||||
//Set up new reagents to inherit the old ongoing reactions
|
||||
transfer_reactions(target_holder)
|
||||
|
||||
var/transfer_amount
|
||||
var/transfered_amount
|
||||
var/total_transfered_amount = 0
|
||||
@@ -342,8 +325,4 @@
|
||||
reagent.volume -= transfered_amount
|
||||
update_total()
|
||||
|
||||
//handle reactions
|
||||
target_holder.handle_reactions()
|
||||
handle_reactions()
|
||||
|
||||
return total_transfered_amount
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
|
||||
if(acclimate_state == AC_EMPTYING && !reagents.total_volume)
|
||||
acclimate_state = AC_FILLING
|
||||
reagents.flags |= NO_REACT
|
||||
update_appearance(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/plumbing/acclimator/ui_interact(mob/user, datum/tgui/ui)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
reagents = /datum/reagents
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
plane = ABOVE_GAME_PLANE
|
||||
reagent_flags = TRANSPARENT | DRAINABLE
|
||||
reagent_flags = /obj/machinery/plumbing::reagent_flags | DRAINABLE
|
||||
buffer = 100
|
||||
|
||||
///how much do we fill
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "fermenter"
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
plane = ABOVE_GAME_PLANE
|
||||
reagent_flags = TRANSPARENT | DRAINABLE
|
||||
reagent_flags = /obj/machinery/plumbing::reagent_flags | DRAINABLE
|
||||
buffer = 400
|
||||
|
||||
///input dir
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "grinder_chemical"
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
plane = ABOVE_GAME_PLANE
|
||||
reagent_flags = TRANSPARENT | DRAINABLE
|
||||
reagent_flags = /obj/machinery/plumbing::reagent_flags | DRAINABLE
|
||||
buffer = 400
|
||||
|
||||
/// Are we grinding or juicing
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
desc = "Keeps chemicals separated until given conditions are met."
|
||||
icon_state = "reaction_chamber"
|
||||
buffer = 200
|
||||
reagent_flags = TRANSPARENT | NO_REACT
|
||||
reagents = /datum/reagents/plumbing/reaction_chamber
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
desc = "Can be manually filled with reagents from containers."
|
||||
icon_state = "pipe_input"
|
||||
pass_flags_self = PASSMACHINE | LETPASSTHROW // Small
|
||||
reagent_flags = TRANSPARENT | REFILLABLE
|
||||
reagent_flags = /obj/machinery/plumbing::reagent_flags | REFILLABLE
|
||||
|
||||
/obj/machinery/plumbing/input/Initialize(mapload, layer)
|
||||
. = ..()
|
||||
@@ -16,7 +16,7 @@
|
||||
desc = "A manual output for plumbing systems, for taking reagents directly into containers."
|
||||
icon_state = "pipe_output"
|
||||
pass_flags_self = PASSMACHINE | LETPASSTHROW // Small
|
||||
reagent_flags = TRANSPARENT | DRAINABLE
|
||||
reagent_flags = /obj/machinery/plumbing::reagent_flags | DRAINABLE
|
||||
reagents = /datum/reagents
|
||||
|
||||
/obj/machinery/plumbing/output/Initialize(mapload, layer)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/obj/machinery/plumbing/splitter
|
||||
name = "chemical splitter"
|
||||
desc = "A chemical splitter for smart chemical factorization. Waits till a set of conditions is met and then stops all input and splits the buffer evenly or other in two ducts."
|
||||
icon_state = "splitter_tri"
|
||||
icon_state = "splitter"
|
||||
buffer = 100
|
||||
density = FALSE
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user