fixed hud, moved weapon and ammo penalties to gamemode

This commit is contained in:
derek
2025-03-18 10:16:09 -05:00
parent d17bc56ca2
commit 891ae8a7f2
10 changed files with 79 additions and 42 deletions

View File

@@ -36,3 +36,22 @@ class_name gamemode
@export var stamina_drop_enabled = true
@export var health_drop_enabled = true
@export var money_drop_enabled = true
func apply_weapon_penalty():
for i in GameGlobals.ammo_reserve:
GameGlobals.ammo_reserve[i] *= ammo_drop_percentage
match weapon_penalty:
0: #Drop All
GameGlobals.held_guns = []
1: #Drop Percentage
var weapons_lost = GameGlobals.held_guns.size() * weapon_drop_percentage
for weapon in weapons_lost:
GameGlobals.held_guns.erase(GameGlobals.held_guns.pick_random())
2: #Do Nothing
pass
func apply_money_penalty():
#Do money penalty
GameGlobals.money *= money_lost_multiplier
GameGlobals.deposited_money = GameGlobals.money