Advertisement
Zarsla

Edit to CGMV Achievements Auto Add it To the Main Menu.

Mar 6th, 2018
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. //Add this code at the bottom of CGMV Achievement plugin
  2. //Achivements Menu
  3. OverWrite_WindowMenuCommand = Window_MenuCommand.prototype.addOriginalCommands;
  4. Window_MenuCommand.prototype.addOriginalCommands = function() {
  5. OverWrite_WindowMenuCommand.call(this);
  6. if(!Imported.YEP_MainMenuManager){
  7. this.addCommand("Achivements", 'achievement', true);
  8. }
  9.  
  10. };
  11.  
  12. OverWrite_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
  13. Scene_Menu.prototype.createCommandWindow = function() {
  14. OverWrite_createCommandWindow.call(this);
  15. this._commandWindow.setHandler('achievement', this.commandAchievements.bind(this));
  16. }
  17.  
  18. Scene_Menu.prototype.commandAchievements = function() {
  19. SceneManager.push(CGMV_Scene_Achievements);
  20. };
  21.  
  22.  
  23. //In Yanfly Main Menu Core
  24. //Set the Symbol: achievement
  25. //And Set Main Menu Bind: SceneManager.push(CGMV_Scene_Achievements)
  26. //Make the sure the name is in quotation marks ie "Trophies" and you can use the enable and show however you want.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement