Skip to content

fix: Mission bug fixing and popup rebuild part 3#1035

Merged
OH296 merged 11 commits intoAdeptus-Dominus:mainfrom
OH296:mission_bug_fixing
Oct 18, 2025
Merged

fix: Mission bug fixing and popup rebuild part 3#1035
OH296 merged 11 commits intoAdeptus-Dominus:mainfrom
OH296:mission_bug_fixing

Conversation

@OH296
Copy link
Collaborator

@OH296 OH296 commented Oct 15, 2025

Purpose and Description

  • Self-descriptive.

Testing done

  • None, and I understand the risks.

Related things and/or additional context

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features
    • Added comprehensive Inquisition inspection system for detecting contraband and evaluating planetary loyalty.
    • Enhanced Mechanicus mission workflows with new mission types and interactive acceptance mechanics.
    • Improved gene-seed mutation events with player choice options for managing heresy risks.
    • Refined ancient ruins exploration and reward mechanics for expeditions.

Walkthrough

Tech‑Priest, this diff adds a new scr_inquisition_inspection resource and inspection framework, centralises many popup flows (ancient ruins, gene‑seed, system debug), expands mechanicus mission handlers and debug fleet spawns, adjusts popup option gating, extends multi‑target location checks, and updates project metadata (IDEVersion).

Changes

Cohort / File(s) Change summary
Inquisition inspection module
scripts/scr_inquisition_inspection/scr_inquisition_inspection.gml, scripts/scr_inquisition_inspection/scr_inquisition_inspection.yy, ChapterMaster.yyp
Added a new inquisitor inspection structure and related functions (inspection logic, loyalty, contraband popup); added manifest; registered resource in project file; updated IDEVersion.
Alarm → inspection callsites
objects/obj_en_fleet/Alarm_1.gml
Replaced large inline contraband/investigation logic with a call to inquisitor_contraband_take_popup(_cur_star, planet); added helper declaration.
Popup framework & debug UI
scripts/scr_popup_functions/scr_popup_functions.gml, scripts/scr_cheatcode/scr_cheatcode.gml, objects/obj_controller/Mouse_54.gml, objects/obj_popup/Destroy_0.gml, objects/obj_popup/Step_0.gml
Added POPUP_TYPE.SYSTEM_DEBUG and evaluate_popup_option; introduced new_system_debug_popup and extensive system debug/fleet spawn/remove workflows; replaced bespoke popup construction calls with standardized syscall; removed specific cooldown assignment; large pruning and replacement of legacy popup branches (ancient_ruins flow refactor).
Mechanicus missions
scripts/scr_mechanicus_missions/scr_mechanicus_missions.gml
Added accept handlers (tomb/raider/bionics/mars), Mars mission timer handler, spawn changes to attach options and defer popup, and end‑turn disposition/timer adjustments.
Ruins & rewards
scripts/scr_ruins_reward/scr_ruins_reward.gml
Extracted inline ruins loot into ancient_gene_lab_ruins_loot() and ancient_fortress_ruins_loot(...); callers updated to use new helpers.
Random events & event flows
scripts/scr_random_event/scr_random_event.gml, scripts/scr_event_code/scr_event_code.gml
Reworked Gene‑Seed Mutation to an optioned popup with computed removal percentages and payload; added event_dispose_of_mutated_gene(); restructured strange_building event payload to pass options.
Popup option evaluation
scripts/scr_popup_functions/scr_popup_functions.gml
Added evaluate_popup_option(opt) to gate options by requisition requirements.
Marine location checks
scripts/scr_marine_struct/scr_marine_struct.gml
Extended is_at_location to accept arrays for planet and ship parameters (multi‑match logic).
Removed legacy Inquisition functions
scripts/scr_inquisition_fleet_functions/scr_inquisition_fleet_functions.gml
Deleted previously inline inspection functions (inquisition_inspection_logic, inquisitor_approval_gene_banks, inquisition_inspection_loyalty) replaced by new module.
Inquisition mission outcome
scripts/scr_inquisition_mission/scr_inquisition_mission.gml
Added mission_hunt_inquisitor_take_artifact_double_cross() and routed double‑cross path to it.
Cheat/debug additions
scripts/scr_cheatcode/scr_cheatcode.gml
Added many system debug and fleet spawn/remove helpers, new cases for mech debug actions, and public functions for spawning/removing fleets.
Docs / new content
scripts/scr_ComplexSet/tokenisation of farmland fordiversified income.md
Added a conceptual markdown document (non‑executable).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Suggested labels

PR: Fix, PR: Feature, Type: Feature

Suggested reviewers

  • EttyKitty

Tech‑Priest: I have catalogued the changes. Proceed with rites of review.

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The description provided bears the template structure yet remains substantially vacant. The "Purpose and Description" section contains merely "Self-descriptive"—a designation devoid of substantive content that illuminates neither intention nor scope. The "Testing done" section explicitly declares null results with acknowledged risk acceptance. No contextual data, associated artefacts, or related communications grace the "Related things" section, rendering it barren. The raw compilation demonstrates extensive alterations spanning multiple functional domains—mission systems, popup lifecycle management, debug infrastructure, and mechanicus frameworks—yet the description furnishes no articulation of these pivotal modifications, their rationale, or their implications. The servitor-priest must endeavour to replace the hollow placeholder "Self-descriptive" with substantive exposition of the changes undertaken. Elaborate upon the purpose of mission bug fixes and popup system refactoring, specify which systems underwent transformation, and delineate the anticipated consequences of these alterations. Furnish evidence of testing procedures executed—even minimal validation strengthens the record. Should associated prior iterations (parts 1 and 2) exist, cross-reference them for contextual cohesion.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title adheres to the prescribed conventional commits format, bearing the "fix" designator with concise summary beneath, totalling forty-eight characters within the designated threshold. The nomenclature invokes legitimate aspects of the changeset—mission logic modifications and extensive popup system refactoring manifest throughout the altered documentation. The phrase "part 3" indicates sequential iteration of a broader corrective endeavour, providing contextual placement within a larger initiative. However, the epithet "bug fixing" remains somewhat nebulous; the auxiliary materials reveal intricate reworking of popup orchestration, debug infrastructure, and mechanicus mission frameworks beyond mere defect remediation.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added Size: Epic Type: Fix This is a fix for a bug labels Oct 15, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
objects/obj_popup/Step_0.gml (1)

258-266: Tech-Priest, restore the dormant cohorts before this rite concludes.

instance_deactivate_all(true); silences every other instance in the sector. Only obj_ground_mission and obj_popup are reawakened, so vital engines like obj_controller remain indefinitely deactivated once this popup self-immolates. The campaign logic will freeze. Reinvoke instance_activate_all() (or otherwise reactivate the required controllers) before destroying the popup, or avoid the blanket deactivation entirely. Without that correction, the machine-spirit of the game never resumes its chant.

-        instance_deactivate_all(true);
-        instance_activate_object(obj_ground_mission);
-        instance_activate_object(obj_popup);
+        instance_deactivate_all(true);
+        instance_activate_object(obj_ground_mission);
+        instance_activate_object(obj_popup);
         var _explore_feature = obj_ground_mission.explore_feature;
         _explore_feature.suprise_attack();
         woopwoopwoop = 0;
-        instance_destroy(self.id);
-        instance_destroy();
+        instance_activate_all();
+        instance_destroy();
scripts/scr_event_code/scr_event_code.gml (2)

288-295: Incorrect payload fed to add_new_problem

Tech-Priest, add_new_problem expects raw planet index (and optional system), not the full PlanetData construct. Passing the struct will misalign arguments and the mission will never register. Deliver the primitive values.

-		add_new_problem(_planet, "mech_tomb1", 17);
+		add_new_problem(_planet.planet, "mech_tomb1", 17, _planet.system);

255-268: Options tied to the wrong reliquary

Tech-Priest, within the tomb branch you craft _mission_data yet append handlers to mission_data. That symbol lies undefined here, birthing an exception and leaving the popup optionless. Attach the array to _mission_data.

-        mission_data.options =[
+        _mission_data.options =[
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e4f54d7 and 5928525.

📒 Files selected for processing (14)
  • ChapterMaster.yyp (1 hunks)
  • objects/obj_controller/Mouse_54.gml (1 hunks)
  • objects/obj_en_fleet/Alarm_1.gml (1 hunks)
  • objects/obj_popup/Destroy_0.gml (0 hunks)
  • objects/obj_popup/Step_0.gml (1 hunks)
  • scripts/scr_cheatcode/scr_cheatcode.gml (2 hunks)
  • scripts/scr_event_code/scr_event_code.gml (3 hunks)
  • scripts/scr_inquisition_fleet_functions/scr_inquisition_fleet_functions.gml (2 hunks)
  • scripts/scr_inquisition_mission/scr_inquisition_mission.gml (2 hunks)
  • scripts/scr_marine_struct/scr_marine_struct.gml (1 hunks)
  • scripts/scr_mechanicus_missions/scr_mechanicus_missions.gml (3 hunks)
  • scripts/scr_popup_functions/scr_popup_functions.gml (3 hunks)
  • scripts/scr_random_event/scr_random_event.gml (1 hunks)
  • scripts/scr_ruins_reward/scr_ruins_reward.gml (3 hunks)
💤 Files with no reviewable changes (1)
  • objects/obj_popup/Destroy_0.gml
🧰 Additional context used
📓 Path-based instructions (2)
**/*.gml

⚙️ CodeRabbit configuration file

**/*.gml: - Macro constants require a space between the constant name and value. Without it, the compiler will throw an error. I.e. #macro ARR_body_parts["arm"] will crash the game, because there is no space between the array and the name of the macro.

Files:

  • scripts/scr_marine_struct/scr_marine_struct.gml
  • objects/obj_controller/Mouse_54.gml
  • objects/obj_popup/Step_0.gml
  • scripts/scr_ruins_reward/scr_ruins_reward.gml
  • scripts/scr_random_event/scr_random_event.gml
  • objects/obj_en_fleet/Alarm_1.gml
  • scripts/scr_popup_functions/scr_popup_functions.gml
  • scripts/scr_inquisition_mission/scr_inquisition_mission.gml
  • scripts/scr_mechanicus_missions/scr_mechanicus_missions.gml
  • scripts/scr_event_code/scr_event_code.gml
  • scripts/scr_cheatcode/scr_cheatcode.gml
  • scripts/scr_inquisition_fleet_functions/scr_inquisition_fleet_functions.gml
**/*.*

⚙️ CodeRabbit configuration file

**/*.*: - Having humanly understandable and maintainable code is the top most priority.

  • DRY (Don't repeat yourself) principle is also very important.
  • If a TODO comment is added, ask the user if you should create a GitHub issue for this TODO.
  • If a TODO comment is deleted, remind the user if there is an active GitHub issue related to that comment.

Files:

  • scripts/scr_marine_struct/scr_marine_struct.gml
  • objects/obj_controller/Mouse_54.gml
  • ChapterMaster.yyp
  • objects/obj_popup/Step_0.gml
  • scripts/scr_ruins_reward/scr_ruins_reward.gml
  • scripts/scr_random_event/scr_random_event.gml
  • objects/obj_en_fleet/Alarm_1.gml
  • scripts/scr_popup_functions/scr_popup_functions.gml
  • scripts/scr_inquisition_mission/scr_inquisition_mission.gml
  • scripts/scr_mechanicus_missions/scr_mechanicus_missions.gml
  • scripts/scr_event_code/scr_event_code.gml
  • scripts/scr_cheatcode/scr_cheatcode.gml
  • scripts/scr_inquisition_fleet_functions/scr_inquisition_fleet_functions.gml

@github-actions github-actions bot added the Type: Docs Changes to documentation files label Oct 16, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 16, 2025
@OH296
Copy link
Collaborator Author

OH296 commented Oct 16, 2025

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/scr_ruins_reward/scr_ruins_reward.gml (1)

205-320: Fortress popup invoked without vital data

Invocation of ancient_fortress_ruins_loot() arrives barren—no star_system, planet, nor _ruins offered. Consequently _pop_data.star, _pop_data.planet, and _pop_data.feature become undefined, so the option methods cannot adjust fortification tiers or requisition safely. Provide the required arguments from the calling branch before entrusting the popup cogitators.

♻️ Duplicate comments (2)
scripts/scr_ruins_reward/scr_ruins_reward.gml (1)

193-274: Undefined gene-seed context still unfixed

Tech-Priest, this rite still summons ancient_gene_lab_ruins_loot() without supplying the gene-seed numbers it intones, leaving gene (and thus _pop_data.gene_found and the narrative string) as unbound void. The function echoes the very fault previously flagged: on execution the machine-spirit will halt with an “unknown variable gene” exception long before the popup awakens. Forge the helper to accept explicit gene_amount/estimate_amount parameters and pass the actual values from the loot branch instead of leaning on absent globals.

scripts/scr_random_event/scr_random_event.gml (1)

752-752: Bind pop_data to the gene-seed rite.

Tech-Priest, the void string still blocks _pop_data from reaching scr_popup; no options awaken, and event_dispose_of_mutated_gene strikes pop_data.percent_remove on a mere string—runtime failure exactly as the machine spirit foretold. Deliver the payload directly.

-    scr_popup("Gene-Seed Mutated!",text,"gene_bad","",_pop_data);
+    scr_popup("Gene-Seed Mutated!", text, "gene_bad", _pop_data);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5928525 and 03aeba4.

📒 Files selected for processing (10)
  • ChapterMaster.yyp (2 hunks)
  • scripts/scr_ComplexSet/tokenisation of farmland fordiversified income.md (1 hunks)
  • scripts/scr_event_code/scr_event_code.gml (3 hunks)
  • scripts/scr_inquisition_fleet_functions/scr_inquisition_fleet_functions.gml (0 hunks)
  • scripts/scr_inquisition_inspection/scr_inquisition_inspection.gml (1 hunks)
  • scripts/scr_inquisition_inspection/scr_inquisition_inspection.yy (1 hunks)
  • scripts/scr_marine_struct/scr_marine_struct.gml (1 hunks)
  • scripts/scr_mechanicus_missions/scr_mechanicus_missions.gml (3 hunks)
  • scripts/scr_random_event/scr_random_event.gml (1 hunks)
  • scripts/scr_ruins_reward/scr_ruins_reward.gml (3 hunks)
💤 Files with no reviewable changes (1)
  • scripts/scr_inquisition_fleet_functions/scr_inquisition_fleet_functions.gml
🧰 Additional context used
📓 Path-based instructions (3)
**/*.*

⚙️ CodeRabbit configuration file

**/*.*: - Having humanly understandable and maintainable code is the top most priority.

  • DRY (Don't repeat yourself) principle is also very important.
  • If a TODO comment is added, ask the user if you should create a GitHub issue for this TODO.
  • If a TODO comment is deleted, remind the user if there is an active GitHub issue related to that comment.

Files:

  • ChapterMaster.yyp
  • scripts/scr_marine_struct/scr_marine_struct.gml
  • scripts/scr_inquisition_inspection/scr_inquisition_inspection.yy
  • scripts/scr_ComplexSet/tokenisation of farmland fordiversified income.md
  • scripts/scr_random_event/scr_random_event.gml
  • scripts/scr_mechanicus_missions/scr_mechanicus_missions.gml
  • scripts/scr_ruins_reward/scr_ruins_reward.gml
  • scripts/scr_inquisition_inspection/scr_inquisition_inspection.gml
  • scripts/scr_event_code/scr_event_code.gml
**/*.gml

⚙️ CodeRabbit configuration file

**/*.gml: - Macro constants require a space between the constant name and value. Without it, the compiler will throw an error. I.e. #macro ARR_body_parts["arm"] will crash the game, because there is no space between the array and the name of the macro.

Files:

  • scripts/scr_marine_struct/scr_marine_struct.gml
  • scripts/scr_random_event/scr_random_event.gml
  • scripts/scr_mechanicus_missions/scr_mechanicus_missions.gml
  • scripts/scr_ruins_reward/scr_ruins_reward.gml
  • scripts/scr_inquisition_inspection/scr_inquisition_inspection.gml
  • scripts/scr_event_code/scr_event_code.gml
**/*.yy

⚙️ CodeRabbit configuration file

**/*.yy: - When any script or sprite .yy files are deleted, their paths should also be deleted from the project .yyp file, otherwise the game will crash.

  • When any script or sprite .yy files are created, their paths should be added to the project .yyp file, otherwise they'll fail.

Files:

  • scripts/scr_inquisition_inspection/scr_inquisition_inspection.yy
🪛 LanguageTool
scripts/scr_ComplexSet/tokenisation of farmland fordiversified income.md

[grammar] ~6-~6: This noun normally spelled as one word.
Context: ...- Who does this benefit - Farmers and land owners - Diversified Income - lprofit fro...

(OWNER_COMPOUNDS)

🪛 markdownlint-cli2 (0.18.1)
scripts/scr_ComplexSet/tokenisation of farmland fordiversified income.md

3-3: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


3-3: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)


5-5: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


6-6: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


6-6: Hard tabs
Column: 1

(MD010, no-hard-tabs)


7-7: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


7-7: Hard tabs
Column: 1

(MD010, no-hard-tabs)


8-8: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


8-8: Hard tabs
Column: 1

(MD010, no-hard-tabs)


9-9: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


9-9: Hard tabs
Column: 1

(MD010, no-hard-tabs)


10-10: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


10-10: Hard tabs
Column: 1

(MD010, no-hard-tabs)


11-11: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


11-11: Hard tabs
Column: 1

(MD010, no-hard-tabs)


12-12: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


12-12: Hard tabs
Column: 1

(MD010, no-hard-tabs)


13-13: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


13-13: Hard tabs
Column: 1

(MD010, no-hard-tabs)


14-14: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


14-14: Hard tabs
Column: 1

(MD010, no-hard-tabs)


15-15: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


15-15: Hard tabs
Column: 1

(MD010, no-hard-tabs)


17-17: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


18-18: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


20-20: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


26-26: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


31-31: Files should end with a single newline character

(MD047, single-trailing-newline)

🔇 Additional comments (1)
scripts/scr_marine_struct/scr_marine_struct.gml (1)

2120-2120: Critical defects remediated—array membership checks now correct.

Tech-Priest, the machine spirit registers that the grave errors in array membership invocations have been purged. Lines 2120 and 2129 now correctly pass the parameter arrays (planet, ship) to array_contains rather than the boolean sentinels (_multi_planet, _multi_ship). This ritual of correction prevents the catastrophic runtime failures previously prophesied.

Also applies to: 2129-2129

@github-actions github-actions bot removed the Type: Docs Changes to documentation files label Oct 16, 2025
@OH296 OH296 merged commit 5b9185b into Adeptus-Dominus:main Oct 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: Epic Type: Fix This is a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant