[0.18.17] rendering.get_all_ids() not behaving as expected

Bugs that are actually features.
Post Reply
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 513
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

[0.18.17] rendering.get_all_ids() not behaving as expected

Post by Mylon »

What happened:
rendering.get_all_ids() returns an array of sequential numbers equal to the length of valid ids.

What was expected:
rendering.get_all_ids() returns an array of valid IDs.

Case:
ID's 1-2, 5-8 are valid.
rendering.get_all_ids() returns 3 and 4, but omits 7 and 8. If I don't check is_valid() then this command causes an error trying to reference 3 and 4.

Image
Attachments
bugreport rendering.zip
(2.11 MiB) Downloaded 39 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.18.17] rendering.get_all_ids() not behaving as expected

Post by Rseding91 »

Thanks for the report however you're using the result wrong. It's an array of IDs, you're using the index as the ID when it's just an index.
Capture.PNG
Capture.PNG (306.89 KiB) Viewed 570 times
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”