Advertisement
Double_X

DoubleX RMMV Status Bars Compatibility v100a

Feb 6th, 2022 (edited)
1,455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*============================================================================
  2.  *    ## Plugin Info
  3.  *----------------------------------------------------------------------------
  4.  *    # Plugin Name
  5.  *      DoubleX RMMV Status Bars Compatiblity
  6.  *----------------------------------------------------------------------------
  7.  *    # Terms Of Use
  8.  *      1. Commercial use's always allowed and crediting me's always optional.
  9.  *      2. You shall keep this plugin's Plugin Info part's contents intact.
  10.  *      3. You shalln't claim that this plugin's written by anyone other than
  11.  *         DoubleX or my aliases. I always reserve the right to deny you from
  12.  *         using any of my plugins anymore if you've violated this.
  13.  *      4. CC BY 4.0, except those conflicting with any of the above, applies
  14.  *         to this plugin, unless you've my permissions not needing follow so.
  15.  *      5. I always reserve the right to deny you from using this plugin
  16.  *         anymore if you've violated any of the above.
  17.  *----------------------------------------------------------------------------
  18.  *    # Prerequisites
  19.  *      Plugins:
  20.  *      1. DoubleX RMMV Status Bars
  21.  *      Abilities:
  22.  *      1. Nothing special
  23.  *----------------------------------------------------------------------------
  24.  *    # Links
  25.  *      DoubleX RMMV Status Bars:
  26.  *      1. https://pastebin.com/5BMvWPbu
  27.  *      This plugin:
  28.  *      1. https://pastebin.com/AXm9hePk
  29.  *      Mentioned Patreon Supporters:
  30.  *      https://www.patreon.com/posts/71738797
  31.  *----------------------------------------------------------------------------
  32.  *    # Author
  33.  *      DoubleX
  34.  *----------------------------------------------------------------------------
  35.  *    # Changelog
  36.  *      v1.00a(GMT 0700 6-2-2022):
  37.  *      1. 1st version of this plugin finished
  38.  *============================================================================*/
  39. /*:
  40.  * @plugindesc Fixes DoubleX RMMV Status Bars compatibility issues
  41.  * @author DoubleX
  42.  *
  43.  * @help
  44.  *============================================================================
  45.  *    ## Addressed Plugins
  46.  *----------------------------------------------------------------------------
  47.  *    # Yanfly Engine Plugins - Battle Engine Extension -
  48.  *      Animated Sideview Enemies
  49.  *      1. The status bars in DoubleX RMMV Status Bars are needlessly mirrored
  50.  *         as well when mirroring animated sideview enemies
  51.  *         - Reference tag: YEP_X_AnimatedSVEnemies_UnmirrorMirroredStatusBars
  52.  *         - Extended Window_Patb_Bar.prototype.updateBar to mirror the status
  53.  *           bars again if their parents are mirrored
  54.  *         - This fix might cause minor performance issues on low-end mobiles
  55.  *============================================================================
  56.  */
  57.  
  58. var DoubleX_RMMV = DoubleX_RMMV || {};
  59. DoubleX_RMMV['Status Bars Compatibility'] = 'v1.00a';
  60.  
  61. /*============================================================================
  62.  *    ## Plugin Implementations
  63.  *       You need not edit this part as it's about how this plugin works
  64.  *----------------------------------------------------------------------------
  65.  *    # Plugin Support Info:
  66.  *      1. Prerequisites
  67.  *         - Basic knowledge of how DoubleX RMMV Status Bars and each
  68.  *           addressed plugin work
  69.  *         - Some RMMV plugin development proficiency to fully comprehend this
  70.  *----------------------------------------------------------------------------*/
  71.  
  72. if (DoubleX_RMMV["Status Bars"]) {
  73.  
  74. DoubleX_RMMV.Status_Bars_Compatibility = {};
  75.  
  76. /*----------------------------------------------------------------------------*/
  77.  
  78. // Don't check if animated sideview enemies are on as it's a general problem
  79. if (Imported.YEP_BattleEngineCore) {
  80.  
  81. (function(SBC) {
  82.  
  83.     'use strict';
  84.  
  85.     SBC.Window_Status_Bar = {};
  86.     var _WSB = SBC.Window_Status_Bar;
  87.  
  88.     _WSB._updateBarStatuses = Window_Status_Bar.prototype._updateBarStatuses;
  89.     Window_Status_Bar.prototype._updateBarStatuses = function(battler) {
  90.     // v1.00a - v1.00a; Extended
  91.         _WSB._updateBarStatuses.apply(this, arguments);
  92.         // Added to mirror the status bar again if its parent's mirrored
  93.         if (this.visible) Sprite_StateIcon.prototype.updateMirror.call(this);
  94.         // YEP_X_AnimatedSVEnemies_UnmirrorMirroredStatusBars
  95.     }; // Window_Status_Bar.prototype._updateBarStatuses
  96.  
  97. })(DoubleX_RMMV.Status_Bars_Compatibility);
  98.  
  99. } // if (Imported.YEP_BattleEngineCore)
  100.  
  101. /*----------------------------------------------------------------------------*/
  102.  
  103. } else {
  104.     alert("Place Status Bars Compatibility below Status Bars.");
  105. }
  106.  
  107. /*============================================================================*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement