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
Hope this can help, far as i know change the name for the different type spider's used in your mod. This is not my work so pleas don't give me any thing of the credit. Thanks if u make it happen. Also it's used in the same mod as the code tells. If that modder uses the code tho
https://discordapp.com/channels/@me/736420985934315591/745467907177447465 here if the code will be better from the source.