#note can now save the last action's text. Resolves #36

This commit is contained in:
raeleus 2024-10-02 22:19:14 -07:00
parent 655a539bd3
commit 2ab67ebe71
2 changed files with 8 additions and 4 deletions

View file

@ -24,7 +24,7 @@ const removeSkillSynonyms = ["removeskill", "deleteskill", "cancelskill"]
const clearSkillsSynonyms = ["clearskills"]
const checkSynonyms = ["check", "checkstat", "checkstatistic", "checkattribute", "checkability", "checkskill", "skillcheck", "abilitycheck"]
const showNotesSynonyms = ["notes", "shownotes", "viewnotes"]
const noteSynonyms = ["note", "takenote", "setnote", "createnote"]
const noteSynonyms = ["note", "takenote", "setnote", "createnote", "remember"]
const clearNotesSynonyms = ["clearnotes"]
const eraseNoteSynonyms = ["erasenote", "removenote", "deletenote", "cancelnote"]
const takeSynonyms = ["take", "steal", "get", "grab", "receive", "loot"]
@ -1180,7 +1180,11 @@ function doNote(command) {
state.notes.push(arg0)
state.show = "none"
return "\n[Note added successfully]\n"
} else return doShowNotes(command)
} else {
state.notes.push(history[history.length - 1].text)
state.show = "none"
return "\n[The last action was successfully added to the notes]"
}
}
function doShowNotes(command) {