mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add code to support raillike group names
This commit is contained in:
parent
b4c3ff6eab
commit
75622c30be
2 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue