do-disciplinary-committee-m.../www/js/plugins/MW_SkillScene.js
2025-05-04 14:43:03 -05:00

64 lines
No EOL
2.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//=============================================================================
// MW_SkillScene.js
//=============================================================================
/*:
* @plugindesc スキルパネルメニュー表示時に画面の中心を変更する
* @author 銀河
* @help
* スキルパネルメニュー表示時に画面の中心を変更するプラグインです。
* 指定したスイッチがOFFまたは0の場合、画面の位置は変わりません。
*
* @param 許可変数
* @type variable
* @desc 画面の中心の変更を許可する変数を指定します初期値0
* @default 0
* @min 0
*/
//本屋ミニゲーム時(251)
//野球拳ミニゲーム時(238)
(function() {
var parameters = PluginManager.parameters('MW_SkillScene');
var EnableID = Number(parameters['許可スイッチ'] || 0);
var _Game_Player_prototype_centerX = Game_Player.prototype.centerX;
var _Game_Player_prototype_centerY = Game_Player.prototype.centerY;
Game_Player.prototype.centerX = function() {
if($gameSwitches.value(657)){
return ((Graphics.width-264) / $gameMap.tileWidth() - 1) / 2.0; //202030717 スイッチを251→657に変更本屋イベント以外の立ち絵エロの座標がおかしくなるため
}
else if((EnableID!=0)&&($gameSwitches.value(EnableID))){
return ((Graphics.width+374) / $gameMap.tileWidth() - 1) / 2.0;
}
else if($gameSwitches.value(238)){
return ((Graphics.width-336) / $gameMap.tileWidth() - 1) / 2.0;
}
else if($gameSwitches.value(789)){
return ((Graphics.width-300) / $gameMap.tileWidth() - 1) / 2.0;
}
else{
return (Graphics.width / $gameMap.tileWidth() - 1) / 2.0;
}
};
Game_Player.prototype.centerY = function() {
if($gameSwitches.value(657)){
return ((Graphics.height-24) / $gameMap.tileHeight() - 1) / 2.0; //202030717 スイッチを251→657に変更本屋イベント以外の立ち絵エロの座標がおかしくなるため
}
else if((EnableID!=0)&&($gameSwitches.value(EnableID))){
return ((Graphics.height-179) / $gameMap.tileHeight() - 1) / 2.0;
}
else if($gameSwitches.value(238)){
return ((Graphics.height-48) / $gameMap.tileHeight() - 1) / 2.0;
}
else if($gameSwitches.value(789)){
return ((Graphics.height-48) / $gameMap.tileHeight() - 1) / 2.0;
}
else{
return (Graphics.height / $gameMap.tileHeight() - 1) / 2.0;
}
};
})();