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

lua_api.txt clarifications regarding mapgen object index IDs and handles. #8713

Merged
merged 2 commits into from Jul 29, 2019

Conversation

shacknetisp
Copy link
Contributor

@shacknetisp shacknetisp commented Jul 25, 2019

Currently there is no mention that these are different, so it took a while of trial and error before I discovered that minetest.get_decoration_id's return was actually different from minetest.register_decoration's return value.

@paramat paramat added @ Documentation One approval ✅ ◻️ Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines and removed One approval ✅ ◻️ labels Jul 25, 2019
@SmallJoker
Copy link
Member

minetest.register_ore and minetest.register_biome "suffer" from the same issue. Please refer to the mapgen object-specific getter functions for all of them.

@shacknetisp shacknetisp changed the title Clarify that register_decoration()'s return is not used in gennotify. lua_api.txt clarifications regarding mapgen object index IDs and handles. Jul 26, 2019
@shacknetisp
Copy link
Contributor Author

I've generalized this more to differentiate between biome/decoration/etc. index IDs and their object handles.

doc/lua_api.txt Outdated Show resolved Hide resolved
@paramat paramat removed the Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines label Jul 27, 2019
@shacknetisp
Copy link
Contributor Author

Outside the scope of this PR, but there are some tabulators here:

minetest/doc/lua_api.txt

Lines 2062 to 2067 in 8efa1de

* `x` - The middle will be x pixels from all sides.
* `x,y` - The middle will be x pixels from the horizontal and y from the vertical.
* `x,y,x2,y2` - The middle will start at x,y, and end at x2, y2. Negative x2 and y2 values
will be added to the width and height of the texture, allowing it to be used as the
distance from the far end.
* All numbers in middle are integers.

@paramat
Copy link
Contributor

paramat commented Jul 28, 2019

👍

@sfan5 sfan5 merged commit 50052fc into minetest:master Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants