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

Support negating conditions results #9

Closed
wipe2238 opened this issue May 16, 2021 · 0 comments
Closed

Support negating conditions results #9

wipe2238 opened this issue May 16, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@wipe2238
Copy link
Member

wipe2238 commented May 16, 2021

To avoid duplicating conditions code (IfEdited+IfNotEdited, IfArgumentValue+IfArgumentNotValue, etc.), it should be possible to add ! before condition name to negate its result.

# Force scripts to use `bwand` instead of `==` when checking if player on worldmap
# get_game_mode ??? WORLDMAP -> get_game_mode bwand WORLDMAP
GetGameModeFix = RunAfter IfVariable:get_game_mode !IfOperatorName:BitwiseAnd IfOperatorValue:WORLDMAP DoOperatorSet:bwand,WORLDMAP

Currently all condition functions returns either true or false, and there is no way to distinguish between failed check or any kind of error (wrong number of If arguments, trying to check arguments when script code part is variable, etc).

@wipe2238 wipe2238 added the enhancement New feature or request label May 16, 2021
@wipe2238 wipe2238 added this to the Release milestone May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant