ActorManager.getActorRecordTypeFromPath return sType instead of vType
I am just trying to understand how to use the ActorManager.
I noticed that in the function "getActorRecordTypeFromPath" probably the correct parameter is not returned (i would expect vType instead of sType):
Code:
-- Internal use only
function getActorRecordTypeFromPath(sActorNodePath)
if StringManager.startsWith(sActorNodePath, CombatManager.CT_MAIN_PATH .. ".") then
return "ct";
end
local sType = LibraryData.getRecordTypeFromRecordPath(sActorNodePath);
if _tActorRecordTypes[sType] then
return sType;
end
for sTypePath, vType in pairs(_tActorTypePathHandlers) do
if UtilityManager.isDataBaseNodePathMatch(sActorNodePath, sTypePath) then
if type(vType) == "function" then
return vType(sActorNodePath);
else
return sType;
end
end
end
return nil;
end
Another issue, i do not understand how this could work, is the usage of a global param "sType" which seams not to set in the manager script (in my opinion the check will allways fail ..):
Code:
function registerActorRecordType(sRecordType)
if sType == "ct" then
return;
end
_tActorRecordTypes[sRecordType] = true;
end