Hiding flags from splitters.
Posted: Sat Apr 20, 2024 6:13 am
Hi everyone.
I'm trying to hide certain items from the splitter's filter menu.
I've been successful with most of them, but I've got ten that won't hide, even with the flags set to hidden.
My code (in data-updates.lua) is below, with the problem items being the ones at the bottom.
None of the items are needed in the mod (except maybe the automation-science-pack).
Has anyone got an idea on how to fix this?
I'm trying to hide certain items from the splitter's filter menu.
I've been successful with most of them, but I've got ten that won't hide, even with the flags set to hidden.
My code (in data-updates.lua) is below, with the problem items being the ones at the bottom.
None of the items are needed in the mod (except maybe the automation-science-pack).
Has anyone got an idea on how to fix this?
Code: Select all
if data.raw["furnace"]["stone-furnace"] then
data.raw["furnace"]["stone-furnace"].next_upgrade = nil
end
local item_flags_to_hide = {
"wood",
"coal",
"stone",
"iron-ore",
"copper-ore",
"uranium-ore",
"iron-plate",
"copper-plate",
"copper-cable",
"iron-stick",
"iron-gear-wheel",
"electronic-circuit",
"wooden-chest",
"iron-chest",
"burner-inserter",
"small-electric-pole",
"stone-brick",
"boiler",
"steam-engine",
"burner-mining-drill",
"electric-mining-drill",
"offshore-pump",
"lab",
"radar",
"stone-furnace",
-- These ten are the problem
"repair-pack",
"blueprint",
"deconstruction-planner",
"upgrade-planner",
"blueprint-book",
"raw-fish",
"automation-science-pack",
"pistol",
"firearm-magazine",
"light-armor"
}
for _, item_name in pairs(item_flags_to_hide) do
if data.raw.item[item_name] then
data.raw.item[item_name].flags = {"hidden"}
end
end