| 1131 | void *Framework::getWindowHandle() const { return static_cast<void *>(p->window); } |
| 1132 | |
| 1133 | void Framework::setupModDataPaths() |
| 1134 | { |
| 1135 | auto mods = split(Options::modList.get(), ":"); |
| 1136 | for (const auto &modString : mods) |
| 1137 | { |
| 1138 | LogWarning("loading mod \"%s\"", modString); |
| 1139 | auto modPath = Options::modPath.get() + "/" + modString; |
| 1140 | auto modInfo = ModInfo::getInfo(modPath); |
| 1141 | if (!modInfo) |
| 1142 | { |
| 1143 | LogError("Failed to load ModInfo for mod \"%s\"", modString); |
| 1144 | continue; |
| 1145 | } |
| 1146 | auto modDataPath = modPath + "/" + modInfo->getDataPath(); |
| 1147 | LogWarning("Loaded modinfo for mod ID \"%s\"", modInfo->getID()); |
| 1148 | if (modInfo->getDataPath() != "") |
| 1149 | { |
| 1150 | LogWarning("Appending data path \"%s\"", modDataPath); |
| 1151 | this->data->fs.addPath(modDataPath); |
| 1152 | } |
| 1153 | } |
| 1154 | } |
| 1155 | |
| 1156 | }; // namespace OpenApoc |