Keybinds can be occupied (when being checked down)
This commit is contained in:
parent
62555b4526
commit
1039479c47
@ -17,6 +17,10 @@ Keybind.debug = {}
|
|||||||
Keybind.editor = {}
|
Keybind.editor = {}
|
||||||
Keybind.generic = {}
|
Keybind.generic = {}
|
||||||
|
|
||||||
|
function Keybind:isAvailable(action)
|
||||||
|
return not action.occupied
|
||||||
|
end
|
||||||
|
|
||||||
function Keybind:checkDown(action)
|
function Keybind:checkDown(action)
|
||||||
if DemoPlayback then
|
if DemoPlayback then
|
||||||
for _, demo_action in pairs(DemoAction[CurrentDemoFrame]) do
|
for _, demo_action in pairs(DemoAction[CurrentDemoFrame]) do
|
||||||
@ -37,9 +41,11 @@ function Keybind:checkDown(action)
|
|||||||
if action.demo ~= nil then
|
if action.demo ~= nil then
|
||||||
Demo:recordAction(action.demo)
|
Demo:recordAction(action.demo)
|
||||||
end
|
end
|
||||||
|
action.occupied = true
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
action.occupied = false
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user