mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2025-01-09 17:30:24 +01:00
Change README.md and fix a bug for teleporter and wireless
This commit is contained in:
parent
636e1faedf
commit
9df8c6be64
@ -2,7 +2,7 @@
|
||||
|
||||
Based on Mesecons by Jeija
|
||||
By @paly2
|
||||
With the participation of @LeMagnesium (bugfix), @Ataron (textures), and @JAPP (texture)
|
||||
With the participation of @LeMagnesium (bugfix), @Ataron (textures), and @JAPP (texture).
|
||||
|
||||
MoreMesecons is a mod for minetest wich add some mesecons items.
|
||||
|
||||
@ -14,6 +14,6 @@ MoreMesecons is a mod for minetest wich add some mesecons items.
|
||||
* `Player Killer` : This block kills the nearest player (with a maximal distance of 8 blocks by default) (if this player isn't its owner) when it receives a mesecons signal.
|
||||
* `Signal Changer` : If it receives a signal on its pin "F", it turns on. If ti receives a signal on its pin "O", it turns off.
|
||||
* `Switch Torch` : It connects just like Mesecons Torch. If it receives a signal, it turns on, and if it receives a second signal, it turns off.
|
||||
* `Teleporter` : Both parties teleporters must be on the same axis.
|
||||
* `Teleporter` : Place two teleporters on the same axis. If one receives a mesecons signal, it teleports the nearest player on the second.
|
||||
* `Temporary Gate` : If it receives a mesecons signal, whatever its duration, a mesecons signal is send with a fixed duration. You can change it by right-click (in seconds) (you can write for example 0.2 to send a pulse, or 20 to send long signals).
|
||||
* `Wireless` : Put 2 (or more) wireless somewhere. Change their channel by right-click. If you send a signal to a wireless, every wireless wich have the same channel will send the signal.
|
||||
* `Wireless` : Place 2 (or more) wireless somewhere. Change their channel by right-click. If you send a signal to a wireless, every wireless wich have the same channel will send the signal.
|
||||
|
@ -1,4 +1,4 @@
|
||||
teleporters = {}
|
||||
local teleporters = {}
|
||||
|
||||
local register = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
@ -63,7 +63,13 @@ minetest.register_node("moremesecons_teleporter:teleporter", {
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = function(pos)
|
||||
register(pos)
|
||||
end
|
||||
end,
|
||||
on_destruct = function(pos)
|
||||
local RID = minetest.get_meta(pos):get_int("RID")
|
||||
if RID then
|
||||
table.remove(teleporters, RID)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
wireless = {}
|
||||
local wireless = {}
|
||||
|
||||
local register = function(pos)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
@ -56,6 +56,12 @@ minetest.register_node("moremesecons_wireless:wireless", {
|
||||
meta:set_string("formspec", "field[channel;channel;${channel}]")
|
||||
register(pos)
|
||||
end,
|
||||
on_destruct = function(pos)
|
||||
local RID = minetest.get_meta(pos):get_int("RID")
|
||||
if RID then
|
||||
table.remove(wireless, RID)
|
||||
end
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("channel", fields.channel)
|
||||
|
Loading…
Reference in New Issue
Block a user