Merge remote-tracking branch 'tgstation/master' into upstream-6-2-2026

This commit is contained in:
shayoki
2026-06-03 01:23:54 -05:00
1259 changed files with 50763 additions and 28726 deletions
@@ -22,6 +22,8 @@
var/points_held = 0
///The action verb to display to players
var/action = "processing"
/// What reagent should be produced when a boost chemical is replaced by the booster_reagent?
var/datum/reagent/waste_chemical = /datum/reagent/water
/// Cooldown associated with the sound played for collecting mining points.
COOLDOWN_DECLARE(sound_cooldown)
@@ -75,14 +77,18 @@
/obj/machinery/bouldertech/examine(mob/user)
. = ..()
. += span_notice("The machine reads that it has [span_bold("[points_held] mining points")] stored. Swipe an ID to claim them.")
. += span_notice("Click to remove a stored boulder.")
. += span_suppradio("The machine reads that it has [EXAMINE_HINT("[points_held] mining points")] stored. Swipe an ID to claim them.")
var/boulder_count = 0
for(var/obj/item/boulder/potential_boulder in contents)
boulder_count += 1
. += span_notice("Storage capacity = <b>[boulder_count]/[boulders_held_max] boulders</b>.")
. += span_notice("Can process up to <b>[boulders_processing_count] boulders</b> at a time.")
if(boulder_count >= 1)
. += span_notice("[EXAMINE_HINT("Right Click")] to manually remove a stored boulder.<br />")
. += span_info("Storage capacity = <b>[boulder_count]/[boulders_held_max] boulders</b>.")
. += span_info("This machine can process up to [EXAMINE_HINT("[boulders_processing_count] boulders")] at a time.")
if(anchored)
. += span_notice("It's [EXAMINE_HINT("anchored")] in place.")
@@ -94,6 +100,16 @@
if(panel_open)
. += span_notice("The whole machine can be [EXAMINE_HINT("pried")] apart.")
/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 <b>chemical intake:</b><br>")
for(var/datum/reagent/increment as anything in booster_list)
. += span_info("&bull; [increment::name]: Provides [booster_list[increment] * 10]% Boost")
. += span_notice("<br>Upon being boosted successfully, \the [src] will produce [EXAMINE_HINT("[waste_chemical.name]")].")
/obj/machinery/bouldertech/update_icon_state()
. = ..()
var/suffix = ""
@@ -102,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
@@ -235,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
@@ -338,7 +360,8 @@
//if boulders are kept inside because there is no space to eject them, then they could be reprocessed, lets avoid that
if(!chosen_boulder.processed_by)
check_for_boosts()
if(length(reagents.reagent_list))
check_for_boosts() //Handles the mineral boosting, as well as creating waste. Must have reagents in the machine.
//here we loop through the boulder's ores
var/list/rejected_mats = list()
@@ -347,7 +370,7 @@
if(!can_process_material(possible_mat))
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
points_held += round(quantity * possible_mat.points_per_boulder_unit) // put point total here into machine
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))
@@ -358,9 +381,9 @@
if(!length(chosen_boulder.custom_materials))
playsound(loc, usage_sound, 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(istype(chosen_boulder, /obj/item/boulder/artifact))
points_held = round((points_held + MINER_POINT_MULTIPLIER) * MINING_POINT_MACHINE_MULTIPLIER) /// Artifacts give bonus points!
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
@@ -387,7 +410,7 @@
breakdown_boulder(potential_boulder)
boulders_found = FALSE
//when the boulder is removed it plays sound and displays a balloon alert. don't overlap when that happens
//when the boulder is removed it plays sound and displays a balloon alert. Don't overlap when that happens
if(boulders_found)
playsound(loc, usage_sound, 29, FALSE, SHORT_RANGE_SOUND_EXTRARANGE)
balloon_alert_to_viewers(action)
@@ -34,7 +34,7 @@
register_context()
AddComponent(/datum/component/two_handed, require_twohands = TRUE, force_unwielded = 0, force_wielded = 5) //Heavy as all hell, it's a boulder, dude.
AddComponent(/datum/component/sisyphus_awarder)
AddElement(/datum/element/bane, mob_biotypes = MOB_SPECIAL, added_damage = 20, requires_combat_mode = FALSE)
AddComponent(/datum/component/bane, affected_biotypes = MOB_SPECIAL, added_damage = 20)
/obj/item/boulder/Destroy(force)
SSore_generation.available_boulders -= src
@@ -110,6 +110,7 @@
return
if(HAS_TRAIT(user, TRAIT_BOULDER_BREAKER))
manual_process(null, user, INATE_BOULDER_SPEED_MULTIPLIER) //A little hacky but it works around the speed of the blackboard task selection process for now.
return TRUE
/obj/item/boulder/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
. = ..()
@@ -1,3 +1,6 @@
#define BONUS_MATS_MINIMUM 1
#define BONUS_MATS_MAXIMUM 5
///Boulders with special artificats that can give higher mining points
/obj/item/boulder/artifact
name = "artifact boulder"
@@ -7,10 +10,14 @@
var/artifact_type = /obj/item/relic/lavaland
/// References to the relic inside the boulder, if any.
var/obj/item/artifact_inside
/// Bonus materials to add to this boulder, in addition to existing materials created by the ore vent.
var/datum/material/bonus_mat
/obj/item/boulder/artifact/Initialize(mapload)
. = ..()
artifact_inside = new artifact_type(src) /// This could be poggers for archaeology in the future.
if(bonus_mat)
add_bonus_mats()
/obj/item/boulder/artifact/Destroy(force)
QDEL_NULL(artifact_inside)
@@ -27,7 +34,24 @@
/obj/item/boulder/artifact/update_icon_state()
. = ..()
icon_state = "boulder_artifact" // Hardset to artifact sprites for consistency
icon_state = initial(icon_state) // Hardset to artifact sprites for consistency
/// Adds a random amount of material to an artifact boulder, determined by BONUS_MAT defines and of the type bonus_mat defined on the boulder.
/obj/item/boulder/artifact/proc/add_bonus_mats()
var/list/bonus_mats = list()
if(custom_materials)
bonus_mats = custom_materials.Copy()
bonus_mats[bonus_mat] += rand(BONUS_MATS_MINIMUM, BONUS_MATS_MAXIMUM) * SHEET_MATERIAL_AMOUNT
set_custom_materials(bonus_mats)
/obj/item/boulder/artifact/bluespace
icon_state = "boulder_artifact_BS"
bonus_mat = /datum/material/bluespace
/obj/item/boulder/artifact/diamond
icon_state = "boulder_artifact_diamond"
bonus_mat = /datum/material/diamond
///Boulders usually spawned in lavaland labour camp area
/obj/item/boulder/gulag
@@ -77,3 +101,6 @@
desc = "A bizarre, twisted boulder. Wait, wait no, it's just a rock."
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.1, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.1)
durability = 1
#undef BONUS_MATS_MINIMUM
#undef BONUS_MATS_MAXIMUM
@@ -5,12 +5,40 @@
*/
/obj/machinery/bouldertech/refinery
name = "boulder refinery"
desc = "BR for short. Accepts boulders and refines non-metallic ores into sheets using internal chemicals."
desc = "Accepts boulders and refines non-metallic ores into sheets using internal chemicals."
icon_state = "stacker"
base_icon_state = "stacker"
circuit = /obj/item/circuitboard/machine/refinery
usage_sound = 'sound/machines/mining/refinery.ogg'
action = "crushing"
waste_chemical = /datum/reagent/toxin/acid/industrial_waste
pixel_y = 1
/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
@@ -37,6 +65,43 @@
boulders_processing_count += servo.tier
boulders_processing_count = ROUND_UP((boulders_processing_count / 8) * boulders_held_max)
var/new_volume = 0
for(var/obj/item/reagent_containers/beaker in component_parts)
new_volume += beaker.volume
if(!reagents)
create_reagents(new_volume, OPENCONTAINER)
reagents.maximum_volume = new_volume
/obj/machinery/bouldertech/refinery/check_for_boosts()
. = ..() //resets to 1.00 efficiency in the parent
var/highest_boost = 0
var/datum/reagent/biggest_booster
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(booster_list[booster] > highest_boost)
highest_boost = booster_volume
biggest_booster = booster
if(!biggest_booster)
return
reagents.remove_reagent(biggest_booster, highest_boost) //remove the associated amount from the reagents
refining_efficiency = 1 + (highest_boost / 10) //Results in a boost from 10-30%
reagents.add_reagent(waste_chemical, highest_boost)
/obj/machinery/bouldertech/refinery/plunger_act(obj/item/plunger/attacking_plunger, mob/living/user, reinforced)
. = ..()
balloon_alert(user, "emptying...")
if(do_after(user, 2 SECONDS, src))
reagents.expose(drop_location())
reagents.clear_reagents()
/**
* Your other new favorite industrial waste magnet!
* Accepts boulders and produces sheets of metallic materials.
@@ -44,7 +109,7 @@
*/
/obj/machinery/bouldertech/refinery/smelter
name = "boulder smelter"
desc = "BS for short. Accept boulders and refines metallic ores into sheets."
desc = "Accept boulders and refines metallic ores into sheets."
icon_state = "smelter"
base_icon_state = "smelter"
light_system = OVERLAY_LIGHT
@@ -54,11 +119,24 @@
circuit = /obj/item/circuitboard/machine/smelter
usage_sound = 'sound/machines/mining/smelter.ogg'
action = "smelting"
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))