Commit 3af7e31e authored by nanahira's avatar nanahira Committed by mercury233

add metamethod to get the length of Group (#136)

so now we could use #g instead of Group.GetCount to simplify the scripts
parent db622f36
......@@ -331,6 +331,7 @@ static const struct luaL_Reg grouplib[] = {
{ "GetNext", scriptlib::group_get_next },
{ "GetFirst", scriptlib::group_get_first },
{ "GetCount", scriptlib::group_get_count },
{ "__len", scriptlib::group_get_count },
{ "ForEach", scriptlib::group_for_each },
{ "Filter", scriptlib::group_filter },
{ "FilterCount", scriptlib::group_filter_count },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment