Im trying to convert my mod "Transformator" to 0.12, but have trouble doing so.
Behind the scenes i use a dummy building which can be charged by one network. In the script i exctract power from it.
With this power the amount of hot water is calculated, to make a dummy steam engine run. This worked fine in 0.11,
but not in 0.12
For debugging purposes, i gave the dummy-steam-engine some fixed amount of liquid at the beginning. I expected the
fluid box to quickly empty. It does empty, however it provides unlimited power.
powerproducer:
Code: Select all
type = "generator",
name = "powerproducer",
icon = "__Transformator__/graphics/icons/trafoicon.png",
flags = {"placeable-neutral","player-creation"},
max_health = 300,
corpse = "big-remnants",
dying_explosion = "medium-explosion",
effectivity = 1,
fluid_usage_per_tick = 16.666,
collision_mask = {"ghost-layer"},
collision_box = {{-0.9, -0.9}, {0.9, 0.9}},
selection_box = {{-1.0, -1.0}, {1.0, 1.0}},
fluid_box =
{
base_area = 2,
pipe_covers = pipecoverspictures(),
pipe_connections =
{
},
},
energy_source =
{
type = "electric",
usage_priority = "solar"
},
horizontal_animation = transparent_pic,
vertical_animation = transparent_pic,
working_sound =
{
sound =
{
filename = "__Transformator__/sound/MainsBrum50Hz.ogg",
volume = 0.6
},
max_sounds_per_type = 3
},
min_perceived_performance = 0.25,
order = "z",
selectable_in_game = false
},
Code: Select all
...
local producer = create{name = "powerproducer", position =
tarpos, force = entity.force}
...
producer.fluidbox[1] = {type="water", amount=5, temperature=25}
...
megajoule after megajoule out of it.
When i print the amount of liquid in the fluidbox it starts at 5 but one tick later its gone to zero?
I assume the steam engine has an output buffer and converts the 5 UOL water directly to this buffer, but why
do i get more energy than it should?