phantom-soul-sword-lambda-n.../www/js/plugins/MapNameinSaveData.js
2025-07-11 18:31:55 -07:00

54 lines
No EOL
1.7 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// --------------------------------------------------------------------------
//
// MapNameinSaveData.js
//
// Copyright (c) kotonoha*
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
//
// 2016/06/13 ver1.0 プラグイン公開
//
// --------------------------------------------------------------------------
/*:
* @plugindesc セーブデータ上に現在マップ名を載せるプラグイン
* @author kotonoha*
* @help セーブデータ上に現在マップの表示名を載せるプラグインです。
*
*/
(function() {
DataManager.makeSavefileInfo = function() {
var info = {};
info.globalId = this._globalId;
info.title = $dataSystem.gameTitle;
info.mapname    = $gameMap.displayName();
info.characters = $gameParty.charactersForSavefile();
info.faces = $gameParty.facesForSavefile();
info.playtime = $gameSystem.playtimeText();
info.timestamp = Date.now();
return info;
};
Window_SavefileList.prototype.drawContents = function(info, rect, valid) {
var bottom = rect.y + rect.height;
if (rect.width >= 420) {
this.drawGameMapName(info, rect.x + 192, rect.y, rect.width - 192);
if (valid) {
this.drawPartyCharacters(info, rect.x + 220, bottom - 4);
}
}
var lineHeight = this.lineHeight();
var y2 = bottom - lineHeight;
if (y2 >= lineHeight) {
this.drawPlaytime(info, rect.x + 190, rect.y, rect.width - 192);
}
};
Window_SavefileList.prototype.drawGameMapName = function(info, x, y, width) {
if (info.mapname) {
this.drawText(info.mapname, x, y, width);
}
};
})();