dangOreus

by Mylon

The flOre is lava. Dig yOre way out through this divOrese and dangOreus field! Will you Coke on the limited space and submit to the cOreruption Ore will you transfOrem it into an majestic Orechestra? Also known as "Dangerous" or "Danger Ores".

Scenarios
6 days ago
0.15 - 2.0
10.2K
Environment Mining

b Arithmetic on nil loading mod

5 years ago

This is a followup to my previous post on the thread by tjmiller1988, though in this case I have more accurate and more detailed information. This affects dangOreus 1.5.5.

If dangOreus is used in conjunction with Angel's mods and the Bio Industries mod, a nil check error is exposed. The error message is, "Failed to load mods: dangoreus/data-updates.lua:4: attempt to perform arithmetic on field 'coverage' (a nil value).

The specific reason this occurs is that when Bio Industries detects Angel's mods are installed, it overrides the resource "lithia-water" with its own version. That version, just like the original version from Bob's Mods, does not define field 'coverage'. Unlike the original version, however, the Bio Industries version has category "basic-fluid" rather than category "water". Your mod uses category "basic-fluid" to check for oil rather than using the appropriate resource name, then does no nil checking before using the fields 'coverage' and 'peaks', resulting in this error when it finds "lithia-water" and acts on it as if it was oil from the vanilla game.

This circumstance is a pretty specific conflict between multiple mods, but it also looks like a pretty easy issue to fix in a way that makes the mod more robust against possible future problems.

New response