MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / ClearCollection

Method ClearCollection

MonaServer/sources/Script.cpp:246–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void Script::ClearCollection(lua_State* pState) {
247 // get collection table
248 if (!lua_getmetatable(pState, -1))
249 return;
250
251 lua_newtable(pState);
252 lua_newtable(pState);
253 lua_pushliteral(pState,"v");
254 lua_setfield(pState,-2,"__mode");
255 lua_setmetatable(pState, -2);
256 lua_setfield(pState, -2, "|items");
257
258 lua_pushnumber(pState, 0);
259 lua_setfield(pState, -2, "|count");
260
261 lua_pop(pState, 1);
262}
263
264
265void Script::ClearCollectionParameters(lua_State* pState, const char* field,const Parameters& parameters) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected