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

Default: Allow papyrus growing on default:sand #654

Closed
wants to merge 1 commit into from
Closed

Default: Allow papyrus growing on default:sand #654

wants to merge 1 commit into from

Conversation

paramat
Copy link
Contributor

@paramat paramat commented Aug 29, 2015

Also:
Mgv5/mgv7 papyrus schematic now has sand nodes as a base
Add beaches of default:sand to mgv5/mgv7 deserts

screenshot_20150830_001944

^ This commit

screenshot_20150830_002323

^ Currently

Sand base nodes blend with beaches and shallow water, it looks better.
In mgv5/mgv7 papyrus grows in shallow water in savanna and desert biomes, allowing papyrus to grow on sand allows growing on the beaches of these biomes without having to place dirt there first. In reality papyrus can grow in wet sandy soil.
The sand around the papyrus base can be considered sand that has got caught-up in, and collected around, the base of the papyrus.

@@ -152,7 +152,8 @@ end
function default.grow_papyrus(pos, node)
pos.y = pos.y - 1
local name = minetest.get_node(pos).name
if name ~= "default:dirt_with_grass" and name ~= "default:dirt" then
if name ~= "default:dirt_with_grass" and name ~= "default:dirt" and
name ~= "group:sand" then
Copy link
Contributor

Choose a reason for hiding this comment

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

if not name:find("dirt") and not name:find("sand") then

Copy link
Member

Choose a reason for hiding this comment

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

  • We don't want papyrus to grow on sandworm_spawners or on stuff registered by a toolsandblocks mod. Yes I made those examples up but we didn't ever do this in any other code, why do it here?
  • Does this actually work? I don't think the name will be "group:sand" if it's in the sand group. Don't you need to look up the table of registered nodes for that?
  • Also isn't the node parameter to the function the exact same thing as minetest.get_node(pos)? If that is the case then the method call would be duplicate.

Mgv5/mgv7 papyrus schematic now has sand nodes as a base
Add sand beach to mgv5/mgv7 deserts
@paramat
Copy link
Contributor Author

paramat commented Aug 30, 2015

Updated. Thanks for catching 'name' not working with 'group:sand'.
'get node (pos)' is needed because we are checking the node below the function 'node', that code is as before and correct.

I changed the added fertile node to be default:sand only, assumed to be wet sand near water.
I also added beaches of default:sand to desert biomes so that papyrus can be grown there.

@paramat paramat changed the title Default: Allow papyrus growing on sand group Default: Allow papyrus growing on default sand Aug 31, 2015
@paramat paramat changed the title Default: Allow papyrus growing on default sand Default: Allow papyrus growing on default:sand Aug 31, 2015
@sfan5
Copy link
Member

sfan5 commented Aug 31, 2015

👍

@paramat
Copy link
Contributor Author

paramat commented Aug 31, 2015

4d9b595

@paramat paramat closed this Aug 31, 2015
@paramat paramat deleted the paponsand branch September 4, 2015 22:28
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.

None yet

3 participants