Equivalent of .selected that includes cliffs?

Place to get help with not working mods / modding interface.
Post Reply
sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Equivalent of .selected that includes cliffs?

Post by sparr »

I am trying to debug a mod that creates new cliffs based on existing cliffs. It is maddeningly difficult to identify a single cliff entity that I'm looking at. If game.player.selected recognized cliffs it would be trivial. Is there a way I can emulate this, perhaps by finding entities whose bounding box intersects the location of the cursor? Right now I'm thinking I'll need to place some marker entities to triangulate a position, then reference that position with an entity search, which seems very convoluted.

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Equivalent of .selected that includes cliffs?

Post by sparr »

Thanks to @Honktown#2912 on Discord for suggesting a temporary workaround to change

Code: Select all

selectable_in_game = false,
to

Code: Select all

selectable_in_game = true,
in the cliff prototype definition (__base__/prototypes/entity/entities.lua), or by writing a small mod to do the same, so that LuaControl.selected will interact as desired with the now-selectable cliffs.

Post Reply

Return to “Modding help”