Patch to help adjust Prettier Gauges with Yanfly Party Gauge?

Hey everyone - hopefully this is a quick and easy request!

I am currently using the Pretty Gauges (https://forums.rpgmakerweb.com/index.php?threads/prettier-gauges.47077/) plugin, which is amazing. However, it applies it to all meters in game - normally not a problem, but it looks kinda goofy with Yanfly's Party Gauge (http://yanfly.moe/2016/02/06/yep-67-party-limit-gauge/) plugin the way I have it set up. Plus since the Party Gauge length changes with the number of characters, the shapes look weird on a full party vs a single member. See attached screenshots for what I am talking about.

I was hoping somebody could alter the Party Gauge plugin to not have the segments and just be a flat bar, like other bars in RPG Maker MV. Or, alternatively, alter one of these plugins so that I can choose not to apply it (or just remove support) for the Party Gauge specifically. I would prefer the former method though, if possible.

Hopefully this isn't a big ask, and thank you so much in advance for any support on this!
For my testing environment, I installed PrettyGauges, YEP_SkillCore, and YEP_X_PartyLimitGauge. The only change I made to my settings was to have the PrettyGauges bar type be (> instead of the default ||. I tried it with 1, 2, and 4 party members using the battle test functionality.

I created an extension Plugin so as not to modify any of Yanfly's original scripts. This extension should draw the limit gauge as a solid bar without any segmentation to indicate where the next level is.

Save this as "Zevia_YEP_PartyLimitGauge_Extension.js" or download the file from this post, then ensure that it's placed below YEP_X_PartyLimitGauge in your Plugin order.
Code:
/*:
* @plugindesc This is an extension for the Yanfly Party Limit Gauge Plugin that
* allows a user to choose whether they want to segment the limit bar or not.
* @author Zevia
*
* @help This Plugin must be placed below YEP_X_PartyLimitGauge.js.
*
* @param shouldSegment
* @text Segment Limit Bars
* @desc Whether or not the limit bar should be separated into segments for each limit level
* @type boolean
* @default false
*/

(function(module) {
    'use strict';

    module.Zevia = module.Zevia || {};
    var ZeviaYanflyPartyLimitGaugeExtension = module.Zevia.YanflyPartyLimitGaugeExtension = {};
    var shouldSegment = !!PluginManager.parameters('Zevia_YEP_PartyLimitGauge_Extension').shouldSegment.match(/true/i);

    ZeviaYanflyPartyLimitGaugeExtension.drawPartyLimitGauge = Window_Base.prototype.drawPartyLimitGauge;
    Window_Base.prototype.drawPartyLimitGauge = function(unit, x, y, w) {
        var gauges = unit.partyLimitGaugeIncrements();
        var rates = unit.partyLimitGaugeLastRates();
        var c1 = this.textColor(unit.partyLimitGaugeColor1());
        var c2 = this.textColor(unit.partyLimitGaugeColor2());
        var gw = Math.floor(this.width / gauges);
        if (gw >= 5) {
          if (shouldSegment) {
            for (var i = 0; i < gauges; ++i) {
              var rate = rates[i] || 0;
              this.drawGauge(x, y, gw, rate, c1, c2);
              x += gw;
            }
          } else {
            var rate = rates.reduce(function(allRates, currentRate) { return allRates + currentRate; }, 0) / gauges;
            this.drawGauge(x, y, w, rate, c1, c2);
          }
        } else {
          var rate = unit.partyLimitGaugeRate();
          this.drawGauge(x, y, w, rate, c1, c2);
        }
    };
})(window);

Let me know if it does what you need.
This looks to work perfectly! Thank you so much for this! 🙂

Original thread: https://forums.rpgmakerweb.com/threads/patch-to-help-adjust-prettier-gauges-with-yanfly-party-gauge.104581/