From e13f78949cc24040b9ed6f788f665efb5a197fd3 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sat, 22 Mar 2025 19:42:55 +0300 Subject: [PATCH 01/20] Fleet speed buff --- objects/obj_fleet_select/Draw_0.gml | 2 +- scripts/scr_fleet_functions/scr_fleet_functions.gml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/objects/obj_fleet_select/Draw_0.gml b/objects/obj_fleet_select/Draw_0.gml index 6f77291d53..d1bbddae74 100644 --- a/objects/obj_fleet_select/Draw_0.gml +++ b/objects/obj_fleet_select/Draw_0.gml @@ -135,7 +135,7 @@ if (__b__) { } eta += speed_string; - draw_text_transformed(sys.x + 17, sys.y, string_hash_to_newline(eta), scale, scale, 0); + draw_text_transformed_outline(sys.x + 17, sys.y, string_hash_to_newline(eta), scale, scale, 0); if (mouse_check_button(mb_right) && viable) { var ship_count = player_fleet_ship_count(player_fleet); var fleet_selected = player_fleet_selected_count(player_fleet); diff --git a/scripts/scr_fleet_functions/scr_fleet_functions.gml b/scripts/scr_fleet_functions/scr_fleet_functions.gml index 7de2a3490a..cb8525a9ab 100644 --- a/scripts/scr_fleet_functions/scr_fleet_functions.gml +++ b/scripts/scr_fleet_functions/scr_fleet_functions.gml @@ -274,13 +274,13 @@ function calculate_action_speed(fleet = "none", selected = false) { escorts = types[2]; } } - var fleet_speed = 128; + var fleet_speed = 384; if (capitals > 0) { - fleet_speed = 100; + fleet_speed = 300; } else if (frigates > 0) { - fleet_speed = 128; + fleet_speed = 384; } else if (escorts > 0) { - fleet_speed = 174; + fleet_speed = 522; } if (_is_player_fleet) { if ((obj_controller.stc_ships >= 6) && (fleet_speed >= 100)) { From 4734838abd618cb0facc5ef89d2ee3206857bedc Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sat, 22 Mar 2025 19:43:37 +0300 Subject: [PATCH 02/20] Kill all enemies on attack --- objects/obj_ncombat/Alarm_5.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects/obj_ncombat/Alarm_5.gml b/objects/obj_ncombat/Alarm_5.gml index 48c9d30604..90c53c9418 100644 --- a/objects/obj_ncombat/Alarm_5.gml +++ b/objects/obj_ncombat/Alarm_5.gml @@ -468,7 +468,7 @@ if (defeat == 0 && _reduce_power) { if (dropping == true || defending == true) { power_reduction = 1; } else { - power_reduction = 2; + power_reduction = enemy_power; } new_power = enemy_power - power_reduction; new_power = max(new_power, 0); From d8b17310d8447a73126ff24557506388f2d3024f Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sat, 22 Mar 2025 19:44:34 +0300 Subject: [PATCH 03/20] Rework formation bars --- objects/obj_formation_bar/Draw_0.gml | 5 +- .../scr_draw_rectangle/scr_draw_rectangle.gml | 1 + .../scr_ui_formation_bars.gml | 49 ++++++++++--------- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/objects/obj_formation_bar/Draw_0.gml b/objects/obj_formation_bar/Draw_0.gml index 93212e3cd3..6009269030 100644 --- a/objects/obj_formation_bar/Draw_0.gml +++ b/objects/obj_formation_bar/Draw_0.gml @@ -7,10 +7,11 @@ if (tist=true){ }*/ draw_set_alpha(1); if (dragging == false) { - draw_sprite_ext(spr_formation_bars, image_index, x, y, image_xscale, image_yscale, 0, c_white, 1); + draw_rectangle_outline(x, y, x + 39, y + 47, color, c_black); } + if (dragging == true) { - draw_sprite_ext(spr_formation_bars, image_index, x, y + 1000, image_xscale, image_yscale, 0, c_white, 1); + draw_rectangle_outline(x, y + 100, x + 39, y + 47 + 100, color, c_black); } draw_set_alpha(1); diff --git a/scripts/scr_draw_rectangle/scr_draw_rectangle.gml b/scripts/scr_draw_rectangle/scr_draw_rectangle.gml index 7becca33cb..7ad6eee0e7 100644 --- a/scripts/scr_draw_rectangle/scr_draw_rectangle.gml +++ b/scripts/scr_draw_rectangle/scr_draw_rectangle.gml @@ -19,6 +19,7 @@ function draw_rectangle_outline(_x, _y, _x2, _y2, _bg_color = c_black, _outline_ draw_rectangle(_x, _y, _x2, _y2, 0); draw_set_color(_outline_color); draw_rectangle(_x, _y, _x2, _y2, 1); + draw_rectangle(_x + 2, _y + 2, _x2 - 2, _y2 - 2, 1); draw_set_color(_cur_color); draw_set_alpha(_cur_alpha); diff --git a/scripts/scr_ui_formation_bars/scr_ui_formation_bars.gml b/scripts/scr_ui_formation_bars/scr_ui_formation_bars.gml index 061fbab78b..96b9301034 100644 --- a/scripts/scr_ui_formation_bars/scr_ui_formation_bars.gml +++ b/scripts/scr_ui_formation_bars/scr_ui_formation_bars.gml @@ -28,42 +28,42 @@ function scr_ui_formation_bars() { for (var ii = 1; ii <= 17; ii++) { if ((ii == 1) && (bat_comm_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 2, 0, "HQ"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "HQ", c_yellow); } else if ((ii == 2) && (bat_hono_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 1, 1, "Hono"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "HG", c_yellow); } else if ((ii == 3) && (bat_libr_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 1, 8, "Lib"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "LIB", c_aqua); } else if ((ii == 4) && (bat_tech_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 1, 9, "Tech"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "TEC", c_red); } else if ((ii == 5) && (bat_term_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 1, 10, "Term"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "TER", c_white); } else if ((ii == 6) && (bat_vete_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 2, 6, "Veteran"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "VET", c_white); } else if ((ii == 7) && (bat_tact_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 6, 3, "Tactical"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "TAC", c_navy); } else if ((ii == 8) && (bat_deva_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 3, 2, "Devastator"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "DEV", c_purple); } else if ((ii == 9) && (bat_assa_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 3, 5, "Assault"); - } else if ((ii == 10) && (bat_scou_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 1, 4, "Sco"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "ASS"); } else if ((ii == 11) && (bat_drea_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 2, 11, "Dread"); - } else if ((ii == 12) && (bat_hire_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 1, 7, "???"); - } else if ((ii == 16) && (bat_landspee_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 2, 14, "Land Speeder"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "DRD", c_orange); } if (bat_formation_type[_formatting] != 2) { if ((ii == 13) && (bat_rhin_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 4, 12, "Rhino"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "RHN"); } else if ((ii == 14) && (bat_pred_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 2, 13, "Predator"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "PRD"); } else if ((ii == 15) && (bat_landraid_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 2, 14, "Land Raider"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "LND"); + } else if ((ii == 16) && (bat_landspee_for[_formatting] == bar)) { + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "SPD"); } else if ((ii == 17) && (bat_whirl_for[_formatting] == bar)) { - init_combat_bars(bar, ii, ui_formations_data, 2, 14, "Whirlwind"); + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "WHR"); + } else if ((ii == 12) && (bat_hire_for[_formatting] == bar)) { + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "AUX"); + } else if ((ii == 10) && (bat_scou_for[_formatting] == bar)) { + init_combat_bars(bar, ii, ui_formations_data, 1, 1, "SCU", c_green); } } @@ -78,10 +78,10 @@ function scr_ui_formation_bars() { bat_vete_for[bar] = 2; bat_hire_for[bar] = 3; bat_libr_for[bar] = 3; - bat_comm_for[bar] = 3; - bat_tech_for[bar] = 3; + bat_comm_for[bar] = 4; + bat_tech_for[bar] = 4; bat_term_for[bar] = 3; - bat_hono_for[bar] = 3; + bat_hono_for[bar] = 6; bat_drea_for[bar] = 5; bat_rhin_for[bar] = 6; bat_pred_for[bar] = 7; @@ -99,7 +99,7 @@ function scr_ui_formation_bars() { } /// @mixin -function init_combat_bars(bar, ii, formations_data, size, image_index, unit_type) { +function init_combat_bars(bar, ii, formations_data, size, image_index, unit_type, color = c_gray) { formations_data.nbar = instance_create(formations_data.x9, formations_data.y9 + temp[formations_data.te], obj_formation_bar); formations_data.nbar.size = size; formations_data.nbar.height = formations_data.nbar.size * 47; @@ -111,6 +111,7 @@ function init_combat_bars(bar, ii, formations_data, size, image_index, unit_type temp[formations_data.te + 100] += formations_data.nbar.size; formations_data.nbar.image_index = image_index; formations_data.nbar.unit_type = unit_type; + formations_data.nbar.color = color; formations_data.nbar.unit_id = ii; formations_data.nbar.col_parent = bar; } From bdfb986c9388c5de8a5aaf216223c8124f72edac Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:11:24 +0300 Subject: [PATCH 04/20] ci: Gobo checking workflow --- .github/workflows/gobo_check.yml | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/gobo_check.yml diff --git a/.github/workflows/gobo_check.yml b/.github/workflows/gobo_check.yml new file mode 100644 index 0000000000..5902509083 --- /dev/null +++ b/.github/workflows/gobo_check.yml @@ -0,0 +1,43 @@ +name: Format Code + +on: + pull_request: + types: [opened, edited, ready_for_review, synchronize] + paths: + - '**.gml' + +jobs: + format-check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get Changed Files + id: changed-files + uses: tj-actions/changed-files@v44 + with: + files: '**.gml' + + - name: Setup Gobo + if: steps.changed-files.outputs.any_changed == 'true' + run: | + curl -LO https://github.com/EttyKitty/Gobo/releases/download/v1.0.0/gobo-ubuntu.zip + unzip gobo-ubuntu.zip + chmod +x ./gobo + + - name: Run Formatter + if: steps.changed-files.outputs.any_changed == 'true' + run: | + # Pass all changed files to gobo at once + ./gobo ${{ steps.changed-files.outputs.all_changed_files }} + + - name: Verify Formatting + run: | + if ! git diff --quiet; then + echo "::error::Files not formatted. Please run Gobo locally." + git diff --name-only + exit 1 + fi \ No newline at end of file From 3d3e9c784e522c31ab3535bb8ce0979823916de7 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:27:40 +0300 Subject: [PATCH 05/20] Test --- objects/obj_controller/Create_0.gml | 2 +- objects/obj_controller/KeyPress_32.gml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/objects/obj_controller/Create_0.gml b/objects/obj_controller/Create_0.gml index 4aea228232..7f50fc1014 100644 --- a/objects/obj_controller/Create_0.gml +++ b/objects/obj_controller/Create_0.gml @@ -77,7 +77,7 @@ is_test_map = false; target_navy_number = 5; global.sound_playing = 0; global.defeat = 0; -tutorial = 0; +tutorial=0; sound_in = 0; sound_to = ""; fix_right = 0; diff --git a/objects/obj_controller/KeyPress_32.gml b/objects/obj_controller/KeyPress_32.gml index bfe2d78973..fd4e529a99 100644 --- a/objects/obj_controller/KeyPress_32.gml +++ b/objects/obj_controller/KeyPress_32.gml @@ -7,7 +7,7 @@ if (__b__) { if (__b__) { if ((obj_controller.menu == 0 && !instance_exists(obj_popup_dialogue)) || ((obj_controller.menu == 999) && instance_exists(obj_ncombat))) { if (instance_exists(obj_ncombat)) { - if (obj_ncombat.start == 7) { + if (obj_ncombat.start==7) { exit; } } From ceecfa1970565dc867fe580035985867f8defa8b Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:31:26 +0300 Subject: [PATCH 06/20] Fix 1 --- .github/workflows/gobo_check.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gobo_check.yml b/.github/workflows/gobo_check.yml index 5902509083..991bd3a9cc 100644 --- a/.github/workflows/gobo_check.yml +++ b/.github/workflows/gobo_check.yml @@ -31,8 +31,10 @@ jobs: - name: Run Formatter if: steps.changed-files.outputs.any_changed == 'true' run: | - # Pass all changed files to gobo at once - ./gobo ${{ steps.changed-files.outputs.all_changed_files }} + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + echo "Formatting $file..." + ./gobo "$file" + done - name: Verify Formatting run: | From b436d59f0c8cc12ee84daba3c6f3cf5de04634a5 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:22:25 +0300 Subject: [PATCH 07/20] test 2 --- .github/workflows/gobo_check.yml | 2 +- .github/workflows/gobo_lint.yml | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/gobo_lint.yml diff --git a/.github/workflows/gobo_check.yml b/.github/workflows/gobo_check.yml index 991bd3a9cc..9e6885b8b8 100644 --- a/.github/workflows/gobo_check.yml +++ b/.github/workflows/gobo_check.yml @@ -1,4 +1,4 @@ -name: Format Code +name: GoboLintCheck on: pull_request: diff --git a/.github/workflows/gobo_lint.yml b/.github/workflows/gobo_lint.yml new file mode 100644 index 0000000000..355c798d98 --- /dev/null +++ b/.github/workflows/gobo_lint.yml @@ -0,0 +1,62 @@ +name: GoboLint + +on: + issue_comment: + types: [created] + +jobs: + lint: + if: > + github.event.issue.pull_request && + startsWith(github.event.comment.body, '/lint') && + (github.event.comment.author_association == 'COLLABORATOR' || + github.event.comment.author_association == 'MEMBER' || + github.event.comment.author_association == 'OWNER') + + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Get PR branch + uses: xt0rted/pull-request-comment-branch@v2 + id: comment-branch + + - name: Checkout PR branch + uses: actions/checkout@v4 + with: + ref: ${{ steps.comment-branch.outputs.head_ref }} + repository: ${{ steps.comment-branch.outputs.head_owner }}/${{ steps.comment-branch.outputs.head_repo }} + fetch-depth: 0 + + - name: Get Changed Files + id: changed-files + uses: tj-actions/changed-files@v44 + with: + base_sha: ${{ steps.comment-branch.outputs.base_ref }} + files: '**.gml' + + - name: Setup Gobo + if: steps.changed-files.outputs.any_changed == 'true' + run: | + curl -LO https://github.com/EttyKitty/Gobo/releases/download/v1.0.0/gobo-ubuntu.zip + unzip gobo-ubuntu.zip + chmod +x ./gobo + + - name: Run Linter + if: steps.changed-files.outputs.any_changed == 'true' + run: | + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + if [ -f "$file" ]; then + echo "Linting $file..." + ./gobo "$file" + fi + done + + - name: Commit Changes + if: steps.changed-files.outputs.any_changed == 'true' + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "style: auto-lint GML files with Gobo" + file_pattern: '**.gml' \ No newline at end of file From a4de7099a0bf756f59a24c2f615663dbb8bdadf6 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:23:22 +0300 Subject: [PATCH 08/20] Discard changes to objects/obj_controller/Create_0.gml --- objects/obj_controller/Create_0.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects/obj_controller/Create_0.gml b/objects/obj_controller/Create_0.gml index 7f50fc1014..4aea228232 100644 --- a/objects/obj_controller/Create_0.gml +++ b/objects/obj_controller/Create_0.gml @@ -77,7 +77,7 @@ is_test_map = false; target_navy_number = 5; global.sound_playing = 0; global.defeat = 0; -tutorial=0; +tutorial = 0; sound_in = 0; sound_to = ""; fix_right = 0; From 031b1d95624106887e72c0cd50272b57584ee9b5 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:23:26 +0300 Subject: [PATCH 09/20] Discard changes to objects/obj_controller/KeyPress_32.gml --- objects/obj_controller/KeyPress_32.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects/obj_controller/KeyPress_32.gml b/objects/obj_controller/KeyPress_32.gml index fd4e529a99..bfe2d78973 100644 --- a/objects/obj_controller/KeyPress_32.gml +++ b/objects/obj_controller/KeyPress_32.gml @@ -7,7 +7,7 @@ if (__b__) { if (__b__) { if ((obj_controller.menu == 0 && !instance_exists(obj_popup_dialogue)) || ((obj_controller.menu == 999) && instance_exists(obj_ncombat))) { if (instance_exists(obj_ncombat)) { - if (obj_ncombat.start==7) { + if (obj_ncombat.start == 7) { exit; } } From 8c512ef7f23a758923d81e079eb2884576cf31ad Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:27:40 +0300 Subject: [PATCH 10/20] Test --- objects/obj_controller/Create_0.gml | 2 +- objects/obj_controller/KeyPress_32.gml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/objects/obj_controller/Create_0.gml b/objects/obj_controller/Create_0.gml index 4aea228232..7f50fc1014 100644 --- a/objects/obj_controller/Create_0.gml +++ b/objects/obj_controller/Create_0.gml @@ -77,7 +77,7 @@ is_test_map = false; target_navy_number = 5; global.sound_playing = 0; global.defeat = 0; -tutorial = 0; +tutorial=0; sound_in = 0; sound_to = ""; fix_right = 0; diff --git a/objects/obj_controller/KeyPress_32.gml b/objects/obj_controller/KeyPress_32.gml index bfe2d78973..fd4e529a99 100644 --- a/objects/obj_controller/KeyPress_32.gml +++ b/objects/obj_controller/KeyPress_32.gml @@ -7,7 +7,7 @@ if (__b__) { if (__b__) { if ((obj_controller.menu == 0 && !instance_exists(obj_popup_dialogue)) || ((obj_controller.menu == 999) && instance_exists(obj_ncombat))) { if (instance_exists(obj_ncombat)) { - if (obj_ncombat.start == 7) { + if (obj_ncombat.start==7) { exit; } } From e15373d797bc3f77fbcf15201eec4b04ea8b47eb Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:31:26 +0300 Subject: [PATCH 11/20] Fix 1 --- .github/workflows/gobo_check.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gobo_check.yml b/.github/workflows/gobo_check.yml index 5902509083..991bd3a9cc 100644 --- a/.github/workflows/gobo_check.yml +++ b/.github/workflows/gobo_check.yml @@ -31,8 +31,10 @@ jobs: - name: Run Formatter if: steps.changed-files.outputs.any_changed == 'true' run: | - # Pass all changed files to gobo at once - ./gobo ${{ steps.changed-files.outputs.all_changed_files }} + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + echo "Formatting $file..." + ./gobo "$file" + done - name: Verify Formatting run: | From 17e03e34a7dbad88aea1eab1e562a40ffe9b6916 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:22:25 +0300 Subject: [PATCH 12/20] test 2 --- .github/workflows/gobo_check.yml | 2 +- .github/workflows/gobo_lint.yml | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/gobo_lint.yml diff --git a/.github/workflows/gobo_check.yml b/.github/workflows/gobo_check.yml index 991bd3a9cc..9e6885b8b8 100644 --- a/.github/workflows/gobo_check.yml +++ b/.github/workflows/gobo_check.yml @@ -1,4 +1,4 @@ -name: Format Code +name: GoboLintCheck on: pull_request: diff --git a/.github/workflows/gobo_lint.yml b/.github/workflows/gobo_lint.yml new file mode 100644 index 0000000000..355c798d98 --- /dev/null +++ b/.github/workflows/gobo_lint.yml @@ -0,0 +1,62 @@ +name: GoboLint + +on: + issue_comment: + types: [created] + +jobs: + lint: + if: > + github.event.issue.pull_request && + startsWith(github.event.comment.body, '/lint') && + (github.event.comment.author_association == 'COLLABORATOR' || + github.event.comment.author_association == 'MEMBER' || + github.event.comment.author_association == 'OWNER') + + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Get PR branch + uses: xt0rted/pull-request-comment-branch@v2 + id: comment-branch + + - name: Checkout PR branch + uses: actions/checkout@v4 + with: + ref: ${{ steps.comment-branch.outputs.head_ref }} + repository: ${{ steps.comment-branch.outputs.head_owner }}/${{ steps.comment-branch.outputs.head_repo }} + fetch-depth: 0 + + - name: Get Changed Files + id: changed-files + uses: tj-actions/changed-files@v44 + with: + base_sha: ${{ steps.comment-branch.outputs.base_ref }} + files: '**.gml' + + - name: Setup Gobo + if: steps.changed-files.outputs.any_changed == 'true' + run: | + curl -LO https://github.com/EttyKitty/Gobo/releases/download/v1.0.0/gobo-ubuntu.zip + unzip gobo-ubuntu.zip + chmod +x ./gobo + + - name: Run Linter + if: steps.changed-files.outputs.any_changed == 'true' + run: | + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + if [ -f "$file" ]; then + echo "Linting $file..." + ./gobo "$file" + fi + done + + - name: Commit Changes + if: steps.changed-files.outputs.any_changed == 'true' + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "style: auto-lint GML files with Gobo" + file_pattern: '**.gml' \ No newline at end of file From 0f5540d17b4336668aa92ce77b272af66e0c2927 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:23:22 +0300 Subject: [PATCH 13/20] Discard changes to objects/obj_controller/Create_0.gml --- objects/obj_controller/Create_0.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects/obj_controller/Create_0.gml b/objects/obj_controller/Create_0.gml index 7f50fc1014..4aea228232 100644 --- a/objects/obj_controller/Create_0.gml +++ b/objects/obj_controller/Create_0.gml @@ -77,7 +77,7 @@ is_test_map = false; target_navy_number = 5; global.sound_playing = 0; global.defeat = 0; -tutorial=0; +tutorial = 0; sound_in = 0; sound_to = ""; fix_right = 0; From a58754a587a1adf3d7851b1a23f7045f723335e6 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:23:26 +0300 Subject: [PATCH 14/20] Discard changes to objects/obj_controller/KeyPress_32.gml --- objects/obj_controller/KeyPress_32.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects/obj_controller/KeyPress_32.gml b/objects/obj_controller/KeyPress_32.gml index fd4e529a99..bfe2d78973 100644 --- a/objects/obj_controller/KeyPress_32.gml +++ b/objects/obj_controller/KeyPress_32.gml @@ -7,7 +7,7 @@ if (__b__) { if (__b__) { if ((obj_controller.menu == 0 && !instance_exists(obj_popup_dialogue)) || ((obj_controller.menu == 999) && instance_exists(obj_ncombat))) { if (instance_exists(obj_ncombat)) { - if (obj_ncombat.start==7) { + if (obj_ncombat.start == 7) { exit; } } From 7f6eedb41ad75b0d90227e0d40454d800a492e2b Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:25:30 +0300 Subject: [PATCH 15/20] df --- scripts/scr_animated_scanline/scr_animated_scanline.gml | 2 +- scripts/scr_arti_descr/scr_arti_descr.gml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/scr_animated_scanline/scr_animated_scanline.gml b/scripts/scr_animated_scanline/scr_animated_scanline.gml index 91b39a4af0..3bbf141fe8 100644 --- a/scripts/scr_animated_scanline/scr_animated_scanline.gml +++ b/scripts/scr_animated_scanline/scr_animated_scanline.gml @@ -6,7 +6,7 @@ function draw_animated_scanline(x1, y1, width, height, time = 10, color = 599838 if (anim <= 10) { draw_set_alpha(anim / 10); } else { - draw_set_alpha(2 - (anim / 10)); + draw_set_alpha(2-(anim / 10)); } line_move = y1 + (height * ((anim % 20) / 20)); if (irandom(100) <= 5) { diff --git a/scripts/scr_arti_descr/scr_arti_descr.gml b/scripts/scr_arti_descr/scr_arti_descr.gml index f6b7c134de..9c488878c7 100644 --- a/scripts/scr_arti_descr/scr_arti_descr.gml +++ b/scripts/scr_arti_descr/scr_arti_descr.gml @@ -10,10 +10,9 @@ function scr_arti_descr() { if (typ != "armour") { mission_data = $"This artifact is a {type()}"; if (inq_mission) { - mission_data += ", entrusted by the Inquisition.#"; + mission_data +=", entrusted by the Inquisition.#"; } else if (!inq_mission) { - mission_data += ".#"; - } + mission_data += ".#";} } else if (typ == "armour") { mission_data = $"This artifact is {type()}"; if (inq_mission) { From 4750b09335ffca532cd5a864213a129c2fda544c Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:29:36 +0300 Subject: [PATCH 16/20] ts --- .github/workflows/gobo_lint.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gobo_lint.yml b/.github/workflows/gobo_lint.yml index 355c798d98..34ab007209 100644 --- a/.github/workflows/gobo_lint.yml +++ b/.github/workflows/gobo_lint.yml @@ -19,22 +19,22 @@ jobs: pull-requests: write steps: - - name: Get PR branch + - name: Get PR branch info + id: pr_data uses: xt0rted/pull-request-comment-branch@v2 - id: comment-branch - - name: Checkout PR branch + - name: Checkout PR Branch uses: actions/checkout@v4 with: - ref: ${{ steps.comment-branch.outputs.head_ref }} - repository: ${{ steps.comment-branch.outputs.head_owner }}/${{ steps.comment-branch.outputs.head_repo }} - fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ steps.pr_data.outputs.head_owner }}/${{ steps.pr_data.outputs.head_repo }} + ref: ${{ steps.pr_data.outputs.head_ref }} - name: Get Changed Files id: changed-files uses: tj-actions/changed-files@v44 with: - base_sha: ${{ steps.comment-branch.outputs.base_ref }} + base_sha: ${{ steps.pr_data.outputs.base_ref }} files: '**.gml' - name: Setup Gobo From 958434713b24067005b7141416ac1b393d091b71 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:31:46 +0300 Subject: [PATCH 17/20] h --- .github/workflows/gobo_lint.yml | 46 +++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/.github/workflows/gobo_lint.yml b/.github/workflows/gobo_lint.yml index 34ab007209..a4b884a8a8 100644 --- a/.github/workflows/gobo_lint.yml +++ b/.github/workflows/gobo_lint.yml @@ -1,40 +1,52 @@ -name: GoboLint +name: Gobo Lint on: issue_comment: types: [created] jobs: - lint: + format: if: > github.event.issue.pull_request && - startsWith(github.event.comment.body, '/lint') && - (github.event.comment.author_association == 'COLLABORATOR' || - github.event.comment.author_association == 'MEMBER' || - github.event.comment.author_association == 'OWNER') - + startsWith(github.event.comment.body, '/format') && + (github.event.comment.author_association == 'MEMBER' || + github.event.comment.author_association == 'OWNER' || + github.event.comment.author_association == 'COLLABORATOR') runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - - name: Get PR branch info - id: pr_data - uses: xt0rted/pull-request-comment-branch@v2 + - name: Fetch PR Details + id: pr + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Use the GitHub CLI to get the branch name and the full repository name (owner/repo) + PR_JSON=$(gh pr view ${{ github.event.issue.number }} --repo ${{ github.repository }} --json headRefName,headRepositoryOwner,headRepository) + + # Extract values using jq + HEAD_REF=$(echo "$PR_JSON" | jq -r .headRefName) + HEAD_OWNER=$(echo "$PR_JSON" | jq -r .headRepositoryOwner.login) + HEAD_REPO_NAME=$(echo "$PR_JSON" | jq -r .headRepository.name) + + echo "head_ref=$HEAD_REF" >> $GITHUB_OUTPUT + echo "head_repo=$HEAD_OWNER/$HEAD_REPO_NAME" >> $GITHUB_OUTPUT - name: Checkout PR Branch uses: actions/checkout@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - repository: ${{ steps.pr_data.outputs.head_owner }}/${{ steps.pr_data.outputs.head_repo }} - ref: ${{ steps.pr_data.outputs.head_ref }} + repository: ${{ steps.pr.outputs.head_repo }} + ref: ${{ steps.pr.outputs.head_ref }} + fetch-depth: 0 - name: Get Changed Files id: changed-files uses: tj-actions/changed-files@v44 with: - base_sha: ${{ steps.pr_data.outputs.base_ref }} + base_sha: ${{ github.event.issue.pull_request.base.sha }} files: '**.gml' - name: Setup Gobo @@ -44,19 +56,19 @@ jobs: unzip gobo-ubuntu.zip chmod +x ./gobo - - name: Run Linter + - name: Run Formatter if: steps.changed-files.outputs.any_changed == 'true' run: | for file in ${{ steps.changed-files.outputs.all_changed_files }}; do if [ -f "$file" ]; then - echo "Linting $file..." + echo "Formatting $file..." ./gobo "$file" fi done - - name: Commit Changes + - name: Commit and Push changes if: steps.changed-files.outputs.any_changed == 'true' uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: "style: auto-lint GML files with Gobo" + commit_message: "style: Auto-format GML files with Gobo" file_pattern: '**.gml' \ No newline at end of file From 3062c2f7447341b53549fba239d11234d6ff88ee Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:33:38 +0300 Subject: [PATCH 18/20] Discard changes to scripts/scr_animated_scanline/scr_animated_scanline.gml --- scripts/scr_animated_scanline/scr_animated_scanline.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/scr_animated_scanline/scr_animated_scanline.gml b/scripts/scr_animated_scanline/scr_animated_scanline.gml index 3bbf141fe8..91b39a4af0 100644 --- a/scripts/scr_animated_scanline/scr_animated_scanline.gml +++ b/scripts/scr_animated_scanline/scr_animated_scanline.gml @@ -6,7 +6,7 @@ function draw_animated_scanline(x1, y1, width, height, time = 10, color = 599838 if (anim <= 10) { draw_set_alpha(anim / 10); } else { - draw_set_alpha(2-(anim / 10)); + draw_set_alpha(2 - (anim / 10)); } line_move = y1 + (height * ((anim % 20) / 20)); if (irandom(100) <= 5) { From a32c8bf80a5d258a5100ad2604de879f8be4656a Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:33:46 +0300 Subject: [PATCH 19/20] Discard changes to scripts/scr_arti_descr/scr_arti_descr.gml --- scripts/scr_arti_descr/scr_arti_descr.gml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/scr_arti_descr/scr_arti_descr.gml b/scripts/scr_arti_descr/scr_arti_descr.gml index 9c488878c7..f6b7c134de 100644 --- a/scripts/scr_arti_descr/scr_arti_descr.gml +++ b/scripts/scr_arti_descr/scr_arti_descr.gml @@ -10,9 +10,10 @@ function scr_arti_descr() { if (typ != "armour") { mission_data = $"This artifact is a {type()}"; if (inq_mission) { - mission_data +=", entrusted by the Inquisition.#"; + mission_data += ", entrusted by the Inquisition.#"; } else if (!inq_mission) { - mission_data += ".#";} + mission_data += ".#"; + } } else if (typ == "armour") { mission_data = $"This artifact is {type()}"; if (inq_mission) { From bd11cbaf89160846761f6bf1ec37e059dee760f0 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:35:55 +0300 Subject: [PATCH 20/20] DF --- scripts/scr_animated_scanline/scr_animated_scanline.gml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/scr_animated_scanline/scr_animated_scanline.gml b/scripts/scr_animated_scanline/scr_animated_scanline.gml index 91b39a4af0..11394b9ea6 100644 --- a/scripts/scr_animated_scanline/scr_animated_scanline.gml +++ b/scripts/scr_animated_scanline/scr_animated_scanline.gml @@ -6,9 +6,8 @@ function draw_animated_scanline(x1, y1, width, height, time = 10, color = 599838 if (anim <= 10) { draw_set_alpha(anim / 10); } else { - draw_set_alpha(2 - (anim / 10)); - } - line_move = y1 + (height * ((anim % 20) / 20)); + draw_set_alpha(2-(anim / 10)); + }line_move = y1 + (height * ((anim % 20) / 20)); if (irandom(100) <= 5) { line_move -= 4; }