Page 1 of 1

Equivalent of .selected that includes cliffs?

Posted: Sat Jan 01, 2022 5:00 am
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.

Re: Equivalent of .selected that includes cliffs?

Posted: Sat Jan 01, 2022 2:37 pm
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.