commit 73f8bddae3441762939f057222c90031ad663a15 Author: Lexi Quinn Date: Tue Jun 6 13:35:20 2023 +1000 initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4709183 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Godot 4+ specific ignores +.godot/ diff --git a/Assets/card.png b/Assets/card.png new file mode 100644 index 0000000..607d5f1 Binary files /dev/null and b/Assets/card.png differ diff --git a/Assets/card.png.import b/Assets/card.png.import new file mode 100644 index 0000000..8f0e9ee --- /dev/null +++ b/Assets/card.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b5lwogcrjwpfj" +path.bptc="res://.godot/imported/card.png-227bfe2201ac5b824c6a54accd7a49dd.bptc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://Assets/card.png" +dest_files=["res://.godot/imported/card.png-227bfe2201ac5b824c6a54accd7a49dd.bptc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=true +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/Assets/card.png~ b/Assets/card.png~ new file mode 100644 index 0000000..0f8f910 Binary files /dev/null and b/Assets/card.png~ differ diff --git a/Assets/frame.png b/Assets/frame.png new file mode 100644 index 0000000..dc1457f Binary files /dev/null and b/Assets/frame.png differ diff --git a/Assets/frame.png.import b/Assets/frame.png.import new file mode 100644 index 0000000..42ec0b7 --- /dev/null +++ b/Assets/frame.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c2oy6ox1ukog8" +path="res://.godot/imported/frame.png-e87a90026be073fa6673b0be2d63d21d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/frame.png" +dest_files=["res://.godot/imported/frame.png-e87a90026be073fa6673b0be2d63d21d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Assets/frame.png~ b/Assets/frame.png~ new file mode 100644 index 0000000..c6fb415 Binary files /dev/null and b/Assets/frame.png~ differ diff --git a/Assets/generatordesign.png b/Assets/generatordesign.png new file mode 100644 index 0000000..817f293 Binary files /dev/null and b/Assets/generatordesign.png differ diff --git a/Assets/generatordesign.png.import b/Assets/generatordesign.png.import new file mode 100644 index 0000000..ff489c2 --- /dev/null +++ b/Assets/generatordesign.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d127pfpldgh1l" +path="res://.godot/imported/generatordesign.png-1e4724ca59a5da67b194be8a0b672160.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/generatordesign.png" +dest_files=["res://.godot/imported/generatordesign.png-1e4724ca59a5da67b194be8a0b672160.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Assets/generatordesign.png~ b/Assets/generatordesign.png~ new file mode 100644 index 0000000..97f4420 Binary files /dev/null and b/Assets/generatordesign.png~ differ diff --git a/Assets/goldring.png b/Assets/goldring.png new file mode 100644 index 0000000..6f92d68 Binary files /dev/null and b/Assets/goldring.png differ diff --git a/Assets/goldring.png.import b/Assets/goldring.png.import new file mode 100644 index 0000000..2e88d7c --- /dev/null +++ b/Assets/goldring.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b5anmd3k3fuui" +path="res://.godot/imported/goldring.png-4cc464bd25728332d17689790c7649b1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/goldring.png" +dest_files=["res://.godot/imported/goldring.png-4cc464bd25728332d17689790c7649b1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Assets/hard.png b/Assets/hard.png new file mode 100644 index 0000000..12a05bb Binary files /dev/null and b/Assets/hard.png differ diff --git a/Assets/hard.png.import b/Assets/hard.png.import new file mode 100644 index 0000000..a2f044f --- /dev/null +++ b/Assets/hard.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b72amudxuxo8n" +path="res://.godot/imported/hard.png-c7d0ea33bbfe35f6a5b5d70e047cbe9f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/hard.png" +dest_files=["res://.godot/imported/hard.png-c7d0ea33bbfe35f6a5b5d70e047cbe9f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Assets/hardest.png b/Assets/hardest.png new file mode 100644 index 0000000..0b382b3 Binary files /dev/null and b/Assets/hardest.png differ diff --git a/Assets/hardest.png.import b/Assets/hardest.png.import new file mode 100644 index 0000000..a5bd4d3 --- /dev/null +++ b/Assets/hardest.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ws1ghxt16a54" +path="res://.godot/imported/hardest.png-abe91810bc50423bcf3ff6f25ffe71f5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/hardest.png" +dest_files=["res://.godot/imported/hardest.png-abe91810bc50423bcf3ff6f25ffe71f5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Assets/icon_atlas.tres b/Assets/icon_atlas.tres new file mode 100644 index 0000000..c8c6504 --- /dev/null +++ b/Assets/icon_atlas.tres @@ -0,0 +1,8 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dldmf5ut1vk7q"] + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_p5rfg"] +load_path = "res://.godot/imported/icons.png-09c24313aa75a5df81de880395d42450.ctex" + +[resource] +atlas = SubResource("CompressedTexture2D_p5rfg") +region = Rect2(256, 0, 32, 32) diff --git a/Assets/icons.png b/Assets/icons.png new file mode 100644 index 0000000..6be73cb Binary files /dev/null and b/Assets/icons.png differ diff --git a/Assets/icons.png.import b/Assets/icons.png.import new file mode 100644 index 0000000..0300da1 --- /dev/null +++ b/Assets/icons.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b4qqaaqnfnlft" +path="res://.godot/imported/icons.png-09c24313aa75a5df81de880395d42450.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/icons.png" +dest_files=["res://.godot/imported/icons.png-09c24313aa75a5df81de880395d42450.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Assets/redring.png b/Assets/redring.png new file mode 100644 index 0000000..b201c48 Binary files /dev/null and b/Assets/redring.png differ diff --git a/Assets/redring.png.import b/Assets/redring.png.import new file mode 100644 index 0000000..d1c6397 --- /dev/null +++ b/Assets/redring.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cw373mc2nyf0t" +path="res://.godot/imported/redring.png-4c77ae267bcca54b465f7e7d30def511.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/redring.png" +dest_files=["res://.godot/imported/redring.png-4c77ae267bcca54b465f7e7d30def511.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Assets/slice.png b/Assets/slice.png new file mode 100644 index 0000000..b28cc18 Binary files /dev/null and b/Assets/slice.png differ diff --git a/Assets/slice.png.import b/Assets/slice.png.import new file mode 100644 index 0000000..568a8f8 --- /dev/null +++ b/Assets/slice.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://de0gq6h0onwex" +path="res://.godot/imported/slice.png-8a38b00264ecda57271611aef8ad0ba2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/slice.png" +dest_files=["res://.godot/imported/slice.png-8a38b00264ecda57271611aef8ad0ba2.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Assets/slice.png~ b/Assets/slice.png~ new file mode 100644 index 0000000..450ea8f Binary files /dev/null and b/Assets/slice.png~ differ diff --git a/Assets/super.png b/Assets/super.png new file mode 100644 index 0000000..c6fb415 Binary files /dev/null and b/Assets/super.png differ diff --git a/Assets/super.png.import b/Assets/super.png.import new file mode 100644 index 0000000..5146edc --- /dev/null +++ b/Assets/super.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b4lont873b556" +path="res://.godot/imported/super.png-01bcd2f8933ca430b42b4608319852d2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/super.png" +dest_files=["res://.godot/imported/super.png-01bcd2f8933ca430b42b4608319852d2.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Assets/task.png b/Assets/task.png new file mode 100644 index 0000000..68abc5b Binary files /dev/null and b/Assets/task.png differ diff --git a/Assets/task.png.import b/Assets/task.png.import new file mode 100644 index 0000000..a993bfa --- /dev/null +++ b/Assets/task.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dpu7jjppeja2v" +path="res://.godot/imported/task.png-df9040115ff0987ba4dc41ed9852452f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/task.png" +dest_files=["res://.godot/imported/task.png-df9040115ff0987ba4dc41ed9852452f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Scenes/board.tscn b/Scenes/board.tscn new file mode 100644 index 0000000..819a2e5 --- /dev/null +++ b/Scenes/board.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://8vuwnqp80o3m"] + +[ext_resource type="Script" path="res://Scripts/board.gd" id="1_pvv6x"] + +[node name="Board" type="Node2D"] +script = ExtResource("1_pvv6x") diff --git a/Scenes/bonus_icon.tscn b/Scenes/bonus_icon.tscn new file mode 100644 index 0000000..2139b4c --- /dev/null +++ b/Scenes/bonus_icon.tscn @@ -0,0 +1,34 @@ +[gd_scene load_steps=5 format=3 uid="uid://cqy1p45nku4hr"] + +[ext_resource type="Script" path="res://Scripts/bonus_icon.gd" id="1_1qclg"] +[ext_resource type="Texture2D" uid="uid://b4qqaaqnfnlft" path="res://Assets/icons.png" id="1_awpqe"] +[ext_resource type="Texture2D" uid="uid://c2oy6ox1ukog8" path="res://Assets/frame.png" id="2_au4d6"] +[ext_resource type="Texture2D" uid="uid://b4lont873b556" path="res://Assets/super.png" id="3_qnk7l"] + +[node name="Bonus1" type="Node2D"] +script = ExtResource("1_1qclg") + +[node name="Icon1" type="Sprite2D" parent="."] +texture = ExtResource("1_awpqe") +region_enabled = true +region_rect = Rect2(0, 0, 32, 32) + +[node name="frame1" type="Sprite2D" parent="."] +position = Vector2(0, -3) +texture = ExtResource("2_au4d6") +region_rect = Rect2(0, 0, 32, 32) + +[node name="super1" type="Sprite2D" parent="."] +visible = false +position = Vector2(0, -3) +texture = ExtResource("3_qnk7l") +region_rect = Rect2(0, 0, 32, 32) + +[node name="Label" type="Label" parent="."] +visible = false +offset_left = 24.0 +offset_top = -12.0 +offset_right = 64.0 +offset_bottom = 14.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +text = "120" diff --git a/Scenes/card_pile.tscn b/Scenes/card_pile.tscn new file mode 100644 index 0000000..458bdc1 --- /dev/null +++ b/Scenes/card_pile.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=3 format=3 uid="uid://y2i3u6n1oowh"] + +[ext_resource type="Script" path="res://Scripts/slot_button.gd" id="1_qbsj1"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_2yi2r"] +size = Vector2(229, 145) + +[node name="CardPile" type="Node2D"] +script = ExtResource("1_qbsj1") + +[node name="Label" type="Label" parent="."] +offset_left = 66.0 +offset_top = 55.0 +offset_right = 158.0 +offset_bottom = 81.0 +text = "Deck" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Area2D" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(112.5, 71.5) +shape = SubResource("RectangleShape2D_2yi2r") +disabled = true + +[connection signal="input_event" from="Area2D" to="." method="_on_area_2d_input_event"] diff --git a/Scenes/client_card.tscn b/Scenes/client_card.tscn new file mode 100644 index 0000000..0e83a86 --- /dev/null +++ b/Scenes/client_card.tscn @@ -0,0 +1,236 @@ +[gd_scene load_steps=9 format=3 uid="uid://c7j6lwbwgbosr"] + +[ext_resource type="Script" path="res://Scripts/client.gd" id="1_bvmvn"] +[ext_resource type="Texture2D" uid="uid://dpu7jjppeja2v" path="res://Assets/task.png" id="2_k2tqp"] +[ext_resource type="Texture2D" uid="uid://de0gq6h0onwex" path="res://Assets/slice.png" id="3_pxlet"] +[ext_resource type="Texture2D" uid="uid://b72amudxuxo8n" path="res://Assets/hard.png" id="4_8gylx"] +[ext_resource type="Texture2D" uid="uid://ws1ghxt16a54" path="res://Assets/hardest.png" id="5_hl5js"] + +[sub_resource type="LabelSettings" id="LabelSettings_xciys"] +font_size = 25 +shadow_size = 0 + +[sub_resource type="LabelSettings" id="LabelSettings_88ebh"] +font_size = 24 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_70vuu"] +size = Vector2(350, 253) + +[node name="Card" type="Node2D"] +script = ExtResource("1_bvmvn") + +[node name="Background" type="TextureRect" parent="."] +texture_filter = 1 +offset_right = 350.0 +offset_bottom = 250.0 +texture = ExtResource("2_k2tqp") + +[node name="Title" type="Label" parent="Background"] +modulate = Color(0, 0, 0, 1) +texture_filter = 1 +layout_mode = 0 +offset_left = 166.0 +offset_top = 6.0 +offset_right = 296.0 +offset_bottom = 44.0 +label_settings = SubResource("LabelSettings_xciys") +horizontal_alignment = 1 +vertical_alignment = 1 +uppercase = true + +[node name="Initial Stress" type="Label" parent="Background"] +modulate = Color(0, 0, 0, 1) +texture_filter = 1 +layout_mode = 0 +offset_left = 117.0 +offset_top = 6.0 +offset_right = 156.0 +offset_bottom = 43.0 +label_settings = SubResource("LabelSettings_88ebh") +horizontal_alignment = 1 +vertical_alignment = 1 +uppercase = true + +[node name="Slice1" type="TextureRect" parent="Background"] +visible = false +layout_mode = 0 +offset_left = 325.0 +offset_top = 6.0 +offset_right = 344.0 +offset_bottom = 25.0 +texture = ExtResource("3_pxlet") + +[node name="Slice2" type="TextureRect" parent="Background"] +visible = false +layout_mode = 0 +offset_left = 326.0 +offset_top = 25.0 +offset_right = 345.0 +offset_bottom = 44.0 +texture = ExtResource("3_pxlet") +flip_v = true + +[node name="Slice3" type="TextureRect" parent="Background"] +visible = false +layout_mode = 0 +offset_left = 308.0 +offset_top = 24.0 +offset_right = 327.0 +offset_bottom = 43.0 +texture = ExtResource("3_pxlet") +flip_h = true +flip_v = true + +[node name="Slice4" type="TextureRect" parent="Background"] +visible = false +layout_mode = 0 +offset_left = 308.0 +offset_top = 7.0 +offset_right = 327.0 +offset_bottom = 26.0 +texture = ExtResource("3_pxlet") +flip_h = true + +[node name="Turns Left Counter" type="Label" parent="Background"] +layout_mode = 0 +offset_left = 354.0 +offset_right = 394.0 +offset_bottom = 26.0 +text = "0" + +[node name="easy" type="Node2D" parent="."] +visible = false + +[node name="Standard" type="Node2D" parent="easy"] +position = Vector2(134, 73) +scale = Vector2(0.5, 0.5) + +[node name="Great1" type="Node2D" parent="easy"] +position = Vector2(180, 151) +scale = Vector2(0.9, 0.9) + +[node name="Great2" type="Node2D" parent="easy"] +position = Vector2(270, 151) +scale = Vector2(0.9, 0.9) + +[node name="medium" type="Node2D" parent="."] +visible = false + +[node name="Background_Image" type="TextureRect" parent="medium"] +offset_left = 117.0 +offset_top = 55.0 +offset_right = 340.0 +offset_bottom = 187.0 +texture = ExtResource("4_8gylx") + +[node name="Standard" type="Node2D" parent="medium"] +position = Vector2(134, 73) +scale = Vector2(0.5, 0.5) + +[node name="Good1" type="Node2D" parent="medium"] +position = Vector2(180, 105) +scale = Vector2(0.9, 0.9) + +[node name="Good2" type="Node2D" parent="medium"] +position = Vector2(270, 105) +scale = Vector2(0.9, 0.9) + +[node name="Great1" type="Node2D" parent="medium"] +position = Vector2(180, 196) +scale = Vector2(0.9, 0.9) + +[node name="Great2" type="Node2D" parent="medium"] +position = Vector2(270, 196) +scale = Vector2(0.9, 0.9) + +[node name="hard" type="Node2D" parent="."] +visible = false + +[node name="Background_Image" type="TextureRect" parent="hard"] +offset_left = 117.0 +offset_top = 55.0 +offset_right = 340.0 +offset_bottom = 187.0 +texture = ExtResource("5_hl5js") + +[node name="Standard" type="Node2D" parent="hard"] +position = Vector2(134, 73) +scale = Vector2(0.5, 0.5) + +[node name="Poor1" type="Node2D" parent="hard"] +position = Vector2(180, 87) +scale = Vector2(0.9, 0.9) + +[node name="Poor2" type="Node2D" parent="hard"] +position = Vector2(270, 87) +scale = Vector2(0.9, 0.9) + +[node name="Good1" type="Node2D" parent="hard"] +position = Vector2(180, 151) +scale = Vector2(0.9, 0.9) + +[node name="Good2" type="Node2D" parent="hard"] +position = Vector2(270, 151) +scale = Vector2(0.9, 0.9) + +[node name="Great1" type="Node2D" parent="hard"] +position = Vector2(180, 209) +scale = Vector2(0.9, 0.9) + +[node name="Great2" type="Node2D" parent="hard"] +position = Vector2(270, 209) +scale = Vector2(0.9, 0.9) + +[node name="Area2D" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(175, 124.5) +shape = SubResource("RectangleShape2D_70vuu") + +[node name="Control" type="Control" parent="."] +visible = false +layout_mode = 3 +anchors_preset = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="4turn" type="Button" parent="Control"] +visible = false +layout_mode = 0 +offset_left = 91.0 +offset_top = 56.0 +offset_right = 155.0 +offset_bottom = 118.0 +text = "4" + +[node name="3turn" type="Button" parent="Control"] +visible = false +layout_mode = 0 +offset_left = 90.0 +offset_top = 131.0 +offset_right = 154.0 +offset_bottom = 193.0 +text = "3" + +[node name="2turn" type="Button" parent="Control"] +visible = false +layout_mode = 0 +offset_left = 176.0 +offset_top = 132.0 +offset_right = 240.0 +offset_bottom = 194.0 +text = "2" + +[node name="1turn" type="Button" parent="Control"] +visible = false +layout_mode = 0 +offset_left = 176.0 +offset_top = 56.0 +offset_right = 240.0 +offset_bottom = 118.0 +text = "1" + +[connection signal="pressed" from="Control/4turn" to="." method="_on_turn_pressed" binds= [4]] +[connection signal="pressed" from="Control/3turn" to="." method="_on_turn_pressed" binds= [3]] +[connection signal="pressed" from="Control/2turn" to="." method="_on_turn_pressed" binds= [2]] +[connection signal="pressed" from="Control/1turn" to="." method="_on_turn_pressed" binds= [1]] diff --git a/Scenes/client_editor.tscn b/Scenes/client_editor.tscn new file mode 100644 index 0000000..c54d468 --- /dev/null +++ b/Scenes/client_editor.tscn @@ -0,0 +1,684 @@ +[gd_scene load_steps=16 format=3 uid="uid://bggwj8tr3hcph"] + +[ext_resource type="Script" path="res://Scripts/client_card_crafter.gd" id="1_lgqnu"] +[ext_resource type="Texture2D" uid="uid://d127pfpldgh1l" path="res://Assets/generatordesign.png" id="2_58m7y"] +[ext_resource type="PackedScene" uid="uid://b41yu27wmglap" path="res://Scenes/icon_button.tscn" id="3_kfv0r"] +[ext_resource type="PackedScene" uid="uid://c7j6lwbwgbosr" path="res://Scenes/client_card.tscn" id="4_3c34i"] +[ext_resource type="Texture2D" uid="uid://de0gq6h0onwex" path="res://Assets/slice.png" id="5_wfdti"] + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_p5rfg"] +load_path = "res://.godot/imported/icons.png-09c24313aa75a5df81de880395d42450.ctex" + +[sub_resource type="AtlasTexture" id="AtlasTexture_4fx3s"] +atlas = SubResource("CompressedTexture2D_p5rfg") +region = Rect2(32, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_thch8"] +atlas = SubResource("CompressedTexture2D_p5rfg") +region = Rect2(64, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_um33r"] +atlas = SubResource("CompressedTexture2D_p5rfg") +region = Rect2(96, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1bvig"] +atlas = SubResource("CompressedTexture2D_p5rfg") +region = Rect2(128, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_t81qe"] +atlas = SubResource("CompressedTexture2D_p5rfg") +region = Rect2(160, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_703sl"] +atlas = SubResource("CompressedTexture2D_p5rfg") +region = Rect2(192, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cyh1f"] +atlas = SubResource("CompressedTexture2D_p5rfg") +region = Rect2(224, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kkprq"] +atlas = SubResource("CompressedTexture2D_p5rfg") +region = Rect2(256, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_02lrn"] +atlas = SubResource("CompressedTexture2D_p5rfg") +region = Rect2(288, 0, 32, 32) + +[node name="Card Crafter" type="Node2D"] +script = ExtResource("1_lgqnu") + +[node name="main_camera" type="Camera2D" parent="."] + +[node name="background_image" type="Sprite2D" parent="."] +texture = ExtResource("2_58m7y") + +[node name="generate" type="Button" parent="."] +offset_left = -902.0 +offset_top = -367.0 +offset_right = -527.0 +offset_bottom = -292.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "generate" + +[node name="new" type="Button" parent="."] +offset_left = -902.0 +offset_top = -524.0 +offset_right = -527.0 +offset_bottom = -449.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "new" + +[node name="new2" type="Button" parent="."] +offset_left = 652.0 +offset_top = -526.0 +offset_right = 941.0 +offset_bottom = -471.0 +theme_override_font_sizes/font_size = 28 +action_mode = 0 +text = "Return to Main Menu" + +[node name="load" type="Button" parent="."] +offset_left = -711.0 +offset_top = -446.0 +offset_right = -527.0 +offset_bottom = -371.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "load" + +[node name="save" type="Button" parent="."] +offset_left = -902.0 +offset_top = -446.0 +offset_right = -714.0 +offset_bottom = -371.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "save" + +[node name="edit" type="Button" parent="."] +offset_left = -902.0 +offset_top = 335.0 +offset_right = -523.0 +offset_bottom = 410.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "edit" + +[node name="delete" type="Button" parent="."] +offset_left = -902.0 +offset_top = 414.0 +offset_right = -523.0 +offset_bottom = 489.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "delete" + +[node name="prev" type="Button" parent="."] +offset_left = -902.0 +offset_top = 255.0 +offset_right = -715.0 +offset_bottom = 330.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "prev" + +[node name="next" type="Button" parent="."] +offset_left = -711.0 +offset_top = 255.0 +offset_right = -523.0 +offset_bottom = 330.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "next" + +[node name="crossbutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = -190.0 +offset_top = -380.0 +offset_right = -27.0 +offset_bottom = -208.0 + +[node name="squarebutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = 14.0 +offset_top = -384.0 +offset_right = 178.0 +offset_bottom = -207.0 + +[node name="trianglebutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = -346.0 +offset_top = -254.0 +offset_right = -185.0 +offset_bottom = -75.0 + +[node name="crescentbutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = 173.0 +offset_top = -248.0 +offset_right = 338.0 +offset_bottom = -76.0 + +[node name="puppybutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = -385.0 +offset_top = -52.0 +offset_right = -220.0 +offset_bottom = 127.0 + +[node name="riverbutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = 211.0 +offset_top = -49.0 +offset_right = 375.0 +offset_bottom = 128.0 + +[node name="starbutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = -280.0 +offset_top = 126.0 +offset_right = -117.0 +offset_bottom = 307.0 + +[node name="chainbutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = 104.0 +offset_top = 133.0 +offset_right = 270.0 +offset_bottom = 310.0 + +[node name="gustbutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = -84.0 +offset_top = 196.0 +offset_right = 79.0 +offset_bottom = 374.0 + +[node name="eightbutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = 421.0 +offset_top = -480.0 +offset_right = 584.0 +offset_bottom = -302.0 + +[node name="tenbutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = 789.0 +offset_top = -480.0 +offset_right = 952.0 +offset_bottom = -302.0 + +[node name="twelvebutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = 426.0 +offset_top = 257.0 +offset_right = 589.0 +offset_bottom = 435.0 + +[node name="fourteenbutton" parent="." instance=ExtResource("3_kfv0r")] +offset_left = 789.0 +offset_top = 255.0 +offset_right = 952.0 +offset_bottom = 433.0 + +[node name="crosscount" type="LineEdit" parent="."] +offset_left = -259.0 +offset_top = -443.0 +offset_right = -75.0 +offset_bottom = -368.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="squarecount" type="LineEdit" parent="."] +offset_left = 73.0 +offset_top = -443.0 +offset_right = 257.0 +offset_bottom = -368.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="crescentcount" type="LineEdit" parent="."] +offset_left = 264.0 +offset_top = -285.0 +offset_right = 448.0 +offset_bottom = -210.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="rivercount" type="LineEdit" parent="."] +offset_left = 337.0 +offset_top = 38.0 +offset_right = 521.0 +offset_bottom = 113.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="chaincount" type="LineEdit" parent="."] +offset_left = 202.0 +offset_top = 280.0 +offset_right = 386.0 +offset_bottom = 355.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="gustcount" type="LineEdit" parent="."] +offset_left = -90.0 +offset_top = 395.0 +offset_right = 94.0 +offset_bottom = 470.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="starcount" type="LineEdit" parent="."] +offset_left = -386.0 +offset_top = 282.0 +offset_right = -202.0 +offset_bottom = 357.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="puppycount" type="LineEdit" parent="."] +offset_left = -519.0 +offset_top = 40.0 +offset_right = -335.0 +offset_bottom = 115.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="trianglecount" type="LineEdit" parent="."] +offset_left = -447.0 +offset_top = -284.0 +offset_right = -263.0 +offset_bottom = -209.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="easycount" type="LineEdit" parent="."] +offset_left = 692.0 +offset_top = -265.0 +offset_right = 876.0 +offset_bottom = -190.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="mediumcount" type="LineEdit" parent="."] +offset_left = 692.0 +offset_top = -124.0 +offset_right = 876.0 +offset_bottom = -49.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="hardcount" type="LineEdit" parent="."] +offset_left = 690.0 +offset_top = 14.0 +offset_right = 874.0 +offset_bottom = 89.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="Control" type="ReferenceRect" parent="."] +offset_left = -39.0 +offset_top = -47.0 +offset_right = 1.0 +offset_bottom = -7.0 + +[node name="Card" parent="Control" instance=ExtResource("4_3c34i")] +position = Vector2(-180, -121) +scale = Vector2(1.25, 1.25) + +[node name="ItemList" type="OptionButton" parent="Control"] +layout_mode = 2 +offset_left = -31.0 +offset_top = -33.0 +offset_right = 112.0 +offset_bottom = 28.0 +item_count = 10 +popup/item_0/text = "none" +popup/item_0/id = 0 +popup/item_1/text = "cross" +popup/item_1/icon = SubResource("AtlasTexture_4fx3s") +popup/item_1/id = 1 +popup/item_2/text = "square" +popup/item_2/icon = SubResource("AtlasTexture_thch8") +popup/item_2/id = 2 +popup/item_3/text = "triangle" +popup/item_3/icon = SubResource("AtlasTexture_um33r") +popup/item_3/id = 3 +popup/item_4/text = "crescent" +popup/item_4/icon = SubResource("AtlasTexture_1bvig") +popup/item_4/id = 4 +popup/item_5/text = "puppy" +popup/item_5/icon = SubResource("AtlasTexture_t81qe") +popup/item_5/id = 5 +popup/item_6/text = "river" +popup/item_6/icon = SubResource("AtlasTexture_703sl") +popup/item_6/id = 6 +popup/item_7/text = "star" +popup/item_7/icon = SubResource("AtlasTexture_cyh1f") +popup/item_7/id = 7 +popup/item_8/text = "chain" +popup/item_8/icon = SubResource("AtlasTexture_kkprq") +popup/item_8/id = 8 +popup/item_9/text = "gust" +popup/item_9/icon = SubResource("AtlasTexture_02lrn") +popup/item_9/id = 9 + +[node name="ItemList2" type="OptionButton" parent="Control"] +layout_mode = 2 +offset_left = 116.0 +offset_top = -33.0 +offset_right = 259.0 +offset_bottom = 28.0 +item_count = 10 +popup/item_0/text = "none" +popup/item_0/id = 0 +popup/item_1/text = "cross" +popup/item_1/icon = SubResource("AtlasTexture_4fx3s") +popup/item_1/id = 1 +popup/item_2/text = "square" +popup/item_2/icon = SubResource("AtlasTexture_thch8") +popup/item_2/id = 2 +popup/item_3/text = "triangle" +popup/item_3/icon = SubResource("AtlasTexture_um33r") +popup/item_3/id = 3 +popup/item_4/text = "crescent" +popup/item_4/icon = SubResource("AtlasTexture_1bvig") +popup/item_4/id = 4 +popup/item_5/text = "puppy" +popup/item_5/icon = SubResource("AtlasTexture_t81qe") +popup/item_5/id = 5 +popup/item_6/text = "river" +popup/item_6/icon = SubResource("AtlasTexture_703sl") +popup/item_6/id = 6 +popup/item_7/text = "star" +popup/item_7/icon = SubResource("AtlasTexture_cyh1f") +popup/item_7/id = 7 +popup/item_8/text = "chain" +popup/item_8/icon = SubResource("AtlasTexture_kkprq") +popup/item_8/id = 8 +popup/item_9/text = "gust" +popup/item_9/icon = SubResource("AtlasTexture_02lrn") +popup/item_9/id = 9 + +[node name="ItemList3" type="OptionButton" parent="Control"] +layout_mode = 2 +offset_left = -31.0 +offset_top = 36.0 +offset_right = 112.0 +offset_bottom = 97.0 +item_count = 10 +popup/item_0/text = "none" +popup/item_0/id = 0 +popup/item_1/text = "cross" +popup/item_1/icon = SubResource("AtlasTexture_4fx3s") +popup/item_1/id = 1 +popup/item_2/text = "square" +popup/item_2/icon = SubResource("AtlasTexture_thch8") +popup/item_2/id = 2 +popup/item_3/text = "triangle" +popup/item_3/icon = SubResource("AtlasTexture_um33r") +popup/item_3/id = 3 +popup/item_4/text = "crescent" +popup/item_4/icon = SubResource("AtlasTexture_1bvig") +popup/item_4/id = 4 +popup/item_5/text = "puppy" +popup/item_5/icon = SubResource("AtlasTexture_t81qe") +popup/item_5/id = 5 +popup/item_6/text = "river" +popup/item_6/icon = SubResource("AtlasTexture_703sl") +popup/item_6/id = 6 +popup/item_7/text = "star" +popup/item_7/icon = SubResource("AtlasTexture_cyh1f") +popup/item_7/id = 7 +popup/item_8/text = "chain" +popup/item_8/icon = SubResource("AtlasTexture_kkprq") +popup/item_8/id = 8 +popup/item_9/text = "gust" +popup/item_9/icon = SubResource("AtlasTexture_02lrn") +popup/item_9/id = 9 + +[node name="ItemList4" type="OptionButton" parent="Control"] +layout_mode = 2 +offset_left = 116.0 +offset_top = 36.0 +offset_right = 259.0 +offset_bottom = 97.0 +item_count = 10 +popup/item_0/text = "none" +popup/item_0/id = 0 +popup/item_1/text = "cross" +popup/item_1/icon = SubResource("AtlasTexture_4fx3s") +popup/item_1/id = 1 +popup/item_2/text = "square" +popup/item_2/icon = SubResource("AtlasTexture_thch8") +popup/item_2/id = 2 +popup/item_3/text = "triangle" +popup/item_3/icon = SubResource("AtlasTexture_um33r") +popup/item_3/id = 3 +popup/item_4/text = "crescent" +popup/item_4/icon = SubResource("AtlasTexture_1bvig") +popup/item_4/id = 4 +popup/item_5/text = "puppy" +popup/item_5/icon = SubResource("AtlasTexture_t81qe") +popup/item_5/id = 5 +popup/item_6/text = "river" +popup/item_6/icon = SubResource("AtlasTexture_703sl") +popup/item_6/id = 6 +popup/item_7/text = "star" +popup/item_7/icon = SubResource("AtlasTexture_cyh1f") +popup/item_7/id = 7 +popup/item_8/text = "chain" +popup/item_8/icon = SubResource("AtlasTexture_kkprq") +popup/item_8/id = 8 +popup/item_9/text = "gust" +popup/item_9/icon = SubResource("AtlasTexture_02lrn") +popup/item_9/id = 9 + +[node name="ItemList5" type="OptionButton" parent="Control"] +layout_mode = 2 +offset_left = -32.0 +offset_top = 104.0 +offset_right = 111.0 +offset_bottom = 165.0 +item_count = 10 +popup/item_0/text = "none" +popup/item_0/id = 0 +popup/item_1/text = "cross" +popup/item_1/icon = SubResource("AtlasTexture_4fx3s") +popup/item_1/id = 1 +popup/item_2/text = "square" +popup/item_2/icon = SubResource("AtlasTexture_thch8") +popup/item_2/id = 2 +popup/item_3/text = "triangle" +popup/item_3/icon = SubResource("AtlasTexture_um33r") +popup/item_3/id = 3 +popup/item_4/text = "crescent" +popup/item_4/icon = SubResource("AtlasTexture_1bvig") +popup/item_4/id = 4 +popup/item_5/text = "puppy" +popup/item_5/icon = SubResource("AtlasTexture_t81qe") +popup/item_5/id = 5 +popup/item_6/text = "river" +popup/item_6/icon = SubResource("AtlasTexture_703sl") +popup/item_6/id = 6 +popup/item_7/text = "star" +popup/item_7/icon = SubResource("AtlasTexture_cyh1f") +popup/item_7/id = 7 +popup/item_8/text = "chain" +popup/item_8/icon = SubResource("AtlasTexture_kkprq") +popup/item_8/id = 8 +popup/item_9/text = "gust" +popup/item_9/icon = SubResource("AtlasTexture_02lrn") +popup/item_9/id = 9 + +[node name="ItemList6" type="OptionButton" parent="Control"] +layout_mode = 2 +offset_left = 115.0 +offset_top = 104.0 +offset_right = 258.0 +offset_bottom = 165.0 +item_count = 10 +popup/item_0/text = "none" +popup/item_0/id = 0 +popup/item_1/text = "cross" +popup/item_1/icon = SubResource("AtlasTexture_4fx3s") +popup/item_1/id = 1 +popup/item_2/text = "square" +popup/item_2/icon = SubResource("AtlasTexture_thch8") +popup/item_2/id = 2 +popup/item_3/text = "triangle" +popup/item_3/icon = SubResource("AtlasTexture_um33r") +popup/item_3/id = 3 +popup/item_4/text = "crescent" +popup/item_4/icon = SubResource("AtlasTexture_1bvig") +popup/item_4/id = 4 +popup/item_5/text = "puppy" +popup/item_5/icon = SubResource("AtlasTexture_t81qe") +popup/item_5/id = 5 +popup/item_6/text = "river" +popup/item_6/icon = SubResource("AtlasTexture_703sl") +popup/item_6/id = 6 +popup/item_7/text = "star" +popup/item_7/icon = SubResource("AtlasTexture_cyh1f") +popup/item_7/id = 7 +popup/item_8/text = "chain" +popup/item_8/icon = SubResource("AtlasTexture_kkprq") +popup/item_8/id = 8 +popup/item_9/text = "gust" +popup/item_9/icon = SubResource("AtlasTexture_02lrn") +popup/item_9/id = 9 + +[node name="LineEdit" type="LineEdit" parent="Control"] +layout_mode = 0 +offset_left = 29.0 +offset_top = -111.0 +offset_right = 188.0 +offset_bottom = -69.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_colors/font_placeholder_color = Color(0, 0, 0, 0.537255) +theme_override_font_sizes/font_size = 24 +text = "Task 1" +placeholder_text = "Task name" +alignment = 1 +flat = true + +[node name="LineEdit2" type="LineEdit" parent="Control"] +layout_mode = 0 +offset_left = -58.0 +offset_top = -112.0 +offset_right = 38.0 +offset_bottom = -70.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_colors/font_placeholder_color = Color(0, 0, 0, 0.537255) +theme_override_font_sizes/font_size = 24 +placeholder_text = "99" +alignment = 1 +flat = true + +[node name="TextureButton2" type="TextureButton" parent="Control"] +layout_mode = 0 +offset_left = 226.0 +offset_top = -91.0 +offset_right = 266.0 +offset_bottom = -51.0 +scale = Vector2(1.25, 1.25) +toggle_mode = true +button_pressed = true +texture_pressed = ExtResource("5_wfdti") +flip_v = true + +[node name="TextureButton" type="TextureButton" parent="Control"] +layout_mode = 0 +offset_left = 227.0 +offset_top = -88.0 +offset_right = 267.0 +offset_bottom = -48.0 +rotation = -1.57079 +scale = Vector2(1.25, 1.25) +toggle_mode = true +button_pressed = true +texture_pressed = ExtResource("5_wfdti") +flip_v = true + +[node name="TextureButton4" type="TextureButton" parent="Control"] +layout_mode = 0 +offset_left = 228.0 +offset_top = -89.0 +offset_right = 268.0 +offset_bottom = -49.0 +rotation = -3.14159 +scale = Vector2(1.25, 1.25) +toggle_mode = true +button_pressed = true +texture_pressed = ExtResource("5_wfdti") +flip_v = true + +[node name="TextureButton3" type="TextureButton" parent="Control"] +layout_mode = 0 +offset_left = 228.0 +offset_top = -91.0 +offset_right = 268.0 +offset_bottom = -51.0 +rotation = -4.71238 +scale = Vector2(1.25, 1.25) +toggle_mode = true +button_pressed = true +texture_pressed = ExtResource("5_wfdti") +flip_v = true + +[node name="card_count" type="Label" parent="."] +offset_left = -739.0 +offset_top = 229.0 +offset_right = -687.0 +offset_bottom = 255.0 +text = "24/100" + +[connection signal="button_down" from="generate" to="." method="generate_card_from_buttons"] +[connection signal="button_down" from="new" to="." method="new_deck"] +[connection signal="button_up" from="new2" to="." method="_on_new_2_button_up"] +[connection signal="button_down" from="load" to="." method="load_deck"] +[connection signal="button_down" from="save" to="." method="save_deck"] +[connection signal="button_down" from="edit" to="." method="edit_card"] +[connection signal="button_down" from="delete" to="." method="delete_card"] +[connection signal="button_down" from="prev" to="." method="select_prev"] +[connection signal="button_down" from="next" to="." method="select_next"] diff --git a/Scenes/gameplay.tscn b/Scenes/gameplay.tscn new file mode 100644 index 0000000..6224cfe --- /dev/null +++ b/Scenes/gameplay.tscn @@ -0,0 +1,56 @@ +[gd_scene load_steps=2 format=3 uid="uid://b33xjpvgbjl08"] + +[ext_resource type="Script" path="res://Scenes/network_lobby.gd" id="1_yetq7"] + +[node name="Root" type="Node2D"] +script = ExtResource("1_yetq7") + +[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="."] +_spawnable_scenes = PackedStringArray("res://Scenes/player.tscn", "res://Scenes/board.tscn") +spawn_path = NodePath("../Network") + +[node name="Network" type="Node" parent="."] + +[node name="UI" type="VBoxContainer" parent="."] +offset_right = 116.0 +offset_bottom = 136.0 + +[node name="IPField" type="LineEdit" parent="UI"] +layout_mode = 2 +placeholder_text = "localhost" +alignment = 2 + +[node name="PortField" type="LineEdit" parent="UI"] +layout_mode = 2 +placeholder_text = "58008" +alignment = 2 + +[node name="Connect" type="Button" parent="UI"] +layout_mode = 2 +text = "Connect" + +[node name="Host" type="Button" parent="UI"] +layout_mode = 2 +text = "Host" + +[node name="SinglePlayer" type="Button" parent="UI"] +layout_mode = 2 +text = "SinglePlayer" + +[node name="TablePosition1" type="Node2D" parent="."] +position = Vector2(-2, 1475) + +[node name="TablePosition2" type="Node2D" parent="."] +position = Vector2(1922, 1475) + +[node name="TablePosition3" type="Node2D" parent="."] +position = Vector2(-2, -339) +rotation = 3.14159 + +[node name="TablePosition4" type="Node2D" parent="."] +position = Vector2(1922, -339) +rotation = 3.14159 + +[connection signal="pressed" from="UI/Connect" to="." method="connect_to_server"] +[connection signal="pressed" from="UI/Host" to="." method="host_server"] +[connection signal="pressed" from="UI/SinglePlayer" to="." method="_on_single_player_pressed"] diff --git a/Scenes/icon_button.tscn b/Scenes/icon_button.tscn new file mode 100644 index 0000000..f96697f --- /dev/null +++ b/Scenes/icon_button.tscn @@ -0,0 +1,31 @@ +[gd_scene load_steps=5 format=3 uid="uid://b41yu27wmglap"] + +[ext_resource type="Script" path="res://Scripts/icon_button.gd" id="1_0fxs0"] +[ext_resource type="Texture2D" uid="uid://c2oy6ox1ukog8" path="res://Assets/frame.png" id="2_n5xcj"] +[ext_resource type="Texture2D" uid="uid://b5anmd3k3fuui" path="res://Assets/goldring.png" id="3_ouhcr"] +[ext_resource type="Texture2D" uid="uid://cw373mc2nyf0t" path="res://Assets/redring.png" id="4_0e655"] + +[node name="TextureButton" type="TextureButton"] +offset_right = 164.0 +offset_bottom = 176.0 +button_mask = 3 +script = ExtResource("1_0fxs0") + +[node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(87, 87) +scale = Vector2(3.5, 3.5) +texture = ExtResource("2_n5xcj") + +[node name="Sprite2D2" type="Sprite2D" parent="."] +visible = false +position = Vector2(87, 88) +scale = Vector2(3.5, 3.5) +texture = ExtResource("3_ouhcr") + +[node name="Sprite2D3" type="Sprite2D" parent="."] +visible = false +position = Vector2(87, 88) +scale = Vector2(3.5, 3.5) +texture = ExtResource("4_0e655") + +[connection signal="gui_input" from="." to="." method="_on_gui_input"] diff --git a/Scenes/main_menu.tscn b/Scenes/main_menu.tscn new file mode 100644 index 0000000..cddb88a --- /dev/null +++ b/Scenes/main_menu.tscn @@ -0,0 +1,78 @@ +[gd_scene load_steps=2 format=3 uid="uid://cohkyvbxr2gnh"] + +[ext_resource type="Script" path="res://Scripts/main_menu.gd" id="1_cg0id"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_cg0id") + +[node name="Title" type="Label" parent="."] +layout_mode = 0 +offset_left = 462.0 +offset_top = 67.0 +offset_right = 1395.0 +offset_bottom = 246.0 +theme_override_font_sizes/font_size = 129 +text = "Lexi's Game" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Play Game" type="Button" parent="."] +layout_mode = 0 +offset_left = 740.0 +offset_top = 297.0 +offset_right = 1094.0 +offset_bottom = 460.0 +theme_override_font_sizes/font_size = 40 +text = "Play" + +[node name="Worker Deck" type="Button" parent="."] +visible = false +layout_mode = 0 +offset_left = 740.0 +offset_top = 569.0 +offset_right = 1094.0 +offset_bottom = 732.0 +theme_override_font_sizes/font_size = 40 +text = "worker deck +dev tool" + +[node name="Task Deck" type="Button" parent="."] +visible = false +layout_mode = 0 +offset_left = 740.0 +offset_top = 745.0 +offset_right = 1094.0 +offset_bottom = 908.0 +theme_override_font_sizes/font_size = 40 +text = "task deck +dev tool" + +[node name="CheckButton" type="CheckButton" parent="."] +layout_mode = 0 +offset_left = 1009.0 +offset_top = 491.0 +offset_right = 1053.0 +offset_bottom = 515.0 +scale = Vector2(2, 2) + +[node name="Label" type="Label" parent="."] +layout_mode = 0 +offset_left = 738.0 +offset_top = 482.0 +offset_right = 1002.0 +offset_bottom = 540.0 +theme_override_font_sizes/font_size = 35 +text = "Show dev tools" +horizontal_alignment = 1 +vertical_alignment = 1 + +[connection signal="pressed" from="Play Game" to="." method="_on_play_game_pressed"] +[connection signal="pressed" from="Worker Deck" to="." method="_on_button_pressed"] +[connection signal="pressed" from="Task Deck" to="." method="_on_button_2_pressed"] +[connection signal="toggled" from="CheckButton" to="." method="_on_check_button_toggled"] diff --git a/Scenes/network_lobby.gd b/Scenes/network_lobby.gd new file mode 100644 index 0000000..eb30e78 --- /dev/null +++ b/Scenes/network_lobby.gd @@ -0,0 +1,62 @@ +extends Node2D + +const SERVER_PORT := 58008 +const MAX_PLAYERS := 4 + +var player_scene = preload("res://Scenes/player.tscn") +var board_scene = preload("res://Scenes/board.tscn") + +@export var seats : Array[Node2D] = [null, null, null, null] +var enet_peer = ENetMultiplayerPeer.new() +var board : Board +var players_connected = 0 + + +func _ready() -> void: + seats[0] = $TablePosition1 + seats[1] = $TablePosition2 + seats[2] = $TablePosition3 + seats[3] = $TablePosition4 + + +func host_server() -> void: + $UI.visible = false + + enet_peer.create_server(SERVER_PORT, MAX_PLAYERS) + multiplayer.multiplayer_peer = enet_peer + + multiplayer.peer_connected.connect(create_player) + create_player(multiplayer.get_unique_id()) + + +func connect_to_server() -> void: + $UI.visible = false + + var ip = $UI/IPField.text if $UI/IPField.text != "" else $UI/IPField.placeholder_text + var port = $UI/PortField.text if $UI/PortField.text != "" else $UI/PortField.placeholder_text + enet_peer.create_client(ip, int(port)) + multiplayer.multiplayer_peer = enet_peer + + +func create_player(id): + if board == null: + board = board_scene.instantiate() as Board + $Network.add_child(board) + var player = player_scene.instantiate() as Player + player.set_name(str(id)) + player.set_multiplayer_authority(id) + player.position = seats[players_connected].position + player.rotation = seats[players_connected].rotation + $Network.add_child(player) + player.rpc("attach_board", board.get_path()) + players_connected += 1 + + +func _on_single_player_pressed() -> void: + $UI.visible = false + board = board_scene.instantiate() as Board + add_child(board) + var player = player_scene.instantiate() as Player + add_child(player) + player.attach_board(board.get_path()) + diff --git a/Scenes/player.tscn b/Scenes/player.tscn new file mode 100644 index 0000000..dc605fa --- /dev/null +++ b/Scenes/player.tscn @@ -0,0 +1,278 @@ +[gd_scene load_steps=7 format=3 uid="uid://cuptyfol5sy52"] + +[ext_resource type="Script" path="res://Scripts/player.gd" id="1_5kyvf"] +[ext_resource type="PackedScene" uid="uid://baoec8cqmedf6" path="res://Scenes/worker_slot.tscn" id="2_ugx0h"] +[ext_resource type="PackedScene" uid="uid://y2i3u6n1oowh" path="res://Scenes/card_pile.tscn" id="3_gwbfn"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_78syh"] +size = Vector2(920, 268) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_vw0g8"] +size = Vector2(308, 269) + +[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_jxmks"] +properties/0/path = NodePath(".:position") +properties/0/spawn = true +properties/0/sync = true + +[node name="Player" type="Node2D"] +script = ExtResource("1_5kyvf") +seconds_to_hide_hand = 0.3 +seconds_to_show_hand = 0.3 + +[node name="Camera2D" type="Camera2D" parent="."] + +[node name="Money" type="Label" parent="Camera2D"] +offset_left = -860.0 +offset_top = -154.0 +offset_right = -803.0 +offset_bottom = -14.0 +theme_override_font_sizes/font_size = 80 +text = "$" + +[node name="Payout" type="Label" parent="Camera2D"] +offset_left = -624.0 +offset_top = -154.0 +offset_right = -567.0 +offset_bottom = -14.0 +theme_override_colors/font_color = Color(0, 0.858824, 0, 1) +theme_override_font_sizes/font_size = 80 + +[node name="Cost" type="Label" parent="Camera2D"] +offset_left = -624.0 +offset_top = -154.0 +offset_right = -567.0 +offset_bottom = -14.0 +theme_override_colors/font_color = Color(0.839216, 0, 0.105882, 1) +theme_override_font_sizes/font_size = 80 + +[node name="PhaseLabel" type="Label" parent="Camera2D"] +offset_left = -151.0 +offset_top = -518.0 +offset_right = 117.0 +offset_bottom = -476.0 +theme_override_font_sizes/font_size = 28 +text = "Management Phase" + +[node name="EndManagement" type="Button" parent="Camera2D"] +offset_left = 138.0 +offset_top = -530.0 +offset_right = 483.0 +offset_bottom = -467.0 +theme_override_font_sizes/font_size = 40 +text = "End Management" + +[node name="EndShift" type="Button" parent="Camera2D"] +visible = false +offset_left = 138.0 +offset_top = -530.0 +offset_right = 317.0 +offset_bottom = -467.0 +theme_override_font_sizes/font_size = 40 +text = "End Shift +" + +[node name="EndTurn" type="Button" parent="Camera2D"] +visible = false +offset_left = 699.0 +offset_top = -525.0 +offset_right = 879.0 +offset_bottom = -462.0 +theme_override_font_sizes/font_size = 40 +text = "End Turn" + +[node name="EndDraft" type="Button" parent="Camera2D"] +visible = false +offset_left = -214.0 +offset_top = 275.0 +offset_right = 184.0 +offset_bottom = 420.0 +theme_override_font_sizes/font_size = 100 +text = "Confirm" + +[node name="CancelDraft" type="Button" parent="Camera2D"] +visible = false +offset_left = -435.0 +offset_top = 313.0 +offset_right = -266.0 +offset_bottom = 390.0 +theme_override_font_sizes/font_size = 50 +text = "Cancel" + +[node name="RoundCounter" type="Label" parent="Camera2D"] +offset_left = -410.0 +offset_top = -519.0 +offset_right = -308.0 +offset_bottom = -482.0 +theme_override_font_sizes/font_size = 24 +text = "Round: 1" + +[node name="TurnCounter" type="Label" parent="Camera2D"] +visible = false +offset_left = -545.0 +offset_top = -518.0 +offset_right = -491.0 +offset_bottom = -481.0 +theme_override_font_sizes/font_size = 24 +text = "Turn: 1" + +[node name="States" type="Node2D" parent="."] + +[node name="Draft" type="Node2D" parent="States"] + +[node name="Setup" type="Node2D" parent="States"] + +[node name="Management" type="Node2D" parent="States"] + +[node name="Worker" type="Node2D" parent="States"] + +[node name="HoldingWorker" type="Node2D" parent="States"] + +[node name="Shift" type="Node2D" parent="States"] + +[node name="HoldingClient" type="Node2D" parent="States"] + +[node name="RosterSection" type="Node2D" parent="."] + +[node name="Position1" type="Node2D" parent="RosterSection"] +position = Vector2(-489, 525) + +[node name="Position2" type="Node2D" parent="RosterSection"] +position = Vector2(-238, 525) + +[node name="Position3" type="Node2D" parent="RosterSection"] +position = Vector2(13, 525) + +[node name="Position4" type="Node2D" parent="RosterSection"] +position = Vector2(263, 525) + +[node name="Position5" type="Node2D" parent="RosterSection"] +position = Vector2(516, 525) + +[node name="Position6" type="Node2D" parent="RosterSection"] +position = Vector2(-489, 886) + +[node name="Position7" type="Node2D" parent="RosterSection"] +position = Vector2(-238, 886) + +[node name="Position8" type="Node2D" parent="RosterSection"] +position = Vector2(13, 886) + +[node name="Position9" type="Node2D" parent="RosterSection"] +position = Vector2(263, 886) + +[node name="Position10" type="Node2D" parent="RosterSection"] +position = Vector2(516, 886) + +[node name="Position11" type="Node2D" parent="RosterSection"] +position = Vector2(-489, 1201) + +[node name="Position12" type="Node2D" parent="RosterSection"] +position = Vector2(-238, 1201) + +[node name="Position13" type="Node2D" parent="RosterSection"] +position = Vector2(13, 1201) + +[node name="Position14" type="Node2D" parent="RosterSection"] +position = Vector2(263, 1201) + +[node name="Position15" type="Node2D" parent="RosterSection"] +position = Vector2(516, 1201) + +[node name="WorkerPlaySlots" type="Node2D" parent="."] + +[node name="Slot1" parent="WorkerPlaySlots" instance=ExtResource("2_ugx0h")] +position = Vector2(-631, 169) +scale = Vector2(1.5, 1.5) + +[node name="Slot2" parent="WorkerPlaySlots" instance=ExtResource("2_ugx0h")] +position = Vector2(-317, 169) +scale = Vector2(1.5, 1.5) + +[node name="Slot3" parent="WorkerPlaySlots" instance=ExtResource("2_ugx0h")] +position = Vector2(0, 169) +scale = Vector2(1.5, 1.5) + +[node name="Slot4" parent="WorkerPlaySlots" instance=ExtResource("2_ugx0h")] +position = Vector2(317, 169) +scale = Vector2(1.5, 1.5) + +[node name="Slot5" parent="WorkerPlaySlots" instance=ExtResource("2_ugx0h")] +position = Vector2(629, 169) +scale = Vector2(1.5, 1.5) + +[node name="TaskDrawDeck" parent="." instance=ExtResource("3_gwbfn")] +position = Vector2(500, -400) +scale = Vector2(1.5, 1.5) + +[node name="Count" type="Label" parent="TaskDrawDeck"] +offset_left = -0.666656 +offset_top = -25.3333 +offset_right = 39.3333 +offset_bottom = 0.666687 +text = "0" + +[node name="PoorDiscardPile" parent="." instance=ExtResource("3_gwbfn")] +position = Vector2(-800, -400) +scale = Vector2(1.5, 1.5) + +[node name="GoodDiscardPile" parent="." instance=ExtResource("3_gwbfn")] +position = Vector2(-400, -400) +scale = Vector2(1.5, 1.5) + +[node name="GreatDiscardPile" parent="." instance=ExtResource("3_gwbfn")] +position = Vector2(6.10352e-05, -400) +scale = Vector2(1.5, 1.5) + +[node name="RosterButton" type="Area2D" parent="."] +position = Vector2(0, 476) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="RosterButton"] +position = Vector2(13, 19) +shape = SubResource("RectangleShape2D_78syh") + +[node name="ReturnButton" type="Area2D" parent="."] +visible = false +position = Vector2(-844, 180) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="ReturnButton"] +position = Vector2(-68, 2) +shape = SubResource("RectangleShape2D_vw0g8") +disabled = true + +[node name="Label" type="Label" parent="ReturnButton"] +offset_left = -45.0 +offset_top = 54.0 +offset_right = 5.0 +offset_bottom = 80.0 +text = "return" + +[node name="HireWorkerButton" type="Button" parent="."] +offset_left = 629.0 +offset_top = -103.0 +offset_right = 833.0 +offset_bottom = -54.0 +theme_override_font_sizes/font_size = 24 +text = "Hire Worker: $60" + +[node name="PreviewTask" type="Node2D" parent="."] +position = Vector2(-154, -346) + +[node name="Hand" type="Node2D" parent="."] +position = Vector2(0, 612) + +[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."] +replication_config = SubResource("SceneReplicationConfig_jxmks") + +[connection signal="pressed" from="Camera2D/EndManagement" to="." method="enter_shift_overview_state"] +[connection signal="pressed" from="Camera2D/EndShift" to="." method="enter_management_overview_state"] +[connection signal="pressed" from="Camera2D/EndTurn" to="." method="enter_shift_overview_state"] +[connection signal="pressed" from="Camera2D/EndDraft" to="." method="confirm_draft"] +[connection signal="pressed" from="Camera2D/CancelDraft" to="." method="cancel_draft"] +[connection signal="button_pushed" from="TaskDrawDeck" to="." method="_on_task_draw_deck_button_pushed"] +[connection signal="button_pushed" from="PoorDiscardPile" to="." method="move_to_poor_discard"] +[connection signal="input_event" from="RosterButton" to="." method="_on_area_2d_input_event"] +[connection signal="mouse_entered" from="RosterButton" to="." method="lift_hand"] +[connection signal="mouse_exited" from="RosterButton" to="." method="drop_hand"] +[connection signal="input_event" from="ReturnButton" to="." method="_on_area_2d_2_input_event"] +[connection signal="pressed" from="HireWorkerButton" to="." method="_on_hire_button_pressed"] diff --git a/Scenes/worker_card.tscn b/Scenes/worker_card.tscn new file mode 100644 index 0000000..ff3a168 --- /dev/null +++ b/Scenes/worker_card.tscn @@ -0,0 +1,165 @@ +[gd_scene load_steps=12 format=3 uid="uid://dxs1dlcnwxx5g"] + +[ext_resource type="Script" path="res://Scripts/worker.gd" id="1_bry7w"] +[ext_resource type="Texture2D" uid="uid://b5lwogcrjwpfj" path="res://Assets/card.png" id="2_taqnr"] +[ext_resource type="Texture2D" uid="uid://b4qqaaqnfnlft" path="res://Assets/icons.png" id="3_pj1i6"] +[ext_resource type="Texture2D" uid="uid://c2oy6ox1ukog8" path="res://Assets/frame.png" id="4_rce5w"] +[ext_resource type="Texture2D" uid="uid://b4lont873b556" path="res://Assets/super.png" id="5_a2bm7"] + +[sub_resource type="Curve" id="Curve_7kl8o"] +min_value = -1.0 +_data = [Vector2(0, -1), 0.0, 2.0, 0, 1, Vector2(1, 1), 2.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="Curve" id="Curve_b6tcq"] +_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.5, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 3 + +[sub_resource type="Curve" id="Curve_scedo"] +min_value = -1.0 +_data = [Vector2(0, -1), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="LabelSettings" id="LabelSettings_xciys"] +font_size = 25 +shadow_size = 0 + +[sub_resource type="LabelSettings" id="LabelSettings_88ebh"] +font_size = 24 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_awcy0"] +size = Vector2(250, 350) + +[node name="Card" type="Node2D"] +position = Vector2(125, 175) +script = ExtResource("1_bry7w") +spread_curve = SubResource("Curve_7kl8o") +height_curve = SubResource("Curve_b6tcq") +rotation_curve = SubResource("Curve_scedo") +hand_width = 300.0 +hand_height = 80.0 +hand_rotation = 0.2 + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture_filter = 1 +texture = ExtResource("2_taqnr") + +[node name="Title" type="Label" parent="Sprite2D"] +modulate = Color(0, 0, 0, 1) +texture_filter = 1 +offset_left = -117.0 +offset_top = -167.0 +offset_right = 117.0 +offset_bottom = -129.0 +text = "Card Title" +label_settings = SubResource("LabelSettings_xciys") +horizontal_alignment = 1 +vertical_alignment = 1 +uppercase = true + +[node name="Capacity" type="Label" parent="Sprite2D"] +modulate = Color(0, 0, 0, 1) +texture_filter = 1 +offset_left = 77.0 +offset_top = 126.0 +offset_right = 114.0 +offset_bottom = 163.0 +text = "99" +label_settings = SubResource("LabelSettings_88ebh") +horizontal_alignment = 1 +vertical_alignment = 1 +uppercase = true + +[node name="Bonus1" type="Node2D" parent="Sprite2D"] + +[node name="Icon1" type="Sprite2D" parent="Sprite2D/Bonus1"] +visible = false +position = Vector2(-98, 148) +texture = ExtResource("3_pj1i6") +region_enabled = true +region_rect = Rect2(0, 0, 32, 32) + +[node name="frame1" type="Sprite2D" parent="Sprite2D/Bonus1"] +position = Vector2(-99, 145) +texture = ExtResource("4_rce5w") +region_rect = Rect2(0, 0, 32, 32) + +[node name="super1" type="Sprite2D" parent="Sprite2D/Bonus1"] +visible = false +position = Vector2(-98, 145) +texture = ExtResource("5_a2bm7") +region_rect = Rect2(0, 0, 32, 32) + +[node name="Bonus2" type="Node2D" parent="Sprite2D"] + +[node name="Icon2" type="Sprite2D" parent="Sprite2D/Bonus2"] +visible = false +position = Vector2(-53, 148) +texture = ExtResource("3_pj1i6") +region_enabled = true +region_rect = Rect2(0, 0, 32, 32) + +[node name="frame2" type="Sprite2D" parent="Sprite2D/Bonus2"] +position = Vector2(-52, 145) +texture = ExtResource("4_rce5w") +region_rect = Rect2(0, 0, 32, 32) + +[node name="super2" type="Sprite2D" parent="Sprite2D/Bonus2"] +visible = false +position = Vector2(-52, 145) +texture = ExtResource("5_a2bm7") +region_rect = Rect2(0, 0, 32, 32) + +[node name="Bonus3" type="Node2D" parent="Sprite2D"] + +[node name="Icon3" type="Sprite2D" parent="Sprite2D/Bonus3"] +visible = false +position = Vector2(-7, 148) +texture = ExtResource("3_pj1i6") +region_enabled = true +region_rect = Rect2(0, 0, 32, 32) + +[node name="frame3" type="Sprite2D" parent="Sprite2D/Bonus3"] +position = Vector2(-6, 145) +texture = ExtResource("4_rce5w") +region_rect = Rect2(0, 0, 32, 32) + +[node name="super3" type="Sprite2D" parent="Sprite2D/Bonus3"] +visible = false +position = Vector2(-6, 145) +texture = ExtResource("5_a2bm7") +region_rect = Rect2(0, 0, 32, 32) + +[node name="Bonus4" type="Node2D" parent="Sprite2D"] + +[node name="Icon4" type="Sprite2D" parent="Sprite2D/Bonus4"] +visible = false +position = Vector2(39, 148) +texture = ExtResource("3_pj1i6") +region_enabled = true +region_rect = Rect2(0, 0, 32, 32) + +[node name="frame4" type="Sprite2D" parent="Sprite2D/Bonus4"] +position = Vector2(40, 145) +texture = ExtResource("4_rce5w") +region_rect = Rect2(0, 0, 32, 32) + +[node name="super4" type="Sprite2D" parent="Sprite2D/Bonus4"] +visible = false +position = Vector2(40, 145) +texture = ExtResource("5_a2bm7") +region_rect = Rect2(0, 0, 32, 32) + +[node name="Area2D" type="Area2D" parent="." groups=["Card"]] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +shape = SubResource("RectangleShape2D_awcy0") + +[node name="Label" type="Label" parent="."] +offset_left = 127.0 +offset_top = 153.0 +offset_right = 167.0 +offset_bottom = 179.0 +text = "0" + +[connection signal="input_event" from="Area2D" to="." method="_on_area_2d_input_event"] diff --git a/Scenes/worker_editor.tscn b/Scenes/worker_editor.tscn new file mode 100644 index 0000000..77903b1 --- /dev/null +++ b/Scenes/worker_editor.tscn @@ -0,0 +1,405 @@ +[gd_scene load_steps=4 format=3 uid="uid://dec4wcfgxajg5"] + +[ext_resource type="Script" path="res://Scripts/card_crafter.gd" id="1_vn0ae"] +[ext_resource type="Texture2D" uid="uid://d127pfpldgh1l" path="res://Assets/generatordesign.png" id="2_1kq1c"] +[ext_resource type="PackedScene" uid="uid://b41yu27wmglap" path="res://Scenes/icon_button.tscn" id="3_421r6"] + +[node name="Card Crafter" type="Node2D"] +script = ExtResource("1_vn0ae") + +[node name="main_camera" type="Camera2D" parent="."] + +[node name="background_image" type="Sprite2D" parent="."] +texture = ExtResource("2_1kq1c") + +[node name="generate" type="Button" parent="."] +offset_left = -902.0 +offset_top = -367.0 +offset_right = -527.0 +offset_bottom = -292.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "generate" + +[node name="new" type="Button" parent="."] +offset_left = -902.0 +offset_top = -524.0 +offset_right = -527.0 +offset_bottom = -449.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "new" + +[node name="new2" type="Button" parent="."] +offset_left = 649.0 +offset_top = -524.0 +offset_right = 947.0 +offset_bottom = -466.0 +theme_override_font_sizes/font_size = 28 +action_mode = 0 +text = "Return to Main Menu" + +[node name="load" type="Button" parent="."] +offset_left = -711.0 +offset_top = -446.0 +offset_right = -527.0 +offset_bottom = -371.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "load" + +[node name="save" type="Button" parent="."] +offset_left = -902.0 +offset_top = -446.0 +offset_right = -714.0 +offset_bottom = -371.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "save" + +[node name="edit" type="Button" parent="."] +offset_left = -902.0 +offset_top = 335.0 +offset_right = -523.0 +offset_bottom = 410.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "edit" + +[node name="delete" type="Button" parent="."] +offset_left = -902.0 +offset_top = 414.0 +offset_right = -523.0 +offset_bottom = 489.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "delete" + +[node name="prev" type="Button" parent="."] +offset_left = -902.0 +offset_top = 255.0 +offset_right = -715.0 +offset_bottom = 330.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "prev" + +[node name="next" type="Button" parent="."] +offset_left = -711.0 +offset_top = 255.0 +offset_right = -523.0 +offset_bottom = 330.0 +theme_override_font_sizes/font_size = 34 +action_mode = 0 +text = "next" + +[node name="crossbutton" parent="." instance=ExtResource("3_421r6")] +offset_left = -190.0 +offset_top = -380.0 +offset_right = -27.0 +offset_bottom = -208.0 + +[node name="squarebutton" parent="." instance=ExtResource("3_421r6")] +offset_left = 14.0 +offset_top = -384.0 +offset_right = 178.0 +offset_bottom = -207.0 + +[node name="trianglebutton" parent="." instance=ExtResource("3_421r6")] +offset_left = -346.0 +offset_top = -254.0 +offset_right = -185.0 +offset_bottom = -75.0 + +[node name="crescentbutton" parent="." instance=ExtResource("3_421r6")] +offset_left = 173.0 +offset_top = -248.0 +offset_right = 338.0 +offset_bottom = -76.0 + +[node name="puppybutton" parent="." instance=ExtResource("3_421r6")] +offset_left = -385.0 +offset_top = -52.0 +offset_right = -220.0 +offset_bottom = 127.0 + +[node name="riverbutton" parent="." instance=ExtResource("3_421r6")] +offset_left = 211.0 +offset_top = -49.0 +offset_right = 375.0 +offset_bottom = 128.0 + +[node name="starbutton" parent="." instance=ExtResource("3_421r6")] +offset_left = -280.0 +offset_top = 126.0 +offset_right = -117.0 +offset_bottom = 307.0 + +[node name="chainbutton" parent="." instance=ExtResource("3_421r6")] +offset_left = 104.0 +offset_top = 133.0 +offset_right = 270.0 +offset_bottom = 310.0 + +[node name="gustbutton" parent="." instance=ExtResource("3_421r6")] +offset_left = -84.0 +offset_top = 196.0 +offset_right = 79.0 +offset_bottom = 374.0 + +[node name="eightbutton" parent="." instance=ExtResource("3_421r6")] +offset_left = 421.0 +offset_top = -480.0 +offset_right = 584.0 +offset_bottom = -302.0 + +[node name="tenbutton" parent="." instance=ExtResource("3_421r6")] +offset_left = 789.0 +offset_top = -480.0 +offset_right = 952.0 +offset_bottom = -302.0 + +[node name="twelvebutton" parent="." instance=ExtResource("3_421r6")] +offset_left = 426.0 +offset_top = 257.0 +offset_right = 589.0 +offset_bottom = 435.0 + +[node name="fourteenbutton" parent="." instance=ExtResource("3_421r6")] +offset_left = 789.0 +offset_top = 255.0 +offset_right = 952.0 +offset_bottom = 433.0 + +[node name="crosscount" type="LineEdit" parent="."] +offset_left = -259.0 +offset_top = -443.0 +offset_right = -75.0 +offset_bottom = -368.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="squarecount" type="LineEdit" parent="."] +offset_left = 73.0 +offset_top = -443.0 +offset_right = 257.0 +offset_bottom = -368.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="crescentcount" type="LineEdit" parent="."] +offset_left = 264.0 +offset_top = -285.0 +offset_right = 448.0 +offset_bottom = -210.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="rivercount" type="LineEdit" parent="."] +offset_left = 337.0 +offset_top = 38.0 +offset_right = 521.0 +offset_bottom = 113.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="chaincount" type="LineEdit" parent="."] +offset_left = 202.0 +offset_top = 280.0 +offset_right = 386.0 +offset_bottom = 355.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="gustcount" type="LineEdit" parent="."] +offset_left = -90.0 +offset_top = 395.0 +offset_right = 94.0 +offset_bottom = 470.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="starcount" type="LineEdit" parent="."] +offset_left = -386.0 +offset_top = 282.0 +offset_right = -202.0 +offset_bottom = 357.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="puppycount" type="LineEdit" parent="."] +offset_left = -519.0 +offset_top = 40.0 +offset_right = -335.0 +offset_bottom = 115.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="trianglecount" type="LineEdit" parent="."] +offset_left = -447.0 +offset_top = -284.0 +offset_right = -263.0 +offset_bottom = -209.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="eightcount" type="LineEdit" parent="."] +offset_left = 533.0 +offset_top = -418.0 +offset_right = 717.0 +offset_bottom = -343.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="tencount" type="LineEdit" parent="."] +offset_left = 667.0 +offset_top = -418.0 +offset_right = 851.0 +offset_bottom = -343.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="twelvecount" type="LineEdit" parent="."] +offset_left = 537.0 +offset_top = 318.0 +offset_right = 721.0 +offset_bottom = 393.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="fourteencount" type="LineEdit" parent="."] +offset_left = 664.0 +offset_top = 318.0 +offset_right = 848.0 +offset_bottom = 393.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="onecount" type="LineEdit" parent="."] +offset_left = 689.0 +offset_top = -265.0 +offset_right = 873.0 +offset_bottom = -190.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="twocount" type="LineEdit" parent="."] +offset_left = 689.0 +offset_top = -124.0 +offset_right = 873.0 +offset_bottom = -49.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="threecount" type="LineEdit" parent="."] +offset_left = 689.0 +offset_top = 13.0 +offset_right = 873.0 +offset_bottom = 88.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="fourcount" type="LineEdit" parent="."] +offset_left = 689.0 +offset_top = 157.0 +offset_right = 873.0 +offset_bottom = 232.0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 48 +text = "0" +alignment = 1 +max_length = 2 +flat = true + +[node name="name_box" type="LineEdit" parent="."] +offset_left = -172.0 +offset_top = -525.0 +offset_right = 169.0 +offset_bottom = -458.0 +theme_override_font_sizes/font_size = 38 +text = "worker 1" +placeholder_text = "worker name" +alignment = 1 +clear_button_enabled = true +select_all_on_focus = true + +[node name="card_count" type="Label" parent="."] +offset_left = -739.0 +offset_top = 229.0 +offset_right = -687.0 +offset_bottom = 255.0 +text = "23/100" + +[connection signal="button_down" from="generate" to="." method="generate_card_from_buttons"] +[connection signal="button_down" from="new" to="." method="new_deck"] +[connection signal="button_up" from="new2" to="." method="_on_new_2_button_up"] +[connection signal="button_down" from="load" to="." method="load_deck"] +[connection signal="button_down" from="save" to="." method="save_deck"] +[connection signal="button_down" from="edit" to="." method="edit_card"] +[connection signal="button_down" from="delete" to="." method="delete_card"] +[connection signal="button_down" from="prev" to="." method="select_prev"] +[connection signal="button_down" from="next" to="." method="select_next"] diff --git a/Scenes/worker_slot.tscn b/Scenes/worker_slot.tscn new file mode 100644 index 0000000..3a1c54b --- /dev/null +++ b/Scenes/worker_slot.tscn @@ -0,0 +1,25 @@ +[gd_scene load_steps=3 format=3 uid="uid://baoec8cqmedf6"] + +[ext_resource type="Script" path="res://Scripts/slot_button.gd" id="1_fras1"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_1gv0f"] +size = Vector2(152, 214) + +[node name="Worker Slot" type="Node2D"] +script = ExtResource("1_fras1") + +[node name="Label" type="Label" parent="."] +offset_left = -72.0 +offset_top = -14.0 +offset_right = 72.0 +offset_bottom = 12.0 +text = "Empty Worker Slot" + +[node name="Area2D" type="Area2D" parent="."] +position = Vector2(-76, -103) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(76, 107) +shape = SubResource("RectangleShape2D_1gv0f") + +[connection signal="input_event" from="Area2D" to="." method="_on_area_2d_input_event"] diff --git a/Scripts/board.gd b/Scripts/board.gd new file mode 100644 index 0000000..9bb0e0a --- /dev/null +++ b/Scripts/board.gd @@ -0,0 +1,148 @@ +class_name Board +extends Node2D + +signal turn_started +signal round_started + +const WORKER_DECK_SAVE_PATH = "user://worker_deck.json" +const CLIENT_DECK_SAVE_PATH = "user://client_deck.json" + +var round_num : int = 0 +var turn_num : int = 0 +var _players : Array[Player] = [] +var _readied_players +var _worker_deck : Array[Worker] = [] +var _worker_discard_deck : Array[Worker] = [] +var _client_deck : Array[Client] = [] +var _client_discard_deck : Array[Client] = [] +var _worker_scene = preload("res://Scenes/worker_card.tscn") +var _client_scene = preload("res://Scenes/client_card.tscn") + + +func add_player(player : Player) -> void: + if not _players.has(player): + _players.append(player) + turn_started.connect(player.start_turn) + round_started.connect(player.start_round) + + +func end_turn(): + var ready = true + for x in _players: + if x.turn_completed == false: + ready = false + if ready: + turn_num += 1 + turn_started.emit() + +#========== TODO ============== +#All this shit should be refactored into awaits and signals so each player goes one at a time +#The players camera should be set to the currently acting player when its not their own turn + +func end_round(): + turn_num = 0 + pass + + +func _ready() -> void: + _load_workers() + _load_clients() + + +func draw_worker(amount : int): + return _draw_card(amount, _worker_deck, _worker_discard_deck) + + +func search_and_draw_worker(card : Worker) -> Worker: + var worker = _worker_deck[_worker_deck.find(card)] + _worker_deck.remove_at(_worker_deck.find(card)) + return worker + + +func draw_client(amount): + return _draw_card(amount, _client_deck, _client_discard_deck) + + +func search_and_draw_client(card : Client) -> Client: + var client = _client_deck[_client_deck.find(card)] + _client_deck.remove_at(_client_deck.find(card)) + return client + + +func discard_worker(card : Worker) -> void: + _worker_discard_deck.append(card) + + +func discard_client(card : Client) -> void: + _client_discard_deck.append(card) + + +func _load_workers(): + if !FileAccess.file_exists(WORKER_DECK_SAVE_PATH): + return + var save_game = FileAccess.open(WORKER_DECK_SAVE_PATH, FileAccess.READ) + var card_dict = JSON.parse_string(save_game.get_line()) + for key in card_dict: + var value = card_dict[key] + var card_instance = _worker_scene.instantiate() + #JSON only returns floats so we have to get ints out of the dict + var bonuses = [] + for x in value.slice(1, value.size()): + bonuses.append(int(x)) + card_instance.setup(key, int(value[0]), bonuses) + card_instance.position = Vector2(9999, 9999) + #card_instance.scale = Vector2(1, 1) + #card_instance.visible = false + #card_instance.set_process(false) + #card_instance.card_clicked.connect(select_card) + _worker_deck.append(card_instance) + add_child(card_instance) + _worker_deck.shuffle() + + +func _load_clients(): + if !FileAccess.file_exists(CLIENT_DECK_SAVE_PATH): + return + var save_game = FileAccess.open(CLIENT_DECK_SAVE_PATH, FileAccess.READ) + var card_dict = JSON.parse_string(save_game.get_line()) + for key in card_dict: + var value = card_dict[key] + var card_instance = _client_scene.instantiate() + #JSON only returns floats so we have to get ints out of the dict + var bool_array = [] + var int_array = [] + for x in value.slice(1, 5): + bool_array.append(bool(x)) + for x in value.slice(5, value.size()): + int_array.append(int(x)) + card_instance.setup(key, int(value[0]), bool_array, int_array) + card_instance.position = Vector2(9999, 9999) + #card_instance.scale = Vector2(1, 1) + _client_deck.append(card_instance) + add_child(card_instance) + _client_deck.shuffle() + + +func _draw_card(amount : int, deck, discard): + var array = [] + for x in amount: + if deck.size() == 0: + if discard.size() > 0: + deck.append_array(discard) + discard = [] + deck.shuffle() + else: + break + array.append(deck.pop_back()) + return array + +#Ideas okay? +#Make the client cards have a little progress track thats like how much they like their service right, +#put the poor/good/great blocks along that track, and instead of the services having that each service +#contributes a different number of points along that other track, so the money you recieve for making +#the match can be the same across all clients, but it shows how some clients value one more over the other +#without actually requiring you to have any specific one as long as you have enough turns to get them along +#the track, so a short session with all the perks can be a great service but a less special or less +#stress inducing session needs to be longer so the same worker needs to remain occupied longer, and it gives +#you more to do on your turn because you get to decide what all your little workers do rather than them only +#being interacted with when you're placing down a client card diff --git a/Scripts/bonus_icon.gd b/Scripts/bonus_icon.gd new file mode 100644 index 0000000..324b308 --- /dev/null +++ b/Scripts/bonus_icon.gd @@ -0,0 +1,17 @@ +extends Node2D + +var service = Data.services.CIRCLE + +func get_icon(x): + var y = 0 + if x > 9: + y += (x - 9) * 32 + else: + y += x * 32 + return y + +func set_service(_service): + service = _service + $Label.text = str(Data.service_prices[service]) + $Label.visible = true + $"Icon1".region_rect = Rect2(get_icon(service), 0, 32, 32) diff --git a/Scripts/card.gd b/Scripts/card.gd new file mode 100644 index 0000000..1354569 --- /dev/null +++ b/Scripts/card.gd @@ -0,0 +1,27 @@ +class_name Card +extends Node2D + +var services = [] + +var origin = Vector3(position.x, position.y, rotation) +var destination = null +var sliding = false +var slide_progress = 0.0 +var slide_time = 0.5 + +func slide_to_position(x, y, r, t): + origin = Vector3(position.x, position.y, rotation) + destination = Vector3(x, y, r) + slide_time = t + sliding = true + +func slide(delta): + if slide_progress < slide_time: + slide_progress += delta + var percent = clampf(slide_progress / slide_time, 0.0, 1.0) + position.x = lerpf(origin.x, destination.x, percent) + position.y = lerpf(origin.y, destination.y, percent) + rotation = lerpf(origin.z, destination.z, percent) + else: + sliding = false + slide_progress = 0.0 diff --git a/Scripts/card_crafter.gd b/Scripts/card_crafter.gd new file mode 100644 index 0000000..043bcfd --- /dev/null +++ b/Scripts/card_crafter.gd @@ -0,0 +1,241 @@ +extends Node2D + +var card_scene = preload("res://Scenes/card.tscn") +var icon_order = [0, 1, 3, 5, 7, 8, 6, 4, 2] +var symbol_buttons : Array[TextureButton] = [] +var symbol_count_labels : Array[LineEdit] = [] + +var card_array = [] +var selected_card = 0 +var card_count = 1 + +var WORKER_DECK_SAVE_PATH = "user://worker_deck.json" + +#example card dict entries +#"worker 1": [10, 0] +#"worker 2": [10, 1, 3, 4, 8] + +func _ready(): + #workaround for node array export bug present in Godot 4.0.3.Stable + symbol_buttons.append($"crossbutton") + symbol_buttons.append($"squarebutton") + symbol_buttons.append($"trianglebutton") + symbol_buttons.append($"crescentbutton") + symbol_buttons.append($"puppybutton") + symbol_buttons.append($"riverbutton") + symbol_buttons.append($"starbutton") + symbol_buttons.append($"chainbutton") + symbol_buttons.append($"gustbutton") + symbol_count_labels.append($"crosscount") + symbol_count_labels.append($"squarecount") + symbol_count_labels.append($"trianglecount") + symbol_count_labels.append($"crescentcount") + symbol_count_labels.append($"puppycount") + symbol_count_labels.append($"rivercount") + symbol_count_labels.append($"starcount") + symbol_count_labels.append($"chaincount") + symbol_count_labels.append($"gustcount") + + load_deck() + +func new_deck(): + for x in card_array: + x.queue_free() + card_array = [] + selected_card = 0 + card_count = 1 + $name_box.text = "worker " + str(card_count) + count_traits() + $card_count.text = str(selected_card) + "/" + str(card_array.size()) + +func save_deck(): + var card_dict = {} + for card in card_array: + var int_array = [] + int_array.append(card.capacity) + int_array.append_array(card.services) + card_dict[card.title] = int_array + var save_game = FileAccess.open(WORKER_DECK_SAVE_PATH, FileAccess.WRITE) + var json_string = JSON.stringify(card_dict) + save_game.store_line(json_string) + +func load_deck(): + if !FileAccess.file_exists(WORKER_DECK_SAVE_PATH): + return + new_deck() + var save_game = FileAccess.open(WORKER_DECK_SAVE_PATH, FileAccess.READ) + var card_dict = JSON.parse_string(save_game.get_line()) + for key in card_dict: + var value = card_dict[key] + var card_instance = card_scene.instantiate() + #JSON only returns floats so we have to get ints out of the dict + var bonuses = [] + for x in value.slice(1, value.size()): + bonuses.append(int(x)) + card_instance.setup(key, int(value[0]), bonuses) + card_instance.position = Vector2(-713, -17) + card_instance.scale = Vector2(1.45, 1.45) + card_array.append(card_instance) + card_count += 1 + if card_array.size() > 1: + card_array[selected_card].visible = false + selected_card = card_array.size() - 1 + add_child(card_instance) + $name_box.text = "worker " + str(card_count) + count_traits() + $card_count.text = str(selected_card + 1) + "/" + str(card_array.size()) + +func select_prev(): + if card_array.size() == 0: + return + card_array[selected_card].visible = false + selected_card -= 1 + if selected_card < 0: + selected_card = card_array.size() - 1 + card_array[selected_card].visible = true + for x in 10: + if x == 0: + continue + if !card_array[selected_card].services.has(x): + symbol_buttons[x - 1].set_state(0) + if card_array[selected_card].services.has(x): + symbol_buttons[x - 1].set_state(1) + if card_array[selected_card].services.has((x) + 9): + symbol_buttons[x - 1].set_state(2) + $name_box.text = card_array[selected_card].title + $card_count.text = str(selected_card + 1) + "/" + str(card_array.size()) + +func select_next(): + if card_array.size() == 0: + return + card_array[selected_card].visible = false + selected_card += 1 + if selected_card >= card_array.size(): + selected_card = 0 + card_array[selected_card].visible = true + for x in 10: + if x == 0: + continue + if !card_array[selected_card].services.has(x): + symbol_buttons[x - 1].set_state(0) + if card_array[selected_card].services.has(x): + symbol_buttons[x - 1].set_state(1) + if card_array[selected_card].services.has((x) + 9): + symbol_buttons[x - 1].set_state(2) + $name_box.text = card_array[selected_card].title + $card_count.text = str(selected_card + 1) + "/" + str(card_array.size()) + +func count_traits(): + var capacity_counts = [0, 0, 0, 0] + var slot_counts = [0, 0, 0, 0] + var symbol_counts = [0, 0, 0, 0, 0, 0, 0, 0, 0] + for card in card_array: + match (card.capacity): + 8: + capacity_counts[0] += 1 + 10: + capacity_counts[1] += 1 + 12: + capacity_counts[2] += 1 + 14: + capacity_counts[3] += 1 + match (card.services.size()): + 2: + slot_counts[0] += 1 + 3: + slot_counts[1] += 1 + 4: + slot_counts[2] += 1 + 5: + slot_counts[3] += 1 + for x in 10: + if x == 0: + continue + if x in card.services: + symbol_counts[x-1] += 1 + for x in symbol_count_labels.size(): + symbol_count_labels[x].text = str(symbol_counts[x]) + $eightcount.text = str(capacity_counts[0]) + $tencount.text = str(capacity_counts[1]) + $twelvecount.text = str(capacity_counts[2]) + $fourteencount.text = str(capacity_counts[3]) + $onecount.text = str(slot_counts[0]) + $twocount.text = str(slot_counts[1]) + $threecount.text = str(slot_counts[2]) + $fourcount.text = str(slot_counts[3]) + +func determine_card(): + var array = [] + array.append(Data.services.CIRCLE) + for i in 9: + if symbol_buttons[i].state == 1: + array.append(i + 1) + if symbol_buttons[i].state == 2: + array.append((i + 1) + 9) + if array.size() <= 1 or array.size() > 5: + return + var card = [] + #BUTTONS CONTROLLING STRESS CAPACITY +# if $eightbutton.state == 0 and $tenbutton.state == 0 and $twelvebutton.state == 0 and $fourteenbutton.state == 0: +# return +# if $eightbutton.state != 0: +# card.append(8) +# if $tenbutton.state != 0: +# card.append(10) +# if $twelvebutton.state != 0: +# card.append(12) +# if $fourteenbutton.state != 0: +# card.append(14) + if array.size() == 2: + card.append(14) + if array.size() == 3: + card.append(12) + if array.size() == 4: + card.append(10) + if array.size() == 5: + card.append(8) + for i in 5: + if array.size() > i: + card.append(array[i]) + return card + +func delete_card(): + if card_array.size() == 0: + return + card_array[selected_card].queue_free() + card_array.remove_at(selected_card) + if selected_card > 0: + selected_card -= 1 + if card_array.size() > 0: + card_array[selected_card].visible = true + count_traits() + $card_count.text = str(selected_card + 1) + "/" + str(card_array.size()) + +func edit_card(): + var card = determine_card() + if card == null: + return + card_array[selected_card].setup($name_box.text, card[0], card.slice(1, card.size())) + count_traits() + +func generate_card_from_buttons(): + var card = determine_card() + if card == null: + return + var card_instance = card_scene.instantiate() + card_instance.setup(str($name_box.text), card[0], card.slice(1, card.size())) + card_instance.position = Vector2(-713, -17) + card_instance.scale = Vector2(1.45, 1.45) + card_array.append(card_instance) + card_count += 1 + if card_array.size() > 1: + card_array[selected_card].visible = false + selected_card = card_array.size() - 1 + add_child(card_instance) + $name_box.text = "worker " + str(card_count) + count_traits() + $card_count.text = str(selected_card + 1) + "/" + str(card_array.size()) + + +func _on_new_2_button_up(): + get_tree().change_scene_to_file("res://Scenes/main_menu.tscn") diff --git a/Scripts/client.gd b/Scripts/client.gd new file mode 100644 index 0000000..6b46713 --- /dev/null +++ b/Scripts/client.gd @@ -0,0 +1,114 @@ +class_name Client +extends Card + +enum difficulties {EASY, MEDIUM, HARD} + +var icon_prefab = preload("res://Scenes/bonus_icon.tscn") +var title = "New Task" +var difficulty = difficulties.EASY +var initial_stress = 0 +var turns_left = 4 +var time_slots = [true, true, false, true] +var icon_list = [] + +func _process(delta): + if sliding: + slide(delta) + +func setup(_title, _initial_stress, _time_slots, _services): + if _title != "": + title = _title + initial_stress = _initial_stress + time_slots = _time_slots + if time_slots[0] == true: + $"Control/1turn".visible = true + if time_slots[1] == true: + $"Control/2turn".visible = true + if time_slots[2] == true: + $"Control/3turn".visible = true + if time_slots[3] == true: + $"Control/4turn".visible = true + services = [] + if _services != null and _services != []: + services.append_array(_services) + match services.size(): + 2, 3: + difficulty = difficulties.EASY + 4, 5: + difficulty = difficulties.MEDIUM + 6, 7: + difficulty = difficulties.HARD + $Background/Slice1.visible = false + $Background/Slice2.visible = false + $Background/Slice3.visible = false + $Background/Slice4.visible = false + if time_slots[0] == true: + $Background/Slice1.visible = true + if time_slots[1] == true: + $Background/Slice2.visible = true + if time_slots[2] == true: + $Background/Slice3.visible = true + if time_slots[3] == true: + $Background/Slice4.visible = true + $Background/Title.text = str(title) + $"Background/Initial Stress".text = str(initial_stress) + for x in icon_list: + x.queue_free() + icon_list = [] + match difficulty: + difficulties.EASY: + $easy.visible = true + var array_of_bullshit = [] + array_of_bullshit.append($easy/Standard) + array_of_bullshit.append($easy/Great1) + array_of_bullshit.append($easy/Great2) + for x in array_of_bullshit: + var instance = icon_prefab.instantiate() + icon_list.append(instance) + x.add_child(instance) + difficulties.MEDIUM: + $medium.visible = true + var array_of_bullshit = [] + array_of_bullshit.append($medium/Standard) + array_of_bullshit.append($medium/Good1) + array_of_bullshit.append($medium/Good2) + array_of_bullshit.append($medium/Great1) + array_of_bullshit.append($medium/Great2) + for x in array_of_bullshit: + var instance = icon_prefab.instantiate() + icon_list.append(instance) + x.add_child(instance) + difficulties.HARD: + $hard.visible = true + var array_of_bullshit = [] + array_of_bullshit.append($hard/Standard) + array_of_bullshit.append($hard/Poor1) + array_of_bullshit.append($hard/Poor2) + array_of_bullshit.append($hard/Good1) + array_of_bullshit.append($hard/Good2) + array_of_bullshit.append($hard/Great1) + array_of_bullshit.append($hard/Great2) + for x in array_of_bullshit: + var instance = icon_prefab.instantiate() + icon_list.append(instance) + x.add_child(instance) + for x in icon_list.size(): + if x < services.size(): + icon_list[x].set_service(services[x]) + else: + icon_list[x].visible = false + + +func show_time_selector(): + $Control.visible = true + +func update_counter(): + $"Background/Turns Left Counter".text = str(turns_left) + +signal time_slots_selected + +func _on_turn_pressed(num): + turns_left = num + update_counter() + $Control.visible = false + time_slots_selected.emit() diff --git a/Scripts/client_card_crafter.gd b/Scripts/client_card_crafter.gd new file mode 100644 index 0000000..8125eef --- /dev/null +++ b/Scripts/client_card_crafter.gd @@ -0,0 +1,192 @@ +extends Node2D + +var card_scene = preload("res://Scenes/client_card.tscn") +var icon_order = [0, 1, 3, 5, 7, 8, 6, 4, 2] +var symbol_buttons : Array[TextureButton] = [] +var symbol_count_labels : Array[LineEdit] = [] + +var card_array = [] +var selected_card = 0 +var card_count = 1 + +var CLIENT_DECK_SAVE_PATH = "user://client_deck.json" + +func _ready(): + #workaround for node array export bug present in Godot 4.0.3.Stable + symbol_buttons.append($"crossbutton") + symbol_buttons.append($"squarebutton") + symbol_buttons.append($"trianglebutton") + symbol_buttons.append($"crescentbutton") + symbol_buttons.append($"puppybutton") + symbol_buttons.append($"riverbutton") + symbol_buttons.append($"starbutton") + symbol_buttons.append($"chainbutton") + symbol_buttons.append($"gustbutton") + symbol_count_labels.append($"crosscount") + symbol_count_labels.append($"squarecount") + symbol_count_labels.append($"trianglecount") + symbol_count_labels.append($"crescentcount") + symbol_count_labels.append($"puppycount") + symbol_count_labels.append($"rivercount") + symbol_count_labels.append($"starcount") + symbol_count_labels.append($"chaincount") + symbol_count_labels.append($"gustcount") + + load_deck() + +func new_deck(): + for x in card_array: + x.queue_free() + card_array = [] + selected_card = 0 + card_count = 1 + $Control/LineEdit.text = "client " + str(card_count) + count_traits() + $card_count.text = str(selected_card) + "/" + str(card_array.size()) + +func save_deck(): + var card_dict = {} + for card in card_array: + var array = [] + array.append(card.initial_stress) + array.append_array(card.time_slots) + array.append_array(card.services) + card_dict[card.title] = array + var save_game = FileAccess.open(CLIENT_DECK_SAVE_PATH, FileAccess.WRITE) + var json_string = JSON.stringify(card_dict) + save_game.store_line(json_string) + +func load_deck(): + if !FileAccess.file_exists(CLIENT_DECK_SAVE_PATH): + return + new_deck() + var save_game = FileAccess.open(CLIENT_DECK_SAVE_PATH, FileAccess.READ) + var card_dict = JSON.parse_string(save_game.get_line()) + for key in card_dict: + var value = card_dict[key] + var card_instance = card_scene.instantiate() + #JSON only returns floats so we have to get ints out of the dict + var bool_array = [] + var int_array = [] + for x in value.slice(1, 5): + bool_array.append(bool(x)) + for x in value.slice(5, value.size()): + int_array.append(int(x)) + card_instance.setup(key, int(value[0]), bool_array, int_array) + card_instance.position = Vector2(-927, -176) + card_instance.scale = Vector2(1.288, 1.288) + card_array.append(card_instance) + card_count += 1 + if card_array.size() > 1: + card_array[selected_card].visible = false + selected_card = card_array.size() - 1 + add_child(card_instance) + $Control/LineEdit.text = "task " + str(card_count) + count_traits() + $card_count.text = str(selected_card + 1) + "/" + str(card_array.size()) + +func select_prev(): + if card_array.size() == 0: + return + card_array[selected_card].visible = false + selected_card -= 1 + if selected_card < 0: + selected_card = card_array.size() - 1 + card_array[selected_card].visible = true + $card_count.text = str(selected_card + 1) + "/" + str(card_array.size()) + +func select_next(): + if card_array.size() == 0: + return + card_array[selected_card].visible = false + selected_card += 1 + if selected_card >= card_array.size(): + selected_card = 0 + card_array[selected_card].visible = true + $card_count.text = str(selected_card + 1) + "/" + str(card_array.size()) + +func count_traits(): + var difficulty_counts = [0, 0, 0] + var symbol_counts = [0, 0, 0, 0, 0, 0, 0, 0, 0] + for card in card_array: + match card.difficulty: + 0: + difficulty_counts[0] += 1 + 1: + difficulty_counts[1] += 1 + 2: + difficulty_counts[2] += 1 + for x in 10: + if x == 0: + continue + if x in card.services: + symbol_counts[x - 1] += 1 + for x in symbol_count_labels.size(): + symbol_count_labels[x].text = str(symbol_counts[x]) + $easycount.text = str(difficulty_counts[0]) + $mediumcount.text = str(difficulty_counts[1]) + $hardcount.text = str(difficulty_counts[2]) + +func determine_card(): + var card = [] + card.append(int($Control/LineEdit2.text)) + card.append(bool($Control/TextureButton.button_pressed)) + card.append(bool($Control/TextureButton2.button_pressed)) + card.append(bool($Control/TextureButton3.button_pressed)) + card.append(bool($Control/TextureButton4.button_pressed)) + var services = [Data.services.CIRCLE] + if $Control/ItemList.selected > 0: + services.append($Control/ItemList.selected) + if $Control/ItemList2.selected > 0: + services.append($Control/ItemList2.selected) + if $Control/ItemList3.selected > 0: + services.append($Control/ItemList3.selected) + if $Control/ItemList4.selected > 0: + services.append($Control/ItemList4.selected) + if $Control/ItemList5.selected > 0: + services.append($Control/ItemList5.selected) + if $Control/ItemList6.selected > 0: + services.append($Control/ItemList6.selected) + card.append_array(services) + return card + +func delete_card(): + if card_array.size() == 0: + return + card_array[selected_card].queue_free() + card_array.remove_at(selected_card) + if selected_card > 0: + selected_card -= 1 + if card_array.size() > 0: + card_array[selected_card].visible = true + count_traits() + $card_count.text = str(selected_card + 1) + "/" + str(card_array.size()) + +func edit_card(): + var card = determine_card() + if card == null: + return + card_array[selected_card].setup($Control/LineEdit.text, card[0], card.slice(1, 5), card.slice(5, card.size())) + count_traits() + +func generate_card_from_buttons(): + var card = determine_card() + if card == null: + return + var card_instance = card_scene.instantiate() + card_instance.setup(str($Control/LineEdit.text), card[0], card.slice(1, 5), card.slice(5, card.size())) + card_instance.position = Vector2(-926, -176) + card_instance.scale = Vector2(1.288, 1.288) + card_array.append(card_instance) + card_count += 1 + if card_array.size() > 1: + card_array[selected_card].visible = false + selected_card = card_array.size() - 1 + add_child(card_instance) + $Control/LineEdit.text = "task " + str(card_count) + count_traits() + $card_count.text = str(selected_card + 1) + "/" + str(card_array.size()) + + +func _on_new_2_button_up(): + get_tree().change_scene_to_file("res://Scenes/main_menu.tscn") diff --git a/Scripts/data.gd b/Scripts/data.gd new file mode 100644 index 0000000..f035670 --- /dev/null +++ b/Scripts/data.gd @@ -0,0 +1,8 @@ +extends Node + +enum services { + CIRCLE, CROSS, SQUARE, TRIANGLE, CRESCENT, PUPPY, RIVER, STAR, CHAIN, GUST, + SCROSS, SSQUARE, STRIANGLE, SCRESCENT, SPUPPY, SRIVER, SSTAR, SCHAIN, SGUST +} + +var service_prices = [10, 2, 2, 2, 2, 4, 4, 6, 6, 8] diff --git a/Scripts/icon_button.gd b/Scripts/icon_button.gd new file mode 100644 index 0000000..3171954 --- /dev/null +++ b/Scripts/icon_button.gd @@ -0,0 +1,31 @@ +extends TextureButton + +var state = 0 + +func press(val): + state += val + if state > 2: + state = 0 + if state < 0: + state = 2 + set_state(state) + +func set_state(x): + state = x + $Sprite2D.visible = false + $Sprite2D2.visible = false + $Sprite2D3.visible = false + if state == 0: + $Sprite2D.visible = true + if state == 1: + $Sprite2D2.visible = true + if state == 2: + $Sprite2D3.visible = true + +func _on_gui_input(event): + if event is InputEventMouseButton and event.pressed: + match event.button_mask: + MOUSE_BUTTON_MASK_LEFT: + press(1) + MOUSE_BUTTON_MASK_RIGHT: + press(-1) diff --git a/Scripts/main_menu.gd b/Scripts/main_menu.gd new file mode 100644 index 0000000..f9c1a19 --- /dev/null +++ b/Scripts/main_menu.gd @@ -0,0 +1,18 @@ +extends Control + +func _on_button_pressed(): + get_tree().change_scene_to_file("res://Scenes/worker_editor.tscn") + +func _on_button_2_pressed(): + get_tree().change_scene_to_file("res://Scenes/client_editor.tscn") + +func _on_play_game_pressed(): + get_tree().change_scene_to_file("res://Scenes/gameplay.tscn") + +func _on_check_button_toggled(button_pressed): + if button_pressed: + $"Worker Deck".visible = true + $"Task Deck".visible = true + if not button_pressed: + $"Worker Deck".visible = false + $"Task Deck".visible = false diff --git a/Scripts/player.gd b/Scripts/player.gd new file mode 100644 index 0000000..75f2b60 --- /dev/null +++ b/Scripts/player.gd @@ -0,0 +1,520 @@ +class_name Player +extends Node2D + +signal draft_completed +signal board_attached + +enum FSMState {DRAFT, SETUP, MANAGEMENT, WORKER, H_WORKER, SHIFT, H_CLIENT} +enum DraftType {HIRE_WORKER} + +@export var roster_positions : Array[Node2D] = [] +@export var slot_buttons : Array[Node2D] = [] +@export var seconds_to_hide_hand := 2.0 +@export var seconds_to_show_hand := 2.0 +var money := 0 +var payout := 0 +var cost := 0 +var hire_costs := [40, 50, 60, 70, 80] +var shift_deck : Array[Client] = [] +var workers : Array[Worker] = [] +var hand : Array[Worker] = [] +var active_workers : Array[Worker] = [null, null, null, null, null] +var active_clients : Array[Client] = [null, null, null, null, null] +var poor_discard : Array[Client] = [] +var good_discard : Array[Client] = [] +var great_discard : Array[Client] = [] +var last_fsm_state := FSMState.SETUP +var current_fsm_state := FSMState.SETUP +var draft := DraftType.HIRE_WORKER +var hand_hiding := false +var hand_hidden := false +var hand_hiding_progress := 0.0 +var hand_showing := false +var hand_showing_progress := 0.0 +var shown_for_draft : Array[Worker] = [] +var selected_for_draft : Array[Worker] = [] +var draft_limit := 0 +var current_client : Client +var selected_worker : Worker +var task_drawn := false +var client_assignment : int = -1 +var board : Board = null +var turn_completed = false +var round_completed = false + + +func _ready() -> void: + #Bug in Godot 4.0.3.stable makes it nessesary to add these manually + roster_positions.append($RosterSection/Position1) + roster_positions.append($RosterSection/Position2) + roster_positions.append($RosterSection/Position3) + roster_positions.append($RosterSection/Position4) + roster_positions.append($RosterSection/Position5) + roster_positions.append($RosterSection/Position6) + roster_positions.append($RosterSection/Position7) + roster_positions.append($RosterSection/Position8) + roster_positions.append($RosterSection/Position9) + roster_positions.append($RosterSection/Position10) + roster_positions.append($RosterSection/Position11) + roster_positions.append($RosterSection/Position12) + roster_positions.append($RosterSection/Position13) + roster_positions.append($RosterSection/Position14) + roster_positions.append($RosterSection/Position15) + slot_buttons.append($WorkerPlaySlots/Slot1) + slot_buttons.append($WorkerPlaySlots/Slot2) + slot_buttons.append($WorkerPlaySlots/Slot3) + slot_buttons.append($WorkerPlaySlots/Slot4) + slot_buttons.append($WorkerPlaySlots/Slot5) + for button in slot_buttons: + button.button_pushed.connect(select_slot) + $PoorDiscardPile/Label.text = "No / Poor service" + $GoodDiscardPile/Label.text = "Good service" + $GreatDiscardPile/Label.text = "Great service" + $TaskDrawDeck/Label.text = "Click to draw task card" + $Camera2D.make_current() + await board_attached + enter_setup_state() + + +func _process(delta) -> void: + if (hand_hiding): + if hand_hiding_progress < seconds_to_hide_hand: + hand_hiding_progress += delta + var percent = clampf(hand_hiding_progress / seconds_to_hide_hand, 0.0, 1.0) + for card in hand: + card.hand_position.y = lerpf($Hand.position.y, $Hand.position.y + 300.0, percent) + else: + hand_hiding = false + hand_hidden = true + hand_hiding_progress = 0.0 + if (hand_showing): + if hand_showing_progress < seconds_to_show_hand: + hand_showing_progress += delta + var percent = clampf(hand_showing_progress / seconds_to_show_hand, 0.0, 1.0) + for card in hand: + card.hand_position.y = lerpf($Hand.position.y + 300.0, $Hand.position.y, percent) + else: + hand_showing = false + hand_showing_progress = 0.0 + + +func start_turn(): + pass + + +func start_round(): + pass + + +@rpc("call_local") +func attach_board(board_path : NodePath): + board = get_node(board_path) as Board + board_attached.emit() + + +func add_to_hand(card): + hand.append(card) + for x in hand.size(): + var hand_ratio = 0.5 + + if hand.size() > 1: + hand_ratio = float(x) / float(hand.size() - 1) + hand[x].position = $Hand.position + hand[x].hand_ratio = hand_ratio + hand[x].in_hand = true + hand[x].hand_position = $Hand.position + hand[x].visible = true + hand[x].set_process(true) + + +func lift_hand(): + for card in hand: + card.hovered = true + + +func drop_hand(): + for card in hand: + card.hovered = false + + +func _on_hire_button_pressed(): + if money >= hire_costs[workers.size()]: + money -= hire_costs[workers.size()] + $Camera2D/Money.text = "$" + str(money) + draft_workers(3, 1, true) + await draft_completed + $Button.text = "Hire Worker: $" + str(hire_costs[workers.size()]) + + +func assign_task_to_worker(): + client_assignment = active_workers.find(selected_worker) + if active_clients[client_assignment] != null: + return + current_client.slide_to_position(selected_worker.position.x - 100, selected_worker.position.y - 100, 0.0, 0.3) + current_client.show_time_selector() + await current_client.time_slots_selected + payout = 0 + payout += current_client.turns_left * 2 + for service in current_client.services: + if selected_worker.services.has(service): + payout += Data.service_prices[service] + $Camera2D/Payout.text = "$" + str(payout) + $"Camera2D/EndTurn".visible = true + + +func move_to_poor_discard(_button): + current_client.slide_to_position($PoorDiscardPile.position.x, $PoorDiscardPile.position.y, 0.0, 0.2) + client_assignment = -1 + $Camera2D/EndTurn.visible = true + payout = 0 + $Camera2D/Payout.text = "" + + +func select_card(card): + if current_fsm_state == FSMState.DRAFT: + if selected_for_draft.size() <= draft_limit: + if selected_for_draft.has(card): + selected_for_draft.remove_at(selected_for_draft.find(card)) + card.slide_to_position(card.position.x, card.position.y + 40, 0.0, 0.1) + else: + if selected_for_draft.size() < draft_limit: + selected_for_draft.append(card) + card.slide_to_position(card.position.x, card.position.y - 40, 0.0, 0.1) + return + selected_worker = card + if current_client != null: + assign_task_to_worker() + + +func select_slot(slot): + if selected_worker == null: + return + if active_workers.has(selected_worker): + active_workers[active_workers.find(selected_worker)] = null + if hand.has(selected_worker): + hand.remove_at(hand.find(selected_worker)) + active_workers[slot_buttons.find(slot)] = selected_worker + selected_worker.slide_to_position(slot.position.x, slot.position.y, 0.0, 0.3) + selected_worker = null + +#Shift Phase + #1. Swap 1 time token on each worker over to the stress side + #2. Pick up the next client card in the deck, and either assign it to + # a worker or place it in the no service pile + #3. If a worker both has no client, and at least one stress token, remove + # a stress token + +#Management Phase + #Market Research + #Look at the 10 clients, and place them back in the same order + #Targeted Advertising + #Search through the client discard deck, and add all clients + #with one extra type to your shift deck + #Roster Worker + #Add 1 worker from your hand into the next open slot on your board + + +func _on_area_2d_input_event(_viewport, event, _shape_idx): + if event is InputEventMouseButton and event.pressed: + enter_workers_view_state() + + +func _on_area_2d_2_input_event(_viewport, event, _shape_idx): + if event is InputEventMouseButton and event.pressed: + enter_management_overview_state() + + +func _on_task_draw_deck_button_pushed(_button): + enter_holding_task_state() + + +func evaluate_task_success(num): + var successfulness = 0 + var worker = active_workers[num] + var client = active_clients[num] + match client.services.size(): + 2, 3: + successfulness = 2 + 4: + successfulness = 1 + if worker.services.has(client.services[3]): + successfulness = 2 + 5: + successfulness = 1 + if worker.services.has(client.services[4]): + successfulness = 2 + 6: + successfulness = 0 + if worker.services.has(client.services[3]) or worker.services.has(client.services[4]): + successfulness = 1 + if worker.services.has(client.services[5]): + successfulness = 2 + 7: + successfulness = 0 + if worker.services.has(client.services[3]) or worker.services.has(client.services[4]): + successfulness = 1 + if worker.services.has(client.services[5]) or worker.services.has(client.services[6]): + successfulness = 2 + var slide_destination : Vector2 + match successfulness: + 0: + poor_discard.append(client) + slide_destination = $PoorDiscardPile.position + 1: + good_discard.append(client) + slide_destination = $GoodDiscardPile.position + 2: + great_discard.append(client) + slide_destination = $GreatDiscardPile.position + client.slide_to_position(slide_destination.x, slide_destination.y, 0.0, 0.2) + client.z_index = 0 + active_clients[num] = null + + +func worker_exceeded_capacity(num): + active_workers[num].stress = 0 + active_workers[num].set_process(false) + active_workers[num].visible = false + workers.remove_at(workers.find(active_workers[num])) + active_workers[num] = null + + +func draft_workers(_draw, pick, cancelable): + draft = DraftType.HIRE_WORKER + draft_limit = pick + shown_for_draft = [] + selected_for_draft = [] + var y = 0 + var x = (250.0 * _draw) / 2.0 + shown_for_draft.append_array(board.draw_worker(_draw)) + for i in shown_for_draft.size(): + var card = shown_for_draft[i] + card.visible = true + card.set_process(true) + card.card_clicked.connect(select_card) + var ratio = float(i) / float(_draw - 1) + var xx = lerpf(-1 * x, x, ratio) + card.slide_to_position(xx, y, 0.0, 0.3) + enter_draft_state(cancelable) + + +func pad_shift_deck(): + var padding = (2 + (2 * board.round_num)) - shift_deck.size() + shift_deck.append_array(board.draw_client(padding)) + + +func process_discard_decks(): + poor_discard.shuffle() + good_discard.shuffle() + great_discard.shuffle() + for x in range(poor_discard.size() - 1, -1, -1): + if x == 0: + shift_deck.append(poor_discard[x]) + else: + board.discard_client(poor_discard[x]) + poor_discard[x].position = Vector2(9999, 9999) + poor_discard[x].visible = false + poor_discard.remove_at(x) + for x in range(good_discard.size() - 1, -1, -1): + if x <= int(good_discard.size() / 2.0): + shift_deck.append(good_discard[x]) + else: + board.discard_client(good_discard[x]) + good_discard[x].position = Vector2(9999, 9999) + good_discard[x].visible = false + good_discard.remove_at(x) + for x in range(great_discard.size() - 1, -1, -1): + if x < great_discard.size() - 1: + shift_deck.append(great_discard[x]) + else: + board.discard_client(great_discard[x]) + great_discard[x].position = Vector2(9999, 9999) + great_discard[x].visible = false + great_discard.remove_at(x) + + +func confirm_draft(): + if selected_for_draft.size() != draft_limit: + return + $Camera2D/EndDraft.visible = false + $Camera2D/CancelDraft.visible = false + match(draft): + DraftType.HIRE_WORKER: + for card in selected_for_draft: + add_to_hand(card) + workers.append(card) + shown_for_draft.remove_at(shown_for_draft.find(card)) + for card in shown_for_draft: + card.position = Vector2(9999, 9999) + board.discard_worker(card) + match(last_fsm_state): + FSMState.SETUP, FSMState.MANAGEMENT: + enter_management_overview_state() + draft_completed.emit() + + +func cancel_draft(): + $Camera2D/EndDraft.visible = false + $Camera2D/CancelDraft.visible = false + match(draft): + DraftType.HIRE_WORKER: + for card in shown_for_draft: + card.visible = false + card.set_process(false) + board.discard_worker(board.search_and_draw_worker(card)) + match(last_fsm_state): + FSMState.SETUP, FSMState.MANAGEMENT: + enter_management_overview_state() + draft_completed.emit() + + +func enter_draft_state(cancelable): + last_fsm_state = current_fsm_state + current_fsm_state = FSMState.DRAFT + $Camera2D/PhaseLabel.text = "Choose " + str(draft_limit) + " cards" + $Camera2D/EndManagement.visible = false + $RosterButton/CollisionShape2D.disabled = true + $ReturnButton.visible = false + $ReturnButton/CollisionShape2D.disabled = true + $Camera2D/EndDraft.visible = true + if cancelable: + $Camera2D/CancelDraft.visible = true + + +func enter_setup_state(): + last_fsm_state = current_fsm_state + current_fsm_state = FSMState.SETUP + #money = 100 + $Camera2D/Money.text = "$" + str(money) + draft_workers(4, 2, false) + + +func enter_management_overview_state(): + last_fsm_state = current_fsm_state + current_fsm_state = FSMState.MANAGEMENT + for worker in active_workers: + if worker != null: + worker.decrease_stress(worker.stress) + $Camera2D/RoundCounter.text = "Round: " + str(board.round_num) + $Camera2D/PhaseLabel.text = "Management Phase" + $Camera2D/EndManagement.visible = true + $Camera2D/Cost.visible = true + $Camera2D/EndShift.visible = false + $Camera2D/EndTurn.visible = false + $RosterButton/CollisionShape2D.disabled = false + $WorkerPlaySlots/Slot1.visible = true + $WorkerPlaySlots/Slot2.visible = true + $WorkerPlaySlots/Slot3.visible = true + $WorkerPlaySlots/Slot4.visible = true + $WorkerPlaySlots/Slot5.visible = true + $HireWorkerButton.visible = true + $Camera2D/TurnCounter.visible = false + hand_showing = true + selected_worker = null + $RosterButton/CollisionShape2D.disabled = false + $ReturnButton.visible = false + $ReturnButton/CollisionShape2D.disabled = true + $Camera2D.position.y = 0 + for x in hand.size(): + hand[x].in_hand = true + $TaskDrawDeck/Area2D/CollisionShape2D.disabled = true + $PoorDiscardPile/Area2D/CollisionShape2D.disabled = true + process_discard_decks() + pad_shift_deck() + $TaskDrawDeck/Count.text = str(shift_deck.size()) + + +func enter_workers_view_state(): + last_fsm_state = current_fsm_state + current_fsm_state = FSMState.WORKER + selected_worker = null + $RosterButton/CollisionShape2D.disabled = true + $ReturnButton.visible = true + $ReturnButton/CollisionShape2D.disabled = false + $Camera2D.position.y = 640 + for x in hand.size(): + hand[x].in_hand = false + hand[x].slide_to_position(roster_positions[x].position.x, roster_positions[x].position.y, 0.0, 0.2) + + +func enter_holding_worker_state(): + last_fsm_state = current_fsm_state + current_fsm_state = FSMState.H_WORKER + + +func enter_shift_overview_state(): + last_fsm_state = current_fsm_state + current_fsm_state = FSMState.SHIFT + $Camera2D/TurnCounter.visible = true + $Camera2D/TurnCounter.text = "Turn: " + str(board.turn_num) + $Camera2D/PhaseLabel.text = "Shift Phase" + $Camera2D/EndManagement.visible = false + $RosterButton/CollisionShape2D.disabled = true + $WorkerPlaySlots/Slot1.visible = false + $WorkerPlaySlots/Slot2.visible = false + $WorkerPlaySlots/Slot3.visible = false + $WorkerPlaySlots/Slot4.visible = false + $WorkerPlaySlots/Slot5.visible = false + $ReturnButton.visible = false + $ReturnButton/CollisionShape2D.disabled = true + $Camera2D.position.y = 0 + $Camera2D/Cost.visible = false + $HireWorkerButton.visible = false + for x in hand.size(): + hand[x].in_hand = true + if hand_hidden == false: + hand_hiding = true + $TaskDrawDeck/Area2D/CollisionShape2D.disabled = false + task_drawn = false + money += payout + payout = 0 + if client_assignment != null and current_client != null: + active_clients[client_assignment] = current_client + if active_workers[client_assignment].increase_stress(current_client.initial_stress): + worker_exceeded_capacity(client_assignment) + client_assignment = -1 + current_client = null + elif client_assignment == -1 and current_client != null: + poor_discard.append(current_client) + current_client = null + $Camera2D/Payout.text = "" + $Camera2D/Money.text = "$" + str(money) + $Camera2D/EndTurn.visible = false + $PoorDiscardPile/Area2D/CollisionShape2D.disabled = true + #Pretty sure these are done in the right order even though it looks the wrong way around + for x in active_workers.size(): + if active_workers[x] != null and active_clients[x] == null: + active_workers[x].decrease_stress(1) + if active_workers[x] != null and active_clients[x] != null: + if active_workers[x].increase_stress(1): + worker_exceeded_capacity(x) + active_clients[x].turns_left -= 1 + active_clients[x].update_counter() + if active_clients[x].turns_left == 0: + evaluate_task_success(x) + var tasks_done = true + for client in active_clients: + if client != null: + tasks_done = false + if shift_deck.size() == 0: + if tasks_done: + round_completed = true + #enter_management_overview_state() + else: + $Camera2D/EndTurn.visible = true + $TaskDrawDeck/Area2D/CollisionShape2D.disabled = true + + +func enter_holding_task_state(): + last_fsm_state = current_fsm_state + current_fsm_state = FSMState.H_CLIENT + current_client = shift_deck.pop_back() + current_client.position = Vector2(494, -414) + current_client.visible = true + current_client.z_index = 1 + current_client.slide_to_position($PreviewTask.position.x, $PreviewTask.position.y, 0.0, 0.3) + task_drawn = true + $TaskDrawDeck/Area2D/CollisionShape2D.disabled = true + $PoorDiscardPile/Area2D/CollisionShape2D.disabled = false + $TaskDrawDeck/Count.text = str(shift_deck.size()) + diff --git a/Scripts/slot_button.gd b/Scripts/slot_button.gd new file mode 100644 index 0000000..9b407d4 --- /dev/null +++ b/Scripts/slot_button.gd @@ -0,0 +1,7 @@ +extends Node2D + +signal button_pushed(button) + +func _on_area_2d_input_event(_viewport, event, _shape_idx): + if event is InputEventMouseButton and event.pressed: + emit_signal("button_pushed", self) diff --git a/Scripts/worker.gd b/Scripts/worker.gd new file mode 100644 index 0000000..24f7679 --- /dev/null +++ b/Scripts/worker.gd @@ -0,0 +1,103 @@ +class_name Worker +extends Card + +var title = "New Card" +var max_supers = 2 +var capacity = 8 +var stress = 0 +signal card_clicked(card) +@export var spread_curve : Curve +@export var height_curve : Curve +@export var rotation_curve : Curve +@export var hand_width : float +@export var hand_height : float +@export var hand_rotation : float +var in_hand = false +var hand_ratio +var hand_position = Vector2(0, 0) +var hovered = false + +func _process(delta): + if sliding: + slide(delta) + if in_hand: + position.x = hand_position.x + spread_curve.sample(hand_ratio) * hand_width + position.y = hand_position.y - height_curve.sample(hand_ratio) * hand_height + rotation = rotation_curve.sample(hand_ratio) * hand_rotation + if hovered: + position.y = (hand_position.y - 50.0) - height_curve.sample(hand_ratio) * hand_height + position.x = hand_position.x + spread_curve.sample(hand_ratio) * (hand_width + (hand_width * 0.2)) + rotation = rotation_curve.sample(hand_ratio) * (hand_rotation + (hand_rotation * 0.2)) + +func get_icon(x): + var y = 32 + if x > 8: + y += (x - 9) * 32 + else: + y += x * 32 + return y + +func setup(_title, _capacity, _services): + if _title != "": + title = _title + capacity = _capacity + services = _services + $Sprite2D/Title.text = title + $Sprite2D/Capacity.text = str(capacity) + $Sprite2D/Bonus1/Icon1.visible = false + $Sprite2D/Bonus2/Icon2.visible = false + $Sprite2D/Bonus3/Icon3.visible = false + $Sprite2D/Bonus4/Icon4.visible = false + $Sprite2D/Bonus1/frame1.visible = false + $Sprite2D/Bonus2/frame2.visible = false + $Sprite2D/Bonus3/frame3.visible = false + $Sprite2D/Bonus4/frame4.visible = false + $Sprite2D/Bonus1/super1.visible = false + $Sprite2D/Bonus2/super2.visible = false + $Sprite2D/Bonus3/super3.visible = false + $Sprite2D/Bonus4/super4.visible = false + if services.size() > 1: + $Sprite2D/Bonus1/Icon1.visible = true + #TODO:Eliminate the -1 in the get_icon call + $Sprite2D/Bonus1/Icon1.region_rect = Rect2(get_icon(services[1]-1), 0, 32, 32) + if services[1] > 9: + $Sprite2D/Bonus1/super1.visible = true + else: + $Sprite2D/Bonus1/frame1.visible = true + if services.size() > 2: + $Sprite2D/Bonus2/Icon2.visible = true + $Sprite2D/Bonus2/Icon2.region_rect = Rect2(get_icon(services[2]-1), 0, 32, 32) + if services[2] > 9: + $Sprite2D/Bonus2/super2.visible = true + else: + $Sprite2D/Bonus2/frame2.visible = true + if services.size() > 3: + $Sprite2D/Bonus3/Icon3.visible = true + $Sprite2D/Bonus3/Icon3.region_rect = Rect2(get_icon(services[3]-1), 0, 32, 32) + if services[3] > 9: + $Sprite2D/Bonus3/super3.visible = true + else: + $Sprite2D/Bonus3/frame3.visible = true + if services.size() > 4: + $Sprite2D/Bonus4/Icon4.visible = true + $Sprite2D/Bonus4/Icon4.region_rect = Rect2(get_icon(services[4]-1), 0, 32, 32) + if services[4] > 9: + $Sprite2D/Bonus4/super4.visible = true + else: + $Sprite2D/Bonus4/frame4.visible = true + + +func _on_area_2d_input_event(_viewport, event, _shape_idx): + if event is InputEventMouseButton and event.pressed: + emit_signal("card_clicked", self) + +func increase_stress(amount) -> bool: + stress += amount + $Label.text = str(stress) + return stress > capacity + +func decrease_stress(amount): + stress -= amount + if stress < 0: + stress = 0 + $Label.text = str(stress) diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..3a7c5b6 --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,208 @@ +[preset.0] + +name="Linux/X11" +platform="Linux/X11" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="Project Exports/Linux/card test.x86_64" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_encryption_key="" + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_script=0 +binary_format/embed_pck=false +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=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}\"" + +[preset.1] + +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="Project Exports/Windows/card text.exe" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_encryption_key="" + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_script=1 +binary_format/embed_pck=false +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +binary_format/architecture="x86_64" +codesign/enable=false +codesign/identity_type=0 +codesign/identity="" +codesign/password="" +codesign/timestamp=true +codesign/timestamp_server_url="" +codesign/digest_algorithm=1 +codesign/description="" +codesign/custom_options=PackedStringArray() +application/modify_resources=true +application/icon="" +application/console_wrapper_icon="" +application/icon_interpolation=4 +application/file_version="" +application/product_version="" +application/company_name="" +application/product_name="" +application/file_description="" +application/copyright="" +application/trademarks="" +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="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}' +$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}' +$trigger = New-ScheduledTaskTrigger -Once -At 00:00 +$settings = New-ScheduledTaskSettingsSet +$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings +Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true +Start-ScheduledTask -TaskName godot_remote_debug +while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 } +Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -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 +Remove-Item -Recurse -Force '{temp_dir}'" + +[preset.2] + +name="macOS" +platform="macOS" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="Project Exports/Mac/card test.app" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_encryption_key="" + +[preset.2.options] + +binary_format/architecture="universal" +custom_template/debug="" +custom_template/release="" +debug/export_console_script=1 +application/icon="" +application/icon_interpolation=4 +application/bundle_identifier="" +application/signature="" +application/app_category="Games" +application/short_version="1.0" +application/version="1.0" +application/copyright="" +application/copyright_localized={} +display/high_res=true +codesign/codesign=1 +codesign/identity="" +codesign/certificate_file="" +codesign/certificate_password="" +codesign/entitlements/custom_file="" +codesign/entitlements/allow_jit_code_execution=false +codesign/entitlements/allow_unsigned_executable_memory=false +codesign/entitlements/allow_dyld_environment_variables=false +codesign/entitlements/disable_library_validation=false +codesign/entitlements/audio_input=false +codesign/entitlements/camera=false +codesign/entitlements/location=false +codesign/entitlements/address_book=false +codesign/entitlements/calendars=false +codesign/entitlements/photos_library=false +codesign/entitlements/apple_events=false +codesign/entitlements/debugging=false +codesign/entitlements/app_sandbox/enabled=false +codesign/entitlements/app_sandbox/network_server=false +codesign/entitlements/app_sandbox/network_client=false +codesign/entitlements/app_sandbox/device_usb=false +codesign/entitlements/app_sandbox/device_bluetooth=false +codesign/entitlements/app_sandbox/files_downloads=0 +codesign/entitlements/app_sandbox/files_pictures=0 +codesign/entitlements/app_sandbox/files_music=0 +codesign/entitlements/app_sandbox/files_movies=0 +codesign/entitlements/app_sandbox/helper_executables=[] +codesign/custom_options=PackedStringArray() +notarization/notarization=0 +notarization/apple_id_name="" +notarization/apple_id_password="" +notarization/apple_team_id="" +notarization/api_uuid="" +notarization/api_key="" +notarization/api_key_id="" +privacy/microphone_usage_description="" +privacy/microphone_usage_description_localized={} +privacy/camera_usage_description="" +privacy/camera_usage_description_localized={} +privacy/location_usage_description="" +privacy/location_usage_description_localized={} +privacy/address_book_usage_description="" +privacy/address_book_usage_description_localized={} +privacy/calendar_usage_description="" +privacy/calendar_usage_description_localized={} +privacy/photos_library_usage_description="" +privacy/photos_library_usage_description_localized={} +privacy/desktop_folder_usage_description="" +privacy/desktop_folder_usage_description_localized={} +privacy/documents_folder_usage_description="" +privacy/documents_folder_usage_description_localized={} +privacy/downloads_folder_usage_description="" +privacy/downloads_folder_usage_description_localized={} +privacy/network_volumes_usage_description="" +privacy/network_volumes_usage_description_localized={} +privacy/removable_volumes_usage_description="" +privacy/removable_volumes_usage_description_localized={} +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 +unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" +open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}" +ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash +kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\") +rm -rf \"{temp_dir}\"" diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..adc26df --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..7ed4eb9 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dgaty0jff8yuy" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..2961619 --- /dev/null +++ b/project.godot @@ -0,0 +1,41 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="card test" +run/main_scene="res://Scenes/main_menu.tscn" +config/features=PackedStringArray("4.0", "Forward Plus") +boot_splash/bg_color=Color(0, 0, 0, 1) +boot_splash/show_image=false +config/icon="res://icon.svg" + +[autoload] + +Data="*res://Scripts/data.gd" + +[display] + +window/size/viewport_width=1920 +window/size/viewport_height=1080 +window/stretch/mode="viewport" + +[editor] + +version_control/plugin_name="GitPlugin" +version_control/autoload_on_startup=true + +[input] + +click={ +"deadzone": 0.5, +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"pressed":false,"double_click":false,"script":null) +] +}