Guest User

Untitled

a guest
Jun 18th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.11 KB | None | 0 0
  1. #==============================================================================
  2. # ** Vocab
  3. #------------------------------------------------------------------------------
  4. # This module defines terms and messages. It defines some data as constant
  5. # variables. Terms in the database are obtained from $data_system.
  6. #==============================================================================
  7. module Vocab
  8. # Party
  9. def self.party
  10. return "Party"
  11. end
  12. end
  13. #==============================================================================
  14. # ** End Vocab
  15. #------------------------------------------------------------------------------
  16. ###############################################################################
  17. #==============================================================================
  18. # ** Scene_File
  19. #------------------------------------------------------------------------------
  20. # This class performs the save and load screen processing.
  21. #==============================================================================
  22. class Scene_File < Scene_Base
  23. #--------------------------------------------------------------------------
  24. # * Return to Original Screen
  25. #--------------------------------------------------------------------------
  26. def return_scene
  27. if @from_title
  28. $scene = Scene_Title.new
  29. elsif @from_event
  30. $scene = Scene_Map.new
  31. else
  32. $scene = Scene_Map.new#Scene_Menu.new(5)
  33. end
  34. end
  35. end
  36. #==============================================================================
  37. # ** End Scene_File
  38. #------------------------------------------------------------------------------
  39. ###############################################################################
  40. #==============================================================================
  41. # ** Scene_End
  42. #------------------------------------------------------------------------------
  43. # This class performs game end screen processing.
  44. #==============================================================================
  45. class Scene_End < Scene_Base
  46. #--------------------------------------------------------------------------
  47. # * Return to Original Screen
  48. #--------------------------------------------------------------------------
  49. def return_scene
  50. $scene = Scene_Map.new#Scene_Menu.new(6)
  51. end
  52. end
  53. #==============================================================================
  54. # ** End Scene_End
  55. #------------------------------------------------------------------------------
  56. ###############################################################################
  57.  
  58. #==============================================================================
  59. # ** Scene_Menu
  60. #------------------------------------------------------------------------------
  61. # This class performs the menu screen processing.
  62. #==============================================================================
  63. class Scene_Menu < Scene_Base
  64. #--------------------------------------------------------------------------
  65. # * Create Command Window
  66. #--------------------------------------------------------------------------
  67. def create_command_window
  68. s1 = Vocab::item
  69. s2 = Vocab::skill
  70. s3 = Vocab::equip
  71. s4 = Vocab::status
  72. s5 = Vocab::party
  73. s6 = Vocab::save
  74. s7 = Vocab::game_end
  75. @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])#, s7])
  76. @command_window.index = @menu_index
  77. if $game_party.members.size == 0 # If number of party members is 0
  78. @command_window.draw_item(0, false) # Disable item
  79. @command_window.draw_item(1, false) # Disable skill
  80. @command_window.draw_item(2, false) # Disable equipment
  81. @command_window.draw_item(3, false) # Disable status
  82. @command_window.draw_item(4, false) # Disable party
  83. end
  84. # if $game_system.save_disabled # If save is forbidden
  85. # @command_window.draw_item(5, false) # Disable save
  86. # end
  87. end
  88. #--------------------------------------------------------------------------
  89. # * Update Command Selection
  90. #--------------------------------------------------------------------------
  91. def update_command_selection
  92. if Input.trigger?(Input::B)
  93. Sound.play_cancel
  94. $scene = Scene_Map.new
  95. elsif Input.trigger?(Input::C)
  96. if $game_party.members.size == 0 and @command_window.index < 5
  97. Sound.play_buzzer
  98. return
  99. elsif $game_system.save_disabled and @command_window.index == 5
  100. Sound.play_buzzer
  101. return
  102. end
  103. Sound.play_decision
  104. case @command_window.index
  105. when 0 # Item
  106. $scene = Scene_Item.new
  107. when 1,2,3 # Skill, equipment, status
  108. start_actor_selection
  109. when 4 # End Game
  110. $scene = Scene_Party.new
  111. # when 5 # Save
  112. # $scene = Scene_File.new(true, false, false)
  113. when 5 # End Game
  114. $scene = Scene_End.new
  115. end
  116. end
  117. end
  118. end
  119. #==============================================================================
  120. # ** End Scene_Menu
  121. #------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment