1
0
Fork 0
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:
Harley White 2021-04-27 02:01:02 -04:00
parent b003027098
commit c8bc53ca50
4 changed files with 9 additions and 5 deletions

View file

@ -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()
}
}