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: Gene seed overhaul #387

Draft
wants to merge 5 commits into
base: release/0.10.0.0
Choose a base branch
from

Conversation

OH296
Copy link
Collaborator

@OH296 OH296 commented Jan 5, 2025

Description of changes

  • make gene seed their own objects
  • this means the mutations of each gene seed are stored and viewable before implantation
  • gene seed defects will pass on to other gene seed in placed in slave incubators
    • this incentivises players to put their best gene seed in slave pods
    • leverages apothecary points for screening of gene seed
  • better control of mutations more options for gameplay with stability and purity
  • harvested gene seed from marines will retain the mutations of their parent marine

Reasons for changes

Related links

How have you tested your changes?

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

Summary by Sourcery

Introduce gene seed as objects, allowing players to view mutations before implantation. Implement gene seed defects inheritance in slave incubators, encouraging strategic gene seed placement. Improve mutation control with stability and purity mechanics. Harvested gene seed will inherit parent marine mutations. Update mechanicus tithes to use the new gene seed system.

New Features:

  • Gene seed is now tracked as objects, with mutations stored and viewable before implantation.
  • Gene seed defects can be passed on to other gene seed in slave incubators.
  • Improved mutation control with new stability and purity options.

Tests:

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

Copy link
Contributor

sourcery-ai bot commented Jan 5, 2025

Reviewer's Guide by Sourcery

This pull request overhauls the gene seed system by making gene seeds their own objects. This allows for tracking mutations before implantation, passing on defects to other gene seeds in incubators, and better control over mutations for gameplay.

File-Level Changes

Change Details Files
Gene seeds are now their own objects, stored in a gene_seed array within a GeneStock object.
  • A GeneStock object is created in the obj_controller's Create event.
  • The gene_seed_count function is introduced to track the number of gene seeds.
  • Functions for adding, removing, and harvesting gene seeds are added to the GeneStock object.
  • Existing code is updated to use the GeneStock object and its methods for managing gene seeds.
scripts/scr_apothecarium/scr_apothecarium.gml
objects/obj_controller/Create_0.gml
Gene seed mutations are now stored with the gene seed object.
  • The create_gene_seed function now returns a struct containing the mutation data.
  • Marine creation now uses the gene seed's mutation data.
  • Gene seed mutations are passed on to new gene seeds in slave pods.
scripts/scr_apothecarium/scr_apothecarium.gml
scripts/scr_marine_struct/scr_marine_struct.gml
The mechanicus tithe now takes gene seed objects.
  • The mechanicus_tithes function is added to the GeneStock object.
  • The tithe calculation now uses the GeneStock object to remove gene seeds.
scripts/scr_apothecarium/scr_apothecarium.gml
objects/obj_controller/Alarm_5.gml
Updated UI to reflect gene seed object changes.
  • Added a new draw event to display gene seed information.
  • Added a new script scr_gene_obj_creation to handle drawing the gene seed information.
objects/obj_creation/Draw_0.gml
scripts/scr_gene_obj_creation/scr_gene_obj_creation.gml
Updated various scripts to use the new gene seed system.
  • Updated references to obj_controller.gene_seed to use the gene_seed_count() function or the GeneStock object's methods.
  • Updated logic related to gene seed handling to work with the new object-based system.
objects/obj_ncombat/Alarm_5.gml
scripts/scr_cheatcode/scr_cheatcode.gml
scripts/scr_kill_unit/scr_kill_unit.gml
scripts/scr_specialist_point_handler/scr_specialist_point_handler.gml
objects/obj_controller/Step_0.gml
scripts/scr_inquisition_fleet_functions/scr_inquisition_fleet_functions.gml
objects/obj_p_ship/Alarm_3.gml
scripts/scr_recruit_data/scr_recruit_data.gml
scripts/scr_ui_advisors/scr_ui_advisors.gml
scripts/scr_load_controller/scr_load_controller.gml
scripts/scr_save_controller/scr_save_controller.gml
scripts/scr_ancient_ruins/scr_ancient_ruins.gml
scripts/scr_apothecary_ground/scr_apothecary_ground.gml
scripts/scr_crusade/scr_crusade.gml
scripts/scr_PlanetData/scr_PlanetData.gml
objects/obj_p_assra/Alarm_0.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 changed the title Gene seed overhaul feat: Gene seed overhaul 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:

  • There's a typo in the parameter name 'revover_gene' in scr_destroy_gene_slave_batch() that should be fixed to 'recover_gene'
  • Consider adding validation/error handling when accessing gene_seed_mutations to handle cases where it hasn't been initialized yet
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 marked this pull request as draft January 5, 2025 20:40
@OH296 OH296 force-pushed the gene_seed_overhaul branch from b4c9681 to 3d4d348 Compare January 6, 2025 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant