Class GroundSlot

All Implemented Interfaces:
Slot, Cloneable, Iterable<RPObject>, Serializable

public class GroundSlot extends EntitySlot
a pseudo slot which represents a location on the ground
Author:
hendrik
  • Constructor Details

    • GroundSlot

      public GroundSlot(StendhalRPZone zone, int x, int y)
      creates a new GroundSlot
      Parameters:
      zone - zone
      x - x-coordinate
      y - y-coordinate
    • GroundSlot

      public GroundSlot(StendhalRPZone zone, Entity item)
      creates a new GroundSlot with an item.
      Parameters:
      zone - zone
      item - item on the ground
  • Method Details

    • isReachableForTakingThingsOutOfBy

      public boolean isReachableForTakingThingsOutOfBy(Entity entity)
      Description copied from interface: Slot
      Is this slot reachable to take things out of?
      Specified by:
      isReachableForTakingThingsOutOfBy in interface Slot
      Overrides:
      isReachableForTakingThingsOutOfBy in class EntitySlot
      Parameters:
      entity - Entity which may be able to reach this slot
      Returns:
      true, if it is reachable, false otherwise
    • isReachableForThrowingThingsIntoBy

      public boolean isReachableForThrowingThingsIntoBy(Entity entity)
      Description copied from interface: Slot
      Is this slot reachable to put things into?
      Specified by:
      isReachableForThrowingThingsIntoBy in interface Slot
      Overrides:
      isReachableForThrowingThingsIntoBy in class EntitySlot
      Parameters:
      entity - Entity which may be able to reach this slot
      Returns:
      true, if it is reachable, false otherwise
    • getSlotType

      public String getSlotType()
      gets the type of the slot ("slot", "ground", "market")
      Overrides:
      getSlotType in class EntitySlot
      Returns:
      slot type