added main menu and can continue from last level
This commit is contained in:
@@ -667,14 +667,16 @@ func holster_gun(holster):
|
||||
|
||||
func add_ammo(new_gun,gun_name,ammo_type,max_ammo,start_mags):
|
||||
if new_gun:
|
||||
GameGlobals.gun_ammo[gun_name] = max_ammo
|
||||
|
||||
if ammo_type != 5: #if ammo is not melee
|
||||
GameGlobals.gun_ammo[gun_name] = max_ammo
|
||||
else:
|
||||
GameGlobals.gun_ammo[gun_name] = null
|
||||
if GameGlobals.ammo_reserve.has(str(ammo_type)):
|
||||
GameGlobals.ammo_reserve[str(ammo_type)] += start_mags * max_ammo
|
||||
else:
|
||||
#if melee weapon don't do max ammo calc
|
||||
if ammo_type == 5:
|
||||
GameGlobals.ammo_reserve[str(ammo_type)] = 0
|
||||
pass
|
||||
#otherwise calculate starting ammo
|
||||
else:
|
||||
GameGlobals.ammo_reserve[str(ammo_type)] = start_mags * max_ammo
|
||||
|
||||
Reference in New Issue
Block a user