From 4804402f32d61ec3306ec69b45d1a3aec74c3664 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 24 Dec 2023 21:39:52 -0800 Subject: [PATCH] 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. --- updatedshmup.p8 | 4 ++-- vacuum_gambit.p8 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/updatedshmup.p8 b/updatedshmup.p8 index 7ac3434..ad93451 100644 --- a/updatedshmup.p8 +++ b/updatedshmup.p8 @@ -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, ...) diff --git a/vacuum_gambit.p8 b/vacuum_gambit.p8 index c207fa3..6d75805 100644 --- a/vacuum_gambit.p8 +++ b/vacuum_gambit.p8 @@ -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, ...)