Map prints items seen in room, shortcuts to open save/load/video/map/etc
parent
93477a290c
commit
8098a9ea17
@ -0,0 +1,15 @@
|
||||
import Parser from "../Parser";
|
||||
import RulesEngine from "../RulesEngine";
|
||||
import Game from "../Game";
|
||||
|
||||
import {updateSharedState} from '../../hooks/useSharedState'
|
||||
|
||||
export default function(parser : Parser, rules : RulesEngine, game : Game) {
|
||||
parser.understand('map')
|
||||
.as('map')
|
||||
|
||||
rules.onCommand('map', () => {
|
||||
updateSharedState('currentMenu', 'map')
|
||||
document.getElementById('gameInput')?.blur()
|
||||
})
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
import Parser from "../Parser";
|
||||
import RulesEngine from "../RulesEngine";
|
||||
import Game from "../Game";
|
||||
|
||||
import {updateSharedState} from '../../hooks/useSharedState'
|
||||
|
||||
export default function(parser : Parser, rules : RulesEngine, game : Game) {
|
||||
parser.understand('options')
|
||||
.as('options')
|
||||
.as('opt')
|
||||
|
||||
rules.onCommand('options', () => {
|
||||
updateSharedState('currentMenu', 'options')
|
||||
updateSharedState('optionsTab', 'video')
|
||||
document.getElementById('gameInput')?.blur()
|
||||
})
|
||||
|
||||
parser.understand('save')
|
||||
.as('save')
|
||||
.as('load')
|
||||
.as('restore')
|
||||
.as('data')
|
||||
|
||||
rules.onCommand('save', () => {
|
||||
updateSharedState('currentMenu', 'options')
|
||||
updateSharedState('optionsTab', 'data')
|
||||
document.getElementById('gameInput')?.blur()
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue