diff --git a/.github/workflows/build_debug.yml b/.github/workflows/build_debug.yml new file mode 100644 index 0000000..ac551c0 --- /dev/null +++ b/.github/workflows/build_debug.yml @@ -0,0 +1,98 @@ +name: Debug build +run-name: Menu template build +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize] + workflow_dispatch: + inputs: + job_target: + description: 'Select the platform' + required: true + default: 'Both' + type: choice + options: + - Linux + - Windows + - Both + +env: + GODOT_VERSION: 4.4 + GODOT_PROJECT_LOCATION: ./project.godot + EXPORT_FOLDER_LINUX: bin/linux + EXPORT_FOLDER_WINDOWS: bin/windows + APPLICATION_NAME: menu_template + +jobs: + build: + runs-on: ubuntu-latest + container: + image: archlinux:latest + steps: + - name: Settings extra variables + run: + export DATE=$(date +'%Y-%m-%d') + echo "DATE=$DATE" >> $GITHUB_ENV + echo "MAIN_FOLDER=$(pwd)" >> $GITHUB_ENV + echo "JOB_TARGET='Both'" >> $GITHUB_ENV + + - name: Vérifier la variable MAIN_FOLDER + run: | + echo "MAIN_FOLDER: ${{ env.MAIN_FOLDER }}" + + - name: Debug job target + run: echo ${{ env.JOB_TARGET }} + + - name: Installing dependencies + run: pacman -Syu --noconfirm git bash yasm python python-pip scons gcc diffutils make wget unzip tar mingw-w64 fontconfig + + - name: Checkout submodules + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Prepare Godot + run: | + wget -q -O godot_linux.zip https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION}}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64.zip + unzip godot_linux.zip + wget -q -O godot_export_templates.tpz https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz + mkdir -p ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable + unzip godot_export_templates.tpz -d ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable + mv ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable/templates/* ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable + + - name: Créer le dossier d’export Linux + run: mkdir -p ${{ env.MAIN_FOLDER }}/${{ env.EXPORT_FOLDER_LINUX }} + + - name: Créer le dossier d’export Windows + run: mkdir -p ${{ env.MAIN_FOLDER }}/${{ env.EXPORT_FOLDER_WINDOWS }} + + - name: Building debug Linux + run: | + mkdir -p ${{ env.EXPORT_FOLDER_LINUX }} + ./Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64 --import ${{ env.GODOT_PROJECT_LOCATION }} --quiet --headless --export-debug --verbose Linux ${{ env.MAIN_FOLDER }}/${{ env.EXPORT_FOLDER_LINUX }}/${{ env.APPLICATION_NAME }}.x86_64 --verbose + chmod +x ${{ env.EXPORT_FOLDER_LINUX }}/${{ env.APPLICATION_NAME }}.sh --verbose + chmod +x ${{ env.EXPORT_FOLDER_LINUX }}/${{ env.APPLICATION_NAME }}.x86_64 --verbose + + - name: Tar files + run: tar -cvf ${{ env.APPLICATION_NAME }}_linux_debug_${{ env.DATE }}.tar ${{ env.EXPORT_FOLDER_LINUX }} + + - name: Uploading GDExtension Linux artifact debug + uses: actions/upload-artifact@v4 + with: + name: ${{ env.APPLICATION_NAME }}_linux_debug_${{ env.DATE }}.tar + path: ${{ env.APPLICATION_NAME }}_linux_debug_${{ env.DATE }}.tar + + - name: Building debug Windows + run: | + mkdir -p ${{ env.EXPORT_FOLDER_WINDOWS }} + ./Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64 --import ${{ env.GODOT_PROJECT_LOCATION }} --quiet --headless --export-debug Windows ${{ env.MAIN_FOLDER }}/${{ env.EXPORT_FOLDER_WINDOWS }}/${{ env.APPLICATION_NAME }}.exe + + - name: Uploading GDExtension Windows artifact debug + uses: actions/upload-artifact@v4 + with: + name: ${{ env.APPLICATION_NAME }}_windows_debug_${{ env.DATE }} + path: ${{ env.EXPORT_FOLDER_WINDOWS }}/ + + diff --git a/.gitignore b/.gitignore index ef24865..8b55d4a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ # Godot-specific ignores .import/ export.cfg -export_presets.cfg + # Imported translations (automatically generated from CSV files) *.translation diff --git a/addons/gwj_countdown/assets/LICENSE.txt b/addons/gwj_countdown/assets/LICENSE.txt deleted file mode 100644 index 1df3592..0000000 --- a/addons/gwj_countdown/assets/LICENSE.txt +++ /dev/null @@ -1,2 +0,0 @@ -Godot Wild Jam Mascot -Copyright (c) 2021 GodotWildJam diff --git a/addons/gwj_countdown/assets/clock_and_gwj_mascot_80x80.png b/addons/gwj_countdown/assets/clock_and_gwj_mascot_80x80.png deleted file mode 100644 index d1ff125..0000000 Binary files a/addons/gwj_countdown/assets/clock_and_gwj_mascot_80x80.png and /dev/null differ diff --git a/addons/gwj_countdown/assets/clock_and_gwj_mascot_80x80.png.import b/addons/gwj_countdown/assets/clock_and_gwj_mascot_80x80.png.import deleted file mode 100644 index 8e2a0a1..0000000 --- a/addons/gwj_countdown/assets/clock_and_gwj_mascot_80x80.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dulsjjty3j7fh" -path="res://.godot/imported/clock_and_gwj_mascot_80x80.png-0599d07dd665e0c30290a1d0861343b8.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://addons/gwj_countdown/assets/clock_and_gwj_mascot_80x80.png" -dest_files=["res://.godot/imported/clock_and_gwj_mascot_80x80.png-0599d07dd665e0c30290a1d0861343b8.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/addons/gwj_countdown/assets/clock_and_gwj_mascot_vector.svg b/addons/gwj_countdown/assets/clock_and_gwj_mascot_vector.svg deleted file mode 100644 index 5d0c92b..0000000 --- a/addons/gwj_countdown/assets/clock_and_gwj_mascot_vector.svg +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/gwj_countdown/assets/clock_and_gwj_mascot_vector.svg.import b/addons/gwj_countdown/assets/clock_and_gwj_mascot_vector.svg.import deleted file mode 100644 index 1ec67d8..0000000 --- a/addons/gwj_countdown/assets/clock_and_gwj_mascot_vector.svg.import +++ /dev/null @@ -1,37 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bgx8r5rjj01y3" -path="res://.godot/imported/clock_and_gwj_mascot_vector.svg-632023f85f8566b9337820069ea03da6.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://addons/gwj_countdown/assets/clock_and_gwj_mascot_vector.svg" -dest_files=["res://.godot/imported/clock_and_gwj_mascot_vector.svg-632023f85f8566b9337820069ea03da6.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/addons/gwj_countdown/assets/gwj_mascot_80x80.png b/addons/gwj_countdown/assets/gwj_mascot_80x80.png deleted file mode 100644 index c3c8e81..0000000 Binary files a/addons/gwj_countdown/assets/gwj_mascot_80x80.png and /dev/null differ diff --git a/addons/gwj_countdown/assets/gwj_mascot_80x80.png.import b/addons/gwj_countdown/assets/gwj_mascot_80x80.png.import deleted file mode 100644 index def7326..0000000 --- a/addons/gwj_countdown/assets/gwj_mascot_80x80.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dhu0wngdxybij" -path="res://.godot/imported/gwj_mascot_80x80.png-317bc81021cbee506984542bc2648c34.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://addons/gwj_countdown/assets/gwj_mascot_80x80.png" -dest_files=["res://.godot/imported/gwj_mascot_80x80.png-317bc81021cbee506984542bc2648c34.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/addons/gwj_countdown/assets/gwj_mascot_dark_icon_vector.svg b/addons/gwj_countdown/assets/gwj_mascot_dark_icon_vector.svg deleted file mode 100644 index 3a69e52..0000000 --- a/addons/gwj_countdown/assets/gwj_mascot_dark_icon_vector.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - diff --git a/addons/gwj_countdown/assets/gwj_mascot_dark_icon_vector.svg.import b/addons/gwj_countdown/assets/gwj_mascot_dark_icon_vector.svg.import deleted file mode 100644 index df10995..0000000 --- a/addons/gwj_countdown/assets/gwj_mascot_dark_icon_vector.svg.import +++ /dev/null @@ -1,37 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cbitw7lfvhkw0" -path="res://.godot/imported/gwj_mascot_dark_icon_vector.svg-331d87e388ca7ff06fe85416a19e058a.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://addons/gwj_countdown/assets/gwj_mascot_dark_icon_vector.svg" -dest_files=["res://.godot/imported/gwj_mascot_dark_icon_vector.svg-331d87e388ca7ff06fe85416a19e058a.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/addons/gwj_countdown/assets/gwj_mascot_icon_vector.svg b/addons/gwj_countdown/assets/gwj_mascot_icon_vector.svg deleted file mode 100644 index b76bd4a..0000000 --- a/addons/gwj_countdown/assets/gwj_mascot_icon_vector.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - diff --git a/addons/gwj_countdown/assets/gwj_mascot_icon_vector.svg.import b/addons/gwj_countdown/assets/gwj_mascot_icon_vector.svg.import deleted file mode 100644 index 6abf42f..0000000 --- a/addons/gwj_countdown/assets/gwj_mascot_icon_vector.svg.import +++ /dev/null @@ -1,37 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://b6pux56uv4ugl" -path="res://.godot/imported/gwj_mascot_icon_vector.svg-f2a22ddd43f2ed85d3be12ee3c82e1ed.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://addons/gwj_countdown/assets/gwj_mascot_icon_vector.svg" -dest_files=["res://.godot/imported/gwj_mascot_icon_vector.svg-f2a22ddd43f2ed85d3be12ee3c82e1ed.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/addons/gwj_countdown/assets/gwj_mascot_vector.svg b/addons/gwj_countdown/assets/gwj_mascot_vector.svg deleted file mode 100644 index 3fc5866..0000000 --- a/addons/gwj_countdown/assets/gwj_mascot_vector.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/addons/gwj_countdown/assets/gwj_mascot_vector.svg.import b/addons/gwj_countdown/assets/gwj_mascot_vector.svg.import deleted file mode 100644 index 836e39d..0000000 --- a/addons/gwj_countdown/assets/gwj_mascot_vector.svg.import +++ /dev/null @@ -1,37 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://lqpny21hjubw" -path="res://.godot/imported/gwj_mascot_vector.svg-38360cae4f8f8beaa10e452da2f83986.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://addons/gwj_countdown/assets/gwj_mascot_vector.svg" -dest_files=["res://.godot/imported/gwj_mascot_vector.svg-38360cae4f8f8beaa10e452da2f83986.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/addons/gwj_countdown/gwj_countdown.gd b/addons/gwj_countdown/gwj_countdown.gd deleted file mode 100644 index 4238521..0000000 --- a/addons/gwj_countdown/gwj_countdown.gd +++ /dev/null @@ -1,14 +0,0 @@ -@tool -extends EditorPlugin - -var countdown_packed_scene := preload("res://addons/gwj_countdown/scenes/countdown_ui.tscn") -var countdown_node - - -func _enter_tree(): - countdown_node = countdown_packed_scene.instantiate() - add_control_to_container(CONTAINER_TOOLBAR, countdown_node) - - -func _exit_tree(): - remove_control_from_container(CONTAINER_TOOLBAR, countdown_node) diff --git a/addons/gwj_countdown/gwj_countdown.gd.uid b/addons/gwj_countdown/gwj_countdown.gd.uid deleted file mode 100644 index a9ded38..0000000 --- a/addons/gwj_countdown/gwj_countdown.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dqexdwrhmf6q6 diff --git a/addons/gwj_countdown/media/screenshot_1.png b/addons/gwj_countdown/media/screenshot_1.png deleted file mode 100644 index 6b682b7..0000000 Binary files a/addons/gwj_countdown/media/screenshot_1.png and /dev/null differ diff --git a/addons/gwj_countdown/media/screenshot_2.png b/addons/gwj_countdown/media/screenshot_2.png deleted file mode 100644 index fc7a015..0000000 Binary files a/addons/gwj_countdown/media/screenshot_2.png and /dev/null differ diff --git a/addons/gwj_countdown/media/screenshot_3.png b/addons/gwj_countdown/media/screenshot_3.png deleted file mode 100644 index ccd17e7..0000000 Binary files a/addons/gwj_countdown/media/screenshot_3.png and /dev/null differ diff --git a/addons/gwj_countdown/plugin.cfg b/addons/gwj_countdown/plugin.cfg deleted file mode 100644 index dfb77f0..0000000 --- a/addons/gwj_countdown/plugin.cfg +++ /dev/null @@ -1,9 +0,0 @@ -[plugin] - -name="Godot Wild Jam Countdown" -description="For anyone who has ever wondered... - -\"How long until the next Godot Wild Jam?\"" -author="Marek Belski" -version="0.4.1" -script="gwj_countdown.gd" diff --git a/addons/gwj_countdown/scenes/countdown_ui.gd b/addons/gwj_countdown/scenes/countdown_ui.gd deleted file mode 100644 index 01a434f..0000000 --- a/addons/gwj_countdown/scenes/countdown_ui.gd +++ /dev/null @@ -1,151 +0,0 @@ -@tool -extends Control - -const TARGET_WEEKDAY : = 5 -const TARGET_WEEKDAY_OCCURRENCE : int = 2 -const TARGET_HOUR := 20 -const JAM_DAYS = 9 -const VOTING_DAYS = 7 -const SECONDS_PER_DAY = 86400 -const SECONDS_PER_HOUR = 3600 -const SECONDS_PER_MINUTE = 60 -const MIN_DAYS_PER_MONTH = 29 - -const DEFAULT_STAGE_STRING = "Jam Begins" -const VOTING_STAGE_STRING = "Voting Ends" -const JAM_STAGE_STRING = "Jam Ends" - -const JAM_LINK_PREFIX = "https://itch.io/jam/godot-wild-jam-" -const JAM_FIRST_MONTH = 9 -const JAM_FIRST_YEAR = 2018 - -@onready var stage_label = %StageLabel -@onready var countdown_label = %CountdownLabel - -@export_range(1, 3) var precision : int = 2 - -@export_group("Debug") -@export var adjust_days : int = 0 -@export var adjust_hours : int = 0 - -func _get_2nd_friday(day : int, weekday : int) -> int: - var weekday_diff := weekday - TARGET_WEEKDAY - var target_relative_day := (day - weekday_diff) - var target_first_day := target_relative_day % 7 - var target_day = target_first_day + (7 * (TARGET_WEEKDAY_OCCURRENCE - 1)) - return target_day - -func adjust_datetime_dict(datetime_dict : Dictionary) -> Dictionary: - var _adjust_days := adjust_days - if adjust_hours: - datetime_dict["hour"] += adjust_hours - if datetime_dict["hour"] >= 24: - _adjust_days += 1 - datetime_dict["hour"] %= 24 - if adjust_days: - datetime_dict["day"] += _adjust_days - datetime_dict["weekday"] += _adjust_days - datetime_dict["weekday"] += 1 - datetime_dict["weekday"] %= 7 - datetime_dict["weekday"] -= 1 - return datetime_dict - -func _update_dict_to_months_jam(datetime_dict : Dictionary) -> Dictionary: - var jam_start_day = _get_2nd_friday(datetime_dict["day"], datetime_dict["weekday"]) - datetime_dict["day"] = jam_start_day - datetime_dict["weekday"] = TARGET_WEEKDAY - datetime_dict["hour"] = TARGET_HOUR - datetime_dict["minute"] = 0 - datetime_dict["second"] = 0 - return datetime_dict - -func _get_delta_time_until_next_month_jam() -> int: - var current_time_dict := Time.get_datetime_dict_from_system(true) - current_time_dict = adjust_datetime_dict(current_time_dict) - var current_time_unix := int(Time.get_unix_time_from_datetime_dict(current_time_dict)) - var next_month_unix = current_time_unix + (MIN_DAYS_PER_MONTH * SECONDS_PER_DAY) - var next_month_dict := Time.get_datetime_dict_from_unix_time(next_month_unix) - next_month_dict = _update_dict_to_months_jam(next_month_dict) - var jam_time_unix := Time.get_unix_time_from_datetime_dict(next_month_dict) - return jam_time_unix - current_time_unix - -func _get_delta_time_until_jam() -> int: - var current_time_dict := Time.get_datetime_dict_from_system(true) - current_time_dict = adjust_datetime_dict(current_time_dict) - var current_time_unix := Time.get_unix_time_from_datetime_dict(current_time_dict) - var jam_time_dict = current_time_dict.duplicate() - jam_time_dict = _update_dict_to_months_jam(jam_time_dict) - var jam_time_unix := Time.get_unix_time_from_datetime_dict(jam_time_dict) - return jam_time_unix - current_time_unix - -func _get_countdown_string(delta_time : int) -> String: - var countdown_string : String = "" - var countdown_array : Array[int] - countdown_array.append(delta_time / SECONDS_PER_DAY) - countdown_array.append((delta_time % SECONDS_PER_DAY ) / SECONDS_PER_HOUR) - countdown_array.append((delta_time % SECONDS_PER_DAY % SECONDS_PER_HOUR) / SECONDS_PER_MINUTE) - countdown_array.append(delta_time % SECONDS_PER_DAY % SECONDS_PER_HOUR % SECONDS_PER_MINUTE) - var iter := -1 - var displayed_count := 0 - for countdown_value in countdown_array: - iter += 1 - if countdown_value == 0: - continue - countdown_string += "%d " % countdown_value - match(iter): - 0: - countdown_string += "Day" - 1: - countdown_string += "Hour" - 2: - countdown_string += "Minute" - 3: - countdown_string += "Second" - if countdown_value > 1: - countdown_string += "s" - countdown_string += " " - displayed_count += 1 - if displayed_count >= precision: - break - return countdown_string - -func _unix_is_after_jam(unix_time : int) -> bool: - return unix_time > (JAM_DAYS + VOTING_DAYS) * SECONDS_PER_DAY - -func _unix_is_voting_period(unix_time : int) -> bool: - return unix_time > JAM_DAYS * SECONDS_PER_DAY and unix_time <= (JAM_DAYS + VOTING_DAYS) * SECONDS_PER_DAY - -func _unix_is_jam_period(unix_time : int) -> bool: - return unix_time > 0 and unix_time <= JAM_DAYS * SECONDS_PER_DAY - -func refresh_text(): - var delta_time_unix := _get_delta_time_until_jam() - if _unix_is_after_jam(-delta_time_unix): - # Today is passed the current month's jam. Get next months jam. - delta_time_unix = _get_delta_time_until_next_month_jam() - stage_label.text = DEFAULT_STAGE_STRING - elif _unix_is_voting_period(-delta_time_unix): - stage_label.text = VOTING_STAGE_STRING - delta_time_unix += (JAM_DAYS + VOTING_DAYS) * SECONDS_PER_DAY - elif _unix_is_jam_period(-delta_time_unix): - stage_label.text = JAM_STAGE_STRING - delta_time_unix += JAM_DAYS * SECONDS_PER_DAY - else: - stage_label.text = DEFAULT_STAGE_STRING - countdown_label.text = _get_countdown_string(delta_time_unix) - -func _open_current_jam_page(): - var current_time_dict := Time.get_datetime_dict_from_system(true) - var month_diff = current_time_dict["month"] - JAM_FIRST_MONTH - var year_diff = current_time_dict["year"] - JAM_FIRST_YEAR - var current_jam_index = month_diff + (year_diff * 12) + 1 - var _err = OS.shell_open("%s%d" % [JAM_LINK_PREFIX, current_jam_index]) - -func _on_timer_timeout(): - refresh_text() - -func _on_texture_rect_pressed(): - _open_current_jam_page() - -func _ready(): - refresh_text() diff --git a/addons/gwj_countdown/scenes/countdown_ui.gd.uid b/addons/gwj_countdown/scenes/countdown_ui.gd.uid deleted file mode 100644 index 1b50db9..0000000 --- a/addons/gwj_countdown/scenes/countdown_ui.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bj8krsdncedu6 diff --git a/addons/gwj_countdown/scenes/countdown_ui.tscn b/addons/gwj_countdown/scenes/countdown_ui.tscn deleted file mode 100644 index 3fe73f4..0000000 --- a/addons/gwj_countdown/scenes/countdown_ui.tscn +++ /dev/null @@ -1,59 +0,0 @@ -[gd_scene load_steps=5 format=3 uid="uid://dnvss1ily5njc"] - -[ext_resource type="Script" uid="uid://bj8krsdncedu6" path="res://addons/gwj_countdown/scenes/countdown_ui.gd" id="1_0bnqm"] -[ext_resource type="Texture2D" uid="uid://b6pux56uv4ugl" path="res://addons/gwj_countdown/assets/gwj_mascot_icon_vector.svg" id="2_gybcw"] -[ext_resource type="Texture2D" uid="uid://cbitw7lfvhkw0" path="res://addons/gwj_countdown/assets/gwj_mascot_dark_icon_vector.svg" id="3_ndbey"] - -[sub_resource type="SystemFont" id="SystemFont_jun1l"] -font_weight = 800 -subpixel_positioning = 0 - -[node name="CountdownUI" type="Control"] -custom_minimum_size = Vector2(448, 0) -layout_mode = 3 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -script = ExtResource("1_0bnqm") - -[node name="MarginContainer" type="MarginContainer" parent="."] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -theme_override_constants/margin_left = 16 -theme_override_constants/margin_right = 16 - -[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"] -layout_mode = 2 -theme_override_constants/separation = 4 - -[node name="TextureRect" type="TextureButton" parent="MarginContainer/HBoxContainer"] -custom_minimum_size = Vector2(40, 0) -layout_mode = 2 -mouse_default_cursor_shape = 2 -texture_normal = ExtResource("2_gybcw") -texture_hover = ExtResource("3_ndbey") -ignore_texture_size = true -stretch_mode = 5 - -[node name="StageLabel" type="Label" parent="MarginContainer/HBoxContainer"] -unique_name_in_owner = true -layout_mode = 2 -horizontal_alignment = 2 - -[node name="CountdownLabel" type="Label" parent="MarginContainer/HBoxContainer"] -unique_name_in_owner = true -layout_mode = 2 -size_flags_horizontal = 3 -theme_override_fonts/font = SubResource("SystemFont_jun1l") - -[node name="Timer" type="Timer" parent="."] -autostart = true - -[connection signal="pressed" from="MarginContainer/HBoxContainer/TextureRect" to="." method="_on_texture_rect_pressed"] -[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] diff --git a/autoloads/menu_music.tscn b/autoloads/menu_music.tscn deleted file mode 100644 index c105a95..0000000 --- a/autoloads/menu_music.tscn +++ /dev/null @@ -1,8 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://dubyuldkiw5ai"] - -[ext_resource type="AudioStream" uid="uid://cynei4nxf4x4j" path="res://assets/sounds/musics/Three Red Hearts - Candy.ogg" id="1_fyry3"] - -[node name="MenuMusic" type="AudioStreamPlayer"] -stream = ExtResource("1_fyry3") -autoplay = true -bus = &"Music" diff --git a/addons/gwj_countdown/media/.gdignore b/bin/linux/.gitkeep similarity index 100% rename from addons/gwj_countdown/media/.gdignore rename to bin/linux/.gitkeep diff --git a/bin/linux/menu_template.pck b/bin/linux/menu_template.pck new file mode 100644 index 0000000..9c6107e Binary files /dev/null and b/bin/linux/menu_template.pck differ diff --git a/bin/linux/menu_template.sh b/bin/linux/menu_template.sh new file mode 100755 index 0000000..d40adae --- /dev/null +++ b/bin/linux/menu_template.sh @@ -0,0 +1,4 @@ +#!/bin/sh +echo -ne '\033c\033]0;Menu template\a' +base_path="$(dirname "$(realpath "$0")")" +"$base_path/menu_template.x86_64" "$@" diff --git a/bin/linux/menu_template.x86_64 b/bin/linux/menu_template.x86_64 new file mode 100755 index 0000000..80979ae Binary files /dev/null and b/bin/linux/menu_template.x86_64 differ diff --git a/bin/windows/.gitkeep b/bin/windows/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/bin/windows/menu_template.console.exe b/bin/windows/menu_template.console.exe new file mode 100644 index 0000000..b8f0404 Binary files /dev/null and b/bin/windows/menu_template.console.exe differ diff --git a/bin/windows/menu_template.exe b/bin/windows/menu_template.exe new file mode 100644 index 0000000..e3a06e2 Binary files /dev/null and b/bin/windows/menu_template.exe differ diff --git a/bin/windows/menu_template.pck b/bin/windows/menu_template.pck new file mode 100644 index 0000000..9c6107e Binary files /dev/null and b/bin/windows/menu_template.pck differ diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..bbdfe7f --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,109 @@ +[preset.0] + +name="Linux" +platform="Linux" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="exclude" +export_files=PackedStringArray() +include_filter="" +exclude_filter="" +export_path="bin/linux/menu_template.x86_64" +patches=PackedStringArray() +encryption_include_filters="" +encryption_exclude_filters="" +seed=0 +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=false +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +binary_format/architecture="x86_64" +ssh_remote_deploy/enabled=false +ssh_remote_deploy/host="user@host_ip" +ssh_remote_deploy/port="22" +ssh_remote_deploy/extra_args_ssh="" +ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="#!/usr/bin/env bash +export DISPLAY=:0 +unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" +\"{temp_dir}/{exe_name}\" {cmd_args}" +ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash +kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") +rm -rf \"{temp_dir}\"" + +[preset.1] + +name="Windows" +platform="Windows Desktop" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="bin/windows/menu_template.exe" +patches=PackedStringArray() +encryption_include_filters="" +encryption_exclude_filters="" +seed=0 +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=false +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +binary_format/architecture="x86_64" +codesign/enable=false +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="" +application/export_angle=0 +application/export_d3d12=0 +application/d3d12_agility_sdk_multiarch=true +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 -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries +$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}'" diff --git a/menus/credits/developers/game_developer_info.gd b/menus/credits/developers/game_developer_info.gd index 73a517e..792372f 100644 --- a/menus/credits/developers/game_developer_info.gd +++ b/menus/credits/developers/game_developer_info.gd @@ -23,3 +23,7 @@ func _on_itch_button_down() -> void: func _on_github_button_down() -> void: OS.shell_open(developer_info.github_url) + +func _exit_tree() -> void: + itch_button.button_down.disconnect(_on_itch_button_down) + github_button.button_down.disconnect(_on_github_button_down) \ No newline at end of file diff --git a/menus/credits/main_menu_button.gd b/menus/credits/main_menu_button.gd index 71dc9e7..ad68c19 100644 --- a/menus/credits/main_menu_button.gd +++ b/menus/credits/main_menu_button.gd @@ -4,4 +4,7 @@ func _ready() -> void: button_down.connect(_on_button_down) func _on_button_down() -> void: - get_tree().change_scene_to_file("res://menus/main_menu.tscn") \ No newline at end of file + get_tree().change_scene_to_file("res://menus/main_menu.tscn") + +func _exit_tree() -> void: + button_down.disconnect(_on_button_down) \ No newline at end of file diff --git a/menus/main_menu.gd b/menus/main_menu.gd index 00f53eb..c8c09b6 100644 --- a/menus/main_menu.gd +++ b/menus/main_menu.gd @@ -15,7 +15,8 @@ func _ready() -> void: exit_button.button_down.connect(_on_exit_button_down) func _on_new_game_button_down() -> void: - get_tree().change_scene_to_file("res://path/to/game_scene.tscn") + #get_tree().change_scene_to_file("res://path/to/game_scene.tscn") + pass func _on_options_button_down() -> void: get_tree().change_scene_to_packed(options_scene) @@ -24,4 +25,10 @@ func _on_credits_button_down() -> void: get_tree().change_scene_to_packed(credits_scene) func _on_exit_button_down() -> void: - get_tree().quit() \ No newline at end of file + get_tree().quit() + +func _exit_tree() -> void: + new_game_button.button_down.disconnect(_on_new_game_button_down) + options_button.button_down.disconnect(_on_options_button_down) + credits_button.button_down.disconnect(_on_credits_button_down) + exit_button.button_down.disconnect(_on_exit_button_down) diff --git a/menus/options/screen/screen_mode_button.gd b/menus/options/screen/screen_mode_button.gd index 2ee4743..0932028 100644 --- a/menus/options/screen/screen_mode_button.gd +++ b/menus/options/screen/screen_mode_button.gd @@ -4,7 +4,7 @@ func _ready() -> void: item_selected.connect(_on_item_selected) func _on_item_selected(index: int) -> void: - if index == 0: # Fullscreen + if index == 0: DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED) - elif index == 1: # Windowed - DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN) \ No newline at end of file + elif index == 1: + DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN) diff --git a/menus/options/sound/master_container.gd b/menus/options/sound/master_container.gd index 84feb8b..7520a44 100644 --- a/menus/options/sound/master_container.gd +++ b/menus/options/sound/master_container.gd @@ -8,4 +8,7 @@ func _ready() -> void: func _on_master_slider_value_changed(value: float) -> void: var db : float = linear_to_db(value) var audio_master_volume_id : int = AudioServer.get_bus_index("Master") - AudioServer.set_bus_volume_db(audio_master_volume_id, db) \ No newline at end of file + AudioServer.set_bus_volume_db(audio_master_volume_id, db) + +func _exit_tree() -> void: + master_slider.value_changed.disconnect(_on_master_slider_value_changed) \ No newline at end of file diff --git a/menus/options/sound/music_container.gd b/menus/options/sound/music_container.gd index 2e31ed2..742bbcc 100644 --- a/menus/options/sound/music_container.gd +++ b/menus/options/sound/music_container.gd @@ -9,3 +9,6 @@ func _on_music_slider_value_changed(value: float) -> void: var db : float = linear_to_db(value) var audio_master_volume_id : int = AudioServer.get_bus_index("Music") AudioServer.set_bus_volume_db(audio_master_volume_id, db) + +func _exit_tree() -> void: + music_slider.value_changed.disconnect(_on_music_slider_value_changed) \ No newline at end of file diff --git a/menus/options/sound/sfx_container.gd b/menus/options/sound/sfx_container.gd index 4f3d587..26c09f9 100644 --- a/menus/options/sound/sfx_container.gd +++ b/menus/options/sound/sfx_container.gd @@ -8,4 +8,7 @@ func _ready() -> void: func _on_sfx_slider_value_changed(value: float) -> void: var db : float = linear_to_db(value) var audio_master_volume_id : int = AudioServer.get_bus_index("SFX") - AudioServer.set_bus_volume_db(audio_master_volume_id, db) \ No newline at end of file + AudioServer.set_bus_volume_db(audio_master_volume_id, db) + +func _exit_tree() -> void: + sfx_slider.value_changed.disconnect(_on_sfx_slider_value_changed) \ No newline at end of file diff --git a/project.godot b/project.godot index a3e1e48..619b10a 100644 --- a/project.godot +++ b/project.godot @@ -16,10 +16,6 @@ run/main_scene="uid://dfkbo2qg82rgl" config/features=PackedStringArray("4.4", "Forward Plus") config/icon="res://icon.svg" -[autoload] - -MenuMusic="*res://autoloads/menu_music.tscn" - [display] window/size/viewport_width=1920