Hi,
thank you for this great mod, I totally love these turbines! They look really amazing and they're a great addition to the other power solutions.
I have just one problem - I'm building the turbines next to my rail network and I've made all my other rail structures indestructible so biters don't touch them. So I'm trying to make these turbines indestructible as well. But I fail to do so.
I'm using the following script in control.lua:
script.on_event(defines.events.on_built_entity, function(event)
if event.created_entity.name == "ENTITY-NAME" then
event.created_entity.destructible = false
end
end)
It works for all other entities I've needed but I guess I'm using an incorrent entity-name for the turbines. I've tried all the following:
ownly_wind_turbine_mk1
ownly_wind_turbine_mk2
ownly_wind_turbine_mk3
ownly_wind_turbine_mk
ownly_wind_turbine_mk"..level.."_"
ownly_wind_turbine_build_mk1
ownly_wind_turbine_build_mk2
ownly_wind_turbine_build_mk3
ownly_wind_turbine_collision_box_mk1
ownly_wind_turbine_collision_box_mk2
ownly_wind_turbine_collision_box_mk3
I went through all the codes and I couldn't find anything that works.
If you could help me out I would really appreciate it.
Thank you!