Assmos tweaks/minor additions. (#32400)

* Adds pluoxium formation, makes fusion radioactive and nerfs it, makes noblium cost more energy.

* Review response.

* tanks now melt above 1 Million degrees Kelvin.
This commit is contained in:
as334
2017-11-10 02:30:36 -05:00
committed by CitadelStationBot
parent 5de28f6eb8
commit 7f9800e8fa
6 changed files with 36 additions and 17 deletions

View File

@@ -1,3 +1,5 @@
/atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return null
@@ -94,7 +96,7 @@
AT.fire_act(temperature, volume)
return
#define INSUFFICIENT(path) (!location.air.gases[path] || location.air.gases[path][MOLES] < 0.5)
/obj/effect/hotspot/process()
if(just_spawned)
just_spawned = FALSE
@@ -111,9 +113,7 @@
if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
qdel(src)
return
//Nothing to burn
if(!(location.air) || !(location.air.gases[/datum/gas/plasma] || location.air.gases[/datum/gas/tritium]) || !location.air.gases[/datum/gas/oxygen])
if(!location.air || (INSUFFICIENT(/datum/gas/plasma) && INSUFFICIENT(/datum/gas/tritium)) || INSUFFICIENT(/datum/gas/oxygen))
qdel(src)
return
@@ -190,3 +190,4 @@
. = ..()
if(!isliving(loc))
return INITIALIZE_HINT_QDEL
#undef INSUFFICIENT

View File

@@ -26,8 +26,9 @@
#define MAX_CATALYST_EFFICENCY 9
#define PLASMA_FUSED_COEFFICENT 0.08
#define CATALYST_COEFFICENT 0.01
#define FUSION_PURITY_THRESHOLD 0.9
#define FUSION_PURITY_THRESHOLD 0.95
#define FUSION_HEAT_DROPOFF 20000+T0C
#define NOBLIUM_FORMATION_ENERGY 2e9 //1 Mole of Noblium takes the planck energy to condense.
/datum/controller/subsystem/air/var/list/gas_reactions //this is our singleton of all reactions
/proc/init_gas_reactions()
@@ -197,7 +198,7 @@
/datum/gas/tritium = MINIMUM_HEAT_CAPACITY
)
/datum/gas_reaction/fusion/react(datum/gas_mixture/air)
/datum/gas_reaction/fusion/react(datum/gas_mixture/air, turf/open/location)
var/list/cached_gases = air.gases
var/temperature = air.temperature
@@ -210,22 +211,23 @@
var/reaction_energy = THERMAL_ENERGY(air)
var/moles_impurities = air.total_moles()-(cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/tritium][MOLES])
var/plasma_fused = (PLASMA_FUSED_COEFFICENT*catalyst_efficency)*(temperature/PLASMA_BINDING_ENERGY)*4
var/tritium_catalyzed = (CATALYST_COEFFICENT*catalyst_efficency)*(temperature/PLASMA_BINDING_ENERGY)
var/plasma_fused = (PLASMA_FUSED_COEFFICENT*catalyst_efficency)*(temperature/PLASMA_BINDING_ENERGY)/10
var/tritium_catalyzed = (CATALYST_COEFFICENT*catalyst_efficency)*(temperature/PLASMA_BINDING_ENERGY)/40
var/oxygen_added = tritium_catalyzed
var/waste_added = (plasma_fused-oxygen_added)-((air.total_moles()*air.heat_capacity())/PLASMA_BINDING_ENERGY)
var/waste_added = max((plasma_fused-oxygen_added)-((air.total_moles()*air.heat_capacity())/PLASMA_BINDING_ENERGY),0)
reaction_energy = max(reaction_energy+((catalyst_efficency*cached_gases[/datum/gas/plasma][MOLES])/((moles_impurities/catalyst_efficency)+2)*10)+((plasma_fused/((moles_impurities/catalyst_efficency)))*PLASMA_BINDING_ENERGY),0)
air.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/water_vapor, /datum/gas/nitrous_oxide, /datum/gas/nitryl)
air.assert_gases(/datum/gas/oxygen, /datum/gas/carbon_dioxide, /datum/gas/water_vapor, /datum/gas/nitrous_oxide, /datum/gas/nitryl)
//Fusion produces an absurd amount of waste products now, requiring active filtration.
cached_gases[/datum/gas/plasma][MOLES] = max(cached_gases[/datum/gas/plasma][MOLES] - plasma_fused,0)
cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES] - tritium_catalyzed,0)
cached_gases[/datum/gas/oxygen][MOLES] += oxygen_added
cached_gases[/datum/gas/nitrogen][MOLES] += waste_added
cached_gases[/datum/gas/water_vapor][MOLES] += waste_added
cached_gases[/datum/gas/nitrous_oxide][MOLES] += waste_added
cached_gases[/datum/gas/nitryl][MOLES] += waste_added
cached_gases[/datum/gas/carbon_dioxide][MOLES] += waste_added
if (location)
radiation_pulse(location, reaction_energy/(PLASMA_BINDING_ENERGY*MAX_CATALYST_EFFICENCY))
if(reaction_energy > 0)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
@@ -288,8 +290,8 @@
ASSERT_GAS(/datum/gas/bz,air)
cached_gases[/datum/gas/bz][MOLES]+= reaction_efficency
cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES]- 2*reaction_efficency,0)
cached_gases[/datum/gas/plasma][MOLES] = max(cached_gases[/datum/gas/plasma][MOLES] - reaction_efficency,0)
cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES]- reaction_efficency,0)
cached_gases[/datum/gas/plasma][MOLES] = max(cached_gases[/datum/gas/plasma][MOLES] - (2*reaction_efficency),0)
if(energy_released > 0)
@@ -346,7 +348,7 @@
air.assert_gases(/datum/gas/hypernoblium,/datum/gas/bz)
var/old_heat_capacity = air.heat_capacity()
var/nob_formed = (cached_gases[/datum/gas/nitrogen][MOLES]*cached_gases[/datum/gas/tritium][MOLES])/100
var/energy_taken = nob_formed*(10000000/(max(cached_gases[/datum/gas/bz][MOLES],1)))
var/energy_taken = nob_formed*(NOBLIUM_FORMATION_ENERGY/(max(cached_gases[/datum/gas/bz][MOLES],1)))
cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES]- 10*nob_formed,0)
cached_gases[/datum/gas/nitrogen][MOLES] = max(cached_gases[/datum/gas/nitrogen][MOLES]- 20*nob_formed,0)
cached_gases[/datum/gas/hypernoblium][MOLES]+= nob_formed
@@ -356,6 +358,8 @@
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
air.temperature = max(((air.temperature*old_heat_capacity - energy_taken)/new_heat_capacity),TCMB)
#undef REACTING
#undef NO_REACTION
#undef OXYGEN_BURN_RATE_BASE
@@ -381,4 +385,5 @@
#undef PLASMA_FUSED_COEFFICENT
#undef CATALYST_COEFFICENT
#undef FUSION_PURITY_THRESHOLD
#undef FUSION_HEAT_DROPOFF
#undef FUSION_HEAT_DROPOFF
#undef NOBLIUM_FORMATION_ENERGY

View File

@@ -37,6 +37,8 @@
eject()
else
loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] -= 0.001*drainratio
ASSERT_GAS(/datum/gas/tritium,loaded_tank.air_contents)
loaded_tank.air_contents.gases[/datum/gas/tritium][MOLES] += 0.001*drainratio
loaded_tank.air_contents.garbage_collect()
var/power_produced = min(last_power, (last_power*RAD_COLLECTOR_STORED_OUT)+1000) //Produces at least 1000 watts if it has more than that stored