Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # DSI Hide Player State Popup
- # -- Last Updated: 2017.08.02
- # -- Author: dsiver144
- # -- Level: Easy
- # -- Requires: n/a
- #==============================================================================
- $imported = {} if $imported.nil?
- $imported["DSI-HidePlayerState"] = true
- #==============================================================================
- # + Updates
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # 2017.08.02 - Finish first version.
- #==============================================================================
- # + Instructions
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # To install this script, open up your script editor and copy/paste this script
- # to an open slot below ▼Materials but above ▼Main. Remember to save.
- # * You should put this script below all script relate to drawing enemy state
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # Script call:
- # - hide_player_state_popup
- # - show_player_state_popup
- #==============================================================================
- DEFAULT_OFF = true
- #==============================================================================
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # ● Execute Popup Add New State
- #--------------------------------------------------------------------------
- def execute_popup_add_new_state(state_id)
- st = $data_states[state_id]
- return if $game_system.hide_player_popup
- unless (SceneManager.scene_is?(Scene_Battle) and !STATES_POPUP_BATTLE) or
- (SceneManager.scene_is?(Scene_Map) and !STATES_POPUP_MAP)
- self.damage.push([st.name.to_s,"States Plus",false,st.icon_index])
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● Execute Popup Remove State
- #--------------------------------------------------------------------------
- def execute_popup_remove_state(state_id)
- return if $game_system.hide_player_popup
- if state?(state_id) and self.hp > 0
- st = $data_states[state_id]
- unless (SceneManager.scene_is?(Scene_Battle) and !STATES_POPUP_BATTLE) or
- (SceneManager.scene_is?(Scene_Map) and !STATES_POPUP_MAP)
- self.damage.push([st.name.to_s,"States Minus",false,st.icon_index]) unless BattleManager.escape?
- end
- end
- end
- class Game_System
- attr_accessor :hide_player_popup
- alias_method(:dsi_hide_player_popup_thing, :initialize)
- #--------------------------------------------------------------------------
- # ● alias method: initialize
- #--------------------------------------------------------------------------
- def initialize
- @hide_player_popup = true
- dsi_hide_player_popup_thing
- end
- end
- class Game_Interpreter
- #--------------------------------------------------------------------------
- # ● new method: hide_player_state_popup
- #--------------------------------------------------------------------------
- def hide_player_state_popup
- @hide_player_popup = DEFAULT_OFF
- end
- #--------------------------------------------------------------------------
- # ● new method: show_player_state_popup
- #--------------------------------------------------------------------------
- def show_player_state_popup
- @hide_player_popup = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement