From 49284d44a8426b022b85fd850846218faa16b77b Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Mon, 2 Jan 2023 16:25:18 -0800 Subject: [PATCH] Fix syntax errors. --- chameleonic.p8 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chameleonic.p8 b/chameleonic.p8 index 7f64592..084084c 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -659,12 +659,13 @@ end -- must be a free function -- to use as a foreach target function level_tug_crate(t) + local self=level local mx0,my0,dmx,dmy=unpack(t) local mxy0=_mix{mx0,my0} local existing=self._crates[mxy0] if (not existing) return - level._crates[mxy0]=nil + self._crates[mxy0]=nil local mx1,my1=mx0+dmx,my0+dmy local px1,py1=mx1*8,my1*8 existing.todo={ @@ -675,7 +676,7 @@ function level_tug_crate(t) {px=px1,py=py1} } - level._crates[_mix{mx1,my1}]=existing + self._crates[_mix{mx1,my1}]=existing end -->8 @@ -1669,7 +1670,7 @@ function rope:_calc_push( local dmy=1 -- maybe push down? if anch.ady==-1 and a0.y>an.y+6 then -- push up - ay0,dmy=ay0-1,dmy=-1 + ay0,dmy=ay0-1,-1 elseif anch.ady!=1 or a0.y>=an.y-6 then return {} end