Skip to content

Fix Autoloader Bug#4598

Open
ViralReaction wants to merge 1 commit into
Developmentfrom
Fix-Autoloaders
Open

Fix Autoloader Bug#4598
ViralReaction wants to merge 1 commit into
Developmentfrom
Fix-Autoloaders

Conversation

@ViralReaction
Copy link
Copy Markdown
Contributor

@ViralReaction ViralReaction commented May 25, 2026

Changes

Describe adjustments to existing features made in this merge, e.g.

  • Fixes unique autoloader bug. By checking if SelectedAmmo is different than ammo in autoloader, if replaced ammo is on than it will change the selected ammo on the turret to the current ammo in autoloader.
  • Refactored last bit of method for readability
Note:
autoloader have C# bug that won't load same ammo from bugs chat

    found a bug with autoloaders
    this one is a bit elaborate
    build an autocannon, set its ammo type to ammo type a
    build an autoloader, set its ammo type to ammo type b, and enable ammo type replacement
    after that, the autoloader will top up the turret as intended
    howver, if you then change the ammo type of the turret without touching the autoloader, the autoloader will then reload the turret forever    that allows you to load more ammo into a turret than what the turret normally allows

Reasoning

Why did you choose to implement things this way, e.g.

  • Bug Requires fixing. FullMagazine uses SelectedAmmo to determine if it is true or false.
  • Readability

Alternatives

Describe alternative implementations you have considered, e.g.

  • Suffer

Testing

Check tests you have performed:

  • Compiles without warnings
  • Game runs without errors
  • (For compatibility patches) ...with and without patched mod loaded
  • Playtested a colony (specify how long)

@ViralReaction ViralReaction requested review from a team as code owners May 25, 2026 20:14
@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-26418074561.zip

@github-actions github-actions Bot added the Download in Comments This PR has a zipfile download available. label May 25, 2026
@ViralReaction ViralReaction added the C# Requires a C# solution. label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C# Requires a C# solution. Download in Comments This PR has a zipfile download available.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants