local unit_to_add_resist = {"tarantulator"}
local ent = data.raw['spider-vehicle']
if mods["bobenemies"] then
for _,unit in pairs(unit_to_add_resist) do
if ent[unit] then --check that the entity exists
if not ent[unit].resistances then ent[unit].resistances = {} end
ent[unit].resistances[#ent[unit].resistances+1]={type = "plasma", decrease = 6, percent = 50}
ent[unit].resistances[#ent[unit].resistances+1]={type = "bob-pierce", decrease = 6, percent = 50}
end
end
end
This should add the resistances, just need to add the unit name to the table at the top, and the ##'s for the resistance types. Hope this can help