energy_accumulator
Abstract type for generators that accumulate energy over time and slowly release it eg. radiation collectors, tesla coils
Vars | |
processed_energy | The amount of energy that got processed last tick. |
---|---|
stored_energy | The amount of energy that is currently inside the machine before being converted to electricity |
wants_powernet | Whether this accumulator should connect to and power a powernet |
Procs | |
calculate_energy_output | Gets the energy the energy_accumulator would release within the given timespan time. The power output is proportional to the energy, and has a constant power output added to it. Args: |
calculate_sustainable_power | Calculates the power needed to sustain the energy accumulator at its current energy. |
release_energy | Releases joules amount of its stored energy onto the powernet. Args: |
Var Details
processed_energy
The amount of energy that got processed last tick.
stored_energy
The amount of energy that is currently inside the machine before being converted to electricity
wants_powernet
Whether this accumulator should connect to and power a powernet
Proc Details
calculate_energy_output
Gets the energy the energy_accumulator would release within the given timespan time. The power output is proportional to the energy, and has a constant power output added to it. Args:
- time: The amount of time that is being processed, in seconds. Returns: The amount of energy it would release in the timespan.
calculate_sustainable_power
Calculates the power needed to sustain the energy accumulator at its current energy.
release_energy
Releases joules amount of its stored energy onto the powernet. Args:
- joules: The amount of energy to release. Returns: Whether it successfully released its energy or not.