I'd like to add "not-flammable" to some entity.
So I don't know what the current flags might be, and need to just add the additional flag, to the existing flags.
If I do the below I'll remove the existing flags.
Code: Select all
local types = {"something"}
local name = {"something"}
for _, entity in pairs(types) do
for _, x in pairs(data.raw[entity]) do
if entity == name then
x.flags = {"not-flammable"}
end
end
end