Don't track pit contents
This commit is contained in:
parent
051d682f2e
commit
526f5021d1
@ -329,10 +329,9 @@ function level:draw()
|
|||||||
local pr=self._pits[_mix(px+1,py)]
|
local pr=self._pits[_mix(px+1,py)]
|
||||||
|
|
||||||
spr(pit.s,px,py)
|
spr(pit.s,px,py)
|
||||||
if pit.contents then
|
if pit.full then
|
||||||
pal(pitpal)
|
pal(pitpal)
|
||||||
palt(0,false)
|
palt(0,false)
|
||||||
--spr(pit.contents,pit.px,pit.py)
|
|
||||||
spr(79,pit.px,pit.py)
|
spr(79,pit.px,pit.py)
|
||||||
pal()
|
pal()
|
||||||
pal(normpal)
|
pal(normpal)
|
||||||
@ -363,10 +362,10 @@ function level:update()
|
|||||||
|
|
||||||
if #crate.todo==0 then
|
if #crate.todo==0 then
|
||||||
local pit=self._pits[_mix(crate.mx,crate.my)]
|
local pit=self._pits[_mix(crate.mx,crate.my)]
|
||||||
if pit and not pit.contents then
|
if pit and not pit.full then
|
||||||
add(remove,cix)
|
add(remove,cix)
|
||||||
crate.dead=true
|
crate.dead=true
|
||||||
pit.contents=crate.s
|
pit.full=true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -499,7 +498,7 @@ end
|
|||||||
|
|
||||||
function level:get_open_pit(mx,my)
|
function level:get_open_pit(mx,my)
|
||||||
local pit=self._pits[_mix(mx,my)]
|
local pit=self._pits[_mix(mx,my)]
|
||||||
if (pit and not pit.contents) return pit
|
if (pit and not pit.full) return pit
|
||||||
end
|
end
|
||||||
|
|
||||||
function level:spawn_exit()
|
function level:spawn_exit()
|
||||||
|
Loading…
Reference in New Issue
Block a user