Commit Graph

4 Commits

Author SHA1 Message Date
f58b005155 Several fixes and improvements
- Change vscode Lua runtime to LuaJIT
- Remove worm entity overrides
- Remove preparePlayer() that sets HP and other stuff
- Change how entites are captured
- Increase entity capture radius
- Capture entities as soon as possible
- Modify entites immediately after they are captured
- Make stringArgs in print local
- Fix JSON marshaling of Noita vectors
- Fix NoitaEntity:GetComponents() and NoitaEntity:GetFirstComponent()
- Add varArg support to NoitaComponent:SetValue() and NoitaComponent:ObjectSetValue()
- Update some EmmyLua annotations
- Fix custom GamePrint
- Add table.pack function that is missing in LuaJIT
2022-07-18 22:07:53 +02:00
40f31011e8 Get component values with correct type
#9
2022-07-18 12:55:51 +02:00
cfe4193974 Move Noita specific stuff out of JSON library
- Add JSON marshal "interface" that objects can implement
- Fix EmmyLua annotation
- Move JSON marshaler into noita-api.lua

#9
2022-07-18 11:47:59 +02:00
833ab41eeb Serialize entities to JSON
- Add JSON library that can marshal Noita entities and components
- Add Noita API wrapper that exposes entities and components as objects
- Change how the entities file is written, to support lightweight and crash proof appending of JSON data

#9
2022-07-18 01:32:44 +02:00