mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 01:57:01 +00:00
Adds a max temperature to fusion (#47073)
This commit is contained in:
@@ -48,3 +48,4 @@
|
||||
#define FUSION_RAD_MAX 2000
|
||||
#define FUSION_RAD_COEFFICIENT (-1000)
|
||||
#define FUSION_INSTABILITY_ENDOTHERMALITY 2
|
||||
#define FUSION_MAXIMUM_TEMPERATURE 1e8
|
||||
|
||||
@@ -302,7 +302,9 @@
|
||||
|
||||
reaction_energy += delta_plasma*PLASMA_BINDING_ENERGY //Energy is gained or lost corresponding to the creation or destruction of mass.
|
||||
if(instability < FUSION_INSTABILITY_ENDOTHERMALITY)
|
||||
reaction_energy = max(reaction_energy,0) //Stable reactions don't end up endothermic.
|
||||
reaction_energy = max(reaction_energy,0) //Stable reactions don't end up exothermic.
|
||||
else if(air.temperature > FUSION_MAXIMUM_TEMPERATURE && reaction_energy > 0) //Makes the reaction neutral if above max temp.
|
||||
reaction_energy = 0
|
||||
else if (reaction_energy < 0)
|
||||
reaction_energy *= (instability-FUSION_INSTABILITY_ENDOTHERMALITY)**0.5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user