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

Swap (found) and (building) variables in 7A ulocate documentation #128

Closed
wants to merge 1 commit into from
Closed

Swap (found) and (building) variables in 7A ulocate documentation #128

wants to merge 1 commit into from

Conversation

limonovthesecond2
Copy link
Contributor

The variables found and building are swapped in the last 4 examples of ulocate. This PR puts them in place

@cardillan
Copy link
Owner

The original version is actually correct. There's language target 7, which is the default, and in that one the function parameters are mapped as you expect. This file documents language target 7A, which needs to be explicitly selected (e.g. by #set target = ML7AS compiler directive); in this language target these functions return the located block/building instead of the found flag.

The difference between 7 and 7A is described here - perhaps it might be worded a little bit better.

As I've mentioned elsewhere, I plan to make changes to the syntax that will break at least some existing code, as part of this change I'll make the 7A target the default.

Additionally, these files (FUNCTIONS_*.markdown) are generated automatically based on the information in the MindustryOpcodeVariants.java file (there's a unit test that creates/modifies these files - it's probably an abuse of unit tests). Any changes you make to these files will get overwritten the next time the project is built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants