Usable

scalata.domain.entities.components.Usable
See theUsable companion trait
object Usable

Inline helper that tries to use a runtime item if a matching Usable instance is available.

The method performs an inline pattern-match on the concrete item type and, through summonInline, obtains the given instance for Potion, Dust or Weapon. Unsupported items yield None.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Usable.type

Members list

Value members

Concrete methods

inline def tryUse[E <: Entity](item: Item, owner: E): Option[E]