Realistic Reactors


Add realistic nuclear reactors including a breeder reactor type and cooling tower. The reactors must be controlled through integrated circuit interface signals. The thermal energy output is dynamic and depends on reactor core temperature. The reactors require sophisticated designs of their cooling system and heat-pipe network. If the operational conditions aren't met then a reactor core meltdown with dangerous consequences occurs

Content
1 year, 10 months ago
0.16 - 1.1
20.7K
Power

g How do you make the reactor require energy?

4 years ago

I am making a fusion power mod (my first mod ever). Fusion reactors require energy to start and maintain the reaction. Could I use some your code in my mod? And if so, please send me which part of your code is the "reactor consumes energy" part, it would be really helpfull.

4 years ago

When the reactor is build, an invisible entity is added, that consumes the electric energy.

The power entity is defined in the entity.lua (look for comment -- Power draining entity for normal reactor around line 480). The building event is in the control.lua around line 1626 (look for comment --add power entity).
You can control the consumption with: powerentity.energy = somenumber

Hope that helps. If you are not familiar with the concept of building additional entities to your "main" entity than this mod is probably not the best way to learn it, our code has become very messy over the years ;)

4 years ago

Yes, that definitely helps. I am not really familiar with anything regarding modding as this is my first one. Also, I will propably add the start/scramble functions in the future, but it will work as a normal reactor for now. Thank you :)

4 years ago
(updated 4 years ago)

When the reactor is build, an invisible entity is added, that consumes the electric energy.

The power entity is defined in the entity.lua (look for comment -- Power draining entity for normal reactor around line 480). The building event is in the control.lua around line 1626 (look for comment --add power entity).
You can control the consumption with: powerentity.energy = somenumber

Hope that helps. If you are not familiar with the concept of building additional entities to your "main" entity than this mod is probably not the best way to learn it, our code has become very messy over the years ;)

One more thing: if someone would disconnect the entity then the reactor will keep running without requiring power. This could be abused, is there any way to fix? As far as I know there is no way to detect if the power entity is powered.

New response