Miniaturization

by Neel

Adds an inserter that compacts multiple items into one

Content
7 years ago
0.14.0
4
Logistics

b game crash

7 years ago

The game crashed when I deconstructed a chest, It was weird because I wasn't even using any of the mod features.
Try this saved game and deconstruct the chest: https://dl.dropboxusercontent.com/u/2504617/miniaturizationbugfound.zip

7 years ago

Hey, thanks for the bug report. I downloaded the save and picked it up, it was fine for me. I made some updates earlier to the pickup event. Can you remove and re-download the mod and see if it still happens?

7 years ago
(updated 7 years ago)

I tried to make it happen again, using only base 0.14.5 and miniaturization 1.0.1 and got the same error.

Error while running event on_robot_pre_mined (ID 15)
Miniaturization/control.lua:47: bad argument #2 to '__index' (string expected, got nil)

saved game updated: https://dl.dropboxusercontent.com/u/2504617/miniaturizationbugfound.zip

Seems that the event "on_robot_pre_mined" doesn't have the field "player_index"

7 years ago

You are right, that was a bug. I picked up the chest by hand rather than robot so it did not happen for me. I have updated with a fix. But as a side effect, a minor inconvenience has been introduced. If a robot picks up my minifying inserter, one or two items in the internal cache of it may disappear from the game. This is a much more minor issue than game crash.

7 years ago

Maybe drop the item to the floor instead of deleting it from the game? The item could be valuable and you can't see it while its on the internal cache of the inserter.

7 years ago

I hope you don't mind, as an exercise for learning Lua and how the Factorio modding works, I tried to fix the problems that I found in control.lua:

  • line 18: changed research-2 to research-3 - probably a copy-paste error

  • function PickUpItem: added a case test player full inventory and robot deconstruction

  • function RunStep: simplified the test for the research level, you just need: current_data.level < global["Miniaturization_tech_level"]

updated control.lua: https://dl.dropboxusercontent.com/u/2504617/control.lua

7 years ago

Great job! I just released version 1.0.2 which includes your changes.

New response