Split wires into their own mod, introduce autoconnect hooks

The update_autoconnect function had to be abstracted away from the
default wires, any kind of wire can now register autoconnect hooks,
which should make having multiple different wire types much easier.

mesecons_mvps, mesecons_receiver and mesecons_random made use of
update_autoconnect, their code was also adapted. This also fixes a
receiver bug: If a receiver was placed with a onstate receptor next
to it (but not the wall lever / button that caused the receiver to
appear) the receiver didn't turn on in the past.

Also move documentation for mesecon wire into mesecons_wire.
このコミットが含まれているのは:
Carter Kolwey
2016-08-23 00:20:46 -05:00
committed by Jeija
コミット 912f17f335
13個のファイルの変更44行の追加26行の削除

ファイルの表示

@ -200,7 +200,6 @@ end
mesecon.register_on_mvps_move(function(moved_nodes)
for _, n in ipairs(moved_nodes) do
mesecon.on_placenode(n.pos, n.node)
mesecon.update_autoconnect(n.pos)
end
end)