more various tweaks to held items and chests in order to make carrying chests fun
This commit is contained in:
@@ -39,24 +39,23 @@ func interact():
|
||||
func vend():
|
||||
var item_vend
|
||||
if is_pickup:
|
||||
item_vend = level_control.item_pickup.instantiate()
|
||||
item_vend = level_control.ITEM_PICKUP.instantiate()
|
||||
var item_stats
|
||||
item_stats = level_control.pickup_spawn(is_random)
|
||||
##SET VARIABLES
|
||||
item_vend.pickup_type = pickup_type
|
||||
if level_control.player.gun != null:
|
||||
if level_control.player.gun.ammo_type != 5:
|
||||
item_vend.ammo_type = level_control.player.gun.ammo_type
|
||||
if level_control.player.gun.weapon_info.bullet.ammo_type != 5:
|
||||
item_vend.ammo_type = level_control.player.gun.weapon_info.bullet.ammo_type
|
||||
else:
|
||||
item_vend.ammo_type = item_stats["ammo_type"]
|
||||
if pickup_type == 0:
|
||||
if level_control.player.gun != null:
|
||||
item_vend.value = level_control.player.gun.max_ammo
|
||||
item_vend.value = level_control.player.gun.weapon_info.max_ammo
|
||||
else:
|
||||
item_vend.value = item_stats["value"]
|
||||
else:
|
||||
item_vend.value = pickup_amount
|
||||
print("ITEM : ",item_vend.pickup_type,item_vend.ammo_type,item_vend.value)
|
||||
else:
|
||||
item_vend = item.instantiate()
|
||||
item_vend.position = vend_ray.global_position
|
||||
|
||||
Reference in New Issue
Block a user