Skip to content

Commit

Permalink
Magazine and bullet json
Browse files Browse the repository at this point in the history
  • Loading branch information
snipercup committed Jan 23, 2024
1 parent 160ec24 commit b3880ec
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ItemProtosets.tres
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ json_data = "[
\"width\": \"2\"
},
{
\"Ammo\": {
\"damage\": \"25\"
},
\"description\": \"Standard type of ammunition. Very common.\",
\"height\": \"1\",
\"id\": \"bullet_9mm\",
Expand All @@ -43,6 +46,10 @@ json_data = "[
\"width\": \"1\"
},
{
\"Magazine\": {
\"max_ammo\": \"20\",
\"used_ammo\": \"9mm\"
},
\"description\": \"In order for your pistol to fire a bullet, it needs to have a magazine loaded with bullets\",
\"height\": \"1\",
\"id\": \"pistol_magazine\",
Expand Down
7 changes: 7 additions & 0 deletions Mods/Core/Items/Items.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"width": "2"
},
{
"Ammo": {
"damage": "25"
},
"description": "Standard type of ammunition. Very common.",
"height": "1",
"id": "bullet_9mm",
Expand All @@ -37,6 +40,10 @@
"width": "1"
},
{
"Magazine": {
"max_ammo": "20",
"used_ammo": "9mm"
},
"description": "In order for your pistol to fire a bullet, it needs to have a magazine loaded with bullets",
"height": "1",
"id": "pistol_magazine",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

[ext_resource type="Script" path="res://Scripts/ItemMagazineEditor.gd" id="1_cgvqr"]

[node name="ItemMagazineEditor" type="Control"]
[node name="ItemMagazineEditor" type="Control" node_paths=PackedStringArray("UsedAmmoTextEdit", "MaxAmmoNumberBox")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_cgvqr")
UsedAmmoTextEdit = NodePath("Magazine/UsedAmmoTextEdit")
MaxAmmoNumberBox = NodePath("Magazine/MaxAmmoNumber")

[node name="Magazine" type="GridContainer" parent="."]
layout_mode = 0
Expand Down

0 comments on commit b3880ec

Please sign in to comment.