Skip to content

Commit 4bd9d2a

Browse files
author
Jeija
committedNov 25, 2014
Merge branch 'improve-luacontroller'
However, without the print_count limiting functionality Conflicts: mesecons_luacontroller/init.lua
2 parents f69caba + 085b4d8 commit 4bd9d2a

File tree

2 files changed

+425
-371
lines changed

2 files changed

+425
-371
lines changed
 

‎mesecons/legacy.lua

+30-29
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
1-
-- Ugly hack to prevent breaking compatibility with other mods
2-
-- Just remove the following two functions to delete the hack, to be done when other mods have updated
3-
function mesecon.receptor_on(self, pos, rules)
4-
if (self.receptor_on) then
5-
print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_on.")
6-
print("[Mesecons] If you are the programmer of this mod, please update it ")
7-
print("[Mesecons] to use mesecon.receptor_on instead. mesecon:* is deprecated")
8-
print("[Mesecons] Otherwise, please make sure you're running the latest version")
9-
print("[Mesecons] of that mod and inform the mod creator.")
10-
else
11-
rules = pos
12-
pos = self
13-
end
14-
mesecon.queue:add_action(pos, "receptor_on", {rules}, nil, rules)
15-
end
16-
17-
function mesecon.receptor_off(self, pos, rules)
18-
if (self.receptor_off) then
19-
print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_off.")
20-
print("[Mesecons] If you are the programmer of this mod, please update it ")
21-
print("[Mesecons] to use mesecon.receptor_off instead. mesecon:* is deprecated")
22-
print("[Mesecons] Otherwise, please make sure you're running the latest version")
23-
print("[Mesecons] of that mod and inform the mod creator.")
24-
else
25-
rules = pos
26-
pos = self
27-
end
28-
mesecon.queue:add_action(pos, "receptor_off", {rules}, nil, rules)
29-
end
1+
-- Ugly hack to prevent breaking compatibility with other mods
2+
-- Just remove the following two functions to delete the hack, to be done when other mods have updated
3+
function mesecon.receptor_on(self, pos, rules)
4+
if (self.receptor_on) then
5+
print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_on.")
6+
print("[Mesecons] If you are the programmer of this mod, please update it ")
7+
print("[Mesecons] to use mesecon.receptor_on instead. mesecon:* is deprecated")
8+
print("[Mesecons] Otherwise, please make sure you're running the latest version")
9+
print("[Mesecons] of that mod and inform the mod creator.")
10+
else
11+
rules = pos
12+
pos = self
13+
end
14+
mesecon.queue:add_action(pos, "receptor_on", {rules}, nil, rules)
15+
end
16+
17+
function mesecon.receptor_off(self, pos, rules)
18+
if (self.receptor_off) then
19+
print("[Mesecons] Warning: A mod with mesecon support called mesecon:receptor_off.")
20+
print("[Mesecons] If you are the programmer of this mod, please update it ")
21+
print("[Mesecons] to use mesecon.receptor_off instead. mesecon:* is deprecated")
22+
print("[Mesecons] Otherwise, please make sure you're running the latest version")
23+
print("[Mesecons] of that mod and inform the mod creator.")
24+
else
25+
rules = pos
26+
pos = self
27+
end
28+
mesecon.queue:add_action(pos, "receptor_off", {rules}, nil, rules)
29+
end
30+

0 commit comments

Comments
 (0)