commit 19000ef3c656dd11d792b75cf46f10808698fb7b 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/Project Exports/Linux/card test.pck b/Project Exports/Linux/card test.pck new file mode 100644 index 0000000..51d5387 Binary files /dev/null and b/Project Exports/Linux/card test.pck differ diff --git a/Project Exports/Linux/card test.x86_64 b/Project Exports/Linux/card test.x86_64 new file mode 100755 index 0000000..c94ccc6 Binary files /dev/null and b/Project Exports/Linux/card test.x86_64 differ diff --git a/Project Exports/Windows/card text.exe b/Project Exports/Windows/card text.exe new file mode 100644 index 0000000..18c088a Binary files /dev/null and b/Project Exports/Windows/card text.exe differ diff --git a/Project Exports/Windows/card text.pck b/Project Exports/Windows/card text.pck new file mode 100644 index 0000000..a9dc25e Binary files /dev/null and b/Project Exports/Windows/card text.pck differ 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/addons/godot-git-plugin/LICENSE b/addons/godot-git-plugin/LICENSE new file mode 100644 index 0000000..f153fb8 --- /dev/null +++ b/addons/godot-git-plugin/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016-2023 The Godot Engine community + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/addons/godot-git-plugin/THIRDPARTY.md b/addons/godot-git-plugin/THIRDPARTY.md new file mode 100644 index 0000000..837488f --- /dev/null +++ b/addons/godot-git-plugin/THIRDPARTY.md @@ -0,0 +1,1349 @@ +# Third-Party Notices + +The Godot Git Plugin source code uses the following third-party source code: + +1. godotengine/godot-cpp - MIT License - https://github.com/godotengine/godot-cpp/tree/02336831735fd6affbe0a6fa252ec98d3e78120c +2. libgit2/libgit2 - GPLv2 with a special Linking Exception - https://github.com/libgit2/libgit2/tree/b7bad55e4bb0a285b073ba5e02b01d3f522fc95d +3. libssh2/libssh2 - BSD-3-Clause License - https://github.com/libssh2/libssh2/tree/635caa90787220ac3773c1d5ba11f1236c22eae8 + +We also link to these third-party libraries (only in the compiled binary form): + +1. OpenSSL - Only on Linux and MacOS - OpenSSL License - http://www.openssl.org/source/openssl-1.1.1s.tar.gz + +## License Texts + +### godotengine/godot-cpp + +``` +# MIT License + +Copyright (c) 2017-2022 Godot Engine contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` + +### libgit2/libgit2 + +``` + libgit2 is Copyright (C) the libgit2 contributors, + unless otherwise stated. See the AUTHORS file for details. + + Note that the only valid version of the GPL as far as this project + is concerned is _this_ particular version of the license (ie v2, not + v2.2 or v3.x or whatever), unless explicitly otherwise stated. + +---------------------------------------------------------------------- + + LINKING EXCEPTION + + In addition to the permissions in the GNU General Public License, + the authors give you unlimited permission to link the compiled + version of this library into combinations with other programs, + and to distribute those combinations without any restriction + coming from the use of this file. (The General Public License + restrictions do apply in other respects; for example, they cover + modification of the file, and distribution when not linked into + a combined executable.) + +---------------------------------------------------------------------- + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + +---------------------------------------------------------------------- + +The bundled ZLib code is licensed under the ZLib license: + +Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +---------------------------------------------------------------------- + +The Clar framework is licensed under the ISC license: + +Copyright (c) 2011-2015 Vicent Marti + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------------------------------------------------------------- + +The regex library (deps/regex/) is licensed under the GNU LGPL +(available at the end of this file). + +Definitions for data structures and routines for the regular +expression library. + +Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008 +Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with the GNU C Library; if not, write to the Free +Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +---------------------------------------------------------------------- + +The bundled winhttp definition files (deps/winhttp/) are licensed under +the GNU LGPL (available at the end of this file). + +Copyright (C) 2007 Francois Gouget + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + +---------------------------------------------------------------------- + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + +---------------------------------------------------------------------- + +The bundled SHA1 collision detection code is licensed under the MIT license: + +MIT License + +Copyright (c) 2017: + Marc Stevens + Cryptology Group + Centrum Wiskunde & Informatica + P.O. Box 94079, 1090 GB Amsterdam, Netherlands + marc@marc-stevens.nl + + Dan Shumow + Microsoft Research + danshu@microsoft.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------------------------------------------------------------- + +The bundled wildmatch code is licensed under the BSD license: + +Copyright Rich Salz. +All rights reserved. + +Redistribution and use in any form are permitted provided that the +following restrictions are are met: + +1. Source distributions must retain this entire copyright notice + and comment. +2. Binary distributions must include the acknowledgement ``This + product includes software developed by Rich Salz'' in the + documentation or other materials provided with the + distribution. This must not be represented as an endorsement + or promotion without specific prior written permission. +3. The origin of this software must not be misrepresented, either + by explicit claim or by omission. Credits must appear in the + source and documentation. +4. Altered versions must be plainly marked as such in the source + and documentation and must not be misrepresented as being the + original software. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +---------------------------------------------------------------------- + +Portions of the OpenSSL headers are included under the OpenSSL license: + +Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) +All rights reserved. + +This package is an SSL implementation written +by Eric Young (eay@cryptsoft.com). +The implementation was written so as to conform with Netscapes SSL. + +This library is free for commercial and non-commercial use as long as +the following conditions are aheared to. The following conditions +apply to all code found in this distribution, be it the RC4, RSA, +lhash, DES, etc., code; not just the SSL code. The SSL documentation +included with this distribution is covered by the same copyright terms +except that the holder is Tim Hudson (tjh@cryptsoft.com). + +Copyright remains Eric Young's, and as such any Copyright notices in +the code are not to be removed. +If this package is used in a product, Eric Young should be given attribution +as the author of the parts of the library used. +This can be in the form of a textual message at program startup or +in documentation (online or textual) provided with the package. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + "This product includes cryptographic software written by + Eric Young (eay@cryptsoft.com)" + The word 'cryptographic' can be left out if the rouines from the library + being used are not cryptographic related :-). +4. If you include any Windows specific code (or a derivative thereof) from + the apps directory (application code) you must include an acknowledgement: + "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + +THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +The licence and distribution terms for any publically available version or +derivative of this code cannot be changed. i.e. this code cannot simply be +copied and put under another distribution licence +[including the GNU Public Licence.] + +==================================================================== +Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + +4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + openssl-core@openssl.org. + +5. Products derived from this software may not be called "OpenSSL" + nor may "OpenSSL" appear in their names without prior written + permission of the OpenSSL Project. + +6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit (http://www.openssl.org/)" + +THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY +EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR +ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. +``` + +### libssh2/libssh2 + +``` +/* Copyright (c) 2004-2007 Sara Golemon + * Copyright (c) 2005,2006 Mikhail Gusarov + * Copyright (c) 2006-2007 The Written Word, Inc. + * Copyright (c) 2007 Eli Fant + * Copyright (c) 2009-2021 Daniel Stenberg + * Copyright (C) 2008, 2009 Simon Josefsson + * Copyright (c) 2000 Markus Friedl + * Copyright (c) 2015 Microsoft Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted provided + * that the following conditions are met: + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the copyright holder nor the names + * of any other contributors may be used to endorse or + * promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ +``` + +### OpenSSL + +``` + + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a double license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2019 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ +``` diff --git a/addons/godot-git-plugin/git_plugin.gdextension b/addons/godot-git-plugin/git_plugin.gdextension new file mode 100644 index 0000000..3e51918 --- /dev/null +++ b/addons/godot-git-plugin/git_plugin.gdextension @@ -0,0 +1,11 @@ +[configuration] + +entry_symbol = "git_plugin_init" + +[libraries] + +macos.editor = "macos/libgit_plugin.macos.editor.universal.dylib" +windows.editor.x86_64 = "win64/libgit_plugin.windows.editor.x86_64.dll" +linux.editor.x86_64 = "linux/libgit_plugin.linux.editor.x86_64.so" +linux.editor.arm64 = "linux/libgit_plugin.linux.editor.arm64.so" +linux.editor.rv64 = "" diff --git a/addons/godot-git-plugin/linux/libgit_plugin.linux.editor.x86_64.so b/addons/godot-git-plugin/linux/libgit_plugin.linux.editor.x86_64.so new file mode 100644 index 0000000..ba8c596 Binary files /dev/null and b/addons/godot-git-plugin/linux/libgit_plugin.linux.editor.x86_64.so differ diff --git a/addons/godot-git-plugin/macos/libgit_plugin.macos.editor.universal.dylib b/addons/godot-git-plugin/macos/libgit_plugin.macos.editor.universal.dylib new file mode 100644 index 0000000..d307081 Binary files /dev/null and b/addons/godot-git-plugin/macos/libgit_plugin.macos.editor.universal.dylib differ diff --git a/addons/godot-git-plugin/plugin.cfg b/addons/godot-git-plugin/plugin.cfg new file mode 100644 index 0000000..6122b40 --- /dev/null +++ b/addons/godot-git-plugin/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="Godot Git Plugin" +description="This plugin lets you interact with Git without leaving the Godot editor. More information can be found at https://github.com/godotengine/godot-git-plugin/wiki" +author="twaritwaikar" +version="v3.0.0" +script="godot-git-plugin.gd" diff --git a/addons/godot-git-plugin/win64/libgit_plugin.windows.editor.x86_64.dll b/addons/godot-git-plugin/win64/libgit_plugin.windows.editor.x86_64.dll new file mode 100644 index 0000000..de760c4 Binary files /dev/null and b/addons/godot-git-plugin/win64/libgit_plugin.windows.editor.x86_64.dll differ diff --git a/addons/godot-git-plugin/win64/libgit_plugin.windows.editor.x86_64.exp b/addons/godot-git-plugin/win64/libgit_plugin.windows.editor.x86_64.exp new file mode 100644 index 0000000..136d2b6 Binary files /dev/null and b/addons/godot-git-plugin/win64/libgit_plugin.windows.editor.x86_64.exp differ diff --git a/addons/godot-git-plugin/win64/libgit_plugin.windows.editor.x86_64.lib b/addons/godot-git-plugin/win64/libgit_plugin.windows.editor.x86_64.lib new file mode 100644 index 0000000..b84311d Binary files /dev/null and b/addons/godot-git-plugin/win64/libgit_plugin.windows.editor.x86_64.lib differ 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) +] +}