Power Overload


Performant, semi-realistic power distribution overhaul. Power poles can explode if the total electrical consumption on the network is too high. Use transformers to separate networks so that subnetworks do not take more power than they can handle.

Content
1 year, 2 months ago
1.1
3.07K
Power

b [Fixed-1.2.6] Crash on transformer remove

1 year, 8 months ago

Both with hand and robo. Version 1.2.5

Error while running event PowerOverload::on_pre_player_mined_item (ID 11)
LuaSurface doesn't contain key destroy.
stack traceback:
[C]: in function 'index'
__PowerOverload
/scripts/transformer.lua:93: in function 'on_transformer_destroyed'
PowerOverload/control.lua:31: in function <PowerOverload/control.lua:28>
6962.870 Error ClientMultiplayerManager.cpp:99: MultiplayerManager failed: "The mod Power Overload (1.2.105) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event PowerOverload::on_pre_player_mined_item (ID 11)
LuaSurface doesn't contain key destroy.
stack traceback:
[C]: in function 'index'
__PowerOverload
/scripts/transformer.lua:93: in function 'on_transformer_destroyed'
PowerOverload/control.lua:31: in function <PowerOverload/control.lua:28>"

code:
function on_transformer_destroyed(transformer)
local transformer_parts = global.transformers[transformer.unit_number]
if transformer_parts then
for name, entity in pairs(transformer_parts) do
if name ~= "transformer" then
-- If the transformer is destryed then the player won't get the item back
entity.destroy() <---here
end
end
end

1 year, 8 months ago

Sorry, silly error on my part that broke because of yesterday's refactoring. Fixed in 1.2.6!

1 year, 8 months ago
(updated 1 year, 8 months ago)

1.2.6! - No friend, error remained! biters destroyed the transformer and on the poles (there is a mod for houses) there was a need for 300 megawatts (three houses are limited to 100 megawatts each, BUT they do not consume that much). And the pole is broken!
Yes, and the second transformer was standing nearby - something happened to it and it stopped passing energy in the on mode. (helped to replace it.)

1 year, 8 months ago

Friend when you do an update, at least give me the opportunity to go back (((.

1 year, 8 months ago

Hello, it seems that you're not experiencing any crashes so whatever the problem is it isn't the same as the one fixed in 1.2.6. I'm not entirely sure what your problem is though, I tried and I can't reproduce any bad behaviour. Would you be able to send a save that demonstrates the problem perhaps? (Or detailed reproduction steps). Ideally in a new thread since this is a different problem :)

btw you can always download old versions here: https://mods.factorio.com/mod/PowerOverload/downloads

New response