From bfbb6d145ec4e27c81df80836e331cae7a523a14 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 23 Feb 2017 15:13:10 +0100 Subject: [PATCH] Remove unused connects_to from fence gate function --- mods/ITEMS/mcl_fences/API.md | 5 ++--- mods/ITEMS/mcl_fences/init.lua | 8 ++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/mods/ITEMS/mcl_fences/API.md b/mods/ITEMS/mcl_fences/API.md index f6ce4148f..651b6e7c3 100644 --- a/mods/ITEMS/mcl_fences/API.md +++ b/mods/ITEMS/mcl_fences/API.md @@ -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`). -## `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. ### Parameters @@ -26,7 +26,6 @@ Adds a fence gate without crafting recipe. This will create 2 nodes. * `fence_gate_name`: User-visible name (`description`) * `texture`: Texture to apply on the fence gate (all sides) * `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:` for all members of the group `` * `sounds`: Node sound table for the fence gate * `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) @@ -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 * `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 -* `connects_to`: Table of nodes (itemstrings) to which the fence and fence gate will connect to. Use `group:` for all members of the group `` +* `connects_to`: Table of nodes (itemstrings) to which the fence will connect to. Use `group:` for all members of the group `` * `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_close`: Sound to play when closing fence gate (optional, default is wooden sound) diff --git a/mods/ITEMS/mcl_fences/init.lua b/mods/ITEMS/mcl_fences/init.lua index 7b02370eb..e6813ecba 100644 --- a/mods/ITEMS/mcl_fences/init.lua +++ b/mods/ITEMS/mcl_fences/init.lua @@ -64,7 +64,7 @@ mcl_fences.register_fence = function(id, fence_name, texture, groups, connects_t return fence_id 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 state2 = 0 @@ -103,10 +103,6 @@ mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups, if groups == nil then groups = {} end groups.fence_gate = 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.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) 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 end