Advertisement
dsiver144

DSI Hide Player State Popup

Aug 2nd, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. #==============================================================================
  2. # DSI Hide Player State Popup
  3. # -- Last Updated: 2017.08.02
  4. # -- Author: dsiver144
  5. # -- Level: Easy
  6. # -- Requires: n/a
  7. #==============================================================================
  8. $imported = {} if $imported.nil?
  9. $imported["DSI-HidePlayerState"] = true
  10. #==============================================================================
  11. # + Updates
  12. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  13. # 2017.08.02 - Finish first version.
  14. #==============================================================================
  15. # + Instructions
  16. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  17. # To install this script, open up your script editor and copy/paste this script
  18. # to an open slot below ▼Materials but above ▼Main. Remember to save.
  19. # * You should put this script below all script relate to drawing enemy state
  20. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  21. # Script call:
  22. # - hide_player_state_popup
  23. # - show_player_state_popup
  24. #==============================================================================
  25. DEFAULT_OFF = true
  26. #==============================================================================
  27. class Game_Actor < Game_Battler
  28. #--------------------------------------------------------------------------
  29. # ● Execute Popup Add New State
  30. #--------------------------------------------------------------------------
  31. def execute_popup_add_new_state(state_id)
  32. st = $data_states[state_id]
  33. return if $game_system.hide_player_popup
  34. unless (SceneManager.scene_is?(Scene_Battle) and !STATES_POPUP_BATTLE) or
  35. (SceneManager.scene_is?(Scene_Map) and !STATES_POPUP_MAP)
  36. self.damage.push([st.name.to_s,"States Plus",false,st.icon_index])
  37. end
  38. end
  39. end
  40. #--------------------------------------------------------------------------
  41. # ● Execute Popup Remove State
  42. #--------------------------------------------------------------------------
  43. def execute_popup_remove_state(state_id)
  44. return if $game_system.hide_player_popup
  45. if state?(state_id) and self.hp > 0
  46. st = $data_states[state_id]
  47. unless (SceneManager.scene_is?(Scene_Battle) and !STATES_POPUP_BATTLE) or
  48. (SceneManager.scene_is?(Scene_Map) and !STATES_POPUP_MAP)
  49. self.damage.push([st.name.to_s,"States Minus",false,st.icon_index]) unless BattleManager.escape?
  50. end
  51. end
  52. end
  53.  
  54. class Game_System
  55. attr_accessor :hide_player_popup
  56. alias_method(:dsi_hide_player_popup_thing, :initialize)
  57. #--------------------------------------------------------------------------
  58. # ● alias method: initialize
  59. #--------------------------------------------------------------------------
  60. def initialize
  61. @hide_player_popup = true
  62. dsi_hide_player_popup_thing
  63. end
  64. end
  65.  
  66. class Game_Interpreter
  67. #--------------------------------------------------------------------------
  68. # ● new method: hide_player_state_popup
  69. #--------------------------------------------------------------------------
  70. def hide_player_state_popup
  71. @hide_player_popup = DEFAULT_OFF
  72. end
  73. #--------------------------------------------------------------------------
  74. # ● new method: show_player_state_popup
  75. #--------------------------------------------------------------------------
  76. def show_player_state_popup
  77. @hide_player_popup = false
  78. end
  79. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement