allow getting the PlayerType via GetUnitVariable
This commit is contained in:
parent
e052eb38b5
commit
94ec3ca1ae
1 changed files with 2 additions and 0 deletions
|
@ -1097,6 +1097,8 @@ static int CclGetUnitVariable(lua_State *l)
|
|||
lua_pushnumber(l, unit->CurrentResource);
|
||||
} else if (!strcmp(value, "Name")) {
|
||||
lua_pushstring(l, unit->Type->Name.c_str());
|
||||
} else if (!strcmp(value, "PlayerType")) {
|
||||
lua_pushinteger(l, unit->Player->Type);
|
||||
} else {
|
||||
int index = UnitTypeVar.VariableNameLookup[value];// User variables
|
||||
if (index == -1) {
|
||||
|
|
Loading…
Reference in a new issue