1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-05-05 13:34:48 -04:00

Basic drag and drop functionality

Admittedly, I accidentally followed a far more simpler tutorial, but it works.
This commit is contained in:
Tony Bark 2023-12-07 07:28:32 -05:00
parent 8979422160
commit 9b849376ae
45 changed files with 127 additions and 711 deletions

View file

@ -11,20 +11,17 @@ config_version=5
[application]
config/name="Zack's Dress Up"
run/main_scene="res://scenes/dress_up.tscn"
config/version="1.3.100a"
run/main_scene="res://scenes/game.tscn"
config/use_custom_user_dir=true
config/features=PackedStringArray("4.0")
config/features=PackedStringArray("4.2")
boot_splash/bg_color=Color(0.8, 0.8, 0.4, 1)
boot_splash/image="res://icon.png"
config/icon="res://icon.png"
config/macos_native_icon="res://icon.icns"
config/windows_native_icon="res://icon.ico"
name_sv="Tonys klä upp"
[autoload]
GameData="*res://scripts/autoload/game_data.gd"
GameEvents="*res://scripts/autoload/game_events.gd"
[debug]
gdscript/completion/autocomplete_setters_and_getters=true

View file

@ -7,6 +7,7 @@
[ext_resource type="Texture2D" uid="uid://cardxswmgbmbv" path="res://sprites/clothes/owo_censor.svg" id="5"]
[ext_resource type="Texture2D" uid="uid://dnwdyi2d46hsm" path="res://sprites/character/eyes/eyes1.png" id="6"]
[ext_resource type="Texture2D" uid="uid://cbr37emgh11is" path="res://sprites/character/eyes/eyes2.png" id="7"]
[ext_resource type="Script" path="res://scripts/clothing/clothing.gd" id="7_58p8d"]
[ext_resource type="Texture2D" uid="uid://ceifal0sxn0r7" path="res://sprites/character/eyes/eyes3.png" id="8"]
[ext_resource type="Texture2D" uid="uid://dujbine82hf7h" path="res://sprites/character/eyes/eyes4.png" id="9"]
[ext_resource type="Texture2D" uid="uid://cbptix4hhenyv" path="res://sprites/character/eyes/eyes5.png" id="10"]
@ -28,7 +29,6 @@
[ext_resource type="Texture2D" uid="uid://cp4oe0dv4st1w" path="res://sprites/clothes/blank_top.png" id="26"]
[ext_resource type="Texture2D" uid="uid://cpf6yh6fqqxy1" path="res://sprites/character/character_base_head.svg" id="27"]
[ext_resource type="Texture2D" uid="uid://bw7u6fgygd8t" path="res://sprites/character/mouth/mouth11.png" id="28"]
[ext_resource type="Script" path="res://scripts/character.gd" id="29"]
[sub_resource type="SpriteFrames" id="1"]
animations = [{
@ -122,7 +122,6 @@ animations = [{
[node name="Character" type="Node2D"]
position = Vector2(-19, -92)
script = ExtResource("29")
[node name="Click" type="AudioStreamPlayer" parent="."]
stream = ExtResource("24")
@ -130,6 +129,7 @@ stream = ExtResource("24")
[node name="Shadow" type="Sprite2D" parent="."]
position = Vector2(4.84271, 244.714)
texture = ExtResource("1")
metadata/_edit_lock_ = true
[node name="Body" type="Node2D" parent="."]
@ -137,47 +137,42 @@ texture = ExtResource("1")
position = Vector2(-33.7592, 99.4079)
scale = Vector2(0.927713, 1)
sprite_frames = SubResource("1")
frame_progress = 0.642539
metadata/_edit_lock_ = true
[node name="Legs" type="Sprite2D" parent="Body"]
position = Vector2(1.47027, 191.868)
[node name="Bottom" type="TextureRect" parent="Body"]
offset_left = -54.0
offset_top = 132.0
offset_right = 57.0
offset_bottom = 257.0
texture = ExtResource("5")
script = ExtResource("7_58p8d")
metadata/_edit_lock_ = true
[node name="Top" type="Sprite2D" parent="Body"]
position = Vector2(7, 78)
[node name="Top" type="TextureRect" parent="Body"]
offset_left = -39.0
offset_top = 25.0
offset_right = 54.0
offset_bottom = 135.0
texture = ExtResource("25")
metadata/_edit_lock_ = true
[node name="Head" type="Sprite2D" parent="Body"]
position = Vector2(10.6805, -25.1047)
texture = ExtResource("27")
metadata/_edit_lock_ = true
[node name="Eyes" type="AnimatedSprite2D" parent="Body/Head"]
position = Vector2(17.6857, 4.22147)
sprite_frames = SubResource("2")
frame = 4
frame_progress = 0.55981
[node name="Mouth" type="AnimatedSprite2D" parent="Body/Head"]
position = Vector2(38.1195, 8.68453)
sprite_frames = SubResource("3")
frame = 2
frame_progress = 0.679866
[node name="Accessory" type="Sprite2D" parent="Body"]
position = Vector2(9.54095, 73.0832)
texture = ExtResource("26")
[node name="Controls" type="CanvasLayer" parent="."]
[node name="Container" type="Control" parent="Controls"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -19.0
offset_top = -92.0
offset_right = -19.0
offset_bottom = -92.0
[node name="ExportWin" type="FileDialog" parent="Controls/Container"]
access = 1
[node name="ImportWin" type="FileDialog" parent="Controls/Container"]
access = 1
metadata/_edit_lock_ = true

View file

@ -1,9 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/accessory_base.gd" type="Script" id=2]
[node name="accessoryBase" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_accessory_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/bottoms_base.gd" type="Script" id=2]
[node name="bottomsBase" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_bottoms_pressed"]

View file

@ -1,18 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scripts/clothing/clothing_base.gd" type="Script" id=1]
[ext_resource path="res://sounds/select_001.ogg" type="AudioStream" id=2]
[node name="baseClothing" type="TextureButton"]
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -694.0
offset_bottom = -488.0
custom_minimum_size = Vector2( 106, 112 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="select" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 2 )

View file

@ -1,9 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[node name="topsBase" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scripts/clothing/undies_base.gd" type="Script" id=1]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=2]
[node name="baseClothing" instance=ExtResource( 2 )]
script = ExtResource( 1 )
[connection signal="pressed" from="." to="." method="_on_undies_pressed"]

View file

@ -1,12 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scenes/clothing/base/accessory_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://sprites/clothes/camera.png" type="Texture2D" id=2]
[node name="camera" instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
offset_right = 0.0
offset_bottom = 0.0
custom_minimum_size = Vector2( 0, 0 )
texture_normal = ExtResource( 2 )

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/bottoms_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/beat_up_jeans.svg" type="Texture2D" id=3]
[node name="beatUpJeans" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_bottoms_pressed"]

View file

@ -1,15 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://sprites/clothes/blue_camo_jeans.svg" type="Texture2D" id=1]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=2]
[ext_resource path="res://scripts/clothing/bottoms_base.gd" type="Script" id=3]
[node name="camoJeans" instance=ExtResource( 2 )]
texture_normal = ExtResource( 1 )
script = ExtResource( 3 )
[connection signal="pressed" from="." to="." method="_on_bottoms_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/bottoms_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/dj_shorts.svg" type="Texture2D" id=3]
[node name="camoJeans" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_bottoms_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/bottoms_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/formal_skirt.svg" type="Texture2D" id=3]
[node name="formalSkirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_bottoms_pressed"]

View file

@ -1,13 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/bottoms_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/jeans.svg" type="Texture2D" id=3]
[node name="jeans" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_bottoms_pressed"]

View file

@ -1,13 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/bottoms_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/blue_skirt.svg" type="Texture2D" id=3]
[node name="skirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_bottoms_pressed"]

View file

@ -1,12 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://sprites/clothes/sweat_pants.svg" type="Texture2D" id=1]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=2]
[ext_resource path="res://scripts/clothing/bottoms_base.gd" type="Script" id=3]
[node name="sweatPants" instance=ExtResource( 2 )]
texture_normal = ExtResource( 1 )
script = ExtResource( 3 )
[connection signal="pressed" from="." to="." method="_on_bottoms_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/atomic_shirt.svg" type="Texture2D" id=3]
[node name="atomicShirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/dj_shirt.png" type="Texture2D" id=3]
[node name="djShirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/fullsnack_shirt.svg" type="Texture2D" id=3]
[node name="fullsnackShirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/korm_shirt.png" type="Texture2D" id=3]
[node name="kormShirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/nl_jacket.png" type="Texture2D" id=3]
[node name="nlShirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,12 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/raw_shirt.svg" type="Texture2D" id=3]
[node name="rawShirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/nl_jacket.png" type="Texture2D" id=3]
[node name="nlShirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/skate_shirt.svg" type="Texture2D" id=3]
[node name="skateShirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/train_hoodie.svg" type="Texture2D" id=3]
[node name="trainHoodie" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/whatsnew_shirt.svg" type="Texture2D" id=3]
[node name="whatsNewShirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,10 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/clothing/base/clothing_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/clothing/tops_base.gd" type="Script" id=2]
[ext_resource path="res://sprites/clothes/z_shirt.png" type="Texture2D" id=3]
[node name="zShirt" instance=ExtResource( 1 )]
texture_normal = ExtResource( 3 )
script = ExtResource( 2 )
[connection signal="pressed" from="." to="." method="_on_tops_pressed"]

View file

@ -1,11 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://sprites/clothes/briefs.svg" type="Texture2D" id=1]
[ext_resource path="res://scenes/clothing/base/undies_base.tscn" type="PackedScene" id=2]
[node name="briefs" instance=ExtResource( 2 )]
texture_normal = ExtResource( 1 )

View file

@ -1,16 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://sprites/clothes/fundosi.svg" type="Texture2D" id=1]
[ext_resource path="res://scenes/clothing/base/undies_base.tscn" type="PackedScene" id=2]
[node name="fundosi" instance=ExtResource( 2 )]
anchor_right = 0.0
anchor_bottom = 0.0
offset_right = 0.0
offset_bottom = 0.0
custom_minimum_size = Vector2( 0, 0 )
texture_normal = ExtResource( 1 )

View file

@ -1,11 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://sprites/clothes/z_briefs.svg" type="Texture2D" id=1]
[ext_resource path="res://scenes/clothing/base/undies_base.tscn" type="PackedScene" id=2]
[node name="zBriefs" instance=ExtResource( 2 )]
texture_normal = ExtResource( 1 )

View file

@ -1,89 +0,0 @@
[gd_scene load_steps=12 format=3 uid="uid://cowj1v5ikbbcr"]
[ext_resource type="Texture2D" uid="uid://33g80p0qnfw4" path="res://sprites/world/background.svg" id="1_mkrgm"]
[ext_resource type="Texture2D" uid="uid://bi7ayrxnn7hex" path="res://sprites/clothes/icrazy_frame.svg" id="2_6ubqe"]
[ext_resource type="Texture2D" uid="uid://dteiup73cqn4o" path="res://sprites/clothes/lights.png" id="3_dv1xm"]
[ext_resource type="PackedScene" uid="uid://detf8uwimqp3v" path="res://scenes/zack_casey.tscn" id="4_62lrl"]
[ext_resource type="Script" path="res://scripts/interface.gd" id="5_2hrl4"]
[ext_resource type="PackedScene" uid="uid://crwoe1shep3qn" path="res://scenes/wardrobe.tscn" id="6_63h3o"]
[ext_resource type="Texture2D" uid="uid://c6gjshrl66tx" path="res://sprites/symbols/file-upload.svg" id="7_3o5r4"]
[ext_resource type="Texture2D" uid="uid://nm7qfemlongu" path="res://sprites/symbols/file-upload-disabled.svg" id="8_6btbd"]
[ext_resource type="Texture2D" uid="uid://dvwfmf3d8owqa" path="res://sprites/symbols/file-download.svg" id="9_k60o7"]
[ext_resource type="Texture2D" uid="uid://bqs56pcfa0uqh" path="res://sprites/symbols/file-download-disabled.svg" id="10_d8wi3"]
[ext_resource type="Texture2D" uid="uid://dgwys372lmwvh" path="res://sprites/symbols/trash.svg" id="11_pc3us"]
[node name="Game" type="Node"]
[node name="Background" type="Sprite2D" parent="."]
position = Vector2(504.046, 202.426)
texture = ExtResource("1_mkrgm")
[node name="PictureFrame" type="Sprite2D" parent="."]
position = Vector2(127.602, 111.895)
texture = ExtResource("2_6ubqe")
[node name="Light3D" type="PointLight2D" parent="PictureFrame"]
position = Vector2(35.118, -14.56)
texture = ExtResource("3_dv1xm")
[node name="Character" parent="." instance=ExtResource("4_62lrl")]
position = Vector2(141.307, 225.012)
[node name="Container" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("5_2hrl4")
version = "2"
[node name="Wardrobe" parent="Container" instance=ExtResource("6_63h3o")]
layout_mode = 0
anchors_preset = 0
anchor_left = 0.33875
anchor_top = 0.054
anchor_right = 1.05
anchor_bottom = 0.9
offset_right = 6.10352e-05
theme = null
[node name="CenterBtns" type="CenterContainer" parent="Container"]
layout_mode = 0
anchor_left = 0.35125
anchor_top = 0.78
anchor_right = 0.9925
anchor_bottom = 0.874
[node name="ButtonCtr" type="HBoxContainer" parent="Container/CenterBtns"]
layout_mode = 2
[node name="ExportBtn" type="TextureButton" parent="Container/CenterBtns/ButtonCtr"]
layout_mode = 2
tooltip_text = "Export"
texture_normal = ExtResource("7_3o5r4")
texture_disabled = ExtResource("8_6btbd")
[node name="ImportBtn" type="TextureButton" parent="Container/CenterBtns/ButtonCtr"]
layout_mode = 2
tooltip_text = "Import"
texture_normal = ExtResource("9_k60o7")
texture_disabled = ExtResource("10_d8wi3")
[node name="ClearBtn" type="TextureButton" parent="Container/CenterBtns/ButtonCtr"]
layout_mode = 2
tooltip_text = "Clear"
texture_normal = ExtResource("11_pc3us")
[node name="VersionLbl" type="Label" parent="Container"]
layout_mode = 0
anchor_left = 0.88125
anchor_top = 0.944
anchor_right = 0.9825
anchor_bottom = 0.984
text = "0.0.0"
[connection signal="pressed" from="Container/CenterBtns/ButtonCtr/ExportBtn" to="Character" method="_on_SaveBtn_pressed"]
[connection signal="pressed" from="Container/CenterBtns/ButtonCtr/ImportBtn" to="Character" method="_on_LoadBtn_pressed"]
[connection signal="pressed" from="Container/CenterBtns/ButtonCtr/ClearBtn" to="Character" method="_on_clearBtn_pressed"]

56
scenes/game.tscn Normal file
View file

@ -0,0 +1,56 @@
[gd_scene load_steps=7 format=3 uid="uid://cvr2aries2lhr"]
[ext_resource type="Texture2D" uid="uid://33g80p0qnfw4" path="res://sprites/world/background.svg" id="1_uee2i"]
[ext_resource type="Texture2D" uid="uid://bi7ayrxnn7hex" path="res://sprites/clothes/icrazy_frame.svg" id="2_n1kmf"]
[ext_resource type="Texture2D" uid="uid://dteiup73cqn4o" path="res://sprites/clothes/lights.png" id="3_bbsyl"]
[ext_resource type="Script" path="res://scripts/interface.gd" id="4_pqv2p"]
[ext_resource type="PackedScene" uid="uid://crwoe1shep3qn" path="res://scenes/wardrobe.tscn" id="5_4le6a"]
[ext_resource type="PackedScene" uid="uid://detf8uwimqp3v" path="res://scenes/character.tscn" id="6_tdil0"]
[node name="Game" type="Node"]
[node name="Background" type="Sprite2D" parent="."]
position = Vector2(504.046, 202.426)
texture = ExtResource("1_uee2i")
metadata/_edit_lock_ = true
[node name="PictureFrame" type="Sprite2D" parent="."]
position = Vector2(127.602, 111.895)
texture = ExtResource("2_n1kmf")
metadata/_edit_lock_ = true
[node name="Light3D" type="PointLight2D" parent="PictureFrame"]
position = Vector2(35.118, -14.56)
texture = ExtResource("3_bbsyl")
[node name="Container" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("4_pqv2p")
metadata/_edit_lock_ = true
[node name="Wardrobe" parent="Container" instance=ExtResource("5_4le6a")]
layout_mode = 0
anchors_preset = 0
anchor_left = 0.33875
anchor_top = 0.054
anchor_right = 1.05
anchor_bottom = 0.9
offset_right = 6.10352e-05
grow_horizontal = 1
grow_vertical = 1
[node name="VersionLbl" type="Label" parent="Container"]
layout_mode = 0
anchor_left = 0.88125
anchor_top = 0.944
anchor_right = 0.9825
anchor_bottom = 0.984
text = "0.0.0"
[node name="Character" parent="." instance=ExtResource("6_tdil0")]
position = Vector2(120, 213)

View file

@ -1,29 +1,14 @@
[gd_scene load_steps=18 format=3 uid="uid://crwoe1shep3qn"]
[gd_scene load_steps=3 format=3 uid="uid://crwoe1shep3qn"]
[ext_resource type="PackedScene" path="res://scenes/clothing/camera.tscn" id="1"]
[ext_resource type="Texture2D" uid="uid://bhgvidynd582a" path="res://sprites/clothes/retro_shirt.svg" id="2"]
[ext_resource type="PackedScene" path="res://scenes/clothing/pants/beat_Jeans.tscn" id="3"]
[ext_resource type="PackedScene" path="res://scenes/clothing/tops/skate_shirt.tscn" id="4"]
[ext_resource type="PackedScene" path="res://scenes/clothing/pants/skirt.tscn" id="5"]
[ext_resource type="PackedScene" path="res://scenes/clothing/pants/formal_skirt.tscn" id="6"]
[ext_resource type="PackedScene" path="res://scenes/clothing/pants/camoJeans.tscn" id="7"]
[ext_resource type="PackedScene" path="res://scenes/clothing/pants/dj_shorts.tscn" id="8"]
[ext_resource type="Texture2D" uid="uid://d1b07mvhon3gv" path="res://sprites/ui/x_button.svg" id="9"]
[ext_resource type="PackedScene" path="res://scenes/clothing/tops/whatsnew_shirt.tscn" id="10"]
[ext_resource type="PackedScene" path="res://scenes/clothing/tops/fullsnack_shirt.tscn" id="11"]
[ext_resource type="PackedScene" path="res://scenes/clothing/tops/rawShirt.tscn" id="12"]
[ext_resource type="Theme" path="res://resources/Game.theme" id="13"]
[ext_resource type="PackedScene" path="res://scenes/clothing/tops/atomic_shirt.tscn" id="15"]
[ext_resource type="PackedScene" path="res://scenes/clothing/pants/sweatPants.tscn" id="17"]
[ext_resource type="PackedScene" path="res://scenes/clothing/tops/retro_shirt.tscn" id="18"]
[ext_resource type="Script" path="res://scripts/wardrobe.gd" id="21"]
[ext_resource type="Script" path="res://scripts/clothing/clothing.gd" id="2_1si7t"]
[ext_resource type="Texture2D" uid="uid://405burxtvied" path="res://sprites/clothes/sweat_pants.svg" id="3_h6yd3"]
[node name="Wordrobe" type="TabContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
theme = ExtResource("13")
script = ExtResource("21")
grow_horizontal = 2
grow_vertical = 2
[node name="Pants" type="TabBar" parent="."]
layout_mode = 2
@ -39,28 +24,10 @@ size_flags_horizontal = 3
size_flags_vertical = 3
columns = 4
[node name="removePants" type="TextureButton" parent="Pants/PantsScroll/PantsGrid"]
custom_minimum_size = Vector2(0, 112)
layout_mode = 2
texture_normal = ExtResource("9")
[node name="beatUpJeans" parent="Pants/PantsScroll/PantsGrid" instance=ExtResource("3")]
layout_mode = 2
[node name="camoJeans" parent="Pants/PantsScroll/PantsGrid" instance=ExtResource("7")]
layout_mode = 2
[node name="sweatPants" parent="Pants/PantsScroll/PantsGrid" instance=ExtResource("17")]
layout_mode = 2
[node name="camoJeans2" parent="Pants/PantsScroll/PantsGrid" instance=ExtResource("8")]
layout_mode = 2
[node name="formalSkirt" parent="Pants/PantsScroll/PantsGrid" instance=ExtResource("6")]
layout_mode = 2
[node name="skirt" parent="Pants/PantsScroll/PantsGrid" instance=ExtResource("5")]
[node name="SweatPants" type="TextureRect" parent="Pants/PantsScroll/PantsGrid"]
layout_mode = 2
texture = ExtResource("3_h6yd3")
script = ExtResource("2_1si7t")
[node name="Shirts" type="TabBar" parent="."]
visible = false
@ -79,30 +46,6 @@ size_flags_horizontal = 3
size_flags_vertical = 3
columns = 4
[node name="removeShirt" type="TextureButton" parent="Shirts/ShirtsScroll/ShirtsGrid"]
custom_minimum_size = Vector2(0, 112)
layout_mode = 2
texture_normal = ExtResource("9")
[node name="atomicShirt" parent="Shirts/ShirtsScroll/ShirtsGrid" instance=ExtResource("15")]
layout_mode = 2
[node name="skateShirt" parent="Shirts/ShirtsScroll/ShirtsGrid" instance=ExtResource("4")]
layout_mode = 2
[node name="fullsnackShirt" parent="Shirts/ShirtsScroll/ShirtsGrid" instance=ExtResource("11")]
layout_mode = 2
[node name="rawShirt" parent="Shirts/ShirtsScroll/ShirtsGrid" instance=ExtResource("12")]
layout_mode = 2
[node name="whatsNewShirt" parent="Shirts/ShirtsScroll/ShirtsGrid" instance=ExtResource("10")]
layout_mode = 2
[node name="retroShirt" parent="Shirts/ShirtsScroll/ShirtsGrid" instance=ExtResource("18")]
layout_mode = 2
texture_normal = ExtResource("2")
[node name="Accessoires" type="TabBar" parent="."]
visible = false
layout_mode = 2
@ -117,14 +60,3 @@ layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
columns = 3
[node name="removeAccessory" type="TextureButton" parent="Accessoires/AccsScroll/AccsGrid"]
layout_mode = 2
texture_normal = ExtResource("9")
[node name="camera" parent="Accessoires/AccsScroll/AccsGrid" instance=ExtResource("1")]
layout_mode = 2
[connection signal="pressed" from="Pants/PantsScroll/PantsGrid/removePants" to="." method="_on_removePants_pressed"]
[connection signal="pressed" from="Shirts/ShirtsScroll/ShirtsGrid/removeShirt" to="." method="_on_removeShirt_pressed"]
[connection signal="pressed" from="Accessoires/AccsScroll/AccsGrid/removeAccessory" to="." method="_on_removeAccessory_pressed"]

View file

@ -1,17 +0,0 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends Node
var version = "0.0.0"
const NEWS_API = "https://static.tonybark.com/news/dressup.json"
var top = null
var bottom = null
var underwear = null
var accessory = null
enum characters {
ZACK,
ANTHONY
}

View file

@ -1,5 +0,0 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends Node
signal indicate

View file

@ -1,7 +0,0 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends "res://scripts/clothing/clothing_base.gd"
func _on_accessory_pressed():
GameData.accessory = texture_normal
$select.play()

View file

@ -1,7 +0,0 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends "res://scripts/clothing/clothing_base.gd"
func _on_bottoms_pressed():
GameData.bottom = texture_normal
$select.play()

View file

@ -0,0 +1,37 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends TextureRect
var is_draggable = false
var is_inside_draggable = false
var body_ref
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if is_draggable:
if Input.is_action_just_pressed("click"):
global_position = get_global_mouse_position()
elif Input.is_action_just_released("click"):
is_draggable = false
var tween = get_tree().create_tween()
if is_inside_draggable:
tween.tween_property(self,"postion",body_ref.position,0.2).set_ease(Tween.EASE_OUT)
else:
tween.tween_property(self,"global_postion",body_ref.position,0.2).set_ease(Tween.EASE_OUT)
func _get_drag_data(at_position):
var preview_texture = TextureRect.new()
preview_texture.texture = texture
preview_texture.expand_mode = 1
preview_texture.size = Vector2(106, 112)
set_drag_preview(preview_texture)
return preview_texture.texture
func _can_drop_data(at_position, data):
return data is Texture2D
func _drop_data(at_position, data):
texture = data

View file

@ -1,6 +0,0 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends TextureButton
@onready var player = $select
@onready var character = preload("res://resources/character.tres")

View file

@ -1,7 +0,0 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends "res://scripts/clothing/clothing_base.gd"
func _on_tops_pressed():
GameData.top = texture_normal
$select.play()

View file

@ -1,7 +0,0 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends "res://scripts/clothing/clothing_base.gd"
func _on_undies_pressed():
GameData.underwear = texture_normal
$select.play()

View file

@ -2,22 +2,9 @@
# See the LICENSE file in the project root for more information.
extends Control
@export var version: String = "1.0.0"
@onready var character = preload("res://resources/character.tres")
@onready var blank_accessory = preload("res://sprites/clothes/blank_top.png")
@onready var base_top = preload("res://sprites/character/character_base_top.svg")
@onready var base_bottom = preload("res://sprites/character/character_base_legs.svg")
@onready var export_btn = $CenterBtns/ButtonCtr/ExportBtn
@onready var import_btn = $CenterBtns/ButtonCtr/ImportBtn
@onready var http_request = $NewsWin/NewsBtns/HTTPRequest
func _ready():
var version = ProjectSettings.get_setting("application/config/version")
var verLabel = $VersionLbl
verLabel.text = "v" + version
GameData.version = version
if OS.get_name() == "HTML5":
export_btn.disabled = true
import_btn.disabled = true

View file

@ -1,22 +0,0 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends TabContainer
@onready var character = preload("res://resources/character.tres")
@onready var blank_accessory = preload("res://sprites/clothes/blank_top.png")
@onready var base_top = preload("res://sprites/character/character_base_top.svg")
@onready var base_bottom = preload("res://sprites/clothes/owo_censor.svg")
@onready var pants_grid = $Pants/PantsScroll/PantsGrid
@onready var shirts_grid = $Shirts/ShirtsScroll/ShirtsGrid
#onready var undies_grid = $Underwear/UndiesScroll/UndiesGrid
@onready var accs_grid = $Accessoires/AccsScroll/AccsGrid
func _on_removeAccessory_pressed():
character.accessory = blank_accessory
func _on_removePants_pressed():
character.bottom = base_bottom
func _on_removeShirt_pressed():
character.top = base_top

View file

@ -1,40 +0,0 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends Node2D
const _TDU_VERSION = "0.2"
const _SAVE_FILE = "user://character.tdu"
@onready var blank_accessory = preload("res://sprites/clothes/blank_top.png")
@onready var base_top = preload("res://sprites/character/character_base_top.svg")
@onready var base_bottom = preload("res://sprites/character/character_base_legs.svg")
@onready var export_win = $Controls/Container/ExportWin
@onready var import_win = $Controls/Container/ImportWin
@onready var accessory = $Body/Accessory
#onready var underwear = $Undies
@onready var bottom = $Body/Legs
@onready var top = $Body/Top
# onready var eyes = $Body/Head/Eyes
# onready var mouth = $Body/Head/Mouth
func _process(delta):
if GameData.accessory != null:
accessory.texture = GameData.accessory
# if GameData.underwear != null:
# underwear.texture = GameData.underwear
if GameData.bottom != null:
bottom.texture = GameData.bottom
if GameData.top != null:
top.texture = GameData.top
func _on_clearBtn_pressed():
$Click.play()
GameData.accessory = blank_accessory
GameData.bottom = base_bottom
GameData.top = base_top

52
test.gd
View file

@ -1,52 +0,0 @@
extends Panel
func _on_TestBtn_pressed() -> void:
print("Test launched")
var db := Datalogue.get_database("weapons")
var query := DlQuery.new()
var result := query.from(["combat_type:melee"]).execute(db)
print("Melee weapons: ", result)
result = query.clear().from(["combat_type:launchers"]).execute(db)
print("Launchers weapons: ", result)
result = query.clear().from(["type:magical"]).execute(db)
print("Magical weapons: ", result)
result = query.clear().from(["type:magical,type:hammer"]).execute(db)
print("Magical hammers: ", result)
result = query.clear().from(["type:hammer", "type:sword"]).execute(db)
print("Swords and hammers: ", result)
result = query.clear().where(["damage <= 10"]).execute(db)
print("Damage <= 10: ", result)
result = query.clear().where(["value > 400"]).execute(db)
print("Value > 400: ", result)
result = query.clear().where(["range = 100"]).execute(db)
print("Range = 100: ", result)
result = query.clear().where(["range = 100, damage < 20"]).execute(db)
print("Range = 100 and damage < 20: ", result)
result = query.clear().where(["range = 1", "range = 1.5"]).execute(db)
print("Range = 1 or range = 1.5: ", result)
result = query.clear().contains(["name:bow"]).execute(db)
print("Name contains bow: ", result)
result = query.clear().contains(["desc:sword"]).execute(db)
print("Description contains sword: ", result)
result = query.clear().contains(["desc:this", "desc:these"]).execute(db)
print("Description contains this or these: ", result)
result = query.clear().from(["combat_type:melee"]).where(["damage >= 10"]).contains(["desc:sword"]).execute(db)
print("Melee weapons with damage >= 10 and description contains sword: ", result)
print("Test finished")

View file

@ -1,28 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://d8tkbxrlnc0v"]
[ext_resource type="Script" path="res://test.gd" id="1_jpich"]
[node name="TestUI" type="Panel"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( "1_jpich" )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="MainLayout" type="CenterContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TestBtn" type="Button" parent="MainLayout"]
offset_left = 460.0
offset_top = 285.0
offset_right = 564.0
offset_bottom = 314.0
theme_override_font_sizes/font_size = 16
text = "Launch Test"
[connection signal="pressed" from="MainLayout/TestBtn" to="." method="_on_TestBtn_pressed"]