| 1130 | } |
| 1131 | |
| 1132 | void SetScriptWorldContextValue(HScriptWorld script_world) |
| 1133 | { |
| 1134 | lua_State* L = script_world->m_Context->m_LuaState; |
| 1135 | lua_rawgeti(L, LUA_REGISTRYINDEX, script_world->m_WorldContextTableRef); |
| 1136 | // [-3] key |
| 1137 | // [-2] value |
| 1138 | // [-1] context table |
| 1139 | |
| 1140 | lua_insert(L, -3); |
| 1141 | // [-3] context table |
| 1142 | // [-2] key |
| 1143 | // [-1] value |
| 1144 | |
| 1145 | lua_settable(L, -3); |
| 1146 | // [-1] context table |
| 1147 | |
| 1148 | lua_pop(L, 1); |
| 1149 | } |
| 1150 | |
| 1151 | void GetScriptWorldContextValue(HScriptWorld script_world) |
| 1152 | { |