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)]
|
||||
|
||||
spr(pit.s,px,py)
|
||||
if pit.contents then
|
||||
if pit.full then
|
||||
pal(pitpal)
|
||||
palt(0,false)
|
||||
--spr(pit.contents,pit.px,pit.py)
|
||||
spr(79,pit.px,pit.py)
|
||||
pal()
|
||||
pal(normpal)
|
||||
@ -363,10 +362,10 @@ function level:update()
|
||||
|
||||
if #crate.todo==0 then
|
||||
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)
|
||||
crate.dead=true
|
||||
pit.contents=crate.s
|
||||
pit.full=true
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -499,7 +498,7 @@ end
|
||||
|
||||
function level:get_open_pit(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
|
||||
|
||||
function level:spawn_exit()
|
||||
|
Loading…
Reference in New Issue
Block a user