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

support for custom chunksizes #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

heavygale
Copy link
Contributor

landrush.get_chunk(pos) -> Without this fix claimed areas shown by hud.lua are .5 too big or too small (the border was in the middle of the blocks).

landrush.get_chunk_center(pos) -> Fix for landrush:showarea position when using a custom chunksize.

Existing landclaims with chunksize>16 may move by 1 block with this changes.

Thanks to Ducky!

landrush.get_chunk(pos) -> Without this fix claimed areas shown by hud.lua are .5 too big or too small (the border was in the middle of the blocks).

landrush.get_chunk_center(pos) -> Fix for landrush:showarea position when using a custom chunksize.

Existing landclaims with chunksize>16 may move by 1 block with this changes.

Thanks to Ducky!
@@ -14,12 +14,12 @@ function landrush.get_chunk(pos)
end


local z = math.floor(pos.z/landrush.config:get("chunkSize"))
local z = math.floor((pos.x+.5)/landrush.config:get("chunkSize"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo in (pos.x+.5)

@SmallJoker
Copy link
Contributor

SmallJoker commented Aug 3, 2016

Existing landclaims with chunksize>16 may move by 1 block with this changes.

When you change it from 16 to 18, it would move the 2nd claim by two nodes, the 3rd by four, the 4th by six and so on. DO NOT CHANGE THIS ON AN EXISTING MAP, NEVER EVER.

@t4im
Copy link
Contributor

t4im commented Aug 20, 2016

You should rename the setting to "landrush.claim_size" when at it to avoid clashing terminology with minetest upstream.

16 is always minetest.MAP_BLOCKSIZE
and chunksize is usually 5 (meaning a chunk is 5 times the blocksize)

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.

3 participants