Advertisement
Guest User

Untitled

a guest
Nov 29th, 2013
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.52 KB | None | 0 0
  1. # Script pour fusionner le menu d'ajout de compétence avec celui de skill.
  2. # Encore une fois dans le script Ace Menu Engine ligne 104 il faut que tu vires
  3. # le :arcanum pour ne pas l'avoir dans le menu principal.
  4. # Tu peux aussi modifier le nom du sous menu ci dessous.
  5. class Window_SkillHUBCommand < Window_Command
  6.   def window_width()        160 end
  7.   def visible_line_number()   4 end
  8.   def actor=(_)                 end
  9.   def skill_window=(_)          end
  10.   def make_command_list
  11.     add_command(Vocab::skill, :skill)
  12.     add_command("Arcanum", :upgrade)
  13.   end
  14. end
  15.  
  16. class Scene_SkillHUB < Scene_Skill
  17.   def create_command_window
  18.     last_id = @command_window ? @command_window.index : 0
  19.     @command_window = Window_SkillHUBCommand.new(0, @help_window.height)
  20.     @command_window.select(last_id)
  21.     @command_window.set_handler(:skill,    method(:command_skill))
  22.     @command_window.set_handler(:upgrade,  method(:command_upgrade))
  23.     @command_window.set_handler(:cancel,   method(:return_scene))
  24.     @command_window.set_handler(:pagedown, method(:next_actor))
  25.     @command_window.set_handler(:pageup,   method(:prev_actor))
  26.   end
  27.   def command_skill
  28.     SceneManager.call(Scene_Skill)
  29.   end
  30.   def command_upgrade
  31.     SceneManager.call(Scene_Upgrade)
  32.   end
  33. end
  34.  
  35. class Scene_Menu
  36.   alias zeus_skillhub_on_personal_ok on_personal_ok
  37.   def on_personal_ok
  38.     case @command_window.current_symbol
  39.     when :skill; SceneManager.call(Scene_SkillHUB)
  40.     else         zeus_skillhub_on_personal_ok
  41.     end
  42.   end    
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement