SHARE
TWEET

Untitled

a guest Jun 12th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*:
  2.  * @plugindesc <RS_TerraxLighting_ActiveControl>
  3.  * @author biud436
  4.  *
  5.  * @param Deactive Map Ids
  6.  * @type number[]
  7.  * @desc Specify the for deactivating maps' ids.
  8.  * @default []
  9.  *
  10.  * @help
  11.  * This plugin provides no plugin commands.
  12.  */
  13. /*:ko
  14.  * @plugindesc <RS_TerraxLighting_ActiveControl>
  15.  * @author biud436
  16.  *
  17.  * @param Deactive Map Ids
  18.  * @type number[]
  19.  * @desc 비활성화 할 맵의 ID를 입력하세요.
  20.  * @default []
  21.  *
  22.  * @help
  23.  * 이 플러그인은 플러그인 명령을 제공하지 않습니다.
  24.  */
  25.  
  26.  
  27. var Imported = Imported || {};
  28. Imported.RS_TerraxLighting_ActiveControl = true;
  29.  
  30. var RS = RS || {};
  31. RS.TerraxLighting_ActiveControl = {};
  32.  
  33. (function($) {
  34.  
  35.     "use strict";
  36.  
  37.     var parameters = $plugins.filter(function (i) {
  38.         return i.description.contains('<RS_TerraxLighting_ActiveControl>');
  39.     });
  40.  
  41.     parameters = (parameters.length > 0) && parameters[0].parameters;      
  42.  
  43.     $.jsonParse = function (str) {
  44.         var retData = JSON.parse(str, function (k, v) {
  45.             try { return $.jsonParse(v); } catch (e) { return v; }
  46.         });
  47.         return retData;
  48.     };    
  49.  
  50.     $.Params = {};
  51.     $.Params.deactiveMapIds = eval(parameters["Deactive Map Ids"].replace(/\"/g, ""));
  52.  
  53.     var alias_Game_Map_setup = Game_Map.prototype.setup;
  54.     Game_Map.prototype.setup = function(mapId) {
  55.         alias_Game_Map_setup.call(this, mapId);
  56.         let valid = $.Params.deactiveMapIds.filter(function(id) {
  57.             return id === mapId;
  58.         }, this);
  59.         if(valid.length > 0) {
  60.             $gameVariables.SetStopScript(true);
  61.         } else {
  62.             $gameVariables.SetStopScript(false);
  63.         }
  64.     };    
  65.  
  66. })(RS.TerraxLighting_ActiveControl);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top