Interface ModManager
-
public interface ModManagerModManager holds and manages mods. It also provides aggregates for other subsystems that are coupled to mods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidactivate(List<String> mods)booleanactivateGameMode(String gameModeName)List<Mod>getActive()Returns mod descriptors of all active modsModgetActiveByName(String name)Returns a mod descriptor by name only if it's activeMap<String,MenuLaunchEntry>getActiveMenuLaunchEntries()Returns all menu launch entries from active modsList<String>getActiveNames()Returns the names of all active modsList<Mod>getAll()Returns all mod descriptors<T> TgetBusinessObject(Class<? extends T> clazz)Returns an instance of a business object by clazz.ModgetByName(String name)Returns a mod descriptor by nameList<CompositeEntityFactory>getCompositeEntityFactories()Returns all composite entity factoriesGameModeDefgetGameModeByName(String gameModeName)Returns a game mode definition by game mode nameList<GameModeDef>getGameModeDefs()Returns a view of all game mode definitionsbooleanisDirectoryRestricted(File file)booleanisModNameRestricted(String name)voidloadAchievements()(Re)loads all achievement definitions from active modsvoidloadAllAchievements()(Re)loads all achievement definitions from all modsInputStreamloadCumulativeResource(String resourceName)Loads a resource from the mod static storage cumulative, returning the last occurence.InputStreamloadDefaultModResource(String resourceName)Loads a resource from the mod static storage of the default mod (game-core).voidloadEntityDef()(Re)loads all entity definitions from active modsInputStreamloadResource(Mod mod, String resourceName)InputStreamloadResource(String modName, String resourceName)Loads a resource from the mod static storage cumulative if modName is null, otherwise non-cumulative from the specified mod.voidloadShipClasses()(Re)loads all ship classes from active mods
-
-
-
Method Detail
-
activate
@RestrictedMethod void activate(List<String> mods)
-
activateGameMode
@RestrictedMethod boolean activateGameMode(String gameModeName)
-
loadShipClasses
void loadShipClasses()
(Re)loads all ship classes from active mods
-
loadEntityDef
void loadEntityDef()
(Re)loads all entity definitions from active mods
-
loadAchievements
void loadAchievements()
(Re)loads all achievement definitions from active mods
-
loadAllAchievements
void loadAllAchievements()
(Re)loads all achievement definitions from all mods
-
loadResource
InputStream loadResource(String modName, String resourceName)
Loads a resource from the mod static storage cumulative if modName is null, otherwise non-cumulative from the specified mod. See also loadCumulativeResource for a more detailed explaination about cumulating resources.
-
loadResource
@RestrictedMethod InputStream loadResource(Mod mod, String resourceName)
-
loadDefaultModResource
InputStream loadDefaultModResource(String resourceName)
Loads a resource from the mod static storage of the default mod (game-core). It ignores other mods overriding resources.
-
loadCumulativeResource
InputStream loadCumulativeResource(String resourceName)
Loads a resource from the mod static storage cumulative, returning the last occurence. This makes it possible for mods to override data from other mods (e.g. a custom tileset mod can override tilesets from the game core).
-
getGameModeDefs
List<GameModeDef> getGameModeDefs()
Returns a view of all game mode definitions
-
getGameModeByName
GameModeDef getGameModeByName(String gameModeName)
Returns a game mode definition by game mode name
-
getBusinessObject
<T> T getBusinessObject(Class<? extends T> clazz)
Returns an instance of a business object by clazz. Business objects are stateless and implement game mechanics, thus the instance returned can be re-used.
-
getCompositeEntityFactories
List<CompositeEntityFactory> getCompositeEntityFactories()
Returns all composite entity factories
-
getActiveByName
Mod getActiveByName(String name)
Returns a mod descriptor by name only if it's active
-
getActiveMenuLaunchEntries
Map<String,MenuLaunchEntry> getActiveMenuLaunchEntries()
Returns all menu launch entries from active mods
-
isDirectoryRestricted
boolean isDirectoryRestricted(File file)
-
isModNameRestricted
boolean isModNameRestricted(String name)
-
-