class Stelios::Item
- Stelios::Item
- Reference
- Object
Defined in:
engine/item.crConstructors
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. - #count : UInt64
- #count=(count : UInt64)
-
#dup
Returns a shallow copy of this object.
- #inventory : Container | Nil
- #inventory=(inventory : Container | Nil)
- #name : String
- #name=(name : String)
- #rarity : Rarity
- #rarity=(rarity : Rarity)
- #stack : UInt64
- #stack=(stack : UInt64)
Instance methods inherited from class Object
to_sban(io : IO)to_sban(encoder : SBAN::Encoder)
to_sban : Bytes to_sban
Class methods inherited from class Object
from_sban(string_or_io)
from_sban
Constructor Detail
def self.new(*, inventory : Stelios::Container | Nil = nil, name : String = "unnamed item", rarity : Stelios::Item::Rarity = Rarity::Common, count : UInt64 = 1_u64, stack : UInt64 = 1_u64)
#
Instance Method Detail
def ==(other : self)
#
Description copied from class Reference
Returns true
if this reference is the same as other. Invokes same?
.
def dup
#
Description copied from class Reference
Returns a shallow copy of this object.
This allocates a new object and copies the contents of
self
into it.