Reactor Interface

by GotLag

Provides an interface for reactors to connect to the circuit network.

Content
4 years ago
0.15 - 1.1
6.25K
Circuit network

b Crash when launching a spaceship with a recactor (Space exploration mod)

4 years ago

6393.885 Error MainLoop.cpp:1202: Exception at tick 678167: The mod Reactor Interface (1.0.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Reactor Interface::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
Reactor Interface/control.lua:100: in function 'update'
Reactor Interface/control.lua:134: in function <Reactor Interface/control.lua:131>
stack traceback:
[C]: in function 'index'
__Reactor Interface
/control.lua:100: in function 'update'
Reactor Interface/control.lua:134: in function <Reactor Interface/control.lua:131>

Spaceships work using the area cloning command, teleporting everything in the spaceship into a new surface to stimulate flight.

4 years ago
(updated 4 years ago)

I've been running a custom fix for a few days now, seems to be stable.

In control.lua add

script.on_event(defines.events.on_entity_cloned, function(event)
  if event.source.name == REACTOR_ENTITY_NAME then
    remove_interface(event.source)
  end
end)

Edit: This is NOT a proper fix. It stops crashes but leaves an unkillable orphaned entity behind.

4 years ago

Sorry for the slow reply, a bunch of stuff came up and I forgot about this. I'll see if I can get a proper fix out soon.

New response