Skip to content

Commit 8a15afd

Browse files
authored
Merge pull request #128 from yktsr/126-add-error-message-for-users
Release 2.2.4
2 parents d9b3d26 + 2ed14a5 commit 8a15afd

File tree

6 files changed

+40
-9
lines changed

6 files changed

+40
-9
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018-2023 Yuki Katsura
3+
Copyright (c) 2018-2024 Yuki Katsura
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Text2Frame
22
Simple compiler to convert text to event.
33

4-
![Node.js CI](https://github.com/yktsr/Text2Frame-MV/workflows/Node.js%20CI/badge.svg?branch=master)
4+
![Node.js CI](https://github.com/yktsr/Text2Frame-MV/actions/workflows/nodejs.yml/badge.svg)
5+
![CodeQL](https://github.com/yktsr/Text2Frame-MV/actions/workflows/github-code-scanning/codeql/badge.svg)
56

67
テキストファイル(.txtファイルなど)から「文章の表示」イベントコマンドに簡単に変換するための、RPGツクールMV・MZ用の開発支援プラグインです。
78

Text2Frame.cjs.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ const require$$1 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1
115115
const _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
116116
Game_Interpreter.prototype.pluginCommand = function(command, args) {
117117
_Game_Interpreter_pluginCommand.apply(this, arguments);
118-
this.pluginCommandText2Frame(command, args);
118+
const isDevelopment = Utils.isOptionValid("test");
119+
if (isDevelopment) {
120+
this.pluginCommandText2Frame(command, args);
121+
} else {
122+
$gameMessage.add("Text2Frameは開発専用プラグインであり、デプロイメント後は");
123+
$gameMessage.add("動作しません。このメッセージが繰り返し表示される場合は、");
124+
$gameMessage.add("このプラグインをOFFにしてデプロイメントしてください。");
125+
}
119126
};
120127
Game_Interpreter.prototype.pluginCommandText2Frame = function(command, args) {
121128
const addMessage = function(text) {

Text2Frame.es.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,14 @@ const require$$1 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1
114114
const _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
115115
Game_Interpreter.prototype.pluginCommand = function(command, args) {
116116
_Game_Interpreter_pluginCommand.apply(this, arguments);
117-
this.pluginCommandText2Frame(command, args);
117+
const isDevelopment = Utils.isOptionValid("test");
118+
if (isDevelopment) {
119+
this.pluginCommandText2Frame(command, args);
120+
} else {
121+
$gameMessage.add("Text2Frameは開発専用プラグインであり、デプロイメント後は");
122+
$gameMessage.add("動作しません。このメッセージが繰り返し表示される場合は、");
123+
$gameMessage.add("このプラグインをOFFにしてデプロイメントしてください。");
124+
}
118125
};
119126
Game_Interpreter.prototype.pluginCommandText2Frame = function(command, args) {
120127
const addMessage = function(text) {

Text2Frame.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// http://opensource.org/licenses/mit-license.php
77
// ----------------------------------------------------------------------------
88
// Version
9+
// 2.2.4 2024/10/06:
10+
// ・#126 プロジェクトを本番用にデプロイメント後、プラグインを実行しようとすると警告メッセージを表示するように改善
911
// 2.2.3 2024/09/07:
1012
// ・#125 プラグインコマンドMZを変換する際、オブジェクト型を取り扱えない不具合の修正
1113
// 2.2.2 2024/02/27:
@@ -4037,12 +4039,12 @@
40374039
* --------------------------------------
40384040
* Version
40394041
* --------------------------------------
4040-
* 2.2.3
4041-
* build: 81bc070a76bcd0246713b2872df90650ffc7ce70
4042+
* 2.2.4
4043+
* build: ba571817ab4daf5e0aa98cf82f15efc6efeec6c0
40424044
*/
40434045
/* eslint-enable spaced-comment */
40444046

4045-
/* global Game_Interpreter, $gameMessage, process, PluginManager */
4047+
/* global Game_Interpreter, $gameMessage, process, PluginManager, Utils */
40464048

40474049
(function () {
40484050
'use strict'
@@ -4126,7 +4128,14 @@
41264128
const _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand
41274129
Game_Interpreter.prototype.pluginCommand = function (command, args) {
41284130
_Game_Interpreter_pluginCommand.apply(this, arguments)
4129-
this.pluginCommandText2Frame(command, args)
4131+
const isDevelopment = Utils.isOptionValid('test')
4132+
if (isDevelopment) {
4133+
this.pluginCommandText2Frame(command, args)
4134+
} else {
4135+
$gameMessage.add('Text2Frameは開発専用プラグインであり、デプロイメント後は')
4136+
$gameMessage.add('動作しません。このメッセージが繰り返し表示される場合は、')
4137+
$gameMessage.add('このプラグインをOFFにしてデプロイメントしてください。')
4138+
}
41304139
}
41314140

41324141
Game_Interpreter.prototype.pluginCommandText2Frame = function (command, args) {

Text2Frame.umd.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,14 @@
118118
const _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
119119
Game_Interpreter.prototype.pluginCommand = function(command, args) {
120120
_Game_Interpreter_pluginCommand.apply(this, arguments);
121-
this.pluginCommandText2Frame(command, args);
121+
const isDevelopment = Utils.isOptionValid("test");
122+
if (isDevelopment) {
123+
this.pluginCommandText2Frame(command, args);
124+
} else {
125+
$gameMessage.add("Text2Frameは開発専用プラグインであり、デプロイメント後は");
126+
$gameMessage.add("動作しません。このメッセージが繰り返し表示される場合は、");
127+
$gameMessage.add("このプラグインをOFFにしてデプロイメントしてください。");
128+
}
122129
};
123130
Game_Interpreter.prototype.pluginCommandText2Frame = function(command, args) {
124131
const addMessage = function(text) {

0 commit comments

Comments
 (0)