Package net.sf.gridarta.project
Interface ProjectFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
-
- All Known Subinterfaces:
EditorFactory<G,A,R>
- All Known Implementing Classes:
DefaultEditorFactory,DefaultEditorFactory,DefaultEditorFactory
public interface ProjectFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>A factory to create project-dependent objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetDoubleFaceOffset()Returns the offset for drawing double faces.booleangetIncludeFaceNumbers()Returns whether the face file contains face numbers.java.lang.StringgetScriptsDir()Returns the default directory for editor scripts.@Nullable java.lang.StringgetSpellFile()Returns the spell file name to load.intgetSpellType()Returns the archetype type for game object spells.@NotNull AttributeRangeChecker<G,A,R>loadAttributeRangeChecker(@NotNull ErrorViewCollector errorViewCollector, @NotNull GameObjectMatchers gameObjectMatchers, @NotNull ValidatorPreferences validatorPreferences)Loads the attribute range checker for map validation.@NotNull ArchetypeFactory<G,A,R>newArchetypeFactory(@NotNull FaceObjectProviders faceObjectProviders, @NotNull AnimationObjects animationObjects)Creates a newArchetypeFactoryinstance.AbstractArchetypeParser<G,A,R,?>newArchetypeParser(@NotNull ErrorView errorView, GameObjectParser<G,A,R> gameObjectParser, AnimationObjects animationObjects, ArchetypeSet<G,A,R> archetypeSet, @NotNull GameObjectFactory<G,A,R> gameObjectFactory, @NotNull ProjectSettings projectSettings, @NotNull SmoothFaces smoothFaces)Creates a newAbstractArchetypeParserinstance.@NotNull ArchetypeSet<G,A,R>newArchetypeSet(@NotNull ProjectSettings projectSettings, @NotNull ArchetypeFactory<G,A,R> archetypeFactory)Creates a newArchetypeSetinstance.@NotNull GameObjectFactory<G,A,R>newGameObjectFactory(@NotNull FaceObjectProviders faceObjectProviders, @NotNull AnimationObjects animationObjects, @NotNull ArchetypeTypeSet archetypeTypeSet)Creates a newGameObjectFactoryinstance.@NotNull GameObjectParserFactory<G,A,R>newGameObjectParserFactory(@NotNull GameObjectFactory<G,A,R> gameObjectFactory, @NotNull ArchetypeSet<G,A,R> archetypeSet, @NotNull ArchetypeTypeSet archetypeTypeSet)Creates a newGameObjectParserFactoryinstance.@NotNull MapArchObjectFactory<A>newMapArchObjectFactory(@NotNull ProjectSettings projectSettings)Creates a newMapArchObjectFactoryinstance.@NotNull MapArchObjectParserFactory<A>newMapArchObjectParserFactory()Creates a newMapArchObjectParserFactoryinstance.@NotNull MapControlFactory<G,A,R>newMapControlFactory(@NotNull MapWriter<G,A,R> mapWriter, @NotNull ProjectSettings projectSettings, @NotNull MapModelFactory<G,A,R> mapModelFactory)Creates a newMapControlFactoryinstance.@NotNull AbstractResources<G,A,R>newResources(@NotNull GameObjectParser<G,A,R> gameObjectParser, @NotNull ArchetypeSet<G,A,R> archetypeSet, @NotNull AbstractArchetypeParser<G,A,R,?> archetypeParser, @NotNull FaceObjects faceObjects, @NotNull AnimationObjects animationObjects, @NotNull ArchFaceProvider archFaceProvider, @NotNull FaceObjectProviders faceObjectProviders, @NotNull SmoothFaces smoothFaces)Creates a newAbstractResourcesinstance.
-
-
-
Method Detail
-
getDoubleFaceOffset
int getDoubleFaceOffset()
Returns the offset for drawing double faces.- Returns:
- the offset
-
getIncludeFaceNumbers
boolean getIncludeFaceNumbers()
Returns whether the face file contains face numbers.- Returns:
- whether the face file contains face numbers
-
newArchetypeFactory
@NotNull @NotNull ArchetypeFactory<G,A,R> newArchetypeFactory(@NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull AnimationObjects animationObjects)
Creates a newArchetypeFactoryinstance.- Parameters:
faceObjectProviders- the face object providers for looking up facesanimationObjects- the animation objects for looking up animations- Returns:
- the new instance
-
newGameObjectFactory
@NotNull @NotNull GameObjectFactory<G,A,R> newGameObjectFactory(@NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull AnimationObjects animationObjects, @NotNull @NotNull ArchetypeTypeSet archetypeTypeSet)
Creates a newGameObjectFactoryinstance.- Parameters:
faceObjectProviders- the face object providers to useanimationObjects- the animation objects for looking up animationsarchetypeTypeSet- the archetype type set for looking up archetype types- Returns:
- the new instance
-
newArchetypeSet
@NotNull @NotNull ArchetypeSet<G,A,R> newArchetypeSet(@NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull ArchetypeFactory<G,A,R> archetypeFactory)
Creates a newArchetypeSetinstance.- Parameters:
projectSettings- the project settings to usearchetypeFactory- the archetype factory to use- Returns:
- the new instance
-
newGameObjectParserFactory
@NotNull @NotNull GameObjectParserFactory<G,A,R> newGameObjectParserFactory(@NotNull @NotNull GameObjectFactory<G,A,R> gameObjectFactory, @NotNull @NotNull ArchetypeSet<G,A,R> archetypeSet, @NotNull @NotNull ArchetypeTypeSet archetypeTypeSet)
Creates a newGameObjectParserFactoryinstance.- Parameters:
gameObjectFactory- the game object parser factory to usearchetypeSet- the archetype set for looking up archetypesarchetypeTypeSet- the archetype type set for sorting attributes on save- Returns:
- the new instance
-
newArchetypeParser
AbstractArchetypeParser<G,A,R,?> newArchetypeParser(@NotNull @NotNull ErrorView errorView, GameObjectParser<G,A,R> gameObjectParser, AnimationObjects animationObjects, ArchetypeSet<G,A,R> archetypeSet, @NotNull @NotNull GameObjectFactory<G,A,R> gameObjectFactory, @NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull SmoothFaces smoothFaces)
Creates a newAbstractArchetypeParserinstance.- Parameters:
errorView- the error view for reporting errorsgameObjectParser- the game object parser to useanimationObjects- the animation objects to usearchetypeSet- the archetype set to usegameObjectFactory- the game object factory to useprojectSettings- the project settings to usesmoothFaces- the smooth faces to use- Returns:
- the new instance
-
newResources
@NotNull @NotNull AbstractResources<G,A,R> newResources(@NotNull @NotNull GameObjectParser<G,A,R> gameObjectParser, @NotNull @NotNull ArchetypeSet<G,A,R> archetypeSet, @NotNull @NotNull AbstractArchetypeParser<G,A,R,?> archetypeParser, @NotNull @NotNull FaceObjects faceObjects, @NotNull @NotNull AnimationObjects animationObjects, @NotNull @NotNull ArchFaceProvider archFaceProvider, @NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull SmoothFaces smoothFaces)
Creates a newAbstractResourcesinstance.- Parameters:
gameObjectParser- the game object parser to usearchetypeSet- the archetype set to usearchetypeParser- the archetype parser to usefaceObjects- the face objects to useanimationObjects- the animation objects to usearchFaceProvider- the arch face provider to usefaceObjectProviders- the face object providers for looking up facessmoothFaces- the smooth faces to use- Returns:
- the new instance
-
newMapArchObjectParserFactory
@NotNull @NotNull MapArchObjectParserFactory<A> newMapArchObjectParserFactory()
Creates a newMapArchObjectParserFactoryinstance.- Returns:
- the new instance
-
newMapArchObjectFactory
@NotNull @NotNull MapArchObjectFactory<A> newMapArchObjectFactory(@NotNull @NotNull ProjectSettings projectSettings)
Creates a newMapArchObjectFactoryinstance.- Parameters:
projectSettings- the project settings to use- Returns:
- the new instance
-
loadAttributeRangeChecker
@NotNull @NotNull AttributeRangeChecker<G,A,R> loadAttributeRangeChecker(@NotNull @NotNull ErrorViewCollector errorViewCollector, @NotNull @NotNull GameObjectMatchers gameObjectMatchers, @NotNull @NotNull ValidatorPreferences validatorPreferences)
Loads the attribute range checker for map validation.- Parameters:
errorViewCollector- the error view collector to usegameObjectMatchers- the defined game object matchersvalidatorPreferences- the validator preferences to use- Returns:
- the loaded attribute range checker
-
newMapControlFactory
@NotNull @NotNull MapControlFactory<G,A,R> newMapControlFactory(@NotNull @NotNull MapWriter<G,A,R> mapWriter, @NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull MapModelFactory<G,A,R> mapModelFactory)
Creates a newMapControlFactoryinstance.- Parameters:
mapWriter- the map writer to useprojectSettings- the project settings to usemapModelFactory- the map model factory to use- Returns:
- the new instance
-
getSpellType
int getSpellType()
Returns the archetype type for game object spells.- Returns:
- the archetype type or
0to not load game object spells
-
getSpellFile
@Nullable @Nullable java.lang.String getSpellFile()
Returns the spell file name to load.- Returns:
- the spell file name or
nullto not load numbered spells
-
getScriptsDir
java.lang.String getScriptsDir()
Returns the default directory for editor scripts.- Returns:
- the directory
-
-