Repair Turret

by Klonan

Adds Repair Turrets

Content
1 year, 3 months ago
0.17 - 1.1
85.0K
Combat Logistic network

g "Item is not tool." error on version 0.4.3 (Factorio version 0.18.22)

4 years ago

The mod Repair Turret (0.4.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Repair_Turret::on_tick (ID 0)
Item is not tool.
stack traceback:
Repair_Turret/script/repair_turret.lua:431: in function 'repair_entity'
Repair_Turret/script/repair_turret.lua:747: in function 'update_turret'
Repair_Turret/script/repair_turret.lua:847: in function 'check_turret_update'
Repair_Turret/script/repair_turret.lua:950: in function 'handler'
core/lualib/event_handler.lua:47: in function <core/lualib/event_handler.lua:45>
stack traceback:
[C]: in function 'drain_durability'
Repair_Turret/script/repair_turret.lua:431: in function 'repair_entity'
Repair_Turret/script/repair_turret.lua:747: in function 'update_turret'
Repair_Turret/script/repair_turret.lua:847: in function 'check_turret_update'
Repair_Turret/script/repair_turret.lua:950: in function 'handler'
core/lualib/event_handler.lua:47: in function <core/lualib/event_handler.lua:45>

Please let me know if you need a save file or other info.

Thanks!

4 years ago

Adding an 'if stack.is_tool' check at line 430 'fixes' this, but doesn't explain why it's trying to drain durability on a non-tool item.

4 years ago
(updated 4 years ago)

Same issue

Also are you using Krastorio 2

4 years ago

Adding an 'if stack.is_tool' check at line 430 'fixes' this, but doesn't explain why it's trying to drain durability on a non-tool item.

You are missing some parts as this didn't work.

4 years ago

Yea, thats weird, same with 'speed'. Its like the item stack was replaced with another item or something.

Can you provide a save game?

4 years ago

Adding an 'if stack.is_tool' check at line 430 'fixes' this, but doesn't explain why it's trying to drain durability on a non-tool item.

You are missing some parts as this didn't work.

You need the "then" after and "end" statements as well, I left those out for brevity.

4 years ago

Yea, thats weird, same with 'speed'. Its like the item stack was replaced with another item or something.

Can you provide a save game?

Sure can, how to I provide that? Is there somewhere to upload it, or just use a public share like Dropbox?

4 years ago

Same issue

Also are you using Krastorio 2

No. I've got mostly just Klonan's mods on this save. Plus Picker mods, Factorissimo, a few non-gamechanging ones like Discoscience, etc. Nothing that touches repair packs as far as I know (unless maybe Picker suite does).

4 years ago

I fixed it

4 years ago

Running 0.4.4 for a while now, does indeed seem fixed. You're awesome.

4 years ago

Adding an 'if stack.is_tool' check at line 430 'fixes' this, but doesn't explain why it's trying to drain durability on a non-tool item.

You are missing some parts as this didn't work.

You need the "then" after and "end" statements as well, I left those out for brevity.

You might want put everything needed (the entire line of code) in case someone else tries to fix it themselves.

New response