[Rseding91] [1.1.110] "find_tiles_filtered" doesn't correctly take orientation using rotated areas in filtered searches

This subforum contains all the issues which we already resolved.
AckEmma
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Feb 09, 2024 6:15 am
Contact:

[Rseding91] [1.1.110] "find_tiles_filtered" doesn't correctly take orientation using rotated areas in filtered searches

Post by AckEmma »

I've been developing a mod that places tiles under entities and knew I'd have some trouble with curved rails.
I've seen others make bitmasks for rails specifically but I wanted to be able to have it work for any entity (including ones with secondary bounding boxes with orientation).

I've found that `find_tiles_filtered` doesn't correctly take the orientation still even though `find_entities_filtered` does.

- Version and before image (version 1.1.101)
before-version.png
before-version.png (729.37 KiB) Viewed 877 times
- After `find_entities_filtered`

Code: Select all

/c for _,e in pairs(game.surfaces[1].find_entities_filtered{area={left_top={0.1,-9.9},right_bottom={9.9,19.9},orientation=0.1}}) do e.destroy() end
entities_filter.png
entities_filter.png (709.82 KiB) Viewed 877 times
-After `find_tiles_filtered`

Code: Select all

/c for _,e in pairs(game.surfaces[1].find_tiles_filtered{area={left_top={0.1,-9.9},right_bottom={9.9,19.9},orientation=0.1}}) do game.surfaces[1].create_entity{ name = "tile-ghost", position = e.position, inner_name = "concrete", force = game.player.force, expires = false } end
tiles_filter.png
tiles_filter.png (827.93 KiB) Viewed 877 times

I've gotten around this by programming my own version of `find_tiles_filtered` that makes special calls to the builtin after apply the orientation to the bounding box using a rotation matrix but anticipate that it would be much slower than any builtin method.

When BoundingBox Orientation support was added in 1.1.82 was it only for `find_entities_filtered` or meant to be for all functions that used BoundingBox in that way?
106122

AckEmma
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Feb 09, 2024 6:15 am
Contact:

Re: Using rotated areas in filtered searches

Post by AckEmma »

10-30-2024, 20-46-00.png
10-30-2024, 20-46-00.png (1.71 MiB) Viewed 563 times
This issue still exists in Factorio version 2.0.11.


Is it possible to move this thread to Bug Reports?
Last edited by AckEmma on Mon Nov 04, 2024 8:51 pm, edited 1 time in total.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Using rotated areas in filtered searches

Post by ssilk »

Moved to Bug reports due to user request.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

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

Re: [Rseding91] [1.1.110] "find_tiles_filtered" doesn't correctly take orientation using rotated areas in filtered searc

Post by Rseding91 »

Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.

AckEmma
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Feb 09, 2024 6:15 am
Contact:

Re: [Rseding91] [1.1.110] "find_tiles_filtered" doesn't correctly take orientation using rotated areas in filtered searc

Post by AckEmma »

Sweet :)
Thanks, appreciate it and the entire wube team!

Post Reply

Return to “Resolved Problems and Bugs”