diff --git a/assets/ui/inventory items/Bandage.png b/assets/ui/inventory items/Bandage.png new file mode 100644 index 0000000..65323ae Binary files /dev/null and b/assets/ui/inventory items/Bandage.png differ diff --git a/assets/ui/inventory items/Bandage.png.import b/assets/ui/inventory items/Bandage.png.import new file mode 100644 index 0000000..8318da4 --- /dev/null +++ b/assets/ui/inventory items/Bandage.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b4nhgp2ncitj2" +path="res://.godot/imported/Bandage.png-5e2534f607e876d904c31a0c4462c1cb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Bandage.png" +dest_files=["res://.godot/imported/Bandage.png-5e2534f607e876d904c31a0c4462c1cb.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 diff --git a/assets/ui/inventory items/Basic Boots.png b/assets/ui/inventory items/Basic Boots.png new file mode 100644 index 0000000..d7f975a Binary files /dev/null and b/assets/ui/inventory items/Basic Boots.png differ diff --git a/assets/ui/inventory items/Basic Boots.png.import b/assets/ui/inventory items/Basic Boots.png.import new file mode 100644 index 0000000..1e51eb7 --- /dev/null +++ b/assets/ui/inventory items/Basic Boots.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://3717j7851wp8" +path="res://.godot/imported/Basic Boots.png-080791d73fccb794fb1b7038d39cb6c4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Basic Boots.png" +dest_files=["res://.godot/imported/Basic Boots.png-080791d73fccb794fb1b7038d39cb6c4.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 diff --git a/assets/ui/inventory items/Basic Helmet.png b/assets/ui/inventory items/Basic Helmet.png new file mode 100644 index 0000000..deb46bb Binary files /dev/null and b/assets/ui/inventory items/Basic Helmet.png differ diff --git a/assets/ui/inventory items/Basic Helmet.png.import b/assets/ui/inventory items/Basic Helmet.png.import new file mode 100644 index 0000000..bf55575 --- /dev/null +++ b/assets/ui/inventory items/Basic Helmet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://sa0nlf0101p6" +path="res://.godot/imported/Basic Helmet.png-dd8797f6de52a48f8c077c44b3ef09b8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Basic Helmet.png" +dest_files=["res://.godot/imported/Basic Helmet.png-dd8797f6de52a48f8c077c44b3ef09b8.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 diff --git a/assets/ui/inventory items/Basic Vest.png b/assets/ui/inventory items/Basic Vest.png new file mode 100644 index 0000000..c1f9d7f Binary files /dev/null and b/assets/ui/inventory items/Basic Vest.png differ diff --git a/assets/ui/inventory items/Basic Vest.png.import b/assets/ui/inventory items/Basic Vest.png.import new file mode 100644 index 0000000..78e5b2b --- /dev/null +++ b/assets/ui/inventory items/Basic Vest.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cahsastudigpq" +path="res://.godot/imported/Basic Vest.png-ff25a7a883d9219eb3bd669d34025311.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Basic Vest.png" +dest_files=["res://.godot/imported/Basic Vest.png-ff25a7a883d9219eb3bd669d34025311.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 diff --git a/assets/ui/inventory items/Food 1.png b/assets/ui/inventory items/Food 1.png new file mode 100644 index 0000000..6042823 Binary files /dev/null and b/assets/ui/inventory items/Food 1.png differ diff --git a/assets/ui/inventory items/Food 1.png.import b/assets/ui/inventory items/Food 1.png.import new file mode 100644 index 0000000..182b677 --- /dev/null +++ b/assets/ui/inventory items/Food 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bgo0diwmv8bk5" +path="res://.godot/imported/Food 1.png-1a00e06238b34168a34c3f0fdffa55a1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Food 1.png" +dest_files=["res://.godot/imported/Food 1.png-1a00e06238b34168a34c3f0fdffa55a1.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 diff --git a/assets/ui/inventory items/Fuel.png b/assets/ui/inventory items/Fuel.png new file mode 100644 index 0000000..2009144 Binary files /dev/null and b/assets/ui/inventory items/Fuel.png differ diff --git a/assets/ui/inventory items/Fuel.png.import b/assets/ui/inventory items/Fuel.png.import new file mode 100644 index 0000000..734aba5 --- /dev/null +++ b/assets/ui/inventory items/Fuel.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bue43mkwcmm0d" +path="res://.godot/imported/Fuel.png-bdb61fa617dfe1e6585f25c4de7dfe72.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Fuel.png" +dest_files=["res://.godot/imported/Fuel.png-bdb61fa617dfe1e6585f25c4de7dfe72.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 diff --git a/assets/ui/inventory items/Intermediate Boots.png b/assets/ui/inventory items/Intermediate Boots.png new file mode 100644 index 0000000..ad70cfa Binary files /dev/null and b/assets/ui/inventory items/Intermediate Boots.png differ diff --git a/assets/ui/inventory items/Intermediate Boots.png.import b/assets/ui/inventory items/Intermediate Boots.png.import new file mode 100644 index 0000000..a17f3c9 --- /dev/null +++ b/assets/ui/inventory items/Intermediate Boots.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://gxyb4f4nc1je" +path="res://.godot/imported/Intermediate Boots.png-194c4a27853d7c65ec7517efd8da7c61.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Intermediate Boots.png" +dest_files=["res://.godot/imported/Intermediate Boots.png-194c4a27853d7c65ec7517efd8da7c61.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 diff --git a/assets/ui/inventory items/Intermediate Helmet.png b/assets/ui/inventory items/Intermediate Helmet.png new file mode 100644 index 0000000..9385a6a Binary files /dev/null and b/assets/ui/inventory items/Intermediate Helmet.png differ diff --git a/assets/ui/inventory items/Intermediate Helmet.png.import b/assets/ui/inventory items/Intermediate Helmet.png.import new file mode 100644 index 0000000..81037dd --- /dev/null +++ b/assets/ui/inventory items/Intermediate Helmet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dho2hj7wyihf4" +path="res://.godot/imported/Intermediate Helmet.png-99c285c59dbfd633bb7e92c36fe2b059.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Intermediate Helmet.png" +dest_files=["res://.godot/imported/Intermediate Helmet.png-99c285c59dbfd633bb7e92c36fe2b059.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 diff --git a/assets/ui/inventory items/Intermediate Vest.png b/assets/ui/inventory items/Intermediate Vest.png new file mode 100644 index 0000000..9c7eda9 Binary files /dev/null and b/assets/ui/inventory items/Intermediate Vest.png differ diff --git a/assets/ui/inventory items/Intermediate Vest.png.import b/assets/ui/inventory items/Intermediate Vest.png.import new file mode 100644 index 0000000..82a81b0 --- /dev/null +++ b/assets/ui/inventory items/Intermediate Vest.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dl1kwcgaj7vm" +path="res://.godot/imported/Intermediate Vest.png-8b781821050039a41c4c942c57f523f6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Intermediate Vest.png" +dest_files=["res://.godot/imported/Intermediate Vest.png-8b781821050039a41c4c942c57f523f6.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 diff --git a/assets/ui/inventory items/Med Kit.png b/assets/ui/inventory items/Med Kit.png new file mode 100644 index 0000000..e9c17ec Binary files /dev/null and b/assets/ui/inventory items/Med Kit.png differ diff --git a/assets/ui/inventory items/Med Kit.png.import b/assets/ui/inventory items/Med Kit.png.import new file mode 100644 index 0000000..86145e2 --- /dev/null +++ b/assets/ui/inventory items/Med Kit.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d064goqtv6tb2" +path="res://.godot/imported/Med Kit.png-dfabbc2fc6207e8a0e8d0a955e08a516.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Med Kit.png" +dest_files=["res://.godot/imported/Med Kit.png-dfabbc2fc6207e8a0e8d0a955e08a516.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 diff --git a/assets/ui/inventory items/Repair Kit.png b/assets/ui/inventory items/Repair Kit.png new file mode 100644 index 0000000..f238d2e Binary files /dev/null and b/assets/ui/inventory items/Repair Kit.png differ diff --git a/assets/ui/inventory items/Repair Kit.png.import b/assets/ui/inventory items/Repair Kit.png.import new file mode 100644 index 0000000..d9a8d5e --- /dev/null +++ b/assets/ui/inventory items/Repair Kit.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://yclqj7fgxphg" +path="res://.godot/imported/Repair Kit.png-346b296da8c2db4d225e10d8c4f6f429.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Repair Kit.png" +dest_files=["res://.godot/imported/Repair Kit.png-346b296da8c2db4d225e10d8c4f6f429.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 diff --git a/assets/ui/inventory items/Weapon 1.png b/assets/ui/inventory items/Weapon 1.png new file mode 100644 index 0000000..f700e2b Binary files /dev/null and b/assets/ui/inventory items/Weapon 1.png differ diff --git a/assets/ui/inventory items/Weapon 1.png.import b/assets/ui/inventory items/Weapon 1.png.import new file mode 100644 index 0000000..30179c8 --- /dev/null +++ b/assets/ui/inventory items/Weapon 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d4l8s4nvpp7ca" +path="res://.godot/imported/Weapon 1.png-03a012ffc460c727f12ee7aecf276065.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory items/Weapon 1.png" +dest_files=["res://.godot/imported/Weapon 1.png-03a012ffc460c727f12ee7aecf276065.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 diff --git a/assets/ui/inventory_ui/ExitButton.svg b/assets/ui/inventory_ui/ExitButton.svg new file mode 100644 index 0000000..a9dde87 --- /dev/null +++ b/assets/ui/inventory_ui/ExitButton.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/ui/inventory_ui/ExitButton.svg.import b/assets/ui/inventory_ui/ExitButton.svg.import new file mode 100644 index 0000000..ae20110 --- /dev/null +++ b/assets/ui/inventory_ui/ExitButton.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://yorwmxguj5ob" +path="res://.godot/imported/ExitButton.svg-a9d95da04deed76cf55df31e2664f20c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory_ui/ExitButton.svg" +dest_files=["res://.godot/imported/ExitButton.svg-a9d95da04deed76cf55df31e2664f20c.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=true +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 +svg/scale=2.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/assets/ui/inventory_ui/overlays/Body_Overlay.png b/assets/ui/inventory_ui/overlays/Body_Overlay.png new file mode 100644 index 0000000..76f6a65 Binary files /dev/null and b/assets/ui/inventory_ui/overlays/Body_Overlay.png differ diff --git a/assets/ui/inventory_ui/overlays/Body_Overlay.png.import b/assets/ui/inventory_ui/overlays/Body_Overlay.png.import new file mode 100644 index 0000000..2298659 --- /dev/null +++ b/assets/ui/inventory_ui/overlays/Body_Overlay.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://5hla2mrab4j1" +path="res://.godot/imported/Body_Overlay.png-5f801e8f5ee0a64980e718e54d33e093.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory_ui/overlays/Body_Overlay.png" +dest_files=["res://.godot/imported/Body_Overlay.png-5f801e8f5ee0a64980e718e54d33e093.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 diff --git a/assets/ui/inventory_ui/overlays/Boot_Overlay.png b/assets/ui/inventory_ui/overlays/Boot_Overlay.png new file mode 100644 index 0000000..ba49139 Binary files /dev/null and b/assets/ui/inventory_ui/overlays/Boot_Overlay.png differ diff --git a/assets/ui/inventory_ui/overlays/Boot_Overlay.png.import b/assets/ui/inventory_ui/overlays/Boot_Overlay.png.import new file mode 100644 index 0000000..8cfa90a --- /dev/null +++ b/assets/ui/inventory_ui/overlays/Boot_Overlay.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://drp0q2blofo6n" +path="res://.godot/imported/Boot_Overlay.png-3531eb67daf736b39311eb77597a58c6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory_ui/overlays/Boot_Overlay.png" +dest_files=["res://.godot/imported/Boot_Overlay.png-3531eb67daf736b39311eb77597a58c6.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 diff --git a/assets/ui/inventory_ui/overlays/Helmet_Overlay.png b/assets/ui/inventory_ui/overlays/Helmet_Overlay.png new file mode 100644 index 0000000..dcb5b55 Binary files /dev/null and b/assets/ui/inventory_ui/overlays/Helmet_Overlay.png differ diff --git a/assets/ui/inventory_ui/overlays/Helmet_Overlay.png.import b/assets/ui/inventory_ui/overlays/Helmet_Overlay.png.import new file mode 100644 index 0000000..89d582d --- /dev/null +++ b/assets/ui/inventory_ui/overlays/Helmet_Overlay.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ce0pf5op5farq" +path="res://.godot/imported/Helmet_Overlay.png-d85e1ec47514efa7a01345a857dc2680.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory_ui/overlays/Helmet_Overlay.png" +dest_files=["res://.godot/imported/Helmet_Overlay.png-d85e1ec47514efa7a01345a857dc2680.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 diff --git a/assets/ui/inventory_ui/overlays/Weapon_Overlay.png b/assets/ui/inventory_ui/overlays/Weapon_Overlay.png new file mode 100644 index 0000000..1eced2f Binary files /dev/null and b/assets/ui/inventory_ui/overlays/Weapon_Overlay.png differ diff --git a/assets/ui/inventory_ui/overlays/Weapon_Overlay.png.import b/assets/ui/inventory_ui/overlays/Weapon_Overlay.png.import new file mode 100644 index 0000000..2719e9a --- /dev/null +++ b/assets/ui/inventory_ui/overlays/Weapon_Overlay.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c7av4r7sdanav" +path="res://.godot/imported/Weapon_Overlay.png-507a1376b43744fa99d1bd63b42a684d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ui/inventory_ui/overlays/Weapon_Overlay.png" +dest_files=["res://.godot/imported/Weapon_Overlay.png-507a1376b43744fa99d1bd63b42a684d.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 diff --git a/project.godot b/project.godot index dfab5e5..32e8637 100644 --- a/project.godot +++ b/project.godot @@ -18,6 +18,7 @@ config/icon="res://assets/icon.svg" [autoload] GameManager="*res://scripts/global/manager.gd" +InventoryManager="*res://scripts/global/inventory_manager.gd" [display] diff --git a/resources/Items/Bandage.tres b/resources/Items/Bandage.tres new file mode 100644 index 0000000..8973a4f --- /dev/null +++ b/resources/Items/Bandage.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="Item" load_steps=3 format=3 uid="uid://cfhr0sg8bfjm4"] + +[ext_resource type="Script" uid="uid://dtx3xrtjsr0sa" path="res://scripts/inventory_system/classes/item_resource.gd" id="1_h77xr"] +[ext_resource type="Texture2D" uid="uid://b4nhgp2ncitj2" path="res://assets/ui/inventory items/Bandage.png" id="1_t08m0"] + +[resource] +script = ExtResource("1_h77xr") +item_name = "Bandage" +item_description = "Stops bleeding " +stackable = true +max_stackable = 6 +item_texture = ExtResource("1_t08m0") +metadata/_custom_type_script = "uid://dtx3xrtjsr0sa" diff --git a/resources/Items/Gernade.tres b/resources/Items/Gernade.tres new file mode 100644 index 0000000..9b1938b --- /dev/null +++ b/resources/Items/Gernade.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="Item" load_steps=3 format=3 uid="uid://31es6aujwcn1"] + +[ext_resource type="Script" uid="uid://dtx3xrtjsr0sa" path="res://scripts/inventory_system/classes/item_resource.gd" id="1_2o47v"] +[ext_resource type="Texture2D" uid="uid://bue43mkwcmm0d" path="res://assets/ui/inventory items/Fuel.png" id="1_vo7bo"] + +[resource] +script = ExtResource("1_2o47v") +item_name = "Gernade" +item_description = "Does explosive damage to an area" +stackable = true +max_stackable = 4 +item_texture = ExtResource("1_vo7bo") +metadata/_custom_type_script = "uid://dtx3xrtjsr0sa" diff --git a/resources/Items/HealthPack.tres b/resources/Items/HealthPack.tres new file mode 100644 index 0000000..497a36a --- /dev/null +++ b/resources/Items/HealthPack.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="Item" load_steps=3 format=3 uid="uid://cudho7h14sjr4"] + +[ext_resource type="Script" uid="uid://dtx3xrtjsr0sa" path="res://scripts/inventory_system/classes/item_resource.gd" id="1_hjc62"] +[ext_resource type="Texture2D" uid="uid://d064goqtv6tb2" path="res://assets/ui/inventory items/Med Kit.png" id="1_xtv8e"] + +[resource] +script = ExtResource("1_hjc62") +item_name = "HealthPack" +item_description = "Heals the player for a small amount but does not fix wounds" +stackable = false +max_stackable = 1 +item_texture = ExtResource("1_xtv8e") +metadata/_custom_type_script = "uid://dtx3xrtjsr0sa" diff --git a/resources/Items/Rifle.tres b/resources/Items/Rifle.tres new file mode 100644 index 0000000..7b14b59 --- /dev/null +++ b/resources/Items/Rifle.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="Item" load_steps=3 format=3 uid="uid://dborkiydh6s2c"] + +[ext_resource type="Texture2D" uid="uid://d4l8s4nvpp7ca" path="res://assets/ui/inventory items/Weapon 1.png" id="1_7vojk"] +[ext_resource type="Script" uid="uid://dtx3xrtjsr0sa" path="res://scripts/inventory_system/classes/item_resource.gd" id="1_stogv"] + +[resource] +script = ExtResource("1_stogv") +item_name = "Rifle" +item_description = "Fight off your enemies!" +stackable = false +max_stackable = 1 +item_texture = ExtResource("1_7vojk") +metadata/_custom_type_script = "uid://dtx3xrtjsr0sa" diff --git a/resources/inventories/player_inventory.tres b/resources/inventories/player_inventory.tres new file mode 100644 index 0000000..b302457 --- /dev/null +++ b/resources/inventories/player_inventory.tres @@ -0,0 +1,31 @@ +[gd_resource type="Resource" script_class="ItemInventory" load_steps=9 format=3 uid="uid://5mqcovutop40"] + +[ext_resource type="Script" uid="uid://cwx8kabsi8ngp" path="res://scripts/inventory_system/classes/resource classes/item_container.gd" id="1_k12gj"] +[ext_resource type="Resource" uid="uid://cfhr0sg8bfjm4" path="res://resources/Items/Bandage.tres" id="2_hanmg"] +[ext_resource type="Resource" uid="uid://31es6aujwcn1" path="res://resources/Items/Gernade.tres" id="3_55tjb"] +[ext_resource type="Resource" uid="uid://dborkiydh6s2c" path="res://resources/Items/Rifle.tres" id="4_2kyjl"] +[ext_resource type="Script" uid="uid://33e18nfurfst" path="res://scripts/inventory_system/classes/resource classes/item_inventory.gd" id="5_l46mh"] + +[sub_resource type="Resource" id="Resource_iuwu2"] +script = ExtResource("1_k12gj") +position = Vector2i(0, 0) +item = ExtResource("2_hanmg") +metadata/_custom_type_script = "uid://cwx8kabsi8ngp" + +[sub_resource type="Resource" id="Resource_r6hol"] +script = ExtResource("1_k12gj") +position = Vector2i(2, 0) +item = ExtResource("3_55tjb") +metadata/_custom_type_script = "uid://cwx8kabsi8ngp" + +[sub_resource type="Resource" id="Resource_kltmp"] +script = ExtResource("1_k12gj") +position = Vector2i(3, 3) +item = ExtResource("4_2kyjl") +metadata/_custom_type_script = "uid://cwx8kabsi8ngp" + +[resource] +script = ExtResource("5_l46mh") +inventory_size = Vector2i(8, 6) +inventory = Array[ExtResource("1_k12gj")]([SubResource("Resource_iuwu2"), SubResource("Resource_r6hol"), SubResource("Resource_kltmp")]) +metadata/_custom_type_script = "uid://33e18nfurfst" diff --git a/resources/item_database.tres b/resources/item_database.tres new file mode 100644 index 0000000..c219b0b --- /dev/null +++ b/resources/item_database.tres @@ -0,0 +1,18 @@ +[gd_resource type="Resource" script_class="ItemDatabase" load_steps=7 format=3 uid="uid://bjmr6gmi6bxog"] + +[ext_resource type="Script" uid="uid://dtx3xrtjsr0sa" path="res://scripts/inventory_system/classes/item_resource.gd" id="1_yiash"] +[ext_resource type="Script" uid="uid://drjden62jh6oe" path="res://scripts/inventory_system/classes/item_database.gd" id="2_bb8ke"] +[ext_resource type="Resource" uid="uid://cfhr0sg8bfjm4" path="res://resources/Items/Bandage.tres" id="2_vjx7s"] +[ext_resource type="Resource" uid="uid://31es6aujwcn1" path="res://resources/Items/Gernade.tres" id="3_ef8je"] +[ext_resource type="Resource" uid="uid://cudho7h14sjr4" path="res://resources/Items/HealthPack.tres" id="4_2s1r4"] +[ext_resource type="Resource" uid="uid://dborkiydh6s2c" path="res://resources/Items/Rifle.tres" id="5_3c7v2"] + +[resource] +script = ExtResource("2_bb8ke") +database = Dictionary[int, ExtResource("1_yiash")]({ +0: ExtResource("2_vjx7s"), +1: ExtResource("3_ef8je"), +2: ExtResource("4_2s1r4"), +3: ExtResource("5_3c7v2") +}) +metadata/_custom_type_script = "uid://drjden62jh6oe" diff --git a/scenes/inventory_system/slot.tscn b/scenes/inventory_system/slot.tscn new file mode 100644 index 0000000..5321d44 --- /dev/null +++ b/scenes/inventory_system/slot.tscn @@ -0,0 +1,43 @@ +[gd_scene load_steps=6 format=3 uid="uid://b7i7rt41oe7vk"] + +[ext_resource type="Texture2D" uid="uid://b4cl313lwqp7m" path="res://assets/ui/inventory_ui/InventorySlot64x64.png" id="1_65pqo"] +[ext_resource type="Script" uid="uid://6vjak2yutoxw" path="res://scripts/inventory_system/classes/slot.gd" id="1_cfmsa"] +[ext_resource type="Texture2D" uid="uid://c204tk0m0rfpn" path="res://assets/ui/inventory_ui/InventorySlotSelected64x64.png" id="3_87dan"] +[ext_resource type="Texture2D" uid="uid://ti4qvgtc55lp" path="res://assets/ui/inventory_ui/InventorySlotUsed64x64.png" id="4_7odv4"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_nn0qy"] +texture = ExtResource("1_65pqo") +texture_margin_left = 10.0 +texture_margin_top = 10.0 +texture_margin_right = 10.0 +texture_margin_bottom = 10.0 + +[node name="Slot" type="PanelContainer"] +custom_minimum_size = Vector2(64, 64) +anchors_preset = -1 +anchor_right = 0.065625 +anchor_bottom = 0.116667 +offset_right = -20.0 +offset_bottom = -20.0 +theme_override_styles/panel = SubResource("StyleBoxTexture_nn0qy") +script = ExtResource("1_cfmsa") +metadata/_edit_use_anchors_ = true + +[node name="Button" type="TextureButton" parent="."] +layout_mode = 2 +texture_pressed = ExtResource("3_87dan") +texture_hover = ExtResource("4_7odv4") + +[node name="Icon" type="TextureRect" parent="."] +custom_minimum_size = Vector2(40, 40) +layout_mode = 2 +mouse_filter = 2 +expand_mode = 1 +stretch_mode = 5 + +[node name="Stack" type="Label" parent="."] +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 +theme_override_constants/outline_size = 6 +text = "100" diff --git a/scenes/loader.tscn b/scenes/loader.tscn index e79d4be..738b709 100644 --- a/scenes/loader.tscn +++ b/scenes/loader.tscn @@ -3,8 +3,10 @@ [node name="CanvasLayer" type="CanvasLayer"] [node name="ProgressBar" type="ProgressBar" parent="."] +visible = false anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 diff --git a/scenes/menus/inventory_menu.tscn b/scenes/menus/inventory_menu.tscn new file mode 100644 index 0000000..c17a91b --- /dev/null +++ b/scenes/menus/inventory_menu.tscn @@ -0,0 +1,105 @@ +[gd_scene load_steps=8 format=3 uid="uid://kwglhhfyum7a"] + +[ext_resource type="Script" uid="uid://c8126ok62de4e" path="res://scripts/menus/inventory_menu.gd" id="1_egj0w"] +[ext_resource type="Resource" uid="uid://bjmr6gmi6bxog" path="res://resources/item_database.tres" id="2_e31cf"] +[ext_resource type="Texture2D" uid="uid://dqwlq3g4qvkcb" path="res://assets/ui/panels/BLueTransparentPanel64x64.png" id="2_v0b1f"] +[ext_resource type="Texture2D" uid="uid://yorwmxguj5ob" path="res://assets/ui/inventory_ui/ExitButton.svg" id="3_xcp4r"] +[ext_resource type="Texture2D" uid="uid://b05hj6ognkfqi" path="res://assets/icon.svg" id="5_ml676"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_xcp4r"] +texture = ExtResource("2_v0b1f") +texture_margin_left = 10.0 +texture_margin_top = 10.0 +texture_margin_right = 10.0 +texture_margin_bottom = 10.0 +axis_stretch_horizontal = 1 +axis_stretch_vertical = 1 + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_v0b1f"] +texture = ExtResource("2_v0b1f") +texture_margin_left = 10.0 +texture_margin_top = 10.0 +texture_margin_right = 10.0 +texture_margin_bottom = 10.0 +axis_stretch_horizontal = 1 +axis_stretch_vertical = 1 + +[node name="InventoryMenu" type="Control" node_paths=PackedStringArray("grid_container", "held_icon")] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_egj0w") +database = ExtResource("2_e31cf") +grid_container = NodePath("PanelContainer/MarginContainer/GridContainer") +held_icon = NodePath("HeldIcon") + +[node name="PanelContainer" type="PanelContainer" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.46875 +anchor_top = 0.444444 +anchor_right = 0.53125 +anchor_bottom = 0.555556 +offset_left = 20.0 +offset_top = 20.0 +offset_right = -20.0 +offset_bottom = -20.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_xcp4r") +metadata/_edit_use_anchors_ = true + +[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"] +layout_mode = 2 +theme_override_constants/margin_left = 30 +theme_override_constants/margin_top = 30 +theme_override_constants/margin_right = 30 +theme_override_constants/margin_bottom = 30 + +[node name="GridContainer" type="GridContainer" parent="PanelContainer/MarginContainer"] +layout_mode = 2 +columns = 4 + +[node name="Title" type="PanelContainer" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.355469 +anchor_top = 0.0388889 +anchor_right = 0.644531 +anchor_bottom = 0.130556 +grow_horizontal = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_v0b1f") +metadata/_edit_use_anchors_ = true + +[node name="Label" type="Label" parent="Title"] +layout_mode = 2 +size_flags_vertical = 1 +theme_override_font_sizes/font_size = 32 +text = "INVENTORY" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="ExitButton" type="TextureButton" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.917969 +anchor_top = 0.0527778 +anchor_right = 0.967969 +anchor_bottom = 0.141667 +offset_right = 64.0 +offset_bottom = 64.0 +grow_horizontal = 0 +scale = Vector2(0.5, 0.5) +texture_normal = ExtResource("3_xcp4r") +stretch_mode = 5 +metadata/_edit_use_anchors_ = true + +[node name="HeldIcon" type="Sprite2D" parent="."] +position = Vector2(-92, -94) +scale = Vector2(1.25, 1.25) +texture = ExtResource("5_ml676") + +[connection signal="pressed" from="ExitButton" to="." method="_on_exit_button_pressed"] diff --git a/scenes/player/world.tscn b/scenes/player/world.tscn index 24af01c..5fed4b5 100644 --- a/scenes/player/world.tscn +++ b/scenes/player/world.tscn @@ -1,18 +1,39 @@ -[gd_scene load_steps=8 format=3 uid="uid://cjxiwvvqhuh0q"] +[gd_scene load_steps=14 format=4 uid="uid://cjxiwvvqhuh0q"] +[ext_resource type="PackedScene" uid="uid://dkkdcx534ran6" path="res://scenes/player/player.tscn" id="1_1vo14"] [ext_resource type="Script" uid="uid://eb3vs5x8edfb" path="res://scripts/world.gd" id="1_71hdg"] +[ext_resource type="TileSet" uid="uid://bsxyvnp83jqxa" path="res://resources/test2_terrain_procgen_tileset.tres" id="2_kej52"] +[ext_resource type="PackedScene" uid="uid://didh1mtde07hl" path="res://scenes/door.tscn" id="3_yy6hg"] +[ext_resource type="Script" uid="uid://mqyxoitrg52a" path="res://scripts/map_generator.gd" id="4_78f4u"] [ext_resource type="Script" uid="uid://bm0r4bkr3dki2" path="res://scripts/game_menu_system.gd" id="7_kej52"] [ext_resource type="PackedScene" uid="uid://2nq4ts7s3ojx" path="res://scenes/menus/in_game_menu.tscn" id="8_71hdg"] [ext_resource type="PackedScene" uid="uid://bo4uld1h02n47" path="res://scenes/menus/pause_menu.tscn" id="9_onws2"] [ext_resource type="PackedScene" uid="uid://vcaloblp0bi6" path="res://scenes/menus/settings_menu.tscn" id="10_36eim"] -[ext_resource type="PackedScene" uid="uid://dmfohcgyw6m8y" path="res://scenes/room_generator.tscn" id="10_kej52"] +[ext_resource type="PackedScene" uid="uid://kwglhhfyum7a" path="res://scenes/menus/inventory_menu.tscn" id="10_kej52"] + +[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_onws2"] +scenes/1/scene = ExtResource("1_1vo14") +scenes/2/scene = ExtResource("3_yy6hg") + +[sub_resource type="TileSet" id="TileSet_36eim"] +tile_size = Vector2i(64, 64) +custom_data_layer_0/name = "Col" +custom_data_layer_0/type = 2 +sources/1 = SubResource("TileSetScenesCollectionSource_onws2") [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_b1qyj"] [node name="Node2D" type="Node2D"] script = ExtResource("1_71hdg") -[node name="RoomGenerator" parent="." instance=ExtResource("10_kej52")]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EAAAALAP//AAACAAMAAAAGAAEAAAAGAAUAAAA=") +tile_set = ExtResource("2_kej52") +script = ExtResource("4_78f4u") + +[node name="Objects" type="TileMapLayer" parent="."] +tile_map_data = PackedByteArray("AAABAAAAAQAAAAAAAQAGAAIAAQAAAAAAAgAKAAEAAQAAAAAAAgAMAAEAAQAAAAAAAgAGAAEAAQAAAAAAAgAKAAAAAQAAAAAAAgAMAAAAAQAAAAAAAgAIAAMAAQAAAAAAAgAJAAMAAQAAAAAAAgA=") +tile_set = SubResource("TileSet_36eim") [node name="CanvasLayer" type="CanvasLayer" parent="."] @@ -44,3 +65,8 @@ metadata/_tab_index = 1 visible = false layout_mode = 2 metadata/_tab_index = 2 + +[node name="InventoryMenu" parent="CanvasLayer/MenuSystem" instance=ExtResource("10_kej52")] +visible = false +layout_mode = 2 +metadata/_tab_index = 3 diff --git a/scripts/game_menu_system.gd b/scripts/game_menu_system.gd index d5170a8..2b04fdd 100644 --- a/scripts/game_menu_system.gd +++ b/scripts/game_menu_system.gd @@ -4,5 +4,6 @@ class_name GameMenuSystem enum MENUS{ InGame, Pause, - Settings + Settings, + Inventory } diff --git a/scripts/global/inventory_manager.gd b/scripts/global/inventory_manager.gd new file mode 100644 index 0000000..c9b2bcc --- /dev/null +++ b/scripts/global/inventory_manager.gd @@ -0,0 +1,47 @@ +extends Node +## Inventory manager, handles storing the inventory in a global space +## each time a new inventory is added it gets a new id +## potentional issue is if the player opens to many inventories and the next id +## somehow becomes to big which I dont think will ever happen but we never know... + +#var inventories : Dictionary[int,InventoryContainer] +var inventories : Array[InventoryContainer] +var next_id : int = 0 + +## Player related +var player_items : ItemInventory = preload("res://resources/inventories/player_inventory.tres") +var player_inv : InventoryContainer = InventoryContainer.new(player_items.inventory_size): + set(value): + unregister_inventory(player_inv) + register_inventory(value) + player_inv = value + +func _ready() -> void: + register_inventory(player_inv) + +## The register and unregister functions might need to be reworked because of how loading new scenes +## might be handled, if the inventory is fresh then it might not have an id already set when loading +## a new scene, but I think it will work still... +func register_inventory(inv : InventoryContainer) -> void: + + ## if the id is -1, it means the inventory has not been set + match inv.get_id(): + -1: + inventories.append(inv) + inv.set_id(next_id) + ## this might not be needed if we just use the array size, leaving it for now. + next_id += 1 + _: + inventories[inv.get_id()] = inv + +func unregister_inventory(inv : InventoryContainer) -> void: + var id : int = inv.get_id() + + if id <= -1: + return + ## when we want to not use an inventory it is better to set it to null + ## this is because we dont want to shuffle the array and also cause mismatch inventory IDs. + inventories[id] = null + +func get_inventory(id : int) -> InventoryContainer: + return inventories.get(id) diff --git a/scripts/global/inventory_manager.gd.uid b/scripts/global/inventory_manager.gd.uid new file mode 100644 index 0000000..d342241 --- /dev/null +++ b/scripts/global/inventory_manager.gd.uid @@ -0,0 +1 @@ +uid://btf1dgftkhmmy diff --git a/scripts/global/manager.gd b/scripts/global/manager.gd index c5b8eab..10f21c6 100644 --- a/scripts/global/manager.gd +++ b/scripts/global/manager.gd @@ -3,7 +3,8 @@ class_name Manager ## GameManager that handles loading and spawning scenes ## e.g Player, world scene and more. - +# temporary leaving inventory in a global script (I dont know if this is a good place or not) +var player_inventory : Array const loading_scene: String = "res://scenes/loader.tscn" ## path to the loading screen var loader: ProgressBar ## loading screen progress @@ -30,6 +31,7 @@ func _ready() -> void: add_scene("res://scenes/main/main.tscn", Keys.main) add_child(preload(loading_scene).instantiate()) loader = get_child(0).get_child(0) + # temporary disabled the menu to focus on working on the inventory system spawn_scene(Keys.main) ## adds scene path to dictionary with assignes key diff --git a/scripts/inventory_system/classes/inv_item.gd b/scripts/inventory_system/classes/inv_item.gd new file mode 100644 index 0000000..f91c130 --- /dev/null +++ b/scripts/inventory_system/classes/inv_item.gd @@ -0,0 +1,28 @@ +extends RefCounted +class_name InvItem +## InvItem is mutable data, this is created on item loads when an inventory container +## is created and set. + + +# the top left of the item/slot +var origin : Vector2i = Vector2i(-1,-1) +# I dont think we need an id anymore, if the items are stored locally. +# but maybe we need to get an item +var id : int = -1 +var stackable : bool = false +var stack : int = -1 +var icon : Texture2D +var object : Node2D +var data : Item + +func _init(_origin : Vector2i, item : Item) -> void: +#func _init(_origin : Vector2i,_id : int, item : Item) -> void: + origin = _origin + data = item + #id = _id + stackable = item.stackable + stack = 1 + icon = item.item_texture + +func get_item_data() -> Item: + return data diff --git a/scripts/inventory_system/classes/inv_item.gd.uid b/scripts/inventory_system/classes/inv_item.gd.uid new file mode 100644 index 0000000..38bd9b4 --- /dev/null +++ b/scripts/inventory_system/classes/inv_item.gd.uid @@ -0,0 +1 @@ +uid://c6l12gx17r28o diff --git a/scripts/inventory_system/classes/inventory_container.gd b/scripts/inventory_system/classes/inventory_container.gd new file mode 100644 index 0000000..cf44e88 --- /dev/null +++ b/scripts/inventory_system/classes/inventory_container.gd @@ -0,0 +1,91 @@ +extends RefCounted +class_name InventoryContainer +## InventoryContainer handles the interactions between the slots. +## This includes, Loading item data on init, handling slot hover and presses which is handled externally + +signal slot_pressed(id : int , index : Vector2i) +signal slot_hovered(id : int , index : Vector2i) + +var _slots : Dictionary[Vector2i,Slot] +var _item : Dictionary[Vector2i,InvItem] +var _size : Vector2i +var _id : int = -1 +var _container : GridContainer +const _spacing : float = 64 + + +func _init(size : Vector2i) -> void: + _size = size + +func set_id(id : int) -> void: + _id = id + +func get_id() -> int: + return _id + +func generate_cells(container : GridContainer) -> void: + _container = container + _container.columns = _size.x + var slot_pack : PackedScene = preload("res://scenes/inventory_system/slot.tscn") + for y in range(_size.y): + for x in range(_size.x): + #await container.get_tree().create_timer(0.5).timeout + var slot : Slot = slot_pack.instantiate() + _container.add_child(slot) + + # setup the signals + slot.button.pressed.connect(slot_is_pressed.bind(slot)) + slot.button.mouse_entered.connect(slot_is_hovered.bind(slot)) + + # set the slots index and inv id + slot.index = Vector2i(x,y) + ## this might be useful for detecting multiple different inventories + ##slot.inventory_id = _id + # set slot into the slots dict to be able to change the item sprite + _slots[slot.index] = slot + _slots[slot.index].set_stack(0) + # set the index into the items dict and set it to null to indicate its empty + _item[slot.index] = null + +func slot_is_pressed(slot : Slot) -> void: + slot_pressed.emit(_id,slot.index) + +func slot_is_hovered(slot : Slot) -> void: + slot_hovered.emit(_id,slot.index) + +func is_cell_free(index : Vector2i) -> bool: + if not _item.has(index): + return false + + return _item[index] == null + +func add_item(inv_item : InvItem) -> bool: + var index : Vector2i = inv_item.origin + + # set item and item icon + _item[index] = inv_item + _slots[index].set_icon(inv_item.icon) + _slots[index].set_stack(inv_item.stack) + + return true + +func remove_item(inv_item : InvItem) -> void: + var index : Vector2i = inv_item.origin + _item[index] = null + _slots[index].set_icon(null) + _slots[index].set_stack(0) + +func get_item(index : Vector2i) -> InvItem: + return _item[index] + +## Database is not needed if the inventory res contains the items, this makes it so items are unique! +func load_data(items_container : ItemInventory) -> void: + var items = items_container.inventory + + for item_c in items: + var pos : Vector2i = item_c.position + var item : Item = item_c.item + + var inv_item : InvItem = InvItem.new(pos,item) + add_item(inv_item) + diff --git a/scripts/inventory_system/classes/inventory_container.gd.uid b/scripts/inventory_system/classes/inventory_container.gd.uid new file mode 100644 index 0000000..8a1d857 --- /dev/null +++ b/scripts/inventory_system/classes/inventory_container.gd.uid @@ -0,0 +1 @@ +uid://4fgvjlk334rv diff --git a/scripts/inventory_system/classes/item_database.gd b/scripts/inventory_system/classes/item_database.gd new file mode 100644 index 0000000..ce3b83a --- /dev/null +++ b/scripts/inventory_system/classes/item_database.gd @@ -0,0 +1,5 @@ +extends Resource +class_name ItemDatabase +## This class might not be needed in the future, Leaving it for now until I add more features. + +@export var database : Dictionary[int,Item] diff --git a/scripts/inventory_system/classes/item_database.gd.uid b/scripts/inventory_system/classes/item_database.gd.uid new file mode 100644 index 0000000..62175c4 --- /dev/null +++ b/scripts/inventory_system/classes/item_database.gd.uid @@ -0,0 +1 @@ +uid://drjden62jh6oe diff --git a/scripts/inventory_system/classes/item_resource.gd b/scripts/inventory_system/classes/item_resource.gd new file mode 100644 index 0000000..80354be --- /dev/null +++ b/scripts/inventory_system/classes/item_resource.gd @@ -0,0 +1,9 @@ +extends Resource +class_name Item +## This is an important class, Item simply stores un-mutable data about the item + +@export var item_name : String +@export_multiline var item_description : String +@export var stackable : bool = false +@export var max_stackable : int = 4 +@export var item_texture : Texture2D diff --git a/scripts/inventory_system/classes/item_resource.gd.uid b/scripts/inventory_system/classes/item_resource.gd.uid new file mode 100644 index 0000000..bf719ce --- /dev/null +++ b/scripts/inventory_system/classes/item_resource.gd.uid @@ -0,0 +1 @@ +uid://dtx3xrtjsr0sa diff --git a/scripts/inventory_system/classes/resource classes/item_container.gd b/scripts/inventory_system/classes/resource classes/item_container.gd new file mode 100644 index 0000000..f9f8ae9 --- /dev/null +++ b/scripts/inventory_system/classes/resource classes/item_container.gd @@ -0,0 +1,6 @@ +extends Resource +class_name ItemContainer +## A data structure that simply holds the position and item for the item inventory. + +@export var position : Vector2i +@export var item : Item diff --git a/scripts/inventory_system/classes/resource classes/item_container.gd.uid b/scripts/inventory_system/classes/resource classes/item_container.gd.uid new file mode 100644 index 0000000..96afed4 --- /dev/null +++ b/scripts/inventory_system/classes/resource classes/item_container.gd.uid @@ -0,0 +1 @@ +uid://cwx8kabsi8ngp diff --git a/scripts/inventory_system/classes/resource classes/item_inventory.gd b/scripts/inventory_system/classes/resource classes/item_inventory.gd new file mode 100644 index 0000000..8d8cb64 --- /dev/null +++ b/scripts/inventory_system/classes/resource classes/item_inventory.gd @@ -0,0 +1,6 @@ +extends Resource +class_name ItemInventory +## A resource class for storing item_containers which can be used for saving and loading. +## E.G the player would have an item inventory. +@export var inventory_size : Vector2i = Vector2i.ONE +@export var inventory : Array[ItemContainer] diff --git a/scripts/inventory_system/classes/resource classes/item_inventory.gd.uid b/scripts/inventory_system/classes/resource classes/item_inventory.gd.uid new file mode 100644 index 0000000..4b38552 --- /dev/null +++ b/scripts/inventory_system/classes/resource classes/item_inventory.gd.uid @@ -0,0 +1 @@ +uid://33e18nfurfst diff --git a/scripts/inventory_system/classes/slot.gd b/scripts/inventory_system/classes/slot.gd new file mode 100644 index 0000000..82f2c3d --- /dev/null +++ b/scripts/inventory_system/classes/slot.gd @@ -0,0 +1,25 @@ +extends PanelContainer +class_name Slot +## Slot is simply a custom texture button that sets information about the set item. + +var index :Vector2i + +@onready var icon : TextureRect = get_node("Icon") +@onready var button : TextureButton = get_node("Button") +@onready var stack : Label = get_node("Stack") + +func set_icon(texture : Texture2D) -> void: + if not icon: + return + + icon.texture = texture + +func set_stack(amount : int) -> void: + + stack.visible = true + + if not stack or amount == 0: + stack.visible = false + return + + stack.text = str(amount) diff --git a/scripts/inventory_system/classes/slot.gd.uid b/scripts/inventory_system/classes/slot.gd.uid new file mode 100644 index 0000000..14b9646 --- /dev/null +++ b/scripts/inventory_system/classes/slot.gd.uid @@ -0,0 +1 @@ +uid://6vjak2yutoxw diff --git a/scripts/menus/in_game_menu.gd b/scripts/menus/in_game_menu.gd index 4210a45..5abb55a 100644 --- a/scripts/menus/in_game_menu.gd +++ b/scripts/menus/in_game_menu.gd @@ -6,8 +6,20 @@ extends MenuBase # key then we should open the pause menu in this script # also we should call the GameManager script to delete the current scene if we # are going back to the main menu. + +var is_inv_open : bool = false + func _input(event: InputEvent) -> void: if event is InputEventKey: if event.keycode == KEY_ESCAPE and event.is_pressed(): # load the pause menu. menu_manager.switch_menu(GameMenuSystem.MENUS.Pause) + elif event.keycode == KEY_E and event.is_pressed(): + match is_inv_open: + true: + is_inv_open = false + menu_manager.switch_to_previous_menu() + false: + menu_manager.switch_menu(GameMenuSystem.MENUS.Inventory) + is_inv_open = true + diff --git a/scripts/menus/inventory_menu.gd b/scripts/menus/inventory_menu.gd new file mode 100644 index 0000000..63f97e8 --- /dev/null +++ b/scripts/menus/inventory_menu.gd @@ -0,0 +1,143 @@ +extends MenuBase + +@export_group("Settings") +@export var database : ItemDatabase +@export var grid_container : GridContainer +@export var held_icon : Sprite2D + +enum states {Empty,Held,Drop,PickUp,Swap,Add,Remove} +var current_state : states = states.Empty + +var inventories : Dictionary[int,InventoryContainer] + +var inventory : InventoryContainer +var held_item : InvItem +var current_id : int +var current_index : Vector2i +var swap_id : int +var swap_index : Vector2i + + +func _ready() -> void: + var player_inv : InventoryContainer = _get_inventory(0) # 0 is the players inv + player_inv.generate_cells(grid_container) + # we need to generate the cells before we can load data, might not be the right way... + player_inv.load_data(InventoryManager.player_items) # database has been removed + # connect the slot pressed signal to a function in this script + player_inv.slot_pressed.connect(on_slot_pressed) + player_inv.slot_hovered.connect(handle_hover_tooltip) + +func _process(delta: float) -> void: + handle_state_update() + +func on_slot_pressed(id : int,index : Vector2i) -> void: + handle_state_transition(id,index) + #print("Inventory (%s) was pressed at (%s)" % [id, index]) + +func _on_exit_button_pressed() -> void: + menu_manager.switch_to_previous_menu() + +## Handles logic that needs to be run constantly like moving a held item or checking if a pop up should show up +func handle_state_update() -> void: + match current_state: + states.Empty: + pass + states.Held: + held_icon.global_position = get_global_mouse_position() + + states.Drop: + drop() + current_state = states.Empty + + states.PickUp: + pickup() + current_state = states.Held + + states.Add: + pass + states.Remove: + pass + states.Swap: + swap_items() + current_state = states.Held + +## Handles the logic in each state e.g empty state you can pick up an item +func handle_state_transition(id: int, index : Vector2i) -> void: + match current_state: + states.Empty: + var inv : InventoryContainer = _get_inventory(id) + if not inv.is_cell_free(index): # Check if we should pick up the item + current_id = id + current_index = index + current_state = states.PickUp + states.Held: + var inv : InventoryContainer = _get_inventory(id) + if inv.is_cell_free(index): # Check if the cell is empty + current_id = id + current_index = index + current_state = states.Drop + else: + var cur_item : InvItem = inv.get_item(index) + if held_item.id != cur_item.id: + print("Items are not the same so swap them!") + swap_id = id + swap_index = index + current_state = states.Swap + + states.Drop: + pass + states.PickUp: + pass + states.Add: + pass + states.Remove: + pass + states.Swap: + pass + +func handle_hover_tooltip(id : int, index : Vector2i) -> void: + var inv : InventoryContainer = InventoryManager.get_inventory(id) + ## the hovered slot is empty + if inv.is_cell_free(index): + return + + ## show a tooltip for the item, maybe we can also add options like consumbe,drop, etc + var item : InvItem = inv.get_item(index) + var item_data = item.get_item_data() + print("Item (%s) , Stack (%s)" % [item_data.item_name,item.stack]) + +func drop() -> void: + # grab the inventory + var inv : InventoryContainer = _get_inventory(current_id) + # empty the held_icon and reset position + held_icon.global_position = Vector2(-100,-100) + held_icon.texture = null + # update the held items origin index if we dont it returns to the previous index + held_item.origin = current_index + # add the item from the previous inventory + inv.add_item(held_item) + +func pickup() -> void: + # grab the inventory + var inv : InventoryContainer = _get_inventory(current_id) + # set the item to the held_item + held_item = inv.get_item(current_index) + # set the texture from the held item + held_icon.texture = held_item.icon + # remove the item from the previous inventory + inv.remove_item(held_item) + +func swap_items() -> void: + + var to_inv : InventoryContainer = InventoryManager.get_inventory(swap_id) + var to_item : InvItem = to_inv.get_item(swap_index) + + held_item.origin = swap_index + to_inv.add_item(held_item) + + held_item = to_item + held_icon.texture = held_item.icon + +## Helper function to make it less painful to write +func _get_inventory(id : int) -> InventoryContainer: + return InventoryManager.get_inventory(id) diff --git a/scripts/menus/inventory_menu.gd.uid b/scripts/menus/inventory_menu.gd.uid new file mode 100644 index 0000000..c89b67c --- /dev/null +++ b/scripts/menus/inventory_menu.gd.uid @@ -0,0 +1 @@ +uid://c8126ok62de4e