diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm
index c703b4f0731..e7f959668cd 100644
--- a/_maps/map_files/Deltastation/DeltaStation2.dmm
+++ b/_maps/map_files/Deltastation/DeltaStation2.dmm
@@ -48810,7 +48810,9 @@
/area/station/security/checkpoint/escape)
"lWX" = (
/obj/effect/decal/cleanable/dirt,
-/obj/machinery/bouldertech/refinery/smelter,
+/obj/machinery/bouldertech/refinery/smelter{
+ dir = 4
+ },
/obj/machinery/conveyor{
dir = 8;
id = "mining"
diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm
index e2fc8ab5a54..06e0e702a95 100644
--- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm
+++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm
@@ -79390,7 +79390,7 @@
id = "mining_internal"
},
/obj/machinery/bouldertech/refinery/smelter{
- dir = 4
+ dir = 1
},
/obj/structure/railing/corner/end/flip{
dir = 4
diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm
index 72d1f31fe6a..0afd221b765 100644
--- a/_maps/map_files/MetaStation/MetaStation.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.dmm
@@ -7408,9 +7408,7 @@
/turf/open/floor/plating,
/area/station/science/robotics/mechbay)
"cBZ" = (
-/obj/machinery/bouldertech/refinery/smelter{
- dir = 4
- },
+/obj/machinery/bouldertech/refinery/smelter,
/obj/machinery/conveyor{
id = "mining"
},
diff --git a/_maps/map_files/NebulaStation/NebulaStation.dmm b/_maps/map_files/NebulaStation/NebulaStation.dmm
index c7f091234e9..7e574ce2849 100644
--- a/_maps/map_files/NebulaStation/NebulaStation.dmm
+++ b/_maps/map_files/NebulaStation/NebulaStation.dmm
@@ -142209,9 +142209,7 @@
/obj/machinery/conveyor{
id = "mining"
},
-/obj/machinery/bouldertech/refinery/smelter{
- dir = 4
- },
+/obj/machinery/bouldertech/refinery/smelter,
/turf/open/floor/iron/dark/textured_large,
/area/station/cargo/miningfoundry)
"uYZ" = (
diff --git a/_maps/map_files/tramstation/tramstation.dmm b/_maps/map_files/tramstation/tramstation.dmm
index 02876e5c336..978bfa94cb6 100644
--- a/_maps/map_files/tramstation/tramstation.dmm
+++ b/_maps/map_files/tramstation/tramstation.dmm
@@ -38728,7 +38728,9 @@
/area/station/hallway/secondary/entry)
"mqT" = (
/obj/effect/decal/cleanable/dirt,
-/obj/machinery/bouldertech/refinery/smelter,
+/obj/machinery/bouldertech/refinery/smelter{
+ dir = 4
+ },
/obj/structure/railing,
/turf/open/floor/iron,
/area/station/cargo/miningfoundry)
diff --git a/_maps/map_files/wawastation/wawastation.dmm b/_maps/map_files/wawastation/wawastation.dmm
index 7bcfc9245e2..6e7f04f5f94 100644
--- a/_maps/map_files/wawastation/wawastation.dmm
+++ b/_maps/map_files/wawastation/wawastation.dmm
@@ -23339,7 +23339,9 @@
/turf/open/floor/plating,
/area/station/maintenance/department/engine)
"iee" = (
-/obj/machinery/bouldertech/refinery/smelter,
+/obj/machinery/bouldertech/refinery/smelter{
+ dir = 4
+ },
/obj/machinery/conveyor{
dir = 6;
id = "brm"
diff --git a/code/datums/components/plumbing/_plumbing.dm b/code/datums/components/plumbing/_plumbing.dm
index 3f3af944f68..f03e1d67866 100644
--- a/code/datums/components/plumbing/_plumbing.dm
+++ b/code/datums/components/plumbing/_plumbing.dm
@@ -20,11 +20,6 @@
/// Ex - if this was set to "3", our component would only request the first 3 reagents found, even if more are available
var/distinct_reagent_cap = INFINITY
- ///Extra offset on supply pipe.
- var/supply_offset = 0
- ///Extra offset on demand pipe.
- var/demand_offset = 0
-
/datum/component/plumbing/Initialize(ducting_layer)
if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
@@ -194,28 +189,8 @@
var/duct_y = offset - parent_movable.pixel_y - parent_movable.pixel_z
if(direction & initial(demand_connects))
color = demand_color
- if(demand_offset)
- switch(parent_movable.dir)
- if(NORTH)
- duct_y -= demand_offset
- if(SOUTH)
- duct_y += demand_offset
- if(EAST)
- duct_x -= demand_offset
- if(WEST)
- duct_x += demand_offset
else if(direction & initial(supply_connects))
color = supply_color
- if(supply_offset)
- switch(parent_movable.dir)
- if(NORTH)
- duct_y += supply_offset
- if(SOUTH)
- duct_y -= supply_offset
- if(EAST)
- duct_x += supply_offset
- if(WEST)
- duct_x -= supply_offset
else
continue
diff --git a/code/datums/components/plumbing/boulder_reactions.dm b/code/datums/components/plumbing/boulder_reactions.dm
index 56496ea803c..982a7839d7a 100644
--- a/code/datums/components/plumbing/boulder_reactions.dm
+++ b/code/datums/components/plumbing/boulder_reactions.dm
@@ -1,30 +1,32 @@
-/**
- * The boulder machines take in many types of chems, but should only ever eject "waste" chems,
- */
+/// The boulder machines take in many types of chems, but should only ever eject "waste" chems,
/datum/component/plumbing/boulder_reactions
- demand_connects = NORTH
- supply_connects = SOUTH
- supply_offset = 4
- demand_offset = 4
+ demand_connects = WEST
+ supply_connects = EAST
/datum/component/plumbing/boulder_reactions/Initialize(ducting_layer)
if(!istype(parent, /obj/machinery/bouldertech/refinery))
return COMPONENT_INCOMPATIBLE
return ..()
+/datum/component/plumbing/boulder_reactions/send_request(dir)
+ var/obj/machinery/bouldertech/refinery/the_refinery = parent
+ var/list/datum/reagents/boosters = the_refinery.get_booster_reagents()
+
+ for(var/datum/reagent/booster as anything in boosters)
+ process_request(MACHINE_REAGENT_TRANSFER, booster, dir, TRUE)
+
/datum/component/plumbing/boulder_reactions/can_give(amount, reagent, datum/ductnet/net)
- if(amount <= 0 || !reagents.total_volume || !reagent)
+ if(!reagents.total_volume || amount <= 0)
return FALSE
var/obj/machinery/bouldertech/refinery/the_refinery = parent
- var/list/datum/reagents/boosters = the_refinery.booster_list
-
- if(istype(amount, the_refinery.waste_chemical))
- return TRUE //Always allow waste chemicals to leave.
-
- if(!length(boosters))
- return ..()
- for(var/datum/chem as anything in boosters)
- if(chem.type == reagent) // Need to check strict subtype since most acids are subtypes of eachother.
+ if(reagent)
+ if(reagent != the_refinery.waste_chemical) //Always allow waste chemicals to enter.
return FALSE
- return ..()
+
+ return !!reagents.has_reagent(the_refinery.waste_chemical)
+
+/datum/component/plumbing/boulder_reactions/transfer_to(datum/component/plumbing/target, amount, reagent, datum/ductnet/net, round_robin)
+ var/obj/machinery/bouldertech/refinery/the_refinery = parent
+
+ reagents.trans_to(target.recipient_reagents_holder(), amount, target_id = the_refinery.waste_chemical, methods = round_robin ? LINEAR : NONE)
diff --git a/code/modules/mining/boulder_processing/_boulder_processing.dm b/code/modules/mining/boulder_processing/_boulder_processing.dm
index 6d11c876bf3..324c616ae84 100644
--- a/code/modules/mining/boulder_processing/_boulder_processing.dm
+++ b/code/modules/mining/boulder_processing/_boulder_processing.dm
@@ -22,10 +22,6 @@
var/points_held = 0
///The action verb to display to players
var/action = "processing"
-
-
- /// What list of reagents should we look at when we boost the effectiveness of this machinery? Assign a value to a chem as well, eg: /datum/reagent/water = 1 is a 10% boost
- var/list/booster_list = list()
/// What reagent should be produced when a boost chemical is replaced by the booster_reagent?
var/datum/reagent/waste_chemical = /datum/reagent/water
@@ -107,6 +103,7 @@
/obj/machinery/bouldertech/examine_more(mob/user)
. = ..()
+ var/list/datum/reagents/booster_list = get_booster_reagents()
if(length(booster_list))
. += span_notice("This machine's output is boosted by chemical intake:
")
for(var/datum/reagent/increment as anything in booster_list)
@@ -121,7 +118,7 @@
icon_state ="[base_icon_state][suffix]"
/obj/machinery/bouldertech/CanAllowThrough(atom/movable/mover, border_dir)
- if(!anchored)
+ if(!anchored || !(dir == border_dir || dir == REVERSE_DIR(border_dir)))
return FALSE
if(istype(mover, /obj/item/stack/sheet))
return TRUE
@@ -254,6 +251,12 @@
refining_efficiency = initial(refining_efficiency) //Reset refining efficiency to 100%.
+///Returns a map of reagent -> boost amount to increase this machines efficiency
+/obj/machinery/bouldertech/proc/get_booster_reagents()
+ RETURN_TYPE(/list/datum/reagents)
+
+ return list()
+
/**
* Checks if this machine can process this material
* Arguments
@@ -380,7 +383,7 @@
if(istype(chosen_boulder, /obj/item/boulder/artifact))
points_held = round((points_held + MINER_POINT_MULTIPLIER)) /// Artifacts give bonus points!
chosen_boulder.break_apart()
- return//We've processed all the materials in the boulder, so we can just destroy it in break_apart.
+ return //We've processed all the materials in the boulder, so we can just destroy it in break_apart.
chosen_boulder.processed_by = src
diff --git a/code/modules/mining/boulder_processing/refinery.dm b/code/modules/mining/boulder_processing/refinery.dm
index 52cf7189062..f65669d3b40 100644
--- a/code/modules/mining/boulder_processing/refinery.dm
+++ b/code/modules/mining/boulder_processing/refinery.dm
@@ -12,14 +12,33 @@
usage_sound = 'sound/machines/mining/refinery.ogg'
action = "crushing"
waste_chemical = /datum/reagent/toxin/acid/industrial_waste
+ pixel_y = 1
- /// What list of reagents should we look at when we boost the effectiveness of this machinery?
- booster_list = list(
- /datum/reagent/toxin/acid = 1,
- /datum/reagent/toxin/acid/fluacid = 2,
- /datum/reagent/toxin/acid/nitracid = 3,
- /datum/reagent/teslium = 5,
- )
+/obj/machinery/bouldertech/refinery/Initialize(mapload)
+ . = ..()
+ AddComponent(/datum/component/plumbing/boulder_reactions)
+ AddElement(/datum/element/simple_rotation)
+ update_appearance(UPDATE_OVERLAYS)
+
+/obj/machinery/bouldertech/refinery/update_icon_state()
+ . = ..()
+ set_light_on(anchored && is_operational && !panel_open)
+
+/obj/machinery/bouldertech/refinery/create_reagents(max_vol, flags)
+ QDEL_NULL(reagents)
+ reagents = new /datum/reagents/plumbing(max_vol, flags)
+ reagents.my_atom = src
+
+/obj/machinery/bouldertech/refinery/get_booster_reagents()
+ var/static/list/booster_reagents
+ if(!length(booster_reagents))
+ booster_reagents = list(
+ /datum/reagent/toxin/acid = 1,
+ /datum/reagent/toxin/acid/fluacid = 2,
+ /datum/reagent/toxin/acid/nitracid = 3,
+ /datum/reagent/teslium = 5,
+ )
+ return booster_reagents
/obj/machinery/bouldertech/refinery/can_process_material(datum/material/possible_mat)
var/static/list/processable_materials
@@ -54,24 +73,19 @@
reagents.maximum_volume = new_volume
-/obj/machinery/bouldertech/refinery/Initialize(mapload)
- . = ..()
- AddComponent(/datum/component/plumbing/boulder_reactions)
- AddElement(/datum/element/simple_rotation)
- update_appearance(UPDATE_OVERLAYS)
-
/obj/machinery/bouldertech/refinery/check_for_boosts()
. = ..() //resets to 1.00 efficiency in the parent
+
var/highest_boost = 0
var/datum/reagent/biggest_booster
- for(var/datum/reagent/chem in reagents.reagent_list)
- if(!booster_list[chem.type])
+ var/list/datum/reagents/booster_list = get_booster_reagents()
+ for(var/datum/reagent/booster as anything in booster_list)
+ var/booster_volume = booster_list[booster]
+ if(!reagents.has_reagent(booster, booster_volume)) //check that we have the associated quantity of the chem in order to perform the boost.
continue
- if(!reagents.has_reagent(chem.type, booster_list[chem.type])) //check that we have the associated quantity of the chem in order to perform the boost.
- continue
- if(booster_list[chem.type] > highest_boost)
- highest_boost = booster_list[chem.type]
- biggest_booster = chem.type
+ if(booster_list[booster] > highest_boost)
+ highest_boost = booster_volume
+ biggest_booster = booster
if(!biggest_booster)
return
@@ -80,14 +94,6 @@
refining_efficiency = 1 + (highest_boost / 10) //Results in a boost from 10-30%
reagents.add_reagent(waste_chemical, highest_boost)
-/obj/machinery/bouldertech/refinery/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/screwdriver)
- . = ..()
- set_light_on(TRUE)
-
-/obj/machinery/bouldertech/refinery/default_unfasten_wrench(mob/user, obj/item/wrench, time)
- . = ..()
- set_light_on(TRUE)
-
/obj/machinery/bouldertech/refinery/plunger_act(obj/item/plunger/attacking_plunger, mob/living/user, reinforced)
. = ..()
balloon_alert(user, "emptying...")
@@ -113,17 +119,24 @@
circuit = /obj/item/circuitboard/machine/smelter
usage_sound = 'sound/machines/mining/smelter.ogg'
action = "smelting"
- booster_list = list(
- /datum/reagent/fuel = 1,
- /datum/reagent/thermite = 2,
- /datum/reagent/gunpowder = 3,
- /datum/reagent/liquid_dark_matter = 5,
- )
+ pixel_x = -1
/obj/machinery/bouldertech/refinery/smelter/Initialize(mapload)
. = ..()
update_light_value()
+
+/obj/machinery/bouldertech/refinery/smelter/get_booster_reagents()
+ var/static/list/booster_reagents
+ if(!length(booster_reagents))
+ booster_reagents = list(
+ /datum/reagent/fuel = 1,
+ /datum/reagent/thermite = 2,
+ /datum/reagent/gunpowder = 3,
+ /datum/reagent/liquid_dark_matter = 5,
+ )
+ return booster_reagents
+
/obj/machinery/bouldertech/refinery/smelter/can_process_material(datum/material/possible_mat)
var/static/list/processable_materials
if(!length(processable_materials))
diff --git a/code/modules/plumbing/plumbers/acclimator.dm b/code/modules/plumbing/plumbers/acclimator.dm
index 06639fc99d8..0e9e1443344 100644
--- a/code/modules/plumbing/plumbers/acclimator.dm
+++ b/code/modules/plumbing/plumbers/acclimator.dm
@@ -1,4 +1,4 @@
-///Same as a tier 1 chem heater
+///Same as a tier 3 chem heater
#define HEATER_COFFICIENT 0.3
///Decimal point in rounding temperature
#define TEMP_ROUNDING 0.01
diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
index 8498456c164..9e73a0be361 100644
--- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
@@ -1640,7 +1640,7 @@
. = ..()
var/merged_total = amount + volume
if(merged_total >= CRITICAL_CAPACITY)
- spew_waste(round(volume / WASTE_REACTION_THRESHOLD*2)) //Sure as HELL can't store it.
+ spew_waste(round(volume / WASTE_REACTION_THRESHOLD * 2)) //Sure as HELL can't store it.
var/atom/container = holder.my_atom
var/damage_mult = 1
if(ismachinery(container))
diff --git a/icons/obj/machines/mining_machines.dmi b/icons/obj/machines/mining_machines.dmi
index c1a4076e3a2..a895f18da00 100644
Binary files a/icons/obj/machines/mining_machines.dmi and b/icons/obj/machines/mining_machines.dmi differ