feat: added the knife

This commit is contained in:
DottsGit
2026-06-06 02:22:27 -04:00
parent 90876611f4
commit 18b8b3ee99
6 changed files with 211 additions and 2 deletions
+8 -1
View File
@@ -62,6 +62,11 @@ var weapon_db = {
"name": "Mortar",
"category": "special",
"script": "res://weapons/mortar.gd"
},
"knife": {
"name": "Knife",
"category": "melee",
"script": "res://weapons/knife.gd"
}
}
@@ -80,7 +85,8 @@ func _ensure_default_loadouts() -> void:
"name": "Loadout " + str(i + 1),
"primary_1": "double_barrel_shotgun",
"primary_2": "none",
"special": "none"
"special": "none",
"melee": "knife"
})
func get_active_loadout() -> Dictionary:
@@ -123,3 +129,4 @@ func load_loadouts() -> void:
if sl.has("primary_1"): loadouts[i]["primary_1"] = sl["primary_1"]
if sl.has("primary_2"): loadouts[i]["primary_2"] = sl["primary_2"]
if sl.has("special"): loadouts[i]["special"] = sl["special"]
if sl.has("melee"): loadouts[i]["melee"] = sl["melee"]
+2
View File
@@ -11,6 +11,7 @@ var default_bindings = {
"grapple": {"type": "mouse", "code": MOUSE_BUTTON_MIDDLE},
"reload": {"type": "key", "code": KEY_R},
"interact": {"type": "key", "code": KEY_E},
"melee": {"type": "key", "code": KEY_F},
"move_forward": {"type": "key", "code": KEY_W},
"move_back": {"type": "key", "code": KEY_S},
"move_left": {"type": "key", "code": KEY_A},
@@ -20,6 +21,7 @@ var default_bindings = {
"weapon_1": {"type": "key", "code": KEY_1},
"weapon_2": {"type": "key", "code": KEY_2},
"weapon_3": {"type": "key", "code": KEY_3},
"weapon_4": {"type": "key", "code": KEY_4},
}
var current_bindings = {}