Assorted token golf in rope logic #25

Merged
pyrex merged 7 commits from kistaro/chameleonic:rope_golf into main 2023-01-03 01:06:57 +00:00
Showing only changes of commit 78f0a96529 - Show all commits

View File

@ -1690,19 +1690,13 @@ function rope:_calc_push(
local ops2,blocked={},{}
for o in all(ops) do
local mx,my,dmx,dmy=unpack(o)
if not level:mcoll(mx,my) then
-- great!
else
local crate=level:get_crate(mx,my)
if crate then
local mx,my=unpack(o)
if level:mcoll(mx,my)
if not (level:get_crate(mx, my)) break
if not level:can_move(false,o,0,0) then
add(blocked,o)
break
end
else
break
end
add(ops2,o)
end
end