Package megamek.common
Class Configuration
java.lang.Object
megamek.common.Configuration
Stores and provides access to the configuration of the MegaMek library.
-
Method Summary
Modifier and TypeMethodDescriptionstatic File
Return the configured army tables directory, if set, otherwise return the default path, relative to the configured data directory.static File
Return the configured board backgrounds directory, if set, otherwise return the default path, relative to the configured images directory.static File
Return the configured boards directory, if set, otherwise return the default path, relative to the configured data directory.static File
camoDir()
Return the camo directory, which is relative to the images directory.static File
Return the configured configuration file directory.static File
dataDir()
Return the configured data directory.static File
docsDir()
Return the configured documentation directory.static File
Get the fluff images directory, which is relative to the images directory.static File
fontsDir()
Return the configured fonts data directory, if set, otherwise return the default path, relative to the configured data directory.static File
Return the configured force generator data directory, if set, otherwise return the default path, relative to the configured data directory.static File
static File
static File
hexesDir()
Return the hexes directory, which is relative to the images directory.static File
Return the configured file that maps an image file to a location within an image atlas, if set, otherwise return the default path, relative to the configured data directory.static File
Return the configured images directory, if set, otherwise return the default path, relative to the configured data directory.static File
Return the minimap themes directory, which is relative to the hexes directory.static File
Return the misc images directory, which is relative to the images directory.static File
Return the nuke hit hexes directory, which is relative to the hexes directory.static File
Return the orbital bombardment hexes directory, which is relative to the hexes directory.static File
Return the portrait images directory, which is relative to the images directory.static File
Return the configured scenarios directory, if set, otherwise return the default path, relative to the configured data directory.static void
setArmyTablesDir
(File army_tables_dir_path) Set the army tables directory to an arbitrary location (not relative to the data directory).static void
setboardBackgroundsDir
(File board_background_dir_path) Set the board backgrounds directory to an arbitrary location (not relative to the images directory).static void
setBoardsDir
(File boards_dir_path) Set the boards directory to an arbitrary location (not relative to the data directory).static void
setConfigDir
(File config_dir_path) Set the configuration directory.static void
setDataDir
(File data_dir_path) Set the data directory.static void
setDocsDir
(File docs_dir_path) Set the documentation directory.static void
setFontsDir
(File fontsDir) Set the force generator directory to an arbitrary location (not relative to the data directory).static void
setForceGeneratorDir
(File force_generator_dir_path) Set the force generator directory to an arbitrary location (not relative to the data directory).static void
setImageFileAtlasMapFile
(File imgFileAtlasMapFilePath) Set the image file to atlas loc file to an arbitrary location (not relative to the data directory).static void
setImagesDir
(File images_dir_path) Set the images directory to an arbitrary location (not relative to the data directory).static void
setScenariosDir
(File scenarios_dir_path) Set the scenarios directory to an arbitrary location (not relative to the data directory).static void
setSkinDir
(File skin_dir_path) Set the skins directory.static void
setSoundsDir
(File sounds_dir_path) Set the sounds directory to an arbitrary location (not relative to the data directory).static void
setUnitsDir
(File units_dir_path) Set the units directory to an arbitrary location (not relative to the data directory).static File
skinsDir()
Return the configured skin specification files directory.static File
Return the configured sounds directory, if set, otherwise return the default path, relative to the configured data directory.static File
Return the story arcs directory, which is relative to the directory.static File
Get the unit images directory, which is relative to the images directory.static File
unitsDir()
Return the configured units directory, if set, otherwise return the default path, relative to the configured data directory.static File
static File
Return the configured userdata directory.static File
Get the widgets directory, which is relative to the images directory.
-
Method Details
-
userdataDir
Return the configured userdata directory.- Returns:
File
containing the path to the userdata directory.
-
configDir
Return the configured configuration file directory.- Returns:
File
containing the path to the config directory.
-
setConfigDir
Set the configuration directory.- Parameters:
config_dir_path
- The path to the config directory.
-
dataDir
Return the configured data directory.- Returns:
File
containing the path to the data directory.
-
setDataDir
Set the data directory.- Parameters:
data_dir_path
- The path to the data directory.
-
docsDir
Return the configured documentation directory.- Returns:
File
containing the path to the documentation directory.
-
setDocsDir
Set the documentation directory.- Parameters:
docs_dir_path
- The path to the documentation directory.
-
skinsDir
Return the configured skin specification files directory.- Returns:
File
containing the path to the skins directory.
-
setSkinDir
Set the skins directory.- Parameters:
skin_dir_path
- The path to the skins directory.
-
armyTablesDir
Return the configured army tables directory, if set, otherwise return the default path, relative to the configured data directory.- Returns:
File
containing the path to the army tables directory.
-
setArmyTablesDir
Set the army tables directory to an arbitrary location (not relative to the data directory).- Parameters:
army_tables_dir_path
- The path to the army tables directory.
-
boardsDir
Return the configured boards directory, if set, otherwise return the default path, relative to the configured data directory.- Returns:
File
containing the path to the boards directory.
-
setBoardsDir
Set the boards directory to an arbitrary location (not relative to the data directory).- Parameters:
boards_dir_path
- dir path The path to the boards directory.
-
camoDir
Return the camo directory, which is relative to the images directory.- Returns:
File
containing the path to the camo directory.
-
hexesDir
Return the hexes directory, which is relative to the images directory.- Returns:
File
containing the path to the camo directory.
-
minimapThemesDir
Return the minimap themes directory, which is relative to the hexes directory.- Returns:
File
containing the path to the minimap themes directory.
-
orbitalBombardmentHexesDir
Return the orbital bombardment hexes directory, which is relative to the hexes directory.- Returns:
File
containing the path to the orbital bombardment hexes directory.
-
nukeHexesDir
Return the nuke hit hexes directory, which is relative to the hexes directory.- Returns:
File
containing the path to the orbital bombardment hexes directory.
-
fluffImagesDir
Get the fluff images directory, which is relative to the images directory.- Returns:
File
containing the path to the fluff images directory.
-
universeImagesDir
- Returns:
File
containing the path to the universe images directory (having e.g. era, faction images).
-
imagesDir
Return the configured images directory, if set, otherwise return the default path, relative to the configured data directory.- Returns:
File
containing the path to the images directory.
-
setImagesDir
Set the images directory to an arbitrary location (not relative to the data directory).- Parameters:
images_dir_path
- The path to the images directory.
-
imageFileAtlasMapFile
Return the configured file that maps an image file to a location within an image atlas, if set, otherwise return the default path, relative to the configured data directory.- Returns:
File
containing the path to the image file to atlas loc file.
-
setImageFileAtlasMapFile
Set the image file to atlas loc file to an arbitrary location (not relative to the data directory).- Parameters:
imgFileAtlasMapFilePath
- The path to the images directory.
-
boardBackgroundsDir
Return the configured board backgrounds directory, if set, otherwise return the default path, relative to the configured images directory.- Returns:
File
containing the path to the images directory.
-
setboardBackgroundsDir
Set the board backgrounds directory to an arbitrary location (not relative to the images directory).- Parameters:
board_background_dir_path
- The path to the images directory.
-
unitsDir
Return the configured units directory, if set, otherwise return the default path, relative to the configured data directory.- Returns:
File
containing the path to the units directory.
-
gameSummaryImagesBVDir
-
gameSummaryImagesMMDir
-
setUnitsDir
Set the units directory to an arbitrary location (not relative to the data directory).- Parameters:
units_dir_path
- The path to the units directory.
-
miscImagesDir
Return the misc images directory, which is relative to the images directory.- Returns:
File
containing the path to the misc directory.
-
portraitImagesDir
Return the portrait images directory, which is relative to the images directory.- Returns:
File
containing the path to the portrait directory.
-
storyarcsDir
Return the story arcs directory, which is relative to the directory.- Returns:
File
containing the path to the portrait directory.
-
scenariosDir
Return the configured scenarios directory, if set, otherwise return the default path, relative to the configured data directory.- Returns:
File
containing the path to the scenarios directory.
-
setScenariosDir
Set the scenarios directory to an arbitrary location (not relative to the data directory).- Parameters:
scenarios_dir_path
- The path to the scenarios directory.
-
soundsDir
Return the configured sounds directory, if set, otherwise return the default path, relative to the configured data directory.- Returns:
File
containing the path to the sounds directory.
-
setSoundsDir
Set the sounds directory to an arbitrary location (not relative to the data directory).- Parameters:
sounds_dir_path
- The path to the sounds directory.
-
forceGeneratorDir
Return the configured force generator data directory, if set, otherwise return the default path, relative to the configured data directory.- Returns:
File
containing the path to the force generator directory.
-
setForceGeneratorDir
Set the force generator directory to an arbitrary location (not relative to the data directory).- Parameters:
force_generator_dir_path
- The path to the force generator directory.
-
fontsDir
Return the configured fonts data directory, if set, otherwise return the default path, relative to the configured data directory.- Returns:
File
containing the path to the force generator directory.
-
setFontsDir
Set the force generator directory to an arbitrary location (not relative to the data directory).- Parameters:
fontsDir
- The path to the force generator directory.
-
unitImagesDir
Get the unit images directory, which is relative to the images directory.- Returns:
File
containing the path to the unit images directory.
-
widgetsDir
Get the widgets directory, which is relative to the images directory.- Returns:
File
containing the path to the widgets directory.
-