Basically I want:
Code: Select all
AllowCommand (...)
if (this order is given by player) then
...
else
...
end
But when I do this:
Code: Select all
function gadget:AllowCommand(unitID, unitDefID, teamID, cmdID, cmdParams, cmdOptions,cmdTag, synced)
for k,v in pairs (cmdOptions) do
Spring.Echo (k, v)
end
There is no key named "internal" in the cmdOptions table?alt, false
ctrl, false
coded, 16
right, true
meta, false
shift, false
This gadget:
http://zero-k.googlecode.com/svn/trunk/ ... cal_ai.lua uses the "internal" to do the same check.
It reads the command and its options from Spring.GetCommandQueue, but shouldn't the parameters in AllowCommand contain the same data?