it would be cool if you could add vtk support to all cars, tanks and locomotives..
or you could change line 81+ to ...
local function has_vtk_category(entity)
if not entity.grid then return false end
for id,name in pairs(entity.grid.prototype.equipment_categories) do
if name == "vtk-armor-plating" then
return true
end
end
return false
end
local function set_entity_to_armor(entity)
entity_to_armor = nil
if entity ~= nil and has_vtk_category(entity) then
debug("entity to armor set to "..entity.name)
entity_to_armor = entity
end
end
...to allow modders to add support for your mod on their own