mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-26 18:50:38 +01:00
333c57bbeb
- Remove that useless call to `minetest.register_on_globalstep` in mods/runes/handlers.lua, and with it the popper rune, to replace it by a glyph - For #179
48 lines
1.2 KiB
Lua
48 lines
1.2 KiB
Lua
-- Scrolls for Runes Redo
|
|
--
|
|
|
|
runes.scrolls = {}
|
|
|
|
function register_scroll(name, type, data)
|
|
if not data then return end
|
|
|
|
local def = {
|
|
inventory_image = (data.texture or "runes_scroll_unknown.png"),
|
|
groups = {scroll = 1},
|
|
description = (data.description or "Mysterious Scroll"),
|
|
}
|
|
|
|
minetest.register_craftitem("runes:scroll_" .. name, def)
|
|
runes.scrolls[name] = {}
|
|
|
|
if type == "knowledge" and data.glyph then
|
|
runes.scrolls[name].glyph = data.glyph
|
|
end
|
|
end
|
|
|
|
|
|
|
|
register_scroll("watchdog", "knowledge", {
|
|
glyph = "runes:glyph_watchdog",
|
|
texture = "runes_scroll_watchdog.png",
|
|
description = "Watch Dog Knowledge Scroll"
|
|
})
|
|
|
|
register_scroll("manasucker", "knowledge", {
|
|
glyph = "runes:glyph_manasucker",
|
|
texture = "runes_scroll_manasucker.png",
|
|
description = "Mana Sucker Knowledge Scroll",
|
|
})
|
|
|
|
register_scroll("spontafire", "knowledge", {
|
|
glyph = "runes:glyph_spontafire",
|
|
texture = "runes_scroll_spontafire.png",
|
|
description = "Spontaneous Fire Knowledge Scroll",
|
|
})
|
|
|
|
register_scroll("prankster", "knowledge", {
|
|
glyph = "runes:glyph_prankster",
|
|
texture = "runes_scroll_prankster.png",
|
|
description = "Prankster Knowledge Scroll",
|
|
})
|