Class: R3EXS::Item

Inherits:
UsableItem show all
Defined in:
lib/R3EXS/RGSS3_R3EXS.rb

Overview

物品类

Instance Attribute Summary

Attributes inherited from BaseItem

#description, #index, #name, #note

Instance Method Summary collapse

Constructor Details

#initialize(item, index, with_note) ⇒ R3EXS::Item

用 RPG::Item 初始化

Parameters:

  • item (RPG::Item)

    待处理的 RPG::Item 对象

  • index (Integer)

    在原始数组中的索引

  • with_note (Boolean)

    是否处理 note 字段



1015
1016
1017
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1015

def initialize(item, index, with_note)
    super(item, index, with_note)
end

Instance Method Details

#empty?Boolean

判断是否为空

Returns:

  • (Boolean)


1056
1057
1058
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1056

def empty?
    super
end

#ex_glossaryArray<GlossaryItem>

提取术语表

Returns:

  • (Array<GlossaryItem>)


1038
1039
1040
1041
1042
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1038

def ex_glossary
    glossary = []
    glossary << GlossaryItem.new(@name, '物品名称')
    glossary
end

#ex_stringsArray<String>

提取所有的字符串

Returns:

  • (Array<String>)


1031
1032
1033
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1031

def ex_strings
    super
end

#in_strings(hash) ⇒ void

This method returns an undefined value.

将所有的字符串替换为指定的字符串

Parameters:

  • hash (Hash<String, String>)

    字符串翻译表



1049
1050
1051
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1049

def in_strings(hash)
    super(hash)
end

#inject_to(item) ⇒ void

This method returns an undefined value.

注入到 RPG::Item 对象

Parameters:

  • item (RPG::Item)

    待注入的 RPG::Item 对象



1024
1025
1026
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1024

def inject_to(item)
    super
end