1
0
Fork 0

Remove unused connects_to from fence gate function

This commit is contained in:
Wuzzy 2017-02-23 15:13:10 +01:00
parent 207d86733e
commit bfbb6d145e
2 changed files with 4 additions and 9 deletions

View File

@ -18,7 +18,7 @@ The full itemstring of the new fence node.
Notes: Fences will always have the group `fence=1`. They will always connect to solid nodes (group `solid=1`). Notes: Fences will always have the group `fence=1`. They will always connect to solid nodes (group `solid=1`).
## `mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups, connects_to, sounds, sound_open, sound_close)` ## `mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups, sounds, sound_open, sound_close)`
Adds a fence gate without crafting recipe. This will create 2 nodes. Adds a fence gate without crafting recipe. This will create 2 nodes.
### Parameters ### Parameters
@ -26,7 +26,6 @@ Adds a fence gate without crafting recipe. This will create 2 nodes.
* `fence_gate_name`: User-visible name (`description`) * `fence_gate_name`: User-visible name (`description`)
* `texture`: Texture to apply on the fence gate (all sides) * `texture`: Texture to apply on the fence gate (all sides)
* `groups`: Table of groups to which the fence gate belongs to * `groups`: Table of groups to which the fence gate belongs to
* `connects_to`: Table of nodes (itemstrings) to which the fence will connect to. Use `group:<groupname>` for all members of the group `<groupname>`
* `sounds`: Node sound table for the fence gate * `sounds`: Node sound table for the fence gate
* `sound_open`: Sound to play when opening fence gate (optional, default is wooden sound) * `sound_open`: Sound to play when opening fence gate (optional, default is wooden sound)
* `sound_close`: Sound to play when closing fence gate (optional, default is wooden sound) * `sound_close`: Sound to play when closing fence gate (optional, default is wooden sound)
@ -48,7 +47,7 @@ This will register 3 nodes in total without crafting recipes.
* `fence_gate_name`: User-visible name (`description`) of the fence gate * `fence_gate_name`: User-visible name (`description`) of the fence gate
* `texture`: Texture to apply on the fence and fence gate (all sides) * `texture`: Texture to apply on the fence and fence gate (all sides)
* `groups`: Table of groups to which the fence and fence gate belong to * `groups`: Table of groups to which the fence and fence gate belong to
* `connects_to`: Table of nodes (itemstrings) to which the fence and fence gate will connect to. Use `group:<groupname>` for all members of the group `<groupname>` * `connects_to`: Table of nodes (itemstrings) to which the fence will connect to. Use `group:<groupname>` for all members of the group `<groupname>`
* `sounds`: Node sound table for the fence and the fence gate * `sounds`: Node sound table for the fence and the fence gate
* `sound_open`: Sound to play when opening fence gate (optional, default is wooden sound) * `sound_open`: Sound to play when opening fence gate (optional, default is wooden sound)
* `sound_close`: Sound to play when closing fence gate (optional, default is wooden sound) * `sound_close`: Sound to play when closing fence gate (optional, default is wooden sound)

View File

@ -64,7 +64,7 @@ mcl_fences.register_fence = function(id, fence_name, texture, groups, connects_t
return fence_id return fence_id
end end
mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups, connects_to, sounds, sound_open, sound_close, sound_gain) mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups, sounds, sound_open, sound_close, sound_gain)
local meta2 local meta2
local state2 = 0 local state2 = 0
@ -103,10 +103,6 @@ mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups,
if groups == nil then groups = {} end if groups == nil then groups = {} end
groups.fence_gate = 1 groups.fence_gate = 1
groups.deco_block = 1 groups.deco_block = 1
if connects_to == nil then connects_to = {} end
table.insert(connects_to, "group:solid")
table.insert(connects_to, "group:fence_gate")
table.insert(connects_to, fence_id)
groups.mesecon_effector_on = 1 groups.mesecon_effector_on = 1
groups.fence_gate = 1 groups.fence_gate = 1
@ -213,7 +209,7 @@ end
mcl_fences.register_fence_and_fence_gate = function(id, fence_name, fence_gate_name, texture, groups, connects_to, sounds, sound_open, sound_close) mcl_fences.register_fence_and_fence_gate = function(id, fence_name, fence_gate_name, texture, groups, connects_to, sounds, sound_open, sound_close)
local fence_id = mcl_fences.register_fence(id, fence_name, texture, groups, connects_to, sounds) local fence_id = mcl_fences.register_fence(id, fence_name, texture, groups, connects_to, sounds)
local gate_id, open_gate_id = mcl_fences.register_fence_gate(id, fence_gate_name, texture, groups, connects_to, sounds, sound_open, sound_close) local gate_id, open_gate_id = mcl_fences.register_fence_gate(id, fence_gate_name, texture, groups, sounds, sound_open, sound_close)
return fence_id, gate_id, open_gate_id return fence_id, gate_id, open_gate_id
end end