18 lines
No EOL
675 B
JavaScript
18 lines
No EOL
675 B
JavaScript
/*:
|
|
* @plugindesc ウィンドウの各種表示に計算/関数を追加します
|
|
* @author suzu
|
|
* @help ウィンドウの表示に計算を使用可能になります
|
|
*
|
|
* 使い方:\F[計算式]
|
|
*
|
|
*/
|
|
(function(){
|
|
var _Window_Base_convertEscapeCharacters = Window_Base.prototype.convertEscapeCharacters;
|
|
Window_Base.prototype.convertEscapeCharacters = function(text) {
|
|
let _text = _Window_Base_convertEscapeCharacters.call(this, text);
|
|
_text = _text.replace(/\x1bF\[(.*?)\]/gi, function(){
|
|
return Function(`'use strict'; return (${arguments[1]});`)();
|
|
}.bind(this));
|
|
return _text;
|
|
};
|
|
})(); |