Clean up scripts in the editor

Scripts used a weird "hook" system, where script names were extracted
into their own list. This was completely unneeded, so it has been
replaced with using the script.customscripts vector directly.

The script editor has been cleaned up, so the cursor's Y position is
relative to the entire script, rather than what's just displaying on
the screen currently. This simplifies a lot of code, and I don't know
why it was done the other way in the first place.

The script selector and script editor cursors have been sped up, since
both lists can be massive, and waiting 6 frames per line is extremely
slow and boring. This is still slow and boring, but we don't have
proper input repetition yet.
This commit is contained in:
AllyTally
2023-03-09 13:10:58 -04:00
committed by Misa Elizabeth Kai
parent 9c26f51931
commit 6cae666c76
5 changed files with 287 additions and 357 deletions

View File

@@ -1954,7 +1954,7 @@ void gamerender(void)
#if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR)
if(map.custommode && !map.custommodeforreal && !game.advancetext){
//Return to level editor
int alpha = graphics.lerp(ed.oldreturneditoralpha, ed.returneditoralpha);
int alpha = graphics.lerp(ed.old_return_message_timer, ed.return_message_timer);
if (alpha > 100)
{