Lua API Events

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
slaugh7er
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Jul 06, 2016 9:13 am
Contact:

Lua API Events

Post by slaugh7er »

Some extra events in the Lua API to help encourage more scripted mods
EVENTS
on_entity_created: Entity
allow scripts to easily access entities that are created (will be call for any and all compatible entities)

on_entity_removed: Entity
allow scripts to easily access entities that are just about to be removed (will be call for any and all compatible entities)

on_entity_changed_chunk: Entity, ChunkNew, ChunkOld
useful for tracking and entity as it moves through the maps chunks
an example could be biters that will scan a chunk for a nest and if no nest is found then they build one in that chunk

on_player_changed_chunk: Player, ChunkNew, ChunkOld
same as above but filtered to players only
EXTENSIONS
player.cursor.x 'X'
position of players cursor/ mouse
player.cursor.y 'Y'
position of players cursor/ mouse
player.cursor.entity
Entity under the players cursor/ mouse (optional) (almost the same as player.selected)

WHY
the more events available the more powerful the mods can be it also opens up the Lua API to more people
this also adds easily accessible events with a considerable amount of power even if they must be filtered
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Lua API Events

Post by ssilk »

moved to modding interface requests - ssilk
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Post Reply

Return to “Modding interface requests”