Skip to content

Commit

Permalink
Set __metatable on the replace_if_failed helper
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Feb 19, 2021
1 parent c0dd7b4 commit 00d990c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scripting/lua_terrainmap.cpp
Expand Up @@ -530,6 +530,8 @@ namespace lua_terrainmap {
luaL_newmetatable(L, mapReplaceIfFailedKey);
lua_pushcfunction(L, impl_replace_if_failed_tostring);
lua_setfield(L, -2, "__tostring");
lua_pushstring(L, mapReplaceIfFailedKey);
lua_setfield(L, -2, "__metatable");

cmd_out << "Adding special locations metatable...\n";

Expand Down

0 comments on commit 00d990c

Please sign in to comment.