give props, waypoint lists, jump nodes, and waypoints the full slot treatment - #7715
Open
Goober5000 wants to merge 1 commit into
Open
give props, waypoint lists, jump nodes, and waypoints the full slot treatment#7715Goober5000 wants to merge 1 commit into
Goober5000 wants to merge 1 commit into
Conversation
Goober5000
force-pushed
the
refactor/entity_reorder_machinery
branch
4 times, most recently
from
August 17, 2026 02:16
1155848 to
e26278a
Compare
…reatment Extend the reassign/swap/rotate slot machinery (now in missioneditor/slot_operations) to props, waypoint lists, and jump nodes, following the ship/wing precedent. A new SlotOps bundle lets vector-backed types acquire the temporary parking slot by appending an empty element and shrinking. All reorder operations now restore the obj_used_list subset-order invariant, where previously only ships and props did. Also promote individual-waypoint move/swap into shared code: waypoints are referenced positionally in SEXPs and AI goals (listname:N), so reordering within a list must rename every affected reference via temporary names. Keeping that logic next to the other reorder machinery disarms the trap for any future editor UI that reorders waypoints. This also fixes a live bug: the editors track cur_waypoint/cur_waypoint_list as raw pointers into vectors that reordering shuffles (and now may reallocate), so a waypoint-list reorder left them pointing at the wrong list. Along the way, dedup the editor-level ai_update_goal_references() (identical in FRED2 and qtFRED) into common, and add array manipulation utilities to code/utils/array_utils.h for general use. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Goober5000
force-pushed
the
refactor/entity_reorder_machinery
branch
from
August 17, 2026 02:23
e26278a to
f338471
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.
Extend the reassign/swap/rotate slot machinery (now in missioneditor/slot_operations) to props, waypoint lists, and jump nodes, following the ship/wing precedent. A new SlotOps bundle lets vector-backed types acquire the temporary parking slot by appending an empty element and shrinking. All reorder operations now restore the obj_used_list subset-order invariant, where previously only ships and props did.
Also promote individual-waypoint move/swap into shared code: waypoints are referenced positionally in SEXPs and AI goals (listname:N), so reordering within a list must rename every affected reference via temporary names. Keeping that logic next to the other reorder machinery disarms the trap for any future editor UI that reorders waypoints. This also fixes a live bug: the editors track cur_waypoint/cur_waypoint_list as raw pointers into vectors that reordering shuffles (and now may reallocate), so a waypoint-list reorder left them pointing at the wrong list.
Along the way, dedup the editor-level ai_update_goal_references() (identical in FRED2 and qtFRED) into common, and add array manipulation utilities to code/utils/array_utils.h for general use.