From 9b849376ae1b0b4fa3a0e30be6b20fe71ea7e7f5 Mon Sep 17 00:00:00 2001 From: Tony Bark Date: Thu, 7 Dec 2023 07:28:32 -0500 Subject: [PATCH] Basic drag and drop functionality Admittedly, I accidentally followed a far more simpler tutorial, but it works. --- project.godot | 11 +-- scenes/{zack_casey.tscn => character.tscn} | 47 +++++------- scenes/clothing/base/accessory_base.tscn | 9 --- scenes/clothing/base/bottoms_base.tscn | 10 --- scenes/clothing/base/clothing_base.tscn | 18 ----- scenes/clothing/base/tops_base.tscn | 9 --- scenes/clothing/base/undies_base.tscn | 10 --- scenes/clothing/camera.tscn | 12 --- scenes/clothing/pants/beat_Jeans.tscn | 10 --- scenes/clothing/pants/camoJeans.tscn | 15 ---- scenes/clothing/pants/dj_shorts.tscn | 10 --- scenes/clothing/pants/formal_skirt.tscn | 10 --- scenes/clothing/pants/jeans.tscn | 13 ---- scenes/clothing/pants/skirt.tscn | 13 ---- scenes/clothing/pants/sweatPants.tscn | 12 --- scenes/clothing/tops/atomic_shirt.tscn | 10 --- scenes/clothing/tops/dj_shirt.tscn | 10 --- scenes/clothing/tops/fullsnack_shirt.tscn | 10 --- scenes/clothing/tops/korm_shirt.tscn | 10 --- scenes/clothing/tops/nl_shirt.tscn | 10 --- scenes/clothing/tops/rawShirt.tscn | 12 --- scenes/clothing/tops/retro_shirt.tscn | 10 --- scenes/clothing/tops/skate_shirt.tscn | 10 --- scenes/clothing/tops/train_hoodie.tscn | 10 --- scenes/clothing/tops/whatsnew_shirt.tscn | 10 --- scenes/clothing/tops/z_shirt.tscn | 10 --- scenes/clothing/undies/briefs.tscn | 11 --- scenes/clothing/undies/fundosi.tscn | 16 ---- scenes/clothing/undies/z_briefs.tscn | 11 --- scenes/dress_up.tscn | 89 ---------------------- scenes/game.tscn | 56 ++++++++++++++ scenes/wardrobe.tscn | 84 ++------------------ scripts/autoload/game_data.gd | 17 ----- scripts/autoload/game_events.gd | 5 -- scripts/clothing/accessory_base.gd | 7 -- scripts/clothing/bottoms_base.gd | 7 -- scripts/clothing/clothing.gd | 37 +++++++++ scripts/clothing/clothing_base.gd | 6 -- scripts/clothing/tops_base.gd | 7 -- scripts/clothing/undies_base.gd | 7 -- scripts/interface.gd | 15 +--- scripts/wardrobe.gd | 22 ------ scripts/zack_casey.gd | 40 ---------- test.gd | 52 ------------- test.tscn | 28 ------- 45 files changed, 127 insertions(+), 711 deletions(-) rename scenes/{zack_casey.tscn => character.tscn} (88%) delete mode 100644 scenes/clothing/base/accessory_base.tscn delete mode 100644 scenes/clothing/base/bottoms_base.tscn delete mode 100644 scenes/clothing/base/clothing_base.tscn delete mode 100644 scenes/clothing/base/tops_base.tscn delete mode 100644 scenes/clothing/base/undies_base.tscn delete mode 100644 scenes/clothing/camera.tscn delete mode 100644 scenes/clothing/pants/beat_Jeans.tscn delete mode 100644 scenes/clothing/pants/camoJeans.tscn delete mode 100644 scenes/clothing/pants/dj_shorts.tscn delete mode 100644 scenes/clothing/pants/formal_skirt.tscn delete mode 100644 scenes/clothing/pants/jeans.tscn delete mode 100644 scenes/clothing/pants/skirt.tscn delete mode 100644 scenes/clothing/pants/sweatPants.tscn delete mode 100644 scenes/clothing/tops/atomic_shirt.tscn delete mode 100644 scenes/clothing/tops/dj_shirt.tscn delete mode 100644 scenes/clothing/tops/fullsnack_shirt.tscn delete mode 100644 scenes/clothing/tops/korm_shirt.tscn delete mode 100644 scenes/clothing/tops/nl_shirt.tscn delete mode 100644 scenes/clothing/tops/rawShirt.tscn delete mode 100644 scenes/clothing/tops/retro_shirt.tscn delete mode 100644 scenes/clothing/tops/skate_shirt.tscn delete mode 100644 scenes/clothing/tops/train_hoodie.tscn delete mode 100644 scenes/clothing/tops/whatsnew_shirt.tscn delete mode 100644 scenes/clothing/tops/z_shirt.tscn delete mode 100644 scenes/clothing/undies/briefs.tscn delete mode 100644 scenes/clothing/undies/fundosi.tscn delete mode 100644 scenes/clothing/undies/z_briefs.tscn delete mode 100644 scenes/dress_up.tscn create mode 100644 scenes/game.tscn delete mode 100644 scripts/autoload/game_data.gd delete mode 100644 scripts/autoload/game_events.gd delete mode 100644 scripts/clothing/accessory_base.gd delete mode 100644 scripts/clothing/bottoms_base.gd create mode 100644 scripts/clothing/clothing.gd delete mode 100644 scripts/clothing/clothing_base.gd delete mode 100644 scripts/clothing/tops_base.gd delete mode 100644 scripts/clothing/undies_base.gd delete mode 100644 scripts/wardrobe.gd delete mode 100644 scripts/zack_casey.gd delete mode 100644 test.gd delete mode 100644 test.tscn diff --git a/project.godot b/project.godot index 4fae085..fc580d5 100644 --- a/project.godot +++ b/project.godot @@ -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 diff --git a/scenes/zack_casey.tscn b/scenes/character.tscn similarity index 88% rename from scenes/zack_casey.tscn rename to scenes/character.tscn index 90d3af0..29fee6c 100644 --- a/scenes/zack_casey.tscn +++ b/scenes/character.tscn @@ -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 diff --git a/scenes/clothing/base/accessory_base.tscn b/scenes/clothing/base/accessory_base.tscn deleted file mode 100644 index 4ad8233..0000000 --- a/scenes/clothing/base/accessory_base.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/base/bottoms_base.tscn b/scenes/clothing/base/bottoms_base.tscn deleted file mode 100644 index ea9c653..0000000 --- a/scenes/clothing/base/bottoms_base.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/base/clothing_base.tscn b/scenes/clothing/base/clothing_base.tscn deleted file mode 100644 index b377782..0000000 --- a/scenes/clothing/base/clothing_base.tscn +++ /dev/null @@ -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 ) diff --git a/scenes/clothing/base/tops_base.tscn b/scenes/clothing/base/tops_base.tscn deleted file mode 100644 index 2160fac..0000000 --- a/scenes/clothing/base/tops_base.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/base/undies_base.tscn b/scenes/clothing/base/undies_base.tscn deleted file mode 100644 index 74bba12..0000000 --- a/scenes/clothing/base/undies_base.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/camera.tscn b/scenes/clothing/camera.tscn deleted file mode 100644 index be8afc1..0000000 --- a/scenes/clothing/camera.tscn +++ /dev/null @@ -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 ) diff --git a/scenes/clothing/pants/beat_Jeans.tscn b/scenes/clothing/pants/beat_Jeans.tscn deleted file mode 100644 index fea3d5a..0000000 --- a/scenes/clothing/pants/beat_Jeans.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/pants/camoJeans.tscn b/scenes/clothing/pants/camoJeans.tscn deleted file mode 100644 index a1a571e..0000000 --- a/scenes/clothing/pants/camoJeans.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/pants/dj_shorts.tscn b/scenes/clothing/pants/dj_shorts.tscn deleted file mode 100644 index 393265c..0000000 --- a/scenes/clothing/pants/dj_shorts.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/pants/formal_skirt.tscn b/scenes/clothing/pants/formal_skirt.tscn deleted file mode 100644 index 7226196..0000000 --- a/scenes/clothing/pants/formal_skirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/pants/jeans.tscn b/scenes/clothing/pants/jeans.tscn deleted file mode 100644 index bb5c986..0000000 --- a/scenes/clothing/pants/jeans.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/pants/skirt.tscn b/scenes/clothing/pants/skirt.tscn deleted file mode 100644 index 8d7aebc..0000000 --- a/scenes/clothing/pants/skirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/pants/sweatPants.tscn b/scenes/clothing/pants/sweatPants.tscn deleted file mode 100644 index f3635df..0000000 --- a/scenes/clothing/pants/sweatPants.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/atomic_shirt.tscn b/scenes/clothing/tops/atomic_shirt.tscn deleted file mode 100644 index a702cb7..0000000 --- a/scenes/clothing/tops/atomic_shirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/dj_shirt.tscn b/scenes/clothing/tops/dj_shirt.tscn deleted file mode 100644 index b6fa9c2..0000000 --- a/scenes/clothing/tops/dj_shirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/fullsnack_shirt.tscn b/scenes/clothing/tops/fullsnack_shirt.tscn deleted file mode 100644 index a6d0dda..0000000 --- a/scenes/clothing/tops/fullsnack_shirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/korm_shirt.tscn b/scenes/clothing/tops/korm_shirt.tscn deleted file mode 100644 index e14461b..0000000 --- a/scenes/clothing/tops/korm_shirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/nl_shirt.tscn b/scenes/clothing/tops/nl_shirt.tscn deleted file mode 100644 index c0044e2..0000000 --- a/scenes/clothing/tops/nl_shirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/rawShirt.tscn b/scenes/clothing/tops/rawShirt.tscn deleted file mode 100644 index 2c40714..0000000 --- a/scenes/clothing/tops/rawShirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/retro_shirt.tscn b/scenes/clothing/tops/retro_shirt.tscn deleted file mode 100644 index c0044e2..0000000 --- a/scenes/clothing/tops/retro_shirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/skate_shirt.tscn b/scenes/clothing/tops/skate_shirt.tscn deleted file mode 100644 index 431b850..0000000 --- a/scenes/clothing/tops/skate_shirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/train_hoodie.tscn b/scenes/clothing/tops/train_hoodie.tscn deleted file mode 100644 index 90627f0..0000000 --- a/scenes/clothing/tops/train_hoodie.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/whatsnew_shirt.tscn b/scenes/clothing/tops/whatsnew_shirt.tscn deleted file mode 100644 index 6b9be02..0000000 --- a/scenes/clothing/tops/whatsnew_shirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/tops/z_shirt.tscn b/scenes/clothing/tops/z_shirt.tscn deleted file mode 100644 index a04fd2f..0000000 --- a/scenes/clothing/tops/z_shirt.tscn +++ /dev/null @@ -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"] diff --git a/scenes/clothing/undies/briefs.tscn b/scenes/clothing/undies/briefs.tscn deleted file mode 100644 index 87bad64..0000000 --- a/scenes/clothing/undies/briefs.tscn +++ /dev/null @@ -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 ) diff --git a/scenes/clothing/undies/fundosi.tscn b/scenes/clothing/undies/fundosi.tscn deleted file mode 100644 index f356957..0000000 --- a/scenes/clothing/undies/fundosi.tscn +++ /dev/null @@ -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 ) diff --git a/scenes/clothing/undies/z_briefs.tscn b/scenes/clothing/undies/z_briefs.tscn deleted file mode 100644 index d7916bd..0000000 --- a/scenes/clothing/undies/z_briefs.tscn +++ /dev/null @@ -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 ) diff --git a/scenes/dress_up.tscn b/scenes/dress_up.tscn deleted file mode 100644 index d39ea7f..0000000 --- a/scenes/dress_up.tscn +++ /dev/null @@ -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"] diff --git a/scenes/game.tscn b/scenes/game.tscn new file mode 100644 index 0000000..424452e --- /dev/null +++ b/scenes/game.tscn @@ -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) diff --git a/scenes/wardrobe.tscn b/scenes/wardrobe.tscn index 5aa50fd..8e45cc8 100644 --- a/scenes/wardrobe.tscn +++ b/scenes/wardrobe.tscn @@ -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"] diff --git a/scripts/autoload/game_data.gd b/scripts/autoload/game_data.gd deleted file mode 100644 index f978595..0000000 --- a/scripts/autoload/game_data.gd +++ /dev/null @@ -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 -} diff --git a/scripts/autoload/game_events.gd b/scripts/autoload/game_events.gd deleted file mode 100644 index 205a81c..0000000 --- a/scripts/autoload/game_events.gd +++ /dev/null @@ -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 diff --git a/scripts/clothing/accessory_base.gd b/scripts/clothing/accessory_base.gd deleted file mode 100644 index 42e200a..0000000 --- a/scripts/clothing/accessory_base.gd +++ /dev/null @@ -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() diff --git a/scripts/clothing/bottoms_base.gd b/scripts/clothing/bottoms_base.gd deleted file mode 100644 index 0bd40f6..0000000 --- a/scripts/clothing/bottoms_base.gd +++ /dev/null @@ -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() diff --git a/scripts/clothing/clothing.gd b/scripts/clothing/clothing.gd new file mode 100644 index 0000000..4e3dccb --- /dev/null +++ b/scripts/clothing/clothing.gd @@ -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 diff --git a/scripts/clothing/clothing_base.gd b/scripts/clothing/clothing_base.gd deleted file mode 100644 index 9269db7..0000000 --- a/scripts/clothing/clothing_base.gd +++ /dev/null @@ -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") diff --git a/scripts/clothing/tops_base.gd b/scripts/clothing/tops_base.gd deleted file mode 100644 index 40308b0..0000000 --- a/scripts/clothing/tops_base.gd +++ /dev/null @@ -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() diff --git a/scripts/clothing/undies_base.gd b/scripts/clothing/undies_base.gd deleted file mode 100644 index 6c6fb7b..0000000 --- a/scripts/clothing/undies_base.gd +++ /dev/null @@ -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() diff --git a/scripts/interface.gd b/scripts/interface.gd index ef9d456..c8305f3 100644 --- a/scripts/interface.gd +++ b/scripts/interface.gd @@ -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 diff --git a/scripts/wardrobe.gd b/scripts/wardrobe.gd deleted file mode 100644 index 34a26b0..0000000 --- a/scripts/wardrobe.gd +++ /dev/null @@ -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 diff --git a/scripts/zack_casey.gd b/scripts/zack_casey.gd deleted file mode 100644 index 7abacef..0000000 --- a/scripts/zack_casey.gd +++ /dev/null @@ -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 diff --git a/test.gd b/test.gd deleted file mode 100644 index 2bd193a..0000000 --- a/test.gd +++ /dev/null @@ -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") diff --git a/test.tscn b/test.tscn deleted file mode 100644 index 807aa31..0000000 --- a/test.tscn +++ /dev/null @@ -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"]