From b2a39588185d93413373a0ff6f0618aea2d6599b Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Sun, 14 Apr 2024 17:50:36 +0200 Subject: [PATCH] Don't render fish on server restart --- module/map/dump_entities.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/map/dump_entities.lua b/module/map/dump_entities.lua index 4cb8f67..a7b080e 100644 --- a/module/map/dump_entities.lua +++ b/module/map/dump_entities.lua @@ -3,6 +3,7 @@ ]] local clusterio_api = require("modules/clusterio/api") +local ignored_entities = require("modules/gridworld/map/ignored_entities") local function dump_entities(entities, removed_entities) -- Do removals first, then additions afterwards to avoid issues with entities being removed and added in the same cycle @@ -18,7 +19,7 @@ local function dump_entities(entities, removed_entities) local map_data = {} -- Get entities in the area for _, entity in pairs(tasks) do - if entity == nil or entity.valid == false then + if entity == nil or entity.valid == false or ignored_entities[entity.type] then goto continue end local position = entity.position