Remove the weapon class limit - #7759
Draft
Goober5000 wants to merge 2 commits into
Draft
Conversation
Goober5000
force-pushed
the
feature/remove_weapon_class_limits
branch
from
August 31, 2026 03:52
50566f5 to
20ce7e3
Compare
`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
force-pushed
the
feature/remove_weapon_class_limits
branch
from
August 31, 2026 04:04
20ce7e3 to
72525e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With every fixed-size weapon-class-indexed structure now converted to dynamic containers, we can finally remove the
MAX_WEAPON_TYPESlimit!This depends on PR #7758 and is in draft until that is merged.