built single-resource based script for weapons, most are broken right now
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user