mirror of
https://github.com/theFox6/microexpansion.git
synced 2024-11-26 17:13:53 +01:00
Harden the autocrafter.
This commit is contained in:
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]
|
||||||
|
Loading…
Reference in New Issue
Block a user