Fixes for boulder processing machines (#96033)

## About The Pull Request
- Opening the panel of a boulder refiner machine or un-wrenching it now
turns off its environment light
- The boulder refiner machine has reagent holder of type
`/datum/reagents/plumbing` which fixes rounding errors & has other
plumbing optimized features
- The boulder refiner machine now only takes in booster reagents & only
outputs waste reagent. This means even if you have a tank with random
reagents attached to it, it will only take in booster reagents if
present & exclude the rest thus saving you time & space from taking in
other reagents
- booster reagents is now a static list shared by all machines thus
saving memory
- Removed `supply_offset` & `demand_offset` vars from core plumbing
component. These vars were making the pipes extend outside the tile
causing it to overlap with adjacent tile machine pipes making everything
ugly. Now the pipes are perpendicular to the conveyer belt sprite and
will only take in boulders from the conveyer belt direction


https://github.com/user-attachments/assets/5583a790-32b6-40df-a414-1602dd84fefd




- Map edited smelters so the conveyer belt is in the direction of the
refiner


## Changelog
🆑
fix: opening panel of boulder refinery with screwdriver or un-wrenching
it turns of its light
fix: boulder refinery only takes in booster reagents and excludes others
and only outputs waste chemicals as intended
fix: boulder refinery machines outputs waste reagents without rounding
errors in them
qol: removed conveyer sprite from boulder smelter & pixel shifts the
refiner so you can see it's plumbing pipes properly
sprite: smelters will now only take in boulders in the direction of its
conveyer belt. It's plumbing pipes are perpendicular to its conveyer
belt
/🆑
This commit is contained in:
SyncIt21
2026-05-22 14:58:52 -04:00
committed by GitHub
parent d2b4b2430a
commit eaba74a2eb
13 changed files with 90 additions and 95 deletions
@@ -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
@@ -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)