Closed bubblobill closed 11 months ago
This change has broken all the functions it touches. E.g., getMacros()
went from
if (parameters.get(1).toString().equalsIgnoreCase("campaign")) {
return getMacros(delim, MapTool.getCampaign().getMacroButtonPropertiesArray());
} else if (parameters.get(1).toString().equalsIgnoreCase("gm")) {
return getMacros(delim, MapTool.getCampaign().getGmMacroButtonPropertiesArray());
} else {
Token token = FunctionUtil.getTokenFromParam(resolver, functionName, parameters, 1, 2);
return getMacros(delim, token);
}
to
if (parameters.size() > 1) {
if (parameters.get(1).toString().equalsIgnoreCase("campaign")) {
return getMacros(delim, MapTool.getCampaign().getMacroButtonPropertiesArray());
} else if (parameters.get(1).toString().equalsIgnoreCase("gm")) {
return getMacros(delim, MapTool.getCampaign().getGmMacroButtonPropertiesArray());
}
} else {
Token token = FunctionUtil.getTokenFromParam(resolver, functionName, parameters, 1, 2);
return getMacros(delim, token);
}
So there is now no way to use this function with parameters, unless we happen to use the new "campaign"
or "gm"
options.
This change broken all the functions it touches. E.g.,
getMacros()
went fromSo there is now no way to use this function with parameters, unless we happen to use the new
"campaign"
or"gm"
options.
Hmmm... that could be problematic. Just a little bit. That being said, it will only break every framework known to man,
Fixed the fix. Properly this time. Complete with lots of testing to prevent future embarrassment
Awesome, looks good now!
Describe the Bug
https://discord.com/channels/296230822262865920/905157521193455676/1188456999755714610
To Reproduce
use metamacro function without all optional parameters
Expected Behaviour
should function cleanly
Screenshots
No response
MapTool Info
No response
Desktop
No response
Additional Context
No response