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

fix: Roll armor works on termies again and is improved #368

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

EttyKitty
Copy link
Collaborator

@EttyKitty EttyKitty commented Jan 2, 2025

Description of changes

  • Removed a bunch of debug lines that were slowing loading.
  • Moved all armor pick handling into the proper function.
  • Modified said function to account for "Crafters" trait.
  • Refactored said function a bit.
  • Renamed roll_armour into random_update_armour.

Reasons for changes

  • Due to the chapter data rework, terminator armor randomization was not working.

Related links

Summary by Sourcery

Fix terminator armor randomization and improve armor selection logic. Remove debug logs.

Bug Fixes:

  • Fix terminator armor randomization caused by chapter data rework.

Enhancements:

  • Improve armor selection logic.
  • Consolidate armor picking logic into a dedicated function.

Copy link
Contributor

sourcery-ai bot commented Jan 2, 2025

Reviewer's Guide by Sourcery

This PR fixes terminator armor rolling and refactors the armor rolling logic.

File-Level Changes

Change Details Files
Refactored armor rolling logic into the scr_marine_spawn_armour function and renamed it to random_update_armour.
  • Moved all armor pick handling into scr_marine_spawn_armour.
  • Added handling for the "Crafters" trait to influence armor selection.
  • Renamed roll_armour to random_update_armour.
  • Refactored the logic within the function to accommodate these changes.
scripts/scr_unit_spawn_functions/scr_unit_spawn_functions.gml
scripts/scr_marine_struct/scr_marine_struct.gml
Removed debug logging statements.
  • Removed calls to show_debug_message, debugl, and debug string formatting.
scripts/scr_initialize_custom/scr_initialize_custom.gml
scripts/scr_complex_colour_kit/scr_complex_colour_kit.gml
Updated unit creation to use the new armor rolling logic.
  • Modified add_unit_to_company to call random_update_armour for armor assignment.
  • Removed manual armor assignment based on the "Crafters" trait and terminator availability.
scripts/scr_initialize_custom/scr_initialize_custom.gml
Updated the scr_marine_game_spawn_constructions function to use the new random_update_armour function.
  • Replaced the call to roll_armour with random_update_armour.
scripts/scr_unit_spawn_functions/scr_unit_spawn_functions.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

@github-actions github-actions bot added the PR: Fix This is a fix for a bug label Jan 2, 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 and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 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 requested review from VanWeapon and OH296 January 2, 2025 07:40
@VanWeapon
Copy link
Contributor

Nice, looks clean

@EttyKitty EttyKitty added PR: Refactor Rewriting/restructuring code, while keeping general behaviour PR: Improvment Makes something better labels Jan 2, 2025
@OH296 OH296 added this to the v0.10.1 milestone Jan 3, 2025
@OH296 OH296 merged commit 47e154c into Adeptus-Dominus:release/0.10.0.0 Jan 3, 2025
3 checks passed
KRdaMystic pushed a commit to KRdaMystic/ChapterMaster that referenced this pull request Jan 12, 2025
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: Improvment Makes something better PR: Refactor Rewriting/restructuring code, while keeping general behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants