Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
dynamic_landfill > 0.17 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
MewMew committed Mar 7, 2019
1 parent cabc449 commit 410b5dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions maps/junkyard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,8 @@ local function on_marked_for_deconstruction(event)
end

local function on_player_joined_game(event)
--local player = game.players[event.player_index]

if not global.map_init_done then
--local player = game.players[event.player_index]
if not global.map_init_done then
game.surfaces["nauvis"].ticks_per_day = game.surfaces["nauvis"].ticks_per_day * 2
--game.surfaces["nauvis"].freeze_daytime = true
global.map_init_done = true
Expand Down
4 changes: 3 additions & 1 deletion maps/modules/dynamic_landfill.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ end

local function regenerate_decoratives(surface, position)
local chunk = get_chunk_position(position)
surface.destroy_decoratives({{chunk.x * 32, chunk.y * 32}, {chunk.x * 32 + 32, chunk.y * 32 + 32}})
if not chunk then return end
surface.destroy_decoratives({area = {{chunk.x * 32, chunk.y * 32}, {chunk.x * 32 + 32, chunk.y * 32 + 32}}})
--surface.destroy_decoratives({{chunk.x * 32, chunk.y * 32}, {chunk.x * 32 + 32, chunk.y * 32 + 32}})
local decorative_names = {}
for k,v in pairs(game.decorative_prototypes) do
if v.autoplace_specification then
Expand Down

0 comments on commit 410b5dc

Please sign in to comment.