1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-19 22:10:21 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
cc0887cfb4 fix crash when sand is dropped on a book 2021-02-25 02:33:33 -05:00
968d706e9b Don't allow engine to add the implicit "Proceed" button
(on lights anyway;
this change makes it possible to theme the formspec)
2021-02-25 02:13:21 -05:00
2 changed files with 5 additions and 2 deletions

View File

@ -27,7 +27,7 @@ for _, c in ipairs(bookcolors) do
local color, hue = unpack(c)
local function book_dig(pos, node, digger)
if minetest.is_protected(pos, digger:get_player_name()) then return end
if not digger or minetest.is_protected(pos, digger:get_player_name()) then return end
local meta = minetest.get_meta(pos)
local data = minetest.serialize({
title = meta:get_string("title") or "",

View File

@ -162,7 +162,10 @@ if minetest.get_modpath("digilines") then
if puncher:get_player_control().sneak then
local name = puncher:get_player_name()
player_last_clicked[name] = pos
local form = "field[channel;Channel;]"
local form = "formspec_version[4]"..
"size[8,4]"..
"button_exit[3,2.5;2,0.5;proceed;Proceed]"..
"field[1.75,1.5;4.5,0.5;channel;Channel;]"
minetest.show_formspec(name, "homedecor:lamp_set_channel", form)
end
end