mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-04-25 18:51:05 +00:00
Added unlocking hotkeys
This commit is contained in:
parent
b003027098
commit
c8bc53ca50
4 changed files with 9 additions and 5 deletions
js
|
@ -329,8 +329,10 @@ document.onkeydown = function (e) {
|
|||
if (onFocused) return
|
||||
if (ctrlDown && hotkeys[key]) e.preventDefault()
|
||||
if (hotkeys[key]) {
|
||||
if (player[hotkeys[key].layer].unlocked)
|
||||
hotkeys[key].onPress()
|
||||
let k = hotkeys[key]
|
||||
console.log(tmp[k.layer].hotkeys)
|
||||
if (player[k.layer].unlocked && tmp[k.layer].hotkeys[k.id].unlocked)
|
||||
k.onPress()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue