Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: Armour randomization by default #389

Conversation

EttyKitty
Copy link
Collaborator

@EttyKitty EttyKitty commented Jan 6, 2025

Description of changes

  • Revert the previous attempt to fix Terminator Armour randomization that caused bugs.

Reasons for changes

  • It started causing problems.

Related links

How have you tested your changes?

  • Compile
  • New game
  • Next turn
  • Space Travel
  • Ground Battle

Summary by Sourcery

Bug Fixes:

  • Fixed a bug where Terminator Armour randomization was causing issues.

Copy link
Contributor

sourcery-ai bot commented Jan 6, 2025

Reviewer's Guide by Sourcery

This PR reverts the changes introduced in #368, which attempted to fix Terminator Armour randomization but introduced bugs. The revert restores the previous armor assignment logic.

File-Level Changes

Change Details Files
Armor assignment logic reverted
  • Removed the conditional armor assignment based on the "Crafters" and "Poor Equipment" advantages/disadvantages.
  • Restored the original call to spawn_unit.random_update_armour() within the add_unit_to_company function to re-enable random armor assignment.
  • Removed the explicit setting of Terminator, Tartaros, MK6 Corvus, and Artificer Armour based on the chapter advantages/disadvantages and terminator availability.
  • Removed debug logging related to chapter terminators.
scripts/scr_initialize_custom/scr_initialize_custom.gml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@EttyKitty EttyKitty force-pushed the bugfix/revert-armour-rando branch from c19f863 to 798bce8 Compare January 6, 2025 18:16
@EttyKitty EttyKitty added the PR: Revert Reverts previous change label Jan 6, 2025
@EttyKitty
Copy link
Collaborator Author

@sourcery-ai review

sourcery-ai[bot]
sourcery-ai bot previously approved these changes Jan 6, 2025
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @EttyKitty - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider extracting the duplicated armor selection logic into a helper function to reduce code duplication and make future maintenance easier.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @EttyKitty - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider extracting the repeated armor selection logic into a helper function to reduce code duplication. The same pattern appears multiple times and could be consolidated.
  • There's a debug message that was uncommented (show_debug_message($"chap terminators {terminator}")). This should probably remain commented out in production code.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@EttyKitty EttyKitty added the PR: Fix This is a fix for a bug label Jan 6, 2025
@EttyKitty EttyKitty merged commit 6da0330 into Adeptus-Dominus:release/0.10.0.0 Jan 6, 2025
2 checks passed
@EttyKitty EttyKitty deleted the bugfix/revert-armour-rando branch January 6, 2025 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Fix This is a fix for a bug PR: Revert Reverts previous change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant