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

no ocean no windmill #126

Closed
sem-geologist opened this issue Apr 13, 2023 · 3 comments
Closed

no ocean no windmill #126

sem-geologist opened this issue Apr 13, 2023 · 3 comments

Comments

@sem-geologist
Copy link

sem-geologist commented Apr 13, 2023

This is really great mod! I however have trouble with windmills when playing at EmptyStar's Asuna game. The problem there is that biomes are sanitized, and small water pools are no more called something_something_ocean, but [biome_name]_below . That way the river or small "puddle" are no more called "ocean". I tested map with same seed on mtg, and I can place windmill just at any bigger water body just few meters away from spawn (even wide river, which I had not expected). in Asuna game I traveled 6000m in all directions and even widest found water bodies (no land visible nearby) the biome was still called *_below.

The fix which comes to my mind: maybe it would be possible to parametrize string which needs to be looked within biome string. In case the Asuna pack would be detected, instead of "ocean" string "below" could be looked with string.find to meet the conditions for wind powerplant. (function techage.valid_place_for_windturbine() in basis/windturbine_lib.lua)

joe7575 added a commit that referenced this issue Apr 13, 2023
@joe7575
Copy link
Owner

joe7575 commented Apr 13, 2023

Give it a try...

@sem-geologist
Copy link
Author

sem-geologist commented Apr 14, 2023

As for our game that worked.

However, I would not be keen to ask to make hardcoded fix, especially that Asuna game is not so well tested and still AFAIK WIP.

I asked myself, but what if there would be biome with ocean in its name in Asuna Game, this fix would then prevent building the windmill on real ocean?

I looked more into asuna's code, looks it defines *_below (sub)biome types in between:

y_min = -256,
y_max = -1,

While AFAIU Asuna game is intended to be used with v7 mapgen; To confirm the state with oceans (or lack of it) I had tested it also with carpathian mapgen (where asuna game looks working too). Carpathian mapgen gives much larger/wider water bodies and I find that even there biomes are still called [base_biome]_below,

so this kind of conditional fix should be OK.
How about making the OCEAN string configurable?

@sem-geologist
Copy link
Author

So as the proposed commit fixes this issue I am closing this.
Thanks a lot for really cool mod.

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

No branches or pull requests

2 participants