fix search-and-replace damage from a while back

a batch change from ship to self broke the thing that kept the player on
the screen. also spawn_goodie got missed in the migration to `_ENV` for
looking up stuff by name.
This commit is contained in:
Kistaro Windrider 2023-12-24 21:39:52 -08:00
parent 97ddfb876b
commit 4804402f32
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8
2 changed files with 4 additions and 4 deletions

View File

@ -443,7 +443,7 @@ function ship_m:move()
self.x += self.xmomentum
self.y += self.ymomentum
if self == primary_self then
if self == primary_ship then
self.x = mid(0, 112 - 8 * self.size, self.x)
self.y = mid(0, 128 - 8 * self.size, self.y)
end
@ -1285,7 +1285,7 @@ end
function spawn_goodie(goodie_name, x, y, sz)
if (not goodie_name or #goodie_name == 0) return
local sh = sz and sz/2 or 0
goodies[goodie_name].new{}:spawn_at(x+sh,y+sh)
_ENV[goodie_name].new{}:spawn_at(x+sh,y+sh)
end
function multi(times, interval, fnm, ...)

View File

@ -443,7 +443,7 @@ function ship_m:move()
self.x += self.xmomentum
self.y += self.ymomentum
if self == primary_self then
if self == primary_ship then
self.x = mid(0, 112 - 8 * self.size, self.x)
self.y = mid(0, 128 - 8 * self.size, self.y)
end
@ -1285,7 +1285,7 @@ end
function spawn_goodie(goodie_name, x, y, sz)
if (not goodie_name or #goodie_name == 0) return
local sh = sz and sz/2 or 0
goodies[goodie_name].new{}:spawn_at(x+sh,y+sh)
_ENV[goodie_name].new{}:spawn_at(x+sh,y+sh)
end
function multi(times, interval, fnm, ...)