Advertisement
dsiver144

Untitled

Jul 22nd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.37 KB | None | 0 0
  1. #==============================================================================
  2. #
  3. # ? Yanfly Engine Ace - Ace Menu Engine v1.08
  4. # -- Modified by: Doogy
  5. # -- Last Updated: 2012.01.03
  6. # -- Level: Normal, Hard
  7. # -- Requires: n/a
  8. #
  9. #==============================================================================
  10.  
  11. $imported = {} if $imported.nil?
  12. $imported["YEA-AceMenuEngine"] = true
  13.  
  14. #==============================================================================
  15. # ? Updates
  16. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  17. # 2015.01.17 - Display update MP gauge behave the same way as TP gauge (hidden if no skill use it).
  18. # 2012.01.03 - Compatibility Update: Ace Item Menu
  19. # 2012.01.01 - Compatibility Update: Kread-EX's Synthesis
  20. # - Compatibility Update: Kread-EX's Grathnode Install
  21. # - Compatibility Update: Yami's Slot Battle
  22. # 2011.12.23 - Script efficiency optimized.
  23. # 2011.12.19 - Compatibility Update: Class System
  24. # 2011.12.15 - Updated for better menu MP/TP gauge management.
  25. # 2011.12.13 - Compatibility Update: Ace Equip Engine
  26. # 2011.12.07 - Update to allow for switches to also hide custom commands.
  27. # 2011.12.06 - Started Script and Finished.
  28. #
  29. #==============================================================================
  30. # ? Introduction
  31. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  32. # The menu system in RPG Maker VX Ace is great. However, it lacks the user
  33. # customization that RPG Maker 2003 allowed. With this script, you can add,
  34. # remove, and rearrange menu commands as you see fit. In addition to that, you
  35. # can add in menu commands that lead to common events or even custom commands
  36. # provided through other scripts.
  37. #
  38. # This script also provides window appearance management such as setting almost
  39. # all command windows to be center aligned or changing the position of the
  40. # help window. You can also opt to show the TP Gauge in the main menu as well
  41. # as in the skill menu.
  42. #
  43. #==============================================================================
  44. # ? Instructions
  45. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  46. # To install this script, open up your script editor and copy/paste this script
  47. # to an open slot below ? Materials/?? but above ? Main. Remember to save.
  48. #
  49. # Edit the settings in the module below as you see fit.
  50. #
  51. #==============================================================================
  52. # ? Compatibility
  53. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  54. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  55. # it will run with RPG Maker VX without adjusting.
  56. #
  57. #==============================================================================
  58.  
  59. module YEA
  60. module MENU
  61.  
  62. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  63. # - General Menu Settings -
  64. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  65. # This changes the way menus appear in your game. You can change their
  66. # alignment, and the location of the help window, Note that any non-Yanfly
  67. # Engine Ace scripts may not conform to these menu styles.
  68. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  69. HELP_WINDOW_LOCATION = 0 # 0-Top, 1-Middle, 2-Bottom.
  70. COMMAND_WINDOW_ALIGN = 1 # 0-Left, 1-Middle, 2-Right.
  71.  
  72. # These settings below adjust the visual appearance of the main menu.
  73. # Change the settings as you see fit.
  74. MAIN_MENU_ALIGN = 0 # 0-Left, 1-Middle, 2-Right.
  75. MAIN_MENU_RIGHT = false # false-Left, true-Right.
  76. MAIN_MENU_ROWS = 10 # Maximum number of rows for main menu.
  77. DRAW_TP_GAUGE = true # If true, draws TP in the main menu.
  78.  
  79. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  80. # - Main Menu Settings -
  81. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  82. # These settings adjust the main menu, the order at which commands appear,
  83. # what text is displayed, and what the commands are linked to. Here's a
  84. # list of which commands do what:
  85. #
  86. # -------------------------------------------------------------------------
  87. # :command Description
  88. # -------------------------------------------------------------------------
  89. # :item Opens up the item menu. Default menu item.
  90. # :skill Opens up the skill menu. Default menu item.
  91. # :equip Opens up the equip menu. Default menu item.
  92. # :status Opens up the status menu. Default menu item.
  93. # :formation Lets player manage party. Default menu item.
  94. # :save Opens up the save menu. Default menu item.
  95. # :game_end Opens up the shutdown menu. Default menu item.
  96. #
  97. # :class Requires YEA - Class System
  98. #
  99. # :gogototori Requires Kread-EX's Go Go Totori! Synthesis
  100. # :grathnode Requires Kread-EX's Grathnote Install
  101. # :sslots Requires Yami's YSA - Slot Battle
  102. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  103. COMMANDS =[
  104. :item, # Opens up the item menu. Default menu item.
  105. :dsi_status, # Opens up the status menu. *dsiver144
  106. :biography, # Opens the character biography menu.
  107. # :formation, # Lets player manage party. Default menu item.
  108. # :skill, # Opens up the skill menu. Default menu item.
  109. # :equip, # Opens up the equip menu. Default menu item.
  110. # :class, # Requires YEA - Class System.
  111. # :status, # Opens up the status menu. Default menu item.
  112. # :event_2, # Launches Common Event 2. Common Event Command.
  113. # :debug, # Opens up debug menu. Custom Command.
  114. # :shop, # Opens up a shop to pawn items. Custom Command.
  115. :mail_sys, # Launches Common Event 1. Common Event Command.
  116. :save, # Opens up the save menu. Default menu item.
  117. :game_end, # Opens up the shutdown menu. Default menu item.
  118. ] # Do not remove this.
  119.  
  120. #--------------------------------------------------------------------------
  121. # - Common Event Commands -
  122. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  123. # If you insert one of the following commands into the COMMANDS array, the
  124. # player can trigger a common event to launch. You can disable certain
  125. # commands in the menu by binding them to a switch. If you don't want to
  126. # disable them, set the switch to 0 and it will always be enabled. The
  127. # ShowSwitch will prevent a command from appear if that switch is false.
  128. # Set it to 0 for it to have no impact.
  129. #--------------------------------------------------------------------------
  130. COMMON_EVENT_COMMANDS ={
  131. # :command => ["Display Name", EnableSwitch, ShowSwitch, Event ID],
  132. :mail_sys => [ "Messages", 496, 0, 3],
  133. } # Do not remove this.
  134.  
  135. #--------------------------------------------------------------------------
  136. # - Custom Commands -
  137. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  138. # For those who use scripts that may lead to other menu scenes, use this
  139. # hash to manage custom commands that run specific script calls. You can
  140. # disable certain commands in the menu by binding them to a switch. If you
  141. # don't want to disable them, set the switch to 0. The ShowSwitch will
  142. # prevent a command from appear if that switch is false. Set it to 0 for
  143. # it to have no impact.
  144. #--------------------------------------------------------------------------
  145. CUSTOM_COMMANDS ={
  146. # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
  147. :debug => [ "Debug", 0, 0, :command_debug],
  148. :shop => [ "Shop", 0, 0, :command_shop],
  149. :gogototori => ["Synthesis", 0, 0, :command_totori],
  150. :grathnode => [ "Grathnode", 0, 0, :command_install],
  151. :biography => ["Profile", 0, 0, :command_biography],
  152. :dsi_status => ["Status", 0, 0,:command_status],
  153. } # Do not remove this.
  154.  
  155. end # MENU
  156. end # YEA
  157.  
  158. #==============================================================================
  159. # ? Editting anything past this point may potentially result in causing
  160. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  161. # halitosis so edit at your own risk.
  162. #==============================================================================
  163.  
  164. #==============================================================================
  165. # ヲ Window_MenuCommand
  166. #------------------------------------------------------------------------------
  167. # This class is kept towards the top of the script to provide easier access.
  168. #==============================================================================
  169.  
  170. class Window_MenuCommand < Window_Command
  171.  
  172. #--------------------------------------------------------------------------
  173. # overwrite method: make_command_list
  174. #--------------------------------------------------------------------------
  175. def make_command_list
  176. for command in YEA::MENU::COMMANDS
  177. case command
  178. #--- Default Commands ---
  179. when :item
  180. add_command(Vocab::item, :item, main_commands_enabled)
  181. when :skill
  182. add_command(Vocab::skill, :skill, main_commands_enabled)
  183. when :equip
  184. add_command(Vocab::equip, :equip, main_commands_enabled)
  185. when :status
  186. add_command(Vocab::status, :status, main_commands_enabled)
  187. when :formation
  188. add_formation_command
  189. when :save
  190. add_original_commands
  191. add_save_command
  192. when :game_end
  193. add_game_end_command
  194. #--- Yanfly Engine Ace Commands ---
  195. when :class
  196. next unless $imported["YEA-ClassSystem"]
  197. add_class_command
  198. #--- Imported Commands ---
  199. when :sslots
  200. next unless $imported["YSA-SlotBattle"]
  201. add_sslots_command
  202. when :grathnode
  203. next unless $imported["KRX-GrathnodeInstall"]
  204. process_custom_command(command)
  205. when :gogototori
  206. next unless $imported["KRX-AlchemicSynthesis"]
  207. process_custom_command(command)
  208. #--- Imported Commands ---
  209. else
  210. process_common_event_command(command)
  211. process_custom_command(command)
  212. end
  213. end
  214. end
  215.  
  216. #--------------------------------------------------------------------------
  217. # new method: process_common_event_command
  218. #--------------------------------------------------------------------------
  219. def process_common_event_command(command)
  220. return unless YEA::MENU::COMMON_EVENT_COMMANDS.include?(command)
  221. show = YEA::MENU::COMMON_EVENT_COMMANDS[command][2]
  222. continue = show <= 0 ? true : $game_switches[show]
  223. return unless continue
  224. text = YEA::MENU::COMMON_EVENT_COMMANDS[command][0]
  225. switch = YEA::MENU::COMMON_EVENT_COMMANDS[command][1]
  226. ext = YEA::MENU::COMMON_EVENT_COMMANDS[command][3]
  227. enabled = switch <= 0 ? true : $game_switches[switch]
  228. add_command(text, command, enabled, ext)
  229. end
  230.  
  231. #--------------------------------------------------------------------------
  232. # new method: process_custom_command
  233. #--------------------------------------------------------------------------
  234. def process_custom_command(command)
  235. return unless YEA::MENU::CUSTOM_COMMANDS.include?(command)
  236. show = YEA::MENU::CUSTOM_COMMANDS[command][2]
  237. continue = show <= 0 ? true : $game_switches[show]
  238. return unless continue
  239. text = YEA::MENU::CUSTOM_COMMANDS[command][0]
  240. switch = YEA::MENU::CUSTOM_COMMANDS[command][1]
  241. enabled = switch <= 0 ? true : $game_switches[switch]
  242. add_command(text, command, enabled)
  243. end
  244.  
  245. end # Window_MenuCommand
  246.  
  247. #==============================================================================
  248. # ヲ Menu
  249. #==============================================================================
  250.  
  251. module Menu
  252.  
  253. #--------------------------------------------------------------------------
  254. # self.help_window_location
  255. #--------------------------------------------------------------------------
  256. def self.help_window_location
  257. return YEA::MENU::HELP_WINDOW_LOCATION
  258. end
  259.  
  260. #--------------------------------------------------------------------------
  261. # self.command_window_align
  262. #--------------------------------------------------------------------------
  263. def self.command_window_align
  264. return YEA::MENU::COMMAND_WINDOW_ALIGN
  265. end
  266.  
  267. #--------------------------------------------------------------------------
  268. # self.main_menu_align
  269. #--------------------------------------------------------------------------
  270. def self.main_menu_align
  271. return YEA::MENU::MAIN_MENU_ALIGN
  272. end
  273.  
  274. #--------------------------------------------------------------------------
  275. # self.main_menu_right
  276. #--------------------------------------------------------------------------
  277. def self.main_menu_right
  278. return YEA::MENU::MAIN_MENU_RIGHT
  279. end
  280.  
  281. end # Menu
  282.  
  283. #==============================================================================
  284. # ヲ Game_Actor
  285. #==============================================================================
  286.  
  287. class Game_Actor < Game_Battler
  288.  
  289. #--------------------------------------------------------------------------
  290. # new method: draw_mp?
  291. #--------------------------------------------------------------------------
  292. def draw_mp?
  293. for skill in skills
  294. next unless added_skill_types.include?(skill.stype_id)
  295. return true if skill.mp_cost > 0
  296. end
  297. return false
  298. end
  299.  
  300. #--------------------------------------------------------------------------
  301. # new method: draw_tp?
  302. #--------------------------------------------------------------------------
  303. def draw_tp?
  304. return false unless $data_system.opt_display_tp
  305. for skill in skills
  306. next unless added_skill_types.include?(skill.stype_id)
  307. return true if skill.tp_cost > 0
  308. end
  309. return false
  310. end
  311.  
  312. end # Game_Actor
  313.  
  314. #==============================================================================
  315. # ヲ Window_Base
  316. #==============================================================================
  317.  
  318. class Window_Base < Window
  319.  
  320. #--------------------------------------------------------------------------
  321. # overwrite method: draw_actor_simple_status
  322. #--------------------------------------------------------------------------
  323. def draw_actor_simple_status(actor, dx, dy)
  324. dy -= line_height / 2
  325. draw_actor_name(actor, dx, dy)
  326. draw_actor_level(actor, dx, dy + line_height * 1)
  327. draw_actor_icons(actor, dx, dy + line_height * 2)
  328. dw = contents.width - dx - 124
  329. draw_actor_class(actor, dx + 120, dy, dw)
  330. draw_actor_hp(actor, dx + 120, dy + line_height * 2, dw)
  331. if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?
  332. draw_actor_tp(actor, dx + 120, dy + line_height * 1, dw)
  333. elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?
  334. if $imported["YEA-BattleEngine"]
  335. draw_actor_tp(actor, dx + 120, dy + line_height * 1, dw/2 + 1)
  336. draw_actor_mp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  337. else
  338. draw_actor_mp(actor, dx + 120, dy + line_height * 1, dw/2 + 1)
  339. draw_actor_tp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  340. end
  341. elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_mp?
  342. draw_actor_mp(actor, dx + 120, dy + line_height * 1, dw)
  343. end
  344.  
  345. end
  346.  
  347. end # Window_Base
  348.  
  349. #==============================================================================
  350. # ヲ Window_Command
  351. #==============================================================================
  352.  
  353. class Window_Command < Window_Selectable
  354.  
  355. #--------------------------------------------------------------------------
  356. # overwrite method: alignment
  357. #--------------------------------------------------------------------------
  358. def alignment
  359. return Menu.command_window_align
  360. end
  361.  
  362. end # Window_Command
  363.  
  364. #==============================================================================
  365. # ヲ Window_MenuCommand
  366. #==============================================================================
  367.  
  368. class Window_MenuCommand < Window_Command
  369.  
  370. #--------------------------------------------------------------------------
  371. # alias method: init_command_position
  372. #--------------------------------------------------------------------------
  373. class <<self; alias init_command_position_ame init_command_position; end
  374. def self.init_command_position
  375. init_command_position_ame
  376. @@last_command_oy = nil
  377. end
  378.  
  379. #--------------------------------------------------------------------------
  380. # overwrite method: visible_line_number
  381. #--------------------------------------------------------------------------
  382. def visible_line_number
  383. return [[item_max, YEA::MENU::MAIN_MENU_ROWS].min, 1].max
  384. end
  385.  
  386. #--------------------------------------------------------------------------
  387. # overwrite method: alignment
  388. #--------------------------------------------------------------------------
  389. def alignment
  390. return Menu.main_menu_align
  391. end
  392.  
  393. #--------------------------------------------------------------------------
  394. # alias method: process_ok
  395. #--------------------------------------------------------------------------
  396. alias window_menucommand_process_ok_ame process_ok
  397. def process_ok
  398. @@last_command_oy = self.oy
  399. window_menucommand_process_ok_ame
  400. end
  401.  
  402. #--------------------------------------------------------------------------
  403. # alias method: select_last
  404. #--------------------------------------------------------------------------
  405. alias window_menucommand_select_last_ame select_last
  406. def select_last
  407. window_menucommand_select_last_ame
  408. self.oy = @@last_command_oy unless @@last_command_oy.nil?
  409. @@last_command_oy = nil
  410. end
  411.  
  412. end # Window_MenuCommand
  413.  
  414. #==============================================================================
  415. # ヲ Scene_Menu
  416. #==============================================================================
  417.  
  418. class Scene_Menu < Scene_MenuBase
  419.  
  420. #--------------------------------------------------------------------------
  421. # alias method: start
  422. #--------------------------------------------------------------------------
  423. alias scene_menu_start_ame start
  424. def start
  425. scene_menu_start_ame
  426. relocate_windows
  427. end
  428.  
  429. #--------------------------------------------------------------------------
  430. # new method: relocate_windows
  431. #--------------------------------------------------------------------------
  432. def relocate_windows
  433. return unless Menu.main_menu_right
  434. @command_window.x = Graphics.width - @command_window.width
  435. @gold_window.x = Graphics.width - @gold_window.width
  436. @status_window.x = 0
  437. end
  438.  
  439. end # Scene_Menu
  440.  
  441. #==============================================================================
  442. # ヲ Scene_Item
  443. #==============================================================================
  444.  
  445. class Scene_Item < Scene_ItemBase
  446.  
  447. #--------------------------------------------------------------------------
  448. # alias method: start
  449. #--------------------------------------------------------------------------
  450. alias scene_item_start_ame start
  451. def start
  452. scene_item_start_ame
  453. return if $imported["YEA-ItemMenu"]
  454. relocate_windows
  455. end
  456.  
  457. #--------------------------------------------------------------------------
  458. # new method: relocate_windows
  459. #--------------------------------------------------------------------------
  460. def relocate_windows
  461. case Menu.help_window_location
  462. when 0 # Top
  463. @help_window.y = 0
  464. @category_window.y = @help_window.height
  465. @item_window.y = @category_window.y + @category_window.height
  466. when 1 # Middle
  467. @category_window.y = 0
  468. @help_window.y = @category_window.height
  469. @item_window.y = @help_window.y + @help_window.height
  470. else # Bottom
  471. @category_window.y = 0
  472. @item_window.y = @category_window.height
  473. @help_window.y = @item_window.y + @item_window.height
  474. end
  475. if $imported["YEA-ItemMenu"]
  476. @types_window.y = @category_window.y
  477. @status_window.y = @category_window.y
  478. end
  479. end
  480.  
  481. end # Scene_Item
  482.  
  483. #==============================================================================
  484. # ヲ Scene_Skill
  485. #==============================================================================
  486.  
  487. class Scene_Skill < Scene_ItemBase
  488.  
  489. #--------------------------------------------------------------------------
  490. # alias method: start
  491. #--------------------------------------------------------------------------
  492. alias scene_skill_start_ame start
  493. def start
  494. scene_skill_start_ame
  495. relocate_windows
  496. end
  497.  
  498. #--------------------------------------------------------------------------
  499. # new method: relocate_windows
  500. #--------------------------------------------------------------------------
  501. def relocate_windows
  502. case Menu.help_window_location
  503. when 0 # Top
  504. @help_window.y = 0
  505. @command_window.y = @help_window.height
  506. @status_window.y = @help_window.height
  507. @item_window.y = @status_window.y + @status_window.height
  508. when 1 # Middle
  509. @command_window.y = 0
  510. @status_window.y = 0
  511. @help_window.y = @status_window.y + @status_window.height
  512. @item_window.y = @help_window.y + @help_window.height
  513. else # Bottom
  514. @command_window.y = 0
  515. @status_window.y = 0
  516. @item_window.y = @status_window.y + @status_window.height
  517. @help_window.y = @item_window.y + @item_window.height
  518. end
  519. end
  520.  
  521. end # Scene_Skill
  522.  
  523. #==============================================================================
  524. # ヲ Scene_Equip
  525. #==============================================================================
  526.  
  527. class Scene_Equip < Scene_MenuBase
  528.  
  529. #--------------------------------------------------------------------------
  530. # alias method: start
  531. #--------------------------------------------------------------------------
  532. alias scene_equip_start_ame start
  533. def start
  534. scene_equip_start_ame
  535. relocate_windows
  536. relocate_aee_windows
  537. end
  538.  
  539. #--------------------------------------------------------------------------
  540. # new method: relocate_windows
  541. #--------------------------------------------------------------------------
  542. def relocate_windows
  543. return if $imported["YEA-AceEquipEngine"]
  544. case Menu.help_window_location
  545. when 0 # Top
  546. @help_window.y = 0
  547. @status_window.y = @help_window.height
  548. @command_window.y = @help_window.height
  549. @slot_window.y = @command_window.y + @command_window.height
  550. @item_window.y = @slot_window.y + @slot_window.height
  551. when 1 # Middle
  552. @status_window.y = 0
  553. @command_window.y = 0
  554. @slot_window.y = @command_window.y + @command_window.height
  555. @help_window.y = @slot_window.y + @slot_window.height
  556. @item_window.y = @help_window.y + @help_window.height
  557. else # Bottom
  558. @status_window.y = 0
  559. @command_window.y = 0
  560. @slot_window.y = @command_window.y + @command_window.height
  561. @item_window.y = @slot_window.y + @slot_window.height
  562. @help_window.y = @item_window.y + @item_window.height
  563. end
  564. end
  565.  
  566. #--------------------------------------------------------------------------
  567. # new method: relocate_aee_windows
  568. #--------------------------------------------------------------------------
  569. def relocate_aee_windows
  570. return unless $imported["YEA-AceEquipEngine"]
  571. case Menu.help_window_location
  572. when 0 # Top
  573. @help_window.y = 0
  574. @command_window.y = @help_window.height
  575. @slot_window.y = @command_window.y + @command_window.height
  576. when 1 # Middle
  577. @command_window.y = 0
  578. @help_window.y = @command_window.height
  579. @slot_window.y = @help_window.y + @help_window.height
  580. else # Bottom
  581. @command_window.y = 0
  582. @slot_window.y = @command_window.height
  583. @help_window.y = @slot_window.y + @slot_window.height
  584. end
  585. @actor_window.y = @command_window.y
  586. @item_window.y = @slot_window.y
  587. @status_window.y = @slot_window.y
  588. end
  589.  
  590. end # Scene_Equip
  591.  
  592. #==============================================================================
  593. # ヲ Scene_Menu
  594. #==============================================================================
  595.  
  596. class Scene_Menu < Scene_MenuBase
  597.  
  598. #--------------------------------------------------------------------------
  599. # alias method: create_command_window
  600. #--------------------------------------------------------------------------
  601. alias scene_menu_create_command_window_ame create_command_window
  602. def create_command_window
  603. scene_menu_create_command_window_ame
  604. process_common_event_commands
  605. process_custom_commands
  606. end
  607.  
  608. #--------------------------------------------------------------------------
  609. # new method: process_common_event_commands
  610. #--------------------------------------------------------------------------
  611. def process_common_event_commands
  612. for command in YEA::MENU::COMMANDS
  613. next unless YEA::MENU::COMMON_EVENT_COMMANDS.include?(command)
  614. @command_window.set_handler(command, method(:command_common_event))
  615. end
  616. end
  617.  
  618. #--------------------------------------------------------------------------
  619. # new method: command_common_event
  620. #--------------------------------------------------------------------------
  621. def command_common_event
  622. event_id = @command_window.current_ext
  623. return return_scene if event_id.nil?
  624. return return_scene if $data_common_events[event_id].nil?
  625. $game_temp.reserve_common_event(event_id)
  626. return_scene
  627. end
  628.  
  629. #--------------------------------------------------------------------------
  630. # new method: process_custom_commands
  631. #--------------------------------------------------------------------------
  632. def process_custom_commands
  633. for command in YEA::MENU::COMMANDS
  634. next unless YEA::MENU::CUSTOM_COMMANDS.include?(command)
  635. called_method = YEA::MENU::CUSTOM_COMMANDS[command][3]
  636. @command_window.set_handler(command, method(called_method))
  637. end
  638. end
  639.  
  640. #--------------------------------------------------------------------------
  641. # new method: command_debug
  642. #--------------------------------------------------------------------------
  643. def command_debug
  644. SceneManager.call(Scene_Debug)
  645. end
  646.  
  647. #--------------------------------------------------------------------------
  648. # new method: command_shop
  649. #--------------------------------------------------------------------------
  650. def command_shop
  651. goods = []
  652. SceneManager.call(Scene_Shop)
  653. SceneManager.scene.prepare(goods, false)
  654. end
  655.  
  656. #--------------------------------------------------------------------------
  657. # new method: command_totori
  658. #--------------------------------------------------------------------------
  659. def command_totori
  660. return unless $imported['KRX-AlchemicSynthesis']
  661. SceneManager.call(Scene_Alchemy)
  662. end
  663.  
  664. end # Scene_Menu
  665.  
  666. #==============================================================================
  667. #
  668. # ? End of File
  669. #
  670. #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement