GameModule
GameModule (modules/game/core.ts) is the most complex of the modules.
GameModule is called outside by either passed through variables this.game or:
config.modules.game as GameModule;
Important Commands
The following functions are often helpful and called outside of the GameModule:
playLine(line_num: number, script: string = "game");
setLine(line: number);
nextLine();
nextContinue();
findLineJump(trigger: string, state: unknown, direction: number = 1, skip: number = 0);
setText(dialogue: string, char?: string);
playItemScript(item: string);
playLine()
This houses the main logic of playing a singular line in the script.
findLineJump()
Find line jump is an extremely important command that finds the line number of the next or previous instance of a label. While custom labels are important, built in labels like return and continue are often called elsewhere in the code!