Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.08 KB | None | 0 0
  1. module Menu_Settings
  2.   QUESTLOG = "Questbuch" # Bezeichnung für das Questlog
  3.   ALBUM = "Album" # Bezeichnung für das Album
  4.   ERFOLGE = "Erfolge" # Bezeichnung für Erfolge
  5.   PUNKTE = "Attribute"
  6.   SKILLTREE = "Skilltree"
  7.   ENZYKLOPÄDIE = "Enzklopädie"
  8.   ARTEFAKTE = "Artefakte"
  9.   TAGEBUCH = "Tagebuch"
  10.   SWITCHES = {
  11.   # Menupunkt ID => Switch ID
  12.   1 => 5,
  13.   2 => 6,
  14.   }
  15. end
  16. class Scene_Menu
  17.   #--------------------------------------------------------------------------
  18.   # * Create Command Window
  19.   #--------------------------------------------------------------------------
  20.   def create_command_window
  21.     s1 = Vocab::item
  22.     s2 = Vocab::skill
  23.     s3 = Vocab::equip
  24.     s4 = Vocab::status
  25.     s5 = Menu_Settings::QUESTLOG
  26.     s6 = Menu_Settings::ALBUM
  27.     s7 = Menu_Settings::ERFOLGE
  28.     s8 = Menu_Settings::PUNKTE
  29.     s9 = Menu_Settings:: SKILLTREE
  30.     s10 = Menu_Settings:: ENZYKLOPÄDIE
  31.     s11 = Menu_Settings:: ARTEFAKTE
  32.     s12 = Menu_Settings:: TAGEBUCH
  33.     s13 = Vocab::game_end
  34.     @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13])
  35.     @command_window.index = @menu_index
  36.     if $game_party.members.size == 0          # If number of party members is 0
  37.       @command_window.draw_item(0, false)     # Disable item
  38.       @command_window.draw_item(1, false)     # Disable skill
  39.       @command_window.draw_item(2, false)     # Disable equipment
  40.       @command_window.draw_item(3, false)     # Disable status
  41.     end
  42.     for key in Menu_Settings::SWITCHES.keys
  43.       @command_window.draw_item(key,false) if !$game_switches[Menu_Settings::SWITCHES[key]]
  44.     end
  45.   end
  46.   #--------------------------------------------------------------------------
  47.   # * Update Command Selection
  48.   #--------------------------------------------------------------------------
  49.   def update_command_selection
  50.     if Input.trigger?(Input::B)
  51.       Sound.play_cancel
  52.       $scene = Scene_Map.new
  53.     elsif Input.trigger?(Input::C)
  54.       if $game_party.members.size == 0 and @command_window.index < 4
  55.         Sound.play_buzzer
  56.         return
  57.       end
  58.       if Menu_Settings::SWITCHES.keys.include?(@command_window.index) && !$game_switches[Menu_Settings::SWITCHES[@command_window.index]]
  59.         Sound.play_buzzer
  60.         return
  61.       end
  62.       Sound.play_decision
  63.       case @command_window.index
  64.       when 0      # Item
  65.         $scene = Scene_Item.new
  66.       when 1,2,3,7,8  # Skill, equipment, status
  67.         start_actor_selection
  68.       when 12     # End Game
  69.         $scene = Scene_End.new
  70.       when 4
  71.         $scene = Scene_Questlog.new
  72.       when 5
  73.         $scene = Scene_VampyrBestiary.new
  74.       when 6
  75.         $scene = Scene_Erfolge.new
  76.       when 9
  77.         $scene = Scene_Custom_List.new
  78.       when 10
  79.         $scene = Collection_Screen.new
  80.       when 11
  81.         $scene = Scene_Diary.new
  82.       end
  83.     end
  84.   end
  85.   def update_actor_selection
  86.     if Input.trigger?(Input::B)
  87.       Sound.play_cancel
  88.       end_actor_selection
  89.     elsif Input.trigger?(Input::C)
  90.       $game_party.last_actor_index = @status_window.index
  91.       Sound.play_decision
  92.       case @command_window.index
  93.       when 1  # skill
  94.         $scene = Scene_Skill.new(@status_window.index)
  95.       when 2  # equipment
  96.         $scene = Scene_Equip.new(@status_window.index)
  97.       when 3  # status
  98.         $scene = Scene_Status.new(@status_window.index)
  99.       when 7
  100.         $scene = Scene_Stat_Dist.new(@status_window.index)
  101.       when 8
  102.         $scene = Scene_SkillTree.new(@status_window.index)
  103.       end
  104.     end
  105.   end
  106. end
  107. class Scene_Item  
  108.   def return_scene
  109.     $scene = Scene_Menu.new(0)
  110.   end
  111. end
  112.  
  113. class Scene_Skill
  114.  
  115.   def return_scene
  116.     $scene = Scene_Menu.new(1)
  117.   end
  118. end
  119.  
  120. class Scene_Equip
  121.   def return_scene
  122.     $scene = Scene_Menu.new(2)
  123.   end
  124. end
  125.  
  126. class Scene_Status
  127.   def return_scene
  128.     $scene = Scene_Menu.new(3)
  129.   end
  130. end
  131. class Scene_Questlog
  132.   def return_scene
  133.     if @from_menu
  134.       $scene = Scene_Menu.new(Questlog::MENU_INDEX)
  135.     else
  136.       $scene = Scene_Map.new
  137.     end
  138.   end
  139. end
  140. class Scene_End
  141.   def return_scene
  142.     $scene = Scene_Menu.new(12)
  143.   end
  144. end
  145. class Scene_VampyrBestiary
  146.   def return_scene
  147.     $scene = Scene_Menu.new(5)
  148.   end
  149. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement