fix: make "Demand" diplomacy actions work inquisition#910
fix: make "Demand" diplomacy actions work inquisition#910OH296 merged 2 commits intoAdeptus-Dominus:mainfrom
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughSummary by CodeRabbit
WalkthroughBy the Omnissiah's will, inspection and diplomacy protocols have been refactored. Inspection pass logic for the Inquisition is modularised into dedicated functions, and dialogue options are standardised. Debug override logic is integrated into the diplomacy UI, and successful artefact returns now grant inspection passes. Minor formatting and internal logic improvements are also implemented. Changes
Suggested labels
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
scripts/scr_demand/scr_demand.gml(2 hunks)scripts/scr_dialogue/scr_dialogue.gml(8 hunks)scripts/scr_diplomacy_helpers/scr_diplomacy_helpers.gml(2 hunks)scripts/scr_inquisition_fleet_functions/scr_inquisition_fleet_functions.gml(1 hunks)scripts/scr_quest/scr_quest.gml(1 hunks)scripts/scr_ui_diplomacy/scr_ui_diplomacy.gml(4 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.gml
Instructions used from:
Sources:
⚙️ CodeRabbit Configuration File
**/*.*
Instructions used from:
Sources:
⚙️ CodeRabbit Configuration File
🧠 Learnings (6)
📓 Common learnings
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#0
File: :0-0
Timestamp: 2025-03-20T22:22:57.319Z
Learning: In the ChapterMaster game PR #424, the psychic power system was changed to be data-driven, with perils now able to occur on both successful and failed casts but with reduced frequency overall.
Learnt from: MCPO-Spartan-117
PR: Adeptus-Dominus/ChapterMaster#526
File: objects/obj_popup/Draw_0.gml:234-239
Timestamp: 2025-03-01T11:06:25.427Z
Learning: The comment "Need to modify ^^^^ based on if it is chaos or daemonic" in the artifact gifting code is intentionally kept as a reminder that this implementation is not yet finished, despite the significant refactoring already done.
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#0
File: :0-0
Timestamp: 2025-04-05T20:54:45.813Z
Learning: EttyKitty requested a rework of the vehicle and marine recovery system in ChapterMaster. The current system allows guaranteed recovery with enough recovery points, while the proposed system would use random chance modified by techmarine skill and item bonuses.
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#0
File: :0-0
Timestamp: 2025-04-05T20:58:21.881Z
Learning: In the ChapterMaster game, there's a need to refactor hardcoded item effects and move them to a "specials" property of items, following the pattern established with the `combi_tool` special. This improves code maintainability and makes effects more explicit in item definitions.
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#0
File: :0-0
Timestamp: 2025-04-05T20:58:21.881Z
Learning: In the ChapterMaster game, there's a need to refactor hardcoded item effects and move them to a "specials" property of items, following the pattern established with the `combi_tool` special. This improves code maintainability and makes effects more explicit in item definitions.
scripts/scr_ui_diplomacy/scr_ui_diplomacy.gml (6)
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#649
File: objects/obj_enunit/Alarm_0.gml:289-291
Timestamp: 2025-03-31T15:41:45.611Z
Learning: GameMaker Studio's function `action_if_variable(image_index, -500, 0)` is auto-generated code from GameMaker's visual Drag and Drop system. It checks if image_index equals -500. In ChapterMaster, this was being used as a special flag for enemy unit movement, but wasn't triggering consistently, causing enemies to move only every other turn. The refactored code replaced this with direct function calls at specific combat stages.
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.
Learnt from: MCPO-Spartan-117
PR: Adeptus-Dominus/ChapterMaster#526
File: objects/obj_popup/Draw_0.gml:234-239
Timestamp: 2025-03-01T11:06:25.427Z
Learning: The comment "Need to modify ^^^^ based on if it is chaos or daemonic" in the artifact gifting code is intentionally kept as a reminder that this implementation is not yet finished, despite the significant refactoring already done.
Learnt from: MCPO-Spartan-117
PR: Adeptus-Dominus/ChapterMaster#504
File: scripts/scr_draw_management_unit/scr_draw_management_unit.gml:168-171
Timestamp: 2025-02-23T07:50:48.327Z
Learning: In the ChapterMaster codebase, when coordinates are modified after a drawing operation but before being stored in tooltips, it may be intentional for proper tooltip alignment. Such modifications should not be flagged unless there's clear evidence of unintended behavior.
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#0
File: :0-0
Timestamp: 2025-04-16T09:51:55.065Z
Learning: In obj_ingame_menu/Step_0.gml, the line "if (effect=14){instance_create(0,0,obj_fade);fading=0.1;}" must not be commented out, as it's critical for menu button transitions. When clicking the Exit button, it sets effect=14, but without this handler creating the fade effect object, no transition occurs.
scripts/scr_quest/scr_quest.gml (2)
Learnt from: MCPO-Spartan-117
PR: Adeptus-Dominus/ChapterMaster#526
File: objects/obj_popup/Draw_0.gml:234-239
Timestamp: 2025-03-01T11:06:25.427Z
Learning: The comment "Need to modify ^^^^ based on if it is chaos or daemonic" in the artifact gifting code is intentionally kept as a reminder that this implementation is not yet finished, despite the significant refactoring already done.
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#0
File: :0-0
Timestamp: 2025-03-20T22:22:57.319Z
Learning: In the ChapterMaster game PR #424, the psychic power system was changed to be data-driven, with perils now able to occur on both successful and failed casts but with reduced frequency overall.
scripts/scr_diplomacy_helpers/scr_diplomacy_helpers.gml (2)
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.
scripts/scr_dialogue/scr_dialogue.gml (4)
undefined
<retrieved_learning>
Learnt from: MCPO-Spartan-117
PR: #526
File: objects/obj_popup/Draw_0.gml:234-239
Timestamp: 2025-03-01T11:06:25.427Z
Learning: The comment "Need to modify ^^^^ based on if it is chaos or daemonic" in the artifact gifting code is intentionally kept as a reminder that this implementation is not yet finished, despite the significant refactoring already done.
</retrieved_learning>
<retrieved_learning>
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#0
File: :0-0
Timestamp: 2025-03-20T22:22:57.319Z
Learning: In the ChapterMaster game PR #424, the psychic power system was changed to be data-driven, with perils now able to occur on both successful and failed casts but with reduced frequency overall.
</retrieved_learning>
<retrieved_learning>
Learnt from: EttyKitty
PR: #878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.
</retrieved_learning>
<retrieved_learning>
Learnt from: EttyKitty
PR: #878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.
</retrieved_learning>
scripts/scr_demand/scr_demand.gml (3)
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.
Learnt from: MCPO-Spartan-117
PR: Adeptus-Dominus/ChapterMaster#526
File: objects/obj_popup/Draw_0.gml:234-239
Timestamp: 2025-03-01T11:06:25.427Z
Learning: The comment "Need to modify ^^^^ based on if it is chaos or daemonic" in the artifact gifting code is intentionally kept as a reminder that this implementation is not yet finished, despite the significant refactoring already done.
🔇 Additional comments (17)
scripts/scr_inquisition_fleet_functions/scr_inquisition_fleet_functions.gml (1)
16-16: By the Omnissiah's will, proper spacing between sacred functions has been restored.This formatting improvement enhances code readability according to the blessed protocols.
scripts/scr_diplomacy_helpers/scr_diplomacy_helpers.gml (2)
86-95: The sacred interface protocols have been correctly updated to access option text properties.These modifications properly reference the
.option_textfield of diplomacy option objects, ensuring text width calculations and rendering functions operate on the correct data-streams.
233-236: The diplomatic subroutine execution order has been optimised for sequential processing.Removing the early exit allows both method execution and dialogue progression to occur in sequence, enhancing the flexibility of the diplomacy system's machine logic.
scripts/scr_dialogue/scr_dialogue.gml (8)
481-485: Demand Method keyphrase implementation appears sound.The new "Demand Method" dialogue keyphrase adds three structured diplomacy options following established patterns. The tooltip parameter for "Threaten" provides user feedback regarding threat plausibility.
754-757: Cancel option standardisation - Chaos faction.The transformation from simple text to structured object with
goto:"disagree"navigation aligns with the systematic diplomacy option processing improvements mentioned in the AI summary.
996-999: Cancel option standardisation - Imperium faction.Consistent implementation of structured "Cancel" option matching the pattern established across other factions.
1202-1205: Cancel option standardisation - Mechanicus faction.By the Machine God's blessing, this follows the same logical pattern as other faction implementations.
1792-1795: Cancel option standardisation - Ecclesiarchy faction.Blessed implementation follows the established pattern for diplomacy option navigation.
2048-2051: Cancel option standardisation - Eldar faction.The structural consistency across factions demonstrates adherence to the DRY principle whilst maintaining faction-specific dialogue context.
2534-2537: Cancel option standardisation - Ork faction.Final faction implementation completes the systematic diplomacy option standardisation. The pattern remains consistent with the blessed machine logic.
1452-1471: All Inquisition inspection mechanics validated.
The functionsinquis_demand_inspection_passandinquis_use_inspection_passare defined in scripts/scr_demand/scr_demand.gml, and theinspection_passescounter is correctly initialised (objects/obj_controller/Create_0.gml), persisted (scr_save_controller/scr_load_controller.gml) and referenced in dialogue (scr_dialogue.gml). No further changes required.scripts/scr_ui_diplomacy/scr_ui_diplomacy.gml (4)
287-287: Sacred debug protocols implemented correctly.The consistent addition of
|| global.cheat_debugoverrides across all faction button image assignments follows proper debugging patterns. This enables testing diplomacy interactions without faction knowledge prerequisites.Also applies to: 292-292, 297-297, 302-302, 310-310, 312-312, 319-319, 324-324
390-390: Debug overrides properly integrated into audience request logic.The cheat_debug flag correctly bypasses faction knowledge and ignore state checks for diplomacy interactions. The logic maintains proper scope within the conditional blocks.
Also applies to: 397-397
477-477: Faction shutter display logic enhanced with debug capabilities.All faction drawing calls now properly respect the debug override flag. The pattern is consistent and maintains the original logic whilst adding test functionality.
Also applies to: 479-479, 481-481, 483-483, 485-485, 487-487, 489-489, 491-491
3-3: Validation complete: Diplomacy button hide guard functions as intendedThe
valid_diplomacy_options()routine returns true if at least one non-empty option exists. The refined check:if (!audience && !valid_diplomacy_options()) { // hide diplomacy UI }only suppresses the UI when there is no audience and no valid options—ensuring buttons remain visible if any options exist, even without an audience.
scripts/scr_demand/scr_demand.gml (2)
8-15: Fleet purification protocols functioning correctly.The
clear_inspections()function properly iterates through Inquisition fleets and cancels ongoing inspections. Logic appears sound for clearing inspection orders.
130-135: Inquisition demand logic simplified according to the Omnissiah's will.The removal of special inspection pass handling from the main demand function aligns with the modularisation into dedicated functions. The simplified logic treats all Inquisition demands as requisition requests.
Purpose and Description
Testing done
Related things and/or additional context