Fallback to to-stringing values when pushing them to Lua instead of yielding null.

Should make it easier to track down missing converters and work well as a default for many things (e.g. ResourceLocations).
This commit is contained in:
Florian Nücke 2015-02-12 15:49:32 +01:00
parent 970ca688d9
commit ec2bca401c

View File

@ -143,8 +143,8 @@ private[oc] object Registry extends api.detail.DriverAPI {
case t: Throwable => OpenComputers.log.warn("Type converter threw an exception.", t)
})
if (converted.isEmpty) {
memo += arg -> null
null
memo += arg -> arg.toString
arg.toString
}
else {
// This is a little nasty but necessary because we need to keep the