Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacroScript Functions that use case sensitive comparisons on function name should be changed to use case insensitive comparisons #3013

Closed
36 tasks
cwisniew opened this issue Oct 6, 2021 · 1 comment · Fixed by #3015
Assignees
Labels
bug good first issue A good issue for people wanting to contribute to start with Hacktoberfest little or no coding Little or no coding is required

Comments

@cwisniew
Copy link
Member

cwisniew commented Oct 6, 2021

Describe the bug
As pointed out in #3011 there are several macro script functions that use case sensitive comparison within the function to check which function was called.

These should all be case insensitive searches, if they are not at best user gets a message saying function is not defined which is inconsistent with other functions, in the worst case the wrong function gets executed.

The list of files that definitely need to be checked/modified

  • ChatFunction.java
  • CurrentInitiativeFunction.java
  • DefineMacroFunction.java
  • EvalMacroFunctions.java
  • ExportDataFunctions.java
  • FindTokenFunctions.java
  • FogOfWarFunctions.java
  • HeroLabFunctions.java
  • InitiativeRoundFunction.java
  • JSONMacroFunctionsOld.java
  • MacroArgsFunctions.java
  • MacroDialogFunctions.java
  • MapFunctions.java
  • MathFunctions.java
  • MiscInitiativeFunction.java
  • ParserPropertyFunctions.java
  • PlayerNameFunctions.java
  • RemoveAllFromInitiativeFunction.java
  • RESTfulFunctions.java
  • StringFunctions.java
  • TokenBarFunction.java
  • TokenCopyDeleteFunctions.java
  • TokenGMNameFunction.java
  • TokenHaloFunction.java
  • TokenImage.java
  • TokenLabelFunction.java
  • TokenLocationFunctions.java
  • TokenMoveFunctions.java
  • TokenPropertyFunctions.java
  • TokenSelectionFunctions.java
  • TokenSightFunctions.java
  • TokenSpeechFunctions.java
  • TokenStateFunction.java
  • TokenTerrainModifierFunctions.java
  • TokenVisibleFunction.java
  • Topology_Functions.java

To Reproduce
Steps to reproduce the behaviour:
Run any of the above functions with the wrong case.

Expected behaviour
All MTScript functions should be case insensitive as that's how the parser is treating them.

Screenshots
If applicable, add screenshots to help explain your problem.

MapTool Info

  • Current develop branch (but many many released version)

Desktop (please complete the following information):

  • All

Additional context
For anyone wanting to tackle this feel free to split it up into several issues to make it easier to tackle, but please not dozens of PRs at the same time with just one or two done in each of them (unless you are already editing that file for another change).

@cwisniew cwisniew added bug up for grabs Minimal context and are well-suited for new contributors little or no coding Little or no coding is required good first issue A good issue for people wanting to contribute to start with Hacktoberfest labels Oct 6, 2021
@PaulKovalov
Copy link
Contributor

Assign this to me please

@Phergus Phergus removed the up for grabs Minimal context and are well-suited for new contributors label Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue A good issue for people wanting to contribute to start with Hacktoberfest little or no coding Little or no coding is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants