Skip to content

Add rawget & rawset Functions for Solarus Userdata

Cluedrew Kenfar Ink requested to merge Cluedrew/solarus:rawget-rawset into dev

So Solarus sets up its userdata types so instead of being special black-boxes they are special tables. This brings this even further and provides access to the raw get and set operations. I have mimicked the syntax and behaviour of the Lua rawget & rawset functions as closely as possible.

Both also work on Lua tables because there was a convenient space for it, it seems like a common use case and it isn't an expensive check to add.

Closes #1424 (closed), where the feature was proposed and initially discussed.

Edited by Christopho

Merge request reports