LunaCore 0.12.0
Changelog
- Added mods system (check examples/mods)
- LunaCore is now splitted into LunaCoreRuntime and LunaCoreAPI. Runtime contains low level functionality and other essential things, API contains more complex and user-friendly functionality. API works as a mod so users can decide to not use it
- Added
Core.getTitleIdandCore.getModpath - Added custom crash handler
- Added
OnGameLoad,OnGameItemsRegister,OnGameItemsRegisterTexture,OnGameCreativeItemsRegisterevents toGame.Eventmodule - Functions for events
OnKeyPressed,OnKeyReleasedandOnKeyDownnow can take the keycode value as first argument - Added instance
GameItemthat allows to handle some items functions. Methods:setTexture. Fields:StackSize,ID,NameID,DescriptionID - Added
Game.Items.registerItem,Game.Items.getCreativePosition,Game.Items.registerCreativeItem,Game.Items.findItemByNameandGame.Items.findItemByID - Added traceback when a script fails to load
- Removed
Games.Items.findItemIDByNameandGames.Items.findItemNameByID(usefindItemByNameorfindItemByIDto get an item; to get ID or name use the fieldsIDorNameIDof the result of the functions) - Removed fields
ItemIDandItemNamefromInventorySlotinstance and added fieldItemwhich will be either aGameIteminstance or nil - Removed preloaded json module, moved to API
- Removed Bits module due to inaccuracy, same functionality can be found in the API
- Fix:
dofilefunction to use current script environment - Fix:
Async.waitfunction - Fix:
attempt to call a nil valuewhen an Async task ended successfully - Fix: Create scripts folder if it doesn't already exists when loading script from network
- Fix: File handler seek method
- Fix: File size truncating when writing mid-file
- Improved
Core.Filesystemfunctions - Improved
Game.LocalPlayer.Inventorymodule - Improved stability
Known bugs
If you want to report a bug and you are using an emulator, please check first if the bug also happens on a real console as LunaCore can have a different behavior on emulator
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior
Low: Doesn't break scripts logic but can have unwanted behavior
- Mid: Sometimes present.
Game.LocalPlayer.CurrentHungeroffset can change breaking functionality, changing the world can fix it - Low: Always present. Changing a block for an item (or vice versa) bugs the item render in hand
- Mid: Sometimes present.
Game.LocalPlayer.Camera.FOVoffset can change breaking some functionality