Split default snippets

master
Wuzzy 2020-02-13 14:12:55 +01:00
parent 2e0b551cf0
commit 8a80ebebea
3 changed files with 13 additions and 11 deletions

View File

@ -14,7 +14,8 @@ end
-- Register core snippets
dofile(minetest.get_modpath(minetest.get_current_modname()).."/snippets.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()).."/snippets_core.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()).."/snippets_builtin.lua")
-- Apply item description updates

View File

@ -27,16 +27,6 @@ local function get_min_digtime(caps)
return mintime, unique
end
-- CORE SNIPPETS --
-- Custom text (_tt_help)
tt.register_snippet(function(itemstring)
local def = minetest.registered_items[itemstring]
if def._tt_help then
return def._tt_help, false
end
end)
-- Tool information (digging times, weapon stats)
tt.register_snippet(function(itemstring)
local def = minetest.registered_items[itemstring]

11
snippets_core.lua Normal file
View File

@ -0,0 +1,11 @@
-- CORE SNIPPETS --
-- Custom text (_tt_help)
tt.register_snippet(function(itemstring)
local def = minetest.registered_items[itemstring]
if def._tt_help then
return def._tt_help, false
end
end)