Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #======================#
- # Z-Systems by: Zetu #
- #===========================#======================#===========================#
- # * * * Z01 Neo Menu System v1.03 * * * #
- #=#==========================================================================#=#
- # Insert ALL menu commands, each menu item array will contain... #
- # [0] Name of Command (String) #
- # [1] If command is enabled (Boolean or String) #
- # [2] Requires Selection (Boolean) #
- # [3] Command to Run #
- # [4] (Only if [3]==:command_custom) Scene to go to #
- #--------------------------------------------------------------------------#
- # Tip on finding the code within a script: #
- # Use Ctrl+F '$scene ='. This should be able to locate the call method #
- # used in most every script. #
- #==========================================================================#
- module Z01
- def self.menucommandlist
- return [
- # (Convert) | (Convert) When to |Require | |(If custom)
- # Item Name | Enable this command |Selection?|Method Call| Scene
- [Vocab::item, "main_commands_enabled", false, :command_item],
- [Vocab::skill, "main_commands_enabled", true, :command_skill],
- [Vocab::equip, "main_commands_enabled", true, :command_equip],
- [Vocab::status,"main_commands_enabled", true, :command_status],
- [Vocab::formation, "formation_enabled", false, :command_formation],
- [Vocab::save, "save_enabled", false, :command_formation],
- [Vocab::game_end, true, false, :command_game_end],
- # Example of Custom Menu Item!
- # ["Quest Log", true, false, :command_custom, Scene_QuestLog]
- ]
- end
- #========#======================#====#================================#========#
- #--------# #----# DO NOT EDIT PAST THIS POINT!!! #--------#
- #--------# End of Customization #----# Editing will cause death by #--------#
- #--------# #----# brain asplosions. #--------#
- #========#======================#====#================================#========#
- end
- class Window_MenuCommand < Window_Command
- def make_command_list
- for command in Z01::menucommandlist
- add_command(tryconvert(command[0]), command[3], tryconvert(command[1]),
- command[4])
- end
- end
- def tryconvert(value)
- begin
- return eval(value)
- rescue
- return value
- end
- end
- end
- class Scene_Menu < Scene_MenuBase
- def create_command_window
- @command_window = Window_MenuCommand.new
- for command in Z01::menucommandlist
- if !command[2]
- @command_window.set_handler(command[3], method(command[3]))
- else
- @command_window.set_handler(command[3], method(:command_personal))
- end
- end
- @command_window.set_handler(:cancel, method(:return_scene))
- end
- def on_personal_ok
- method(Z01[@command_window.index][3]).call
- end
- def command_skill
- SceneManager.call(Scene_Skill)
- end
- def command_equip
- SceneManager.call(Scene_Equip)
- end
- def command_status
- SceneManager.call(Scene_Status)
- end
- def command_custom
- SceneManager.call(@command_window.current_ext)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement