Here is a fix for anyone not interested in waiting for a new version. If you go into the control.lua change the following parts of the code:
CHANGE THESE FUNCTIONS:
local function entityBuilt(event)
if classes[event.created_entity.name] ~= nil then
local tab = data[event.created_entity.name]
table.insert(tab, classes[event.created_entity.name].onPlace(event.created_entity))
data[event.created_entity.name] = tab
end
save_data()
end
local function entityRemoved(event)
if classes[event.entity.name] ~= nil then
for k, v in ipairs(data[event.entity.name]) do
if v.entity == event.entity then
local tab = data[event.entity.name]
table.remove(tab, k)
classes[event.entity.name].onDestroy(v)
data[event.entity.name] = tab
break
end
end
end
save_data()
end
local function CloseSCGUI(playerIndex)
if gui[playerIndex] == nil then
return
end
data["rail-station-controller"][gui[playerIndex].entityIndex].station = gui[playerIndex].gui.station.text
gui[playerIndex].gui.destroy()
gui[playerIndex] = nil
save_data()
end
ADD THIS FUNCTION:
local function save_data()
global.railLogicSystem = data
end