diff --git a/source/core/StarInputEvent.hpp b/source/core/StarInputEvent.hpp index e750efa..e8740b5 100644 --- a/source/core/StarInputEvent.hpp +++ b/source/core/StarInputEvent.hpp @@ -119,15 +119,6 @@ enum class Key : uint16_t { F13, F14, F15, - F16, - F17, - F18, - F19, - F20, - F21, - F22, - F23, - F24, NumLock, CapsLock, ScrollLock, @@ -146,7 +137,18 @@ enum class Key : uint16_t { SysReq, Pause, Menu, - Power + Power, + // can't have this where I want because canvases + // pass keycodes to Lua as a numeric code >:[ + F16, + F17, + F18, + F19, + F20, + F21, + F22, + F23, + F24 }; extern EnumMap const KeyNames; diff --git a/source/frontend/StarBaseScriptPane.cpp b/source/frontend/StarBaseScriptPane.cpp index 7facc1c..bfeebb7 100644 --- a/source/frontend/StarBaseScriptPane.cpp +++ b/source/frontend/StarBaseScriptPane.cpp @@ -81,7 +81,7 @@ void BaseScriptPane::tick(float dt) { } for (auto p : m_canvasKeyCallbacks) { for (auto const& keyEvent : p.first->pullKeyEvents()) - m_script.invoke(p.second, (int)keyEvent.key, keyEvent.keyDown); + m_script.invoke(p.second, (int)keyEvent.key, keyEvent.keyDown, KeyNames.getRight(keyEvent.key)); } m_script.update(m_script.updateDt(dt)); diff --git a/source/game/StarStatusController.cpp b/source/game/StarStatusController.cpp index 98bb207..5a87874 100644 --- a/source/game/StarStatusController.cpp +++ b/source/game/StarStatusController.cpp @@ -28,8 +28,6 @@ StatusController::StatusController(Json const& config) : m_statCollection(config m_primaryScript.setScripts(jsonToStringList(config.get("primaryScriptSources", JsonArray()))); m_primaryScript.setUpdateDelta(config.getUInt("primaryScriptDelta", 1)); - m_primaryScript.setUpdateDelta(config.getUInt("primaryScriptDelta", 1)); - uint64_t keepDamageSteps = config.getUInt("keepDamageNotificationSteps", 120); m_recentHitsGiven.setHistoryLimit(keepDamageSteps); m_recentDamageGiven.setHistoryLimit(keepDamageSteps);