Skip to content

Commit

Permalink
Merge pull request #4171 from out-of-phaze/fix/graphite-melt
Browse files Browse the repository at this point in the history
Fix smelter being unable to melt graphite
  • Loading branch information
MistakeNot4892 authored Jul 14, 2024
2 parents 4760d36 + 0ddee81 commit 3c507d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
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

0 comments on commit 3c507d7

Please sign in to comment.