Mining Overlay

by Samvova

Creates an overlay for resources and mining drills to help with placement.

Utilities
a month ago
2.1
91
Logistics Environment Mining

b Error during use with 2.1.20

a month ago

Hi, I got this error seemingly randomly while placing miners (factorio 2.1.20):

The mod Mining Overlay (0.2.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event mining-overlay::on_built_entity (ID 6)
LuaRenderObject API call when LuaRenderObject was invalid.
stack traceback:
[C]: in function 'index'
__mining-overlay
/script/tools.lua:412: in function 'get_rendering_area'
mining-overlay/script/overlay_control.lua:346: in function 'on_built_drill'
mining-overlay/script/overlay_control.lua:572: in function <mining-overlay/script/overlay_control.lua:570>

a month ago

Hi, thanks for the report.

Seems like there was a problem when trying to place or destroy a mining drill after the timer for overlays run out, should be fixed now in version 0.2.1.

a month ago

Thanks, the fix seems to work, I found another crash unfortunately ;-)

The mod Mining Overlay (0.2.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event mining-overlay::on_player_cursor_stack_changed (ID 37)
mining-overlay/script/overlays.lua:229: attempt to index field 'drills' (a nil value)
stack traceback:
mining-overlay/script/overlays.lua:229: in function 'draw_ghost_drill_overlays'
mining-overlay/script/overlays.lua:267: in function 'redraw_all_overlays'
mining-overlay/script/overlay_control.lua:92: in function 'on_player_cursor_stack_changed'
mining-overlay/script/overlay_control.lua:574: in function <mining-overlay/script/overlay_control.lua:573>

a month ago

and another one, but I'm not sure it is because I added nil handling for the other error...

The mod Mining Overlay (0.2.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event mining-overlay::on_built_entity (ID 6)
mining-overlay/script/overlay_control.lua:497: attempt to index field '?' (a nil value)
stack traceback:
mining-overlay/script/overlay_control.lua:497: in function 'on_built_ghost_drill'
mining-overlay/script/overlay_control.lua:591: in function <mining-overlay/script/overlay_control.lua:586>

a month ago

Thanks again :)

There was still a problem with draw_ghost_drill_overlays, is now fixed in 0.2.2.

As for the other one, seems to be because of the nil handling you've added. I still included an additional time for rendering's own time_to_live so that other functions can dispose of them properly. Should fix the issue now.

New response