mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-05 07:18:29 +08:00
When creating a new quest and saving it, the filename of a quest that was loaded earlier was shown. This is now fixed.
This commit is contained in:
parent
c8ae97d8f6
commit
194df177ab
@ -82,8 +82,7 @@ class QuestEditorStore {
|
|||||||
try {
|
try {
|
||||||
const buffer = yield read_file(file);
|
const buffer = yield read_file(file);
|
||||||
const quest = parse_quest(new ArrayBufferCursor(buffer, Endianness.Little));
|
const quest = parse_quest(new ArrayBufferCursor(buffer, Endianness.Little));
|
||||||
this.current_quest_filename = filename;
|
this.set_quest(quest, filename);
|
||||||
this.set_quest(quest);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.error("Couldn't read file.", e);
|
logger.error("Couldn't read file.", e);
|
||||||
}
|
}
|
||||||
@ -146,7 +145,13 @@ class QuestEditorStore {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
private set_quest = flow(function* set_quest(this: QuestEditorStore, quest?: Quest) {
|
private set_quest = flow(function* set_quest(
|
||||||
|
this: QuestEditorStore,
|
||||||
|
quest?: Quest,
|
||||||
|
filename?: string
|
||||||
|
) {
|
||||||
|
this.current_quest_filename = filename;
|
||||||
|
|
||||||
if (quest !== this.current_quest) {
|
if (quest !== this.current_quest) {
|
||||||
this.undo.reset();
|
this.undo.reset();
|
||||||
this.script_undo.reset();
|
this.script_undo.reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user