 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.validation.checks;
22 import java.util.ArrayList;
23 import java.util.Arrays;
24 import java.util.Collection;
25 import java.util.HashSet;
26 import java.util.List;
37 import org.jetbrains.annotations.NotNull;
44 public class BlockedMobOrSpawnPointChecker<G
extends GameObject<G, A, R>, A extends
MapArchObject<A>, R extends
Archetype<G, A, R>> extends
AbstractValidator<G, A, R> implements
SquareValidator<G, A, R> {
50 private final List<G>
blockers =
new ArrayList<>();
62 private final Collection<Integer>
typeNumbers =
new HashSet<>();
71 this.typeNumbers.addAll(Arrays.asList(
typeNumbers));
76 for (
final G gameObject : mapSquare) {
A SquareValidator to assert that mobs or spawn points aren't on blocked squares.
Base package of all Gridarta classes.
Interface for Square Validators.
final List< G > blockers
List with blocking objects.
Reflects a game object (object on a map).
void validateSquare(@NotNull final MapSquare< G, A, R > mapSquare, @NotNull final ErrorCollector< G, A, R > errorCollector)
Validate a map square.
final List< G > mobsOrSpawnPoints
List with blocked objects.
final ValidatorPreferences validatorPreferences
The ValidatorPreferences to use.
Configuration parameters for Validators.
GameObjects are the objects based on Archetypes found on maps.
Interface for MapArchObjects.
An interface for classes that collect errors.
This is the base class for validators.
String NO_PASS
The name of the "no_pass" attribute.
This package contains the framework for validating maps.
Validation error that's used when the BlockedMobOrSpawnPointChecker detected a possible error on the ...
final Collection< Integer > typeNumbers
The object types to check.
BlockedMobOrSpawnPointChecker(@NotNull final ValidatorPreferences validatorPreferences, @NotNull final Integer... typeNumbers)
Creates a new instance.