@@ -660,7 +660,6 @@ void updateMods()
660660 _masterMod = activeMaster;
661661 }
662662
663- updateReservedSpace ();
664663 mapResources ();
665664 userSplitMasters ();
666665}
@@ -716,57 +715,6 @@ static void _loadMod(const ModInfo &modInfo, std::set<std::string> circDepCheck)
716715 }
717716}
718717
719- void updateReservedSpace ()
720- {
721- Log (LOG_VERBOSE ) << " Updating reservedSpace for master mods if necessary..." ;
722-
723- Log (LOG_VERBOSE ) << " _masterMod = " << _masterMod;
724-
725- int maxSize = 1 ;
726- for (std::vector< std::pair<std::string, bool > >::reverse_iterator i = mods.rbegin (); i != mods.rend (); ++i)
727- {
728- if (!i->second )
729- {
730- Log (LOG_VERBOSE ) << " skipping inactive mod: " << i->first ;
731- continue ;
732- }
733-
734- const ModInfo &modInfo = _modInfos.find (i->first )->second ;
735- if (!modInfo.canActivate (_masterMod))
736- {
737- Log (LOG_VERBOSE ) << " skipping mod for non-current master: " << i->first << " (" << modInfo.getMaster () << " != " << _masterMod << " )" ;
738- continue ;
739- }
740-
741- if (modInfo.getReservedSpace () > maxSize)
742- {
743- maxSize = modInfo.getReservedSpace ();
744- }
745- }
746-
747- if (maxSize > 1 )
748- {
749- // Small hack: update ALL masters, not only active master!
750- // this is because, there can be a hierarchy of multiple masters (e.g. xcom1 master > fluffyUnicorns master > some fluffyUnicorns mod)
751- // and the one that needs to be updated is actually the "root", i.e. xcom1 master
752- for (std::map<std::string, ModInfo>::iterator i = _modInfos.begin (); i != _modInfos.end (); ++i)
753- {
754- if (i->second .isMaster ())
755- {
756- if (i->second .getReservedSpace () < maxSize)
757- {
758- i->second .setReservedSpace (maxSize);
759- Log (LOG_INFO ) << " reservedSpace for: " << i->first << " updated to: " << i->second .getReservedSpace ();
760- }
761- else
762- {
763- Log (LOG_INFO ) << " reservedSpace for: " << i->first << " is: " << i->second .getReservedSpace ();
764- }
765- }
766- }
767- }
768- }
769-
770718void mapResources ()
771719{
772720 Log (LOG_INFO ) << " Mapping resource files..." ;
0 commit comments