Double_X

DoubleX RMMV Skill Hotkeys Compatibility v100a

Sep 6th, 2019
300
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 Skill Hotkeys Compatibility
  6.  *----------------------------------------------------------------------------
  7.  *    # Terms Of Use
  8.  *      You shall keep this plugin's Plugin Info part's contents intact
  9.  *      You shalln't claim that this plugin's written by anyone other than
  10.  *      DoubleX or his aliases
  11.  *      None of the above applies to DoubleX or his aliases
  12.  *----------------------------------------------------------------------------
  13.  *    # Prerequisites
  14.  *      Plugins:
  15.  *      1. DoubleX RMMV Skill Hotkeys
  16.  *      Abilities:
  17.  *      1. Nothing special
  18.  *----------------------------------------------------------------------------
  19.  *    # Links
  20.  *      This plugin:
  21.  *      1. https://pastebin.com/EWqAxchp
  22.  *----------------------------------------------------------------------------
  23.  *    # Author
  24.  *      DoubleX
  25.  *----------------------------------------------------------------------------
  26.  *    # Changelog
  27.  *      v1.00a(GMT 0900 6-9-2019):
  28.  *      1. 1st version of this plugin finished
  29.  *============================================================================*/
  30. /*:
  31.  * @plugindesc Fixes DoubleX RMMV Skill Hotkeys compatibility issues
  32.  * @author DoubleX
  33.  *
  34.  * @help
  35.  *============================================================================
  36.  *    ## Addressed Plugins
  37.  *----------------------------------------------------------------------------
  38.  *    # Yanfly Engine Plugins - Skill Learn System
  39.  *      1. All skills that shouldn't be learnable are falsely learnable
  40.  *         - Reference tag: YEP_SkillLearnSystem_Window_SkillLearnEnabled
  41.  *         - Added Window_SkillLearn.prototype.isCurrentItemEnabled using the
  42.  *           original Window_SkillList counterpart logic to stop
  43.  *           DoubleX RMMV Skill Hotkeys from breaking isCurrentItemEnabled in
  44.  *           Window_SkillLearn
  45.  *============================================================================
  46.  */
  47.  
  48. "use strict";
  49. var DoubleX_RMMV = DoubleX_RMMV || {};
  50. DoubleX_RMMV["Skill Hotkeys Compatibility"] = "v1.00a";
  51.  
  52. /*============================================================================
  53.  *    ## Plugin Implementations
  54.  *       You need not edit this part as it's about how this plugin works
  55.  *----------------------------------------------------------------------------
  56.  *    # Plugin Support Info:
  57.  *      1. Prerequisites
  58.  *         - Basic knowledge of how DoubleX RMMV Skill Hotkeys and each
  59.  *           addressed plugin works
  60.  *         - Some Javascript coding proficiency to fully comprehend this
  61.  *           plugin
  62.  *----------------------------------------------------------------------------*/
  63.  
  64. if (DoubleX_RMMV["Skill Hotkeys"]) {
  65.  
  66. /*----------------------------------------------------------------------------*/
  67.  
  68. if (Imported.YEP_SkillLearnSystem) {
  69.  
  70. /*----------------------------------------------------------------------------
  71.  *    # Edit class: Window_SkillLearn
  72.  *      - Stops Skill Hotkeys from breaking skill learnabilities
  73.  *----------------------------------------------------------------------------*/
  74.  
  75. (function(SH) {
  76.  
  77.     "use strict";
  78.  
  79.     var _WSL = SH.Window_SkillList.orig;
  80.  
  81.      /**
  82.       * Nullipotent
  83.       * @author DoubleX
  84.       * @interface
  85.       * @returns {Boolean} The check result
  86.       * @since v1.00a
  87.       * @version v1.00a
  88.       */
  89.     Window_SkillLearn.prototype.isCurrentItemEnabled = function() {
  90.         // Yanfly can add the vanilla one to fix compatibility with all plugins
  91.         return _WSL.isCurrentItemEnabled.call(this);
  92.         // YEP_SkillLearnSystem_Window_SkillLearnEnabled
  93.     }; // Window_SkillLearn.prototype.isCurrentItemEnabled
  94.  
  95. })(DoubleX_RMMV.Skill_Hotkeys);
  96.  
  97. } // if (Imported.YEP_SkillLearnSystem)
  98.  
  99. /*----------------------------------------------------------------------------*/
  100.  
  101. } else {
  102.     alert("Place Skill Hotkeys Compatibility below Skill Hotkeys.");
  103. }
  104.  
  105. /*============================================================================*/
RAW Paste Data