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

[Rebase] Implement check_offset for decorations #13523

Merged
merged 1 commit into from Jun 15, 2023

Conversation

Montandalar
Copy link
Contributor

This is purely a rebase of #13152 - all credit goes the original author @nephele-gh.

This rebase was discussed on the Minetest Matrix before I did it and the author gave permission. I don't meant to step on anyone's toes, I just wanted to keep an otherwise perfectly fine PR moving. If this is not the way to do things in future, that's fine. On the flipside, if there are other PRs that would like this, I could help with those.

@Zughy Zughy added Feature ✨ PRs that add or enhance a feature @ Script API One approval ✅ ◻️ labels May 23, 2023
@rubenwardy rubenwardy added the Concept approved Approved by a core dev: PRs welcomed! label May 27, 2023
Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works. Test with the following code:

minetest.register_decoration({
	name = "DEMO CHECK OFFSET",
	deco_type = "simple",
	place_on = {"default:sand"},
	spawn_by = {"default:sand"},
	fill_ratio = 10,
	decoration = "default:wood",
	check_offset = 1,
	height = 10,
	num_spawn_by = 5,
})

This requires results in some sort of steep hill detection which might be interesting for plant spawning. Here's the result of altering the check_offset value:

out

@sfan5 sfan5 merged commit ba80d1c into minetest:master Jun 15, 2023
13 checks passed
@Montandalar Montandalar deleted the patch-2 branch July 17, 2023 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Concept approved Approved by a core dev: PRs welcomed! Feature ✨ PRs that add or enhance a feature @ Script API >= Two approvals ✅ ✅
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants