Page 1 of 1

[0.12.26] LuaUnitGroup::state returns undocumented value

Posted: Thu Mar 17, 2016 5:15 pm
by prg
LuaUnitGroup::state is supposed to return a member of defines.groupstate, which contains gathering = 0, moving = 1, attacking = 2. But I've seen this being 4 on occasion which seems to mean something like "can't reach position".

(Also Concepts.html#Command talks about defines.command.goto, this should be go_to_location)

Re: [0.12.26] LuaUnitGroup::state returns undocumented value

Posted: Thu Mar 17, 2016 5:32 pm
by kovarex
Thanks for the report, I updated the values for 0.12.27 to this:

Code: Select all

groupstate =
{
  gathering = 0,
  moving = 1,
  attacking_distraction = 2,
  attacking_target = 3,
  finished = 4
}
Edit: It shows go_to_location http://lua-api.factorio.com/0.12.26/def ... #inventory

Re: [0.12.26] LuaUnitGroup::state returns undocumented value

Posted: Thu Mar 17, 2016 5:37 pm
by prg
http://lua-api.factorio.com/0.12.26/Con ... ml#Command -> defines.command.goto

There it is.

Re: [0.12.26] LuaUnitGroup::state returns undocumented value

Posted: Thu Mar 17, 2016 5:55 pm
by Oxyd
prg wrote:http://lua-api.factorio.com/0.12.26/Con ... ml#Command -> defines.command.goto

There it is.
I see. That will be fixed in 0.12.27 as well.