Prioritize loading processed script names

This makes it so that whenever the game loads a script as directed by a
script command, it will first try to load the script from the processed
argument, and if that fails only then will it try to load the script
from the raw argument.

This fixes a regression reported by Dav999 in the custom level "Vungeon"
created by Dynaboom, where a script `ifflag`s to `aselectP1.1` even
though the actual script name is `aselectp1.1`. In 2.3, it would
lowercase `aselectP1.1` and load the script properly, but previous to
this commit it would try to load the script with a capital name and then
fail.
This commit is contained in:
Misa
2023-01-31 20:04:18 -08:00
parent fbe613ce5c
commit 6665f4f8f6
3 changed files with 32 additions and 20 deletions

View File

@@ -63,9 +63,10 @@ public:
scriptclass(void);
void load(const std::string& name);
bool load(const std::string& name);
void loadother(const char* t);
void loadcustom(const std::string& t);
bool loadcustom(const std::string& t);
void loadalts(const std::string& processed, const std::string& raw);
void add_test_line(const std::string& speaker, const std::string& english, char textcase);
void loadtest(const std::string& name);