Skip to content

Restructure resolve_parse_flags into table-driven core + wrapper#7503

Open
Goober5000 wants to merge 1 commit into
scp-fs2open:masterfrom
Goober5000:refactor/parse_flags
Open

Restructure resolve_parse_flags into table-driven core + wrapper#7503
Goober5000 wants to merge 1 commit into
scp-fs2open:masterfrom
Goober5000:refactor/parse_flags

Conversation

@Goober5000

Copy link
Copy Markdown
Contributor

The ~70-line if-cascade collapses to a walk over a new Parse_object_flag_targets table mapping each parse flag to its object/ship/AI runtime counterpart; SF_Locked and OF_No_collide remain as hand-coded irregular cases.

Split into a pure flagset->flagset inner overload (the table walk) and an outer wrapper that owns all context-dependent cases: the player-start gate, immobile soft-deprecation, MP red-alert override, shield-strength resolution, reinforcement-in-wing warning, and the no-shields/force-shields-on inconsistency warning.

Move kamikaze damage and Knossos_warp_ani_used side effects to parse_create_object_sub's post-processing block. Update FRED's and qtFRED's create_ship for the new signature.

The ~70-line if-cascade collapses to a walk over a new
Parse_object_flag_targets table mapping each parse flag to its
object/ship/AI runtime counterpart; SF_Locked and OF_No_collide
remain as hand-coded irregular cases.

Split into a pure flagset->flagset inner overload (the table walk)
and an outer wrapper that owns all context-dependent cases: the
player-start gate, immobile soft-deprecation, MP red-alert override,
shield-strength resolution, reinforcement-in-wing warning, and the
no-shields/force-shields-on inconsistency warning.

Move kamikaze damage and Knossos_warp_ani_used side effects to
parse_create_object_sub's post-processing block.  Update FRED's
and qtFRED's create_ship for the new signature.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Goober5000 Goober5000 added refactor A cleanup/restructure of a feature for speed, simplicity, and/or maintainability Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle labels Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor A cleanup/restructure of a feature for speed, simplicity, and/or maintainability Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant