Search in sources :

Example 6 with Settings

use of jack.rm.data.romset.Settings in project rom-manager by Jakz.

the class Organizer method organize.

public void organize() {
    RenamerPlugin renamer = settings().getRenamer();
    FolderPlugin organizerPlugin = settings().getFolderOrganizer();
    boolean hasCleanupPhase = settings().hasCleanupPlugins();
    Consumer<Boolean> cleanupPhase = b -> {
        cleanup();
        Main.setManager.saveSetStatus(set);
    };
    Consumer<Boolean> moverPhase = organizerPlugin == null ? cleanupPhase : b -> new MoverWorker(set, organizerPlugin, cleanupPhase).execute();
    Consumer<Boolean> renamerPhase = renamer == null ? moverPhase : b -> new RenamerWorker(set, renamer, moverPhase).execute();
    renamerPhase.accept(true);
}
Also used : CleanupPlugin(jack.rm.plugins.types.CleanupPlugin) RenamerPlugin(jack.rm.plugins.types.RenamerPlugin) Files(java.nio.file.Files) LogSource(jack.rm.log.LogSource) LogTarget(jack.rm.log.LogTarget) PluginRealType(jack.rm.plugins.PluginRealType) DecimalFormat(java.text.DecimalFormat) Game(com.github.jakz.romlib.data.game.Game) Set(java.util.Set) MyGameSetFeatures(jack.rm.data.romset.MyGameSetFeatures) FolderPlugin(jack.rm.plugins.folder.FolderPlugin) TreeSet(java.util.TreeSet) Handle(com.pixbits.lib.io.archive.handles.Handle) Consumer(java.util.function.Consumer) GameSet(com.github.jakz.romlib.data.set.GameSet) Logger(com.pixbits.lib.log.Logger) Log(com.pixbits.lib.log.Log) GameSetFeatures(com.github.jakz.romlib.data.set.GameSetFeatures) PatternSetPlugin(jack.rm.plugins.types.PatternSetPlugin) Path(java.nio.file.Path) Main(jack.rm.Main) Settings(jack.rm.data.romset.Settings) RenamerPlugin(jack.rm.plugins.types.RenamerPlugin) FolderPlugin(jack.rm.plugins.folder.FolderPlugin)

Aggregations

Settings (jack.rm.data.romset.Settings)6 MyGameSetFeatures (jack.rm.data.romset.MyGameSetFeatures)5 GameSet (com.github.jakz.romlib.data.set.GameSet)3 CleanupPlugin (jack.rm.plugins.types.CleanupPlugin)3 Set (java.util.Set)3 Game (com.github.jakz.romlib.data.game.Game)2 Attribute (com.github.jakz.romlib.data.game.attributes.Attribute)2 GameAttribute (com.github.jakz.romlib.data.game.attributes.GameAttribute)2 RomAttribute (com.github.jakz.romlib.data.game.attributes.RomAttribute)2 Main (jack.rm.Main)2 PluginRealType (jack.rm.plugins.PluginRealType)2 Files (java.nio.file.Files)2 Arrays (java.util.Arrays)2 Collectors (java.util.stream.Collectors)2 Asset (com.github.jakz.romlib.data.assets.Asset)1 AssetData (com.github.jakz.romlib.data.assets.AssetData)1 AssetManager (com.github.jakz.romlib.data.assets.AssetManager)1 GameStatus (com.github.jakz.romlib.data.game.GameStatus)1 Feature (com.github.jakz.romlib.data.set.Feature)1 GameSetFeatures (com.github.jakz.romlib.data.set.GameSetFeatures)1