mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Cleared up comments
This commit is contained in:
parent
36ae26bc37
commit
79c96e94fa
@ -206,8 +206,11 @@ std::vector<CIdentifierStorage::ObjectData> CIdentifierStorage::getPossibleIdent
|
||||
std::set<std::string> allowedScopes;
|
||||
bool isValidScope = true;
|
||||
|
||||
// called have not specified destination mod explicitly
|
||||
if (request.remoteScope.empty())
|
||||
{
|
||||
// FIXME: temporary, for queries from map loader allow access to any identifer
|
||||
// should be changed to list of mods that are marked as required by current map
|
||||
if (request.localScope == "map")
|
||||
{
|
||||
for (auto const & modName : VLC->modh->getActiveMods())
|
||||
@ -221,13 +224,16 @@ std::vector<CIdentifierStorage::ObjectData> CIdentifierStorage::getPossibleIdent
|
||||
|
||||
if(!isValidScope)
|
||||
return std::vector<ObjectData>();
|
||||
|
||||
allowedScopes.insert(request.localScope);
|
||||
}
|
||||
allowedScopes.insert(request.localScope);
|
||||
|
||||
// all mods can access built-in mod
|
||||
allowedScopes.insert("core");
|
||||
}
|
||||
else
|
||||
{
|
||||
//...unless destination mod was specified explicitly
|
||||
//if destination mod was specified explicitly, restrict lookup to this mod
|
||||
|
||||
if(request.remoteScope == "core" )
|
||||
{
|
||||
|
@ -44,6 +44,9 @@ void CTownInstanceConstructor::initTypeData(const JsonNode & input)
|
||||
});
|
||||
|
||||
filtersJson = input["filters"];
|
||||
|
||||
// change scope of "filters" to scope of object that is being loaded
|
||||
// since this filters require to resolve building ID's
|
||||
filtersJson.setMeta(input["faction"].meta);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user