mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
remove original resource functionality
This commit is contained in:
@@ -66,19 +66,10 @@ CFilesystemList::~CFilesystemList()
|
||||
|
||||
std::unique_ptr<CInputStream> CFilesystemList::load(const ResourcePath & resourceName) const
|
||||
{
|
||||
if(resourceName.getOriginalResource())
|
||||
{
|
||||
for(const auto & loader : loaders)
|
||||
if (loader->existsResource(resourceName))
|
||||
return loader->load(resourceName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// load resource from last loader that have it (last overridden version)
|
||||
for(const auto & loader : boost::adaptors::reverse(loaders))
|
||||
if (loader->existsResource(resourceName))
|
||||
return loader->load(resourceName);
|
||||
}
|
||||
// load resource from last loader that have it (last overridden version)
|
||||
for(const auto & loader : boost::adaptors::reverse(loaders))
|
||||
if (loader->existsResource(resourceName))
|
||||
return loader->load(resourceName);
|
||||
|
||||
throw std::runtime_error("Resource with name " + resourceName.getName() + " and type "
|
||||
+ EResTypeHelper::getEResTypeAsString(resourceName.getType()) + " wasn't found.");
|
||||
|
||||
Reference in New Issue
Block a user