Repair Turret 2

by tiko13

A fork of Klonan's Repair Turret mod. It aims for repair turrets to be a complete replacement of construction bots (Logistic over time as well)

Content
3 days ago
2.0
845
Logistics Logistic network

b mod incompatiblity

18 days ago

hi idk who to report this bug so i report here, with Better Quality Roboports by bunshaman the repair turret become a roboport if its a quality turret

17 days ago

Hey, I will try to look at it if I have time, I personally don't use that mod so it wasn't something I thought about

17 days ago

Okay this is much simpler than I anticipated - the better quality roboports mod handles all entities based on original roboport blindly without checking it actually is a roboport. To fix just replace the first function in control.lua of the better quality roboports with this function (it just adds entity name check):

local on_built = function (data)
local entity = data.entity --[[@as LuaEntity]]
if entity.quality.level == 0 then return end
if entity.name ~= "roboport" then return end
local surface = entity.surface
local info = {
name = entity.quality.name.."-roboport",
position = entity.position,
quality = entity.quality,
force = entity.force,
fast_replace = true,
player = entity.last_user,
}
entity.destroy()
surface.create_entity(info)
end

New response