mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Introduced "map" scope for accessing identifier on map loading.
Currently it allows access to all mods, should be restricted to mods that map depends on
This commit is contained in:
@ -319,9 +319,9 @@ TObjectTypeHandler CObjectClassesHandler::getHandlerFor(si32 type, si32 subtype)
|
||||
throw std::runtime_error("Object type handler not found");
|
||||
}
|
||||
|
||||
TObjectTypeHandler CObjectClassesHandler::getHandlerFor(std::string type, std::string subtype) const
|
||||
TObjectTypeHandler CObjectClassesHandler::getHandlerFor(std::string scope, std::string type, std::string subtype) const
|
||||
{
|
||||
boost::optional<si32> id = VLC->modh->identifiers.getIdentifier("core", "object", type, false);
|
||||
boost::optional<si32> id = VLC->modh->identifiers.getIdentifier(scope, "object", type, false);
|
||||
if(id)
|
||||
{
|
||||
auto object = objects.at(id.get());
|
||||
|
Reference in New Issue
Block a user