Skip to content

Commit

Permalink
Fix crash, remove logs, don't render fish
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielv123 committed Apr 14, 2024
1 parent 499e8be commit 6d09cb4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions module/map/dump_entities.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ local function dump_entities(entities, removed_entities)
end
::continue::
end
game.print(table.concat(map_data, ";"))
game.print("Sending "..(#map_data / 3).." pixels to nodejs")

clusterio_api.send_json("gridworld:tile_data", {
type = "pixels",
data = table.concat(map_data, ";"),
Expand Down
2 changes: 1 addition & 1 deletion module/map/events/on_nth_tick.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local dump_entities = require("modules/gridworld/map/dump_entities")

local function on_nth_tick()
if global.gridworld.map.added_entities_to_update or #global.gridworld.map.removed_entities_to_update > 0 then
if global.gridworld.map.added_entities_to_update or (global.gridworld.map.removed_entities_to_update and #global.gridworld.map.removed_entities_to_update > 0) then
dump_entities(global.gridworld.map.added_entities_to_update, global.gridworld.map.removed_entities_to_update)
global.gridworld.map.added_entities_to_update = nil
global.gridworld.map.removed_entities_to_update = {}
Expand Down
1 change: 1 addition & 0 deletions module/map/ignored_entities.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ local ignored_entities = {
"spider-vehicle",
"character",
"character-corpse",
"fish",
}

return ignored_entities

0 comments on commit 6d09cb4

Please sign in to comment.