Skip to content

Commit

Permalink
Merge pull request #128 from yktsr/126-add-error-message-for-users
Browse files Browse the repository at this point in the history
Release 2.2.4
  • Loading branch information
yktsr authored Oct 7, 2024
2 parents d9b3d26 + 2ed14a5 commit 8a15afd
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 9 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2023 Yuki Katsura
Copyright (c) 2018-2024 Yuki Katsura

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Text2Frame
Simple compiler to convert text to event.

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

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

Expand Down
9 changes: 8 additions & 1 deletion Text2Frame.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,14 @@ const require$$1 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1
const _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.apply(this, arguments);
this.pluginCommandText2Frame(command, args);
const isDevelopment = Utils.isOptionValid("test");
if (isDevelopment) {
this.pluginCommandText2Frame(command, args);
} else {
$gameMessage.add("Text2Frameは開発専用プラグインであり、デプロイメント後は");
$gameMessage.add("動作しません。このメッセージが繰り返し表示される場合は、");
$gameMessage.add("このプラグインをOFFにしてデプロイメントしてください。");
}
};
Game_Interpreter.prototype.pluginCommandText2Frame = function(command, args) {
const addMessage = function(text) {
Expand Down
9 changes: 8 additions & 1 deletion Text2Frame.es.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,14 @@ const require$$1 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1
const _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.apply(this, arguments);
this.pluginCommandText2Frame(command, args);
const isDevelopment = Utils.isOptionValid("test");
if (isDevelopment) {
this.pluginCommandText2Frame(command, args);
} else {
$gameMessage.add("Text2Frameは開発専用プラグインであり、デプロイメント後は");
$gameMessage.add("動作しません。このメッセージが繰り返し表示される場合は、");
$gameMessage.add("このプラグインをOFFにしてデプロイメントしてください。");
}
};
Game_Interpreter.prototype.pluginCommandText2Frame = function(command, args) {
const addMessage = function(text) {
Expand Down
17 changes: 13 additions & 4 deletions Text2Frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 2.2.4 2024/10/06:
// ・#126 プロジェクトを本番用にデプロイメント後、プラグインを実行しようとすると警告メッセージを表示するように改善
// 2.2.3 2024/09/07:
// ・#125 プラグインコマンドMZを変換する際、オブジェクト型を取り扱えない不具合の修正
// 2.2.2 2024/02/27:
Expand Down Expand Up @@ -4037,12 +4039,12 @@
* --------------------------------------
* Version
* --------------------------------------
* 2.2.3
* build: 81bc070a76bcd0246713b2872df90650ffc7ce70
* 2.2.4
* build: ba571817ab4daf5e0aa98cf82f15efc6efeec6c0
*/
/* eslint-enable spaced-comment */

/* global Game_Interpreter, $gameMessage, process, PluginManager */
/* global Game_Interpreter, $gameMessage, process, PluginManager, Utils */

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

Game_Interpreter.prototype.pluginCommandText2Frame = function (command, args) {
Expand Down
9 changes: 8 additions & 1 deletion Text2Frame.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,14 @@
const _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.apply(this, arguments);
this.pluginCommandText2Frame(command, args);
const isDevelopment = Utils.isOptionValid("test");
if (isDevelopment) {
this.pluginCommandText2Frame(command, args);
} else {
$gameMessage.add("Text2Frameは開発専用プラグインであり、デプロイメント後は");
$gameMessage.add("動作しません。このメッセージが繰り返し表示される場合は、");
$gameMessage.add("このプラグインをOFFにしてデプロイメントしてください。");
}
};
Game_Interpreter.prototype.pluginCommandText2Frame = function(command, args) {
const addMessage = function(text) {
Expand Down

0 comments on commit 8a15afd

Please sign in to comment.