built single-resource based script for weapons, most are broken right now

This commit is contained in:
derek
2025-03-03 15:33:59 -06:00
parent 3e6ad2a56d
commit 15f32eff61
16 changed files with 1566 additions and 191 deletions

View File

@@ -23,8 +23,8 @@ func picked_up():
gun_already_held = true
if !gun_already_held:
var gun_info = gun_resource.instantiate()
level_control.player.add_ammo(true,gun_info.gun_name,gun_info.ammo_type,gun_info.max_ammo,gun_info.start_mags)
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)
GameGlobals.held_guns.append(gun_resource)
var instance_gun = gun_resource.instantiate()
var weapon_id = GameGlobals.held_guns.size() - 1