lua_settable(L, top_lvl2);
lua_pushstring(L, "name");
- lua_pushstring(L, game.name.c_str());
+ lua_pushstring(L, game.title.c_str());
+ lua_settable(L, top_lvl2);
+
+ lua_pushstring(L, "title");
+ lua_pushstring(L, game.title.c_str());
lua_settable(L, top_lvl2);
lua_pushstring(L, "author");
lua_pushstring(L, spec.author.c_str());
lua_setfield(L, -2, "author");
+ if (!spec.title.empty()) {
+ lua_pushstring(L, spec.title.c_str());
+ lua_setfield(L, -2, "title");
+ }
+
lua_pushinteger(L, spec.release);
lua_setfield(L, -2, "release");