diff options
author | Jeija <jeija@mesecons.net> | 2014-11-22 23:04:34 +0100 |
---|---|---|
committer | Jeija <jeija@mesecons.net> | 2014-11-22 23:04:34 +0100 |
commit | 0e3aa57ed38c2aedd9ba64bc32456d7e1180ba8b (patch) | |
tree | 69b445183ed60b2722db9bba9ee604d927c41d42 /mesecons/legacy.lua | |
parent | a814abd1e007e324789f80654d2d8135ced386bf (diff) | |
parent | bd1766e448b149f7245c3d2db18af7ecc984f7ca (diff) | |
download | mesecons-0e3aa57ed38c2aedd9ba64bc32456d7e1180ba8b.tar mesecons-0e3aa57ed38c2aedd9ba64bc32456d7e1180ba8b.tar.gz mesecons-0e3aa57ed38c2aedd9ba64bc32456d7e1180ba8b.tar.bz2 mesecons-0e3aa57ed38c2aedd9ba64bc32456d7e1180ba8b.tar.xz mesecons-0e3aa57ed38c2aedd9ba64bc32456d7e1180ba8b.zip |
Merge branch 'improve-luacontroller' of https://github.com/ShadowNinja/minetest-mod-mesecons into ShadowNinja-improve-luacontroller
Conflicts:
mesecons/legacy.lua
mesecons_luacontroller/init.lua
mesecons_microcontroller/init.lua
Diffstat (limited to 'mesecons/legacy.lua')
-rw-r--r-- | mesecons/legacy.lua | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/mesecons/legacy.lua b/mesecons/legacy.lua index c09b5a4..6d8ccca 100644 --- a/mesecons/legacy.lua +++ b/mesecons/legacy.lua @@ -1,29 +1,30 @@ --- Ugly hack to prevent breaking compatibility with other mods
--- Just remove the following two functions to delete the hack, to be done when other mods have updated
-function mesecon.receptor_on(self, pos, rules)
- if (self.receptor_on) then
- print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_on.")
- print("[Mesecons] If you are the programmer of this mod, please update it ")
- print("[Mesecons] to use mesecon.receptor_on instead. mesecon:* is deprecated")
- print("[Mesecons] Otherwise, please make sure you're running the latest version")
- print("[Mesecons] of that mod and inform the mod creator.")
- else
- rules = pos
- pos = self
- end
- mesecon.queue:add_action(pos, "receptor_on", {rules}, nil, rules)
-end
-
-function mesecon.receptor_off(self, pos, rules)
- if (self.receptor_off) then
- print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_off.")
- print("[Mesecons] If you are the programmer of this mod, please update it ")
- print("[Mesecons] to use mesecon.receptor_off instead. mesecon:* is deprecated")
- print("[Mesecons] Otherwise, please make sure you're running the latest version")
- print("[Mesecons] of that mod and inform the mod creator.")
- else
- rules = pos
- pos = self
- end
- mesecon.queue:add_action(pos, "receptor_off", {rules}, nil, rules)
-end
+-- Ugly hack to prevent breaking compatibility with other mods +-- Just remove the following two functions to delete the hack, to be done when other mods have updated +function mesecon.receptor_on(self, pos, rules) + if (self.receptor_on) then + print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_on.") + print("[Mesecons] If you are the programmer of this mod, please update it ") + print("[Mesecons] to use mesecon.receptor_on instead. mesecon:* is deprecated") + print("[Mesecons] Otherwise, please make sure you're running the latest version") + print("[Mesecons] of that mod and inform the mod creator.") + else + rules = pos + pos = self + end + mesecon.queue:add_action(pos, "receptor_on", {rules}, nil, rules) +end + +function mesecon.receptor_off(self, pos, rules) + if (self.receptor_off) then + print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_off.") + print("[Mesecons] If you are the programmer of this mod, please update it ") + print("[Mesecons] to use mesecon.receptor_off instead. mesecon:* is deprecated") + print("[Mesecons] Otherwise, please make sure you're running the latest version") + print("[Mesecons] of that mod and inform the mod creator.") + else + rules = pos + pos = self + end + mesecon.queue:add_action(pos, "receptor_off", {rules}, nil, rules) +end + |