summaryrefslogtreecommitdiff
path: root/builtin/game/misc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/game/misc.lua')
-rw-r--r--builtin/game/misc.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua
index c31df541d..a71d5d02a 100644
--- a/builtin/game/misc.lua
+++ b/builtin/game/misc.lua
@@ -112,3 +112,14 @@ function core.record_protection_violation(pos, name)
end
end
+local raillike_ids = {}
+local raillike_cur_id = 0
+function core.raillike_group(name)
+ local id = raillike_ids[name]
+ if not id then
+ raillike_cur_id = raillike_cur_id + 1
+ raillike_ids[name] = raillike_cur_id
+ id = raillike_cur_id
+ end
+ return id
+end