[solved] Why does this cause game to hang?
Posted: Sun Oct 16, 2016 2:49 am
Solved: It was triggering some broken code (that only ran when fake water existed) in my control.lua
Get's through the data stage no problem, but when I go to generate a new game Factorio hangs...
As autoplace is set to nil on the fake tiles, they should be ignored by map generation, right?
Get's through the data stage no problem, but when I go to generate a new game Factorio hangs...
Code: Select all
-- in data.lua
local waterTypes = { 'water', 'water-green', 'deepwater', 'deepwater-green' }
for _,current in ipairs( waterTypes ) do
local original = data.raw.tile[current]
if original then
local fake = table.deepcopy( original )
fake.ageing = original.ageing - 0.0001
fake.autoplace = nil
fake.collision_mask = { 'ground-tile', 'item-layer', 'doodad-layer', 'resource-layer' }
fake.name = 'fake-'..original.name
data:extend { fake }
end
end