Class: RPG::BaseItem

Inherits:
Object
  • Object
show all
Extended by:
RgssDb::JsonableConstructor
Includes:
RgssDb::Jsonable
Defined in:
lib/rgss_db/model/rpg_maker_data/vx/rpg/base_item.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/base_item.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/base_item_feature.rb

Overview

A superclass of actor, class, skill, item, weapon, armor, enemy, and state.

Some items are unnecessary depending on the type of data, but they are included for convenience sake.

Direct Known Subclasses

Actor, Class, Enemy, EquipItem, State, UsableItem

Defined Under Namespace

Classes: Feature

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RgssDb::JsonableConstructor

json_create, json_new

Methods included from RgssDb::Jsonable

#as_json, #to_json

Constructor Details

#initializeBaseItem

Returns a new instance of BaseItem.



11
12
13
14
15
16
17
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/base_item.rb', line 11

def initialize
  @id = 0
  @name = ""
  @icon_index = 0
  @description = ""
  @note = ""
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



23
24
25
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/base_item.rb', line 23

def description
  @description
end

#featuresObject

Returns the value of attribute features.



29
30
31
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/base_item.rb', line 29

def features
  @features
end

#icon_indexObject

Returns the value of attribute icon_index.



23
24
25
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/base_item.rb', line 23

def icon_index
  @icon_index
end

#idObject

Returns the value of attribute id.



23
24
25
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/base_item.rb', line 23

def id
  @id
end

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/base_item.rb', line 23

def name
  @name
end

#noteObject

Returns the value of attribute note.



23
24
25
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/base_item.rb', line 23

def note
  @note
end

Instance Method Details

#to_sObject



19
20
21
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/base_item.rb', line 19

def to_s
  @name.to_s
end