Access direction of the cursor stack
Access direction of the cursor stack
Is there a way to get the current direction of the `cursor_stack`? I want get hold of the direction of the item the player holds in hand. The player has a method to turn the item, but it looks like the direction is not accessible via API? Am I wrong? TIA!
Re: Access direction of the cursor stack
Nope. Cursor stack doesn't have "direction" property in it, it hasn't any connection to the transparent green\red ghost that indicates the possibility of placement. The direction of entity you're building is connected to hardcoded mechanics of the item placement.
You can detect only the orientation of entity when it is built and the on_built_entity event is raised.
You can detect only the orientation of entity when it is built and the on_built_entity event is raised.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Access direction of the cursor stack
You can also, from vague memory, programatically change rotation of an entity when placed - see the Concrete Lamppost mod for example. (I could be completely wrong about this, just remember seeing something about rotation in that mod but haven't fully investigated what it does yet, or why).
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: Access direction of the cursor stack
Is this information available in v15?
Re: Access direction of the cursor stack
Factorio Mod Portal Notifier - https://fac-notify.ml/
Cut and paste tools - https://mods.factorio.com/mods/mickael9/cut-and-paste
Portable Chests - https://mods.factorio.com/mods/mickael9/portable-chests
Cut and paste tools - https://mods.factorio.com/mods/mickael9/cut-and-paste
Portable Chests - https://mods.factorio.com/mods/mickael9/portable-chests