How would i add a resistance to very entity in the game?
How do I finish the code below?
Code: Select all
local function add_immunity(entities)
if not entities.resistances then entities.resistances = {} end
table.insert(entities.resistances, {type = "fire", percent = 25})
end
for _,entities in pairs(data.raw[?]) do
add_immunity(entities)
end
end
Thanks