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
a month ago
2.0 - 2.1
3.09K
Logistics Logistic network

b crash on replacing rails>powered tracks

a month ago

hello, when trying to replace standard rails with powered tracks from mod https://mods.factorio.com/mod/James-Train-Mod while a fluid wagon is on it causes a crash - see below.

in my case it happens only when it replaces a rail while a fluid wagon is on top of it, in case of Cargo Wagon - no crash, same for locomotive.

What's also interesting is when trying to replace a rail under cargo/locomotive it shows an animation but doesn't replace them yet - it does however consumes it yet the icon for upgrade stays.
In vanilla construction robot's case it tries to replace them, fails and goes back, marking it as done even though nothing got replaced, we are not losing the items tho, basically just silently failing, preferably would be nice if Repair Turret would instead properly replace them or wait :)

video example: https://i.yatsukiko.me/XoCI8/XenazeYa59.mp4

crash report:
The mod Repair Turret 2 (1.3.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Repair_Turret_2::on_tick (ID 0)
Target must have health.
stack traceback:
[C]: in function 'create_entity'
Repair_Turret_2/script/repair_turret.lua:2580: in function 'try_upgrade_entity'
Repair_Turret_2/script/repair_turret.lua:757: in function 'check_target'
Repair_Turret_2/script/repair_turret.lua:1186: in function 'update'
Repair_Turret_2/script/repair_turret.lua:3077: in function 'check_turret_update'
Repair_Turret_2/script/repair_turret.lua:3355: in function 'handler'
core/lualib/event_handler.lua:72: in function <core/lualib/event_handler.lua:70>

a month ago

Hey

The refund-issue should be fixed in the newest version, but it only supports Factorio 2.1 (I thought they would release it earlier and there are many other changes since then to backport to 2.0) - Factorio itself does not allow replacement of items beneath wagons, but it should correctly wait and replace when it leaves

The powered rails mod does not (yet) have a 2.1 release yet so I cannot confirm it 100%

a month ago

i see :) thank you for quick answer

a month ago

no problem, you will see when updating to Factorio 2.1 there is many improvements regarding logic and UPS in repair turrets

a month ago
(updated a month ago)

Darn. I wish I could update to 2.1. I'm stuck on 2.0 with other mods.

New response