Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*:
- * @plugindesc <RS_TerraxLighting_ActiveControl>
- * @author biud436
- *
- * @param Deactive Map Ids
- * @type number[]
- * @desc Specify the for deactivating maps' ids.
- * @default []
- *
- * @help
- * This plugin provides no plugin commands.
- */
- /*:ko
- * @plugindesc <RS_TerraxLighting_ActiveControl>
- * @author biud436
- *
- * @param Deactive Map Ids
- * @type number[]
- * @desc 비활성화 할 맵의 ID를 입력하세요.
- * @default []
- *
- * @help
- * 이 플러그인은 플러그인 명령을 제공하지 않습니다.
- */
- var Imported = Imported || {};
- Imported.RS_TerraxLighting_ActiveControl = true;
- var RS = RS || {};
- RS.TerraxLighting_ActiveControl = {};
- (function($) {
- "use strict";
- var parameters = $plugins.filter(function (i) {
- return i.description.contains('<RS_TerraxLighting_ActiveControl>');
- });
- parameters = (parameters.length > 0) && parameters[0].parameters;
- $.jsonParse = function (str) {
- var retData = JSON.parse(str, function (k, v) {
- try { return $.jsonParse(v); } catch (e) { return v; }
- });
- return retData;
- };
- $.Params = {};
- $.Params.deactiveMapIds = eval(parameters["Deactive Map Ids"].replace(/\"/g, ""));
- var alias_Game_Map_setup = Game_Map.prototype.setup;
- Game_Map.prototype.setup = function(mapId) {
- alias_Game_Map_setup.call(this, mapId);
- let valid = $.Params.deactiveMapIds.filter(function(id) {
- return id === mapId;
- }, this);
- if(valid.length > 0) {
- $gameVariables.SetStopScript(true);
- } else {
- $gameVariables.SetStopScript(false);
- }
- };
- })(RS.TerraxLighting_ActiveControl);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement