mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-04 22:58:29 +08:00
Script editor is now readonly if no quest is loaded. Fixed a bug in the assembly worker. Fixed wrong opcode.
This commit is contained in:
parent
1d253e78f8
commit
50eaf43082
@ -675,7 +675,7 @@ export class Opcode {
|
||||
static readonly p_noncol = (OPCODES[0x74] = new Opcode(0x74, "p_noncol", [], false, []));
|
||||
static readonly p_col = (OPCODES[0x75] = new Opcode(0x75, "p_col", [], false, []));
|
||||
static readonly p_setpos = (OPCODES[0x76] = new Opcode(0x76, "p_setpos", [], false, [
|
||||
{ type: Type.Register },
|
||||
{ type: Type.U32 },
|
||||
{ type: Type.Register },
|
||||
]));
|
||||
static readonly p_return_guild = (OPCODES[0x77] = new Opcode(
|
||||
|
@ -46,19 +46,20 @@ function process_messages(): void {
|
||||
// Keep the left part of the first changed line.
|
||||
replace_line_part_right(startLineNumber, startColumn, new_lines[0]);
|
||||
|
||||
// Replace all the lines in between.
|
||||
replace_lines(
|
||||
startLineNumber + 1,
|
||||
endLineNumber - 1,
|
||||
new_lines.slice(1, new_lines.length - 1)
|
||||
);
|
||||
|
||||
// Keep the right part of the last changed line.
|
||||
replace_line_part_left(
|
||||
endLineNumber,
|
||||
endColumn,
|
||||
new_lines[new_lines.length - 1]
|
||||
);
|
||||
|
||||
// Replace all the lines in between.
|
||||
// It's important that we do this last.
|
||||
replace_lines(
|
||||
startLineNumber + 1,
|
||||
endLineNumber - 1,
|
||||
new_lines.slice(1, new_lines.length - 1)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -238,6 +238,9 @@ class MonacoComponent extends Component<MonacoProps> {
|
||||
|
||||
this.disposers.push(() => disposable.dispose());
|
||||
this.editor.setModel(model);
|
||||
this.editor.updateOptions({ readOnly: false });
|
||||
} else if (this.editor) {
|
||||
this.editor.updateOptions({ readOnly: true });
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user