Keybinds can be occupied (when being checked down)

This commit is contained in:
lustlion 2022-03-13 09:57:44 +01:00
parent 62555b4526
commit 1039479c47

View File

@ -17,6 +17,10 @@ Keybind.debug = {}
Keybind.editor = {}
Keybind.generic = {}
function Keybind:isAvailable(action)
return not action.occupied
end
function Keybind:checkDown(action)
if DemoPlayback then
for _, demo_action in pairs(DemoAction[CurrentDemoFrame]) do
@ -37,9 +41,11 @@ function Keybind:checkDown(action)
if action.demo ~= nil then
Demo:recordAction(action.demo)
end
action.occupied = true
return true
end
end
action.occupied = false
return false
end
end