Use a formspec background in the "minimal" game
• Use the now built-in gui_formbg.png in the "minimal" game • Make the minimal warning text yellow to stand out more.
This commit is contained in:
parent
61e806f312
commit
1f13b7584f
@ -16,8 +16,17 @@ dofile(minetest.get_modpath("default").."/mapgen.lua")
|
|||||||
|
|
||||||
-- Set a noticeable inventory formspec for players
|
-- Set a noticeable inventory formspec for players
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
player:set_formspec_prepend([[
|
||||||
|
bgcolor[#080808BB;true]
|
||||||
|
background[5,5;1,1;gui_formbg.png;true]
|
||||||
|
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]])
|
||||||
|
|
||||||
local cb = function(player)
|
local cb = function(player)
|
||||||
minetest.chat_send_player(player:get_player_name(), "This is the [minimal] \"Minimal Development Test\" game. Use [minetest_game] for the real thing.")
|
minetest.chat_send_player(player:get_player_name(),
|
||||||
|
minetest.colorize('#cccc22',
|
||||||
|
"This is the [minimal] \"Minimal Development Test\" game. "
|
||||||
|
.. "Use [minetest_game] for the real thing."))
|
||||||
|
|
||||||
player:set_attribute("test_attribute", "test_me")
|
player:set_attribute("test_attribute", "test_me")
|
||||||
player:set_attribute("remove_this", nil)
|
player:set_attribute("remove_this", nil)
|
||||||
end
|
end
|
||||||
@ -1895,4 +1904,3 @@ test_get_craft_result()
|
|||||||
--dump2(minetest.registered_entities)
|
--dump2(minetest.registered_entities)
|
||||||
|
|
||||||
-- END
|
-- END
|
||||||
|
|
||||||
|
@ -398,11 +398,11 @@ minetest.register_abm({
|
|||||||
if ncpos ~= nil then
|
if ncpos ~= nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if pos.x % 16 ~= 8 or pos.z % 16 ~= 8 then
|
if pos.x % 16 ~= 8 or pos.z % 16 ~= 8 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
pos.y = pos.y + 1
|
pos.y = pos.y + 1
|
||||||
n = minetest.get_node(pos)
|
n = minetest.get_node(pos)
|
||||||
print(dump(n))
|
print(dump(n))
|
||||||
@ -431,7 +431,7 @@ minetest.register_abm({
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
nctime = clock
|
nctime = clock
|
||||||
|
|
||||||
s0 = ncstuff[ncq]
|
s0 = ncstuff[ncq]
|
||||||
ncq = s0[1]
|
ncq = s0[1]
|
||||||
s1 = ncstuff[ncq]
|
s1 = ncstuff[ncq]
|
||||||
@ -477,15 +477,15 @@ minetest.register_node("experimental:tester_node_1", {
|
|||||||
experimental.print_to_everything("incorrect metadata found")
|
experimental.print_to_everything("incorrect metadata found")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
experimental.print_to_everything("experimental:tester_node_1:on_destruct("..minetest.pos_to_string(pos)..")")
|
experimental.print_to_everything("experimental:tester_node_1:on_destruct("..minetest.pos_to_string(pos)..")")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
after_destruct = function(pos)
|
after_destruct = function(pos)
|
||||||
experimental.print_to_everything("experimental:tester_node_1:after_destruct("..minetest.pos_to_string(pos)..")")
|
experimental.print_to_everything("experimental:tester_node_1:after_destruct("..minetest.pos_to_string(pos)..")")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
experimental.print_to_everything("experimental:tester_node_1:after_dig_node("..minetest.pos_to_string(pos)..")")
|
experimental.print_to_everything("experimental:tester_node_1:after_dig_node("..minetest.pos_to_string(pos)..")")
|
||||||
end,
|
end,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user