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

feat: Refactor bionic legs drawing and add variant #404

Merged
merged 4 commits into from
Jan 16, 2025

Conversation

OH296
Copy link
Collaborator

@OH296 OH296 commented Jan 10, 2025

Description of changes

  • adds a new bionic leg variant
  • refactors bionic leg drawing with complex livery

Reasons for changes

  • allows bionic legs to be drawn with complex livery colouring
  • more variants is more better

Related links

How have you tested your changes?

  • Compile
  • New game
  • Next turn
  • Space Travel
  • Ground Battle
Screenshot 2025-01-10 at 21 38 56 ![thh_thursday_loyalistherald-jan09-image1-qb7bzqak1i](https://github.com/user-attachments/assets/f605ba1b-76fc-4975-b6ad-293f75517019)

Summary by Sourcery

Add support for drawing bionic legs with complex livery and introduce a new bionic leg variant.

New Features:

  • Added a new bionic leg variant.

Tests:

  • Tested compiling and starting a new game.

Copy link
Contributor

sourcery-ai bot commented Jan 10, 2025

Reviewer's Guide by Sourcery

This pull request refactors the drawing of bionic legs and adds a new variant. The refactor allows bionic legs to be drawn with complex livery coloring. Two new sprites, spr_bionic_leg_left and spr_bionic_leg_right, were added to support the new variant. The scr_draw_unit_image script was updated to use these new sprites when drawing bionic legs with complex livery. A new add_or_replace function was also added to the ComplexSet to handle replacing existing sprites with the new bionic leg sprites.

File-Level Changes

Change Details Files
Added support for drawing bionic legs with complex livery.
  • Added logic to replace the existing leg sprites with bionic leg sprites when complex livery is enabled.
  • Added a new function ComplexSet.add_or_replace to handle replacing sprites in the ComplexSet.
scripts/scr_draw_unit_image/scr_draw_unit_image.gml
Added new bionic leg sprites.
  • Created new sprites spr_bionic_leg_left and spr_bionic_leg_right.
sprites/spr_bionic_leg_left/spr_bionic_leg_left.yy
sprites/spr_bionic_leg_right/spr_bionic_leg_right.yy
Added new leg variants.
  • Created new sprites spr_mk3_left_leg_variants and spr_mk3_right_leg_variants.
  • Updated get_complex_set to include the new leg variants.
  • Updated scr_draw_unit_image to draw the new leg variants.
sprites/spr_mk3_left_leg_variants/spr_mk3_left_leg_variants.yy
sprites/spr_mk3_right_leg_variants/spr_mk3_right_leg_variants.yy
scripts/scr_draw_unit_image/scr_draw_unit_image.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 PR: Sprites Changes to sprites/images PR: Feature Adds something new labels Jan 10, 2025
sourcery-ai[bot]
sourcery-ai bot previously approved these changes Jan 10, 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 @OH296 - 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.

@OH296 OH296 changed the base branch from release/0.10.0.0 to main January 12, 2025 21:29
@OH296
Copy link
Collaborator Author

OH296 commented Jan 12, 2025

@sourcery-ai review

@OH296 OH296 enabled auto-merge (squash) January 12, 2025 21:35
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 @OH296 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • In the MK3 armor set, you're using spr_mk3_left_leg_variants for both legs. The right leg should probably use spr_mk3_right_leg_variants instead.
Here's what I looked at during the review
  • 🟡 General issues: 2 issues 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.

@OH296 OH296 merged commit dca799b into Adeptus-Dominus:main Jan 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Feature Adds something new PR: Sprites Changes to sprites/images
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant