on_command_finshed event

Post Reply
SixpackButtermilch
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Jun 22, 2016 8:16 am
Contact:

on_command_finshed event

Post by SixpackButtermilch »

The problem is that there is currently (in my opinion) no comfortable way to see whetever an unit has finished its command and how it finished it.
I don't like having to poll LuaEntity::has_command() or LuaUnitGroup::state.
So a on_command_finished event would be great, maybe with parameters of kind

event.player_index
event.entity

if the command was a compound command of type

Code: Select all

defines.compoundcommandtype.logical_and
or

Code: Select all

defines.compoundcommandtype.logical_or 
maybe also give the index into

Code: Select all

define.scommand.compound.commands
at which it stopped: event.stopped_index.

Furthermore I would have a question regarding

Code: Select all

defines.compoundcommandtype.return_last
The docs say:
compoundcommandtype.return_last Perform all the commands and return lasts result
Which kind of result does it return to whom?
nice one :D
How are commands compounded in a compounded compound command commanding compound composts.
Kind regards
SixpackButtermilch

Humpfry
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Jul 20, 2016 12:34 pm
Contact:

Re: on_command_finshed event

Post by Humpfry »

I would be interested in something along these lines, no one seems to be interested in this.

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: on_command_finshed event

Post by Earendel »

+1

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: on_command_finshed event

Post by aubergine18 »

Such an event would facilitate custom waypoints / patrols, eg. for AI automated vehicles.
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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3133
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: on_command_finshed event

Post by Bilka »

I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Implemented mod requests”