Resource Labels Updated

by sproott

Adds icons to resources on the map, optionally with a label and the resource count.

Tweaks
1 year, 9 months ago
0.18 - 1.1
4.69K

b angels infinite ores

4 years ago

starting a new world or loading existing produces error, even if unselecting infinite ores in world generation

ResourceLabelsUpdated/control.lua:7: ResourceLabelsUpdated/config.lua:25: attempt to index local 'base' (a nil value)
stack traceback:
ResourceLabelsUpdated/config.lua:25: in function 'addInfiniteItem'
ResourceLabelsUpdated/config.lua:312: in main chunk
[C]: in function 'require'
ResourceLabelsUpdated/control.lua:7: in main chunk
stack traceback:
[C]: in function 'require'
ResourceLabelsUpdated/control.lua:7: in main chunk

4 years ago

Alright, should be fixed, do an update and try it again.

4 years ago

better now i guess? at least the error is different

ResourceLabelsUpdated/control.lua:7: ResourceLabelsUpdated/config.lua:30: table index is nil
stack traceback:
ResourceLabelsUpdated/config.lua:30: in function 'addInfiniteItem'
ResourceLabelsUpdated/config.lua:309: in main chunk
[C]: in function 'require'
ResourceLabelsUpdated/control.lua:7: in main chunk
stack traceback:
[C]: in function 'require'
ResourceLabelsUpdated/control.lua:7: in main chunk

4 years ago

I forgot to wrap the line in the if statement. Alright, try it now?

4 years ago

Yeah, this works. But when enabling resource amount, it doesn't show % rate in the label. This affects oil as well as infinite ores.

4 years ago

What does it show? Nothing?

4 years ago

It shows the label with its icon, and if resource name is enabled, it shows the name like "oil" or "infinite stone". But even enabling resource amount it shows nothing where xxx% would be, while finite resources show their amount properly.

4 years ago

Ok, I'll look into that.

3 years ago

Infinite ores are now supported, couldn't get fluids to work properly though - stdlib cannot find the whole patch and the total counts are not correct, probably a Factorio API limitation. So only non-fluid ores for now.

New response