Closed eronoobos closed 7 years ago
Note: some taskqueue functions already do take a taskqueuebehaviour as an argument, but it's really inconsistent.
can you link me 2 example? one for functions that take a taskqueuebehaviour as an argument one for function that don't do this sorry but i understand better with concrete example at moment
the taskqueuebehaviour gets passed by this line https://github.com/eronoobos/BABAR-The-Shardifant/blob/5f0c408a13f11d18e401d8851569af273dc92c47/taskqueuebehaviour.lua#L706-L709 if the function takes the argument
function that takes taskqueuebehaviour as an argument: https://github.com/eronoobos/BABAR-The-Shardifant/blob/5f0c408a13f11d18e401d8851569af273dc92c47/taskqueues.lua#L327
the argument shouldn't be named self
, because that makes it seem as if we're still inside a TaskqueueBehaviour:Function()
function that takes no argument https://github.com/eronoobos/BABAR-The-Shardifant/blob/5f0c408a13f11d18e401d8851569af273dc92c47/taskBot.lua#L14
i'm about to address this in a lazy way, commit forthcoming
BTW I think using ai
. is fine. We discovered that the global ai
was not the problem with multiple Lua AI teams.
for now is ok so i suggest to close atm
Every taskqueue function needs to take a taskqueuebehaviour as an argument, and pass that behaviour all the way down its chain of functions, so that any time
ai
is used, it can instead use thebehaviour.ai
. It's a pain, and I've been trying to think of another, less ugly and less tedious way to do it. Hence https://github.com/eronoobos/BABAR-The-Shardifant/issues/20 .Note: some taskqueue functions already do take a taskqueuebehaviour as an argument, but it's really inconsistent.