Advertisement
Makeratore

No Item Number Plugin by Makeratore

Nov 10th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //-----------------------------------------------------------------------------
  2. // No Item Number Plugin by Makeratore
  3. // This plugin eliminates the number of items from the item window by default.
  4. //-----------------------------------------------------------------------------
  5. // For: RPG Maker MV
  6. //-----------------------------------------------------------------------------
  7. // 11/11/2019 1.0 Release
  8. //-----------------------------------------------------------------------------
  9. // TERMS AND CONDITIONS
  10. // You can use this plugin in commercial and non-commercial projects.
  11. // Please, provide credits to Makeratore.
  12. //
  13. // This plugin can be found at:
  14. // http://www.rpg2s.net/forum/
  15. //-----------------------------------------------------------------------------
  16.  
  17. //-----------------------------------------------------------------------------
  18. /*:
  19. *
  20. * @plugindesc This plugin eliminates the number of items from the item window by default.
  21. *
  22. * @author Makeratore
  23. *
  24. * @help TERMS AND CONDITIONS
  25. * You can use this plugin in commercial and non-commercial projects.
  26. * Please, provide credits to Makeratore.
  27. *
  28. * PLUGIN COMMANDS:
  29. *
  30. * - HideItemNumber false
  31. * It shows the number of items.
  32. *
  33. * - HideItemNumber true
  34. * It hides the number of items.
  35. *
  36. */
  37. //-----------------------------------------------------------------------------
  38.  
  39. //-----------------------------------------------------------------------------
  40. // Code
  41. //-----------------------------------------------------------------------------
  42.  
  43. (function() {
  44.  
  45. var hideItemNumber = "true";
  46.  
  47. var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
  48. Game_Interpreter.prototype.pluginCommand = function(command, args) {
  49.     _Game_Interpreter_pluginCommand.call(this, command, args);
  50.    
  51.     if (command == "HideItemNumber") {
  52.         hideItemNumber = String(args).trim();
  53.     }
  54.    
  55. }
  56.  
  57. Window_ItemList.prototype.drawItem = function(index) {
  58.     var item = this._data[index];
  59.     if (item) {
  60.         var numberWidth = this.numberWidth();
  61.         var rect = this.itemRect(index);
  62.         rect.width -= this.textPadding();
  63.         this.changePaintOpacity(this.isEnabled(item));
  64.         this.drawItemName(item, rect.x, rect.y, rect.width - numberWidth);
  65.         if (hideItemNumber == "false") {
  66.             this.drawItemNumber(item, rect.x, rect.y, rect.width);
  67.         }
  68. //      this.drawItemNumber(item, rect.x, rect.y, rect.width);
  69.         this.changePaintOpacity(1);
  70.     }
  71. };
  72.  
  73. })();
  74.  
  75. //-----------------------------------------------------------------------------
  76. // End of plugin
  77. //-----------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement