#--------------------------------------------------------------------------
# ● [追加]贵重物品指令在菜单中显示的名称
#--------------------------------------------------------------------------
def Vocab.collection
"收藏品"
end
class Window_MenuCommand
#--------------------------------------------------------------------------
# ● [别名修改]独自添加指令用
#--------------------------------------------------------------------------
alias add_original_commands_for_collection add_original_commands
def add_original_commands
add_original_commands_for_collection
add_command(Vocab::collection, :collection)
end
end
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# ● [别名修改]生成指令窗口
#--------------------------------------------------------------------------
alias create_command_window_for_collection create_command_window
def create_command_window
create_command_window_for_collection
@command_window.set_handler(:collection, method(:call_scene_collection))
end
#--------------------------------------------------------------------------
# ● [追加]呼叫贵重物品界面
#--------------------------------------------------------------------------
def call_scene_collection
SceneManager.call(Scene_Collection)
end
end
class Scene_Collection < Scene_Item
#--------------------------------------------------------------------------
# ● [别名修改]生成分类窗口
#--------------------------------------------------------------------------
alias create_category_window_for_hide create_category_window
def create_category_window
create_category_window_for_hide
@category_window.deactivate
@category_window.hide
end
#--------------------------------------------------------------------------
# ● [覆盖]生成物品窗口
#--------------------------------------------------------------------------
def create_item_window
wy = @help_window.y + @help_window.height
wh = Graphics.height - wy
@item_window = Window_ItemList.new(0, wy, Graphics.width, wh)
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@item_window.set_handler(:cancel, method(:return_scene))
@item_window.category = :key_item
@item_window.activate
@item_window.select_last
end
end