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

Convert fences to NDT_CONNECTED. #873

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@sofar
Copy link
Member

sofar commented Feb 25, 2016

This changes the drawtype of fences to NDT_CONNECTED
nodebox drawtype.

These nodes are drawn by the client with the needed
connections on the fly as the scene is drawn. There is
no logic needed by mods to modify the nodes.

These fences connect to (1) other fences, (2) planks
and (3) tree trunks, but nothing else. They do not
connect to stone, dirt, wool, etc. This is done by
the "connects_to" parameter, which takes groups and
node names.

This change requires minetest/minetest#3503.

@C1ffisme

This comment has been minimized.

Copy link

C1ffisme commented Feb 25, 2016

👍 Very good. Let's kill the uncreative "fencelike" for good.

@sofar

This comment has been minimized.

Copy link
Member Author

sofar commented Feb 25, 2016

Removed spaces inside brackets.

@paramat

This comment has been minimized.

Copy link
Member

paramat commented Feb 25, 2016

Seems a good idea.

@sofar

This comment has been minimized.

Copy link
Member Author

sofar commented Feb 26, 2016

I made a special tile for this so they look identical to the current fences, too.

@sofar sofar referenced this pull request Feb 26, 2016

Closed

Add a simple, but stylish fence gate. #877

3 of 3 tasks complete
@paramat

This comment has been minimized.

Copy link
Member

paramat commented Feb 26, 2016

👍

connect_s = {{-1/16,3/16,-1/2,1/16,5/16,-1/8},
{-1/16,-5/16,-1/2,1/16,-3/16,-1/8}},
},
connects_to = {"group:fence", "group:wood", "group:tree"},

This comment has been minimized.

@ShadowNinja

ShadowNinja Feb 27, 2016

Member

It may make more sense for, eg, stone fences to connect to stone. In fact, why not all solid nodes?

This comment has been minimized.

@paramat

paramat Feb 27, 2016

Member

I guess this is the default and stone fences can override with their own 'connects to'.

This comment has been minimized.

@sofar

sofar Feb 27, 2016

Author Member

walls are made out of stone:#796

sofar@0c7d441#diff-c967da67b272f4b656ff35c5d13941cdR33

Which is why I proposed to add these basic wall nodes :)

@paramat paramat added the One approval label Mar 2, 2016

@Ekdohibs

This comment has been minimized.

Copy link
Member

Ekdohibs commented Mar 3, 2016

👍

@Ekdohibs Ekdohibs added this to the 0.4.14 milestone Mar 3, 2016

Convert fences to NDT_CONNECTED.
This changes the drawtype of fences to NDT_CONNECTED nodebox drawtype.

These nodes are drawn by the client with the needed connections on
the fly as the scene is drawn. There is no logic needed by mods to
modify the nodes.

These fences connect to (1) other fences, (2) planks and (3) tree
trunks, but nothing else. They do not connect to stone, dirt, wool,
etc. This is done by the "connects_to" parameter, which takes groups
and node names.

Due to the way textures are wrapped, we can make these nodes look a
lot better by giving them a special tile.

This change requires minetest/minetest#3503.
@sofar

This comment has been minimized.

Copy link
Member Author

sofar commented Mar 12, 2016

  • Updated with API changes

paramat added a commit that referenced this pull request Mar 13, 2016

Add a simple, but stylish fence gate.
This fence gate builds on NDT_CONNECTED by assuming fence nodes will
automatically connect to it's sides properly. The fence gate will
open and close just like doors, with sounds, but it only opens one
way. The gate sticks out quite a bit and can be bumped into, so the
fence may be used as some sort of path switch.

The fence gate offers no form of protection and can be opened and
closed by anyone. This is done on purpose - the fencegate isn't
meant to provide protection from players, as fences can be
trivially jumped over. Instead, these fences should be used for
protecting crops from hungry sheep, or keeping rabbits in their
pen, or just decoration. Mods can also modify the mod to add
protection, of course.

A recipe is added to make these. It's 4 sticks and 2 wood (any)
as follows:

  stick  wood  stick
  stick  wood  stick

The collision box of the open gate is such that if two gates are
connected but mirrored (making an M shape) then you can walk a large
entity that's larger than 1.0 wide through the opening. The gate of
an opened fence can also be stood upon or bumped into.

I've mixed together some sounds to provide a somewhat light sound
experience, one that one would expect from a small gate latching open
and close.

This change requires #873, otherwise it doesn't connect to fences.
@paramat

This comment has been minimized.

Copy link
Member

paramat commented Mar 13, 2016

@paramat paramat closed this Mar 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.