weapon display
This commit is contained in:
parent
553f8ea77a
commit
8fadd143c3
26 changed files with 491 additions and 46 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://b1ej6kmbjpm78" path="res://gui/buy_menu/buy_button/buy_button.tscn" id="1_8guql"]
|
[ext_resource type="PackedScene" uid="uid://b1ej6kmbjpm78" path="res://gui/buy_menu/buy_button/buy_button.tscn" id="1_8guql"]
|
||||||
[ext_resource type="Script" uid="uid://dba17sgimp4j0" path="res://gui/buy_menu/buy_menu.gd" id="1_ko0fn"]
|
[ext_resource type="Script" uid="uid://dba17sgimp4j0" path="res://gui/buy_menu/buy_menu.gd" id="1_ko0fn"]
|
||||||
[ext_resource type="Resource" uid="uid://b081hg7uxx1wu" path="res://weapons/molikman_molotov.tres" id="2_0gws3"]
|
[ext_resource type="Resource" uid="uid://b081hg7uxx1wu" path="res://weapons/mm_molik.tres" id="2_0gws3"]
|
||||||
[ext_resource type="Script" uid="uid://dk4diwvruvkch" path="res://gui/buy_menu/player_money_label.gd" id="2_ll0n6"]
|
[ext_resource type="Script" uid="uid://dk4diwvruvkch" path="res://gui/buy_menu/player_money_label.gd" id="2_ll0n6"]
|
||||||
|
|
||||||
[node name="BuyMenu" type="ColorRect"]
|
[node name="BuyMenu" type="ColorRect"]
|
||||||
|
|
@ -41,5 +41,6 @@ columns = 5
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="BuyButton" parent="CenterContainer/PanelContainer/AbilitiesContainer/HBoxContainer" instance=ExtResource("1_8guql")]
|
[node name="BuyButton" parent="CenterContainer/PanelContainer/AbilitiesContainer/HBoxContainer" instance=ExtResource("1_8guql")]
|
||||||
|
custom_minimum_size = Vector2(64, 96)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
weapon = ExtResource("2_0gws3")
|
weapon = ExtResource("2_0gws3")
|
||||||
|
|
|
||||||
26
gui/weapon_display/horizontal_indicator.tscn
Normal file
26
gui/weapon_display/horizontal_indicator.tscn
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://iw76qt0vo57b"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bft3coi8fq4tr" path="res://gui/weapon_display/weapon_display_indicator.gd" id="1_amsli"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dnxw4x3cmu7io" path="res://icon.svg" id="2_qss44"]
|
||||||
|
|
||||||
|
[node name="VerticalIndicator" type="HBoxContainer" groups=["weapon_indicator"]]
|
||||||
|
custom_minimum_size = Vector2(64, 64)
|
||||||
|
offset_right = 64.0
|
||||||
|
offset_bottom = 64.0
|
||||||
|
mouse_filter = 2
|
||||||
|
script = ExtResource("1_amsli")
|
||||||
|
|
||||||
|
[node name="Texture" type="TextureRect" parent="."]
|
||||||
|
custom_minimum_size = Vector2(64, 64)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
mouse_filter = 2
|
||||||
|
texture = ExtResource("2_qss44")
|
||||||
|
expand_mode = 4
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
|
[node name="Mark" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
26
gui/weapon_display/vertical_indicator.tscn
Normal file
26
gui/weapon_display/vertical_indicator.tscn
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://opxpjjslpoc3"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bft3coi8fq4tr" path="res://gui/weapon_display/weapon_display_indicator.gd" id="1_unomd"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dnxw4x3cmu7io" path="res://icon.svg" id="2_gnxu7"]
|
||||||
|
|
||||||
|
[node name="VerticalIndicator" type="VBoxContainer" groups=["weapon_indicator"]]
|
||||||
|
custom_minimum_size = Vector2(64, 64)
|
||||||
|
offset_right = 64.0
|
||||||
|
offset_bottom = 64.0
|
||||||
|
mouse_filter = 2
|
||||||
|
script = ExtResource("1_unomd")
|
||||||
|
|
||||||
|
[node name="Texture" type="TextureRect" parent="."]
|
||||||
|
self_modulate = Color(0.76, 0.76, 0.76, 1)
|
||||||
|
custom_minimum_size = Vector2(64, 64)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
mouse_filter = 2
|
||||||
|
texture = ExtResource("2_gnxu7")
|
||||||
|
expand_mode = 2
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
|
[node name="Mark" type="Label" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
13
gui/weapon_display/weapon_display.gd
Normal file
13
gui/weapon_display/weapon_display.gd
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
|
||||||
|
func on_slots_changed(current_slot: StringName, slots_data: Dictionary[StringName,StringName]):
|
||||||
|
for indicator in get_tree().get_nodes_in_group("weapon_indicator"):
|
||||||
|
var slot_accessed_data = slots_data[indicator.lookup_slot]
|
||||||
|
if slot_accessed_data == "":
|
||||||
|
indicator.hide()
|
||||||
|
continue
|
||||||
|
indicator.show()
|
||||||
|
var weapon = Registry.weapons[slot_accessed_data]
|
||||||
|
indicator.set_weapon(weapon)
|
||||||
|
indicator.set_current(current_slot == indicator.lookup_slot)
|
||||||
1
gui/weapon_display/weapon_display.gd.uid
Normal file
1
gui/weapon_display/weapon_display.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bdjp20eo2uw0d
|
||||||
80
gui/weapon_display/weapon_display.tscn
Normal file
80
gui/weapon_display/weapon_display.tscn
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://bqdcjq12tbh0s"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://opxpjjslpoc3" path="res://gui/weapon_display/vertical_indicator.tscn" id="1_bwhua"]
|
||||||
|
[ext_resource type="Script" uid="uid://bdjp20eo2uw0d" path="res://gui/weapon_display/weapon_display.gd" id="1_nv6sv"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://iw76qt0vo57b" path="res://gui/weapon_display/horizontal_indicator.tscn" id="2_hf8mm"]
|
||||||
|
|
||||||
|
[node name="WeaponDisplay" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
mouse_filter = 2
|
||||||
|
script = ExtResource("1_nv6sv")
|
||||||
|
|
||||||
|
[node name="AbilityContainer" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = -1
|
||||||
|
anchor_left = 0.27265626
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 0.72734374
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 0
|
||||||
|
alignment = 1
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
|
[node name="FirstAbility" parent="AbilityContainer" instance=ExtResource("1_bwhua")]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
lookup_slot = &"ability_first"
|
||||||
|
lookup_action = &"plr_active_first"
|
||||||
|
|
||||||
|
[node name="SecondAbility" parent="AbilityContainer" instance=ExtResource("1_bwhua")]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
lookup_slot = &"ability_second"
|
||||||
|
lookup_action = &"plr_active_second"
|
||||||
|
|
||||||
|
[node name="ThirdAbility" parent="AbilityContainer" instance=ExtResource("1_bwhua")]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
lookup_slot = &"ability_third"
|
||||||
|
lookup_action = &"plr_active_third"
|
||||||
|
|
||||||
|
[node name="WeaponContainer" type="VBoxContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = -1
|
||||||
|
anchor_left = 0.9359375
|
||||||
|
anchor_top = 0.5138889
|
||||||
|
anchor_right = 0.9898437
|
||||||
|
anchor_bottom = 0.88611114
|
||||||
|
grow_horizontal = 0
|
||||||
|
grow_vertical = 2
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
|
[node name="Primary" parent="WeaponContainer" instance=ExtResource("2_hf8mm")]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
lookup_slot = &"primary"
|
||||||
|
lookup_action = &"plr_primary"
|
||||||
|
|
||||||
|
[node name="Secondary" parent="WeaponContainer" instance=ExtResource("2_hf8mm")]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
lookup_slot = &"secondary"
|
||||||
|
lookup_action = &"plr_secondary"
|
||||||
|
|
||||||
|
[node name="Knife" parent="WeaponContainer" instance=ExtResource("2_hf8mm")]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
lookup_slot = &"knife"
|
||||||
|
lookup_action = &"plr_knife"
|
||||||
|
|
||||||
|
[node name="Bomb" parent="WeaponContainer" instance=ExtResource("2_hf8mm")]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
lookup_slot = &"bomb"
|
||||||
|
lookup_action = &"plr_bomb"
|
||||||
18
gui/weapon_display/weapon_display_indicator.gd
Normal file
18
gui/weapon_display/weapon_display_indicator.gd
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
extends Container
|
||||||
|
|
||||||
|
const CURRENT_COLOR = Color("ffffff")
|
||||||
|
const NOT_CURRENT_COLOR = Color("d4d4d4")
|
||||||
|
|
||||||
|
@onready var texture: TextureRect = $Texture
|
||||||
|
@onready var button_mark: Label = $Mark
|
||||||
|
@export var lookup_slot: StringName
|
||||||
|
@export var lookup_action: StringName
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
button_mark.text = InputMap.get_action_description(lookup_action).left(1)
|
||||||
|
|
||||||
|
func set_weapon(resource: WeaponResource):
|
||||||
|
texture.texture = resource.preview
|
||||||
|
|
||||||
|
func set_current(current):
|
||||||
|
texture.self_modulate = CURRENT_COLOR if current else NOT_CURRENT_COLOR
|
||||||
1
gui/weapon_display/weapon_display_indicator.gd.uid
Normal file
1
gui/weapon_display/weapon_display_indicator.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bft3coi8fq4tr
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=84 format=4 uid="uid://dpsr6ug3pkb40"]
|
[gd_scene load_steps=83 format=4 uid="uid://dpsr6ug3pkb40"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://3dphlay25fih" path="res://players/player/player.gd" id="1_l07l8"]
|
[ext_resource type="Script" uid="uid://3dphlay25fih" path="res://players/player/player.gd" id="1_l07l8"]
|
||||||
[ext_resource type="Material" uid="uid://cjb0h3of85nc2" path="res://materials/players/molikman/mat_Molikman.tres" id="2_330gv"]
|
[ext_resource type="Material" uid="uid://cjb0h3of85nc2" path="res://materials/players/molikman/mat_Molikman.tres" id="2_330gv"]
|
||||||
|
|
@ -10,10 +10,9 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://twxsiwqgu1dy" path="res://models/characters/viewmodels/molikman_hands_tex_bomb.png" id="8_vfta6"]
|
[ext_resource type="Texture2D" uid="uid://twxsiwqgu1dy" path="res://models/characters/viewmodels/molikman_hands_tex_bomb.png" id="8_vfta6"]
|
||||||
[ext_resource type="Animation" uid="uid://bd7i1oux2k74q" path="res://animations/baked_bomb_plant.res" id="9_jkjl5"]
|
[ext_resource type="Animation" uid="uid://bd7i1oux2k74q" path="res://animations/baked_bomb_plant.res" id="9_jkjl5"]
|
||||||
[ext_resource type="Script" uid="uid://bl8gfrrc512q2" path="res://players/player/dead_player_spectator.gd" id="10_nar88"]
|
[ext_resource type="Script" uid="uid://bl8gfrrc512q2" path="res://players/player/dead_player_spectator.gd" id="10_nar88"]
|
||||||
[ext_resource type="Script" uid="uid://7gmgcaxfh8sb" path="res://systems/debug/property_shower.gd" id="11_o7yy1"]
|
|
||||||
[ext_resource type="Script" uid="uid://dmy6ahci16los" path="res://systems/debug/inventory_preview.gd" id="12_lmgvl"]
|
|
||||||
[ext_resource type="Script" uid="uid://dalwlndejfdhm" path="res://gui/crosshair.gd" id="13_a8vk2"]
|
[ext_resource type="Script" uid="uid://dalwlndejfdhm" path="res://gui/crosshair.gd" id="13_a8vk2"]
|
||||||
[ext_resource type="Script" uid="uid://vmhlmhd6gjx6" path="res://gui/hud/player_healthbar.gd" id="14_dy7an"]
|
[ext_resource type="Script" uid="uid://vmhlmhd6gjx6" path="res://gui/hud/player_healthbar.gd" id="14_dy7an"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bqdcjq12tbh0s" path="res://gui/weapon_display/weapon_display.tscn" id="14_tgg0h"]
|
||||||
[ext_resource type="Script" uid="uid://gan0amqbhi4i" path="res://gui/hud/player_ammo_display.gd" id="15_8nx10"]
|
[ext_resource type="Script" uid="uid://gan0amqbhi4i" path="res://gui/hud/player_ammo_display.gd" id="15_8nx10"]
|
||||||
[ext_resource type="AudioStream" uid="uid://bd4iofirvmiu6" path="res://audio/step_wood.ogg" id="16_0i367"]
|
[ext_resource type="AudioStream" uid="uid://bd4iofirvmiu6" path="res://audio/step_wood.ogg" id="16_0i367"]
|
||||||
[ext_resource type="Script" uid="uid://da0xv360va3b3" path="res://audio/audio_system/multiplayer_audio_3d.gd" id="17_rgc8v"]
|
[ext_resource type="Script" uid="uid://da0xv360va3b3" path="res://audio/audio_system/multiplayer_audio_3d.gd" id="17_rgc8v"]
|
||||||
|
|
@ -8625,27 +8624,6 @@ grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
|
||||||
[node name="PanelContainer" type="PanelContainer" parent="HUD"]
|
|
||||||
visible = false
|
|
||||||
layout_mode = 0
|
|
||||||
offset_right = 40.0
|
|
||||||
offset_bottom = 40.0
|
|
||||||
|
|
||||||
[node name="VBoxContainer2" type="VBoxContainer" parent="HUD/PanelContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="Properties" type="VBoxContainer" parent="HUD/PanelContainer/VBoxContainer2"]
|
|
||||||
layout_mode = 2
|
|
||||||
script = ExtResource("11_o7yy1")
|
|
||||||
property_array = Dictionary[NodePath, StringName]({
|
|
||||||
NodePath("../../../../WeaponSystem"): &"current_state"
|
|
||||||
})
|
|
||||||
|
|
||||||
[node name="InventoryPreview" type="Label" parent="HUD/PanelContainer/VBoxContainer2" node_paths=PackedStringArray("inventory")]
|
|
||||||
layout_mode = 2
|
|
||||||
script = ExtResource("12_lmgvl")
|
|
||||||
inventory = NodePath("../../../../WeaponSystem")
|
|
||||||
|
|
||||||
[node name="Crosshair" type="Control" parent="HUD"]
|
[node name="Crosshair" type="Control" parent="HUD"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
|
|
@ -8698,6 +8676,9 @@ grow_vertical = 0
|
||||||
label_settings = SubResource("LabelSettings_x73hv")
|
label_settings = SubResource("LabelSettings_x73hv")
|
||||||
script = ExtResource("15_8nx10")
|
script = ExtResource("15_8nx10")
|
||||||
|
|
||||||
|
[node name="WeaponDisplay" parent="HUD" instance=ExtResource("14_tgg0h")]
|
||||||
|
layout_mode = 1
|
||||||
|
|
||||||
[node name="PlayerPropertiesSync" type="MultiplayerSynchronizer" parent="."]
|
[node name="PlayerPropertiesSync" type="MultiplayerSynchronizer" parent="."]
|
||||||
replication_config = SubResource("SceneReplicationConfig_qhqgy")
|
replication_config = SubResource("SceneReplicationConfig_qhqgy")
|
||||||
|
|
||||||
|
|
@ -8870,5 +8851,6 @@ script = ExtResource("38_2cl6u")
|
||||||
[connection signal="died" from="." to="PickupRange" method="disable"]
|
[connection signal="died" from="." to="PickupRange" method="disable"]
|
||||||
[connection signal="health_changed" from="." to="HUD/Healthbar" method="on_hp_changed"]
|
[connection signal="health_changed" from="." to="HUD/Healthbar" method="on_hp_changed"]
|
||||||
[connection signal="ammo_updated" from="WeaponSystem" to="HUD/AmmoDisplay" method="on_ammo_updated"]
|
[connection signal="ammo_updated" from="WeaponSystem" to="HUD/AmmoDisplay" method="on_ammo_updated"]
|
||||||
|
[connection signal="slots_updated" from="WeaponSystem" to="HUD/WeaponDisplay" method="on_slots_changed"]
|
||||||
[connection signal="interact_begin" from="PlayerInput" to="Interaction" method="on_player_start_interacting"]
|
[connection signal="interact_begin" from="PlayerInput" to="Interaction" method="on_player_start_interacting"]
|
||||||
[connection signal="interact_end" from="PlayerInput" to="Interaction" method="on_player_end_interacting"]
|
[connection signal="interact_end" from="PlayerInput" to="Interaction" method="on_player_end_interacting"]
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ var slots: Dictionary[StringName,WeaponSubStateMachine] = {
|
||||||
}
|
}
|
||||||
|
|
||||||
signal switched_to(state: WeaponSubStateMachine)
|
signal switched_to(state: WeaponSubStateMachine)
|
||||||
signal slots_updated(slots: Dictionary[StringName,WeaponSubStateMachine])
|
signal slots_updated(current_slot: StringName,slots: Dictionary[StringName,StringName])
|
||||||
signal ammo_updated(ammo: int, remaining_ammo: int)
|
signal ammo_updated(ammo: int, remaining_ammo: int)
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
@ -33,6 +33,12 @@ func _ready() -> void:
|
||||||
player_input.switch_weapon.connect(switch)
|
player_input.switch_weapon.connect(switch)
|
||||||
player_input.alternate_state.connect(alternate_state)
|
player_input.alternate_state.connect(alternate_state)
|
||||||
player_input.switch_firemode.connect(switch_mode)
|
player_input.switch_firemode.connect(switch_mode)
|
||||||
|
|
||||||
|
await get_tree().process_frame
|
||||||
|
await get_tree().process_frame
|
||||||
|
|
||||||
|
notify_slots_updated()
|
||||||
|
on_ammo_updated()
|
||||||
|
|
||||||
func get_speed_modifier() -> float:
|
func get_speed_modifier() -> float:
|
||||||
if current_state == null:
|
if current_state == null:
|
||||||
|
|
@ -51,7 +57,8 @@ func add(state: WeaponSubStateMachine, slot: StringName) -> void:
|
||||||
add_child(state, true)
|
add_child(state, true)
|
||||||
|
|
||||||
slots[slot] = state
|
slots[slot] = state
|
||||||
slots_updated.emit(slots)
|
|
||||||
|
notify_slots_updated()
|
||||||
|
|
||||||
if current_state == null:
|
if current_state == null:
|
||||||
current_state = state
|
current_state = state
|
||||||
|
|
@ -60,17 +67,6 @@ func add(state: WeaponSubStateMachine, slot: StringName) -> void:
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
state._enter()
|
state._enter()
|
||||||
|
|
||||||
|
|
||||||
func process_spawned_weapon(weapon_node: Node):
|
|
||||||
var weapon = weapon_node as WeaponSubStateMachine
|
|
||||||
|
|
||||||
slots[weapon.slot] = weapon
|
|
||||||
slots_updated.emit(slots)
|
|
||||||
|
|
||||||
if current_state == null:
|
|
||||||
current_state = weapon
|
|
||||||
ammo_updated.emit(current_state.ammo,current_state.remaining_ammo)
|
|
||||||
|
|
||||||
func get_empty_ability_slot() -> StringName:
|
func get_empty_ability_slot() -> StringName:
|
||||||
if slots["ability_first"] == null:
|
if slots["ability_first"] == null:
|
||||||
|
|
@ -95,6 +91,7 @@ func switch(to: StringName, exit: bool = true):
|
||||||
|
|
||||||
ammo_updated.emit(current_state.ammo,current_state.remaining_ammo)
|
ammo_updated.emit(current_state.ammo,current_state.remaining_ammo)
|
||||||
switched_to.emit(current_state)
|
switched_to.emit(current_state)
|
||||||
|
notify_slots_updated()
|
||||||
|
|
||||||
func return_to_previous(exit: bool = true):
|
func return_to_previous(exit: bool = true):
|
||||||
if last_slot != "":
|
if last_slot != "":
|
||||||
|
|
@ -108,7 +105,7 @@ func drop_current():
|
||||||
func drop(weapon: WeaponSubStateMachine) -> void:
|
func drop(weapon: WeaponSubStateMachine) -> void:
|
||||||
if not is_multiplayer_authority():
|
if not is_multiplayer_authority():
|
||||||
return
|
return
|
||||||
if slots.find_key(weapon) == "knife":
|
if slots.find_key(weapon) in ["knife","ability_first","ability_second","ability_third"]:
|
||||||
return
|
return
|
||||||
|
|
||||||
var dropped_weapon: DroppableWeapon = Registry.weapons[weapon.registry_entry].dropped_scene.instantiate()
|
var dropped_weapon: DroppableWeapon = Registry.weapons[weapon.registry_entry].dropped_scene.instantiate()
|
||||||
|
|
@ -122,7 +119,7 @@ func drop(weapon: WeaponSubStateMachine) -> void:
|
||||||
$"../PickupRange".start_temp_ignore()
|
$"../PickupRange".start_temp_ignore()
|
||||||
|
|
||||||
slots[slots.find_key(weapon)] = null
|
slots[slots.find_key(weapon)] = null
|
||||||
slots_updated.emit(slots)
|
notify_slots_updated()
|
||||||
weapon.queue_free()
|
weapon.queue_free()
|
||||||
return_to_previous(false)
|
return_to_previous(false)
|
||||||
|
|
||||||
|
|
@ -152,6 +149,25 @@ func on_ammo_updated() -> void:
|
||||||
func remote_ammo_update(ammo: int, remaining_ammo: int):
|
func remote_ammo_update(ammo: int, remaining_ammo: int):
|
||||||
ammo_updated.emit(ammo,remaining_ammo)
|
ammo_updated.emit(ammo,remaining_ammo)
|
||||||
|
|
||||||
|
func notify_slots_updated():
|
||||||
|
var display_slots: Dictionary[StringName,StringName] = {}
|
||||||
|
for key in slots.keys():
|
||||||
|
if slots[key] == null:
|
||||||
|
display_slots[key] = ""
|
||||||
|
else:
|
||||||
|
display_slots[key] = slots[key].registry_entry
|
||||||
|
var current_slot: StringName = ""
|
||||||
|
var found = slots.find_key(current_state)
|
||||||
|
if found:
|
||||||
|
current_slot = found
|
||||||
|
|
||||||
|
remote_update_slots.rpc(current_slot,display_slots)
|
||||||
|
slots_updated.emit(current_slot,display_slots)
|
||||||
|
|
||||||
|
@rpc
|
||||||
|
func remote_update_slots(current_slot: StringName, update_slots: Dictionary[StringName,StringName]):
|
||||||
|
slots_updated.emit(current_slot, update_slots)
|
||||||
|
|
||||||
func disable() -> void:
|
func disable() -> void:
|
||||||
disabled = true
|
disabled = true
|
||||||
|
|
||||||
|
|
|
||||||
105
textures/icons/icons.svg
Normal file
105
textures/icons/icons.svg
Normal file
|
|
@ -0,0 +1,105 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="151.5706mm"
|
||||||
|
height="94.750298mm"
|
||||||
|
viewBox="0 0 151.5706 94.750299"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||||
|
sodipodi:docname="icons.svg"
|
||||||
|
inkscape:export-batch-path="/home/fedik/chelimbalo/textures/icons"
|
||||||
|
inkscape:export-batch-name="icons"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:zoom="0.5"
|
||||||
|
inkscape:cx="475"
|
||||||
|
inkscape:cy="597"
|
||||||
|
inkscape:window-width="1890"
|
||||||
|
inkscape:window-height="1012"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showguides="true"><inkscape:page
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="151.57059"
|
||||||
|
height="94.750298"
|
||||||
|
id="page21"
|
||||||
|
margin="0"
|
||||||
|
bleed="0"
|
||||||
|
inkscape:label="starting_pistol" /><inkscape:page
|
||||||
|
x="4.9035764"
|
||||||
|
y="96.736732"
|
||||||
|
width="191.65599"
|
||||||
|
height="172.58481"
|
||||||
|
id="page22"
|
||||||
|
margin="0"
|
||||||
|
bleed="0"
|
||||||
|
inkscape:label="bomb" /><inkscape:page
|
||||||
|
x="151.57059"
|
||||||
|
y="1.8799778e-15"
|
||||||
|
width="180.41171"
|
||||||
|
height="26.771494"
|
||||||
|
id="page27"
|
||||||
|
margin="0"
|
||||||
|
bleed="0"
|
||||||
|
inkscape:label="knife" /><inkscape:page
|
||||||
|
x="200.79291"
|
||||||
|
y="96.736732"
|
||||||
|
width="137.70116"
|
||||||
|
height="172.58971"
|
||||||
|
id="page42"
|
||||||
|
margin="0 0 0 0"
|
||||||
|
bleed="0"
|
||||||
|
inkscape:label="mm_molik" /></sodipodi:namedview><defs
|
||||||
|
id="defs1" /><g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-8.0775431,-12.786816)"><path
|
||||||
|
d="M 12.275736,12.786816 8.0775431,15.913757 V 38.628133 H 41.259497 v 1.778703 H 65.51228 l 6.180502,4.092257 3.28197,12.404927 3.537768,3.322795 6.691582,1.534273 24.082248,2.727999 13.19971,42.204143 28.93364,0.84388 4.3403,-1.80816 1.56735,-5.30459 -4.46071,-23.0265 -10.84999,-24.232113 6.86057,-13.323734 6.19135,-2.579688 c 0,0 -5.78996,-6.936527 -6.01927,-6.936527 -0.22918,0 -14.37369,-1.170257 -14.38879,-1.171505 h 4.65347 l 9.63455,-0.130225 2.4412,-7.564913 8.25841,-2.531628 -0.72347,-2.320789 -7.23367,0.93431 -12.37702,-4.754232 z"
|
||||||
|
style="fill:#ffffff;stroke-width:0.264583"
|
||||||
|
id="path12" /><path
|
||||||
|
d="m 84.942619,109.52355 c -5.716613,0 -10.31875,4.60213 -10.31875,10.31875 v 18.35081 H 35.966797 v -3.0427 h -9.859863 v 3.0427 h -5.099948 c -4.446254,0 -8.025866,3.57962 -8.025866,8.02587 v 127.86351 c 0,4.44626 3.579612,8.02587 8.025866,8.02587 H 196.61125 c 4.44626,0 8.02587,-3.57961 8.02587,-8.02587 V 146.21898 c 0,-4.44625 -3.57961,-8.02587 -8.02587,-8.02587 h -5.3175 v -3.0427 h -10.03246 v 3.0427 H 142.33653 V 119.8423 c 0,-5.71662 -4.60214,-10.31875 -10.31875,-10.31875 z m 9.927559,10.34924 h 26.484692 c 5.71661,0 10.31875,4.60213 10.31875,10.31875 v 8.00157 H 84.551428 v -8.00157 c 0,-5.71662 4.602137,-10.31875 10.31875,-10.31875 z"
|
||||||
|
style="display:inline;fill:#ffffff;stroke-width:0.264583"
|
||||||
|
id="path21" /><path
|
||||||
|
d="m 276.59914,12.786817 v 2.493905 h -5.15938 l -2.95227,1.865002 -3.28352,-1.865002 h -53.18332 l -36.40139,2.594673 -15.97112,3.242696 c 0,0 15.8897,7.296713 16.21399,7.296713 0.32429,0 36.15852,8.593274 36.15852,8.593274 h 53.18332 l 3.24269,-2.431893 2.9931,2.431893 h 5.15938 v 2.550231 h 2.46496 v -2.550231 l 7.3949,0.601513 42.36486,0.05736 8.71316,-0.658874 2.52284,-3.182235 -0.0574,-15.478125 -2.63704,-3.066996 -48.03997,-0.602031 -10.26139,0.602031 v -2.493905 z"
|
||||||
|
style="fill:#ffffff;stroke-width:0.264583"
|
||||||
|
id="path27" /><g
|
||||||
|
id="g42"
|
||||||
|
transform="matrix(2.0330895,0,0,2.0330895,-356.24095,-95.843233)"><path
|
||||||
|
d="m 300.30982,109.12706 c 0,0 -4.04512,18.11477 -7.06106,38.74285 -0.25661,1.7551 -0.50556,3.52838 -0.74414,5.31027 a 19.314583,19.314583 0 0 0 19.31458,19.31458 19.314583,19.314583 0 0 0 19.31458,-19.31458 c 0,0 -0.14992,-1.51701 -0.37982,-3.81114 -0.6342,-6.32853 -1.87764,-18.57045 -2.26601,-21.19199 -0.52917,-3.57187 -2.91042,-11.11249 -2.91042,-11.11249 0,0 -1.5875,3.43958 -3.30729,7.27603 -1.71963,3.83612 -6.27373,9.98071 -6.27455,9.98182 -0.003,-0.003 -6.69076,-6.54342 -9.86503,-11.7016 -3.175,-5.15938 -5.82084,-13.49375 -5.82084,-13.49375 z"
|
||||||
|
style="fill:none;stroke:#ffffff;stroke-width:4.23333;stroke-linecap:round"
|
||||||
|
id="path40" /><circle
|
||||||
|
style="fill:none;stroke:#ffffff;stroke-width:4.23333;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
id="path41"
|
||||||
|
cx="311.81921"
|
||||||
|
cy="152.91623"
|
||||||
|
r="11.131776" /><path
|
||||||
|
style="fill:none;stroke:#ffffff;stroke-width:4.23333;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
id="path42"
|
||||||
|
sodipodi:type="arc"
|
||||||
|
sodipodi:cx="311.81921"
|
||||||
|
sodipodi:cy="173.91693"
|
||||||
|
sodipodi:rx="31.758301"
|
||||||
|
sodipodi:ry="9.868927"
|
||||||
|
sodipodi:start="5.234734"
|
||||||
|
sodipodi:end="4.2047059"
|
||||||
|
sodipodi:arc-type="arc"
|
||||||
|
d="m 327.66387,165.36401 a 31.758301,9.868927 0 0 1 14.80639,11.13614 31.758301,9.868927 0 0 1 -30.88386,7.28544 31.758301,9.868927 0 0 1 -30.53681,-7.42536 31.758301,9.868927 0 0 1 15.3302,-11.06749"
|
||||||
|
sodipodi:open="true" /></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 5.7 KiB |
BIN
textures/icons/icons_bomb.png
Normal file
BIN
textures/icons/icons_bomb.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
40
textures/icons/icons_bomb.png.import
Normal file
40
textures/icons/icons_bomb.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://ckdb8s2bj2wix"
|
||||||
|
path="res://.godot/imported/icons_bomb.png-43c075c74729da3fde6de9bb2c912d0b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://textures/icons/icons_bomb.png"
|
||||||
|
dest_files=["res://.godot/imported/icons_bomb.png-43c075c74729da3fde6de9bb2c912d0b.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
textures/icons/icons_knife.png
Normal file
BIN
textures/icons/icons_knife.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
40
textures/icons/icons_knife.png.import
Normal file
40
textures/icons/icons_knife.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dep78xhc8iq06"
|
||||||
|
path="res://.godot/imported/icons_knife.png-c086c973387a4a6fd222a41b12a18986.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://textures/icons/icons_knife.png"
|
||||||
|
dest_files=["res://.godot/imported/icons_knife.png-c086c973387a4a6fd222a41b12a18986.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
textures/icons/icons_mm_molik.png
Normal file
BIN
textures/icons/icons_mm_molik.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
40
textures/icons/icons_mm_molik.png.import
Normal file
40
textures/icons/icons_mm_molik.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://d257ki2or3i3m"
|
||||||
|
path="res://.godot/imported/icons_mm_molik.png-7ea5452e2ab283754a1325798bcbc30e.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://textures/icons/icons_mm_molik.png"
|
||||||
|
dest_files=["res://.godot/imported/icons_mm_molik.png-7ea5452e2ab283754a1325798bcbc30e.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
textures/icons/icons_starting_pistol.png
Normal file
BIN
textures/icons/icons_starting_pistol.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
40
textures/icons/icons_starting_pistol.png.import
Normal file
40
textures/icons/icons_starting_pistol.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cg7j6uxv3wtn0"
|
||||||
|
path="res://.godot/imported/icons_starting_pistol.png-ac8ec24b025a9285a247f27ff5396537.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://textures/icons/icons_starting_pistol.png"
|
||||||
|
dest_files=["res://.godot/imported/icons_starting_pistol.png-ac8ec24b025a9285a247f27ff5396537.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cxdgk74ln5xpn" path="res://weapons/bomb/droppable_bomb.tscn" id="1_sbnmj"]
|
[ext_resource type="PackedScene" uid="uid://cxdgk74ln5xpn" path="res://weapons/bomb/droppable_bomb.tscn" id="1_sbnmj"]
|
||||||
[ext_resource type="Script" uid="uid://bvnn2eiwqbu7t" path="res://systems/weapon_system/weapon_resource.gd" id="1_w2ux2"]
|
[ext_resource type="Script" uid="uid://bvnn2eiwqbu7t" path="res://systems/weapon_system/weapon_resource.gd" id="1_w2ux2"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dnxw4x3cmu7io" path="res://icon.svg" id="2_vkfbs"]
|
[ext_resource type="Texture2D" uid="uid://ckdb8s2bj2wix" path="res://textures/icons/icons_bomb.png" id="2_sbnmj"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bxdatd1ilfgmc" path="res://weapons/bomb/bomb.tscn" id="4_shxvo"]
|
[ext_resource type="PackedScene" uid="uid://bxdatd1ilfgmc" path="res://weapons/bomb/bomb.tscn" id="4_shxvo"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_w2ux2")
|
script = ExtResource("1_w2ux2")
|
||||||
preview = ExtResource("2_vkfbs")
|
preview = ExtResource("2_sbnmj")
|
||||||
dropped_scene = ExtResource("1_sbnmj")
|
dropped_scene = ExtResource("1_sbnmj")
|
||||||
weapon_system_scene = ExtResource("4_shxvo")
|
weapon_system_scene = ExtResource("4_shxvo")
|
||||||
slot = &"bomb"
|
slot = &"bomb"
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ properties/1/replication_mode = 1
|
||||||
[node name="DroppableBomb" type="RigidBody3D" node_paths=PackedStringArray("weapon")]
|
[node name="DroppableBomb" type="RigidBody3D" node_paths=PackedStringArray("weapon")]
|
||||||
collision_layer = 8
|
collision_layer = 8
|
||||||
collision_mask = 9
|
collision_mask = 9
|
||||||
|
continuous_cd = true
|
||||||
script = ExtResource("1_hsebh")
|
script = ExtResource("1_hsebh")
|
||||||
slot = &"bomb"
|
slot = &"bomb"
|
||||||
weapon = NodePath("BombWeapon")
|
weapon = NodePath("BombWeapon")
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ properties/1/replication_mode = 1
|
||||||
[node name="DroppableStartingPistol" type="RigidBody3D" node_paths=PackedStringArray("weapon")]
|
[node name="DroppableStartingPistol" type="RigidBody3D" node_paths=PackedStringArray("weapon")]
|
||||||
collision_layer = 8
|
collision_layer = 8
|
||||||
collision_mask = 9
|
collision_mask = 9
|
||||||
|
continuous_cd = true
|
||||||
script = ExtResource("1_jym52")
|
script = ExtResource("1_jym52")
|
||||||
slot = &"secondary"
|
slot = &"secondary"
|
||||||
weapon = NodePath("StartingPistol")
|
weapon = NodePath("StartingPistol")
|
||||||
|
|
|
||||||
13
weapons/knife.tres
Normal file
13
weapons/knife.tres
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
[gd_resource type="Resource" script_class="WeaponResource" load_steps=4 format=3 uid="uid://chfehphisjn2u"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dep78xhc8iq06" path="res://textures/icons/icons_knife.png" id="1_52p4f"]
|
||||||
|
[ext_resource type="Script" uid="uid://bvnn2eiwqbu7t" path="res://systems/weapon_system/weapon_resource.gd" id="2_ld5j5"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://ts4xccpkjd3g" path="res://weapons/knife/knife.tscn" id="3_ld5j5"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("2_ld5j5")
|
||||||
|
cost = 300
|
||||||
|
preview = ExtResource("1_52p4f")
|
||||||
|
weapon_system_scene = ExtResource("3_ld5j5")
|
||||||
|
slot = &"knife"
|
||||||
|
metadata/_custom_type_script = "uid://bvnn2eiwqbu7t"
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
[node name="Knife" type="Node" node_paths=PackedStringArray("enter_state")]
|
[node name="Knife" type="Node" node_paths=PackedStringArray("enter_state")]
|
||||||
script = ExtResource("1_2xf1r")
|
script = ExtResource("1_2xf1r")
|
||||||
animation_prefix = &"baked_knife_"
|
animation_prefix = &"baked_knife_"
|
||||||
|
registry_entry = &"knife"
|
||||||
visibility_target = &"knife"
|
visibility_target = &"knife"
|
||||||
ammo_mags = 0
|
ammo_mags = 0
|
||||||
slot = &"knife"
|
slot = &"knife"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_resource type="Resource" script_class="WeaponResource" load_steps=4 format=3 uid="uid://b081hg7uxx1wu"]
|
[gd_resource type="Resource" script_class="WeaponResource" load_steps=4 format=3 uid="uid://b081hg7uxx1wu"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bmnqvop2dy5pm" path="res://textures/prototype_yellow_256x256.png" id="1_hmyxe"]
|
[ext_resource type="Texture2D" uid="uid://d257ki2or3i3m" path="res://textures/icons/icons_mm_molik.png" id="1_6mu31"]
|
||||||
[ext_resource type="Script" uid="uid://bvnn2eiwqbu7t" path="res://systems/weapon_system/weapon_resource.gd" id="1_ktfgd"]
|
[ext_resource type="Script" uid="uid://bvnn2eiwqbu7t" path="res://systems/weapon_system/weapon_resource.gd" id="1_ktfgd"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c5q7e5dj86187" path="res://weapons/molikman/molik/molikman_molik.tscn" id="3_6mu31"]
|
[ext_resource type="PackedScene" uid="uid://c5q7e5dj86187" path="res://weapons/molikman/molik/molikman_molik.tscn" id="3_6mu31"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_ktfgd")
|
script = ExtResource("1_ktfgd")
|
||||||
cost = 300
|
cost = 300
|
||||||
preview = ExtResource("1_hmyxe")
|
preview = ExtResource("1_6mu31")
|
||||||
weapon_system_scene = ExtResource("3_6mu31")
|
weapon_system_scene = ExtResource("3_6mu31")
|
||||||
slot = &"ability"
|
slot = &"ability"
|
||||||
metadata/_custom_type_script = "uid://bvnn2eiwqbu7t"
|
metadata/_custom_type_script = "uid://bvnn2eiwqbu7t"
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
[gd_resource type="Resource" script_class="WeaponResource" load_steps=5 format=3 uid="uid://2jxguk5jxlim"]
|
[gd_resource type="Resource" script_class="WeaponResource" load_steps=5 format=3 uid="uid://2jxguk5jxlim"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dgfqppi21c2u0" path="res://weapons/gun/sp/droppable_sp.tscn" id="1_vpohq"]
|
[ext_resource type="PackedScene" uid="uid://dgfqppi21c2u0" path="res://weapons/gun/sp/droppable_sp.tscn" id="1_vpohq"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dnxw4x3cmu7io" path="res://icon.svg" id="2_c0lu7"]
|
[ext_resource type="Texture2D" uid="uid://cg7j6uxv3wtn0" path="res://textures/icons/icons_starting_pistol.png" id="2_vpohq"]
|
||||||
[ext_resource type="Script" uid="uid://bvnn2eiwqbu7t" path="res://systems/weapon_system/weapon_resource.gd" id="3_eyl1o"]
|
[ext_resource type="Script" uid="uid://bvnn2eiwqbu7t" path="res://systems/weapon_system/weapon_resource.gd" id="3_eyl1o"]
|
||||||
[ext_resource type="PackedScene" uid="uid://djwjl8xll53vn" path="res://weapons/gun/sp/starting_pistol.tscn" id="4_vpohq"]
|
[ext_resource type="PackedScene" uid="uid://djwjl8xll53vn" path="res://weapons/gun/sp/starting_pistol.tscn" id="4_vpohq"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("3_eyl1o")
|
script = ExtResource("3_eyl1o")
|
||||||
cost = 200
|
cost = 200
|
||||||
preview = ExtResource("2_c0lu7")
|
preview = ExtResource("2_vpohq")
|
||||||
dropped_scene = ExtResource("1_vpohq")
|
dropped_scene = ExtResource("1_vpohq")
|
||||||
weapon_system_scene = ExtResource("4_vpohq")
|
weapon_system_scene = ExtResource("4_vpohq")
|
||||||
slot = &"secondary"
|
slot = &"secondary"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue