allow strings when spawning guns

This commit is contained in:
2023-12-20 12:00:34 -08:00
parent f9e28fa0e2
commit e50f516b11

View File

@@ -1943,6 +1943,7 @@ gun_swap = powerup.new{
mknew(gun_swap) mknew(gun_swap)
function spawn_main_gun_at(x, y, gunt) function spawn_main_gun_at(x, y, gunt)
if (type(gunt)=="string") gunt=_ENV[gunt]
local gun_p = gun_swap.new{ local gun_p = gun_swap.new{
gun = gunt.new() gun = gunt.new()
} }
@@ -1956,6 +1957,7 @@ spec_gun_pl = {
} }
function spawn_spec_gun_at(x, y, gunt) function spawn_spec_gun_at(x, y, gunt)
if (type(gunt)=="string") gunt=_ENV[gunt]
local gun_p = gun_swap.new{ local gun_p = gun_swap.new{
gun = gunt.new(), gun = gunt.new(),
hitship = function(self, ship) hitship = function(self, ship)