added realtime day night cycle based on system time
This commit is contained in:
@@ -647,28 +647,8 @@ func holster_gun(holster):
|
||||
if holstered_gun_id != null:
|
||||
weapon_select(holstered_gun_id)
|
||||
|
||||
func add_ammo(new_gun,gun_name,ammo_type,max_ammo,start_mags):
|
||||
if new_gun:
|
||||
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:
|
||||
pass
|
||||
#otherwise calculate starting ammo
|
||||
else:
|
||||
GameGlobals.ammo_reserve[str(ammo_type)] = start_mags * max_ammo
|
||||
|
||||
print("GUN AMMO ",GameGlobals.gun_ammo)
|
||||
print("RESERVE AMMO ", GameGlobals.ammo_reserve)
|
||||
|
||||
## MISC
|
||||
|
||||
|
||||
func _on_pick_up_detection_body_entered(body):
|
||||
|
||||
if body.is_in_group("item_pickup"):
|
||||
|
||||
Reference in New Issue
Block a user