diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-08-18 10:24:36 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-16 11:42:07 +0100 |
commit | 0bec85079add5fe0cda8106ed18ef282e174691c (patch) | |
tree | e51f5c264cee9b01050de34aefee5cc222cf9a9e /rules.js | |
parent | 062a5764dba899ed2215e4d55dead2919e64c98c (diff) | |
download | 1989-dawn-of-freedom-0bec85079add5fe0cda8106ed18ef282e174691c.tar.gz |
feat: working on vm_prompt
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -3255,6 +3255,30 @@ function vm_endif() { vm_next()
}
+function event_prompt(str) {
+ if (typeof str === "undefined")
+ str = CODE[game.vm.fp][game.vm.prompt][1]
+ if (typeof str === "function")
+ str = str()
+ view.prompt = data.card_title[this_card()] + ": " + str
+}
+
+function vm_prompt() {
+ if (game.vm.prompt)
+ game.vm._prompt = game.vm.prompt
+ game.vm.prompt = game.vm.ip
+ vm_next()
+}
+
+function pop_vm_prompt() {
+ if (game.vm._prompt) {
+ game.vm.prompt = game.vm._prompt
+ delete game.vm._prompt
+ } else {
+ game.vm.prompt = 0
+ }
+}
+
function vm_return() {
/* let return_vm = game.vm.return_vm;
console.log('in vm_return')
|