Inventory Repair


Repairs damaged items in your inventory automatically over time with repair packs.

Utilities
a month ago
0.17 - 2.0
80.2K

b Crash

2 months ago

When mining a damaged turret, I got the following error:
The mod Even Distribution (2.0.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event even-distribution::inventory-cleanup (ID 214)
even-distribution/scripts/helpers/LuaPlayer.lua:51: attempt to compare nil with number
stack traceback:
even-distribution/scripts/helpers/LuaPlayer.lua:51: in function 'trashItems'
even-distribution/scripts/cleanup.lua:14: in function 'func'
even-distribution/framework.lua:49: in function <even-distribution/framework.lua:48>

2 months ago
(updated 2 months ago)

also got a crash. I think I had a damaged item in my inventory and this crash happened the moment a repair pack finished crafting.
this is the error message I got

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

Error while running event inventory-repair::on_nth_tick(1)
LuaEntityPrototype doesn't contain key max_health.
stack traceback:
[C]: in function 'index'
__inventory-repair
/control.lua:41: in function 'repair_item'
inventory-repair/control.lua:97: in function 'check_inventory_for_repairs'
inventory-repair/control.lua:138: in function <inventory-repair/control.lua:129>

2 months ago
(updated 2 months ago)

crash might have also happened because I placed an item that was being repaired.

2 months ago

the problem seems to be that the modding API has changed. max_health is now get_max_health(quality)

2 months ago

or you can just do max_health on the entity itself (which takes into account current quality)

2 months ago

local maxHealth = place_result.get_max_health() worked for me so far.
Though I haven't played with quality yet

2 months ago

Wube sneaking in some breaking API changes at the very last minute before launch :(

@sh4dow the error message looks like it's caused by Even Distribution. If it is a mod conflict, I wasn't able to recreate it on my own.

a month ago

Sorry, the crash log was another unrelated problem in Even Distribution (that's been fixed since). I probably forgot to actually copy the Inventory Repair crash to clipboard...

New response