Dust

scalata.domain.entities.items.Dust
See theDust companion object
final case class Dust(id: String, position: Option[Point2D], name: String, itemClass: ItemClasses) extends Item, Pickable

Small, throw-away item with no direct effect.

  • Usable – using it simply discards the item (flavour only).

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Pickable
trait Item
trait Interactable
trait Entity
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def interact(gameSession: GameSession): GameResult[GameSession]

Perform the interaction logic.

Perform the interaction logic.

Value parameters

gameSession

current immutable snapshot

Attributes

Returns

updated snapshot or an error wrapped in GameResult

Definition Classes
override def spawn(pos: Option[Point2D]): Dust

Create the same item at a given position.

Create the same item at a given position.

Attributes

Definition Classes

Inherited methods

def isPicked: Boolean

true if the item has been removed from the floor.

true if the item has been removed from the floor.

Attributes

Inherited from:
Item
def pick(item: Item, gameSession: GameSession): GameSession

Transfer item from floor to inventory.

Transfer item from floor to inventory.

Value parameters

gameSession

current session snapshot

item

the item being collected

Attributes

Returns

a new session with world and player updated

Inherited from:
Pickable
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
override def toString: String

Glyph used by the ASCII renderer.

Glyph used by the ASCII renderer.

Attributes

Definition Classes
Item -> Any
Inherited from:
Item