20 package net.sf.gridarta.model.validation.checks;
30 import org.jetbrains.annotations.NotNull;
37 public class ConnectedInsideContainerChecker<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> {
44 super(validatorPreferences);
49 final String connection = gameObject.getAttributeString(
"connected",
true);
50 final boolean connected = !connection.isEmpty();
51 if (connected && gameObject.isInContainer()) {
This is the base class for validators.
Interface for GameObject Validators.
This package contains the framework for validating maps.
A MapValidator that checks for mobs outside spawn points.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
Configuration parameters for Validators.
GameObjects are the objects based on Archetypes found on maps.
final ValidatorPreferences validatorPreferences
The ValidatorPreferences to use.
An GameObjectValidator to assert that containers do not contain connected objects.
An interface for classes that collect errors.
void validateGameObject(@NotNull final G gameObject, @NotNull final ErrorCollector< G, A, R > errorCollector)
Validates a game object.
ConnectedInsideContainerChecker(@NotNull final ValidatorPreferences validatorPreferences)
Creates a new instance.
Interface for MapArchObjects.