Harden the autocrafter.

This commit is contained in:
Mike Stump 2024-01-14 11:23:25 -08:00
parent 1da9a57585
commit abaaa69f5f

@ -485,7 +485,8 @@ function me.later(net, cpos, action, time)
-- bubble sort the entry back to the right spot -- bubble sort the entry back to the right spot
while i > 1 do while i > 1 do
-- me.log("TIME ds: "..i.." "..net.pending.time[i].." "..net.pending.time[i-1], "error") -- me.log("TIME ds: "..i.." "..net.pending.time[i].." "..net.pending.time[i-1], "error")
if net.pending.time[i] < net.pending.time[i-1] then if tonumber(net.pending.time[i]) and tonumber(net.pending.time[i-1])
and net.pending.time[i] < net.pending.time[i-1] then
-- if out of order, swap. This works as previously the list was sorted -- if out of order, swap. This works as previously the list was sorted
local t = net.pending.time[i-1] local t = net.pending.time[i-1]
net.pending.time[i-1] = net.pending.time[i] net.pending.time[i-1] = net.pending.time[i]