mirror of
https://github.com/AdAstra-LD/DS-Pokemon-Rom-Editor.git
synced 2026-10-28 20:16:33 -05:00
Updated script editor and other things
- Add NSBTX and Remove NSBTX buttons also add/remove building configuration file [NSBTX Editor] - Changed format of Script Editor display - Added highlighting of 'Script', 'Function' and 'Action' keywords (only upon reloading) - Changed Endcodes database to HashSet (PokeDatabase -> ScriptEditor) - Minor refactor
This commit is contained in:
@@ -12,6 +12,7 @@ namespace DSPRE.ROMFiles {
|
||||
public uint manualUserID;
|
||||
public int useScript;
|
||||
public containerTypes containerType;
|
||||
internal static readonly string functionStart;
|
||||
|
||||
#region Constructors (2)
|
||||
public CommandContainer(uint scriptNumber, containerTypes containerType, int useScript = -1, List<ScriptCommand> commandList = null) {
|
||||
@@ -93,7 +94,7 @@ namespace DSPRE.ROMFiles {
|
||||
name = wholeLine;
|
||||
cmdParams = new List<byte[]>();
|
||||
|
||||
string[] nameParts = wholeLine.Split(' '); // Separate command code from parameters
|
||||
string[] nameParts = wholeLine.Replace("\t", "").Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); // Separate command code from parameters
|
||||
/* Get command id, which is always first in the description */
|
||||
|
||||
try {
|
||||
@@ -170,6 +171,9 @@ namespace DSPRE.ROMFiles {
|
||||
} catch (FormatException) {
|
||||
MessageBox.Show("Argument " + '"' + nameParts[i + 1] + '"' + " at line " + lineNumber + " is not a valid number.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
id = null;
|
||||
} catch (OverflowException) {
|
||||
MessageBox.Show("Argument " + '"' + nameParts[i + 1] + '"' + " at line " + lineNumber + " is not in the range [" + byte.MinValue + ", " + byte.MaxValue + "].", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
id = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user