File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ local actions = require('actions')
77
88local Landfill = {
99 ALIGNMENT_OVERRIDES = require (" modules/snap" ).ALIGNMENT_OVERRIDES
10+ prototypes_computed = false
1011}
1112
1213
@@ -15,6 +16,10 @@ local get_overlapping_tiles = Geom2D.get_overlapping_tiles
1516
1617
1718function Landfill .compute_prototype_overrides ()
19+ if Landfill .prototypes_computed then
20+ return
21+ end
22+ Landfill .prototypes_computed = true
1823 -- Some entities require special arguments when created. We skip those; they're unlikely to come up in blueprints
1924 -- anyways
2025 local type_blacklist = {
@@ -37,14 +42,8 @@ function Landfill.compute_prototype_overrides()
3742
3843 log (" Computing collision box overrides..." )
3944
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 .delete_surface (surface )
44- end
45-
4645 -- Temporary surface.
47- surface = game .create_surface (" _BPEX_Temp_Surface" )
46+ local surface = game .create_surface (" _BPEX_Temp_Surface" )
4847 local x , y
4948
5049 for name , proto in pairs (game .entity_prototypes ) do
You can’t perform that action at this time.
0 commit comments