Deep core mining

by VortiK

A not cheaty infinite ore mod. Adds ore patches that appear when ore fields are depleted that can be mined with a pair of advanced mining drill to upgrade mining outposts and provide source of expensive but steady infinite ore. Adds an high tech infinite ore mining from rare deep core cracks spawned in the world that require heavy refining. Now with automatic mod support !

Content
6 months ago
0.15 - 1.1
36.1K
Mining

b Crash on deep ore spawn

6 years ago

Hello,

Tonight I randomly started getting the following error.

"Notice
Error while running event vtk-deep-core-mining::on_resourceDepleted (ID 25) vtk-deep-core-mining/control.lua:47:bad argument #2 to 'random' (interval is empty)"

After looking at line 46/47 (see below), I was able to track down what I believe the problem is.

Somehow my settings had a max of 10,000 but a min of 10,001. I'm wondering if there is an exception when the min>max. Once I set it to min:10,000 max 11,000 (like a normal person, lol), the issue seems to have been resolved and I have not yet experienced the same error/crash.

Hope this helps.

control.lua:46-47
"
if number == 1 and entitiesCount == 0 then
oreamount = math.random(minrichness, maxrichness)
"

6 years ago

Hello,

Nice catch, indeed having a bigger min than max will be a problem. I'll try to improve error handeling on this for next version, thanks for the report!

New response