summaryrefslogtreecommitdiff
path: root/mesecons
diff options
context:
space:
mode:
authorJeija <jeija@mesecons.net>2014-11-25 17:20:05 +0100
committerJeija <jeija@mesecons.net>2014-11-25 17:36:52 +0100
commit4bd9d2a9ec84347e7c7ee488664120e39643a013 (patch)
treee5cc0f1ade32798fb5aab0d5b5f020c84e4e0a98 /mesecons
parentf69caba03674d04be960344baea308159219b081 (diff)
parent085b4d8bb72a95303f6e683cdbf57ed2cddb53b7 (diff)
downloadmesecons-4bd9d2a9ec84347e7c7ee488664120e39643a013.tar
mesecons-4bd9d2a9ec84347e7c7ee488664120e39643a013.tar.gz
mesecons-4bd9d2a9ec84347e7c7ee488664120e39643a013.tar.bz2
mesecons-4bd9d2a9ec84347e7c7ee488664120e39643a013.tar.xz
mesecons-4bd9d2a9ec84347e7c7ee488664120e39643a013.zip
Merge branch 'improve-luacontroller'
However, without the print_count limiting functionality Conflicts: mesecons_luacontroller/init.lua
Diffstat (limited to 'mesecons')
-rw-r--r--mesecons/legacy.lua59
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
+