Skip to content

Commit 852b337

Browse files
WuzzyEkdohibs
Wuzzy
authored andcommittedMay 14, 2015
Use connect_to_raillike for rail
Used value: 2
1 parent dd34dff commit 852b337

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed
 

‎game_api.txt

+16
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,22 @@ xpanes.register_pane(subname, def)
194194
^ Recipe field only
195195
}
196196

197+
Raillike definitions
198+
--------------------
199+
The following nodes use the group `connect_to_raillike` and will only connect to
200+
raillike nodes within this group and the same group value.
201+
Use `minetest.raillike_group(<Name>)` to get the group value.
202+
203+
| Node type | Raillike group name
204+
+-----------------------+----------------------------------
205+
| default:rail | "rail"
206+
207+
Example:
208+
If you want to add a new rail type and want it to connect with default:rail,
209+
add `connect_to_raillike=minetest.raillike_group("rail")` into the `groups` table
210+
of your node.
211+
212+
197213
Default sounds
198214
--------------
199215
Sounds inside the default table can be used within the sounds field of node definitions.

‎mods/default/nodes.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,7 @@ minetest.register_node("default:rail", {
15411541
-- but how to specify the dimensions for curved and sideways rails?
15421542
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
15431543
},
1544-
groups = {bendy=2,dig_immediate=2,attached_node=1},
1544+
groups = {bendy=2,dig_immediate=2,attached_node=1,connect_to_raillike=minetest.raillike_group("rail")},
15451545
})
15461546

15471547

0 commit comments

Comments
 (0)