Compare commits

..

No commits in common. "c50f8d55a80d8d21cb11c30a40a177b2e31b1dcd" and "646c232cae0fc974328e4187fac6bc2b2f727d58" have entirely different histories.

52 changed files with 191 additions and 920 deletions

View file

@ -1,24 +0,0 @@
# Roses
## Description
Create dragons and share them with other people.
Each dragon you create gets shared with other people and might appear on their computer screens if they leave the game open.
## The Team
> Arnau Martín - Art\
> Gerard Gascón - Design & Programming
## Game Jam
Sant Jordi Jam 2025 — April 1st - 22rd 2025 (22 days)
## Theme
Llegenda & Diada
## Languages
Catalan

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://75txlqcp2ucn"
path="res://.godot/imported/add-dragon-highlight.png-41898f9ae3ddfd659db8c4c2156b7366.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/add-dragon-highlight.png"
dest_files=["res://.godot/imported/add-dragon-highlight.png-41898f9ae3ddfd659db8c4c2156b7366.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d1k808702cbcw"
path="res://.godot/imported/add-dragon-press.png-c99d82582f293aaa68e11e2fb02f49e4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/add-dragon-press.png"
dest_files=["res://.godot/imported/add-dragon-press.png-c99d82582f293aaa68e11e2fb02f49e4.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bbd3p787bmg3m"
path="res://.godot/imported/add-dragon.png-82a36ce738cebfeaa5078dd6de9b9710.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/add-dragon.png"
dest_files=["res://.godot/imported/add-dragon.png-82a36ce738cebfeaa5078dd6de9b9710.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bawbgis3cgdtu"
path="res://.godot/imported/close-game-highlight.png-d5a62a31259194975f113b7db6f17522.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/close-game-highlight.png"
dest_files=["res://.godot/imported/close-game-highlight.png-d5a62a31259194975f113b7db6f17522.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ci7cb3kgavax4"
path="res://.godot/imported/close-game.png-618d96e50398df2aacb8d97f2ab8cd43.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/close-game.png"
dest_files=["res://.godot/imported/close-game.png-618d96e50398df2aacb8d97f2ab8cd43.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bsn66gnb08x3u"
path="res://.godot/imported/close-highlight.png-d2d70664d421cc9f61c93ef9f90c069e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/close-highlight.png"
dest_files=["res://.godot/imported/close-highlight.png-d2d70664d421cc9f61c93ef9f90c069e.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d2n43pu0wvplp"
path="res://.godot/imported/close.png-d7ca0d1188fa83b8e622fa244178a0f6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/close.png"
dest_files=["res://.godot/imported/close.png-d7ca0d1188fa83b8e622fa244178a0f6.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dygetjxbcktef"
path="res://.godot/imported/decor-highlight.png-9b5ad6a0540ee53d254b9a4a15150c52.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/decor-highlight.png"
dest_files=["res://.godot/imported/decor-highlight.png-9b5ad6a0540ee53d254b9a4a15150c52.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dlm0degcpvyoj"
path="res://.godot/imported/decor.png-de7850a4843df5838869c155e4907674.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/decor.png"
dest_files=["res://.godot/imported/decor.png-de7850a4843df5838869c155e4907674.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://btw3cpkp5bgi"
path="res://.godot/imported/direction-highlight.png-7d25bf093f6d01a02053d2a979b60e1a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/direction-highlight.png"
dest_files=["res://.godot/imported/direction-highlight.png-7d25bf093f6d01a02053d2a979b60e1a.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dwm2bfuamf3bp"
path="res://.godot/imported/direction.png-7ec8f15c88bcc88a9f6ec11e5e752aa9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/direction.png"
dest_files=["res://.godot/imported/direction.png-7ec8f15c88bcc88a9f6ec11e5e752aa9.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://emm3gwb5fuqo"
path="res://.godot/imported/dragon-list-highlight.png-94c8866c0da9b8252b4e4bead07f7b0a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/dragon-list-highlight.png"
dest_files=["res://.godot/imported/dragon-list-highlight.png-94c8866c0da9b8252b4e4bead07f7b0a.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cpdhhhdmh5n58"
path="res://.godot/imported/dragon-list.png-95bf8cf726fb5913cfced32d642f1f0b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/dragon-list.png"
dest_files=["res://.godot/imported/dragon-list.png-95bf8cf726fb5913cfced32d642f1f0b.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b3wp7cawhj5eb"
path="res://.godot/imported/hat-highlight.png-65adb88f36a43086e02f9a1b64f2e661.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/hat-highlight.png"
dest_files=["res://.godot/imported/hat-highlight.png-65adb88f36a43086e02f9a1b64f2e661.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cwkegj7oj8rok"
path="res://.godot/imported/hat.png-528b2fe285d169f682f5e9bbd49089b1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/hat.png"
dest_files=["res://.godot/imported/hat.png-528b2fe285d169f682f5e9bbd49089b1.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b6latlr2mhm37"
path="res://.godot/imported/shirt-highlight.png-4d733325207d4ec944e0fdc5d829e49d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/shirt-highlight.png"
dest_files=["res://.godot/imported/shirt-highlight.png-4d733325207d4ec944e0fdc5d829e49d.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dr2d4jv6bxghn"
path="res://.godot/imported/shirt.png-33a1880ffc494f6f0e6b5f79f5b9b650.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/buttons/shirt.png"
dest_files=["res://.godot/imported/shirt.png-33a1880ffc494f6f0e6b5f79f5b9b650.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

View file

@ -9,7 +9,7 @@ custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="" include_filter=""
exclude_filter="" exclude_filter=""
export_path="../../Builds/SantJordiJam25/La Torreta del Drac.exe" export_path="../../Builds/SantJordiJam25/LaPlacetaDelDrac.exe"
patches=PackedStringArray() patches=PackedStringArray()
encryption_include_filters="" encryption_include_filters=""
encryption_exclude_filters="" encryption_exclude_filters=""
@ -22,7 +22,7 @@ script_export_mode=2
custom_template/debug="" custom_template/debug=""
custom_template/release="" custom_template/release=""
debug/export_console_wrapper=1 debug/export_console_wrapper=0
binary_format/embed_pck=true binary_format/embed_pck=true
texture_format/s3tc_bptc=true texture_format/s3tc_bptc=true
texture_format/etc2_astc=false texture_format/etc2_astc=false
@ -64,45 +64,3 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'" Remove-Item -Recurse -Force '{temp_dir}'"
[preset.1]
name="Linux"
platform="Linux"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../../Builds/SantJordiJam25/La Torreta del Drac.x86_64"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.1.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://vt266gxkfb5j"
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.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

View file

@ -15,7 +15,7 @@ run/main_scene="uid://ctytpqaed0yqx"
config/features=PackedStringArray("4.4", "GL Compatibility") config/features=PackedStringArray("4.4", "GL Compatibility")
boot_splash/bg_color=Color(0.14, 0.14, 0.14, 0) boot_splash/bg_color=Color(0.14, 0.14, 0.14, 0)
boot_splash/show_image=false boot_splash/show_image=false
config/icon="uid://vt266gxkfb5j" config/icon="res://assets/sprites/icon.svg"
[display] [display]

View file

@ -1,4 +1,4 @@
extends TextureButton extends Button
@export var dragon_editor: PackedScene @export var dragon_editor: PackedScene
@ -8,7 +8,6 @@ extends TextureButton
func _on_button_up() -> void: func _on_button_up() -> void:
var editor: DragonEditor = dragon_editor.instantiate() var editor: DragonEditor = dragon_editor.instantiate()
editor.set_save_load(base._save_load)
editor.on_create_dragon.connect(base.add_dragon) editor.on_create_dragon.connect(base.add_dragon)
var window_position: Vector2i = DisplayServer.window_get_position() var window_position: Vector2i = DisplayServer.window_get_position()

View file

@ -11,18 +11,16 @@ class_name DragonEditor
@export var decor_outfits: DragonOutfit @export var decor_outfits: DragonOutfit
@export var dragon_colors: DragonOutfit @export var dragon_colors: DragonOutfit
var _save_load: SaveLoad var _save_load: SaveLoad = SaveLoad.new()
@onready var dragon_name: LineEdit = $CanvasLayer/NameLabel/LineEdit @onready var dragon_name: LineEdit = $CanvasLayer/NameLabel/LineEdit
@onready var dragger: DraggableWindow = $CanvasLayer/Dragger @onready var dragger: DraggableWindow = $CanvasLayer/Dragger
signal on_create_dragon(properties: DragonProperties) signal on_create_dragon(properties: DragonProperties)
func set_save_load(save_load: SaveLoad):
_save_load = save_load
func _ready() -> void: func _ready() -> void:
_save_load.load()
hat.visible = false hat.visible = false
shirt.visible = false shirt.visible = false
decor.visible = false decor.visible = false

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=28 format=3 uid="uid://fut42ruut302"] [gd_scene load_steps=24 format=3 uid="uid://fut42ruut302"]
[ext_resource type="Script" uid="uid://bfuos2kgfgber" path="res://scenes/dragon_editor/dragon_editor.gd" id="1_8vkll"] [ext_resource type="Script" uid="uid://bfuos2kgfgber" path="res://scenes/dragon_editor/dragon_editor.gd" id="1_8vkll"]
[ext_resource type="SpriteFrames" uid="uid://ccxyplt2t7t6y" path="res://assets/animations/hats/barretina.tres" id="2_aystc"] [ext_resource type="SpriteFrames" uid="uid://ccxyplt2t7t6y" path="res://assets/animations/hats/barretina.tres" id="2_aystc"]
@ -8,32 +8,44 @@
[ext_resource type="Resource" uid="uid://c03ejnvavmcj5" path="res://assets/outfits/dragons.tres" id="5_1ivi1"] [ext_resource type="Resource" uid="uid://c03ejnvavmcj5" path="res://assets/outfits/dragons.tres" id="5_1ivi1"]
[ext_resource type="SpriteFrames" uid="uid://c5rqqy7b5ihi5" path="res://assets/animations/decor/rosa.tres" id="6_c4sli"] [ext_resource type="SpriteFrames" uid="uid://c5rqqy7b5ihi5" path="res://assets/animations/decor/rosa.tres" id="6_c4sli"]
[ext_resource type="Texture2D" uid="uid://dceoy4417v83e" path="res://assets/sprites/ui/DP_UI_CharCreation_BG.png" id="6_udwtk"] [ext_resource type="Texture2D" uid="uid://dceoy4417v83e" path="res://assets/sprites/ui/DP_UI_CharCreation_BG.png" id="6_udwtk"]
[ext_resource type="Script" uid="uid://dxl7onk7x6h8b" path="res://src/draggable.gd" id="7_1vw8k"] [ext_resource type="Script" path="res://src/draggable.gd" id="7_1vw8k"]
[ext_resource type="Texture2D" uid="uid://bu5xa7tgfk3h3" path="res://assets/sprites/ui/DP_UI_Buttons01.png" id="7_qppok"]
[ext_resource type="Texture2D" uid="uid://bgpbbkmwt8ysq" path="res://assets/sprites/ui/DP_UI_Button_Text.png" id="8_ofxsr"] [ext_resource type="Texture2D" uid="uid://bgpbbkmwt8ysq" path="res://assets/sprites/ui/DP_UI_Button_Text.png" id="8_ofxsr"]
[ext_resource type="Texture2D" uid="uid://dr2d4jv6bxghn" path="res://assets/sprites/ui/buttons/shirt.png" id="12_hukd7"]
[ext_resource type="Texture2D" uid="uid://bdrm1nxydvf5t" path="res://assets/sprites/ui/DP_UI_Label_Big.png" id="12_qppok"] [ext_resource type="Texture2D" uid="uid://bdrm1nxydvf5t" path="res://assets/sprites/ui/DP_UI_Label_Big.png" id="12_qppok"]
[ext_resource type="Texture2D" uid="uid://b6latlr2mhm37" path="res://assets/sprites/ui/buttons/shirt-highlight.png" id="13_6eo4l"]
[ext_resource type="Texture2D" uid="uid://cwkegj7oj8rok" path="res://assets/sprites/ui/buttons/hat.png" id="13_aystc"]
[ext_resource type="Texture2D" uid="uid://dlm0degcpvyoj" path="res://assets/sprites/ui/buttons/decor.png" id="13_mc14k"]
[ext_resource type="FontFile" uid="uid://u1pey2ilx31c" path="res://assets/fonts/Montjuic.ttf" id="14_1vw8k"] [ext_resource type="FontFile" uid="uid://u1pey2ilx31c" path="res://assets/fonts/Montjuic.ttf" id="14_1vw8k"]
[ext_resource type="SpriteFrames" uid="uid://duxxw4mfxql3c" path="res://assets/animations/dragons/verd.tres" id="14_aystc"] [ext_resource type="SpriteFrames" uid="uid://duxxw4mfxql3c" path="res://assets/animations/dragons/verd.tres" id="14_aystc"]
[ext_resource type="StyleBox" uid="uid://bhe580k04w6ve" path="res://assets/styles/style_box_empty.tres" id="14_bh8dj"] [ext_resource type="StyleBox" uid="uid://bhe580k04w6ve" path="res://assets/styles/style_box_empty.tres" id="14_bh8dj"]
[ext_resource type="Texture2D" uid="uid://dygetjxbcktef" path="res://assets/sprites/ui/buttons/decor-highlight.png" id="14_jtpn4"]
[ext_resource type="FontFile" uid="uid://5nniov81t44i" path="res://assets/fonts/m3x6.ttf" id="14_rrp4v"] [ext_resource type="FontFile" uid="uid://5nniov81t44i" path="res://assets/fonts/m3x6.ttf" id="14_rrp4v"]
[ext_resource type="Texture2D" uid="uid://b3wp7cawhj5eb" path="res://assets/sprites/ui/buttons/hat-highlight.png" id="14_x0448"]
[ext_resource type="SpriteFrames" uid="uid://dsxhfu2ekw7j" path="res://assets/animations/shirts/traje.tres" id="15_x0448"] [ext_resource type="SpriteFrames" uid="uid://dsxhfu2ekw7j" path="res://assets/animations/shirts/traje.tres" id="15_x0448"]
[ext_resource type="Texture2D" uid="uid://dwm2bfuamf3bp" path="res://assets/sprites/ui/buttons/direction.png" id="18_xxrn0"]
[ext_resource type="Texture2D" uid="uid://btw3cpkp5bgi" path="res://assets/sprites/ui/buttons/direction-highlight.png" id="19_q2c4g"] [sub_resource type="AtlasTexture" id="AtlasTexture_ofxsr"]
[ext_resource type="Texture2D" uid="uid://d2n43pu0wvplp" path="res://assets/sprites/ui/buttons/close.png" id="21_c4sli"] atlas = ExtResource("7_qppok")
[ext_resource type="Texture2D" uid="uid://bsn66gnb08x3u" path="res://assets/sprites/ui/buttons/close-highlight.png" id="22_xxrn0"] region = Rect2(0, 40, 38, 40)
[sub_resource type="AtlasTexture" id="AtlasTexture_bh8dj"]
atlas = ExtResource("7_qppok")
region = Rect2(0, 80, 38, 40)
[sub_resource type="AtlasTexture" id="AtlasTexture_1vw8k"]
atlas = ExtResource("7_qppok")
region = Rect2(0, 0, 38, 40)
[sub_resource type="AtlasTexture" id="AtlasTexture_rrp4v"]
atlas = ExtResource("7_qppok")
region = Rect2(0, 120, 38, 40)
[sub_resource type="AtlasTexture" id="AtlasTexture_mc14k"] [sub_resource type="AtlasTexture" id="AtlasTexture_mc14k"]
atlas = ExtResource("8_ofxsr") atlas = ExtResource("8_ofxsr")
region = Rect2(0, 0, 62, 24) region = Rect2(0, 0, 62, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_kohpo"]
atlas = ExtResource("7_qppok")
region = Rect2(0, 160, 38, 40)
[node name="DragonEditor" type="Window"] [node name="DragonEditor" type="Window"]
transparent_bg = true transparent_bg = true
title = "Dragon Editor" title = "Dragon Editor"
position = Vector2i(0, 36)
size = Vector2i(230, 332) size = Vector2i(230, 332)
unresizable = true unresizable = true
borderless = true borderless = true
@ -78,61 +90,51 @@ offset_right = 198.0
offset_bottom = 320.0 offset_bottom = 320.0
script = ExtResource("7_1vw8k") script = ExtResource("7_1vw8k")
[node name="change_shirt" type="TextureButton" parent="CanvasLayer"] [node name="change_hat" type="Button" parent="CanvasLayer"]
offset_left = 88.0 offset_left = 48.0
offset_top = 54.0 offset_top = 38.0
offset_right = 128.0 offset_right = 94.0
offset_bottom = 94.0 offset_bottom = 86.0
texture_normal = ExtResource("12_hukd7") focus_mode = 0
texture_pressed = ExtResource("13_6eo4l") icon = SubResource("AtlasTexture_ofxsr")
texture_hover = ExtResource("13_6eo4l") flat = true
texture_disabled = ExtResource("12_hukd7")
texture_focused = ExtResource("12_hukd7")
[node name="change_hat" type="TextureButton" parent="CanvasLayer"] [node name="change_shirt" type="Button" parent="CanvasLayer"]
offset_left = 52.0 offset_left = 84.0
offset_top = 42.0 offset_top = 50.0
offset_right = 92.0 offset_right = 130.0
offset_bottom = 82.0 offset_bottom = 98.0
texture_normal = ExtResource("13_aystc") focus_mode = 0
texture_pressed = ExtResource("14_x0448") icon = SubResource("AtlasTexture_bh8dj")
texture_hover = ExtResource("14_x0448") flat = true
texture_disabled = ExtResource("13_aystc")
texture_focused = ExtResource("13_aystc")
[node name="change_decor" type="TextureButton" parent="CanvasLayer"] [node name="change_shoes" type="Button" parent="CanvasLayer"]
offset_left = 124.0 offset_left = 120.0
offset_top = 42.0 offset_top = 38.0
offset_right = 164.0 offset_right = 166.0
offset_bottom = 82.0 offset_bottom = 86.0
texture_normal = ExtResource("13_mc14k") focus_mode = 0
texture_pressed = ExtResource("14_jtpn4") icon = SubResource("AtlasTexture_1vw8k")
texture_hover = ExtResource("14_jtpn4") flat = true
texture_disabled = ExtResource("13_mc14k")
texture_focused = ExtResource("13_mc14k")
[node name="dragon_next" type="TextureButton" parent="CanvasLayer"] [node name="dragon_previous" type="Button" parent="CanvasLayer"]
offset_left = 138.0 offset_left = 76.0
offset_top = 140.0 offset_top = 136.0
offset_right = 178.0 offset_right = 122.0
offset_bottom = 180.0 offset_bottom = 184.0
texture_normal = ExtResource("18_xxrn0") scale = Vector2(-1, 1)
texture_pressed = ExtResource("19_q2c4g") focus_mode = 0
texture_hover = ExtResource("19_q2c4g") icon = SubResource("AtlasTexture_rrp4v")
texture_disabled = ExtResource("18_xxrn0") flat = true
texture_focused = ExtResource("18_xxrn0")
[node name="dragon_previous" type="TextureButton" parent="CanvasLayer"] [node name="dragon_next" type="Button" parent="CanvasLayer"]
offset_left = 34.0 offset_left = 134.0
offset_top = 140.0 offset_top = 136.0
offset_right = 74.0 offset_right = 180.0
offset_bottom = 180.0 offset_bottom = 184.0
texture_normal = ExtResource("18_xxrn0") focus_mode = 0
texture_pressed = ExtResource("19_q2c4g") icon = SubResource("AtlasTexture_rrp4v")
texture_hover = ExtResource("19_q2c4g") flat = true
texture_disabled = ExtResource("18_xxrn0")
texture_focused = ExtResource("18_xxrn0")
flip_h = true
[node name="create" type="Button" parent="CanvasLayer"] [node name="create" type="Button" parent="CanvasLayer"]
offset_left = 112.0 offset_left = 112.0
@ -155,16 +157,14 @@ theme_override_font_sizes/font_size = 33
text = "crea" text = "crea"
horizontal_alignment = 1 horizontal_alignment = 1
[node name="close" type="TextureButton" parent="CanvasLayer"] [node name="close" type="Button" parent="CanvasLayer"]
offset_left = 182.0 offset_left = 178.0
offset_top = 10.0 offset_top = 6.0
offset_right = 222.0 offset_right = 224.0
offset_bottom = 50.0 offset_bottom = 54.0
texture_normal = ExtResource("21_c4sli") focus_mode = 0
texture_pressed = ExtResource("22_xxrn0") icon = SubResource("AtlasTexture_kohpo")
texture_hover = ExtResource("22_xxrn0") flat = true
texture_disabled = ExtResource("21_c4sli")
texture_focused = ExtResource("21_c4sli")
[node name="NameLabel" type="TextureRect" parent="CanvasLayer"] [node name="NameLabel" type="TextureRect" parent="CanvasLayer"]
offset_left = 34.0 offset_left = 34.0
@ -184,15 +184,15 @@ theme_override_font_sizes/font_size = 28
theme_override_styles/focus = ExtResource("14_bh8dj") theme_override_styles/focus = ExtResource("14_bh8dj")
placeholder_text = "NOM" placeholder_text = "NOM"
alignment = 1 alignment = 1
max_length = 9 max_length = 8
flat = true flat = true
caret_blink = true caret_blink = true
[connection signal="close_requested" from="." to="." method="_on_close_requested"] [connection signal="close_requested" from="." to="." method="_on_close_requested"]
[connection signal="pressed" from="CanvasLayer/change_shirt" to="." method="_on_change_shirt_pressed"]
[connection signal="pressed" from="CanvasLayer/change_hat" to="." method="_on_change_hat_pressed"] [connection signal="pressed" from="CanvasLayer/change_hat" to="." method="_on_change_hat_pressed"]
[connection signal="pressed" from="CanvasLayer/change_decor" to="." method="_on_change_shoes_pressed"] [connection signal="pressed" from="CanvasLayer/change_shirt" to="." method="_on_change_shirt_pressed"]
[connection signal="pressed" from="CanvasLayer/dragon_next" to="." method="_on_next_color_pressed"] [connection signal="pressed" from="CanvasLayer/change_shoes" to="." method="_on_change_shoes_pressed"]
[connection signal="pressed" from="CanvasLayer/dragon_previous" to="." method="_on_previous_color_pressed"] [connection signal="pressed" from="CanvasLayer/dragon_previous" to="." method="_on_previous_color_pressed"]
[connection signal="pressed" from="CanvasLayer/dragon_next" to="." method="_on_next_color_pressed"]
[connection signal="pressed" from="CanvasLayer/create" to="." method="_on_create_pressed"] [connection signal="pressed" from="CanvasLayer/create" to="." method="_on_create_pressed"]
[connection signal="pressed" from="CanvasLayer/close" to="." method="_on_close_pressed"] [connection signal="pressed" from="CanvasLayer/close" to="." method="_on_close_pressed"]

View file

@ -1,14 +1,10 @@
[gd_scene load_steps=10 format=3 uid="uid://cq3orf2ktmel0"] [gd_scene load_steps=6 format=3 uid="uid://cq3orf2ktmel0"]
[ext_resource type="SpriteFrames" uid="uid://duxxw4mfxql3c" path="res://assets/animations/dragons/verd.tres" id="1_o3jkx"] [ext_resource type="SpriteFrames" uid="uid://duxxw4mfxql3c" path="res://assets/animations/dragons/verd.tres" id="1_o3jkx"]
[ext_resource type="Script" uid="uid://b7knkhjgtdy4l" path="res://scenes/dragon_list/dragon/dragon_list_entry.gd" id="2_uckob"] [ext_resource type="Script" uid="uid://b7knkhjgtdy4l" path="res://scenes/dragon_list/dragon/dragon_list_entry.gd" id="2_uckob"]
[ext_resource type="SpriteFrames" uid="uid://ccxyplt2t7t6y" path="res://assets/animations/hats/barretina.tres" id="3_jl6px"] [ext_resource type="SpriteFrames" uid="uid://ccxyplt2t7t6y" path="res://assets/animations/hats/barretina.tres" id="3_jl6px"]
[ext_resource type="Resource" uid="uid://c03ejnvavmcj5" path="res://assets/outfits/dragons.tres" id="3_jpsrj"]
[ext_resource type="Resource" uid="uid://x063x858re3f" path="res://assets/outfits/hats.tres" id="4_58xh2"]
[ext_resource type="SpriteFrames" uid="uid://dsxhfu2ekw7j" path="res://assets/animations/shirts/traje.tres" id="4_v3rc7"] [ext_resource type="SpriteFrames" uid="uid://dsxhfu2ekw7j" path="res://assets/animations/shirts/traje.tres" id="4_v3rc7"]
[ext_resource type="Resource" uid="uid://bsydervvb1jpe" path="res://assets/outfits/shirts.tres" id="5_6mheo"]
[ext_resource type="SpriteFrames" uid="uid://c5rqqy7b5ihi5" path="res://assets/animations/decor/rosa.tres" id="5_jpsrj"] [ext_resource type="SpriteFrames" uid="uid://c5rqqy7b5ihi5" path="res://assets/animations/decor/rosa.tres" id="5_jpsrj"]
[ext_resource type="Resource" uid="uid://dkm7d10c1lp2n" path="res://assets/outfits/decor.tres" id="6_dtw4b"]
[node name="Dragon" type="AnimatedSprite2D" node_paths=PackedStringArray("color", "hat", "shirt", "decor")] [node name="Dragon" type="AnimatedSprite2D" node_paths=PackedStringArray("color", "hat", "shirt", "decor")]
sprite_frames = ExtResource("1_o3jkx") sprite_frames = ExtResource("1_o3jkx")
@ -18,10 +14,6 @@ color = NodePath(".")
hat = NodePath("Hat") hat = NodePath("Hat")
shirt = NodePath("Shirt") shirt = NodePath("Shirt")
decor = NodePath("Decor") decor = NodePath("Decor")
color_outfits = ExtResource("3_jpsrj")
hat_outfits = ExtResource("4_58xh2")
shirt_outfits = ExtResource("5_6mheo")
decor_outfits = ExtResource("6_dtw4b")
[node name="Hat" type="AnimatedSprite2D" parent="."] [node name="Hat" type="AnimatedSprite2D" parent="."]
sprite_frames = ExtResource("3_jl6px") sprite_frames = ExtResource("3_jl6px")

View file

@ -7,36 +7,20 @@ class_name DragonListEntry
@export var shirt: AnimatedSprite2D @export var shirt: AnimatedSprite2D
@export var decor: AnimatedSprite2D @export var decor: AnimatedSprite2D
@export var color_outfits: DragonOutfit
@export var hat_outfits: DragonOutfit
@export var shirt_outfits: DragonOutfit
@export var decor_outfits: DragonOutfit
func play_animation(anim: String):
func play_animation(anim: String) -> void:
if color.sprite_frames != null:
color.set_frame(0) color.set_frame(0)
color.play(anim) color.play(anim)
if hat.sprite_frames != null:
hat.set_frame(0) hat.set_frame(0)
hat.play(anim) hat.play(anim)
if shirt.sprite_frames != null:
shirt.set_frame(0) shirt.set_frame(0)
shirt.play(anim) shirt.play(anim)
if decor.sprite_frames != null:
decor.set_frame(0) decor.set_frame(0)
decor.play(anim) decor.play(anim)
func face_direction(left: bool) -> void: func face_direction(left: bool):
color.flip_h = not left color.flip_h = not left
hat.flip_h = not left hat.flip_h = not left
shirt.flip_h = not left shirt.flip_h = not left
decor.flip_h = not left decor.flip_h = not left
func dress(properties: DragonProperties) -> void:
color.sprite_frames = color_outfits.get_texture(properties.color)
hat.sprite_frames = hat_outfits.get_texture(properties.hat)
shirt.sprite_frames = shirt_outfits.get_texture(properties.shirt)
decor.sprite_frames = decor_outfits.get_texture(properties.decor)

View file

@ -1,20 +1,24 @@
[gd_scene load_steps=12 format=3 uid="uid://tubxrqxjic6r"] [gd_scene load_steps=10 format=3 uid="uid://tubxrqxjic6r"]
[ext_resource type="Script" uid="uid://dm8d0ikf1n8qa" path="res://scenes/dragon_list/dragon_list_view.gd" id="1_q7g8i"] [ext_resource type="Script" uid="uid://dm8d0ikf1n8qa" path="res://scenes/dragon_list/dragon_list_view.gd" id="1_q7g8i"]
[ext_resource type="PackedScene" uid="uid://cq3orf2ktmel0" path="res://scenes/dragon_list/dragon/dragon.tscn" id="2_h4iwm"] [ext_resource type="PackedScene" uid="uid://cq3orf2ktmel0" path="res://scenes/dragon_list/dragon/dragon.tscn" id="2_h4iwm"]
[ext_resource type="Texture2D" uid="uid://cup2lrb8lou72" path="res://assets/sprites/ui/DP_UI_CharList_BG.png" id="4_f227k"]
[ext_resource type="Texture2D" uid="uid://d27vpp71fe4de" path="res://assets/sprites/ui/DP_UI_CharList_Frame.png" id="6_74fyi"] [ext_resource type="Texture2D" uid="uid://d27vpp71fe4de" path="res://assets/sprites/ui/DP_UI_CharList_Frame.png" id="6_74fyi"]
[ext_resource type="Texture2D" uid="uid://dwm2bfuamf3bp" path="res://assets/sprites/ui/buttons/direction.png" id="8_1n46k"]
[ext_resource type="FontFile" uid="uid://u1pey2ilx31c" path="res://assets/fonts/Montjuic.ttf" id="8_74fyi"] [ext_resource type="FontFile" uid="uid://u1pey2ilx31c" path="res://assets/fonts/Montjuic.ttf" id="8_74fyi"]
[ext_resource type="Script" uid="uid://dxl7onk7x6h8b" path="res://src/draggable.gd" id="8_b7eir"] [ext_resource type="Script" path="res://src/draggable.gd" id="8_b7eir"]
[ext_resource type="Texture2D" uid="uid://d2n43pu0wvplp" path="res://assets/sprites/ui/buttons/close.png" id="9_1n46k"]
[ext_resource type="Texture2D" uid="uid://bdrm1nxydvf5t" path="res://assets/sprites/ui/DP_UI_Label_Big.png" id="9_cv2ce"] [ext_resource type="Texture2D" uid="uid://bdrm1nxydvf5t" path="res://assets/sprites/ui/DP_UI_Label_Big.png" id="9_cv2ce"]
[ext_resource type="Texture2D" uid="uid://btw3cpkp5bgi" path="res://assets/sprites/ui/buttons/direction-highlight.png" id="9_u20w8"] [ext_resource type="Texture2D" uid="uid://bu5xa7tgfk3h3" path="res://assets/sprites/ui/DP_UI_Buttons01.png" id="9_k4ppc"]
[ext_resource type="Texture2D" uid="uid://bsn66gnb08x3u" path="res://assets/sprites/ui/buttons/close-highlight.png" id="10_u20w8"]
[sub_resource type="AtlasTexture" id="AtlasTexture_1n46k"]
atlas = ExtResource("9_k4ppc")
region = Rect2(0, 120, 38, 40)
[sub_resource type="AtlasTexture" id="AtlasTexture_u20w8"]
atlas = ExtResource("9_k4ppc")
region = Rect2(0, 160, 38, 40)
[node name="DragonList" type="Window" node_paths=PackedStringArray("dragon_list_pivot", "origin_name_label", "dragon_name_label")] [node name="DragonList" type="Window" node_paths=PackedStringArray("dragon_list_pivot", "origin_name_label", "dragon_name_label")]
transparent_bg = true transparent_bg = true
size = Vector2i(344, 332) size = Vector2i(300, 332)
unresizable = true unresizable = true
borderless = true borderless = true
always_on_top = true always_on_top = true
@ -27,6 +31,13 @@ dragon_name_label = NodePath("CanvasLayer/NameLabel/Label")
[node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="ColorRect" type="ColorRect" parent="CanvasLayer"]
offset_left = 22.0
offset_top = 38.0
offset_right = 296.0
offset_bottom = 308.0
color = Color(0.176471, 0.227451, 0.239216, 1)
[node name="Background" type="NinePatchRect" parent="CanvasLayer"] [node name="Background" type="NinePatchRect" parent="CanvasLayer"]
offset_left = 18.0 offset_left = 18.0
offset_top = 32.0 offset_top = 32.0
@ -38,16 +49,11 @@ patch_margin_top = 32
patch_margin_right = 32 patch_margin_right = 32
patch_margin_bottom = 32 patch_margin_bottom = 32
[node name="TextureRect" type="TextureRect" parent="CanvasLayer"]
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("4_f227k")
[node name="TowerNameLabel" type="NinePatchRect" parent="CanvasLayer"] [node name="TowerNameLabel" type="NinePatchRect" parent="CanvasLayer"]
offset_left = 40.0 offset_left = 34.0
offset_top = 51.0 offset_top = 50.0
offset_right = 290.0 offset_right = 284.0
offset_bottom = 99.0 offset_bottom = 98.0
texture = ExtResource("9_cv2ce") texture = ExtResource("9_cv2ce")
patch_margin_left = 74 patch_margin_left = 74
patch_margin_right = 74 patch_margin_right = 74
@ -65,9 +71,9 @@ horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="NameLabel" type="TextureRect" parent="CanvasLayer"] [node name="NameLabel" type="TextureRect" parent="CanvasLayer"]
offset_left = 94.0 offset_left = 89.0
offset_top = 228.0 offset_top = 228.0
offset_right = 242.0 offset_right = 237.0
offset_bottom = 276.0 offset_bottom = 276.0
texture = ExtResource("9_cv2ce") texture = ExtResource("9_cv2ce")
@ -94,53 +100,47 @@ script = ExtResource("8_b7eir")
[node name="SubViewportContainer" type="SubViewportContainer" parent="CanvasLayer"] [node name="SubViewportContainer" type="SubViewportContainer" parent="CanvasLayer"]
offset_left = 24.0 offset_left = 24.0
offset_top = 105.0 offset_top = 105.0
offset_right = 306.0 offset_right = 224.0
offset_bottom = 213.0 offset_bottom = 213.0
[node name="SubViewport" type="SubViewport" parent="CanvasLayer/SubViewportContainer"] [node name="SubViewport" type="SubViewport" parent="CanvasLayer/SubViewportContainer"]
transparent_bg = true transparent_bg = true
handle_input_locally = false handle_input_locally = false
size = Vector2i(282, 108) size = Vector2i(270, 108)
render_target_update_mode = 4 render_target_update_mode = 4
[node name="Pivot" type="Node2D" parent="CanvasLayer/SubViewportContainer/SubViewport"] [node name="Pivot" type="Node2D" parent="CanvasLayer/SubViewportContainer/SubViewport"]
position = Vector2(143, 54) position = Vector2(135, 54)
[node name="dragon_next" type="TextureButton" parent="CanvasLayer"] [node name="dragon_previous" type="Button" parent="CanvasLayer"]
offset_left = 198.0 offset_left = 127.0
offset_top = 140.0 offset_top = 136.0
offset_right = 238.0 offset_right = 173.0
offset_bottom = 180.0 offset_bottom = 184.0
texture_normal = ExtResource("8_1n46k") scale = Vector2(-1, 1)
texture_pressed = ExtResource("9_u20w8") focus_mode = 0
texture_hover = ExtResource("9_u20w8") icon = SubResource("AtlasTexture_1n46k")
texture_disabled = ExtResource("8_1n46k") flat = true
texture_focused = ExtResource("8_1n46k")
[node name="dragon_previous" type="TextureButton" parent="CanvasLayer"] [node name="dragon_next" type="Button" parent="CanvasLayer"]
offset_left = 94.0 offset_left = 185.0
offset_top = 140.0 offset_top = 136.0
offset_right = 134.0 offset_right = 231.0
offset_bottom = 180.0 offset_bottom = 184.0
texture_normal = ExtResource("8_1n46k") focus_mode = 0
texture_pressed = ExtResource("9_u20w8") icon = SubResource("AtlasTexture_1n46k")
texture_hover = ExtResource("9_u20w8") flat = true
texture_disabled = ExtResource("8_1n46k")
texture_focused = ExtResource("8_1n46k")
flip_h = true
[node name="close" type="TextureButton" parent="CanvasLayer"] [node name="close" type="Button" parent="CanvasLayer"]
offset_left = 296.0 offset_left = 264.0
offset_top = 10.0 offset_top = 12.0
offset_right = 336.0 offset_right = 310.0
offset_bottom = 50.0 offset_bottom = 60.0
texture_normal = ExtResource("9_1n46k") focus_mode = 0
texture_pressed = ExtResource("10_u20w8") icon = SubResource("AtlasTexture_u20w8")
texture_hover = ExtResource("10_u20w8") flat = true
texture_disabled = ExtResource("9_1n46k")
texture_focused = ExtResource("9_1n46k")
[connection signal="close_requested" from="." to="." method="_on_close_requested"] [connection signal="close_requested" from="." to="." method="_on_close_requested"]
[connection signal="pressed" from="CanvasLayer/dragon_next" to="." method="_on_dragon_next_pressed"]
[connection signal="pressed" from="CanvasLayer/dragon_previous" to="." method="_on_dragon_previous_pressed"] [connection signal="pressed" from="CanvasLayer/dragon_previous" to="." method="_on_dragon_previous_pressed"]
[connection signal="pressed" from="CanvasLayer/dragon_next" to="." method="_on_dragon_next_pressed"]
[connection signal="pressed" from="CanvasLayer/close" to="." method="_on_close_pressed"] [connection signal="pressed" from="CanvasLayer/close" to="." method="_on_close_pressed"]

View file

@ -35,7 +35,6 @@ func set_library(library: DragonLibrary):
func _instantiate_dragon(dragon: DragonProperties, offset_step: int): func _instantiate_dragon(dragon: DragonProperties, offset_step: int):
var instance: DragonListEntry = dragon_list_entry_template.instantiate() var instance: DragonListEntry = dragon_list_entry_template.instantiate()
instance.dress(dragon)
dragon_list_pivot.add_child(instance) dragon_list_pivot.add_child(instance)
instance.position.x += offset_step * 110 instance.position.x += offset_step * 110
_dragons.push_back(instance) _dragons.push_back(instance)

View file

@ -1,4 +1,4 @@
extends TextureButton extends Button
@export var dragon_list: PackedScene @export var dragon_list: PackedScene

View file

@ -63,7 +63,7 @@ func _instantiate_random_dragon():
return return
var r = rng.randi_range(0, 99) var r = rng.randi_range(0, 99)
if r >= 30: if r < 30:
_instantiate_dragon_from_internet(spot) _instantiate_dragon_from_internet(spot)
else: else:
_instantiate_dragon_from_library(spot) _instantiate_dragon_from_library(spot)

View file

@ -1,24 +1,17 @@
[gd_scene load_steps=20 format=3 uid="uid://ctytpqaed0yqx"] [gd_scene load_steps=13 format=3 uid="uid://ctytpqaed0yqx"]
[ext_resource type="Script" uid="uid://3kyt3shje5r1" path="res://scenes/main.gd" id="1_sugp2"] [ext_resource type="Script" uid="uid://3kyt3shje5r1" path="res://scenes/main.gd" id="1_sugp2"]
[ext_resource type="PackedScene" uid="uid://c7nfcgjxqeg7l" path="res://scenes/window/dragon_popup.tscn" id="2_jyhfs"] [ext_resource type="PackedScene" uid="uid://c7nfcgjxqeg7l" path="res://scenes/window/dragon_popup.tscn" id="2_jyhfs"]
[ext_resource type="PackedScene" uid="uid://miutbdsgccd1" path="res://scenes/dragons/dragon.tscn" id="4_jyhfs"] [ext_resource type="PackedScene" uid="uid://miutbdsgccd1" path="res://scenes/dragons/dragon.tscn" id="4_jyhfs"]
[ext_resource type="Script" uid="uid://cj4l3a6a8ro0r" path="res://scenes/create_button.gd" id="4_tbgi4"] [ext_resource type="Script" uid="uid://cj4l3a6a8ro0r" path="res://scenes/create_button.gd" id="4_tbgi4"]
[ext_resource type="PackedScene" uid="uid://cdlipr8l1k38a" path="res://scenes/name_setter/name_setter.tscn" id="4_trceg"] [ext_resource type="PackedScene" uid="uid://cdlipr8l1k38a" path="res://scenes/name_setter/name_setter.tscn" id="4_trceg"]
[ext_resource type="Texture2D" uid="uid://bbd3p787bmg3m" path="res://assets/sprites/ui/buttons/add-dragon.png" id="5_jkv2x"]
[ext_resource type="PackedScene" uid="uid://fut42ruut302" path="res://scenes/dragon_editor/dragon_editor.tscn" id="5_tefeu"] [ext_resource type="PackedScene" uid="uid://fut42ruut302" path="res://scenes/dragon_editor/dragon_editor.tscn" id="5_tefeu"]
[ext_resource type="Texture2D" uid="uid://d1k808702cbcw" path="res://assets/sprites/ui/buttons/add-dragon-press.png" id="6_muem4"]
[ext_resource type="Texture2D" uid="uid://75txlqcp2ucn" path="res://assets/sprites/ui/buttons/add-dragon-highlight.png" id="7_dp3eg"]
[ext_resource type="Texture2D" uid="uid://ci7cb3kgavax4" path="res://assets/sprites/ui/buttons/close-game.png" id="8_jbj1t"]
[ext_resource type="Script" uid="uid://oc6mw86npbii" path="res://scenes/list_button.gd" id="9_choun"] [ext_resource type="Script" uid="uid://oc6mw86npbii" path="res://scenes/list_button.gd" id="9_choun"]
[ext_resource type="Texture2D" uid="uid://cpdhhhdmh5n58" path="res://assets/sprites/ui/buttons/dragon-list.png" id="9_muem4"]
[ext_resource type="PackedScene" uid="uid://tubxrqxjic6r" path="res://scenes/dragon_list/dragon_list.tscn" id="10_ya4ey"] [ext_resource type="PackedScene" uid="uid://tubxrqxjic6r" path="res://scenes/dragon_list/dragon_list.tscn" id="10_ya4ey"]
[ext_resource type="Texture2D" uid="uid://emm3gwb5fuqo" path="res://assets/sprites/ui/buttons/dragon-list-highlight.png" id="12_dp3eg"]
[ext_resource type="Texture2D" uid="uid://bawbgis3cgdtu" path="res://assets/sprites/ui/buttons/close-game-highlight.png" id="15_0ld40"]
[ext_resource type="Texture2D" uid="uid://bc2lykc3gwykh" path="res://assets/sprites/environment/castle/DP_castle_back.png" id="15_muem4"] [ext_resource type="Texture2D" uid="uid://bc2lykc3gwykh" path="res://assets/sprites/environment/castle/DP_castle_back.png" id="15_muem4"]
[ext_resource type="Texture2D" uid="uid://o1e8lge2vuqu" path="res://assets/sprites/environment/castle/DP_castle_mid.png" id="16_dp3eg"] [ext_resource type="Texture2D" uid="uid://o1e8lge2vuqu" path="res://assets/sprites/environment/castle/DP_castle_mid.png" id="16_dp3eg"]
[ext_resource type="Texture2D" uid="uid://b1w6y1qvetsaw" path="res://assets/sprites/environment/castle/DP_castle_front.png" id="17_0ld40"] [ext_resource type="Texture2D" uid="uid://b1w6y1qvetsaw" path="res://assets/sprites/environment/castle/DP_castle_front.png" id="17_0ld40"]
[ext_resource type="Script" uid="uid://bg58e3dobon4j" path="res://scenes/dragon_sharing.gd" id="17_muem4"] [ext_resource type="Script" path="res://scenes/dragon_sharing.gd" id="17_muem4"]
[node name="Base" type="Node2D" node_paths=PackedStringArray("dragon_spots", "dragon_start_spots")] [node name="Base" type="Node2D" node_paths=PackedStringArray("dragon_spots", "dragon_start_spots")]
script = ExtResource("1_sugp2") script = ExtResource("1_sugp2")
@ -36,43 +29,46 @@ max_dragon_instantiation_time = 600.0
[node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="Create" type="TextureButton" parent="CanvasLayer"] [node name="Create" type="Button" parent="CanvasLayer"]
offset_left = 535.0 anchors_preset = 1
offset_top = 42.0 anchor_left = 1.0
offset_right = 575.0 anchor_right = 1.0
offset_bottom = 82.0 offset_left = -585.0
texture_normal = ExtResource("5_jkv2x") offset_top = 11.0
texture_pressed = ExtResource("7_dp3eg") offset_right = -543.0
texture_hover = ExtResource("7_dp3eg") offset_bottom = 42.0
texture_disabled = ExtResource("6_muem4") grow_horizontal = 0
texture_focused = ExtResource("5_jkv2x") focus_mode = 0
text = "crea"
script = ExtResource("4_tbgi4") script = ExtResource("4_tbgi4")
dragon_editor = ExtResource("5_tefeu") dragon_editor = ExtResource("5_tefeu")
[node name="List" type="TextureButton" parent="CanvasLayer"] [node name="Close" type="Button" parent="CanvasLayer"]
offset_left = 535.0 anchors_preset = 1
offset_top = 82.0 anchor_left = 1.0
offset_right = 575.0 anchor_right = 1.0
offset_bottom = 122.0 offset_left = -525.0
texture_normal = ExtResource("9_muem4") offset_top = 12.0
texture_pressed = ExtResource("12_dp3eg") offset_right = -474.0
texture_hover = ExtResource("12_dp3eg") offset_bottom = 43.0
texture_disabled = ExtResource("9_muem4") grow_horizontal = 0
texture_focused = ExtResource("9_muem4") focus_mode = 0
text = "tanca"
[node name="List" type="Button" parent="CanvasLayer"]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -456.0
offset_top = 14.0
offset_right = -411.0
offset_bottom = 45.0
grow_horizontal = 0
focus_mode = 0
text = "llista"
script = ExtResource("9_choun") script = ExtResource("9_choun")
dragon_list = ExtResource("10_ya4ey") dragon_list = ExtResource("10_ya4ey")
[node name="Close" type="TextureButton" parent="CanvasLayer"]
offset_left = 535.0
offset_top = 122.0
offset_right = 575.0
offset_bottom = 162.0
texture_normal = ExtResource("8_jbj1t")
texture_pressed = ExtResource("15_0ld40")
texture_hover = ExtResource("15_0ld40")
texture_disabled = ExtResource("8_jbj1t")
texture_focused = ExtResource("8_jbj1t")
[node name="Castle" type="Node2D" parent="."] [node name="Castle" type="Node2D" parent="."]
[node name="DpCastleBack" type="Sprite2D" parent="Castle"] [node name="DpCastleBack" type="Sprite2D" parent="Castle"]
@ -113,6 +109,6 @@ script = ExtResource("17_muem4")
[connection signal="tree_entered" from="." to="." method="_on_tree_entered"] [connection signal="tree_entered" from="." to="." method="_on_tree_entered"]
[connection signal="tree_exiting" from="." to="." method="_on_tree_exiting"] [connection signal="tree_exiting" from="." to="." method="_on_tree_exiting"]
[connection signal="pressed" from="CanvasLayer/Create" to="CanvasLayer/Create" method="_on_button_up"] [connection signal="button_up" from="CanvasLayer/Create" to="CanvasLayer/Create" method="_on_button_up"]
[connection signal="pressed" from="CanvasLayer/List" to="CanvasLayer/List" method="_on_pressed"]
[connection signal="pressed" from="CanvasLayer/Close" to="." method="_on_close_pressed"] [connection signal="pressed" from="CanvasLayer/Close" to="." method="_on_close_pressed"]
[connection signal="pressed" from="CanvasLayer/List" to="CanvasLayer/List" method="_on_pressed"]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://cdlipr8l1k38a"] [gd_scene load_steps=8 format=3 uid="uid://cdlipr8l1k38a"]
[ext_resource type="Script" uid="uid://drulv5ptupx2w" path="res://scenes/name_setter/name_setter.gd" id="1_f3gk5"] [ext_resource type="Script" uid="uid://drulv5ptupx2w" path="res://scenes/name_setter/name_setter.gd" id="1_f3gk5"]
[ext_resource type="Texture2D" uid="uid://d27vpp71fe4de" path="res://assets/sprites/ui/DP_UI_CharList_Frame.png" id="2_wkl5f"] [ext_resource type="Texture2D" uid="uid://d27vpp71fe4de" path="res://assets/sprites/ui/DP_UI_CharList_Frame.png" id="2_wkl5f"]
@ -6,7 +6,6 @@
[ext_resource type="FontFile" uid="uid://u1pey2ilx31c" path="res://assets/fonts/Montjuic.ttf" id="3_fjxtl"] [ext_resource type="FontFile" uid="uid://u1pey2ilx31c" path="res://assets/fonts/Montjuic.ttf" id="3_fjxtl"]
[ext_resource type="Texture2D" uid="uid://bdrm1nxydvf5t" path="res://assets/sprites/ui/DP_UI_Label_Big.png" id="3_rlhj7"] [ext_resource type="Texture2D" uid="uid://bdrm1nxydvf5t" path="res://assets/sprites/ui/DP_UI_Label_Big.png" id="3_rlhj7"]
[ext_resource type="StyleBox" uid="uid://bhe580k04w6ve" path="res://assets/styles/style_box_empty.tres" id="4_fjxtl"] [ext_resource type="StyleBox" uid="uid://bhe580k04w6ve" path="res://assets/styles/style_box_empty.tres" id="4_fjxtl"]
[ext_resource type="FontFile" uid="uid://5nniov81t44i" path="res://assets/fonts/m3x6.ttf" id="7_crfd2"]
[sub_resource type="AtlasTexture" id="AtlasTexture_27shg"] [sub_resource type="AtlasTexture" id="AtlasTexture_27shg"]
atlas = ExtResource("3_1ipfa") atlas = ExtResource("3_1ipfa")
@ -84,16 +83,4 @@ focus_mode = 0
icon = SubResource("AtlasTexture_27shg") icon = SubResource("AtlasTexture_27shg")
flat = true flat = true
[node name="Label" type="Label" parent="create"]
layout_mode = 0
offset_left = 6.0
offset_top = -2.0
offset_right = 64.0
offset_bottom = 26.0
theme_override_colors/font_color = Color(0.537255, 0.603922, 0.615686, 1)
theme_override_fonts/font = ExtResource("7_crfd2")
theme_override_font_sizes/font_size = 33
text = "crea"
horizontal_alignment = 1
[connection signal="pressed" from="create" to="." method="_on_submit_pressed"] [connection signal="pressed" from="create" to="." method="_on_submit_pressed"]

View file

@ -31,10 +31,6 @@ func pick_previous() -> SpriteFrames:
return _pick_non_nullable() return _pick_non_nullable()
func _get_array_index(index: int, size: int) -> int:
return ((index % size) + size) % len(outfits)
func _pick_nullable() -> SpriteFrames: func _pick_nullable() -> SpriteFrames:
_index %= (len(outfits) + 1) _index %= (len(outfits) + 1)
if _index == 0: if _index == 0:
@ -49,8 +45,6 @@ func _pick_non_nullable() -> SpriteFrames:
func get_texture(index: int) -> SpriteFrames: func get_texture(index: int) -> SpriteFrames:
if not allow_null:
index = _get_array_index(index, len(outfits))
if index < 0 or index >= len(outfits): if index < 0 or index >= len(outfits):
return null return null