Skip to content

Commit

Permalink
#5289: Register particle file extension, to display the pattern name …
Browse files Browse the repository at this point in the history
…when selecting .prt files.
  • Loading branch information
codereader committed Sep 20, 2020
1 parent ae8b910 commit f6a15a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions radiantcore/particles/ParticlesManager.cpp
Expand Up @@ -9,6 +9,7 @@
#include "ieventmanager.h"
#include "itextstream.h"
#include "ifilesystem.h"
#include "ifiletypes.h"
#include "iarchive.h"
#include "igame.h"
#include "i18n.h"
Expand Down Expand Up @@ -220,6 +221,7 @@ const StringSet& ParticlesManager::getDependencies() const
{
_dependencies.insert(MODULE_VIRTUALFILESYSTEM);
_dependencies.insert(MODULE_COMMANDSYSTEM);
_dependencies.insert(MODULE_FILETYPES);
}

return _dependencies;
Expand All @@ -235,6 +237,9 @@ void ParticlesManager::initialiseModule(const IApplicationContext& ctx)

// Register the "ReloadParticles" commands
GlobalCommandSystem().addCommand("ReloadParticles", std::bind(&ParticlesManager::reloadParticleDefs, this));

// Register the particle file extension
GlobalFiletypes().registerPattern("particle", FileTypePattern(_("Particle File"), "prt", "*.prt"));
}

void ParticlesManager::reloadParticleDefs()
Expand Down

0 comments on commit f6a15a9

Please sign in to comment.