/*:
@plugindesc Hot fix patch to permit escape sequences in map display names
@author Coelocanth
@help
In RPGMaker MV (1.6.1), using escape sequences in map display names does not
work. For example, if you give a map the display name "\n[1]'s Cottage",
you'd expect it to display "Fred's Cottage", or "Joe's Cottage", depending
what the player named the first actor.

This plugin makes that work. There is no configuration required, but you
may need to take care of plugin order in case other plugins modify the map
name window.

This plugin can be used for any purpose permitted by the RPGMaker MV.
*/

Window_MapName.prototype.refresh = function() {
    this.contents.clear();
    if ($gameMap.displayName()) {
        var width = this.contentsWidth();
        this.drawBackground(0, 0, width, this.lineHeight());
		var text = this.convertEscapeCharacters($gameMap.displayName());
        this.drawText(text, 0, 0, width, 'center');
    }
};