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: New Player system spawn options #384

Merged
merged 17 commits into from
Jan 20, 2025

Conversation

OH296
Copy link
Collaborator

@OH296 OH296 commented Jan 5, 2025

Description of changes

  • Adds new options to player home and recruit options

  • adds a map location spawn consisting of fringe or central for players that wish to control the location of their spawn star

  • adds three options for recruitment and home star spawn relations (should be self explanatory)

    • same planet
    • same system
    • different systems
  • created a radio_buttons constructor to make this easier

  • removed a bug where two systems could spawn with the players home name

  • removed a bug with

Reasons for changes

  • functionality currently does not work

Related links

How have you tested your changes?

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

Summary by Sourcery

Add new player spawn options for homeworld and recruiting world locations. Allow players to choose between fringe or central spawn locations and configure the relationship between homeworld and recruiting world (same planet, same system, or different systems).

New Features:

  • Players can now choose to have their homeworld and recruiting world on the same planet, within the same system, or in different systems.
  • Added "Fringe" and "Central" spawn location options, giving players more control over where their starting star system is located on the map.

Copy link
Contributor

sourcery-ai bot commented Jan 5, 2025

Reviewer's Guide by Sourcery

This pull request introduces new player spawn options, allowing players to select their home and recruiting world locations. It also includes a radio button constructor to simplify the creation of these options.

File-Level Changes

Change Details Files
Added new options for player home and recruit locations.
  • Added a map location spawn option with fringe or central choices.
  • Added options for recruitment and home star spawn relations: same planet, same system, or different systems.
  • Created a radio_buttons constructor to make option creation easier.
  • Removed a bug where two systems could spawn with the player's home name.
objects/obj_creation/Draw_0.gml
objects/obj_controller/Alarm_1.gml
scripts/scr_buttons/scr_buttons.gml
scripts/scr_map_and_warp_functions/scr_map_and_warp_functions.gml
scripts/scr_chapter_new/scr_chapter_new.gml
scripts/scr_initialize_custom/scr_initialize_custom.gml
scripts/scr_save_chapter/scr_save_chapter.gml
objects/obj_creation/Step_0.gml
scripts/scr_player_fleet_functions/scr_player_fleet_functions.gml
scripts/scr_creation/scr_creation.gml
objects/obj_p_fleet/Alarm_5.gml
scripts/scr_livery_setup/scr_livery_setup.gml
scripts/scr_creation_draw_slides/scr_creation_draw_slides.gml
scripts/scr_creation_home_planet_create/scr_creation_home_planet_create.gml
scripts/scr_system_spawn_functions/scr_system_spawn_functions.gml
Refactored the chapter creation screen to use enums and new functions.
  • Moved chapter creation drawing logic to new functions.
  • Added an enum for creation slides.
  • Added a data slate object to help with drawing.
objects/obj_creation/Draw_0.gml
scripts/scr_creation_draw_slides/scr_creation_draw_slides.gml
scripts/scr_creation_home_planet_create/scr_creation_home_planet_create.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

@OH296 OH296 marked this pull request as draft January 5, 2025 13:25
@github-actions github-actions bot added PR: Sprites Changes to sprites/images PR: Feature Adds something new PR: Major Coding Big enough to possibly clash with other PRs labels Jan 5, 2025
sourcery-ai[bot]
sourcery-ai bot previously approved these changes Jan 5, 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 - here's some feedback:

Overall Comments:

  • Consider adding documentation comments explaining the spawn location selection algorithm in scr_system_spawn_functions.gml, particularly around the fringe vs central spawn logic
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 force-pushed the fix/duplicate_star_names branch 2 times, most recently from 40bd382 to abbbfe4 Compare January 9, 2025 00:23
@OH296 OH296 force-pushed the fix/duplicate_star_names branch 2 times, most recently from f4fa111 to 3f52882 Compare January 16, 2025 00:16
@OH296 OH296 force-pushed the fix/duplicate_star_names branch from 511ae7e to f578627 Compare January 20, 2025 00:22
@OH296
Copy link
Collaborator Author

OH296 commented Jan 20, 2025

@sourcery-ai review

@OH296 OH296 marked this pull request as ready for review January 20, 2025 00:30
@OH296 OH296 changed the base branch from release/0.10.0.0 to main January 20, 2025 00:31
@OH296
Copy link
Collaborator Author

OH296 commented Jan 20, 2025

@sourcery-ai review

@OH296
Copy link
Collaborator Author

OH296 commented Jan 20, 2025

@sourcery-ai review

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:

  • Please add additional validation to ensure player spawn locations are valid and not too close to enemy factions
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.

@OH296 OH296 merged commit 9fc57b5 into Adeptus-Dominus:main Jan 20, 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: Major Coding Big enough to possibly clash with other PRs PR: Sprites Changes to sprites/images
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant