mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-03-11 06:07:44 +01:00
mcl_cozy: Restore backwards compatibility
Some mods might expect `mcl_cozy.pos` to be an existing table, the functionality of which was changed to be included in `mcl_cozy.players`.
This commit is contained in:
parent
d463bba91f
commit
0f65037482
1 changed files with 7 additions and 0 deletions
|
@ -16,6 +16,13 @@ local ACTION_APPLY_DELAY = 0.05
|
|||
mcl_cozy = {}
|
||||
mcl_cozy.players = {}
|
||||
|
||||
-- backwards compatibility
|
||||
mcl_cozy.pos = setmetatable({}, {
|
||||
__index = function(_, name)
|
||||
return mcl_cozy.players[name] and mcl_cozy.players[name][1]
|
||||
end
|
||||
})
|
||||
|
||||
-- TODO: when the API is more polished and there is demand, un-internalize this
|
||||
local actions = {
|
||||
["sit"] = {
|
||||
|
|
Loading…
Reference in a new issue