mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Content ID caching in Lua (#12444)
* Cache content IDs in Lua Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
006d974c58
commit
310b12b5ed
6 changed files with 166 additions and 2 deletions
|
@ -8,7 +8,7 @@ local gamepath = scriptpath .. "game".. DIR_DELIM
|
|||
local builtin_shared = {}
|
||||
|
||||
dofile(gamepath .. "constants.lua")
|
||||
dofile(gamepath .. "item_s.lua")
|
||||
assert(loadfile(commonpath .. "item_s.lua"))(builtin_shared)
|
||||
assert(loadfile(gamepath .. "item.lua"))(builtin_shared)
|
||||
dofile(gamepath .. "register.lua")
|
||||
|
||||
|
@ -37,4 +37,6 @@ dofile(gamepath .. "statbars.lua")
|
|||
dofile(gamepath .. "knockback.lua")
|
||||
dofile(gamepath .. "async.lua")
|
||||
|
||||
core.after(0, builtin_shared.cache_content_ids)
|
||||
|
||||
profiler = nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue