20 package net.sf.gridarta.model.validation.checks;
36 import org.jetbrains.annotations.NotNull;
42 public class ExitChecker<G
extends GameObject<G, A, R>, A extends
MapArchObject<A>, R extends
Archetype<G, A, R>> extends
AbstractValidator<G, A, R> implements
GameObjectValidator<G, A, R> {
55 super(validatorPreferences);
66 if (path.length() <= 0 || path.equals(
"/!") || path.startsWith(
"/random/")) {
71 assert mapSquare != null;
74 if (!file.exists() || file.isDirectory()) {
75 errorCollector.collect(
new ExitError<>(gameObject, path));
static MapPath newMapPath(@NotNull final String string)
Creates a MapPath instance from string representation.
Exception thrown if the destination path points to the source map.
MapSquare< G, A, R > getMapSquare()
This is the base class for validators.
final int exitTypeNo
The archetype type number of exits.
Interface for GameObject Validators.
MapModel< G, A, R > getMapModel()
Returns the MapModel this map square is part of.
This package contains the framework for validating maps.
void validateGameObject(@NotNull final G gameObject, @NotNull final ErrorCollector< G, A, R > errorCollector)
Validates a game object.
Validation error that's used when a map has wrong exit paths.
String SLAYING
The name of the "slaying" attribute.
Base package of all Gridarta classes.
ExitChecker(@NotNull final ValidatorPreferences validatorPreferences, final int exitTypeNo)
Create a ExitChecker.
Reflects a game object (object on a map).
A Validator to assert that exits are connected to maps properly.
Configuration parameters for Validators.
GameObjects are the objects based on Archetypes found on maps.
Utility class for MapPath related functions.
final ValidatorPreferences validatorPreferences
The ValidatorPreferences to use.
Exception thrown if an operation is attempted on an unsaved map.
MapFile getMapFile()
Returns the map file.
An interface for classes that collect errors.
Interface for MapArchObjects.