Update supermatter.dm
This commit is contained in:
@@ -5,12 +5,21 @@
|
|||||||
#define PLASMA_HEAT_PENALTY 15 // Higher == Bigger heat and waste penalty from having the crystal surrounded by this gas. Negative numbers reduce penalty.
|
#define PLASMA_HEAT_PENALTY 15 // Higher == Bigger heat and waste penalty from having the crystal surrounded by this gas. Negative numbers reduce penalty.
|
||||||
#define OXYGEN_HEAT_PENALTY 1
|
#define OXYGEN_HEAT_PENALTY 1
|
||||||
#define CO2_HEAT_PENALTY 0.1
|
#define CO2_HEAT_PENALTY 0.1
|
||||||
#define NITROGEN_HEAT_MODIFIER -1.5
|
#define PLUOXIUM_HEAT_PENALTY -1
|
||||||
|
#define TRITIUM_HEAT_PENALTY 10
|
||||||
|
#define NITROGEN_HEAT_PENALTY -1.5
|
||||||
|
#define BZ_HEAT_PENALTY 5
|
||||||
|
|
||||||
#define OXYGEN_TRANSMIT_MODIFIER 1.5 //Higher == Bigger bonus to power generation.
|
#define OXYGEN_TRANSMIT_MODIFIER 1.5 //Higher == Bigger bonus to power generation.
|
||||||
#define PLASMA_TRANSMIT_MODIFIER 4
|
#define PLASMA_TRANSMIT_MODIFIER 4
|
||||||
|
#define BZ_TRANSMIT_MODIFIER -2
|
||||||
|
|
||||||
|
#define TRITIUM_RADIOACTIVITY_MODIFIER 3 //Higher == Crystal spews out more radiation
|
||||||
|
#define BZ_RADIOACTIVITY_MODIFIER 5
|
||||||
|
#define PLUOXIUM_RADIOACTIVITY_MODIFIER -2
|
||||||
|
|
||||||
#define N2O_HEAT_RESISTANCE 6 //Higher == Gas makes the crystal more resistant against heat damage.
|
#define N2O_HEAT_RESISTANCE 6 //Higher == Gas makes the crystal more resistant against heat damage.
|
||||||
|
#define PLUOXIUM_HEAT_RESISTANCE 3
|
||||||
|
|
||||||
#define POWERLOSS_INHIBITION_GAS_THRESHOLD 0.20 //Higher == Higher percentage of inhibitor gas needed before the charge inertia chain reaction effect starts.
|
#define POWERLOSS_INHIBITION_GAS_THRESHOLD 0.20 //Higher == Higher percentage of inhibitor gas needed before the charge inertia chain reaction effect starts.
|
||||||
#define POWERLOSS_INHIBITION_MOLE_THRESHOLD 20 //Higher == More moles of the gas are needed before the charge inertia chain reaction effect starts. //Scales powerloss inhibition down until this amount of moles is reached
|
#define POWERLOSS_INHIBITION_MOLE_THRESHOLD 20 //Higher == More moles of the gas are needed before the charge inertia chain reaction effect starts. //Scales powerloss inhibition down until this amount of moles is reached
|
||||||
@@ -53,6 +62,7 @@
|
|||||||
#define SUPERMATTER_EMERGENCY_PERCENT 25
|
#define SUPERMATTER_EMERGENCY_PERCENT 25
|
||||||
#define SUPERMATTER_DANGER_PERCENT 50
|
#define SUPERMATTER_DANGER_PERCENT 50
|
||||||
#define SUPERMATTER_WARNING_PERCENT 100
|
#define SUPERMATTER_WARNING_PERCENT 100
|
||||||
|
#define CRITICAL_TEMPERATURE 10000
|
||||||
|
|
||||||
#define SUPERMATTER_COUNTDOWN_TIME 30 SECONDS
|
#define SUPERMATTER_COUNTDOWN_TIME 30 SECONDS
|
||||||
|
|
||||||
@@ -102,6 +112,11 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
|||||||
var/o2comp = 0
|
var/o2comp = 0
|
||||||
var/co2comp = 0
|
var/co2comp = 0
|
||||||
var/n2ocomp = 0
|
var/n2ocomp = 0
|
||||||
|
var/pluoxiumcomp = 0
|
||||||
|
var/tritiumcomp = 0
|
||||||
|
var/bzcomp = 0
|
||||||
|
|
||||||
|
var/pluoxiumbonus = 0
|
||||||
|
|
||||||
var/combined_gas = 0
|
var/combined_gas = 0
|
||||||
var/gasmix_power_ratio = 0
|
var/gasmix_power_ratio = 0
|
||||||
@@ -184,8 +199,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
|||||||
to_chat(H, "<span class='danger'>You get headaches just from looking at it.</span>")
|
to_chat(H, "<span class='danger'>You get headaches just from looking at it.</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
#define CRITICAL_TEMPERATURE 10000
|
|
||||||
|
|
||||||
/obj/machinery/power/supermatter_crystal/proc/get_status()
|
/obj/machinery/power/supermatter_crystal/proc/get_status()
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
if(!T)
|
if(!T)
|
||||||
@@ -354,16 +367,24 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
|||||||
plasmacomp = max(removed.gases[/datum/gas/plasma]/combined_gas, 0)
|
plasmacomp = max(removed.gases[/datum/gas/plasma]/combined_gas, 0)
|
||||||
o2comp = max(removed.gases[/datum/gas/oxygen]/combined_gas, 0)
|
o2comp = max(removed.gases[/datum/gas/oxygen]/combined_gas, 0)
|
||||||
co2comp = max(removed.gases[/datum/gas/carbon_dioxide]/combined_gas, 0)
|
co2comp = max(removed.gases[/datum/gas/carbon_dioxide]/combined_gas, 0)
|
||||||
|
pluoxiumcomp = max(removed.gases[/datum/gas/pluoxium]/combined_gas, 0)
|
||||||
|
tritiumcomp = max(removed.gases[/datum/gas/tritium]/combined_gas, 0)
|
||||||
|
bzcomp = max(removed.gases[/datum/gas/bz]/combined_gas, 0)
|
||||||
|
|
||||||
n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide]/combined_gas, 0)
|
n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide]/combined_gas, 0)
|
||||||
n2comp = max(removed.gases[/datum/gas/nitrogen]/combined_gas, 0)
|
n2comp = max(removed.gases[/datum/gas/nitrogen]/combined_gas, 0)
|
||||||
|
|
||||||
gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp - n2comp, 0), 1)
|
if(pluoxiumcomp >= 15)
|
||||||
|
pluoxiumbonus = 1 //Just to be safe I don't want to remove pluoxium
|
||||||
|
else
|
||||||
|
pluoxiumbonus = 0
|
||||||
|
|
||||||
dynamic_heat_modifier = max((plasmacomp * PLASMA_HEAT_PENALTY)+(o2comp * OXYGEN_HEAT_PENALTY)+(co2comp * CO2_HEAT_PENALTY)+(n2comp * NITROGEN_HEAT_MODIFIER), 0.5)
|
gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp + tritiumcomp + bzcomp - pluoxiumcomp - n2comp, 0), 1)
|
||||||
dynamic_heat_resistance = max(n2ocomp * N2O_HEAT_RESISTANCE, 1)
|
|
||||||
|
|
||||||
power_transmission_bonus = max((plasmacomp * PLASMA_TRANSMIT_MODIFIER) + (o2comp * OXYGEN_TRANSMIT_MODIFIER), 0)
|
dynamic_heat_modifier = max((plasmacomp * PLASMA_HEAT_PENALTY) + (o2comp * OXYGEN_HEAT_PENALTY) + (co2comp * CO2_HEAT_PENALTY) + (tritiumcomp * TRITIUM_HEAT_PENALTY) + ((pluoxiumcomp * PLUOXIUM_HEAT_PENALTY) * pluoxiumbonus) + (n2comp * NITROGEN_HEAT_PENALTY) + (bzcomp * BZ_HEAT_PENALTY), 0.5)
|
||||||
|
dynamic_heat_resistance = max((n2ocomp * N2O_HEAT_RESISTANCE) + ((pluoxiumcomp * PLUOXIUM_HEAT_RESISTANCE) * pluoxiumbonus), 1)
|
||||||
|
|
||||||
|
power_transmission_bonus = max((plasmacomp * PLASMA_TRANSMIT_MODIFIER) + (o2comp * OXYGEN_TRANSMIT_MODIFIER) + (bzcomp * BZ_TRANSMIT_MODIFIER), 0)
|
||||||
|
|
||||||
//more moles of gases are harder to heat than fewer, so let's scale heat damage around them
|
//more moles of gases are harder to heat than fewer, so let's scale heat damage around them
|
||||||
mole_heat_penalty = max(combined_gas / MOLE_HEAT_PENALTY, 0.25)
|
mole_heat_penalty = max(combined_gas / MOLE_HEAT_PENALTY, 0.25)
|
||||||
@@ -392,7 +413,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
|||||||
power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload
|
power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload
|
||||||
|
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
radiation_pulse(src, power * (1 + power_transmission_bonus/10))
|
radiation_pulse(src, power * (1 + (tritiumcomp * TRITIUM_RADIOACTIVITY_MODIFIER) + ((pluoxiumcomp * PLUOXIUM_RADIOACTIVITY_MODIFIER) * pluoxiumbonus) * (power_transmission_bonus/(10-(bzcomp * BZ_RADIOACTIVITY_MODIFIER))))) // Rad Modifiers BZ(500%), Tritium(300%), and Pluoxium(-200%)
|
||||||
|
if(bzcomp >= 0.4 && prob(30 * bzcomp))
|
||||||
|
src.fire_nuclear_particles() // Start to emit radballs at a maximum of 30% chance per tick
|
||||||
|
|
||||||
var/device_energy = power * REACTION_POWER_MODIFIER
|
var/device_energy = power * REACTION_POWER_MODIFIER
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user