fixed hud, moved weapon and ammo penalties to gamemode
This commit is contained in:
19
gamemode.gd
19
gamemode.gd
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user