diff --git a/data/items/item.gd b/data/items/item.gd index 9a695aa..86597c6 100644 --- a/data/items/item.gd +++ b/data/items/item.gd @@ -6,6 +6,9 @@ enum Slots{ ACCESSORY } +var last_id : int = 1 + +var id : int @export var image : Texture2D @export var name : StringName @export var brief : String @@ -15,6 +18,9 @@ enum Slots{ @export var per : bool @export var grade : String = "F" +func _init() -> void: + last_id += 1 + id = last_id func item_type_name() -> String: return "Item" diff --git a/data/quests/quest.gd b/data/quests/quest.gd index 74abe82..29e0d2b 100644 --- a/data/quests/quest.gd +++ b/data/quests/quest.gd @@ -2,7 +2,7 @@ class_name Quest extends Resource #The list of available quests static var list : Array[Quest] - +static var last_id : int = 1 enum Status{ OPEN, @@ -32,6 +32,7 @@ class Event: VICTORY, DEFEAT } + var hidden : bool = false var type : Type = Type.WAIT var enemies : Array[String] = [] @@ -51,7 +52,7 @@ class Event: func setup() -> void: pass - func save_dict() -> Dictionary: + func save() -> Dictionary: var d : Dictionary = {} d.hidden = hidden d.type = type @@ -236,6 +237,7 @@ class Event: complete = true completed.emit() +var id : int var base_name : String = "" var name : String = "A Basic Quest" var desc : String = "The default quest, with no special anything." @@ -259,6 +261,8 @@ var questor : Adventurer = null signal status_changed(status : Status) func _init() -> void: + last_id += 1 + id = last_id pass func initiate(member : Adventurer) -> void: @@ -328,8 +332,9 @@ static func load_quest_list() -> void: static func generate(parameters : Dictionary) -> Quest: return null -func save_dict() -> Dictionary: +func save() -> Dictionary: var d : Dictionary = {} + d.id = id d.name = name d.base_name = base_name d.desc = desc @@ -349,6 +354,6 @@ func save_dict() -> Dictionary: var lst : Array = [] for evt in events: - lst.append(evt.save_dict()) + lst.append(evt.save()) d.events = lst return d diff --git a/external/Test Portrait/Farmer_F/body.png.import b/external/Test Portrait/Farmer_F/body.png.import index b385871..8e18bae 100644 --- a/external/Test Portrait/Farmer_F/body.png.import +++ b/external/Test Portrait/Farmer_F/body.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://crrd8mpcuync2" -path="res://.godot/imported/body.png-5a897720f599ec630383f1f3dd8e9e9e.ctex" +path="res://.godot/imported/body.png-efd5e53b6f03adc4a57de5ce8dc4d3cd.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/body.png" -dest_files=["res://.godot/imported/body.png-5a897720f599ec630383f1f3dd8e9e9e.ctex"] +source_file="res://external/test portrait/farmer_f/body.png" +dest_files=["res://.godot/imported/body.png-efd5e53b6f03adc4a57de5ce8dc4d3cd.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/brow_shadow-1.png.import b/external/Test Portrait/Farmer_F/brow_shadow-1.png.import index 04efe38..b6487ec 100644 --- a/external/Test Portrait/Farmer_F/brow_shadow-1.png.import +++ b/external/Test Portrait/Farmer_F/brow_shadow-1.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://pp5ssn5m2n3i" -path="res://.godot/imported/brow_shadow-1.png-94d923d93f9bc0db18f7b963da1021dd.ctex" +path="res://.godot/imported/brow_shadow-1.png-8dff8c187d59ecaaefbb84e877b32e20.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/brow_shadow-1.png" -dest_files=["res://.godot/imported/brow_shadow-1.png-94d923d93f9bc0db18f7b963da1021dd.ctex"] +source_file="res://external/test portrait/farmer_f/brow_shadow-1.png" +dest_files=["res://.godot/imported/brow_shadow-1.png-8dff8c187d59ecaaefbb84e877b32e20.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/brow_shadow-2.png.import b/external/Test Portrait/Farmer_F/brow_shadow-2.png.import index a89758a..6f63278 100644 --- a/external/Test Portrait/Farmer_F/brow_shadow-2.png.import +++ b/external/Test Portrait/Farmer_F/brow_shadow-2.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://x4e86o28672u" -path="res://.godot/imported/brow_shadow-2.png-85a8d07465b9b109e67ad99a37d690d1.ctex" +path="res://.godot/imported/brow_shadow-2.png-b5d8d416acf1ddb95fd785200da8d3ce.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/brow_shadow-2.png" -dest_files=["res://.godot/imported/brow_shadow-2.png-85a8d07465b9b109e67ad99a37d690d1.ctex"] +source_file="res://external/test portrait/farmer_f/brow_shadow-2.png" +dest_files=["res://.godot/imported/brow_shadow-2.png-b5d8d416acf1ddb95fd785200da8d3ce.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/brow_shadow.png.import b/external/Test Portrait/Farmer_F/brow_shadow.png.import index 3183cba..e584536 100644 --- a/external/Test Portrait/Farmer_F/brow_shadow.png.import +++ b/external/Test Portrait/Farmer_F/brow_shadow.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://sv7bxo8a12i6" -path="res://.godot/imported/brow_shadow.png-e4497bbbff21d0b56dc81b07de4f06bc.ctex" +path="res://.godot/imported/brow_shadow.png-f653be07b461bc5d7a18192996ffb73a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/brow_shadow.png" -dest_files=["res://.godot/imported/brow_shadow.png-e4497bbbff21d0b56dc81b07de4f06bc.ctex"] +source_file="res://external/test portrait/farmer_f/brow_shadow.png" +dest_files=["res://.godot/imported/brow_shadow.png-f653be07b461bc5d7a18192996ffb73a.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/brows-1.png.import b/external/Test Portrait/Farmer_F/brows-1.png.import index 9fdac8e..c3e6ee8 100644 --- a/external/Test Portrait/Farmer_F/brows-1.png.import +++ b/external/Test Portrait/Farmer_F/brows-1.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://tpg08bgn2on7" -path="res://.godot/imported/brows-1.png-70092c4bb56529f3cdeb7b51925eb071.ctex" +path="res://.godot/imported/brows-1.png-86a51529282fffa26d497e35e4cc9367.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/brows-1.png" -dest_files=["res://.godot/imported/brows-1.png-70092c4bb56529f3cdeb7b51925eb071.ctex"] +source_file="res://external/test portrait/farmer_f/brows-1.png" +dest_files=["res://.godot/imported/brows-1.png-86a51529282fffa26d497e35e4cc9367.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/brows-2.png.import b/external/Test Portrait/Farmer_F/brows-2.png.import index bf44252..b6faa7b 100644 --- a/external/Test Portrait/Farmer_F/brows-2.png.import +++ b/external/Test Portrait/Farmer_F/brows-2.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://brmta1rtiau4a" -path="res://.godot/imported/brows-2.png-227c9708d0b7fde57b1ef42021508fcf.ctex" +path="res://.godot/imported/brows-2.png-01beea1c4e9cadf04c529dc849682c8a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/brows-2.png" -dest_files=["res://.godot/imported/brows-2.png-227c9708d0b7fde57b1ef42021508fcf.ctex"] +source_file="res://external/test portrait/farmer_f/brows-2.png" +dest_files=["res://.godot/imported/brows-2.png-01beea1c4e9cadf04c529dc849682c8a.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/composite.png.import b/external/Test Portrait/Farmer_F/composite.png.import index f32ac68..e799e0f 100644 --- a/external/Test Portrait/Farmer_F/composite.png.import +++ b/external/Test Portrait/Farmer_F/composite.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://c3wwe6r000gpq" -path="res://.godot/imported/composite.png-b2c2e474fe243b72bd3471af031774d6.ctex" +path="res://.godot/imported/composite.png-a68e5c4a777094ce447b89a2ab45b35b.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/composite.png" -dest_files=["res://.godot/imported/composite.png-b2c2e474fe243b72bd3471af031774d6.ctex"] +source_file="res://external/test portrait/farmer_f/composite.png" +dest_files=["res://.godot/imported/composite.png-a68e5c4a777094ce447b89a2ab45b35b.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/ear.png.import b/external/Test Portrait/Farmer_F/ear.png.import index c287ccf..e495de0 100644 --- a/external/Test Portrait/Farmer_F/ear.png.import +++ b/external/Test Portrait/Farmer_F/ear.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://caow8dqiog7j4" -path="res://.godot/imported/ear.png-a1b457892f7236464123f2229af36695.ctex" +path="res://.godot/imported/ear.png-74df11e092bb05fcc54c7e7478ed4d95.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/ear.png" -dest_files=["res://.godot/imported/ear.png-a1b457892f7236464123f2229af36695.ctex"] +source_file="res://external/test portrait/farmer_f/ear.png" +dest_files=["res://.godot/imported/ear.png-74df11e092bb05fcc54c7e7478ed4d95.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/eye-white-1.png.import b/external/Test Portrait/Farmer_F/eye-white-1.png.import index cc08b8e..74019a2 100644 --- a/external/Test Portrait/Farmer_F/eye-white-1.png.import +++ b/external/Test Portrait/Farmer_F/eye-white-1.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://csp7xbtu0tpn7" -path="res://.godot/imported/eye-white-1.png-fb75b817d294c00ebeee3e6996a2c02e.ctex" +path="res://.godot/imported/eye-white-1.png-a31a2b044ab6206c129b0739fd4c0c80.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/eye-white-1.png" -dest_files=["res://.godot/imported/eye-white-1.png-fb75b817d294c00ebeee3e6996a2c02e.ctex"] +source_file="res://external/test portrait/farmer_f/eye-white-1.png" +dest_files=["res://.godot/imported/eye-white-1.png-a31a2b044ab6206c129b0739fd4c0c80.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/eyes-iris-1.png.import b/external/Test Portrait/Farmer_F/eyes-iris-1.png.import index 1901ca1..e279de5 100644 --- a/external/Test Portrait/Farmer_F/eyes-iris-1.png.import +++ b/external/Test Portrait/Farmer_F/eyes-iris-1.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://mygmunn3voie" -path="res://.godot/imported/eyes-iris-1.png-3c96067ab402ea99f8e1b1b7db594f4c.ctex" +path="res://.godot/imported/eyes-iris-1.png-d2077e2e658acf3840075cfe98f86f4e.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/eyes-iris-1.png" -dest_files=["res://.godot/imported/eyes-iris-1.png-3c96067ab402ea99f8e1b1b7db594f4c.ctex"] +source_file="res://external/test portrait/farmer_f/eyes-iris-1.png" +dest_files=["res://.godot/imported/eyes-iris-1.png-d2077e2e658acf3840075cfe98f86f4e.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/eyes-lashes-1.png.import b/external/Test Portrait/Farmer_F/eyes-lashes-1.png.import index 6121c9e..fa0ee94 100644 --- a/external/Test Portrait/Farmer_F/eyes-lashes-1.png.import +++ b/external/Test Portrait/Farmer_F/eyes-lashes-1.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://wnkr20dtf734" -path="res://.godot/imported/eyes-lashes-1.png-8a4535f7647af11ff99b165ee021e8cc.ctex" +path="res://.godot/imported/eyes-lashes-1.png-1460ddc60d7a087da2d517ce8f1a5faa.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/eyes-lashes-1.png" -dest_files=["res://.godot/imported/eyes-lashes-1.png-8a4535f7647af11ff99b165ee021e8cc.ctex"] +source_file="res://external/test portrait/farmer_f/eyes-lashes-1.png" +dest_files=["res://.godot/imported/eyes-lashes-1.png-1460ddc60d7a087da2d517ce8f1a5faa.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/eyes.png.import b/external/Test Portrait/Farmer_F/eyes.png.import index 12b4ae4..0977200 100644 --- a/external/Test Portrait/Farmer_F/eyes.png.import +++ b/external/Test Portrait/Farmer_F/eyes.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dd063tm4qo5nc" -path="res://.godot/imported/eyes.png-1384a95ac331738bfe48af30a8953f10.ctex" +path="res://.godot/imported/eyes.png-da6eb5fdf7f113844fe8e5414a1f2331.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/eyes.png" -dest_files=["res://.godot/imported/eyes.png-1384a95ac331738bfe48af30a8953f10.ctex"] +source_file="res://external/test portrait/farmer_f/eyes.png" +dest_files=["res://.godot/imported/eyes.png-da6eb5fdf7f113844fe8e5414a1f2331.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/eyes_shadow.png.import b/external/Test Portrait/Farmer_F/eyes_shadow.png.import index 1f02358..ac345e4 100644 --- a/external/Test Portrait/Farmer_F/eyes_shadow.png.import +++ b/external/Test Portrait/Farmer_F/eyes_shadow.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://li44lgsa0ky" -path="res://.godot/imported/eyes_shadow.png-639516c9b7d6a71a22fcd4597236a89e.ctex" +path="res://.godot/imported/eyes_shadow.png-c0450e5470a67b3e212b544dfeadc885.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/eyes_shadow.png" -dest_files=["res://.godot/imported/eyes_shadow.png-639516c9b7d6a71a22fcd4597236a89e.ctex"] +source_file="res://external/test portrait/farmer_f/eyes_shadow.png" +dest_files=["res://.godot/imported/eyes_shadow.png-c0450e5470a67b3e212b544dfeadc885.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/hair_bg.png.import b/external/Test Portrait/Farmer_F/hair_bg.png.import index 0810aed..d83bb4b 100644 --- a/external/Test Portrait/Farmer_F/hair_bg.png.import +++ b/external/Test Portrait/Farmer_F/hair_bg.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://can8npg0ufr3f" -path="res://.godot/imported/hair_bg.png-07f942d8008a0d2581909922002bbbe2.ctex" +path="res://.godot/imported/hair_bg.png-71bd584ff51ea6c704ba2eb2b8124703.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/hair_bg.png" -dest_files=["res://.godot/imported/hair_bg.png-07f942d8008a0d2581909922002bbbe2.ctex"] +source_file="res://external/test portrait/farmer_f/hair_bg.png" +dest_files=["res://.godot/imported/hair_bg.png-71bd584ff51ea6c704ba2eb2b8124703.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/hair_fg.png.import b/external/Test Portrait/Farmer_F/hair_fg.png.import index 60f342e..5170c99 100644 --- a/external/Test Portrait/Farmer_F/hair_fg.png.import +++ b/external/Test Portrait/Farmer_F/hair_fg.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://vt17lekvchdg" -path="res://.godot/imported/hair_fg.png-9f5c6bb27fb0349d9ddfba99f87aa5c6.ctex" +path="res://.godot/imported/hair_fg.png-9dfae38fbf9812dad9b45d15a1cbd791.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/hair_fg.png" -dest_files=["res://.godot/imported/hair_fg.png-9f5c6bb27fb0349d9ddfba99f87aa5c6.ctex"] +source_file="res://external/test portrait/farmer_f/hair_fg.png" +dest_files=["res://.godot/imported/hair_fg.png-9dfae38fbf9812dad9b45d15a1cbd791.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/hair_fg_shadow.png.import b/external/Test Portrait/Farmer_F/hair_fg_shadow.png.import index 13e85b8..7dbf97c 100644 --- a/external/Test Portrait/Farmer_F/hair_fg_shadow.png.import +++ b/external/Test Portrait/Farmer_F/hair_fg_shadow.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cru775pghpate" -path="res://.godot/imported/hair_fg_shadow.png-41de10e26ae2147aace92ba197b28075.ctex" +path="res://.godot/imported/hair_fg_shadow.png-609d7f961008e48f548f0e05277dafb4.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/hair_fg_shadow.png" -dest_files=["res://.godot/imported/hair_fg_shadow.png-41de10e26ae2147aace92ba197b28075.ctex"] +source_file="res://external/test portrait/farmer_f/hair_fg_shadow.png" +dest_files=["res://.godot/imported/hair_fg_shadow.png-609d7f961008e48f548f0e05277dafb4.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/hat-bg.png.import b/external/Test Portrait/Farmer_F/hat-bg.png.import index 41b5407..107e0a5 100644 --- a/external/Test Portrait/Farmer_F/hat-bg.png.import +++ b/external/Test Portrait/Farmer_F/hat-bg.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dj6fagfp2sbrx" -path="res://.godot/imported/hat-bg.png-00e20fcd79ddb550d12459624be7d9b1.ctex" +path="res://.godot/imported/hat-bg.png-972a86d8449c11d1a72a4f21b15efd0a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/hat-bg.png" -dest_files=["res://.godot/imported/hat-bg.png-00e20fcd79ddb550d12459624be7d9b1.ctex"] +source_file="res://external/test portrait/farmer_f/hat-bg.png" +dest_files=["res://.godot/imported/hat-bg.png-972a86d8449c11d1a72a4f21b15efd0a.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/hat.png.import b/external/Test Portrait/Farmer_F/hat.png.import index ad9b8b0..db6f143 100644 --- a/external/Test Portrait/Farmer_F/hat.png.import +++ b/external/Test Portrait/Farmer_F/hat.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://b303qa76o5r1m" -path="res://.godot/imported/hat.png-9bb6fa9d1f7f7503ee26b1749cdf7c0a.ctex" +path="res://.godot/imported/hat.png-21e48868d0218210b390afa680a1202d.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/hat.png" -dest_files=["res://.godot/imported/hat.png-9bb6fa9d1f7f7503ee26b1749cdf7c0a.ctex"] +source_file="res://external/test portrait/farmer_f/hat.png" +dest_files=["res://.godot/imported/hat.png-21e48868d0218210b390afa680a1202d.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/hat_fg.png.import b/external/Test Portrait/Farmer_F/hat_fg.png.import index c8bdc32..b24f1f6 100644 --- a/external/Test Portrait/Farmer_F/hat_fg.png.import +++ b/external/Test Portrait/Farmer_F/hat_fg.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dyeu4kwwnxjn5" -path="res://.godot/imported/hat_fg.png-e2cae14f649780ea2aba38b34358b587.ctex" +path="res://.godot/imported/hat_fg.png-2dddd61ae84da22b32d123d3533338c5.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/hat_fg.png" -dest_files=["res://.godot/imported/hat_fg.png-e2cae14f649780ea2aba38b34358b587.ctex"] +source_file="res://external/test portrait/farmer_f/hat_fg.png" +dest_files=["res://.godot/imported/hat_fg.png-2dddd61ae84da22b32d123d3533338c5.ctex"] [params] diff --git a/external/Test Portrait/Farmer_F/head.png.import b/external/Test Portrait/Farmer_F/head.png.import index df71f44..3d2f1a0 100644 --- a/external/Test Portrait/Farmer_F/head.png.import +++ b/external/Test Portrait/Farmer_F/head.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dbdjaye6srxhx" -path="res://.godot/imported/head.png-df46fa0b8e2741bbf0fad9b3a03fedea.ctex" +path="res://.godot/imported/head.png-47039f8abc285b87bb176b5b43ee9a5f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Farmer_F/head.png" -dest_files=["res://.godot/imported/head.png-df46fa0b8e2741bbf0fad9b3a03fedea.ctex"] +source_file="res://external/test portrait/farmer_f/head.png" +dest_files=["res://.godot/imported/head.png-47039f8abc285b87bb176b5b43ee9a5f.ctex"] [params] diff --git a/external/Test Portrait/Penny.png.import b/external/Test Portrait/Penny.png.import index cc86f43..c659b8a 100644 --- a/external/Test Portrait/Penny.png.import +++ b/external/Test Portrait/Penny.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dy01kbn6oq774" -path="res://.godot/imported/Penny.png-389d42de4b6272cc7190b03341f8ba23.ctex" +path="res://.godot/imported/Penny.png-eed612fd907e6c9792369a6b6c727880.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/Penny.png" -dest_files=["res://.godot/imported/Penny.png-389d42de4b6272cc7190b03341f8ba23.ctex"] +source_file="res://external/test portrait/Penny.png" +dest_files=["res://.godot/imported/Penny.png-eed612fd907e6c9792369a6b6c727880.ctex"] [params] diff --git a/external/Test Portrait/player/eye-a.png.import b/external/Test Portrait/player/eye-a.png.import index 1778011..1b907d0 100644 --- a/external/Test Portrait/player/eye-a.png.import +++ b/external/Test Portrait/player/eye-a.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cygn0xfsayykd" -path="res://.godot/imported/eye-a.png-734a4fd0bcb4bbf98a974b4b70824d99.ctex" +path="res://.godot/imported/eye-a.png-4ae928c135fabbb6dbe591d1f658a054.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/player/eye-a.png" -dest_files=["res://.godot/imported/eye-a.png-734a4fd0bcb4bbf98a974b4b70824d99.ctex"] +source_file="res://external/test portrait/player/eye-a.png" +dest_files=["res://.godot/imported/eye-a.png-4ae928c135fabbb6dbe591d1f658a054.ctex"] [params] diff --git a/external/Test Portrait/player/eye-b.png.import b/external/Test Portrait/player/eye-b.png.import index d7828fa..aa20cee 100644 --- a/external/Test Portrait/player/eye-b.png.import +++ b/external/Test Portrait/player/eye-b.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bg6lac6nl5k84" -path="res://.godot/imported/eye-b.png-14ca96eb629f87ea602431771407786a.ctex" +path="res://.godot/imported/eye-b.png-8a340a04655f91a439de6b55293f607d.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/player/eye-b.png" -dest_files=["res://.godot/imported/eye-b.png-14ca96eb629f87ea602431771407786a.ctex"] +source_file="res://external/test portrait/player/eye-b.png" +dest_files=["res://.godot/imported/eye-b.png-8a340a04655f91a439de6b55293f607d.ctex"] [params] diff --git a/external/Test Portrait/player/eye-c.png.import b/external/Test Portrait/player/eye-c.png.import index b5f553d..962c364 100644 --- a/external/Test Portrait/player/eye-c.png.import +++ b/external/Test Portrait/player/eye-c.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bxdclvopvj75q" -path="res://.godot/imported/eye-c.png-4530d56f6c9ba13b8148544326f1dcc2.ctex" +path="res://.godot/imported/eye-c.png-b34d6d5c940d727416bc135e5e88a9ca.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/Test Portrait/player/eye-c.png" -dest_files=["res://.godot/imported/eye-c.png-4530d56f6c9ba13b8148544326f1dcc2.ctex"] +source_file="res://external/test portrait/player/eye-c.png" +dest_files=["res://.godot/imported/eye-c.png-b34d6d5c940d727416bc135e5e88a9ca.ctex"] [params] diff --git a/external/banner.clip b/external/banner.clip new file mode 100644 index 0000000..13ce20d Binary files /dev/null and b/external/banner.clip differ diff --git a/external/forest.clip b/external/forest.clip new file mode 100644 index 0000000..6c937a3 Binary files /dev/null and b/external/forest.clip differ diff --git a/external/map-region-ninepatch.aseprite b/external/map-region-ninepatch.aseprite new file mode 100644 index 0000000..3494285 Binary files /dev/null and b/external/map-region-ninepatch.aseprite differ diff --git a/external/map-region-ninepatch.png b/external/map-region-ninepatch.png new file mode 100644 index 0000000..c8e55a9 Binary files /dev/null and b/external/map-region-ninepatch.png differ diff --git a/external/tc/2.png.import b/external/map-region-ninepatch.png.import similarity index 72% rename from external/tc/2.png.import rename to external/map-region-ninepatch.png.import index 44a220f..3f4fe5e 100644 --- a/external/tc/2.png.import +++ b/external/map-region-ninepatch.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://urxa6h4cf4of" -path="res://.godot/imported/2.png-2701862056f74824807b22e68ca27909.ctex" +uid="uid://dy3o1xtqg03at" +path="res://.godot/imported/map-region-ninepatch.png-0bd1376157ab4c11204e39e912041887.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://external/tc/2.png" -dest_files=["res://.godot/imported/2.png-2701862056f74824807b22e68ca27909.ctex"] +source_file="res://external/map-region-ninepatch.png" +dest_files=["res://.godot/imported/map-region-ninepatch.png-0bd1376157ab4c11204e39e912041887.ctex"] [params] diff --git a/external/tc/1.png b/external/tc/1.png deleted file mode 100644 index 490d265..0000000 Binary files a/external/tc/1.png and /dev/null differ diff --git a/external/tc/1.png.import b/external/tc/1.png.import deleted file mode 100644 index 3bc6e80..0000000 --- a/external/tc/1.png.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dxvwm21nupadm" -path="res://.godot/imported/1.png-b132cb4bd58ce4915bfe3a2aad13b672.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://external/tc/1.png" -dest_files=["res://.godot/imported/1.png-b132cb4bd58ce4915bfe3a2aad13b672.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 diff --git a/external/tc/10.png b/external/tc/10.png deleted file mode 100644 index 9f4f135..0000000 Binary files a/external/tc/10.png and /dev/null differ diff --git a/external/tc/10.png.import b/external/tc/10.png.import deleted file mode 100644 index 17db742..0000000 --- a/external/tc/10.png.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bngkacv3iag6e" -path="res://.godot/imported/10.png-d7bac63bd3ed15459cfc452ed238de0d.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://external/tc/10.png" -dest_files=["res://.godot/imported/10.png-d7bac63bd3ed15459cfc452ed238de0d.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 diff --git a/external/tc/2.png b/external/tc/2.png deleted file mode 100644 index 613032d..0000000 Binary files a/external/tc/2.png and /dev/null differ diff --git a/external/tc/3.png b/external/tc/3.png deleted file mode 100644 index cf5abb9..0000000 Binary files a/external/tc/3.png and /dev/null differ diff --git a/external/tc/3.png.import b/external/tc/3.png.import deleted file mode 100644 index 0317ca7..0000000 --- a/external/tc/3.png.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://80esel4mewm6" -path="res://.godot/imported/3.png-b550413aa080c1c70e88acfeb4d322e4.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://external/tc/3.png" -dest_files=["res://.godot/imported/3.png-b550413aa080c1c70e88acfeb4d322e4.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 diff --git a/external/tc/4.png b/external/tc/4.png deleted file mode 100644 index 7434a8c..0000000 Binary files a/external/tc/4.png and /dev/null differ diff --git a/external/tc/4.png.import b/external/tc/4.png.import deleted file mode 100644 index abf8628..0000000 --- a/external/tc/4.png.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://g1pb1a8r4asn" -path="res://.godot/imported/4.png-e4764e4f9d3e0c20595afa27b361faa1.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://external/tc/4.png" -dest_files=["res://.godot/imported/4.png-e4764e4f9d3e0c20595afa27b361faa1.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 diff --git a/external/tc/5.png b/external/tc/5.png deleted file mode 100644 index fbed16e..0000000 Binary files a/external/tc/5.png and /dev/null differ diff --git a/external/tc/5.png.import b/external/tc/5.png.import deleted file mode 100644 index be1989f..0000000 --- a/external/tc/5.png.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dh66mvfitp17t" -path="res://.godot/imported/5.png-cc15f7f59c27faf4c8e7b9d2ac49aad5.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://external/tc/5.png" -dest_files=["res://.godot/imported/5.png-cc15f7f59c27faf4c8e7b9d2ac49aad5.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 diff --git a/external/tc/6.png b/external/tc/6.png deleted file mode 100644 index 31a783d..0000000 Binary files a/external/tc/6.png and /dev/null differ diff --git a/external/tc/6.png.import b/external/tc/6.png.import deleted file mode 100644 index 92c5977..0000000 --- a/external/tc/6.png.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cjfxnltsbwfmn" -path="res://.godot/imported/6.png-b4209f047bfa66b90b5bd6b95afeda56.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://external/tc/6.png" -dest_files=["res://.godot/imported/6.png-b4209f047bfa66b90b5bd6b95afeda56.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 diff --git a/external/tc/7.png b/external/tc/7.png deleted file mode 100644 index 1917ba8..0000000 Binary files a/external/tc/7.png and /dev/null differ diff --git a/external/tc/7.png.import b/external/tc/7.png.import deleted file mode 100644 index 607e431..0000000 --- a/external/tc/7.png.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://djhk6gp250uew" -path="res://.godot/imported/7.png-bf37caa12efccbf460eb9e7a5d9d490c.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://external/tc/7.png" -dest_files=["res://.godot/imported/7.png-bf37caa12efccbf460eb9e7a5d9d490c.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 diff --git a/external/tc/8.png b/external/tc/8.png deleted file mode 100644 index e1d9256..0000000 Binary files a/external/tc/8.png and /dev/null differ diff --git a/external/tc/8.png.import b/external/tc/8.png.import deleted file mode 100644 index b03a168..0000000 --- a/external/tc/8.png.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://ym644n7w01ag" -path="res://.godot/imported/8.png-a2d258d90ed799301fd544bf2cabf011.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://external/tc/8.png" -dest_files=["res://.godot/imported/8.png-a2d258d90ed799301fd544bf2cabf011.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 diff --git a/external/tc/9.png b/external/tc/9.png deleted file mode 100644 index b820bac..0000000 Binary files a/external/tc/9.png and /dev/null differ diff --git a/external/tc/9.png.import b/external/tc/9.png.import deleted file mode 100644 index cd98b41..0000000 --- a/external/tc/9.png.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bpaavgmkmgtbh" -path="res://.godot/imported/9.png-8e14eaf91108f19c019426d203539c8f.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://external/tc/9.png" -dest_files=["res://.godot/imported/9.png-8e14eaf91108f19c019426d203539c8f.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 diff --git a/graphics/spritesheet_tiles.png b/graphics/spritesheet_tiles.png deleted file mode 100644 index 066beb6..0000000 Binary files a/graphics/spritesheet_tiles.png and /dev/null differ diff --git a/scenes/first_guildhall.tscn b/scenes/first_guildhall.tscn index d6a6daa..28b855c 100644 --- a/scenes/first_guildhall.tscn +++ b/scenes/first_guildhall.tscn @@ -4,7 +4,7 @@ [ext_resource type="Texture2D" uid="uid://c5yxq22ao1oyf" path="res://graphics/doorlight.png" id="2_ivnss"] [ext_resource type="Script" uid="uid://ccorfvcfa84gf" path="res://scripts/guildhall.gd" id="3_sxwyg"] [ext_resource type="Shader" uid="uid://hr8vdp56p4yo" path="res://shaders/void.tres" id="4_ej4lk"] -[ext_resource type="PackedScene" uid="uid://c8ofw6na082gv" path="res://templates/main_panel.tscn" id="5_blfjh"] +[ext_resource type="PackedScene" uid="uid://c8ofw6na082gv" path="res://templates/game_panel.tscn" id="5_blfjh"] [ext_resource type="Texture2D" uid="uid://bbh444vapab3y" path="res://graphics/voidcircle.png" id="5_dpsgu"] [ext_resource type="PackedScene" uid="uid://c7jagw4y7w42l" path="res://templates/top_menu.tscn" id="6_2j6ej"] [ext_resource type="Shader" uid="uid://cenbje61a2wi6" path="res://shaders/void_composite.gdshader" id="6_l1y25"] diff --git a/scenes/map.tscn b/scenes/map.tscn index 17b92d7..7eee998 100644 --- a/scenes/map.tscn +++ b/scenes/map.tscn @@ -1,8 +1,10 @@ -[gd_scene load_steps=10 format=3 uid="uid://dlmodaf4nojin"] +[gd_scene load_steps=12 format=3 uid="uid://dlmodaf4nojin"] [ext_resource type="Texture2D" uid="uid://jhaiu4lbwswl" path="res://external/test-map.png" id="1_2klcf"] +[ext_resource type="Texture2D" uid="uid://dy3o1xtqg03at" path="res://external/map-region-ninepatch.png" id="1_2lpho"] [ext_resource type="PackedScene" uid="uid://dqt38n43p58vx" path="res://templates/map_pin.tscn" id="2_paxxb"] [ext_resource type="Shader" uid="uid://m6q35taes6nx" path="res://shaders/map_point.gdshader" id="3_2lpho"] +[ext_resource type="Script" uid="uid://bhahhdhn3a7kr" path="res://scripts/map_cloud.gd" id="5_nakos"] [sub_resource type="Gradient" id="Gradient_be0no"] offsets = PackedFloat32Array(0, 0.5344828, 1) @@ -42,7 +44,94 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +[node name="NinePatchRect6" type="NinePatchRect" parent="."] +modulate = Color(0.38170326, 0.38170323, 0.38170323, 1) +layout_mode = 0 +offset_left = -457.0 +offset_top = -257.0 +offset_right = 2436.0 +offset_bottom = 1370.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 + +[node name="NinePatchRect7" type="NinePatchRect" parent="."] +modulate = Color(0.7539839, 0.75398386, 0.75398386, 1) +layout_mode = 0 +offset_left = -320.0 +offset_top = 70.0 +offset_right = 1304.0 +offset_bottom = 1114.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 + +[node name="NinePatchRect" type="NinePatchRect" parent="."] +layout_mode = 0 +offset_left = 57.0 +offset_top = 235.0 +offset_right = 618.0 +offset_bottom = 581.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 + +[node name="NinePatchRect2" type="NinePatchRect" parent="."] +layout_mode = 0 +offset_left = -350.0 +offset_top = 20.0 +offset_right = 147.0 +offset_bottom = 219.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 + +[node name="NinePatchRect3" type="NinePatchRect" parent="."] +layout_mode = 0 +offset_left = 405.0 +offset_top = 272.0 +offset_right = 541.0 +offset_bottom = 407.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 + +[node name="NinePatchRect4" type="NinePatchRect" parent="."] +layout_mode = 0 +offset_left = -274.0 +offset_top = 534.0 +offset_right = -89.0 +offset_bottom = 733.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 + +[node name="NinePatchRect5" type="NinePatchRect" parent="."] +layout_mode = 0 +offset_left = 651.0 +offset_top = 645.0 +offset_right = 715.0 +offset_bottom = 709.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 + [node name="TextureRect" type="TextureRect" parent="."] +visible = false layout_mode = 0 offset_left = -453.00003 offset_top = -256.0 @@ -51,36 +140,36 @@ offset_bottom = 824.0 scale = Vector2(1.5, 1.5) texture = ExtResource("1_2klcf") -[node name="Map Pin2" parent="." instance=ExtResource("2_paxxb")] +[node name="Spire Pin" parent="." instance=ExtResource("2_paxxb")] layout_mode = 0 -offset_left = 389.0 -offset_top = 554.0 -offset_right = 459.0 -offset_bottom = 624.0 -label = "" +offset_left = 647.0 +offset_top = 641.0 +offset_right = 717.0 +offset_bottom = 711.0 +label = "Spire" locked_brief = "" unlocked_brief = "" -[node name="Brief" parent="Map Pin2/BriefPanel" index="0"] +[node name="Brief" parent="Spire Pin/BriefPanel" index="0"] text = "" -[node name="CanvasGroup" parent="Map Pin2" index="1"] +[node name="CanvasGroup" parent="Spire Pin" index="1"] material = SubResource("ShaderMaterial_gldc4") -[node name="Pin" parent="Map Pin2/CanvasGroup" index="0"] +[node name="Pin" parent="Spire Pin/CanvasGroup" index="0"] mouse_filter = 2 -[node name="Banner" parent="Map Pin2/CanvasGroup" index="1"] +[node name="Banner" parent="Spire Pin/CanvasGroup" index="1"] offset_left = 0.0 offset_top = 0.0 offset_right = 188.0 offset_bottom = 188.0 mouse_filter = 2 -[node name="Label" parent="Map Pin2/CanvasGroup/Banner" index="0"] +[node name="Label" parent="Spire Pin/CanvasGroup/Banner" index="0"] text = "" -[node name="Map Pin3" parent="." instance=ExtResource("2_paxxb")] +[node name="Nestor\'s Woods Pin" parent="." instance=ExtResource("2_paxxb")] layout_mode = 0 offset_left = 144.0 offset_top = 382.0 @@ -91,31 +180,430 @@ label = "Nestor's Woods" locked_brief = "" unlocked_brief = "" -[node name="Map Pin4" parent="." instance=ExtResource("2_paxxb")] +[node name="Iko Gorge Pin" parent="." instance=ExtResource("2_paxxb")] layout_mode = 0 -offset_left = 229.0 -offset_top = 89.0 -offset_right = 299.0 -offset_bottom = 159.0 +offset_left = -134.0 +offset_top = 80.0 +offset_right = -64.0 +offset_bottom = 150.0 primed = true label = "Iko Gorge" locked_brief = "Mysterious cliffs in the frozen north." unlocked_brief = "One of the few northernmost lands uninhabited by [giants]. The snowy creatures of the Iko region run rampant here. Some say they are protected by the [giant] goddess, [Nakari]." -[node name="BriefPanel" parent="Map Pin4" index="0"] +[node name="BriefPanel" parent="Iko Gorge Pin" index="0"] offset_left = 56.0 offset_top = 53.0 offset_right = 356.0 offset_bottom = 153.0 -[node name="Brief" parent="Map Pin4/BriefPanel" index="0"] +[node name="Brief" parent="Iko Gorge Pin/BriefPanel" index="0"] text = "Mysterious cliffs in the frozen north." -[node name="CanvasGroup" parent="Map Pin4" index="1"] +[node name="CanvasGroup" parent="Iko Gorge Pin" index="1"] material = SubResource("ShaderMaterial_2klcf") -[node name="Label" parent="Map Pin4/CanvasGroup/Banner" index="0"] +[node name="Label" parent="Iko Gorge Pin/CanvasGroup/Banner" index="0"] text = "Iko Gorge" -[editable path="Map Pin2"] -[editable path="Map Pin4"] +[node name="Alikia Glade" parent="." instance=ExtResource("2_paxxb")] +layout_mode = 0 +offset_left = 437.0 +offset_top = 303.0 +offset_right = 507.0 +offset_bottom = 373.0 +label = "" +locked_brief = "" +unlocked_brief = "" + +[node name="Echo Valley Monastery Pin" parent="." instance=ExtResource("2_paxxb")] +layout_mode = 0 +offset_left = 279.0 +offset_top = 585.0 +offset_right = 349.0 +offset_bottom = 655.0 +label = "Echo Valley Monastery" +locked_brief = "" +unlocked_brief = "" + +[node name="Crystal Cave Pin" parent="." instance=ExtResource("2_paxxb")] +layout_mode = 0 +offset_left = -222.0 +offset_top = 596.0 +offset_right = -152.0 +offset_bottom = 666.0 +label = "Crystal Cave" +locked_brief = "" +unlocked_brief = "" + +[node name="Clouds" type="Control" parent="."] +anchors_preset = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Cloud" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -602.0 +offset_top = -123.0 +offset_right = -41.0 +offset_bottom = 223.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud2" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -511.0 +offset_top = 32.0 +offset_right = 50.0 +offset_bottom = 378.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud3" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -160.0 +offset_top = -104.0 +offset_right = 401.0 +offset_bottom = 242.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud4" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 295.0 +offset_top = 100.0 +offset_right = 856.0 +offset_bottom = 446.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud5" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 468.0 +offset_top = -120.0 +offset_right = 1029.0 +offset_bottom = 226.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud6" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 116.0 +offset_top = -186.0 +offset_right = 677.0 +offset_bottom = 160.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud7" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -727.0 +offset_top = 348.0 +offset_right = -166.0 +offset_bottom = 694.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud8" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -526.0 +offset_top = 481.0 +offset_right = 35.0 +offset_bottom = 827.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud9" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -810.0 +offset_top = 773.0 +offset_right = -249.0 +offset_bottom = 1119.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud10" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -911.0 +offset_top = 548.0 +offset_right = -350.0 +offset_bottom = 894.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud11" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -293.0 +offset_top = 690.0 +offset_right = 268.0 +offset_bottom = 1036.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud12" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -105.0 +offset_top = 630.0 +offset_right = 456.0 +offset_bottom = 976.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud13" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 171.0 +offset_top = 551.0 +offset_right = 732.0 +offset_bottom = 897.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud15" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 347.0 +offset_top = 339.0 +offset_right = 908.0 +offset_bottom = 685.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud16" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 702.0 +offset_top = 129.0 +offset_right = 1263.0 +offset_bottom = 475.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud17" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 533.0 +offset_top = 580.0 +offset_right = 1094.0 +offset_bottom = 926.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud18" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -144.0 +offset_top = 832.0 +offset_right = 417.0 +offset_bottom = 1178.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud19" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = -575.0 +offset_top = 956.0 +offset_right = -14.0 +offset_bottom = 1302.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud20" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 385.0 +offset_top = 736.0 +offset_right = 946.0 +offset_bottom = 1082.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud21" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 600.0 +offset_top = 287.0 +offset_right = 1161.0 +offset_bottom = 633.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud22" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 893.0 +offset_top = 889.0 +offset_right = 1454.0 +offset_bottom = 1235.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud23" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 997.0 +offset_top = 606.0 +offset_right = 1558.0 +offset_bottom = 952.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud24" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 1051.0 +offset_top = 318.0 +offset_right = 1612.0 +offset_bottom = 664.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud25" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 955.0 +offset_top = 38.0 +offset_right = 1516.0 +offset_bottom = 384.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud26" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 986.0 +offset_top = -229.0 +offset_right = 1547.0 +offset_bottom = 117.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[node name="Cloud27" type="NinePatchRect" parent="Clouds"] +modulate = Color(0.84532857, 0.74155146, 0.35449484, 1) +layout_mode = 0 +offset_left = 1430.0 +offset_top = 10.0 +offset_right = 1991.0 +offset_bottom = 356.0 +texture = ExtResource("1_2lpho") +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 +script = ExtResource("5_nakos") + +[editable path="Spire Pin"] +[editable path="Iko Gorge Pin"] diff --git a/scenes/active_scene.tscn b/scenes/open_shift_scene.tscn similarity index 80% rename from scenes/active_scene.tscn rename to scenes/open_shift_scene.tscn index 5188682..ecb96bc 100644 --- a/scenes/active_scene.tscn +++ b/scenes/open_shift_scene.tscn @@ -1,12 +1,11 @@ -[gd_scene load_steps=12 format=3 uid="uid://dfa6ep4o53s08"] +[gd_scene load_steps=11 format=3 uid="uid://155hlphgft66"] -[ext_resource type="Script" uid="uid://cci652umkym1f" path="res://scripts/test_scene.gd" id="1_752n1"] -[ext_resource type="Texture2D" uid="uid://c5yxq22ao1oyf" path="res://graphics/doorlight.png" id="2_oi1nh"] -[ext_resource type="PackedScene" uid="uid://cd08dp16bixfv" path="res://templates/guildhall.tscn" id="2_rma72"] -[ext_resource type="Script" uid="uid://bnbljf6u2d3kh" path="res://scripts/visitor_spawner.gd" id="3_oi1nh"] -[ext_resource type="PackedScene" uid="uid://c8ofw6na082gv" path="res://templates/main_panel.tscn" id="4_4k18p"] -[ext_resource type="PackedScene" uid="uid://c7jagw4y7w42l" path="res://templates/top_menu.tscn" id="5_p1w2f"] -[ext_resource type="AudioStream" uid="uid://cmray2frojcd" path="res://sounds/Door Hinge Creaking Door.wav" id="7_oi1nh"] +[ext_resource type="Texture2D" uid="uid://c5yxq22ao1oyf" path="res://graphics/doorlight.png" id="2_g60ou"] +[ext_resource type="PackedScene" uid="uid://cd08dp16bixfv" path="res://templates/guildhall.tscn" id="3_6js5w"] +[ext_resource type="Script" uid="uid://bnbljf6u2d3kh" path="res://scripts/visitor_spawner.gd" id="4_3jgpx"] +[ext_resource type="PackedScene" uid="uid://c8ofw6na082gv" path="res://templates/game_panel.tscn" id="5_qf35n"] +[ext_resource type="PackedScene" uid="uid://c7jagw4y7w42l" path="res://templates/top_menu.tscn" id="6_sqcvo"] +[ext_resource type="AudioStream" uid="uid://cmray2frojcd" path="res://sounds/Door Hinge Creaking Door.wav" id="7_xvhcj"] [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_752n1"] blend_mode = 3 @@ -59,8 +58,7 @@ _data = { &"open": SubResource("Animation_4k18p") } -[node name="Active Scene" type="Node2D"] -script = ExtResource("1_752n1") +[node name="Open Shift Scene" type="Node2D"] [node name="ColorRect" type="ColorRect" parent="."] visible = false @@ -84,7 +82,7 @@ self_modulate = Color(2.5713813, 2.5713813, 2.5713813, 0.36078432) z_index = 100 position = Vector2(866, 654) scale = Vector2(2, 2) -texture = ExtResource("2_oi1nh") +texture = ExtResource("2_g60ou") hframes = 5 frame = 1 @@ -93,13 +91,13 @@ libraries = { &"": SubResource("AnimationLibrary_dtjin") } -[node name="Guildhall" parent="." instance=ExtResource("2_rma72")] +[node name="Guildhall" parent="." instance=ExtResource("3_6js5w")] position = Vector2(421, 289) [node name="VisitorSpawner" type="Node2D" parent="Guildhall"] position = Vector2(453, 533) -script = ExtResource("3_oi1nh") -total_visitors = 1 +script = ExtResource("4_3jgpx") +total_visitors = 3 [node name="Timer" type="Timer" parent="Guildhall/VisitorSpawner"] @@ -111,16 +109,16 @@ offset_top = 23.0 offset_right = 1886.0 offset_bottom = 351.0 -[node name="MainPanel" parent="UI/VBoxContainer" instance=ExtResource("4_4k18p")] +[node name="MainPanel" parent="UI/VBoxContainer" instance=ExtResource("5_qf35n")] layout_mode = 2 [node name="Notices" type="Control" parent="UI/VBoxContainer"] layout_mode = 2 -[node name="Control" parent="UI" instance=ExtResource("5_p1w2f")] +[node name="Control" parent="UI" instance=ExtResource("6_sqcvo")] [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] -stream = ExtResource("7_oi1nh") +stream = ExtResource("7_xvhcj") volume_db = -24.535 [connection signal="timeout" from="Guildhall/VisitorSpawner/Timer" to="Guildhall/VisitorSpawner" method="_on_timer_timeout"] diff --git a/scenes/test/open_shift_scene.tscn b/scenes/test/open_shift_scene.tscn new file mode 100644 index 0000000..495a0e7 --- /dev/null +++ b/scenes/test/open_shift_scene.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=3 uid="uid://dfa6ep4o53s08"] + +[ext_resource type="Script" uid="uid://cci652umkym1f" path="res://scripts/test_scene.gd" id="1_2vxxa"] +[ext_resource type="PackedScene" uid="uid://155hlphgft66" path="res://scenes/open_shift_scene.tscn" id="2_o2nb0"] + +[node name="Node" type="Node"] +script = ExtResource("1_2vxxa") + +[node name="Open Shift Scene" parent="." instance=ExtResource("2_o2nb0")] diff --git a/scripts/adventurer.gd b/scripts/adventurer.gd index 79385fc..72f1986 100644 --- a/scripts/adventurer.gd +++ b/scripts/adventurer.gd @@ -192,3 +192,32 @@ func generate_appearance(features=null) -> void: #appearance.eye_type = randi_range(0,len(job.portrait.eye_types) - 1) appearance.skin.color = AdventurerPortrait.random_color(ColorVariant.Types.SKIN) changed.emit() + +func save_inventory() -> Dictionary: + return {} + +func save_equipment() -> Dictionary: + return {} + +func save() -> Dictionary: + var dict = {} + dict.name = [given_name, surname] + dict.gender = gender + dict.gold = gold + if quest: + dict.quest = quest.id + dict.exp = exp + dict.level = level + dict.appearance = appearance.duplicate() + dict.stats = stats.duplicate() + dict.life = [life, max_life] + dict.energy = [energy, max_energy] + #TODO: Prepare for more on these later + dict.job = {} + dict.abilities = {} + dict.inventory = save_inventory() + dict.equipment = save_equipment() + return dict + +func load(dict : Dictionary) -> void: + return diff --git a/scripts/adventurer_portrait.gd b/scripts/adventurer_portrait.gd index 0058235..714da8e 100644 --- a/scripts/adventurer_portrait.gd +++ b/scripts/adventurer_portrait.gd @@ -29,7 +29,7 @@ func set_appearance(appearance) -> void: set_color(ColorVariant.Types.EYES, appearance.eyes.color) #set_color(ColorVariant.Types.EYES, appearance.eyes.type) -func get_random_appearance() -> Dictionary: +static func get_random_appearance() -> Dictionary: var app = { "hair":{ "type":"", diff --git a/scripts/game_manager.gd b/scripts/game_manager.gd index 4e50a2d..53d380e 100644 --- a/scripts/game_manager.gd +++ b/scripts/game_manager.gd @@ -5,12 +5,14 @@ var player : Player = null var panel : GamePanel = null var player_profile : Window = null var quest_log : QuestLog = null -var top_menu : TopMenu = null +var menu : GameMenu = null var open : bool = false var end_shift_confirmation : ConfirmationDialog var end_shift_confirm_template = preload("res://templates/end_shift_confirmation.tscn") var player_profile_template = preload("res://templates/player_profile_window.tscn") var last_screenshot : Image +var shifts : Array[float] = [] +var current_shift = -1 func _ready() -> void: player_data = Adventurer.new() Quest.load_quest_list() @@ -46,10 +48,14 @@ func toggle_player_profile(): add_child(player_profile) player_profile.setup(player.data) +func start_shift(shift_num) -> void: + current_shift = shift_num + panel.reset_timer(shifts[shift_num]) func end_shift() -> void: take_screenshot() - open = false + open = !open + start_shift(wrap(current_shift+1, 0, len(shifts))) if player_profile != null: toggle_player_profile() panel.switch_panel(open) @@ -66,7 +72,7 @@ func end_shift() -> void: #window.per Guild.hall.process_mode = Node.PROCESS_MODE_DISABLED Guild.hall.visible = false - top_menu.hide() + menu.hide() panel.get_parent().global_position = Vector2i(5,5) window.size = Vector2i(415,700) panel.populate_quest_views() @@ -86,26 +92,30 @@ func test_save() -> void: take_screenshot() var save_dict = { "savetime": Time.get_datetime_string_from_system(), - "screenshot": last_screenshot + "screenshot": last_screenshot.save_png_to_buffer().hex_encode() } #Save the guild data save_dict["guildname"] = Guild.name save_dict["guildlevel"] = Guild.level #Save the player data if player: - save_dict["playername"] = player.data.full_name() - save_dict["playerlevel"] = player.data.level + save_dict.player = player.save() #Save the employee data #Save the adventurer data + var members = Guild.save_members() + if len(members) > 0: + save_dict.members = members #Save the quest data - #Save the quest progress + var quests = Guild.save_quests() + if len(quests) > 0: + save_dict.quests = quests var save_file = FileAccess.open("user://savefile.save", FileAccess.WRITE) - save_file.store_line(JSON.stringify(save_dict)) + save_file.store_line(JSON.stringify(save_dict, "\t")) func get_savefile_data(filename : String) -> Dictionary: var load_file = FileAccess.open("user://" + filename, FileAccess.READ) var json = JSON.new() - var json_string = load_file.get_line() + var json_string = load_file.get_as_text() var parse_result = json.parse(json_string) if not parse_result == OK: printerr("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line()) @@ -114,14 +124,7 @@ func get_savefile_data(filename : String) -> Dictionary: var ss : String = json.data.screenshot #print(ss.data) image.load_png_from_buffer(ss.hex_decode()) - var data_dict = { - "playername": json.data.playername, - "playerlevel": json.data.playerlevel, - "guildname": json.data.guildname, - "guildlevel": json.data.guildlevel, - "savetime": json.data.savetime, - "screenshot": image - } + var data_dict = json.data.duplicate_deep() return data_dict func test_load(filename : String) -> void: diff --git a/scripts/top_menu.gd b/scripts/game_menu.gd similarity index 96% rename from scripts/top_menu.gd rename to scripts/game_menu.gd index aa04b20..13e2b4e 100644 --- a/scripts/top_menu.gd +++ b/scripts/game_menu.gd @@ -1,4 +1,4 @@ -class_name TopMenu extends Control +class_name GameMenu extends Control const member_panel_entry_template = preload("res://templates/member_panel_entry.tscn") const quest_panel_entry_template = preload("res://templates/quest_panel_entry.tscn") @@ -9,7 +9,7 @@ const guild_info_window_template = preload("res://templates/guild_info_window.ts @onready var quest_list = %QuestList @onready var quests = %Quests func _ready() -> void: - Game.top_menu = self + Game.menu = self func hide_submenus() -> void: members.visible = false diff --git a/scripts/top_menu.gd.uid b/scripts/game_menu.gd.uid similarity index 100% rename from scripts/top_menu.gd.uid rename to scripts/game_menu.gd.uid diff --git a/scripts/main_panel.gd b/scripts/game_panel.gd similarity index 97% rename from scripts/main_panel.gd rename to scripts/game_panel.gd index eee046e..1cc4140 100644 --- a/scripts/main_panel.gd +++ b/scripts/game_panel.gd @@ -40,7 +40,6 @@ func switch_panel(active : bool) -> void: %OpenShift.visible = active %WorkingShift.visible = !active %QuestView.visible = !active - %Timer.start(300 if active else 1500) audioplayer.play() func _on_show_quests_pressed() -> void: @@ -59,6 +58,11 @@ func connect_visitor_spawner(spawner : VisitorSpawner) -> void: func update_visitor_count(current : int, total : int) -> void: %OpenList/VisitorsLabel.text = "Visitors: %d/%d" % [current, total] +func reset_timer(time : float) -> void: + timer.start(time) + if timer.paused: + timer.paused = false + func populate_quest_views() -> void: var count : int = 0 for quest in Guild.quests: diff --git a/scripts/main_panel.gd.uid b/scripts/game_panel.gd.uid similarity index 100% rename from scripts/main_panel.gd.uid rename to scripts/game_panel.gd.uid diff --git a/scripts/guild.gd b/scripts/guild.gd index 2ae7bcd..947b9f0 100644 --- a/scripts/guild.gd +++ b/scripts/guild.gd @@ -57,7 +57,7 @@ func _ready() -> void: func register_guild_member(member : Adventurer, first : bool = false) -> void: members.append(member) - Game.top_menu.add_member(member) + Game.menu.add_member(member) changed.emit() if first: Game.notice("%s has joined the guild!" % member.name, 5) @@ -69,13 +69,25 @@ func has_guild_member(member : Adventurer) -> bool: func add_quest(quest : Quest) -> void: quests[quest] = false - Game.top_menu.add_quest(quest) + Game.menu.add_quest(quest) #Game.quest_log.add_entry(quest) func assign_quest(member : Adventurer, quest : Quest) -> void: member.assign_quest(quest) quests[quest] = true #Mark it as active +func save_members() -> Array: + var array : Array[Dictionary] = [] + for member in members: + array.append(member.save()) + return array + +func save_quests() -> Array: + var array : Array[Dictionary] = [] + for quest in quests: + array.append(quest.save()) + return array + func spawn_visitor(pos : Vector2) -> void: var data : Adventurer = visitors["test"].data.instantiate() var sprite : AdventurerSprite = visitors["test"].sprite.instantiate() diff --git a/scripts/map_cloud.gd b/scripts/map_cloud.gd new file mode 100644 index 0000000..1e3b67a --- /dev/null +++ b/scripts/map_cloud.gd @@ -0,0 +1,26 @@ +extends NinePatchRect + +var max_displacement : float = 50 +var speed : float = 10 +var move_dir : Vector2 +var start_position : Vector2 + + +func _ready() -> void: + start_position = position + move_dir = Vector2.UP.rotated(randf() * 2 * PI) + +func _process(delta: float) -> void: + var offset = (position - start_position).length() / max_displacement + var turn = randf_range(-PI / 6.0, PI / 6.0) * offset + var a_dir = move_dir.rotated(turn) + var b_dir = move_dir.rotated(-turn) + var ap = position + speed * delta * a_dir + var bp = position + speed * delta * b_dir + var mpsq = max_displacement * max_displacement + if ap.distance_squared_to(start_position) < mpsq: + position = ap + move_dir = a_dir + else: + position = bp + move_dir = b_dir diff --git a/scripts/map_cloud.gd.uid b/scripts/map_cloud.gd.uid new file mode 100644 index 0000000..ba1af03 --- /dev/null +++ b/scripts/map_cloud.gd.uid @@ -0,0 +1 @@ +uid://bhahhdhn3a7kr diff --git a/scripts/player.gd b/scripts/player.gd index 4ebf1d1..3f13234 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -83,3 +83,9 @@ func try_interact(obj : Interactable) -> void: func interact(obj : Interactable) -> void: obj.interact(self) + +func save() -> Dictionary: + return data.save() + +func load(dict : Dictionary) -> void: + return diff --git a/scripts/portrait_customizer.gd b/scripts/portrait_customizer.gd index 79cab8c..b769c66 100644 --- a/scripts/portrait_customizer.gd +++ b/scripts/portrait_customizer.gd @@ -13,7 +13,7 @@ func _ready() -> void: if Game.player_data.appearance.size() != 0: appearance = Game.player_data.appearance else: - appearance = portrait.get_random_appearance() + appearance = AdventurerPortrait.get_random_appearance() portrait.set_appearance(appearance) choices.resize(portrait.option_sets.size()) choices.fill(0) @@ -73,5 +73,5 @@ func _on_accept_button_pressed() -> void: func _on_random_button_pressed() -> void: - appearance = portrait.get_random_appearance() + appearance = AdventurerPortrait.get_random_appearance() portrait.set_appearance(appearance) diff --git a/scripts/test_scene.gd b/scripts/test_scene.gd index a05c2f3..731b886 100644 --- a/scripts/test_scene.gd +++ b/scripts/test_scene.gd @@ -1,8 +1,10 @@ -extends Node2D +extends Node var test_adv = preload("res://templates/test_adventurer.tscn") var test_item = preload("res://data/items/pitchfork.tres") @onready var door_player : AudioStreamPlayer = $AudioStreamPlayer func _ready() -> void: + Game.shifts = [600, 600, 600] + Game.start_shift(0) #var adv : Adventurer = test_adv.instantiate() as Adventurer #Guild.register_guild_member(adv) var lst = Quest.list @@ -11,8 +13,10 @@ func _ready() -> void: Guild.add_quest(quest) Guild.assign_quest(Game.player.data, quest) var itm = test_item.duplicate() + Game.player.data.appearance = AdventurerPortrait.get_random_appearance() Game.player.data.pickup_item(itm) Game.player.data.move_item(Vector2(0,0), Vector2(1,0)) + Game.open = true #Game.end_shift() #var tween = create_tween() #tween.tween_interval(3) diff --git a/templates/main_panel.tscn b/templates/game_panel.tscn similarity index 95% rename from templates/main_panel.tscn rename to templates/game_panel.tscn index 49c31d7..b683439 100644 --- a/templates/main_panel.tscn +++ b/templates/game_panel.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=10 format=3 uid="uid://c8ofw6na082gv"] -[ext_resource type="Script" uid="uid://dhw85vqlvw33s" path="res://scripts/main_panel.gd" id="1_pdekv"] +[ext_resource type="Script" uid="uid://dhw85vqlvw33s" path="res://scripts/game_panel.gd" id="1_pdekv"] [ext_resource type="Script" uid="uid://4jrp67ckp7vt" path="res://scripts/timer_label.gd" id="2_5rs2c"] [ext_resource type="StyleBox" uid="uid://by1jk8r2avjp4" path="res://styles/open_shift_panel.tres" id="2_b7y1i"] [ext_resource type="Texture2D" uid="uid://bwaiuy7yf7tu3" path="res://graphics/ui/time-frame.png" id="3_7oi8q"] @@ -21,7 +21,7 @@ corner_radius_bottom_right = 3 corner_radius_bottom_left = 3 corner_detail = 5 -[node name="MainPanel" type="MarginContainer"] +[node name="GamePanel" type="MarginContainer"] offset_right = 401.0 offset_bottom = 853.0 theme_override_constants/margin_left = 0 @@ -220,6 +220,8 @@ layout_mode = 2 stream = ExtResource("6_osxme") volume_db = -10.31 +[connection signal="time_changed" from="." to="VBoxContainer/OpenShift/Margin/OpenList/TimerLabel" method="_on_time_changed"] +[connection signal="time_changed" from="." to="VBoxContainer/WorkingShift/MarginContainer/WorkingList/TimerLabel" method="_on_time_changed"] [connection signal="pressed" from="VBoxContainer/OpenShift/TextureButton" to="." method="_on_options_button_pressed"] [connection signal="pressed" from="VBoxContainer/OpenShift/Margin/OpenList/Button" to="." method="_on_end_shift_pressed"] [connection signal="gui_input" from="VBoxContainer/WorkingShift/DragRegion" to="." method="_on_drag_region_gui_input"] diff --git a/templates/passive_panel.tscn b/templates/passive_panel.tscn index e9faf03..2897bb9 100644 --- a/templates/passive_panel.tscn +++ b/templates/passive_panel.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3 uid="uid://tbf3tvn8m54l"] -[ext_resource type="Script" uid="uid://dhw85vqlvw33s" path="res://scripts/main_panel.gd" id="1_sihtn"] +[ext_resource type="Script" uid="uid://dhw85vqlvw33s" path="res://scripts/game_panel.gd" id="1_sihtn"] [ext_resource type="Script" uid="uid://4jrp67ckp7vt" path="res://scripts/timer_label.gd" id="2_xnrrg"] [node name="PanelContainer" type="PanelContainer"] diff --git a/templates/top_menu.tscn b/templates/top_menu.tscn index 8078533..a0fa23a 100644 --- a/templates/top_menu.tscn +++ b/templates/top_menu.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=16 format=3 uid="uid://c7jagw4y7w42l"] [ext_resource type="Texture2D" uid="uid://c0e0iw8osv0qh" path="res://graphics/top-icon-members.png" id="1_krxmy"] -[ext_resource type="Script" uid="uid://wyv0gt0ww6fp" path="res://scripts/top_menu.gd" id="1_o3fau"] +[ext_resource type="Script" uid="uid://wyv0gt0ww6fp" path="res://scripts/game_menu.gd" id="1_o3fau"] [ext_resource type="Texture2D" uid="uid://hc1lmivi4bjs" path="res://graphics/top-icon-members-hover.png" id="2_370kg"] [ext_resource type="Texture2D" uid="uid://w8xkghjv3t6r" path="res://graphics/shelf.png" id="2_hoboc"] [ext_resource type="Texture2D" uid="uid://dkb0bhk4t15fh" path="res://graphics/guild-mopt.png" id="2_kvelj"] @@ -16,7 +16,7 @@ [ext_resource type="Texture2D" uid="uid://cnrqig3gojcls" path="res://graphics/options-mopt.png" id="10_acyux"] [ext_resource type="Texture2D" uid="uid://dupdvrthv3edd" path="res://graphics/options-mopt-hover.png" id="11_xu0sb"] -[node name="TopMenu" type="Control"] +[node name="GameMenu" type="Control"] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -152,6 +152,7 @@ text = "Generate Quest" unique_name_in_owner = true visible = false layout_mode = 1 +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 offset_left = 4.0