Fix hidden flag

This commit is contained in:
Simon Brodtmann 2025-07-06 21:14:26 +02:00
parent 012e626e50
commit 4f0867edbe
2 changed files with 4 additions and 3 deletions

View file

@ -43,7 +43,8 @@ data:extend({
stack_size = 1, stack_size = 1,
icon_size = 64, icon_size = 64,
icon = sprite('selection_tool.png'), icon = sprite('selection_tool.png'),
flags = {"hidden","mod-openable","only-in-cursor"}, flags = {"mod-openable","only-in-cursor"},
hidden = true,
selection_color = {r=0.79, g=0.4, b=0, a=0.5 }, selection_color = {r=0.79, g=0.4, b=0, a=0.5 },
selection_mode = {"any-entity"}, selection_mode = {"any-entity"},
selection_cursor_box_type = "entity", selection_cursor_box_type = "entity",

View file

@ -17,11 +17,11 @@ local clean_up_list = {
local function clean_up(clean_up_list) local function clean_up(clean_up_list)
for i,v in ipairs(clean_up_list) do for i,v in ipairs(clean_up_list) do
if data.raw.item[v] then if data.raw.item[v] then
data.raw.item[v].flags = { "hidden" } data.raw.item[v].hidden = true
end end
if data.raw["item-with-tags"][v] then if data.raw["item-with-tags"][v] then
data.raw["item-with-tags"][v].flags = { "hidden" } data.raw["item-with-tags"][v].hidden = true
end end
end end
end end