Currently, the selection priority of an entity is set in the prototype and cannot be changed at runtime. However, with the creation of elevated rails and the inability to interact directly with things underneath said elevated rails, there is now a base-game need for the ability to either ignore specific entity types when selecting entities or adjust selection priorities at runtime.
This would also enable mods with similar layered construction more easily.
I propose handling this through simply making the selection_priority modifiable at runtime. (or possibly giving players a list of ignored entity prototypes for selection?) This would allow for flexible custom solutions to these problems, among other ideas I'm sure mod developers would come up with.
Make LuaEntity::selection_priority modifiable at runtime
-
- Fast Inserter
- Posts: 204
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: Make LuaEntity::selection_priority modifiable at runtime
Perhaps having a per-player property, modifiable by mods, to ignore selection boxes of a specified priority range, or of specific flags? That way you could just ignore the elevated rails, or just ignore belts, etc
If you need to reach me, message me on discord.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Re: Make LuaEntity::selection_priority modifiable at runtime
Yes, putting this into entity seems like a wrong approach to the problem.