/tg/ Station 13 - Modules - TypesVar Details - Proc Details

core

This section contain the hfr core with all the variables and the Initialize() and Destroy() procs

Vars

common_channelThe common channel
conductionEnergy from the reaction lost from the molecule colliding between themselves.
core_temperatureTemperature of the center of the fusion reaction
cornersStores the information of the corners of the machine
critical_threshold_proximityIntegrity of the machine, if reaches 900 the machine will explode
critical_threshold_proximity_archivedStore the integrity for calculations
current_damperUser controlled variable to control the flow of the fusion by changing the instability of the reaction
delta_temperatureDifference between the gases temperature and the internal temperature of the reaction
efficiencyEfficiency of the reaction, it increases with the amount of plasma
emergency_alertThe alert we send when we've reached emergency_point
emergency_pointThe point at which we start sending messages to the common channel
energyFusion vars E=mc^2 with some addition to allow it gameplaywise
engineering_channelThe engineering channel
filter_typeSet the filtering type of the waste remove
final_countdownVar used in the meltdown phase
fuel_injection_rateUser controlled variable to control the flow of the fusion by changing the amount of fuel injected
fusion_temperatureThese vars store the temperatures to be used in the GUI
has_reached_emergencyBoolean used for logging if we've passed the emergency point
heat_limiter_modifierHotter air is easier to heat up and cool down
heat_outputThe amount of heat that is finally emitted, based on the power output. Min and max are variables that depends of the modifier
heating_conductorUser controlled variable to control the flow of the fusion by changing the contact of the material
icon_state_openVars for the state of the icon of the object (open, off, active)
instabilityInstability effects how chaotic the behavior of the reaction is
internal_fusionStores the information of the fusion gasmix
internal_power*Power emitted from the center of the fusion reaction: Internal power = densityH2 * densityTrit(Pi * (2 * rH2 * rTrit)**2) * Energy * density is calculated with moles/volume, rH2 and rTrit are values calculated with moles/(radius of the gas) both of the density can be varied by the power_modifier
iron_contentStores the iron content produced by the fusion
last_accent_soundcooldown tracker for accent sounds
lastwarningTime in 1/10th of seconds since the last sent warning
linked_inputStores the information of the fuel input
linked_interfaceHypertorus internal objects and gasmixes Stores the informations of the interface machine
linked_moderatorStores the information of the moderator input
linked_outputStores the information of the waste output
machine_partsStores the three inputs/outputs of the HFR, needed for cracking the parts
magnetic_constrictorUser controlled variable to control the flow of the fusion by changing the volume of the gasmix by controlling the power of the magnetic fields
melting_pointThe point at which we melt
moderator_injection_rateUser controlled variable to control the flow of the fusion by changing the amount of moderators injected
moderator_internalStores the information of the moderators gasmix
power_levelStores the current fusion mix power level
power_output*The effective power transmission of the fusion reaction, power_output = efficiency * (internal_power - conduction - radiation) * Conduction is the heat value that is transmitted by the molecular interactions and it gets removed from the internal_power lowering the effective output * Radiation is the irradiation released by the fusion reaction, it comprehends all wavelenghts in the spectrum, it lowers the effective output of the reaction
rad_powerAmount of radiation that the machine can output
radiationThe remaining wavelength that actually can do damage to mobs.
radioOur internal radio
radio_keyThe key our internal radio uses
safe_alertOur "Shit is no longer fucked" message. We send it when critical_threshold_proximity is less then critical_threshold_proximity_archived
selected_fuelStores the current fuel mix that the user has selected
soundloopOur soundloop
start_coolingChecks for the cooling to start
start_fuelChecks for the fuel to be injected
start_powerProcessing checks Checks if the user has started the machine
warning_alertThe alert we send when we've reached warning_point
warning_pointThe point at which we should start sending messeges about the critical_threshold_proximity to the engi channels.
waste_removeCheck if the user want to remove the waste gases

Procs

activateCalled by multitool_act() in hfr_parts.dm It sets the pieces to active, allowing the player to start the main reaction Arguments:
alarmCalled by check_alert() in this file Play a sound from the machine, the type depends on the status of the hfr
check_alertCalled by process_atmos() in hfr_main_processes.dm Called after checking the damage of the machine, calls alarm() and countdown() Broadcast messages into engi and common radio
check_fuelCalled by the main fusion processes in hfr_main_processes.dm Getter for fusion fuel moles
check_gas_requirementsChecks if the gases in the input are the ones needed by the recipe
check_part_connectivityThis section contain all procs that helps building, destroy and control the hfr
check_power_useCalled by the main fusion processes in hfr_main_processes.dm Check the power use of the machine, return TRUE if there is enough power in the powernet
countdownCalled by check_alert() in this file Called when the damage has reached critical levels, start the countdown before the destruction, calls meltdown()
deactivateCalled by unregister_signals() in this file, called when the main fusion processes check_part_connectivity() returns false Deactivate the various machines by setting the active var to false, updates the machines icon and set the linked machine vars to null
dump_gasesRemoves the gases from the internal gasmix when the recipe is changed
fusion_processCalled by process() Contains the main fusion calculations and checks, for more informations check the comments along the code.
get_integrity_percentGetter for the machine integrity
get_statusCalled by alarm() in this file Check the integrity level and returns the status of the machine
meltdownCalled by countdown() in this file Create the explosion + the gas emission before deleting the machine core.
process_atmosMain Fusion processes process_atmos() is mainly used to dea with the damage calculation, gas moving between the parts (like cooling, gas injection, output) and the calculation for the power level process() calls fusion_process() and set the fusion_started var to TRUE if the power level goes over 0 fusion_process() the main calculations are done here
unregister_signalsCalled when a part gets deleted around the hfr, called on Destroy() of the hfr core in hfr_core.dm Unregister the signals attached to the core from the various machines, if only_signals is false it will also call deactivate() Arguments:

Var Details

common_channel

The common channel

conduction

Energy from the reaction lost from the molecule colliding between themselves.

core_temperature

Temperature of the center of the fusion reaction

corners

Stores the information of the corners of the machine

critical_threshold_proximity

Integrity of the machine, if reaches 900 the machine will explode

critical_threshold_proximity_archived

Store the integrity for calculations

current_damper

User controlled variable to control the flow of the fusion by changing the instability of the reaction

delta_temperature

Difference between the gases temperature and the internal temperature of the reaction

efficiency

Efficiency of the reaction, it increases with the amount of plasma

emergency_alert

The alert we send when we've reached emergency_point

emergency_point

The point at which we start sending messages to the common channel

energy

Fusion vars E=mc^2 with some addition to allow it gameplaywise

engineering_channel

The engineering channel

filter_type

Set the filtering type of the waste remove

final_countdown

Var used in the meltdown phase

fuel_injection_rate

User controlled variable to control the flow of the fusion by changing the amount of fuel injected

fusion_temperature

These vars store the temperatures to be used in the GUI

has_reached_emergency

Boolean used for logging if we've passed the emergency point

heat_limiter_modifier

Hotter air is easier to heat up and cool down

heat_output

The amount of heat that is finally emitted, based on the power output. Min and max are variables that depends of the modifier

heating_conductor

User controlled variable to control the flow of the fusion by changing the contact of the material

icon_state_open

Vars for the state of the icon of the object (open, off, active)

instability

Instability effects how chaotic the behavior of the reaction is

internal_fusion

Stores the information of the fusion gasmix

internal_power

*Power emitted from the center of the fusion reaction: Internal power = densityH2 * densityTrit(Pi * (2 * rH2 * rTrit)**2) * Energy * density is calculated with moles/volume, rH2 and rTrit are values calculated with moles/(radius of the gas) both of the density can be varied by the power_modifier

iron_content

Stores the iron content produced by the fusion

last_accent_sound

cooldown tracker for accent sounds

lastwarning

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

linked_input

Stores the information of the fuel input

linked_interface

Hypertorus internal objects and gasmixes Stores the informations of the interface machine

linked_moderator

Stores the information of the moderator input

linked_output

Stores the information of the waste output

machine_parts

Stores the three inputs/outputs of the HFR, needed for cracking the parts

magnetic_constrictor

User controlled variable to control the flow of the fusion by changing the volume of the gasmix by controlling the power of the magnetic fields

melting_point

The point at which we melt

moderator_injection_rate

User controlled variable to control the flow of the fusion by changing the amount of moderators injected

moderator_internal

Stores the information of the moderators gasmix

power_level

Stores the current fusion mix power level

power_output

*The effective power transmission of the fusion reaction, power_output = efficiency * (internal_power - conduction - radiation) * Conduction is the heat value that is transmitted by the molecular interactions and it gets removed from the internal_power lowering the effective output * Radiation is the irradiation released by the fusion reaction, it comprehends all wavelenghts in the spectrum, it lowers the effective output of the reaction

rad_power

Amount of radiation that the machine can output

radiation

The remaining wavelength that actually can do damage to mobs.

radio

Our internal radio

radio_key

The key our internal radio uses

safe_alert

Our "Shit is no longer fucked" message. We send it when critical_threshold_proximity is less then critical_threshold_proximity_archived

selected_fuel

Stores the current fuel mix that the user has selected

soundloop

Our soundloop

start_cooling

Checks for the cooling to start

start_fuel

Checks for the fuel to be injected

start_power

Processing checks Checks if the user has started the machine

warning_alert

The alert we send when we've reached warning_point

warning_point

The point at which we should start sending messeges about the critical_threshold_proximity to the engi channels.

waste_remove

Check if the user want to remove the waste gases

Proc Details

activate

Called by multitool_act() in hfr_parts.dm It sets the pieces to active, allowing the player to start the main reaction Arguments:

alarm

Called by check_alert() in this file Play a sound from the machine, the type depends on the status of the hfr

check_alert

Called by process_atmos() in hfr_main_processes.dm Called after checking the damage of the machine, calls alarm() and countdown() Broadcast messages into engi and common radio

check_fuel

Called by the main fusion processes in hfr_main_processes.dm Getter for fusion fuel moles

check_gas_requirements

Checks if the gases in the input are the ones needed by the recipe

check_part_connectivity

This section contain all procs that helps building, destroy and control the hfr

Called by multitool_act() in hfr_parts.dm, by atmos_process() in hfr_main_processes.dm and by fusion_process() in the same file This proc checks the surrounding of the core to ensure that the machine has been build correctly, returns false if there is a missing piece/wrong placed one

check_power_use

Called by the main fusion processes in hfr_main_processes.dm Check the power use of the machine, return TRUE if there is enough power in the powernet

countdown

Called by check_alert() in this file Called when the damage has reached critical levels, start the countdown before the destruction, calls meltdown()

deactivate

Called by unregister_signals() in this file, called when the main fusion processes check_part_connectivity() returns false Deactivate the various machines by setting the active var to false, updates the machines icon and set the linked machine vars to null

dump_gases

Removes the gases from the internal gasmix when the recipe is changed

fusion_process

Called by process() Contains the main fusion calculations and checks, for more informations check the comments along the code.

get_integrity_percent

Getter for the machine integrity

get_status

Called by alarm() in this file Check the integrity level and returns the status of the machine

meltdown

Called by countdown() in this file Create the explosion + the gas emission before deleting the machine core.

process_atmos

Main Fusion processes process_atmos() is mainly used to dea with the damage calculation, gas moving between the parts (like cooling, gas injection, output) and the calculation for the power level process() calls fusion_process() and set the fusion_started var to TRUE if the power level goes over 0 fusion_process() the main calculations are done here

unregister_signals

Called when a part gets deleted around the hfr, called on Destroy() of the hfr core in hfr_core.dm Unregister the signals attached to the core from the various machines, if only_signals is false it will also call deactivate() Arguments: