class Stelios::Item

Defined in:

engine/item.cr

Constructors

Instance Method Summary

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) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


[View source]
def count : UInt64 #

[View source]
def count=(count : UInt64) #

[View source]
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.


[View source]
def inventory : Container | Nil #

[View source]
def inventory=(inventory : Container | Nil) #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def rarity : Rarity #

[View source]
def rarity=(rarity : Rarity) #

[View source]
def stack : UInt64 #

[View source]
def stack=(stack : UInt64) #

[View source]