struct Wakdata::Definition::Resource

Included Modules

Defined in:

wakdata/resource.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Wakdata::With::ResourceTypeId

resource_type(resource_types : Array(Wakdata::ResourceType)) : Wakdata::ResourceType | Nil resource_type, resource_type_id : UInt32 resource_type_id

Instance methods inherited from module Wakdata::With::Id

id : UInt32 id

Constructor Detail

def self.new(id : UInt32, resource_type_id : UInt32, is_blocking : Bool, ideal_rain_range_min : UInt8, ideal_rain_range_max : UInt8, ideal_temperature_range_min : Int8, ideal_temperature_range_max : Int8, icon_gfx_id : Int32, last_evolution_step : UInt8, usable_by_heroes : Bool, ideal_rain : UInt8) #

[View source]
def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

def self.new(pull : JSON::PullParser) #

def self.new(bson : BSON) #

Allocate an instance and copies data from a BSON struct.

class User
  include BSON::Serializable
  property name : String
end

data = BSON.new
data["name"] = "John"
User.new(data)

Class Method Detail

def self.from_bson(bson : BSON) #

NOTE See self.new.


Instance Method Detail

def [](value : String) #

[View source]
def icon_gfx_id : Int32 #

def ideal_rain : UInt8 #

def ideal_rain_range_max : UInt8 #

def ideal_rain_range_min : UInt8 #

def ideal_temperature_range_max : Int8 #

def ideal_temperature_range_min : Int8 #

def is_blocking : Bool #

def last_evolution_step : UInt8 #

def to_bson(bson = BSON.new) #

Converts to a BSON representation.

user = User.new name: "John"
bson = user.to_bson

def usable_by_heroes : Bool #