Shortwave Fixed


Connect circuit networks via shortwave radio channels.

Content
25 days ago
1.1 - 2.0
2.15K
Circuit network

g Fix for Signal cables remaining after entity removed

a month ago

Hi, thanks for the mod! I noticed that the signal wires don't get removed when you remove the entity. I believe to have fixed it by editing the local function OnEntityRemoved(event):

local function OnEntityRemoved(event)
local entity = event.entity
check_state(entity.force)

local link = radio_link(entity)

local link_red = link.get_wire_connector(defines.wire_connector_id.circuit_red)
local link_green = link.get_wire_connector(defines.wire_connector_id.circuit_green)

for _, connection in pairs(link_red.connections) do
link_red.disconnect_from(connection.target, defines.wire_origin.script)
end

for _, connection in pairs(link_green.connections) do
link_green.disconnect_from(connection.target, defines.wire_origin.script)
end

link.destroy()
radio_port(entity).destroy()
check_channels()
end

a month ago
(updated a month ago)

Hi, could you explain more of what the problem is? I don't see anything going wrong. When an entity is destroyed the wires to it should be destroyed automatically. Can you upload a save where this doesn't happen?

Edit: specifically in the 2.0 version, I mean. I am not maintaining the 1.1 version anymore.

a month ago

Hi, I tried testing it again and it seems to only happen on the surface of space stations. Although in testing it again I realized that the wires still don't get removed in this case so the issue seems to be rooted elsewhere.

https://we.tl/t-YfieGwRmIC on station 1

a month ago

Had the same problem.
When you delete a Shortwave entity in the space platform, its I/O entity is left behind.

a month ago

Thanks for the report! Fixed in 0.4.2. If any radios on the platform already aren't working, you'll have to mine them and build new ones. If any ports are left, try building a radio on top of them and then mining it.

a month ago

Awesome thanks, great work! The mod works really well with the space station theme, having power masts for signal cables felt awkward.

New response