Class AutoInsertionMode

  • All Implemented Interfaces:
    java.io.Serializable, InsertionMode

    public class AutoInsertionMode
    extends java.lang.Object
    implements InsertionMode
    Automatically guess the insertion position. May replace rather than insert the object.
    See Also:
    Serialized Form
    • Constructor Detail

      • AutoInsertionMode

        public AutoInsertionMode​(@Nullable
                                 @Nullable GameObjectMatcher floorGameObjectMatcher,
                                 @Nullable
                                 @Nullable GameObjectMatcher wallGameObjectMatcher,
                                 @Nullable
                                 @Nullable GameObjectMatcher belowFloorGameObjectMatcher,
                                 @Nullable
                                 @Nullable GameObjectMatcher systemObjectGameObjectMatcher)
        Initializes the class.
        Parameters:
        floorGameObjectMatcher - the floor matcher to use
        wallGameObjectMatcher - the wall matcher to use
        belowFloorGameObjectMatcher - the game object to insert below the floor
        systemObjectGameObjectMatcher - matches system objects that should stay on top
    • Method Detail

      • insert

        public <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>> void insert​(@NotNull
                                                                                                                                                   G gameObject,
                                                                                                                                                   @NotNull
                                                                                                                                                   @NotNull MapSquare<G,​A,​R> mapSquare)
        Description copied from interface: InsertionMode
        Inserts a GameObject into a MapSquare.
        Specified by:
        insert in interface InsertionMode
        Type Parameters:
        G - the game object type of the object
        A - the map arch object type of the object
        R - the archetype type of the object
        Parameters:
        gameObject - the game object to insert
        mapSquare - the map square to modify
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object