Skip to content

Commit ad22772

Browse files
committed
Experimental fixes.
1 parent 1be71a6 commit ad22772

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

modules/landfill.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ function Landfill.compute_prototype_overrides()
3737

3838
log("Computing collision box overrides...")
3939

40+
local surface = game.surfaces["_BPEX_Temp_Surface"]
41+
if surface then
42+
log("Old temporary surface existed for some reason, destroying it.")
43+
game.destroy_surface(surface)
44+
end
45+
4046
-- Temporary surface.
41-
local surface = game.create_surface("_BPEX_Temp_Surface")
47+
surface = game.create_surface("_BPEX_Temp_Surface")
4248
local x, y
4349

4450
for name, proto in pairs(game.entity_prototypes) do

0 commit comments

Comments
 (0)