Package net.sf.gridarta.model.validation.checks
This package contains the checks for validating maps.
How to create your own checks
The easiest way to create your own checks is this:- Extend
AbstractValidatorby a class named like net.sf.gridarta.map.validation.checks.MyMapChecker that additionally implements one of theValidatorsub-interfaces - Extend
ValidationErroror one of its subclasses by a class named likenet.sf.gridarta.map.model.validation.checks.MyError.
Caveats
If you extendAbstractValidator without actually really implementing one of the Validator, your validator will be
a valid and compilable validator but also a dysfunctional stub. So don't
forget to extend the corresponding sub-interface.
FAQ
- Do I really have to always extend
ValidationErrorfor my validator's errors? - Well not really. But the automatic localization of
ValidationErrors depends on separate error class names. Also,CorrectableErrordepends on separate error classes.
-
Class Summary Class Description AbstractShopSquareChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AMapValidatorto detect shop squares which allow magic or prayers, or which have adjacent squares that allow magic or prayers.ArchetypeTypeChecks Creates checks fromArchetypeTypes.AttributeRangeChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A validator that checks for suspicious attribute values.BlockedMatrix<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Determines whether a map square is blocked.BlockedMobOrSpawnPointChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A SquareValidator to assert that mobs or spawn points aren't on blocked squares.BlockedSpawnPointChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AMapValidatorto assert that mobs or spawn points aren't on blocked squares.BlockedSquareChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AMapValidatorto assert that a square that's blocked and no_pass is not surrounded by blocked and no_pass only.ConnectedInsideContainerChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A GameObjectValidator to assert that containers do not contain connected objects.ConnectedPickableChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A Validator to assert that connected objects cannot be picked up.ConnectionChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Checks that for each connection value at least one source and at least one sink exists.CustomTypeChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Checks that a game object does not set a custom type.DoubleLayerChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A SquareValidator to assert that there are no two objects within the same layer.DoubleTypeChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A SquareValidator to assert that there are no two arches of the same type on the same square.DuplicateMonsterOnSquareChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Warns about map squares that contain more than one monster.EmptySpawnPointChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A GameObjectValidator to assert that spawn points are not empty.Entry<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> An entry to match consisting of aGameObjectMatcherand a regular expression which defined the allowed value of the "slaying" field.EnvironmentChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AGameObjectValidatorthat checks for valid environment.ExitChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A Validator to assert that exits are connected to maps properly.MapCheckerScriptChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Executes a script to check a map.MapCheckerScriptFailureError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AMapValidationErrorthat indicates that the map validator script could not be executed.MapCheckerScriptIOError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AValidationErrorthat reports I/O errors related toMapCheckerScriptChecker.MapCheckerScriptMapError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AMapValidationErrorthat represents a per map error of theMapCheckerScriptChecker.MapCheckerScriptMapSquareError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> ASquareValidationErrorthat represents a per map square error of theMapCheckerScriptChecker.MapCheckerScriptMissingError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AMapValidationErrorthat indicates that the map checker script could not be found.MapDifficultyChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Validator that checks whether the map has a valid difficulty.MapEnterLocationChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Validator that checks whether the map has a valid difficulty.MobOutsideSpawnPointChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> GameObjectValidator to assert that mobs are not outside spawn points.NonAbsoluteExitPathError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AGameObjectValidationErrorthat describes an exitGameObjecthaving an invalid exit path.PaidItemShopSquareChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AMapValidatorto detect shop squares that contain paid items.Range Represents a range of attribute values.RangeEntry<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> An attribute to check.ShopSquareChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> AMapValidatorto detect shop squares which allow magic or prayers.SlayingChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A GameObjectValidator to assert that game objects do not have critical slaying strings.SquareWithoutFloorChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A SquareValidator to assert that squares have a floor.SysObjectNotOnLayerZeroChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A GameObjectValidator to assert that sys objects are only in layer 0.TilePathsChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Validator that checks whether all tile paths are valid.Type<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Manages all checks for one game object type.UndefinedArchetypeChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Check that no game object references an undefined archetype.UndefinedFaceChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Checks that a game object does not reference an undefined face.UnsetSlayingChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> Checks that a game object does not set a custom type.ValidatorFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> A factory for creatingValidatorinstances from string representation. -
Exception Summary Exception Description InvalidCheckException AnExceptionindicating that an attribute check is invalid.