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

GenerateBorder modifier not compatible with NoiseGenerator #181

Open
Zehir opened this issue Jan 17, 2025 · 1 comment · May be fixed by #182
Open

GenerateBorder modifier not compatible with NoiseGenerator #181

Zehir opened this issue Jan 17, 2025 · 1 comment · May be fixed by #182

Comments

@Zehir
Copy link

Zehir commented Jan 17, 2025

Hello,

For some reason the GenerateBorder modifier is not compatible with NoiseGenerator but it's worked.

I used the NoiseGenerator to generate an island and wanted to use the GenerateBorder modifier for the beach.

But the code of the modifier is checking for a tile property;

func apply(grid: GaeaGrid, generator: GaeaGenerator) -> void:
# Check if the generator has a "settings" variable and if those
# settings have a "tile" variable.
if not generator.get("settings") or not generator.settings.get("tile"):
push_warning("GenerateBorder modifier not compatible with %s" % generator.name)
return

The NoiseGenerator don't have a tile property but a tiles property.
If I manually update the guard clause to allow the NoiseGenerator I get correct result;

Image
The water was added using the GenerateBorder modifier.

Is there any side beavior I don't see there ?

@cullumi
Copy link
Contributor

cullumi commented Jan 21, 2025

From what I can tell, you're spot on! The Generate Borders method does not even use the Generator Settings at all; we should actually be able to remove the guard clause entirely. It can always be added in should the functionality of the Generate Borders modifier change in the future.

@cullumi cullumi linked a pull request Jan 22, 2025 that will close this issue
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 a pull request may close this issue.

2 participants