PointClickEngine::Inventory::InventoryItem
Inherits YAML::Serializable < Reference < Object
Individual inventory item
Constants
MAX_COMBINABLES = 50
MAX_COMBINE_ACTIONS = 50
MAX_DESC_LENGTH = 500
MAX_NAME_LENGTH = 64
Maximum lengths
MAX_USABLE_ON = 50
NAME_PATTERN = /\A[a-zA-Z][a-zA-Z0-9_-]*\z/
Valid characters for item names: alphanumeric, underscore, dash
Constructors
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Sourcenew(name : String, description : String)
Sourcenew
Sourcenew(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
SourceInstance methods
after_yaml_deserialize(ctx : YAML::ParseContext)
Sourcecan_combine_with?(other_item : InventoryItem) : Bool
Sourcecan_use_on?(target_name : String) : Bool
Sourcecombinable_with
Sourcecombinable_with=(combinable_with : Array(String))
Sourcecombine_actions
Sourcecombine_actions=(combine_actions : Hash(String, String))
Sourceconsumable
Sourceconsumable=(consumable : Bool)
Sourcedescription
Sourcedescription=(description : String)
Sourceget_combine_action(other_item_name : String) : String | Nil
Sourceicon
Sourceicon=(icon : RL::Texture2D | Nil)
Sourceicon_path
Sourceicon_path=(icon_path : String | Nil)
Sourceload_icon(path : String)
Sourcename
Sourcename=(name : String)
Sourceusable_on
Sourceusable_on=(usable_on : Array(String))
Sourceuse_action
Sourceuse_action=(use_action : String | Nil)
Source