设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1018|回复: 0
打印 上一主题 下一主题

[已经过期] 關於Yanfly寫的Ace Item Menu腳本,子選單修改問題!

[复制链接]

Lv1.梦旅人

梦石
0
星屑
1070
在线时间
15 小时
注册时间
2014-9-10
帖子
4
跳转到指定楼层
1
发表于 2014-9-10 10:36:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 unlimit999 于 2014-9-11 11:52 编辑

腳本如下,這是我在最近學怎樣使用腳本時,一邊翻譯一邊學弄出來的,已經翻譯過了{:2_275:}

我覺得他功能很不錯,但是有一點真心太煩了,預設的『主菜單→物品→物品→一大堆子菜單』超煩

我想問各位大大有沒有辦法把他改成『主菜單→物品→物品』就可以直接選物品了?

我需要修改的有
『主菜單→物品→物品→一大堆子菜單』   改成    『主菜單→物品→物品』
『主菜單→物品→武器→一大堆子菜單』   改成    『主菜單→物品→武器』
『主菜單→物品→護甲→一大堆子菜單』   改成    『主菜單→物品→護甲』

求大大幫忙


RUBY 代码复制
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Ace Item Menu v1.02
  4. # -- Last Updated: 2012.01.05
  5. # -- Level: Normal, Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================
  9.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-ItemMenu"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. #    作者的更新紀錄
  16. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  17. # 2012.01.05 - Compatibility Update with Equip Dynamic Stats.
  18. # 2012.01.03 - Started Script and Finished.
  19. #            - Compatibility Update with Ace Menu Engine.
  20. #
  21. #==============================================================================
  22. # ▼ Introduction
  23. #    說明
  24. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  25. # The Ace Item Menu offers more item categorization control and a better layout
  26. # that simulatenously provides information regarding the items to the player,
  27. # while keeping a good amount of the item list visible on screen at once. The
  28. # script can also be customized to rearrange commands and categories.
  29. #
  30. #==============================================================================
  31. # ▼ Instructions
  32. #    使用說明
  33. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  34. # To install this script, open up your script editor and copy/paste this script
  35. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  36. #
  37. # 要安裝該腳本,打開你的腳本編輯器和複製/粘貼此腳本
  38. # 黏貼位置:『▼外掛腳本』以下,『▼入口』以上,記得保存。
  39. #
  40. # -----------------------------------------------------------------------------
  41. # Item,Weapon,Armour Notetags
  42. # 物品、武器、護甲 備註(可在數據庫中添加的備註)
  43. # -----------------------------------------------------------------------------
  44. # <category: string>
  45. # Places this object into the item category for "string". Whenever the selected
  46. # category is highlighted in the Ace Item Menu command window, this object will
  47. # be included and shown in the item window.
  48. #
  49. # <category: string>
  50. # 此備註主要功能是用來設定物品、武器、護甲的子選單分類。
  51. # EX:<category: 槍>
  52. # 這便是將此物品分類到子選單『槍』中的例子,其中子選單名稱需要在此腳本設定!
  53. #
  54. # <image: string>
  55. # Uses a picture from Graphics\Pictures\ of your RPG Maker VX Ace Project's
  56. # directory with the filename of "string" (without the extension) as the image
  57. # picture shown in the Ace Item Menu.
  58. #
  59. # <image: string>
  60. # 此備註主要功能是用來設定物品;武器、護甲的高清晰圖片(最大96X96),其中圖片素材
  61. # 需要放在"遊戲目錄Graphics\Pictures\"下。
  62. # EX:<image: 藥水>
  63. # 這便是將該物品與『遊戲目錄Graphics\Pictures\』下的『藥水.png』圖片做連結。
  64. #
  65. #==============================================================================
  66. # ▼ Compatibility
  67. #    兼容性
  68. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  69. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  70. # it will run with RPG Maker VX without adjusting.
  71. #
  72. # 此腳本以RPG Maker VX Ace的規格,嚴格編寫打造,不兼容的狀況極為不可能
  73. # 對於RPG Maker VX不可兼容,除非做出適當的調整
  74. #
  75. #==============================================================================
  76.  
  77. module YEA
  78.   module ITEM
  79.  
  80.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  81.     # - Item Command Settings -
  82.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  83.     # This array adjusts what options appear in the initial item command window
  84.     # before the items are split into separate categories. Add commands, remove
  85.     # commands, or rearrange them. Here's a list of which does what:
  86.     #
  87.     # -------------------------------------------------------------------------
  88.     # :command         Description
  89.     # -------------------------------------------------------------------------
  90.     # :item            Opens up the various item categories. Default.
  91.     # :weapon          Opens up the various weapon categories. Default.
  92.     # :armor           Opens up the various armour categories. Default.
  93.     # :key_item        Shows a list of the various key items. Default.
  94.     # :gogototori      Requires Kread-EX's Go Go Totori Synthesis.
  95.     #
  96.     ###########################################################################
  97.     # - 物品選單設定 -
  98.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  99.     # 這裡是用來設定選單各個選項的位置,可自行添加,但此設定僅做為宣告變數用,
  100.     # 所以需和下方相關設定做配合才可正常發揮作用!
  101.     #
  102.     # 詳見以下列表:
  103.     # -------------------------------------------------------------------------
  104.     # :選項變數        說明
  105.     # -------------------------------------------------------------------------
  106.     # :item            默認:物品選單
  107.     # :weapon          默認:武器選單
  108.     # :armor           默認:護甲選單
  109.     # :key_item        默認:貴重物品選單
  110.     # :gogototori      需要 Kread-EX's Go Go Totori! Synthesis 腳本
  111.     #
  112.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  113.  
  114.     COMMANDS =[
  115.       :item,
  116.       :weapon,
  117.       :armor,
  118.       :key_item,
  119.     ]
  120.  
  121.     #--------------------------------------------------------------------------
  122.     # - Item Custom Commands -
  123.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  124.     # For those who use scripts to that may produce unique effects for the item
  125.     # scene, use this hash to manage the custom commands for the Item Command
  126.     # Window. You can disable certain commands or prevent them from appearing
  127.     # by using switches. If you don't wish to bind them to a switch, set the
  128.     # proper switch to 0 for it to have no impact.
  129.     #
  130.     #--------------------------------------------------------------------------
  131.     # - 物品選單自定義 -
  132.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  133.     # 某些腳本會影響到原來的按鍵,產生新的窗口,可以藉由此來調整相關設定,讓其
  134.     # 顯示正常。注意:使用沒有宣告的變數將不會有任何效果!
  135.     #
  136.     # 設定說明
  137.     # 顯示名稱  :    請自行填寫
  138.     # 按鍵開關  :    0為開啟,非0數字為關閉
  139.     # 是否顯示  :    0為顯示,非0數字為隱藏
  140.     # 關聯程序  :    與之相關聯的程序
  141.     #
  142.     # 格式
  143.     # 選項變數 => ["顯示名稱",按鍵開關,是否顯示,關連程序],
  144.     #
  145.     # 例子
  146.     # :shop=>["商店",0,0,command_shop],
  147.     #
  148.     #--------------------------------------------------------------------------
  149.     CUSTOM_ITEM_COMMANDS ={
  150.       :custom1 => [ "Custom Name",            0,          0, :command_name1],
  151.       :custom2 => [ "Custom Text",           13,          0, :command_name2],
  152.     # 以上例子因為沒有宣告,所以無法使用,僅做為範例用
  153.     }
  154.  
  155.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  156.     # - Item Type Settings -
  157.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  158.     # These arrays adjusts and shows the various item types shown for Items,
  159.     # Weapons, and Armours. Note that when using :category symbols, the
  160.     # specific category shown will be equal to the text used for the Display
  161.     # and the included item must contain a category equal to the Display name.
  162.     #
  163.     ###########################################################################
  164.     # - 物品類形設定 -
  165.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  166.     # 1.插入『ITEM_TYPES』  中,將可以調整物品項子選單的順序、增減、名稱
  167.     # 2.插入『WEAPON_TYPES』中,將可以調整武器項子選單的順序、增減、名稱
  168.     # 3.插入『ITEM_TYPES』  中,將可以調整護甲項子選單的順序、增減、名稱
  169.     #
  170.     # 格式
  171.     # [選項變數,"顯示名稱"],
  172.     #
  173.     # *變數名稱,可在物品、武器、護甲數據庫中添加相關備註,來做到分類的效果
  174.     #
  175.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  176.     ITEM_TYPES =[
  177.       [     :all,       "全部"],
  178.       [   :other,       "其他"],
  179.     ]
  180.  
  181.     WEAPON_TYPES =[
  182.       [     :all,       "全部"],
  183.       [   :other,       "其他"],
  184.     ]
  185.  
  186.     ARMOUR_TYPES =[
  187.       [     :all,       "全部"],
  188.       [   :other,       "其他"],
  189.     ]
  190.  
  191.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  192.     # - Item Status Settings -
  193.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  194.     # The item status window displays information about the item in detail.
  195.     # Adjust the settings below to change the way the status window appears.
  196.     #
  197.     ###########################################################################
  198.     # - 物品狀態欄設定 -
  199.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  200.     # 用來調整物品狀態欄位中的『文本說明、字體大小』
  201.     #
  202.     # STATUS_FONT_SIZE = 20        #設定字形大小
  203.     # MAX_ICONS_DRAWN  = 10        #設定狀態顯示最大數量
  204.     #
  205.     # :empty      => "---",        #空白     文本
  206.     # :hp_recover => "HP回復",     #HP回復   文本
  207.     # :mp_recover => "MP回復",     #MP回復   文本
  208.     # :tp_recover => "TP回復",     #TP回復   文本
  209.     # :tp_gain    => "TP增益",     #TP增益   文本
  210.     # :applies    => "增益BUFF",   #增益BUFF 文本
  211.     # :removes    => "消除BUFF",   #消除BUFF 文本
  212.     #
  213.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  214.     STATUS_FONT_SIZE = 20
  215.     MAX_ICONS_DRAWN  = 10
  216.  
  217.     VOCAB_STATUS ={
  218.       :empty      => "---",
  219.       :hp_recover => "HP回復",
  220.       :mp_recover => "MP回復",
  221.       :tp_recover => "TP回復",
  222.       :tp_gain    => "TP增益",
  223.       :applies    => "增益BUFF",
  224.       :removes    => "消除BUFF",
  225.     }
  226.  
  227.   end
  228. end
  229.  
  230. #==============================================================================
  231. # ▼ Editting anything past this point may potentially result in causing
  232. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  233. # halitosis so edit at your own risk.
  234. #
  235. # ▼以下為腳本源代碼,強烈建議不要自行更改,否則出現:
  236. #   身體不識、腦袋爆炸、電腦報銷、生活不美滿,一概不負責!
  237. #
  238. #==============================================================================
  239.  
  240. module YEA
  241.   module REGEXP
  242.   module BASEITEM
  243.  
  244.     CATEGORY = /<(?:CATEGORIES|category):[ ](.*)>/i
  245.     IMAGE    = /<(?:IMAGE|image):[ ](.*)>/i
  246.  
  247.   end # BASEITEM
  248.   end # REGEXP
  249. end # YEA
  250.  
  251. #==============================================================================
  252. # ■ Numeric
  253. #==============================================================================
  254.  
  255. class Numeric
  256.  
  257.   #--------------------------------------------------------------------------
  258.   # new method: group_digits
  259.   #--------------------------------------------------------------------------
  260.   unless $imported["YEA-CoreEngine"]
  261.   def group; return self.to_s; end
  262.   end # $imported["YEA-CoreEngine"]
  263.  
  264. end # Numeric
  265.  
  266. #==============================================================================
  267. # ■ Vocab
  268. #==============================================================================
  269.  
  270. module Vocab
  271.  
  272.   #--------------------------------------------------------------------------
  273.   # new method: self.item_status
  274.   #--------------------------------------------------------------------------
  275.   def self.item_status(type)
  276.     return YEA::ITEM::VOCAB_STATUS[type]
  277.   end
  278.  
  279. end # Vocab
  280.  
  281. #==============================================================================
  282. # ■ DataManager
  283. #==============================================================================
  284.  
  285. module DataManager
  286.  
  287.   #--------------------------------------------------------------------------
  288.   # alias method: load_database
  289.   #--------------------------------------------------------------------------
  290.   class <<self; alias load_database_aim load_database; end
  291.   def self.load_database
  292.     load_database_aim
  293.     load_notetags_aim
  294.   end
  295.  
  296.   #--------------------------------------------------------------------------
  297.   # new method: load_notetags_aim
  298.   #--------------------------------------------------------------------------
  299.   def self.load_notetags_aim
  300.     groups = [$data_items, $data_weapons, $data_armors]
  301.     for group in groups
  302.       for obj in group
  303.         next if obj.nil?
  304.         obj.load_notetags_aim
  305.       end
  306.     end
  307.   end
  308.  
  309. end # DataManager
  310.  
  311. #==============================================================================
  312. # ■ RPG::BaseItem
  313. #==============================================================================
  314.  
  315. class RPG::BaseItem
  316.  
  317.   #--------------------------------------------------------------------------
  318.   # public instance variables
  319.   #--------------------------------------------------------------------------
  320.   attr_accessor :category
  321.   attr_accessor :image
  322.  
  323.   #--------------------------------------------------------------------------
  324.   # common cache: load_notetags_aim
  325.   #--------------------------------------------------------------------------
  326.   def load_notetags_aim
  327.     @category = []
  328.     #---
  329.     self.note.split(/[\r\n]+/).each { |line|
  330.       case line
  331.       #---
  332.       when YEA::REGEXP::BASEITEM::CATEGORY
  333.         @category.push($1.upcase.to_s)
  334.       when YEA::REGEXP::BASEITEM::IMAGE
  335.         @image = $1.to_s
  336.       end
  337.     } # self.note.split
  338.     #---
  339.   end
  340.  
  341. end # RPG::BaseItem
  342.  
  343. #==============================================================================
  344. # ■ Game_Temp
  345. #==============================================================================
  346.  
  347. class Game_Temp
  348.  
  349.   #--------------------------------------------------------------------------
  350.   # public instance variables
  351.   #--------------------------------------------------------------------------
  352.   attr_accessor :scene_item_index
  353.   attr_accessor :scene_item_oy
  354.  
  355. end # Game_Temp
  356.  
  357. #==============================================================================
  358. # ■ Window_ItemList
  359. #==============================================================================
  360.  
  361. class Window_ItemList < Window_Selectable
  362.  
  363.   #--------------------------------------------------------------------------
  364.   # overwrite method: draw_item
  365.   #--------------------------------------------------------------------------
  366.   def draw_item(index)
  367.     item = @data[index]
  368.     return if item.nil?
  369.     rect = item_rect(index)
  370.     rect.width -= 4
  371.     draw_item_name(item, rect.x, rect.y, enable?(item), rect.width - 24)
  372.     draw_item_number(rect, item)
  373.   end
  374.  
  375. end # Window_ItemList
  376.  
  377. #==============================================================================
  378. # ■ Window_ItemCommand
  379. #==============================================================================
  380.  
  381. class Window_ItemCommand < Window_Command
  382.  
  383.   #--------------------------------------------------------------------------
  384.   # public instance variables
  385.   #--------------------------------------------------------------------------
  386.   attr_reader   :item_window
  387.  
  388.   #--------------------------------------------------------------------------
  389.   # initialize
  390.   #--------------------------------------------------------------------------
  391.   def initialize(x, y)
  392.     super(x, y)
  393.   end
  394.  
  395.   #--------------------------------------------------------------------------
  396.   # window_width
  397.   #--------------------------------------------------------------------------
  398.   def window_width; return 160; end
  399.  
  400.   #--------------------------------------------------------------------------
  401.   # visible_line_number
  402.   #--------------------------------------------------------------------------
  403.   def visible_line_number; return 4; end
  404.  
  405.   #--------------------------------------------------------------------------
  406.   # process_ok
  407.   #--------------------------------------------------------------------------
  408.   def process_ok
  409.     $game_temp.scene_item_index = index
  410.     $game_temp.scene_item_oy = self.oy
  411.     super
  412.   end
  413.  
  414.   #--------------------------------------------------------------------------
  415.   # make_command_list
  416.   #--------------------------------------------------------------------------
  417.   def make_command_list
  418.     for command in YEA::ITEM::COMMANDS
  419.       case command
  420.       #--- Default Commands ---
  421.       when :item
  422.         add_command(Vocab::item, :item)
  423.       when :weapon
  424.         add_command(Vocab::weapon, :weapon)
  425.       when :armor
  426.         add_command(Vocab::armor, :armor)
  427.       when :key_item
  428.         add_command(Vocab::key_item, :key_item)
  429.       #--- Imported ---
  430.       when :gogototori
  431.         next unless $imported["KRX-AlchemicSynthesis"]
  432.         process_custom_command(command)
  433.       #--- Custom Commands ---
  434.       else
  435.         process_custom_command(command)
  436.       end
  437.     end
  438.   end
  439.  
  440.   #--------------------------------------------------------------------------
  441.   # process_custom_command
  442.   #--------------------------------------------------------------------------
  443.   def process_custom_command(command)
  444.     return unless YEA::ITEM::CUSTOM_ITEM_COMMANDS.include?(command)
  445.     show = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][2]
  446.     continue = show <= 0 ? true : $game_switches[show]
  447.     return unless continue
  448.     text = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][0]
  449.     switch = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][1]
  450.     enabled = switch <= 0 ? true : $game_switches[switch]
  451.     add_command(text, command, enabled)
  452.   end
  453.  
  454.   #--------------------------------------------------------------------------
  455.   # update
  456.   #--------------------------------------------------------------------------
  457.   def update
  458.     super
  459.     return unless self.active
  460.     @item_window.category = current_symbol if @item_window
  461.   end
  462.  
  463.   #--------------------------------------------------------------------------
  464.   # item_window=
  465.   #--------------------------------------------------------------------------
  466.   def item_window=(item_window)
  467.     @item_window = item_window
  468.     update
  469.   end
  470.  
  471. end # Window_ItemCommand
  472.  
  473. #==============================================================================
  474. # ■ Window_ItemType
  475. #==============================================================================
  476.  
  477. class Window_ItemType < Window_Command
  478.  
  479.   #--------------------------------------------------------------------------
  480.   # public instance variables
  481.   #--------------------------------------------------------------------------
  482.   attr_reader   :item_window
  483.  
  484.   #--------------------------------------------------------------------------
  485.   # initialize
  486.   #--------------------------------------------------------------------------
  487.   def initialize(x, y)
  488.     super(x, y)
  489.     deactivate
  490.     @type = nil
  491.   end
  492.  
  493.   #--------------------------------------------------------------------------
  494.   # window_width
  495.   #--------------------------------------------------------------------------
  496.   def window_width; return 160; end
  497.  
  498.   #--------------------------------------------------------------------------
  499.   # visible_line_number
  500.   #--------------------------------------------------------------------------
  501.   def visible_line_number; return 4; end
  502.  
  503.   #--------------------------------------------------------------------------
  504.   # reveal
  505.   #--------------------------------------------------------------------------
  506.   def reveal(type)
  507.     @type = type
  508.     refresh
  509.     activate
  510.     select(0)
  511.   end
  512.  
  513.   #--------------------------------------------------------------------------
  514.   # make_command_list
  515.   #--------------------------------------------------------------------------
  516.   def make_command_list
  517.     return if @type.nil?
  518.     #---
  519.     case @type
  520.     when :item
  521.       commands = YEA::ITEM::ITEM_TYPES
  522.     when :weapon
  523.       commands = YEA::ITEM::WEAPON_TYPES
  524.     else
  525.       commands = YEA::ITEM::ARMOUR_TYPES
  526.     end
  527.     #---
  528.     for command in commands
  529.       case command[0]
  530.       #---
  531.       when :types
  532.         case @type
  533.         when :weapon
  534.           for i in 1...$data_system.weapon_types.size
  535.             name = $data_system.weapon_types[i]
  536.             add_command(name, :w_type, true, i)
  537.           end
  538.         else
  539.           for i in 1...$data_system.armor_types.size
  540.             name = $data_system.armor_types[i]
  541.             add_command(name, :a_type, true, i)
  542.           end
  543.         end
  544.       #---
  545.       when :slots
  546.         if $imported["YEA-AceEquipEngine"]
  547.           maximum = 1
  548.           for key in YEA::EQUIP::TYPES
  549.             maximum = [maximum, key[0]].max
  550.           end
  551.         else
  552.           maximum = 4
  553.         end
  554.         for i in 1..maximum
  555.           name = Vocab::etype(i)
  556.           add_command(name, :e_type, true, i) if name != ""
  557.         end
  558.       #---
  559.       else
  560.         add_command(command[1], command[0], true, @type)
  561.       end
  562.     end
  563.   end
  564.  
  565.   #--------------------------------------------------------------------------
  566.   # update
  567.   #--------------------------------------------------------------------------
  568.   def update
  569.     super
  570.     return unless self.active
  571.     @item_window.category = current_symbol if @item_window
  572.   end
  573.  
  574.   #--------------------------------------------------------------------------
  575.   # item_window=
  576.   #--------------------------------------------------------------------------
  577.   def item_window=(item_window)
  578.     @item_window = item_window
  579.     update
  580.   end
  581.  
  582. end # Window_ItemType
  583.  
  584. #==============================================================================
  585. # ■ Window_ItemList
  586. #==============================================================================
  587.  
  588. class Window_ItemList < Window_Selectable
  589.  
  590.   #--------------------------------------------------------------------------
  591.   # alias method: initialize
  592.   #--------------------------------------------------------------------------
  593.   alias window_itemlist_initialize_aim initialize
  594.   def initialize(dx, dy, dw, dh)
  595.     window_itemlist_initialize_aim(dx, dy, dw, dh)
  596.     @ext = :none
  597.     @name = ""
  598.   end
  599.  
  600.   #--------------------------------------------------------------------------
  601.   # alias method: category=
  602.   #--------------------------------------------------------------------------
  603.   alias window_itemlist_category_aim category=
  604.   def category=(category)
  605.     if @types_window.nil?
  606.       window_itemlist_category_aim(category)
  607.     else
  608.       return unless update_types?(category)
  609.       @category = category
  610.       if @types_window.active
  611.         @name = @types_window.current_data[:name]
  612.         @ext = @types_window.current_ext
  613.       end
  614.       refresh
  615.       self.oy = 0
  616.     end
  617.   end
  618.  
  619.   #--------------------------------------------------------------------------
  620.   # new method: update_types?
  621.   #--------------------------------------------------------------------------
  622.   def update_types?(category)
  623.     return true if @category != category
  624.     return false unless @types_window.active
  625.     if category == :category
  626.       return @name != @types_window.current_data[:name]
  627.     end
  628.     return @ext != @types_window.current_ext
  629.   end
  630.  
  631.   #--------------------------------------------------------------------------
  632.   # new method: types_window=
  633.   #--------------------------------------------------------------------------
  634.   def types_window=(window)
  635.     @types_window = window
  636.   end
  637.  
  638.   #--------------------------------------------------------------------------
  639.   # alias method: include?
  640.   #--------------------------------------------------------------------------
  641.   alias window_itemlist_include_aim include?
  642.   def include?(item)
  643.     if @types_window.nil?
  644.       return window_itemlist_include_aim(item)
  645.     else
  646.       return ace_item_menu_include?(item)
  647.     end
  648.   end
  649.  
  650.   #--------------------------------------------------------------------------
  651.   # new method: ace_item_menu_include?
  652.   #--------------------------------------------------------------------------
  653.   def ace_item_menu_include?(item)
  654.     case @category
  655.     #---
  656.     when :field
  657.       return false unless item.is_a?(RPG::Item)
  658.       return item.menu_ok?
  659.     when :battle
  660.       return false unless item.is_a?(RPG::Item)
  661.       return item.battle_ok?
  662.     #---
  663.     when :w_type
  664.       return false unless item.is_a?(RPG::Weapon)
  665.       return item.wtype_id == @types_window.current_ext
  666.     when :a_type
  667.       return false unless item.is_a?(RPG::Armor)
  668.       return item.atype_id == @types_window.current_ext
  669.     when :e_type
  670.       return false unless item.is_a?(RPG::Armor)
  671.       return item.etype_id == @types_window.current_ext
  672.     #---
  673.     when :all
  674.       case @types_window.current_ext
  675.       when :item
  676.         return item.is_a?(RPG::Item)
  677.       when :weapon
  678.         return item.is_a?(RPG::Weapon)
  679.       else
  680.         return item.is_a?(RPG::Armor)
  681.       end
  682.     #---
  683.     when :category
  684.       case @types_window.current_ext
  685.       when :item
  686.         return false unless item.is_a?(RPG::Item)
  687.       when :weapon
  688.         return false unless item.is_a?(RPG::Weapon)
  689.       else
  690.         return false unless item.is_a?(RPG::Armor)
  691.       end
  692.       return item.category.include?(@types_window.current_data[:name].upcase)
  693.     #---
  694.     else
  695.       return window_itemlist_include_aim(item)
  696.     end
  697.   end
  698.  
  699. end # Window_ItemList
  700.  
  701. #==============================================================================
  702. # ■ Window_ItemStatus
  703. #==============================================================================
  704.  
  705. class Window_ItemStatus < Window_Base
  706.  
  707.   #--------------------------------------------------------------------------
  708.   # initialize
  709.   #--------------------------------------------------------------------------
  710.   def initialize(dx, dy, item_window)
  711.     super(dx, dy, Graphics.width - dx, fitting_height(4))
  712.     @item_window = item_window
  713.     @item = nil
  714.     refresh
  715.   end
  716.  
  717.   #--------------------------------------------------------------------------
  718.   # update
  719.   #--------------------------------------------------------------------------
  720.   def update
  721.     super
  722.     update_item(@item_window.item)
  723.   end
  724.  
  725.   #--------------------------------------------------------------------------
  726.   # update_item
  727.   #--------------------------------------------------------------------------
  728.   def update_item(item)
  729.     return if @item == item
  730.     @item = item
  731.     refresh
  732.   end
  733.  
  734.   #--------------------------------------------------------------------------
  735.   # refresh
  736.   #--------------------------------------------------------------------------
  737.   def refresh
  738.     contents.clear
  739.     reset_font_settings
  740.     return draw_empty if @item.nil?
  741.     contents.font.size = YEA::ITEM::STATUS_FONT_SIZE
  742.     draw_item_image
  743.     draw_item_stats
  744.     draw_item_effects
  745.   end
  746.  
  747.   #--------------------------------------------------------------------------
  748.   # draw_empty
  749.   #--------------------------------------------------------------------------
  750.   def draw_empty
  751.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  752.     rect = Rect.new(1, 1, 94, 94)
  753.     contents.fill_rect(rect, colour)
  754.     dx = 96; dy = 0
  755.     dw = (contents.width - 96) / 2
  756.     for i in 0...8
  757.       draw_background_box(dx, dy, dw)
  758.       dx = dx >= 96 + dw ? 96 : 96 + dw
  759.       dy += line_height if dx == 96
  760.     end
  761.   end
  762.  
  763.   #--------------------------------------------------------------------------
  764.   # draw_background_box
  765.   #--------------------------------------------------------------------------
  766.   def draw_background_box(dx, dy, dw)
  767.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  768.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  769.     contents.fill_rect(rect, colour)
  770.   end
  771.  
  772.   #--------------------------------------------------------------------------
  773.   # draw_item_image
  774.   #--------------------------------------------------------------------------
  775.   def draw_item_image
  776.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  777.     rect = Rect.new(1, 1, 94, 94)
  778.     contents.fill_rect(rect, colour)
  779.     if @item.image.nil?
  780.       icon_index = @item.icon_index
  781.       bitmap = Cache.system("Iconset")
  782.       rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  783.       target = Rect.new(0, 0, 96, 96)
  784.       contents.stretch_blt(target, bitmap, rect)
  785.     else
  786.       bitmap = Cache.picture(@item.image)
  787.       contents.blt(0, 0, bitmap, bitmap.rect, 255)
  788.     end
  789.   end
  790.  
  791.   #--------------------------------------------------------------------------
  792.   # draw_item_stats
  793.   #--------------------------------------------------------------------------
  794.   def draw_item_stats
  795.     return unless @item.is_a?(RPG::Weapon) || @item.is_a?(RPG::Armor)
  796.     dx = 96; dy = 0
  797.     dw = (contents.width - 96) / 2
  798.     for i in 0...8
  799.       draw_equip_param(i, dx, dy, dw)
  800.       dx = dx >= 96 + dw ? 96 : 96 + dw
  801.       dy += line_height if dx == 96
  802.     end
  803.   end
  804.  
  805.   #--------------------------------------------------------------------------
  806.   # draw_equip_param
  807.   #--------------------------------------------------------------------------
  808.   def draw_equip_param(param_id, dx, dy, dw)
  809.     draw_background_box(dx, dy, dw)
  810.     change_color(system_color)
  811.     draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
  812.     if $imported["YEA-EquipDynamicStats"]
  813.       draw_percentage_param(param_id, dx, dy, dw)
  814.     else
  815.       draw_set_param(param_id, dx, dy, dw)
  816.     end
  817.   end
  818.  
  819.   #--------------------------------------------------------------------------
  820.   # draw_percentage_param
  821.   #--------------------------------------------------------------------------
  822.   def draw_percentage_param(param_id, dx, dy, dw)
  823.     if @item.per_params[param_id] != 0 && @item.params[param_id] != 0
  824.       text = draw_set_param(param_id, dx, dy, dw)
  825.       dw -= text_size(text).width
  826.       draw_percent_param(param_id, dx, dy, dw)
  827.     elsif @item.per_params[param_id] != 0 && @item.params[param_id] == 0
  828.       draw_percent_param(param_id, dx, dy, dw)
  829.     else
  830.       draw_set_param(param_id, dx, dy, dw)
  831.     end
  832.   end
  833.  
  834.   #--------------------------------------------------------------------------
  835.   # draw_set_param
  836.   #--------------------------------------------------------------------------
  837.   def draw_set_param(param_id, dx, dy, dw)
  838.     value = @item.params[param_id]
  839.     if $imported["YEA-EquipDynamicStats"] && @item.var_params[param_id] > 0
  840.       value += $game_variables[@item.var_params[param_id]] rescue 0
  841.     end
  842.     change_color(param_change_color(value), value != 0)
  843.     text = value.group
  844.     text = "+" + text if value > 0
  845.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  846.     return text
  847.   end
  848.  
  849.   #--------------------------------------------------------------------------
  850.   # draw_percent_param
  851.   #--------------------------------------------------------------------------
  852.   def draw_percent_param(param_id, dx, dy, dw)
  853.     value = @item.per_params[param_id]
  854.     change_color(param_change_color(value))
  855.     text = (@item.per_params[param_id] * 100).to_i.group + "%"
  856.     text = "+" + text if @item.per_params[param_id] > 0
  857.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  858.     return text
  859.   end
  860.  
  861.   #--------------------------------------------------------------------------
  862.   # draw_item_effects
  863.   #--------------------------------------------------------------------------
  864.   def draw_item_effects
  865.     return unless @item.is_a?(RPG::Item)
  866.     dx = 96; dy = 0
  867.     dw = (contents.width - 96) / 2
  868.     draw_hp_recover(dx, dy + line_height * 0, dw)
  869.     draw_mp_recover(dx, dy + line_height * 1, dw)
  870.     draw_tp_recover(dx + dw, dy + line_height * 0, dw)
  871.     draw_tp_gain(dx + dw, dy + line_height * 1, dw)
  872.     dw = contents.width - 96
  873.     draw_applies(dx, dy + line_height * 2, dw)
  874.     draw_removes(dx, dy + line_height * 3, dw)
  875.   end
  876.  
  877.   #--------------------------------------------------------------------------
  878.   # draw_hp_recover
  879.   #--------------------------------------------------------------------------
  880.   def draw_hp_recover(dx, dy, dw)
  881.     draw_background_box(dx, dy, dw)
  882.     change_color(system_color)
  883.     draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:hp_recover))
  884.     per = 0
  885.     set = 0
  886.     for effect in @item.effects
  887.       next unless effect.code == 11
  888.       per += (effect.value1 * 100).to_i
  889.       set += effect.value2.to_i
  890.     end
  891.     if per != 0 && set != 0
  892.       change_color(param_change_color(set))
  893.       text = set > 0 ? sprintf("+%s", set.group) : set.group
  894.       draw_text(dx+4, dy, dw-8, line_height, text, 2)
  895.       dw -= text_size(text).width
  896.       change_color(param_change_color(per))
  897.       text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
  898.       draw_text(dx+4, dy, dw-8, line_height, text, 2)
  899.       return
  900.     elsif per != 0
  901.       change_color(param_change_color(per))
  902.       text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
  903.     elsif set != 0
  904.       change_color(param_change_color(set))
  905.       text = set > 0 ? sprintf("+%s", set.group) : set.group
  906.     else
  907.       change_color(normal_color, false)
  908.       text = Vocab::item_status(:empty)
  909.     end
  910.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  911.   end
  912.  
  913.   #--------------------------------------------------------------------------
  914.   # draw_mp_recover
  915.   #--------------------------------------------------------------------------
  916.   def draw_mp_recover(dx, dy, dw)
  917.     draw_background_box(dx, dy, dw)
  918.     change_color(system_color)
  919.     draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:mp_recover))
  920.     per = 0
  921.     set = 0
  922.     for effect in @item.effects
  923.       next unless effect.code == 12
  924.       per += (effect.value1 * 100).to_i
  925.       set += effect.value2.to_i
  926.     end
  927.     if per != 0 && set != 0
  928.       change_color(param_change_color(set))
  929.       text = set > 0 ? sprintf("+%s", set.group) : set.group
  930.       draw_text(dx+4, dy, dw-8, line_height, text, 2)
  931.       dw -= text_size(text).width
  932.       change_color(param_change_color(per))
  933.       text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
  934.       draw_text(dx+4, dy, dw-8, line_height, text, 2)
  935.       return
  936.     elsif per != 0
  937.       change_color(param_change_color(per))
  938.       text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
  939.     elsif set != 0
  940.       change_color(param_change_color(set))
  941.       text = set > 0 ? sprintf("+%s", set.group) : set.group
  942.     else
  943.       change_color(normal_color, false)
  944.       text = Vocab::item_status(:empty)
  945.     end
  946.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  947.   end
  948.  
  949.   #--------------------------------------------------------------------------
  950.   # draw_tp_recover
  951.   #--------------------------------------------------------------------------
  952.   def draw_tp_recover(dx, dy, dw)
  953.     draw_background_box(dx, dy, dw)
  954.     change_color(system_color)
  955.     draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:tp_recover))
  956.     set = 0
  957.     for effect in @item.effects
  958.       next unless effect.code == 13
  959.       set += effect.value1.to_i
  960.     end
  961.     if set != 0
  962.       change_color(param_change_color(set))
  963.       text = set > 0 ? sprintf("+%s", set.group) : set.group
  964.     else
  965.       change_color(normal_color, false)
  966.       text = Vocab::item_status(:empty)
  967.     end
  968.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  969.   end
  970.  
  971.   #--------------------------------------------------------------------------
  972.   # draw_tp_gain
  973.   #--------------------------------------------------------------------------
  974.   def draw_tp_gain(dx, dy, dw)
  975.     draw_background_box(dx, dy, dw)
  976.     change_color(system_color)
  977.     draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:tp_gain))
  978.     set = @item.tp_gain
  979.     if set != 0
  980.       change_color(param_change_color(set))
  981.       text = set > 0 ? sprintf("+%s", set.group) : set.group
  982.     else
  983.       change_color(normal_color, false)
  984.       text = Vocab::item_status(:empty)
  985.     end
  986.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  987.   end
  988.  
  989.   #--------------------------------------------------------------------------
  990.   # draw_applies
  991.   #--------------------------------------------------------------------------
  992.   def draw_applies(dx, dy, dw)
  993.     draw_background_box(dx, dy, dw)
  994.     change_color(system_color)
  995.     draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:applies))
  996.     icons = []
  997.     for effect in @item.effects
  998.       case effect.code
  999.       when 21
  1000.         next unless effect.value1 > 0
  1001.         next if $data_states[effect.value1].nil?
  1002.         icons.push($data_states[effect.data_id].icon_index)
  1003.       when 31
  1004.         icons.push($game_actors[1].buff_icon_index(1, effect.data_id))
  1005.       when 32
  1006.         icons.push($game_actors[1].buff_icon_index(-1, effect.data_id))
  1007.       end
  1008.       icons.delete(0)
  1009.       break if icons.size >= YEA::ITEM::MAX_ICONS_DRAWN
  1010.     end
  1011.     draw_icons(dx, dy, dw, icons)
  1012.   end
  1013.  
  1014.   #--------------------------------------------------------------------------
  1015.   # draw_removes
  1016.   #--------------------------------------------------------------------------
  1017.   def draw_removes(dx, dy, dw)
  1018.     draw_background_box(dx, dy, dw)
  1019.     change_color(system_color)
  1020.     draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:removes))
  1021.     icons = []
  1022.     for effect in @item.effects
  1023.       case effect.code
  1024.       when 22
  1025.         next unless effect.value1 > 0
  1026.         next if $data_states[effect.value1].nil?
  1027.         icons.push($data_states[effect.data_id].icon_index)
  1028.       when 33
  1029.         icons.push($game_actors[1].buff_icon_index(1, effect.data_id))
  1030.       when 34
  1031.         icons.push($game_actors[1].buff_icon_index(-1, effect.data_id))
  1032.       end
  1033.       icons.delete(0)
  1034.       break if icons.size >= YEA::ITEM::MAX_ICONS_DRAWN
  1035.     end
  1036.     draw_icons(dx, dy, dw, icons)
  1037.   end
  1038.  
  1039.   #--------------------------------------------------------------------------
  1040.   # draw_icons
  1041.   #--------------------------------------------------------------------------
  1042.   def draw_icons(dx, dy, dw, icons)
  1043.     dx += dw - 4
  1044.     dx -= icons.size * 24
  1045.     for icon_id in icons
  1046.       draw_icon(icon_id, dx, dy)
  1047.       dx += 24
  1048.     end
  1049.     if icons.size == 0
  1050.       change_color(normal_color, false)
  1051.       text = Vocab::item_status(:empty)
  1052.       draw_text(4, dy, contents.width-8, line_height, text, 2)
  1053.     end
  1054.   end
  1055.  
  1056. end # Window_ItemStatus
  1057.  
  1058. #==============================================================================
  1059. # ■ Scene_Item
  1060. #==============================================================================
  1061.  
  1062. class Scene_Item < Scene_ItemBase
  1063.  
  1064.   #--------------------------------------------------------------------------
  1065.   # alias method: start
  1066.   #--------------------------------------------------------------------------
  1067.   alias scene_item_start_aim start
  1068.   def start
  1069.     scene_item_start_aim
  1070.     create_types_window
  1071.     create_status_window
  1072.     relocate_windows
  1073.   end
  1074.  
  1075.   #--------------------------------------------------------------------------
  1076.   # overwrite method: return_scene
  1077.   #--------------------------------------------------------------------------
  1078.   def return_scene
  1079.     $game_temp.scene_item_index = nil
  1080.     $game_temp.scene_item_oy = nil
  1081.     super
  1082.   end
  1083.  
  1084.   #--------------------------------------------------------------------------
  1085.   # overwrite method: create_category_window
  1086.   #--------------------------------------------------------------------------
  1087.   def create_category_window
  1088.     wy = @help_window.height
  1089.     @category_window = Window_ItemCommand.new(0, wy)
  1090.     @category_window.viewport = @viewport
  1091.     @category_window.help_window = @help_window
  1092.     @category_window.y = @help_window.height
  1093.     if !$game_temp.scene_item_index.nil?
  1094.       @category_window.select($game_temp.scene_item_index)
  1095.       @category_window.oy = $game_temp.scene_item_oy
  1096.     end
  1097.     $game_temp.scene_item_index = nil
  1098.     $game_temp.scene_item_oy = nil
  1099.     @category_window.set_handler(:ok, method(:on_category_ok))
  1100.     @category_window.set_handler(:cancel, method(:return_scene))
  1101.     @category_window.set_handler(:item, method(:open_types))
  1102.     @category_window.set_handler(:weapon, method(:open_types))
  1103.     @category_window.set_handler(:armor, method(:open_types))
  1104.     process_custom_item_commands
  1105.   end
  1106.  
  1107.   #--------------------------------------------------------------------------
  1108.   # new method: process_custom_item_commands
  1109.   #--------------------------------------------------------------------------
  1110.   def process_custom_item_commands
  1111.     for command in YEA::ITEM::COMMANDS
  1112.       next unless YEA::ITEM::CUSTOM_ITEM_COMMANDS.include?(command)
  1113.       called_method = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][3]
  1114.       @category_window.set_handler(command, method(called_method))
  1115.     end
  1116.   end
  1117.  
  1118.   #--------------------------------------------------------------------------
  1119.   # new method: create_types_window
  1120.   #--------------------------------------------------------------------------
  1121.   def create_types_window
  1122.     wy = @category_window.y
  1123.     @types_window = Window_ItemType.new(Graphics.width, wy)
  1124.     @types_window.viewport = @viewport
  1125.     @types_window.help_window = @help_window
  1126.     @types_window.y = @help_window.height
  1127.     @types_window.item_window = @item_window
  1128.     @item_window.types_window = @types_window
  1129.     @types_window.set_handler(:ok, method(:on_types_ok))
  1130.     @types_window.set_handler(:cancel, method(:on_types_cancel))
  1131.   end
  1132.  
  1133.   #--------------------------------------------------------------------------
  1134.   # new method: create_status_window
  1135.   #--------------------------------------------------------------------------
  1136.   def create_status_window
  1137.     wx = @category_window.width
  1138.     wy = @category_window.y
  1139.     @status_window = Window_ItemStatus.new(wx, wy, @item_window)
  1140.     @status_window.viewport = @viewport
  1141.   end
  1142.  
  1143.   #--------------------------------------------------------------------------
  1144.   # new method: relocate_windows
  1145.   #--------------------------------------------------------------------------
  1146.   def relocate_windows
  1147.     return unless $imported["YEA-AceMenuEngine"]
  1148.     case Menu.help_window_location
  1149.     when 0 # Top
  1150.       @help_window.y = 0
  1151.       @category_window.y = @help_window.height
  1152.       @item_window.y = @category_window.y + @category_window.height
  1153.     when 1 # Middle
  1154.       @category_window.y = 0
  1155.       @help_window.y = @category_window.height
  1156.       @item_window.y = @help_window.y + @help_window.height
  1157.     else # Bottom
  1158.       @category_window.y = 0
  1159.       @item_window.y = @category_window.height
  1160.       @help_window.y = @item_window.y + @item_window.height
  1161.     end
  1162.     @types_window.y = @category_window.y
  1163.     @status_window.y = @category_window.y
  1164.   end
  1165.  
  1166.   #--------------------------------------------------------------------------
  1167.   # new method: open_categories
  1168.   #--------------------------------------------------------------------------
  1169.   def open_types
  1170.     @category_window.x = Graphics.width
  1171.     @types_window.x = 0
  1172.     @types_window.reveal(@category_window.current_symbol)
  1173.   end
  1174.  
  1175.   #--------------------------------------------------------------------------
  1176.   # new method: on_types_ok
  1177.   #--------------------------------------------------------------------------
  1178.   def on_types_ok
  1179.     @item_window.activate
  1180.     @item_window.select_last
  1181.   end
  1182.  
  1183.   #--------------------------------------------------------------------------
  1184.   # new method: on_types_cancel
  1185.   #--------------------------------------------------------------------------
  1186.   def on_types_cancel
  1187.     @category_window.x = 0
  1188.     @category_window.activate
  1189.     @types_window.unselect
  1190.     @types_window.x = Graphics.width
  1191.   end
  1192.  
  1193.   #--------------------------------------------------------------------------
  1194.   # alias method: on_item_cancel
  1195.   #--------------------------------------------------------------------------
  1196.   alias scene_item_on_item_cancel_aim on_item_cancel
  1197.   def on_item_cancel
  1198.     if @types_window.x <= 0
  1199.       @item_window.unselect
  1200.       @types_window.activate
  1201.     else
  1202.       scene_item_on_item_cancel_aim
  1203.     end
  1204.   end
  1205.  
  1206.   #--------------------------------------------------------------------------
  1207.   # new method: command_totori
  1208.   #--------------------------------------------------------------------------
  1209.   def command_totori
  1210.     SceneManager.call(Scene_Alchemy)
  1211.   end
  1212.  
  1213.   #--------------------------------------------------------------------------
  1214.   # new method: command_name1
  1215.   #--------------------------------------------------------------------------
  1216.   def command_name1
  1217.     # Do nothing.
  1218.   end
  1219.  
  1220.   #--------------------------------------------------------------------------
  1221.   # new method: command_name2
  1222.   #--------------------------------------------------------------------------
  1223.   def command_name2
  1224.     # Do nothing.
  1225.   end
  1226.  
  1227. end # Scene_Item
  1228.  
  1229. #==============================================================================
  1230. #
  1231. # ▼ End of File
  1232. #
  1233. #==============================================================================

点评

上千行的脚本,应该很少会有人耐心帮你弄好。自己动手,丰衣足食= =  发表于 2014-9-10 16:38
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-14 10:13

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表