starting to fix guns under new script workflow

This commit is contained in:
derek
2025-03-03 16:58:10 -06:00
parent 15f32eff61
commit 6283c6f22f
19 changed files with 309 additions and 214 deletions

View File

@@ -24,7 +24,8 @@ func picked_up():
if !gun_already_held:
var spawn_gun = gun_resource.instantiate()
level_control.player.add_ammo(true,spawn_gun.weapon_info.gun_name,spawn_gun.weapon_info.bullet_info.ammo_type,spawn_gun.weapon_info.max_ammo,spawn_gun.weapon_info.start_mags)
if spawn_gun.weapon_info.weapon_type == 0:
level_control.player.add_ammo(true,spawn_gun.weapon_info.gun_name,spawn_gun.weapon_info.bullet.ammo_type,spawn_gun.weapon_info.max_ammo,spawn_gun.weapon_info.start_mags)
GameGlobals.held_guns.append(gun_resource)
var instance_gun = gun_resource.instantiate()
var weapon_id = GameGlobals.held_guns.size() - 1