Skip to content

Conversation

@ShnitzelX2
Copy link
Contributor

Summary

Infrastructure "zone sorting refactor"

Purpose of change

Working on #81831

More specifically,

Refactor the zone sorting code and review the logic, become familiar with how it works. Identify and fix any obvious flaws, but mainly, make sure the code is maintainable for the future.

This should happen before anything else regarding zone sorting, IMO

Describe the solution

  • splits up the 500-line activity_on_turn_move_loot into several helper functions
  • migrates ACT_MOVE_LOOT from a legacy activity handler to an activity_actor
  • deduplicates unload_loot_activity_actor; it was copy-pasted (!!) from activity_on_turn_move_loot

There shouldn't be any functional changes for zone sorting or unloading.

Describe alternatives you've considered

Testing

I didn't run into any existing bugs, other than that removing gunmods while unloading cancels a sort/unload (designed intentionally).

  • Tested all unload options separately
  • Tested basic sorting into zones

Additional context

TODO: test migration, CI changes

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

astyled astyled PR, label is assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style json-styled JSON lint passed, label assigned by github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant