Page 1 of 1

Add ability to know max consumption for fusion-reactor (fusion fuel section)

Posted: Sun May 18, 2025 4:23 pm
by Helfima
Hello

there is LuaEntityPrototype::get_max_energy_usage(quality?) and for fusion-reactor that return 10MW but there is nothing to know 100MW in Cunsumes Fusion Fuel section

Re: Add ability to know max consumption for fusion-reactor (fusion fuel section)

Posted: Sun May 18, 2025 4:57 pm
by eugenekay
I think that the 100MW figure is calculated by multiplying the fusion reactor's fluid property:
max_fluid_usage = 4/second, -- at normal quality
by the fluid definition for Plasma:
default_temperature = 1000000,
heat_capacity = "25J",
1,000,000 Degrees * 25 Joules * 4 Fluid/second = 100MW output power. Quality Fusion Reactors output more Fluid; Neighboring Fusion reactors increase the Temperature of the Fluid.

Good Luck!

Re: Add ability to know max consumption for fusion-reactor (fusion fuel section)

Posted: Mon May 19, 2025 6:47 am
by curiosity
Helfima wrote: Sun May 18, 2025 4:23 pm there is LuaEntityPrototype::get_max_energy_usage(quality?) and for fusion-reactor that return 10MW but there is nothing to know 100MW in Cunsumes Fusion Fuel section
Probably because it consumes electric energy. The API was never made with such entities in mind.

Re: Add ability to know max consumption for fusion-reactor (fusion fuel section)

Posted: Tue Jul 15, 2025 2:37 pm
by Helfima
fixed in v2.0.56
because now LuaEntityPrototype::get_fluid_usage_per_tick return value for FusionReactor

Code: Select all

get_fluid_usage_per_tick(quality?) → double?
The fluid usage of this generator or fusion reactor prototype.

Parameters
quality	:: QualityID?	
Can only be used if this is Generator or FusionReactor
this can be move in "Already exists" section

Re: Add ability to know max consumption for fusion-reactor (fusion fuel section)

Posted: Tue Jul 15, 2025 7:30 pm
by curiosity
Helfima wrote: Tue Jul 15, 2025 2:37 pm this can be move in "Already exists" section
You mean "Implemented mod requests", since this request predates 2.0.56.