supermatter_crystal

Vars | |
absorbed_gasmix | The gasmix we just recently absorbed. Tile's air multiplied by absorption_ratio |
---|---|
absorption_ratio | The portion of the gasmix we're on that we should remove |
activation_logged | Boolean used to log the first activation of the SM. |
bullet_energy | How much the bullets damage should be multiplied by when it is added to the internal variables |
countdown | An effect we show to admins and ghosts the percentage of delam we're at |
damage | The amount of damage we have currently. |
damage_archived | The damage we had before this cycle. Used to check if we are currently taking damage or healing. |
danger_point | The point at which we consider the supermatter to be [SUPERMATTER_STATUS_DANGER] Spawns anomalies when more damaged than this too. |
delam_priority | Whether the sm is forced in a specific delamination_strategy or not. All truthy values means it's forced. Only values greater or equal to the current one can change the strat. |
delamination_strategy | How we are delaminating. |
disable_damage | Disables all methods of taking damage. |
disable_gas | Disables the calculation of gas effects and production of waste. SM still "breathes" though, still takes gas and spits it out. Nothing is done on them though. Cleaner code this way. Get rid of if it's too wasteful. |
disable_power_change | Disables power changes. |
disable_process | Disables the SM's proccessing totally when set to SM_PROCESS_DISABLED. Temporary disables the processing when it's set to SM_PROCESS_TIMESTOP. Make sure absorbed_gasmix and gas_percentage isnt null if this is on SM_PROCESS_DISABLED. |
emergency_point | The point at which we consider the supermatter to be [SUPERMATTER_STATUS_EMERGENCY] |
explosion_point | The point at which we delam [SUPERMATTER_STATUS_DELAMINATING]. |
explosion_power | A scaling value that affects the severity of explosions. |
external_damage_immediate | External damage that are added to the sm on next [/obj/machinery/power/supermatter_crystal/process_atmos] call. SM will not take damage if it's health is lower than emergency point. |
external_power_immediate | External power that are added to the sm on next [/obj/machinery/power/supermatter_crystal/process_atmos] call. |
external_power_trickle | External power that are added over time instead of immediately. |
final_countdown | Are we exploding? |
gas_heat_modifier | Affects the heat our SM makes. |
gas_heat_power_generation | Affects the power gain the SM experiances from heat. |
gas_heat_resistance | Affects the minimum point at which the SM takes heat damage |
gas_percentage | The list of gases mapped against their current comp. We use this to calculate different values the supermatter uses, like power or heat resistance. Ranges from 0 to 1 |
gas_power_transmission | Affects the amount of power the main SM zap makes. |
gas_powerloss_inhibition | How much power decay is negated. Complete power decay negation at 1. |
gl_uid | The amount of supermatters that have been created this round |
hallucination_power | How much hallucination should we produce per unit of power? |
hue_angle_shift | Hue shift of the zaps color based on the power of the crystal |
include_in_cims | Do we show this crystal in the CIMS modular program |
internal_energy | Refered to as EER on the monitor. This value effects gas output, damage, and power generation. |
is_main_engine | Only main engines can have their sliver stolen, can trigger cascades, and can spawn stationwide anomalies. |
last_accent_sound | cooldown tracker for accent sounds |
last_power_zap | Stores the time of when the last zap occurred |
lastwarning | Time in 1/10th of seconds since the last sent warning |
moveable | Can it be moved? |
powerloss_linear_offset | The offset of the linear powerloss function set so the transition is differentiable. |
powerloss_linear_threshold | The power threshold required to transform the powerloss function into a linear function from a cubic function. |
psy_coeff | Var that increases from 0 to 1 when a psychologist is nearby, and decreases in the same way |
radio | Our internal radio |
radio_key | The key our internal radio uses |
soundloop | Our soundloop |
temp_limit | The temperature at which we start taking damage |
uid | The id of our supermatter |
warning_point | The point at which we consider the supermatter to be [SUPERMATTER_STATUS_WARNING] |
warp | Reference to the warp effect |
waste_multiplier | Multiplies our waste gas amount and temperature. |
zap_cutoff | The cutoff for a bolt jumping, grows with heat, lowers with higher mol count, |
zap_icon | Tracks the bolt color we are using |
zap_multiplier | How much extra power does the main zap generate. |
Procs | |
calculate_damage | Perform calculation for the damage taken or healed. Description of each factors can be found in the defines. |
calculate_gases | Perform calculation for variables that depend on gases. Description of each factors can be found in the defines. |
calculate_internal_energy | Perform calculation for power lost and gained this tick. Description of each factors can be found in the defines. |
calculate_temp_limit | Tell people the heat output in energy. More informative than telling them the heat multiplier. Calculate at which temperature the sm starts taking damage. heat limit is given by: (T0C+40) * (1 + gas heat res + psy_coeff) |
calculate_waste_multiplier | Perform calculation for the waste multiplier. This number affects the temperature, plasma, and oxygen of the waste gas. Multiplier is applied to energy for plasma and temperature but temperature for oxygen. |
calculate_zap_multiplier | Perform calculation for the main zap power multiplier. Description of each factors can be found in the defines. |
count_down | Count down, spout some messages, and then execute the delam itself. We guard for last second delam strat changes here, mostly because some have diff messages. |
get_integrity_percent | Returns the integrity percent of the Supermatter. No rounding made yet, round it yourself. |
get_status | Encodes the current state of the supermatter. |
log_activation | If we have a small amount of external_power_trickle we just round it up to 40. Power if we dont have decay. Used for powerloss calc. |
set_delam | Sets the delam of our sm. |
sm_ui_data | Returns data that are exclusively about this sm. |
tram_contents_consume | Consume things that run into the supermatter from the tram. The tram calls forceMove (doesn't call Bump/ed) and not Move, and I'm afraid changing it will do something chaotic |
ui_interact | Do waste on another gasmix so we can keep a copy of the gasmix we use for processing. |
Var Details
absorbed_gasmix

The gasmix we just recently absorbed. Tile's air multiplied by absorption_ratio
absorption_ratio

The portion of the gasmix we're on that we should remove
activation_logged

Boolean used to log the first activation of the SM.
bullet_energy

How much the bullets damage should be multiplied by when it is added to the internal variables
countdown

An effect we show to admins and ghosts the percentage of delam we're at
damage

The amount of damage we have currently.
damage_archived

The damage we had before this cycle. Used to check if we are currently taking damage or healing.
danger_point

The point at which we consider the supermatter to be [SUPERMATTER_STATUS_DANGER] Spawns anomalies when more damaged than this too.
delam_priority

Whether the sm is forced in a specific delamination_strategy or not. All truthy values means it's forced. Only values greater or equal to the current one can change the strat.
delamination_strategy

How we are delaminating.
disable_damage

Disables all methods of taking damage.
disable_gas

Disables the calculation of gas effects and production of waste. SM still "breathes" though, still takes gas and spits it out. Nothing is done on them though. Cleaner code this way. Get rid of if it's too wasteful.
disable_power_change

Disables power changes.
disable_process

Disables the SM's proccessing totally when set to SM_PROCESS_DISABLED. Temporary disables the processing when it's set to SM_PROCESS_TIMESTOP. Make sure absorbed_gasmix and gas_percentage isnt null if this is on SM_PROCESS_DISABLED.
emergency_point

The point at which we consider the supermatter to be [SUPERMATTER_STATUS_EMERGENCY]
explosion_point

The point at which we delam [SUPERMATTER_STATUS_DELAMINATING].
explosion_power

A scaling value that affects the severity of explosions.
external_damage_immediate

External damage that are added to the sm on next [/obj/machinery/power/supermatter_crystal/process_atmos] call. SM will not take damage if it's health is lower than emergency point.
external_power_immediate

External power that are added to the sm on next [/obj/machinery/power/supermatter_crystal/process_atmos] call.
external_power_trickle

External power that are added over time instead of immediately.
final_countdown

Are we exploding?
gas_heat_modifier

Affects the heat our SM makes.
gas_heat_power_generation

Affects the power gain the SM experiances from heat.
gas_heat_resistance

Affects the minimum point at which the SM takes heat damage
gas_percentage

The list of gases mapped against their current comp. We use this to calculate different values the supermatter uses, like power or heat resistance. Ranges from 0 to 1
gas_power_transmission

Affects the amount of power the main SM zap makes.
gas_powerloss_inhibition

How much power decay is negated. Complete power decay negation at 1.
gl_uid

The amount of supermatters that have been created this round
hallucination_power

How much hallucination should we produce per unit of power?
hue_angle_shift

Hue shift of the zaps color based on the power of the crystal
include_in_cims

Do we show this crystal in the CIMS modular program
internal_energy

Refered to as EER on the monitor. This value effects gas output, damage, and power generation.
is_main_engine

Only main engines can have their sliver stolen, can trigger cascades, and can spawn stationwide anomalies.
last_accent_sound

cooldown tracker for accent sounds
last_power_zap

Stores the time of when the last zap occurred
lastwarning

Time in 1/10th of seconds since the last sent warning
moveable

Can it be moved?
powerloss_linear_offset

The offset of the linear powerloss function set so the transition is differentiable.
powerloss_linear_threshold

The power threshold required to transform the powerloss function into a linear function from a cubic function.
psy_coeff

Var that increases from 0 to 1 when a psychologist is nearby, and decreases in the same way
radio

Our internal radio
radio_key

The key our internal radio uses
soundloop

Our soundloop
temp_limit

The temperature at which we start taking damage
uid

The id of our supermatter
warning_point

The point at which we consider the supermatter to be [SUPERMATTER_STATUS_WARNING]
warp

Reference to the warp effect
waste_multiplier

Multiplies our waste gas amount and temperature.
zap_cutoff

The cutoff for a bolt jumping, grows with heat, lowers with higher mol count,
zap_icon

Tracks the bolt color we are using
zap_multiplier

How much extra power does the main zap generate.
Proc Details
calculate_damage
Perform calculation for the damage taken or healed. Description of each factors can be found in the defines.
Updates: /obj/machinery/power/supermatter_crystal/var/damage
Returns: The factors that have influenced the calculation. list[FACTOR_DEFINE] = number
calculate_gases
Perform calculation for variables that depend on gases. Description of each factors can be found in the defines.
Updates: [/obj/machinery/power/supermatter_crystal/var/list/gas_percentage] /obj/machinery/power/supermatter_crystal/var/gas_power_transmission /obj/machinery/power/supermatter_crystal/var/gas_heat_modifier /obj/machinery/power/supermatter_crystal/var/gas_heat_resistance /obj/machinery/power/supermatter_crystal/var/gas_heat_power_generation /obj/machinery/power/supermatter_crystal/var/gas_powerloss_inhibition
Returns: null
calculate_internal_energy
Perform calculation for power lost and gained this tick. Description of each factors can be found in the defines.
Updates: /obj/machinery/power/supermatter_crystal/var/internal_energy /obj/machinery/power/supermatter_crystal/var/external_power_trickle /obj/machinery/power/supermatter_crystal/var/external_power_immediate
Returns: The factors that have influenced the calculation. list[FACTOR_DEFINE] = number
calculate_temp_limit
Tell people the heat output in energy. More informative than telling them the heat multiplier. Calculate at which temperature the sm starts taking damage. heat limit is given by: (T0C+40) * (1 + gas heat res + psy_coeff)
Description of each factors can be found in the defines.
Updates: /obj/machinery/power/supermatter_crystal/var/temp_limit
Returns: The factors that have influenced the calculation. list[FACTOR_DEFINE] = number
calculate_waste_multiplier
Perform calculation for the waste multiplier. This number affects the temperature, plasma, and oxygen of the waste gas. Multiplier is applied to energy for plasma and temperature but temperature for oxygen.
Description of each factors can be found in the defines.
Updates: /obj/machinery/power/supermatter_crystal/var/waste_multiplier
Returns: The factors that have influenced the calculation. list[FACTOR_DEFINE] = number
calculate_zap_multiplier
Perform calculation for the main zap power multiplier. Description of each factors can be found in the defines.
Updates: /obj/machinery/power/supermatter_crystal/var/zap_multiplier
Returns: The factors that have influenced the calculation. list[FACTOR_DEFINE] = number
count_down
Count down, spout some messages, and then execute the delam itself. We guard for last second delam strat changes here, mostly because some have diff messages.
By last second changes, we mean that it's possible for say, a tesla delam to just explode normally if at the absolute last second it loses power and switches to default one. Even after countdown is already in progress.
get_integrity_percent
Returns the integrity percent of the Supermatter. No rounding made yet, round it yourself.
get_status
Encodes the current state of the supermatter.
log_activation
If we have a small amount of external_power_trickle we just round it up to 40. Power if we dont have decay. Used for powerloss calc.
-
Log when the supermatter is activated for the first time.
-
Everything that can increase /obj/machinery/power/supermatter_crystal/var/internal_energy
-
either directly or indirectly MUST call this.
-
Arguments:
-
- who - Either a string or a datum. Whatever gave power to the SM. Mandatory.
-
- how - A datum. How they powered it. Optional.
set_delam
Sets the delam of our sm.
Arguments:
- priority: Truthy values means a forced delam. If current forced_delam is higher than priority we dont run. Set to a number higher than SM_DELAM_PRIO_IN_GAME to fully force an admin delam.
- delam_path: Typepath of a /datum/sm_delam. SM_DELAM_STRATEGY_PURGE means reset and put prio back to zero.
Returns: Not used for anything, just returns true on succesful set, manual and automatic. Helps admins check stuffs.
sm_ui_data
Returns data that are exclusively about this sm.
tram_contents_consume
Consume things that run into the supermatter from the tram. The tram calls forceMove (doesn't call Bump/ed) and not Move, and I'm afraid changing it will do something chaotic
ui_interact
Do waste on another gasmix so we can keep a copy of the gasmix we use for processing.