Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 Transitive Comparator for script sorting #277

Merged
merged 4 commits into from
Jun 17, 2023

Commits on Jun 16, 2023

  1. Transitive Comparator for script sorting

    The current algorithm returns a random result unless a is in b's type hierarchy.  Random results are disallowed in the sort_custom API
    
    https://docs.godotengine.org/en/3.5/classes/class_array.html?highlight=sort_custom
    
    The new algorithm sorts alphabetically by names in the type hierarchy paths until one of the trees stop then it sorts the shorter tree first.
    
    Aims to fix the following errors that gets spammed at startup (and i think causes startup crashes):
    
    E 0:00:00.815   SortArray<class Variant,struct _ArrayVariantSortCustom,1>::partitioner: bad comparison function; sorting will be broken
      <C++ Source>  .\core/sort_array.h:179 @ SortArray<class Variant,struct _ArrayVariantSortCustom,1>::partitioner()
      <Stack Trace> script_extension.gd:39 @ handle_script_extensions()
                    mod_loader.gd:164 @ _load_mods()
                    mod_loader.gd:67 @ _init()
    boardengineer committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    69b5e4e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d5d7bec View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    435abb4 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2023

  1. pop the last ele

    boardengineer committed Jun 17, 2023
    Configuration menu
    Copy the full SHA
    14414b6 View commit details
    Browse the repository at this point in the history