mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
move session library implementation to a separate module
This commit is contained in:
parent
4615a425e2
commit
c9f9838747
2 changed files with 18 additions and 17 deletions
17
res/modules/internal/session.lua
Normal file
17
res/modules/internal/session.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
local entries = {}
|
||||
local this = {}
|
||||
|
||||
function this.get_entry(name)
|
||||
local entry = entries[name]
|
||||
if entry == nil then
|
||||
entry = {}
|
||||
entries[name] = entry
|
||||
end
|
||||
return entry
|
||||
end
|
||||
|
||||
function this.reset_entry(name)
|
||||
entries[name] = nil
|
||||
end
|
||||
|
||||
return this
|
||||
Loading…
Add table
Add a link
Reference in a new issue