本帖最后由 RaidenInfinity 于 2016-10-25 19:20 编辑
class Window_ItemCategory < Window_HorzCommand def col_max return 5 #分类总数 end def make_command_list add_command(Vocab::item, :item) add_command("装备", :equip) #增加分类:装备 add_command(Vocab::weapon, :weapon) #既然有了装备分类…还要留下原本的武器/护甲分类吗? add_command(Vocab::armor, :armor) #那就要看你自己的决定了。 add_command(Vocab::key_item, :key_item) end end class Window_ItemList < Window_Selectable def include?(item) case @category when :item item.is_a?(RPG::Item) && !item.key_item? when :equip item.is_a?(RPG::Weapon) || item.is_a?(RPG::Armor) #武器+护甲都会显示在这个分类中 when :weapon item.is_a?(RPG::Weapon) when :armor item.is_a?(RPG::Armor) when :key_item item.is_a?(RPG::Item) && item.key_item? else false end end end
class Window_ItemCategory < Window_HorzCommand
def col_max
return 5 #分类总数
end
def make_command_list
add_command(Vocab::item, :item)
add_command("装备", :equip) #增加分类:装备
add_command(Vocab::weapon, :weapon) #既然有了装备分类…还要留下原本的武器/护甲分类吗?
add_command(Vocab::armor, :armor) #那就要看你自己的决定了。
add_command(Vocab::key_item, :key_item)
end
end
class Window_ItemList < Window_Selectable
def include?(item)
case @category
when :item
item.is_a?(RPG::Item) && !item.key_item?
when :equip
item.is_a?(RPG::Weapon) || item.is_a?(RPG::Armor) #武器+护甲都会显示在这个分类中
when :weapon
item.is_a?(RPG::Weapon)
when :armor
item.is_a?(RPG::Armor)
when :key_item
item.is_a?(RPG::Item) && item.key_item?
else
false
end
end
end
|