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

List based ammo user #3317

Open
wants to merge 15 commits into
base: Development
Choose a base branch
from
Open

List based ammo user #3317

wants to merge 15 commits into from

Conversation

CMDR-Bill-Doors
Copy link
Contributor

@CMDR-Bill-Doors CMDR-Bill-Doors commented Jul 30, 2024

Additions

CompAmmoListUser and CompAmmoListUserGeneric, which accepts a list of ammosets
CompProperties_AmmoListUser with additionalAmmoSets storing a list of ammosets

Changes

Moved most code in CompAmmoUserGeneric to an abstract class CompVariableAmmoUser

Reasoning

-Allow more freedom in variable ammosets

Alternatives

-Autoloader(magnum pistol)

Testing

Check tests you have performed:

  • Compiles without warnings
  • Game runs without errors
  • Playtested a colony (an autoloader and a turret)

@CMDR-Bill-Doors CMDR-Bill-Doors requested review from a team as code owners July 30, 2024 12:19
Copy link

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

@github-actions github-actions bot added the Download in Comments This PR has a zipfile download available. label Jul 30, 2024
Copy link

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

Copy link

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

}
}

AmmoSetDef currentlyHoveredOverAmmoSet = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be explicit about things being private, rather than using default visibility.

Also, is there a reason to stick these fields down here, instead of at the top with the rest of the fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes done.

Copy link

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

Copy link

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

Copy link

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

Copy link
Contributor

@N7Huntsman N7Huntsman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In testing, the autoloaders seem to be inheriting viable ammo from other sources. Do we know what's causing this?

https://cdn.discordapp.com/attachments/322827713335394304/1290041137217802292/20240929160328_1.jpg?ex=670eca6e&is=670d78ee&hm=33a4d9a765d1384ce93b151437c4531593c1686266c123436f8b1f0aaf1b6db9&

In the above case, the autoloader had:

      <li Class="CombatExtended.CompProperties_AmmoListUser">
        <compClass>CombatExtended.CompAmmoListUserGeneric</compClass>
        <magazineSize>400</magazineSize>
        <reloadTime>7.8</reloadTime>
        <ammoSet>AmmoSet_762x51mmNATO</ammoSet>
        <additionalAmmoSets>
            <li>AmmoSet_44Magnum</li>
            <li>AmmoSet_556x45mmNATO</li>
            <li>AmmoSet_145x114mm</li>
        </additionalAmmoSets>
      </li>
      ```

Copy link

github-actions bot commented Dec 8, 2024

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

Copy link

github-actions bot commented Dec 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Download in Comments This PR has a zipfile download available.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants