Skip to content

Remove the weapon class limit - #7759

Draft
Goober5000 wants to merge 2 commits into
scp-fs2open:masterfrom
Goober5000:feature/remove_weapon_class_limits
Draft

Remove the weapon class limit#7759
Goober5000 wants to merge 2 commits into
scp-fs2open:masterfrom
Goober5000:feature/remove_weapon_class_limits

Conversation

@Goober5000

@Goober5000 Goober5000 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

With every fixed-size weapon-class-indexed structure now converted to dynamic containers, we can finally remove the MAX_WEAPON_TYPES limit!

This depends on PR #7758 and is in draft until that is merged.

@Goober5000 Goober5000 added this to the Release 27.0 milestone Aug 31, 2026
@Goober5000 Goober5000 added the feature A totally new sort of functionality label Aug 31, 2026
@Goober5000
Goober5000 force-pushed the feature/remove_weapon_class_limits branch from 50566f5 to 20ce7e3 Compare August 31, 2026 03:52
Goober5000 and others added 2 commits August 31, 2026 00:00
`support_ship_info::rearm_weapon_pool` was a dense per-weapon-class array where -1 = unlimited (the default), 0 = not rearmable, and >0 = remaining stockpile.  Convert it to a sparse per-team map:

  `std::array<SCP_map<int, int>, MAX_TVT_TEAMS> rearm_weapon_pool;`
  `int rearm_pool_default() const;  // -1, or 0 under rearm_pool_from_loadout`

Mission-file format and save output are unchanged.  Also tightens the two weapon-class bounds checks in ship.cpp.  This removes another `MAX_WEAPON_TYPES` sized structure on the way to lifting the weapon class limit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
With every fixed-size weapon-class-indexed structure now converted to dynamic containers, we can finally remove the `MAX_WEAPON_TYPES` limit!

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Goober5000
Goober5000 force-pushed the feature/remove_weapon_class_limits branch from 20ce7e3 to 72525e2 Compare August 31, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A totally new sort of functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant