| 827 | } |
| 828 | |
| 829 | void ModManager::CompileAssetsForFile(const char* filename) |
| 830 | { |
| 831 | size_t fileHash = STR_HASH(NormaliseModFilePath(fs::path(filename))); |
| 832 | |
| 833 | if (fileHash == m_hScriptsRsonHash) |
| 834 | BuildScriptsRson(); |
| 835 | else if (fileHash == m_hPdefHash) |
| 836 | BuildPdef(); |
| 837 | else if (fileHash == m_hKBActHash) |
| 838 | BuildKBActionsList(); |
| 839 | else if (fileHash == m_particlesManifestHash) |
| 840 | BuildParticlesManifest(); |
| 841 | else |
| 842 | { |
| 843 | // check if we should build keyvalues, depending on whether any of our mods have patch kvs for this file |
| 844 | for (Mod& mod : m_LoadedMods) |
| 845 | { |
| 846 | if (!mod.m_bEnabled) |
| 847 | continue; |
| 848 | |
| 849 | if (mod.KeyValues.find(fileHash) != mod.KeyValues.end()) |
| 850 | { |
| 851 | TryBuildKeyValues(filename); |
| 852 | return; |
| 853 | } |
| 854 | } |
| 855 | } |
| 856 | } |
| 857 | |
| 858 | void ConCommand_reload_mods(const CCommand& args) |
| 859 | { |