v1.0.1-dev
Major Changes
- Added proper self-binding through metatables for all services
- Improved service method calls to preserve context
- Improved lazy loading for service modules
Metatable Improvements
- Service methods now properly receive
selfwhen called - Added automatic function wrapping to preserve context
- Services can access Knight framework methods directly
- Better error handling for method calls
Developer Experience
- No changes required to existing services
Technical Details
- Added
__indexmetamethod to handle method lookups - Implemented function wrapping to preserve self reference
- Added support for accessing Knight framework methods from services
- Improved module loading performance through lazy evaluation
Example Usage
local MyService = {}
function MyService:Start()
-- self is now properly set
print(self) -- Prints service table
-- Can access Knight methods directly
self:GetService("OtherService")
end
return MyServiceBreaking Changes
None - All changes are backward compatible
For more information, see the documentation.
Knight Framework VS Code Extension Release! 🎉
We're excited to announce the official Visual Studio Code extension for the Knight Framework!
Installation / Usage
- Install the extension (https://marketplace.visualstudio.com/items?itemName=MetaGames.vsc-knight)
- Open a Knight framework project
- Create a new file with
Ctrl+Alt+Kor manually create one and auto-fill with Knight service template withCtrl+K.
Feedback
Report issues and suggest features on our GitHub repository.