I've noticed that the @require option does not work when put into a struct and this struct is used within a plugin command. In plugin parameters it works fine and when it is a direct field of a plugin command it works fine as well.
To reproduce:
I've saved the following code in a file named TestUnusedFiles.js and put it into my plugins folder:
Then I've setuped the plugin parameters like this, where TestUnusedFiles.js is the only plugin active.
And I've created a event calling the too plugin commands with yet again different face image files:
Now I went into deployment and checked "Exclude unused files":
And the output was this (SF_Actors1 from Plugin Parameters taken, SF_Actors3 form PluginCommand TestCommand2 taken, SF_Actors2 from PluginCommand TestCommand not taken):
I would have expected SF_Actors2.png_ to appear in the output folder as well.
If this is not a bug, but intended then please tell me.
To reproduce:
I've saved the following code in a file named TestUnusedFiles.js and put it into my plugins folder:
JavaScript:
/*~struct~Test:
* @param file
* @text File
* @type file
* @dir img/faces
* @require 1
* @desc Test face image for option "Exclude unused files"
*/
/*:
* @target MZ
* @plugindesc v1.0 Text "Exclude Unused Files"
*
* @command TestCommand
* @desc Just a command to test option "Exclude unused files"
*
* @arg file
* @text File
* @type struct<Test>
* @desc Test face image for option "Exclude unused files"
*
* @command TestCommand2
* @desc Just a command to test option "Exclude unused files"
*
* @arg file
* @text File
* @type file
* @dir img/faces
* @require 1
* @desc Test face image for option "Exclude unused files"
*
* @param file
* @text File
* @type struct<Test>
* @desc Test face image for option "Exclude unused files"
*/
PluginManager.registerCommand('TestUnusedFiles', 'TestCommand', function(args)
{
ImageManager.load(args.file.file);
});
PluginManager.registerCommand('TestUnusedFiles', 'TestCommand2', function(args)
{
ImageManager.load(args.file);
});
Then I've setuped the plugin parameters like this, where TestUnusedFiles.js is the only plugin active.
And I've created a event calling the too plugin commands with yet again different face image files:
Now I went into deployment and checked "Exclude unused files":
And the output was this (SF_Actors1 from Plugin Parameters taken, SF_Actors3 form PluginCommand TestCommand2 taken, SF_Actors2 from PluginCommand TestCommand not taken):
I would have expected SF_Actors2.png_ to appear in the output folder as well.
If this is not a bug, but intended then please tell me.