Sorry if I'm reporting this in the wrong place. Also I only know Lua, almost nothing about Factorio modding.
This probably meant to do "res_conf.type" instead of "type". The latter is a function reference, and will always compare unequal to those strings.
But my resources are still getting their richness modded somehow. And fixing this might end up applying the richness modifier twice. I don't understand that part of things.
Wrong code applies richness modifier
Re: Wrong code applies richness modifier
Tbh I find lua to be strange... might be that I'm to used to strongly typed languages.
It should be res_conf for sure. Thanks for the find.
This means that it doesn't apply richness from map settings. And it can be hard to test since patch amounts are pretty random. I'll fix it and release new version soon. Some people might suddenly find out that new patches after the fix have more or less ore if they used richness setting.
It was actually worse then this - those values were calculated here but not used later on.. opsie.
All fixed up in new version.
It should be res_conf for sure. Thanks for the find.
This means that it doesn't apply richness from map settings. And it can be hard to test since patch amounts are pretty random. I'll fix it and release new version soon. Some people might suddenly find out that new patches after the fix have more or less ore if they used richness setting.
It was actually worse then this - those values were calculated here but not used later on.. opsie.
All fixed up in new version.
Re: Wrong code applies richness modifier
After the update the setting "oil in starting area" seems to be borked. It gets always placed, no matter if the setting is ticked or not.
Re: Wrong code applies richness modifier
Previous fix was non-trivial and it seems I missed small hack thats used for this setting.
Fixed in new version.
Fixed in new version.
Re: Wrong code applies richness modifier
Nice, thanks for the quick fix.