Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix smelter being unable to melt graphite #4171

Merged
merged 2 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/__defines/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define BASE_OBJECT_MATTER_MULTPLIER 0.25

#define GENERIC_SMELTING_HEAT_POINT 1000 CELSIUS
#define HIGH_SMELTING_HEAT_POINT 1500 CELSIUS
#define HIGH_SMELTING_HEAT_POINT 4000 CELSIUS // must be at least 4074K (3800 C) to melt graphite
#define TECH_MATERIAL "materials"
#define TECH_ENGINEERING "engineering"
#define TECH_EXOTIC_MATTER "exoticmatter"
Expand Down
21 changes: 1 addition & 20 deletions code/modules/mining/machinery/material_smelter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,12 @@
create_reagents(INFINITY)
queue_temperature_atoms(src)

// Outgas anything that is in gas form. Check what you put into the smeltery, nerds.
// Update displayed materials
/obj/machinery/material_processing/smeltery/on_reagent_change()

if(!(. = ..()) || !reagents)
return

var/datum/gas_mixture/environment = loc?.return_air()
if(!environment)
return

var/adjusted_air = FALSE
for(var/mtype in reagents?.reagent_volumes)
var/decl/material/mat = GET_DECL(mtype)
if(!isnull(mat.boiling_point) && temperature >= mat.boiling_point)
adjusted_air = TRUE
var/removing = REAGENT_VOLUME(reagents, mtype)
remove_from_reagents(mtype, removing, defer_update = TRUE)
if(environment)
environment.adjust_gas_temp(mtype, (removing * 0.2), temperature, FALSE) // Arbitrary conversion constant, TODO consistent one

if(adjusted_air)
if(environment)
environment.update_values()
reagents.update_total()

for(var/mtype in reagents.reagent_volumes)
show_materials |= mtype

Expand Down
Loading