1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-07-03 16:40:25 +02:00

Update minetestforfun_game, fix maptools

This commit is contained in:
LeMagnesium
2016-11-10 00:01:34 +01:00
parent 783cb0e3d9
commit d40a65244b
92 changed files with 3202 additions and 1803 deletions

View File

@ -4,12 +4,13 @@ minetest.register_craftitem("default:stick", {
description = "Stick",
stack_max = 1000,
inventory_image = "default_stick.png",
groups = {stick = 1},
groups = {stick = 1, flammable = 2},
})
minetest.register_craftitem("default:paper", {
description = "Paper",
inventory_image = "default_paper.png",
groups = {flammable = 3},
})
local lpp = 14 -- Lines per book's page
@ -106,7 +107,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
elseif fields.book_next or fields.book_prev then
local data = minetest.deserialize(stack:get_metadata())
if not data.page then return end
if not data or not data.page then
return
end
if fields.book_next then
data.page = data.page + 1
@ -131,14 +134,14 @@ end)
minetest.register_craftitem("default:book", {
description = "Book",
inventory_image = "default_book.png",
groups = {book = 1},
groups = {book = 1, flammable = 3},
on_use = book_on_use,
})
minetest.register_craftitem("default:book_written", {
description = "Book With Text",
inventory_image = "default_book_written.png",
groups = {book = 1, not_in_creative_inventory = 1},
groups = {book = 1, not_in_creative_inventory = 1, flammable = 3},
stack_max = 1,
on_use = book_on_use,
})
@ -175,7 +178,7 @@ end)
minetest.register_craftitem("default:coal_lump", {
description = "Coal Lump",
inventory_image = "default_coal_lump.png",
groups = {coal = 1}
groups = {coal = 1, flammable = 1}
})
minetest.register_craftitem("default:iron_lump", {