Skip to content

Commit

Permalink
Create test items.
Browse files Browse the repository at this point in the history
  • Loading branch information
Makosai committed Sep 29, 2023
1 parent a77910c commit b1fcab6
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 2 deletions.
2 changes: 0 additions & 2 deletions scripts/inventory/player_inventory.gd
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ func setup_header_tabs():

%HeaderContainer.add_child(node)



func handle_tab_style(node: Control):
var btn: Button = node.get_node("Button") as Button
var bg: Panel = node.get_node("SelectedBG") as Panel
Expand Down
16 changes: 16 additions & 0 deletions scripts/items/1000_wooden_sword.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[gd_resource type="Resource" script_class="ItemData" load_steps=4 format=3 uid="uid://bpfgq786xxx6s"]

[ext_resource type="Script" path="res://scripts/items/item_data.gd" id="1_j87ir"]
[ext_resource type="Texture2D" uid="uid://mfj02y3po58g" path="res://scripts/items/textures/items_atlas.png" id="2_leyx1"]

[sub_resource type="AtlasTexture" id="AtlasTexture_qqo6s"]
atlas = ExtResource("2_leyx1")
region = Rect2(512, 384, 128, 128)

[resource]
script = ExtResource("1_j87ir")
unique_id = 1
name = "Wooden Sword"
description = "Lookin' sharp."
stackable = false
texture = SubResource("AtlasTexture_qqo6s")
16 changes: 16 additions & 0 deletions scripts/items/1001_iron_sword.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[gd_resource type="Resource" script_class="ItemData" load_steps=4 format=3 uid="uid://bfb6uf41snugt"]

[ext_resource type="Script" path="res://scripts/items/item_data.gd" id="1_kxbok"]
[ext_resource type="Texture2D" uid="uid://mfj02y3po58g" path="res://scripts/items/textures/items_atlas.png" id="2_338e4"]

[sub_resource type="AtlasTexture" id="AtlasTexture_qqo6s"]
atlas = ExtResource("2_338e4")
region = Rect2(0, 0, 128, 128)

[resource]
script = ExtResource("1_kxbok")
unique_id = 1
name = "Wooden Sword"
description = "That'll do, wood. That'll do."
stackable = false
texture = SubResource("AtlasTexture_qqo6s")
16 changes: 16 additions & 0 deletions scripts/items/1002_iron_helmet.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[gd_resource type="Resource" script_class="ItemData" load_steps=4 format=3 uid="uid://b5x8rwn1o7qv5"]

[ext_resource type="Script" path="res://scripts/items/item_data.gd" id="1_i3cic"]
[ext_resource type="Texture2D" uid="uid://mfj02y3po58g" path="res://scripts/items/textures/items_atlas.png" id="2_htssg"]

[sub_resource type="AtlasTexture" id="AtlasTexture_qqo6s"]
atlas = ExtResource("2_htssg")
region = Rect2(0, 0, 128, 128)

[resource]
script = ExtResource("1_i3cic")
unique_id = 1
name = "Wooden Sword"
description = "That'll do, wood. That'll do."
stackable = false
texture = SubResource("AtlasTexture_qqo6s")
Binary file added scripts/items/textures/items_atlas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions scripts/items/textures/items_atlas.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://mfj02y3po58g"
path="res://.godot/imported/items_atlas.png-42d8d8bb6e67b39a254edc168dc196db.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://scripts/items/textures/items_atlas.png"
dest_files=["res://.godot/imported/items_atlas.png-42d8d8bb6e67b39a254edc168dc196db.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

0 comments on commit b1fcab6

Please sign in to comment.