Advertisement
Double_X

DoubleX RMMV Skill Hotkeys Compatibility v100a

Sep 6th, 2019 (edited)
746
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 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.  *      Mentioned Patreon Supporters:
  23.  *      https://www.patreon.com/posts/71738797
  24.  *----------------------------------------------------------------------------
  25.  *    # Author
  26.  *      DoubleX
  27.  *----------------------------------------------------------------------------
  28.  *    # Changelog
  29.  *      v1.00a(GMT 0900 6-9-2019):
  30.  *      1. 1st version of this plugin finished
  31.  *============================================================================*/
  32. /*:
  33.  * @plugindesc Fixes DoubleX RMMV Skill Hotkeys compatibility issues
  34.  * @author DoubleX
  35.  *
  36.  * @help
  37.  *============================================================================
  38.  *    ## Addressed Plugins
  39.  *----------------------------------------------------------------------------
  40.  *    # Yanfly Engine Plugins - Skill Learn System
  41.  *      1. All skills that shouldn't be learnable are falsely learnable
  42.  *         - Reference tag: YEP_SkillLearnSystem_Window_SkillLearnEnabled
  43.  *         - Added Window_SkillLearn.prototype.isCurrentItemEnabled using the
  44.  *           original Window_SkillList counterpart logic to stop
  45.  *           DoubleX RMMV Skill Hotkeys from breaking isCurrentItemEnabled in
  46.  *           Window_SkillLearn
  47.  *============================================================================
  48.  */
  49.  
  50. "use strict";
  51. var DoubleX_RMMV = DoubleX_RMMV || {};
  52. DoubleX_RMMV["Skill Hotkeys Compatibility"] = "v1.00a";
  53.  
  54. /*============================================================================
  55.  *    ## Plugin Implementations
  56.  *       You need not edit this part as it's about how this plugin works
  57.  *----------------------------------------------------------------------------
  58.  *    # Plugin Support Info:
  59.  *      1. Prerequisites
  60.  *         - Basic knowledge of how DoubleX RMMV Skill Hotkeys and each
  61.  *           addressed plugin works
  62.  *         - Some Javascript coding proficiency to fully comprehend this
  63.  *           plugin
  64.  *----------------------------------------------------------------------------*/
  65.  
  66. if (DoubleX_RMMV["Skill Hotkeys"]) {
  67.  
  68. /*----------------------------------------------------------------------------*/
  69.  
  70. if (Imported.YEP_SkillLearnSystem) {
  71.  
  72. /*----------------------------------------------------------------------------
  73.  *    # Edit class: Window_SkillLearn
  74.  *      - Stops Skill Hotkeys from breaking skill learnabilities
  75.  *----------------------------------------------------------------------------*/
  76.  
  77. (function(SH) {
  78.  
  79.     "use strict";
  80.  
  81.     var _WSL = SH.Window_SkillList.orig;
  82.  
  83.      /**
  84.       * Nullipotent
  85.       * @author DoubleX
  86.       * @interface
  87.       * @returns {Boolean} The check result
  88.       * @since v1.00a
  89.       * @version v1.00a
  90.       */
  91.     Window_SkillLearn.prototype.isCurrentItemEnabled = function() {
  92.         // Yanfly can add the vanilla one to fix compatibility with all plugins
  93.         return _WSL.isCurrentItemEnabled.call(this);
  94.         // YEP_SkillLearnSystem_Window_SkillLearnEnabled
  95.     }; // Window_SkillLearn.prototype.isCurrentItemEnabled
  96.  
  97. })(DoubleX_RMMV.Skill_Hotkeys);
  98.  
  99. } // if (Imported.YEP_SkillLearnSystem)
  100.  
  101. /*----------------------------------------------------------------------------*/
  102.  
  103. } else {
  104.     alert("Place Skill Hotkeys Compatibility below Skill Hotkeys.");
  105. }
  106.  
  107. /*============================================================================*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement