make cc update field when block placement is wrong

This commit is contained in:
Gompyn
2020-07-29 15:01:38 +08:00
parent 17d670a1ba
commit 71130bbced
2 changed files with 22 additions and 1 deletions

View File

@@ -275,11 +275,17 @@ return{
return 2
end,--start thinking
function(P,ctrl)
local success,hold,move=BOT.getMove(P.AI_bot)
local success,dest,hold,move=BOT.getMove(P.AI_bot)
if success == 2 then
ins(ctrl,6)
return 3
elseif success == 0 then
for i=1,#dest do
for j=1,#dest[i] do
dest[i][j] = dest[i][j] + 1
end
end
P.AI_dest = dest
if hold then ctrl[1]=8 end--Hold
while move[1]do
local m=rem(move,1)