Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*:
- * @plugindesc Patch for place below the Intituive button
- * @author Nio Kasgami
- * @version 1.00
- * @require nothing
- *
- *
- */
- var NioPlugin = NioPlugin || {};
- NioPlugin.Alias = NioPlugin.Alias || {};
- NioPlugin.Parameters = PluginManager.parameters('ButtonPatch');
- NioPlugin.Param = NioPlugin.Param || {};
- var Yanfly = Yanfly || {};
- Yanfly.Param = Yanfly.Param || {};
- //==============================================================================
- // ■ Scene_Map
- //------------------------------------------------------------------------------
- // The scene class of the map screen.
- //==============================================================================
- // overwriting for make sure it's work like it's supposed.
- Scene_Map.prototype.terminate = function() {
- Scene_Base.prototype.terminate.call(this);
- if (!SceneManager.isNextScene(Scene_Battle)) {
- this._button.visible = false;
- this._spriteset.update();
- this._mapNameWindow.hide();
- SceneManager.snapForBackground();
- }
- $gameScreen.clearZoom();
- };
- //===============================================================================
- // => END : Scene_Map
- //===============================================================================
- //==============================================================================
- // ■ Scene_Battle
- //------------------------------------------------------------------------------
- // The scene class of the battle screen.
- //==============================================================================
- // Overwrite the command so this work with Yanfly BattleCore
- Scene_Battle.prototype.createButton = function(){
- this._button = new Sprite_Button();
- this._button.bitmap = ImageManager.loadSystem('CancelBackButton');
- this._button.setClickHandler(this.currentHandler.bind(this));
- this.defineTrigger();
- this._button.visible = true;
- this.addChild(this._button);
- this.updateButtonVisibility();
- };
- // new method who check wether yanfly is enabled or not.
- Scene_Battle.prototype.defineTrigger = function(){
- if(eval(Yanfly.Param.BECStartActCmd)){
- this.setTrigger('OnCommand');
- } else{
- this.setTrigger('Party');
- }
- };
- //===============================================================================
- // => END : Scene_Battle
- //===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement