| 241 | } |
| 242 | |
| 243 | bool CPSLibrary::Save2(bool override) const |
| 244 | { |
| 245 | if (!FS.path_exist("$game_particles$")) |
| 246 | { |
| 247 | Msg("! Path $game_particles$ is not configured! Cannot export particles to ltx"); |
| 248 | } |
| 249 | |
| 250 | // FS.dir_delete("$game_particles$", "", TRUE); ??? |
| 251 | |
| 252 | string_path fn; |
| 253 | |
| 254 | for (auto& [m_Name, pe] : m_PEDs) |
| 255 | { |
| 256 | FS.update_path(fn, "$game_particles$", m_Name.c_str()); |
| 257 | strcat(fn, ".pe"); |
| 258 | |
| 259 | if (FS.exist(fn) && !override) |
| 260 | continue; |
| 261 | |
| 262 | CInifile ini(fn, FALSE, TRUE, TRUE); |
| 263 | pe->Save2(ini); |
| 264 | } |
| 265 | |
| 266 | for (auto& [m_Name, pg] : m_PGDs) |
| 267 | { |
| 268 | FS.update_path(fn, "$game_particles$", m_Name.c_str()); |
| 269 | strcat(fn, ".pg"); |
| 270 | |
| 271 | if (FS.exist(fn) && !override) |
| 272 | continue; |
| 273 | |
| 274 | CInifile ini(fn, FALSE, TRUE, TRUE); |
| 275 | pg->Save2(ini); |
| 276 | } |
| 277 | |
| 278 | return true; |
| 279 | } |
| 280 | |
| 281 | void CPSLibrary::DumpTextures() const |
| 282 | { |
no test coverage detected