mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-10 07:41:16 +01:00
Makes ore refineries drop materials below them when not linked to a silo (#93681)
## About The Pull Request - What it says above, makes them drop materials instead of sending them to the shadow realm - Replaces some 1 argument `round()'s` with `floor()'s` in material logic, someone should regex all of them sometime for a giant conflict merge PR ## Why It's Good For The Game > What it says above, makes them drop materials instead of sending them to the shadow realm - Makes custom-made refinery setups a bit more viable, alongside recovering from the ore silo being bombed/eaten by a hungry boi > Replaces some 1 argument `round()'s` with `floor()'s` in material logic - Round() using 1 argument is deprecated, should slowly start switching over ## Changelog 🆑 fix: the ore refineries now drop stacks of materials below them if they are not linked to a silo instead of being sent to the shadow realm /🆑
This commit is contained in:
@@ -103,6 +103,8 @@
|
||||
/obj/machinery/bouldertech/CanAllowThrough(atom/movable/mover, border_dir)
|
||||
if(!anchored)
|
||||
return FALSE
|
||||
if(istype(mover, /obj/item/stack/sheet))
|
||||
return TRUE
|
||||
if(istype(mover, /obj/item/boulder))
|
||||
return can_process_boulder(mover)
|
||||
if(isgolem(mover))
|
||||
@@ -350,8 +352,8 @@
|
||||
rejected_mats[possible_mat] = quantity
|
||||
continue
|
||||
points_held = round(points_held + (quantity * possible_mat.points_per_unit * MINING_POINT_MACHINE_MULTIPLIER)) // put point total here into machine
|
||||
if(!silo_materials.mat_container.insert_amount_mat(quantity, possible_mat))
|
||||
rejected_mats[possible_mat] = quantity
|
||||
if(isnull(silo_materials.silo) || !silo_materials.mat_container.insert_amount_mat(quantity, possible_mat))
|
||||
new possible_mat.sheet_type(drop_location(), floor(quantity / SHEET_MATERIAL_AMOUNT))
|
||||
|
||||
//puts back materials that couldn't be processed
|
||||
chosen_boulder.set_custom_materials(rejected_mats, refining_efficiency)
|
||||
|
||||
Reference in New Issue
Block a user