Compare commits
No commits in common. "5.0" and "0.4" have entirely different histories.
|
@ -1,2 +0,0 @@
|
||||||
|
|
||||||
.vs/
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
Blockcolor (Game) - 2.00 for Minetest 5.0
|
Blockcolor (Game)
|
||||||
|
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# BlockColorSubGame
|
||||||
|
This is not StandAlone Release, You need Minetest Engine or use StandAlone Release for Play.
|
|
@ -1,4 +1 @@
|
||||||
name = BlockColor
|
name = blockcolor
|
||||||
release = 1626
|
|
||||||
author = Chiantos
|
|
||||||
description = BlockColor is a creative sandbox with only 8 colors. Only a limit : Your Imagination - http://blockcolor.net/
|
|
||||||
|
|
|
@ -1,41 +1,23 @@
|
||||||
#---------------------------------------------------------------------
|
menu_last_game = earth
|
||||||
# Use By Game Blockcolor
|
maintab_LAST = local
|
||||||
#---------------------------------------------------------------------
|
mg_name = v7
|
||||||
|
mainmenu_last_selected_world = 1
|
||||||
-- Colors for Nodes, Decorates and Hotbar
|
|
||||||
|
|
||||||
-- 8 Colors
|
|
||||||
|
|
||||||
-- color1 = 292421 -- (Black)
|
|
||||||
-- color2 = 0000FF -- (Blue)
|
|
||||||
-- color3 = 00FF00 -- (Green)
|
|
||||||
-- color4 = F5F5F5 -- (White)
|
|
||||||
-- color5 = FF6103 -- (Orange)
|
|
||||||
-- color6 = FF0000 -- (Red)
|
|
||||||
-- color7 = FFFF00 -- (Yellow)
|
|
||||||
-- color8 = FF69B4 -- (Pink)
|
|
||||||
|
|
||||||
-- End
|
|
||||||
|
|
||||||
default_privs = shout,home,fly,fast,interact
|
|
||||||
creative_mode = true
|
creative_mode = true
|
||||||
enable_damage = false
|
enable_damage = false
|
||||||
only_peaceful_mobs = false
|
world_config_selected_mod = 1
|
||||||
|
menu_clouds = false
|
||||||
|
enable_fog = false
|
||||||
|
enable_clouds = false
|
||||||
|
enable_3d_clouds = false
|
||||||
|
node_highlighting = halo
|
||||||
|
default_game = earth
|
||||||
|
item_entity_ttl = -1
|
||||||
enable_pvp = false
|
enable_pvp = false
|
||||||
enable_tnt = false
|
ignore_world_load_errors = true
|
||||||
disable_fire = false
|
main_menu_technical_settings = false
|
||||||
fire_enabled = false
|
remote_port = 30000
|
||||||
|
port = 30000
|
||||||
# extras mod settings
|
address = BlockColor.net
|
||||||
playerhotbar = 8
|
fixed_map_seed =
|
||||||
playerbox = 1
|
viewing_range = 110
|
||||||
playerboxsize = 128
|
noclip = true
|
||||||
pingkick = 1
|
|
||||||
autorollback = 0
|
|
||||||
isplayer = 0
|
|
||||||
recrafting = 0
|
|
||||||
safepvp = 0
|
|
||||||
|
|
||||||
# player visibility?
|
|
||||||
player_transfer_distance = 50
|
|
||||||
unlimited_player_transfer_distance = false
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Custom for Visual Studio
|
||||||
|
*.cs diff=csharp
|
||||||
|
|
||||||
|
# Standard to msysgit
|
||||||
|
*.doc diff=astextplain
|
||||||
|
*.DOC diff=astextplain
|
||||||
|
*.docx diff=astextplain
|
||||||
|
*.DOCX diff=astextplain
|
||||||
|
*.dot diff=astextplain
|
||||||
|
*.DOT diff=astextplain
|
||||||
|
*.pdf diff=astextplain
|
||||||
|
*.PDF diff=astextplain
|
||||||
|
*.rtf diff=astextplain
|
||||||
|
*.RTF diff=astextplain
|
|
@ -59,6 +59,9 @@ for k,v1 in pairs(comboblock.index) do
|
||||||
sounds = v1_def.sounds,
|
sounds = v1_def.sounds,
|
||||||
groups = v1_groups,
|
groups = v1_groups,
|
||||||
drop = v1,
|
drop = v1,
|
||||||
|
after_destruct = function(pos, oldnode)
|
||||||
|
minetest.set_node(pos, {name = v2, param2 = oldnode.param2})
|
||||||
|
end
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -76,6 +76,9 @@ for k,v1 in pairs(combostair.index) do
|
||||||
sounds = v1_def.sounds,
|
sounds = v1_def.sounds,
|
||||||
groups = v1_groups,
|
groups = v1_groups,
|
||||||
drop = v1,
|
drop = v1,
|
||||||
|
after_destruct = function(pos, oldnode)
|
||||||
|
minetest.set_node(pos, {name = v2, param2 = oldnode.param2})
|
||||||
|
end
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,171 +0,0 @@
|
||||||
Letters Colors Mod for Minetest, Multicraft and Minetest
|
|
||||||
|
|
||||||
LGPL v3 for Code / CC BY SA 3.0 for Medias (MrChiantos)
|
|
||||||
|
|
||||||
-
|
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
|
|
||||||
This version of the GNU Lesser General Public License incorporates
|
|
||||||
the terms and conditions of version 3 of the GNU General Public
|
|
||||||
License, supplemented by the additional permissions listed below.
|
|
||||||
|
|
||||||
0. Additional Definitions.
|
|
||||||
|
|
||||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
||||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
||||||
General Public License.
|
|
||||||
|
|
||||||
"The Library" refers to a covered work governed by this License,
|
|
||||||
other than an Application or a Combined Work as defined below.
|
|
||||||
|
|
||||||
An "Application" is any work that makes use of an interface provided
|
|
||||||
by the Library, but which is not otherwise based on the Library.
|
|
||||||
Defining a subclass of a class defined by the Library is deemed a mode
|
|
||||||
of using an interface provided by the Library.
|
|
||||||
|
|
||||||
A "Combined Work" is a work produced by combining or linking an
|
|
||||||
Application with the Library. The particular version of the Library
|
|
||||||
with which the Combined Work was made is also called the "Linked
|
|
||||||
Version".
|
|
||||||
|
|
||||||
The "Minimal Corresponding Source" for a Combined Work means the
|
|
||||||
Corresponding Source for the Combined Work, excluding any source code
|
|
||||||
for portions of the Combined Work that, considered in isolation, are
|
|
||||||
based on the Application, and not on the Linked Version.
|
|
||||||
|
|
||||||
The "Corresponding Application Code" for a Combined Work means the
|
|
||||||
object code and/or source code for the Application, including any data
|
|
||||||
and utility programs needed for reproducing the Combined Work from the
|
|
||||||
Application, but excluding the System Libraries of the Combined Work.
|
|
||||||
|
|
||||||
1. Exception to Section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
You may convey a covered work under sections 3 and 4 of this License
|
|
||||||
without being bound by section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
2. Conveying Modified Versions.
|
|
||||||
|
|
||||||
If you modify a copy of the Library, and, in your modifications, a
|
|
||||||
facility refers to a function or data to be supplied by an Application
|
|
||||||
that uses the facility (other than as an argument passed when the
|
|
||||||
facility is invoked), then you may convey a copy of the modified
|
|
||||||
version:
|
|
||||||
|
|
||||||
a) under this License, provided that you make a good faith effort to
|
|
||||||
ensure that, in the event an Application does not supply the
|
|
||||||
function or data, the facility still operates, and performs
|
|
||||||
whatever part of its purpose remains meaningful, or
|
|
||||||
|
|
||||||
b) under the GNU GPL, with none of the additional permissions of
|
|
||||||
this License applicable to that copy.
|
|
||||||
|
|
||||||
3. Object Code Incorporating Material from Library Header Files.
|
|
||||||
|
|
||||||
The object code form of an Application may incorporate material from
|
|
||||||
a header file that is part of the Library. You may convey such object
|
|
||||||
code under terms of your choice, provided that, if the incorporated
|
|
||||||
material is not limited to numerical parameters, data structure
|
|
||||||
layouts and accessors, or small macros, inline functions and templates
|
|
||||||
(ten or fewer lines in length), you do both of the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the object code that the
|
|
||||||
Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
4. Combined Works.
|
|
||||||
|
|
||||||
You may convey a Combined Work under terms of your choice that,
|
|
||||||
taken together, effectively do not restrict modification of the
|
|
||||||
portions of the Library contained in the Combined Work and reverse
|
|
||||||
engineering for debugging such modifications, if you also do each of
|
|
||||||
the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the Combined Work that
|
|
||||||
the Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
c) For a Combined Work that displays copyright notices during
|
|
||||||
execution, include the copyright notice for the Library among
|
|
||||||
these notices, as well as a reference directing the user to the
|
|
||||||
copies of the GNU GPL and this license document.
|
|
||||||
|
|
||||||
d) Do one of the following:
|
|
||||||
|
|
||||||
0) Convey the Minimal Corresponding Source under the terms of this
|
|
||||||
License, and the Corresponding Application Code in a form
|
|
||||||
suitable for, and under terms that permit, the user to
|
|
||||||
recombine or relink the Application with a modified version of
|
|
||||||
the Linked Version to produce a modified Combined Work, in the
|
|
||||||
manner specified by section 6 of the GNU GPL for conveying
|
|
||||||
Corresponding Source.
|
|
||||||
|
|
||||||
1) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (a) uses at run time
|
|
||||||
a copy of the Library already present on the user's computer
|
|
||||||
system, and (b) will operate properly with a modified version
|
|
||||||
of the Library that is interface-compatible with the Linked
|
|
||||||
Version.
|
|
||||||
|
|
||||||
e) Provide Installation Information, but only if you would otherwise
|
|
||||||
be required to provide such information under section 6 of the
|
|
||||||
GNU GPL, and only to the extent that such information is
|
|
||||||
necessary to install and execute a modified version of the
|
|
||||||
Combined Work produced by recombining or relinking the
|
|
||||||
Application with a modified version of the Linked Version. (If
|
|
||||||
you use option 4d0, the Installation Information must accompany
|
|
||||||
the Minimal Corresponding Source and Corresponding Application
|
|
||||||
Code. If you use option 4d1, you must provide the Installation
|
|
||||||
Information in the manner specified by section 6 of the GNU GPL
|
|
||||||
for conveying Corresponding Source.)
|
|
||||||
|
|
||||||
5. Combined Libraries.
|
|
||||||
|
|
||||||
You may place library facilities that are a work based on the
|
|
||||||
Library side by side in a single library together with other library
|
|
||||||
facilities that are not Applications and are not covered by this
|
|
||||||
License, and convey such a combined library under terms of your
|
|
||||||
choice, if you do both of the following:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work based
|
|
||||||
on the Library, uncombined with any other library facilities,
|
|
||||||
conveyed under the terms of this License.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library that part of it
|
|
||||||
is a work based on the Library, and explaining where to find the
|
|
||||||
accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
6. Revised Versions of the GNU Lesser General Public License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the GNU Lesser General Public License from time to time. Such new
|
|
||||||
versions will be similar in spirit to the present version, but may
|
|
||||||
differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Library as you received it specifies that a certain numbered version
|
|
||||||
of the GNU Lesser General Public License "or any later version"
|
|
||||||
applies to it, you have the option of following the terms and
|
|
||||||
conditions either of that published version or of any later version
|
|
||||||
published by the Free Software Foundation. If the Library as you
|
|
||||||
received it does not specify a version number of the GNU Lesser
|
|
||||||
General Public License, you may choose any version of the GNU Lesser
|
|
||||||
General Public License ever published by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Library as you received it specifies that a proxy can decide
|
|
||||||
whether future versions of the GNU Lesser General Public License shall
|
|
||||||
apply, that proxy's public statement of acceptance of any version is
|
|
||||||
permanent authorization for you to choose that version for the
|
|
||||||
Library.
|
|
|
@ -1 +0,0 @@
|
||||||
default
|
|
|
@ -1,74 +0,0 @@
|
||||||
color1 = minetest.setting_get("color1") or "292421"
|
|
||||||
color2 = minetest.setting_get("color2") or "0000FF"
|
|
||||||
color3 = minetest.setting_get("color3") or "00FF00"
|
|
||||||
color4 = minetest.setting_get("color4") or "F5F5F5"
|
|
||||||
color5 = minetest.setting_get("color5") or "FF6103"
|
|
||||||
color6 = minetest.setting_get("color6") or "FF0000"
|
|
||||||
color7 = minetest.setting_get("color7") or "FFFF00"
|
|
||||||
color8 = minetest.setting_get("color8") or "FF69B4"
|
|
||||||
|
|
||||||
local source_list = {
|
|
||||||
{"black", color1},
|
|
||||||
{"blue", color2},
|
|
||||||
{"green", color3},
|
|
||||||
{"white", color4},
|
|
||||||
{"orange", color5},
|
|
||||||
{"red", color6},
|
|
||||||
{"yellow", color7},
|
|
||||||
{"pink", color8}
|
|
||||||
}
|
|
||||||
|
|
||||||
local letters = {
|
|
||||||
|
|
||||||
{"a"},
|
|
||||||
{"b"},
|
|
||||||
{"c"},
|
|
||||||
{"d"},
|
|
||||||
{"e"},
|
|
||||||
{"f"},
|
|
||||||
{"g"},
|
|
||||||
{"h"},
|
|
||||||
{"i"},
|
|
||||||
{"j"},
|
|
||||||
{"k"},
|
|
||||||
{"l"},
|
|
||||||
{"m"},
|
|
||||||
{"n"},
|
|
||||||
{"o"},
|
|
||||||
{"p"},
|
|
||||||
{"q"},
|
|
||||||
{"r"},
|
|
||||||
{"s"},
|
|
||||||
{"t"},
|
|
||||||
{"u"},
|
|
||||||
{"v"},
|
|
||||||
{"w"},
|
|
||||||
{"y"},
|
|
||||||
{"x"},
|
|
||||||
{"z"},
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in ipairs(source_list) do
|
|
||||||
local name = source_list[i][1]
|
|
||||||
local colour = source_list[i][2]
|
|
||||||
|
|
||||||
for i in ipairs(letters) do
|
|
||||||
local letter = letters[i][1]
|
|
||||||
|
|
||||||
minetest.register_node("letterscolors:".. letter .. "_" .. name, {
|
|
||||||
|
|
||||||
description = name .. " color",
|
|
||||||
inventory_image = letter .. ".png^[colorize:#"..colour..":70",
|
|
||||||
tiles = {letter .. ".png^[colorize:#"..colour..":70"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {snappy = 2, choppy = 2, wool = 2},
|
|
||||||
sounds = default.node_sound_defaults(),
|
|
||||||
oddly_breakable_by_hand = 1,
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
Before Width: | Height: | Size: 857 B |
Before Width: | Height: | Size: 816 B |
Before Width: | Height: | Size: 843 B |
Before Width: | Height: | Size: 799 B |
Before Width: | Height: | Size: 693 B |
Before Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 889 B |
Before Width: | Height: | Size: 651 B |
Before Width: | Height: | Size: 672 B |
Before Width: | Height: | Size: 724 B |
Before Width: | Height: | Size: 835 B |
Before Width: | Height: | Size: 641 B |
Before Width: | Height: | Size: 805 B |
Before Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 915 B |
Before Width: | Height: | Size: 771 B |
Before Width: | Height: | Size: 976 B |
Before Width: | Height: | Size: 810 B |
Before Width: | Height: | Size: 897 B |
Before Width: | Height: | Size: 679 B |
Before Width: | Height: | Size: 775 B |
Before Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 960 B |
Before Width: | Height: | Size: 884 B |
Before Width: | Height: | Size: 787 B |
Before Width: | Height: | Size: 796 B |
|
@ -1,171 +0,0 @@
|
||||||
Maths Colors Mod for Minetest, Multicraft and Minetest
|
|
||||||
|
|
||||||
LGPL v3 for Code / CC BY SA 3.0 for Medias (MrChiantos)
|
|
||||||
|
|
||||||
-
|
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
|
|
||||||
This version of the GNU Lesser General Public License incorporates
|
|
||||||
the terms and conditions of version 3 of the GNU General Public
|
|
||||||
License, supplemented by the additional permissions listed below.
|
|
||||||
|
|
||||||
0. Additional Definitions.
|
|
||||||
|
|
||||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
||||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
||||||
General Public License.
|
|
||||||
|
|
||||||
"The Library" refers to a covered work governed by this License,
|
|
||||||
other than an Application or a Combined Work as defined below.
|
|
||||||
|
|
||||||
An "Application" is any work that makes use of an interface provided
|
|
||||||
by the Library, but which is not otherwise based on the Library.
|
|
||||||
Defining a subclass of a class defined by the Library is deemed a mode
|
|
||||||
of using an interface provided by the Library.
|
|
||||||
|
|
||||||
A "Combined Work" is a work produced by combining or linking an
|
|
||||||
Application with the Library. The particular version of the Library
|
|
||||||
with which the Combined Work was made is also called the "Linked
|
|
||||||
Version".
|
|
||||||
|
|
||||||
The "Minimal Corresponding Source" for a Combined Work means the
|
|
||||||
Corresponding Source for the Combined Work, excluding any source code
|
|
||||||
for portions of the Combined Work that, considered in isolation, are
|
|
||||||
based on the Application, and not on the Linked Version.
|
|
||||||
|
|
||||||
The "Corresponding Application Code" for a Combined Work means the
|
|
||||||
object code and/or source code for the Application, including any data
|
|
||||||
and utility programs needed for reproducing the Combined Work from the
|
|
||||||
Application, but excluding the System Libraries of the Combined Work.
|
|
||||||
|
|
||||||
1. Exception to Section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
You may convey a covered work under sections 3 and 4 of this License
|
|
||||||
without being bound by section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
2. Conveying Modified Versions.
|
|
||||||
|
|
||||||
If you modify a copy of the Library, and, in your modifications, a
|
|
||||||
facility refers to a function or data to be supplied by an Application
|
|
||||||
that uses the facility (other than as an argument passed when the
|
|
||||||
facility is invoked), then you may convey a copy of the modified
|
|
||||||
version:
|
|
||||||
|
|
||||||
a) under this License, provided that you make a good faith effort to
|
|
||||||
ensure that, in the event an Application does not supply the
|
|
||||||
function or data, the facility still operates, and performs
|
|
||||||
whatever part of its purpose remains meaningful, or
|
|
||||||
|
|
||||||
b) under the GNU GPL, with none of the additional permissions of
|
|
||||||
this License applicable to that copy.
|
|
||||||
|
|
||||||
3. Object Code Incorporating Material from Library Header Files.
|
|
||||||
|
|
||||||
The object code form of an Application may incorporate material from
|
|
||||||
a header file that is part of the Library. You may convey such object
|
|
||||||
code under terms of your choice, provided that, if the incorporated
|
|
||||||
material is not limited to numerical parameters, data structure
|
|
||||||
layouts and accessors, or small macros, inline functions and templates
|
|
||||||
(ten or fewer lines in length), you do both of the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the object code that the
|
|
||||||
Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
4. Combined Works.
|
|
||||||
|
|
||||||
You may convey a Combined Work under terms of your choice that,
|
|
||||||
taken together, effectively do not restrict modification of the
|
|
||||||
portions of the Library contained in the Combined Work and reverse
|
|
||||||
engineering for debugging such modifications, if you also do each of
|
|
||||||
the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the Combined Work that
|
|
||||||
the Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
c) For a Combined Work that displays copyright notices during
|
|
||||||
execution, include the copyright notice for the Library among
|
|
||||||
these notices, as well as a reference directing the user to the
|
|
||||||
copies of the GNU GPL and this license document.
|
|
||||||
|
|
||||||
d) Do one of the following:
|
|
||||||
|
|
||||||
0) Convey the Minimal Corresponding Source under the terms of this
|
|
||||||
License, and the Corresponding Application Code in a form
|
|
||||||
suitable for, and under terms that permit, the user to
|
|
||||||
recombine or relink the Application with a modified version of
|
|
||||||
the Linked Version to produce a modified Combined Work, in the
|
|
||||||
manner specified by section 6 of the GNU GPL for conveying
|
|
||||||
Corresponding Source.
|
|
||||||
|
|
||||||
1) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (a) uses at run time
|
|
||||||
a copy of the Library already present on the user's computer
|
|
||||||
system, and (b) will operate properly with a modified version
|
|
||||||
of the Library that is interface-compatible with the Linked
|
|
||||||
Version.
|
|
||||||
|
|
||||||
e) Provide Installation Information, but only if you would otherwise
|
|
||||||
be required to provide such information under section 6 of the
|
|
||||||
GNU GPL, and only to the extent that such information is
|
|
||||||
necessary to install and execute a modified version of the
|
|
||||||
Combined Work produced by recombining or relinking the
|
|
||||||
Application with a modified version of the Linked Version. (If
|
|
||||||
you use option 4d0, the Installation Information must accompany
|
|
||||||
the Minimal Corresponding Source and Corresponding Application
|
|
||||||
Code. If you use option 4d1, you must provide the Installation
|
|
||||||
Information in the manner specified by section 6 of the GNU GPL
|
|
||||||
for conveying Corresponding Source.)
|
|
||||||
|
|
||||||
5. Combined Libraries.
|
|
||||||
|
|
||||||
You may place library facilities that are a work based on the
|
|
||||||
Library side by side in a single library together with other library
|
|
||||||
facilities that are not Applications and are not covered by this
|
|
||||||
License, and convey such a combined library under terms of your
|
|
||||||
choice, if you do both of the following:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work based
|
|
||||||
on the Library, uncombined with any other library facilities,
|
|
||||||
conveyed under the terms of this License.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library that part of it
|
|
||||||
is a work based on the Library, and explaining where to find the
|
|
||||||
accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
6. Revised Versions of the GNU Lesser General Public License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the GNU Lesser General Public License from time to time. Such new
|
|
||||||
versions will be similar in spirit to the present version, but may
|
|
||||||
differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Library as you received it specifies that a certain numbered version
|
|
||||||
of the GNU Lesser General Public License "or any later version"
|
|
||||||
applies to it, you have the option of following the terms and
|
|
||||||
conditions either of that published version or of any later version
|
|
||||||
published by the Free Software Foundation. If the Library as you
|
|
||||||
received it does not specify a version number of the GNU Lesser
|
|
||||||
General Public License, you may choose any version of the GNU Lesser
|
|
||||||
General Public License ever published by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Library as you received it specifies that a proxy can decide
|
|
||||||
whether future versions of the GNU Lesser General Public License shall
|
|
||||||
apply, that proxy's public statement of acceptance of any version is
|
|
||||||
permanent authorization for you to choose that version for the
|
|
||||||
Library.
|
|
|
@ -1 +0,0 @@
|
||||||
default
|
|
|
@ -1,66 +0,0 @@
|
||||||
color1 = minetest.setting_get("color1") or "292421"
|
|
||||||
color2 = minetest.setting_get("color2") or "0000FF"
|
|
||||||
color3 = minetest.setting_get("color3") or "00FF00"
|
|
||||||
color4 = minetest.setting_get("color4") or "F5F5F5"
|
|
||||||
color5 = minetest.setting_get("color5") or "FF6103"
|
|
||||||
color6 = minetest.setting_get("color6") or "FF0000"
|
|
||||||
color7 = minetest.setting_get("color7") or "FFFF00"
|
|
||||||
color8 = minetest.setting_get("color8") or "FF69B4"
|
|
||||||
|
|
||||||
local source_list = {
|
|
||||||
{"black", color1},
|
|
||||||
{"blue", color2},
|
|
||||||
{"green", color3},
|
|
||||||
{"white", color4},
|
|
||||||
{"orange", color5},
|
|
||||||
{"red", color6},
|
|
||||||
{"yellow", color7},
|
|
||||||
{"pink", color8}
|
|
||||||
}
|
|
||||||
|
|
||||||
local maths = {
|
|
||||||
|
|
||||||
{"0"},
|
|
||||||
{"1"},
|
|
||||||
{"2"},
|
|
||||||
{"3"},
|
|
||||||
{"4"},
|
|
||||||
{"5"},
|
|
||||||
{"6"},
|
|
||||||
{"7"},
|
|
||||||
{"8"},
|
|
||||||
{"9"},
|
|
||||||
{"diviser"},
|
|
||||||
{"egale"},
|
|
||||||
{"inferieure"},
|
|
||||||
{"moins"},
|
|
||||||
{"multiplier"},
|
|
||||||
{"plus"},
|
|
||||||
{"superieure"},
|
|
||||||
{"virgule"},
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in ipairs(source_list) do
|
|
||||||
local name = source_list[i][1]
|
|
||||||
local colour = source_list[i][2]
|
|
||||||
|
|
||||||
for i in ipairs(maths) do
|
|
||||||
local math = maths[i][1]
|
|
||||||
|
|
||||||
minetest.register_node("mathscolors:".. math .. "_" .. name, {
|
|
||||||
|
|
||||||
description = name .. " color",
|
|
||||||
inventory_image = math .. ".png^[colorize:#"..colour..":70",
|
|
||||||
tiles = {math.. ".png^[colorize:#"..colour..":70"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {snappy = 2, choppy = 2, wool = 2},
|
|
||||||
sounds = default.node_sound_defaults(),
|
|
||||||
oddly_breakable_by_hand = 1,
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
Before Width: | Height: | Size: 884 B |
Before Width: | Height: | Size: 708 B |
Before Width: | Height: | Size: 824 B |
Before Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 835 B |
Before Width: | Height: | Size: 837 B |
Before Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 773 B |
Before Width: | Height: | Size: 906 B |
Before Width: | Height: | Size: 892 B |
Before Width: | Height: | Size: 825 B |
Before Width: | Height: | Size: 638 B |
Before Width: | Height: | Size: 826 B |
Before Width: | Height: | Size: 624 B |
Before Width: | Height: | Size: 825 B |
Before Width: | Height: | Size: 695 B |
Before Width: | Height: | Size: 822 B |
Before Width: | Height: | Size: 671 B |
|
@ -0,0 +1,38 @@
|
||||||
|
hud.register(name, def)
|
||||||
|
-- name: statbar name (health, air, hunger, armor already used by default)
|
||||||
|
-- def: <HUD item definition> (see below)
|
||||||
|
|
||||||
|
hud.change_item(player, name, def)
|
||||||
|
-- player: player object
|
||||||
|
-- name: statbar name
|
||||||
|
-- def: table containing new values
|
||||||
|
-- currently supported: number, text and offset
|
||||||
|
|
||||||
|
hud.swap_statbar(player, name1, name2) -- swaps position and offset of statbar with name1 with statbar with name2
|
||||||
|
-- player: player object
|
||||||
|
-- name1: statbar name
|
||||||
|
-- name2: statbar name
|
||||||
|
|
||||||
|
hud.remove_item(player, name)
|
||||||
|
|
||||||
|
HUD item definition
|
||||||
|
{
|
||||||
|
hud_elem_type = "statbar", -- currently only supported type (same as in lua-api.txt)
|
||||||
|
position = {x=<x>, y=<y>}, -- position of statbar (same as in lua-api.txt)
|
||||||
|
size = {x=24, y=24}, -- statbar texture size (default 24x24), needed to be scaled correctly
|
||||||
|
text = "hud_heart_fg.png", -- texture name (same as in lua-api.txt)
|
||||||
|
number = 20, -- number/2 = number of full textures(e.g. hearts)
|
||||||
|
max = 20, -- used to prevent "overflow" of statbars
|
||||||
|
alignment = {x=-1,y=-1}, -- alignment on screen (same as in lua-api.txt)
|
||||||
|
offset = HUD_HEALTH_OFFSET,
|
||||||
|
background = "hud_heart_bg.png", -- statbar background texture name
|
||||||
|
autohide_bg = false, -- hide statbar background textures when number = 0
|
||||||
|
events = { -- called on events "damage" and "breath_changed" of players
|
||||||
|
{
|
||||||
|
type = "damage",
|
||||||
|
func = function(player)
|
||||||
|
-- do something here
|
||||||
|
end
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,502 @@
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 2.1, February 1999
|
||||||
|
|
||||||
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
[This is the first released version of the Lesser GPL. It also counts
|
||||||
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
|
the version number 2.1.]
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Lesser General Public License, applies to some
|
||||||
|
specially designated software packages--typically libraries--of the
|
||||||
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
|
can use it too, but we suggest you first think carefully about whether
|
||||||
|
this license or the ordinary General Public License is the better
|
||||||
|
strategy to use in any particular case, based on the explanations below.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom of use,
|
||||||
|
not price. Our General Public Licenses are designed to make sure that
|
||||||
|
you have the freedom to distribute copies of free software (and charge
|
||||||
|
for this service if you wish); that you receive source code or can get
|
||||||
|
it if you want it; that you can change the software and use pieces of
|
||||||
|
it in new free programs; and that you are informed that you can do
|
||||||
|
these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
distributors to deny you these rights or to ask you to surrender these
|
||||||
|
rights. These restrictions translate to certain responsibilities for
|
||||||
|
you if you distribute copies of the library or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link other code with the library, you must provide
|
||||||
|
complete object files to the recipients, so that they can relink them
|
||||||
|
with the library after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with a two-step method: (1) we copyright the
|
||||||
|
library, and (2) we offer you this license, which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
To protect each distributor, we want to make it very clear that
|
||||||
|
there is no warranty for the free library. Also, if the library is
|
||||||
|
modified by someone else and passed on, the recipients should know
|
||||||
|
that what they have is not the original version, so that the original
|
||||||
|
author's reputation will not be affected by problems that might be
|
||||||
|
introduced by others.
|
||||||
|
|
||||||
|
Finally, software patents pose a constant threat to the existence of
|
||||||
|
any free program. We wish to make sure that a company cannot
|
||||||
|
effectively restrict the users of a free program by obtaining a
|
||||||
|
restrictive license from a patent holder. Therefore, we insist that
|
||||||
|
any patent license obtained for a version of the library must be
|
||||||
|
consistent with the full freedom of use specified in this license.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the
|
||||||
|
ordinary GNU General Public License. This license, the GNU Lesser
|
||||||
|
General Public License, applies to certain designated libraries, and
|
||||||
|
is quite different from the ordinary General Public License. We use
|
||||||
|
this license for certain libraries in order to permit linking those
|
||||||
|
libraries into non-free programs.
|
||||||
|
|
||||||
|
When a program is linked with a library, whether statically or using
|
||||||
|
a shared library, the combination of the two is legally speaking a
|
||||||
|
combined work, a derivative of the original library. The ordinary
|
||||||
|
General Public License therefore permits such linking only if the
|
||||||
|
entire combination fits its criteria of freedom. The Lesser General
|
||||||
|
Public License permits more lax criteria for linking other code with
|
||||||
|
the library.
|
||||||
|
|
||||||
|
We call this license the "Lesser" General Public License because it
|
||||||
|
does Less to protect the user's freedom than the ordinary General
|
||||||
|
Public License. It also provides other free software developers Less
|
||||||
|
of an advantage over competing non-free programs. These disadvantages
|
||||||
|
are the reason we use the ordinary General Public License for many
|
||||||
|
libraries. However, the Lesser license provides advantages in certain
|
||||||
|
special circumstances.
|
||||||
|
|
||||||
|
For example, on rare occasions, there may be a special need to
|
||||||
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
|
allowed to use the library. A more frequent case is that a free
|
||||||
|
library does the same job as widely used non-free libraries. In this
|
||||||
|
case, there is little to gain by limiting the free library to free
|
||||||
|
software only, so we use the Lesser General Public License.
|
||||||
|
|
||||||
|
In other cases, permission to use a particular library in non-free
|
||||||
|
programs enables a greater number of people to use a large body of
|
||||||
|
free software. For example, permission to use the GNU C Library in
|
||||||
|
non-free programs enables many more people to use the whole GNU
|
||||||
|
operating system, as well as its variant, the GNU/Linux operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
Although the Lesser General Public License is Less protective of the
|
||||||
|
users' freedom, it does ensure that the user of a program that is
|
||||||
|
linked with the Library has the freedom and the wherewithal to run
|
||||||
|
that program using a modified version of the Library.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, whereas the latter must
|
||||||
|
be combined with the library in order to run.
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library or other
|
||||||
|
program which contains a notice placed by the copyright holder or
|
||||||
|
other authorized party saying it may be distributed under the terms of
|
||||||
|
this Lesser General Public License (also called "this License").
|
||||||
|
Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, complete source code means
|
||||||
|
all the source code for all modules it contains, plus any associated
|
||||||
|
interface definition files, plus the scripts used to control compilation
|
||||||
|
and installation of the library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete source code as you receive it, in any medium, provided that
|
||||||
|
you conspicuously and appropriately publish on each copy an
|
||||||
|
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||||
|
all the notices that refer to this License and to the absence of any
|
||||||
|
warranty; and distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
|
and you may at your option offer warranty protection in exchange for a
|
||||||
|
fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Library, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote
|
||||||
|
it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you accompany
|
||||||
|
it with the complete corresponding machine-readable source code, which
|
||||||
|
must be distributed under the terms of Sections 1 and 2 above on a
|
||||||
|
medium customarily used for software interchange.
|
||||||
|
|
||||||
|
If distribution of object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the
|
||||||
|
source code from the same place satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also combine or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (1) uses at run time a
|
||||||
|
copy of the library already present on the user's computer system,
|
||||||
|
rather than copying library functions into the executable, and (2)
|
||||||
|
will operate properly with a modified version of the library, if
|
||||||
|
the user installs one, as long as the modified version is
|
||||||
|
interface-compatible with the version that the work was made with.
|
||||||
|
|
||||||
|
c) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
d) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
e) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. However, as a special exception,
|
||||||
|
the materials to be distributed need not include anything that is
|
||||||
|
normally distributed (in either source or binary form) with the major
|
||||||
|
components (compiler, kernel, and so on) of the operating system on
|
||||||
|
which the executable runs, unless that component itself accompanies
|
||||||
|
the executable.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library is void, and will automatically terminate your
|
||||||
|
rights under this License. However, parties who have received copies,
|
||||||
|
or rights, from you under this License will not have their licenses
|
||||||
|
terminated so long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
9. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
subject to these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties with
|
||||||
|
this License.
|
||||||
|
|
||||||
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Library.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply,
|
||||||
|
and the section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library under this License may add
|
||||||
|
an explicit geographical distribution limitation excluding those countries,
|
||||||
|
so that distribution is permitted only in or among countries not thus
|
||||||
|
excluded. In such case, this License incorporates the limitation as if
|
||||||
|
written in the body of this License.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Lesser General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
specifies a version number of this License which applies to it and
|
||||||
|
"any later version", you have the option of following the terms and
|
||||||
|
conditions either of that version or of any later version published by
|
||||||
|
the Free Software Foundation. If the Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
write to the author to ask for permission. For software which is
|
||||||
|
copyrighted by the Free Software Foundation, write to the Free
|
||||||
|
Software Foundation; we sometimes make exceptions for this. Our
|
||||||
|
decision will be guided by the two goals of preserving the free status
|
||||||
|
of all derivatives of our free software and of promoting the sharing
|
||||||
|
and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||||
|
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||||
|
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||||
|
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||||
|
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||||
|
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||||
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||||
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. It is
|
||||||
|
safest to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least the
|
||||||
|
"copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the library's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
|
@ -0,0 +1,67 @@
|
||||||
|
Minetest mod "Better HUD"
|
||||||
|
=========================
|
||||||
|
Version: 2.1.5
|
||||||
|
|
||||||
|
(c) Copyright BlockMen (2013-2016)
|
||||||
|
|
||||||
|
|
||||||
|
About this mod:
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
This mod improves the HUD of Minetest and adds (hidden by default) statbars for Hunger and Armor.
|
||||||
|
Also it provides an API to add new statbars easily, see API.txt for more informations.
|
||||||
|
|
||||||
|
Changes in builtin HUD items:
|
||||||
|
- Adds background for Health bar
|
||||||
|
- Uses better textures for Hotbar
|
||||||
|
- Uses texture for crosshair
|
||||||
|
- Positions of builtin statbars can be changed via "hud.conf" file
|
||||||
|
- Experimental "ItemWheel" that replaces the hotbar (must be enabled by adding "hud_item_wheel = true" in minetest.conf)
|
||||||
|
|
||||||
|
This mod gets provided as Modpack aswell, which includes the hunger mod (https://github.com/BlockMen/hunger)
|
||||||
|
More information concerning the hunger mechanics can be get there.
|
||||||
|
|
||||||
|
This mod supports the 3d_armor mod by stu (https://github.com/stujones11/minetest-3d_armor)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
License:
|
||||||
|
~~~~~~~~
|
||||||
|
(c) Copyright BlockMen (2013-2016)
|
||||||
|
|
||||||
|
|
||||||
|
Code:
|
||||||
|
Licensed under the GNU LGPL version 2.1 or higher.
|
||||||
|
You can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU Lesser General Public License
|
||||||
|
as published by the Free Software Foundation;
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
See LICENSE.txt and http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
|
|
||||||
|
|
||||||
|
Textures:
|
||||||
|
hud_heart_fg.png - celeron55 (CC BY-SA 3.0), modified by BlockMen
|
||||||
|
hud_heart_bg.png - celeron55 (CC BY-SA 3.0), modified by BlockMen
|
||||||
|
hud_hunger_fg.png - PilzAdam (WTFPL), modified by BlockMen
|
||||||
|
hud_hunger_bg.png - PilzAdam (WTFPL), modified by BlockMen
|
||||||
|
wieldhand.png (from character.png) - Jordach (CC BY-SA 3.0), modified by BlockMen
|
||||||
|
hud_air_fg.png - kaeza (WTFPL), modified by BlockMen
|
||||||
|
hud_armor_fg.png - Stu (CC BY-SA 3.0), modified by BlockMen
|
||||||
|
hud_armor_bg.png - Stu (CC BY-SA 3.0), modified by BlockMen
|
||||||
|
|
||||||
|
|
||||||
|
Github:
|
||||||
|
~~~~~~~
|
||||||
|
https://github.com/BlockMen/hud
|
||||||
|
|
||||||
|
Forum:
|
||||||
|
~~~~~~
|
||||||
|
https://forum.minetest.net/viewtopic.php?id=6342
|
||||||
|
|
||||||
|
|
||||||
|
Changelog:
|
||||||
|
~~~~~~~~~~
|
||||||
|
see changelog.txt
|
|
@ -0,0 +1,275 @@
|
||||||
|
|
||||||
|
-- global values
|
||||||
|
hud.registered_items = {}
|
||||||
|
hud.damage_events = {}
|
||||||
|
hud.breath_events = {}
|
||||||
|
|
||||||
|
-- keep id handling internal
|
||||||
|
local hud_id = {} -- hud item ids
|
||||||
|
local sb_bg = {} -- statbar background ids
|
||||||
|
|
||||||
|
-- localize often used table
|
||||||
|
local items = hud.registered_items
|
||||||
|
|
||||||
|
local function throw_error(msg)
|
||||||
|
minetest.log("error", "Better HUD[error]: " .. msg)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- API
|
||||||
|
--
|
||||||
|
|
||||||
|
function hud.register(name, def)
|
||||||
|
if not name or not def then
|
||||||
|
throw_error("not enough parameters given")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
--TODO: allow other elements
|
||||||
|
if def.hud_elem_type ~= "statbar" then
|
||||||
|
throw_error("The given HUD element is no statbar")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if items[name] ~= nil then
|
||||||
|
throw_error("A statbar with that name already exists")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- actually register
|
||||||
|
-- add background first since draworder is based on id :\
|
||||||
|
if def.hud_elem_type == "statbar" and def.background ~= nil then
|
||||||
|
sb_bg[name] = table.copy(def)
|
||||||
|
sb_bg[name].text = def.background
|
||||||
|
if not def.autohide_bg and def.max then
|
||||||
|
sb_bg[name].number = def.max
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- add item itself
|
||||||
|
items[name] = def
|
||||||
|
|
||||||
|
-- register events
|
||||||
|
if def.events then
|
||||||
|
for _,v in pairs(def.events) do
|
||||||
|
if v and v.type and v.func then
|
||||||
|
if v.type == "damage" then
|
||||||
|
table.insert(hud.damage_events, v)
|
||||||
|
end
|
||||||
|
|
||||||
|
if v.type == "breath" then
|
||||||
|
table.insert(hud.breath_events, v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- no error so far, return success
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- swaps stabar positions
|
||||||
|
function hud.swap_statbar(player, item1, item2)
|
||||||
|
if not player or not item1 or not item2 then
|
||||||
|
throw_error("Not enough parameters given to swap statbars")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local def1 = items[item1] or nil
|
||||||
|
local def2 = items[item2] or nil
|
||||||
|
|
||||||
|
if not def1 or not def2 then
|
||||||
|
throw_error("Can't swap statbars. Given statbars are not correct")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local pos_swap = false
|
||||||
|
local p_name = player:get_player_name()
|
||||||
|
local elem1 = hud_id[p_name.."_"..item1]
|
||||||
|
local elem2 = hud_id[p_name.."_"..item2]
|
||||||
|
|
||||||
|
if not elem1 or not elem2 or not elem1.id or not elem2.id then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
player:hud_change(elem2.id, "offset", def1.offset)
|
||||||
|
player:hud_change(elem1.id, "offset", def2.offset)
|
||||||
|
|
||||||
|
if def1.position.x ~= def2.position.x or def1.position.y ~= def2.position.y then
|
||||||
|
player:hud_change(elem2.id, "position", def1.position)
|
||||||
|
player:hud_change(elem1.id, "position", def2.position)
|
||||||
|
pos_swap = true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- do the items have backgrounds? if so, swap them aswell
|
||||||
|
local bg1 = hud_id[p_name.."_"..item1.."_bg"] or nil
|
||||||
|
local bg2 = hud_id[p_name.."_"..item2.."_bg"] or nil
|
||||||
|
if bg1 ~= nil and bg1.id then
|
||||||
|
player:hud_change(bg1.id, "offset", def2.offset)
|
||||||
|
if pos_swap == true then
|
||||||
|
player:hud_change(bg1.id, "position", def2.position)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if bg2 ~= nil and bg2.id then
|
||||||
|
player:hud_change(bg2.id, "offset", def1.offset)
|
||||||
|
if pos_swap == true then
|
||||||
|
player:hud_change(bg2.id, "position", def1.position)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function hud.change_item(player, name, def)
|
||||||
|
if not player or not player:is_player() or not name or not def then
|
||||||
|
throw_error("Not enough parameters given to change HUD item")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local i_name = player:get_player_name().."_"..name
|
||||||
|
local elem = hud_id[i_name]
|
||||||
|
if not elem then
|
||||||
|
throw_error("Given HUD element " .. dump(name) .. " does not exist".." hääää")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Only update if values supported and value actually changed
|
||||||
|
-- update supported values (currently number and text only)
|
||||||
|
if def.number and elem.number then
|
||||||
|
if def.number ~= elem.number then
|
||||||
|
if elem.max and def.number > elem.max and not def.max then
|
||||||
|
def.number = elem.max
|
||||||
|
end
|
||||||
|
if def.max then
|
||||||
|
elem.max = def.max
|
||||||
|
end
|
||||||
|
player:hud_change(elem.id, "number", def.number)
|
||||||
|
elem.number = def.number
|
||||||
|
-- hide background when set
|
||||||
|
local bg = hud_id[i_name.."_bg"]
|
||||||
|
if elem.autohide_bg then
|
||||||
|
if def.number < 1 then
|
||||||
|
player:hud_change(bg.id, "number", 0)
|
||||||
|
else
|
||||||
|
local num = bg.number
|
||||||
|
if bg.max then
|
||||||
|
num = bg.max
|
||||||
|
end
|
||||||
|
player:hud_change(bg.id, "number", num)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if bg and bg.max and bg.max < 1 and def.max and def.max > bg.max then
|
||||||
|
player:hud_change(bg.id, "number", def.max)
|
||||||
|
bg.max = def.max
|
||||||
|
bg.number = def.max
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if def.text and elem.text then
|
||||||
|
if def.text ~= elem.text then
|
||||||
|
player:hud_change(elem.id, "text", def.text)
|
||||||
|
elem.text = def.text
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if def.offset and elem.offset then
|
||||||
|
if def.item_name and def.offset == "item" then
|
||||||
|
-- for legacy reasons
|
||||||
|
if def.item_name then
|
||||||
|
hud.swap_statbar(player, name, def.item_name)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
player:hud_change(elem.id, "offset", def.offset)
|
||||||
|
elem.offset = def.offset
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function hud.remove_item(player, name)
|
||||||
|
if not player or not name then
|
||||||
|
throw_error("Not enough parameters given")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local i_name = player:get_player_name().."_"..name
|
||||||
|
if hud_id[i_name] == nil then
|
||||||
|
throw_error("Given HUD element " .. dump(name) .. " does not exist")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
player:hud_remove(hud_id[i_name].id)
|
||||||
|
hud_id[i_name] = nil
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Add registered HUD items to joining players
|
||||||
|
--
|
||||||
|
|
||||||
|
-- Following code is placed here to keep HUD ids internal
|
||||||
|
local function add_hud_item(player, name, def)
|
||||||
|
if not player or not name or not def then
|
||||||
|
throw_error("not enough parameters given")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local i_name = player:get_player_name().."_"..name
|
||||||
|
hud_id[i_name] = def
|
||||||
|
hud_id[i_name].id = player:hud_add(def)
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
|
||||||
|
-- first: hide the default statbars
|
||||||
|
local hud_flags = player:hud_get_flags()
|
||||||
|
hud_flags.healthbar = false
|
||||||
|
hud_flags.breathbar = false
|
||||||
|
player:hud_set_flags(hud_flags)
|
||||||
|
|
||||||
|
-- now add the backgrounds for statbars
|
||||||
|
for _,item in pairs(sb_bg) do
|
||||||
|
add_hud_item(player, _.."_bg", item)
|
||||||
|
end
|
||||||
|
-- and finally the actual HUD items
|
||||||
|
for _,item in pairs(items) do
|
||||||
|
add_hud_item(player, _, item)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- fancy hotbar (only when no crafting mod present)
|
||||||
|
if minetest.get_modpath("crafting") == nil then
|
||||||
|
minetest.after(0.5, function()
|
||||||
|
player:hud_set_hotbar_image("hud_hotbar.png")
|
||||||
|
player:hud_set_hotbar_selected_image("hud_hotbar_selected.png")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
function hud.player_event(player, event)
|
||||||
|
if not player then return end -- ADDED
|
||||||
|
|
||||||
|
--needed for first update called by on_join
|
||||||
|
minetest.after(0, function(player) -- ADDED (player)
|
||||||
|
if event == "health_changed" then
|
||||||
|
for _,v in pairs(hud.damage_events) do
|
||||||
|
if v.func then
|
||||||
|
v.func(player)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if event == "breath_changed" then
|
||||||
|
for _,v in pairs(hud.breath_events) do
|
||||||
|
if v.func then
|
||||||
|
v.func(player)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if event == "hud_changed" then--called when flags changed
|
||||||
|
|
||||||
|
end
|
||||||
|
end, player) -- ADDED , player)
|
||||||
|
end
|
||||||
|
|
||||||
|
core.register_playerevent(hud.player_event)
|
|
@ -0,0 +1,126 @@
|
||||||
|
|
||||||
|
HUD_IW_MAX = 8
|
||||||
|
HUD_IW_TICK = 0.4
|
||||||
|
if minetest.is_singleplayer() == true then
|
||||||
|
HUD_IW_TICK = 0.2
|
||||||
|
end
|
||||||
|
|
||||||
|
HUD_SB_SIZE = {x = 24, y = 24}
|
||||||
|
|
||||||
|
HUD_HEALTH_POS = {x = 0.5,y = 1}
|
||||||
|
HUD_HEALTH_OFFSET = {x = -262, y = -87}
|
||||||
|
HUD_AIR_POS = {x = 0.5, y = 1}
|
||||||
|
HUD_AIR_OFFSET = {x = 15, y = -87}
|
||||||
|
HUD_HUNGER_POS = {x = 0.5, y = 1}
|
||||||
|
HUD_HUNGER_OFFSET = {x = 15, y = -110}
|
||||||
|
HUD_ARMOR_POS = {x = 0.5, y = 1}
|
||||||
|
HUD_ARMOR_OFFSET = {x = -262, y = -110}
|
||||||
|
|
||||||
|
-- Reorder everything when using ItemWeel
|
||||||
|
hud.item_wheel = minetest.settings:get_bool("hud_item_wheel")
|
||||||
|
if hud.item_wheel then
|
||||||
|
HUD_HEALTH_POS = {x = 0.5,y = 1}
|
||||||
|
HUD_HEALTH_OFFSET = {x = -385, y = -77}
|
||||||
|
HUD_AIR_POS = {x = 0.5, y = 1}
|
||||||
|
HUD_AIR_OFFSET = {x = 150, y = -77}
|
||||||
|
HUD_HUNGER_POS = {x = 0.5, y = 1}
|
||||||
|
HUD_HUNGER_OFFSET = {x = 180, y = -44}
|
||||||
|
HUD_ARMOR_POS = {x = 0.5, y = 1}
|
||||||
|
HUD_ARMOR_OFFSET = {x = -415, y = -44}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- read hud.conf settings
|
||||||
|
function hud.read_conf()
|
||||||
|
local mod_path = minetest.get_modpath("hud")
|
||||||
|
local set = io.open(mod_path .. "/hud.conf", "r")
|
||||||
|
if set then
|
||||||
|
dofile(mod_path .. "/hud.conf")
|
||||||
|
set:close()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
hud.read_conf()
|
||||||
|
|
||||||
|
local damage_enabled = minetest.settings:get_bool("enable_damage")
|
||||||
|
|
||||||
|
hud.show_hunger = minetest.get_modpath("hunger") ~= nil
|
||||||
|
hud.show_armor = minetest.get_modpath("3d_armor") ~= nil
|
||||||
|
|
||||||
|
-- check if some settings are invalid
|
||||||
|
local enable_hunger = minetest.settings:get_bool("hud_hunger_enable")
|
||||||
|
if (enable_hunger == true) and not hud.show_hunger then
|
||||||
|
hud.notify_hunger(5)
|
||||||
|
end
|
||||||
|
|
||||||
|
if damage_enabled ~= true then
|
||||||
|
hud.show_armor = false
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
hud.register("health", {
|
||||||
|
hud_elem_type = "statbar",
|
||||||
|
position = HUD_HEALTH_POS,
|
||||||
|
size = HUD_SB_SIZE,
|
||||||
|
text = "hud_heart_fg.png",
|
||||||
|
number = 20,
|
||||||
|
alignment = {x = -1, y = -1},
|
||||||
|
offset = HUD_HEALTH_OFFSET,
|
||||||
|
background = "hud_heart_bg.png",
|
||||||
|
events = {
|
||||||
|
{
|
||||||
|
type = "damage",
|
||||||
|
func = function(player)
|
||||||
|
hud.change_item(player, "health", {number = player:get_hp()})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
hud.register("air", {
|
||||||
|
hud_elem_type = "statbar",
|
||||||
|
position = HUD_AIR_POS,
|
||||||
|
size = HUD_SB_SIZE,
|
||||||
|
text = "hud_air_fg.png",
|
||||||
|
number = 0,
|
||||||
|
alignment = {x = -1, y = -1},
|
||||||
|
offset = HUD_AIR_OFFSET,
|
||||||
|
background = nil,
|
||||||
|
events = {
|
||||||
|
{
|
||||||
|
type = "breath",
|
||||||
|
func = function(player)
|
||||||
|
if not player then return end -- ADDED
|
||||||
|
local air = player:get_breath() or 11
|
||||||
|
if air > 10 then
|
||||||
|
air = 0
|
||||||
|
end
|
||||||
|
hud.change_item(player, "air", {number = air * 2})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
hud.register("armor", {
|
||||||
|
hud_elem_type = "statbar",
|
||||||
|
position = HUD_ARMOR_POS,
|
||||||
|
size = HUD_SB_SIZE,
|
||||||
|
text = "hud_armor_fg.png",
|
||||||
|
number = 0,
|
||||||
|
alignment = {x = -1, y = -1},
|
||||||
|
offset = HUD_ARMOR_OFFSET,
|
||||||
|
background = "hud_armor_bg.png",
|
||||||
|
autohide_bg = true,
|
||||||
|
max = 20,
|
||||||
|
})
|
||||||
|
|
||||||
|
hud.register("hunger", {
|
||||||
|
hud_elem_type = "statbar",
|
||||||
|
position = HUD_HUNGER_POS,
|
||||||
|
size = HUD_SB_SIZE,
|
||||||
|
text = "hud_hunger_fg.png",
|
||||||
|
number = 0,
|
||||||
|
alignment = {x = -1, y = -1},
|
||||||
|
offset = HUD_HUNGER_OFFSET,
|
||||||
|
background = "hud_hunger_bg.png",
|
||||||
|
max = 0,
|
||||||
|
})
|
|
@ -0,0 +1,140 @@
|
||||||
|
2.1.5
|
||||||
|
-----
|
||||||
|
- Fixed armor not being updated correct due armor mod changes
|
||||||
|
|
||||||
|
2.1.4
|
||||||
|
-----
|
||||||
|
- Fixed unhandled exception in hud.swap_statbar()
|
||||||
|
|
||||||
|
2.1.3
|
||||||
|
-----
|
||||||
|
- Added hud.swap_statbar() and fix wrong behavior of previous workaround
|
||||||
|
- Fixed missing background of some statbars in multiplayer
|
||||||
|
|
||||||
|
2.1.2
|
||||||
|
-----
|
||||||
|
- Fixed crash caused by animated nodes (reported by Krock)
|
||||||
|
- Fixed "freezing" of empty slots (reported by kilbith)
|
||||||
|
|
||||||
|
2.1.1
|
||||||
|
-----
|
||||||
|
- Added itemcounting/wearout info
|
||||||
|
- Added support for hud scaling
|
||||||
|
- Fixed typo causing endless updating
|
||||||
|
- Fixed image scaling of some textures (like glass)
|
||||||
|
- Improved ItemWheel image
|
||||||
|
|
||||||
|
2.1
|
||||||
|
---
|
||||||
|
- Added "ItemWheel" (experimental)
|
||||||
|
- Fixed disapperaring hunger bar (reported by poet-nohit)
|
||||||
|
|
||||||
|
2.0.1
|
||||||
|
-----
|
||||||
|
- Fix disappearing hotbar (reported by poet-nohit)
|
||||||
|
- Fix unused global var
|
||||||
|
- Added one more check to catch probably incorrect players
|
||||||
|
|
||||||
|
2.0
|
||||||
|
---
|
||||||
|
- Complete rewrite
|
||||||
|
- Moved hunger into seperate mod
|
||||||
|
- Added API
|
||||||
|
- Switched License to LGPL 2.1
|
||||||
|
|
||||||
|
===== ===== =====
|
||||||
|
----- 0-1.x -----
|
||||||
|
===== ===== =====
|
||||||
|
|
||||||
|
1.4.1
|
||||||
|
-----
|
||||||
|
- ###
|
||||||
|
|
||||||
|
1.4
|
||||||
|
---
|
||||||
|
- New hunger mechanics/added experimental player-action based hunger
|
||||||
|
- Better crosshair texture, switched to "new" default hand
|
||||||
|
- Added support for farming redo mod, kpgmobs and jkmod
|
||||||
|
|
||||||
|
1.3.3
|
||||||
|
-----
|
||||||
|
- Prevent crash with armor mod and missing player
|
||||||
|
- Add support for ethereal mod (by TenPlus1)
|
||||||
|
|
||||||
|
1.3.2
|
||||||
|
-----
|
||||||
|
- Fix dependecies (by Chris Beelby)
|
||||||
|
- Add support for creatures mod
|
||||||
|
- Add optional healing for food (by TenPlus1)
|
||||||
|
|
||||||
|
1.3.1
|
||||||
|
-----
|
||||||
|
- Add compatibility for statbar scaling
|
||||||
|
- Fix typo in depends.txt
|
||||||
|
- Lower maintimer tick
|
||||||
|
|
||||||
|
1.3
|
||||||
|
---
|
||||||
|
- New way hunger is saved (all old files in world dirctory can get deleted [e.g. hud_BlockMen_hunger])
|
||||||
|
- Fixed healing (not while drowning, fix after death)
|
||||||
|
- Add support for mods: seaplants[sea] and mobfcooking (by Xanthin)
|
||||||
|
- Tweaked hand image
|
||||||
|
- Player can die caus of starving now
|
||||||
|
|
||||||
|
1.2
|
||||||
|
---
|
||||||
|
- Send statbar values only to client when changed
|
||||||
|
- Hide armor bar if not wearing armor
|
||||||
|
- More reliable food overrides (by CiaranG)
|
||||||
|
- Support for bushes_classic foods (plantlife modpack) (by CiaranG)
|
||||||
|
- Add support for mushroom mod food/poison (by CiaranG)
|
||||||
|
- Add support for mods: fruit and mush45
|
||||||
|
- New images for hotbar, smaller armor icons
|
||||||
|
|
||||||
|
1.1
|
||||||
|
---
|
||||||
|
- added support for stu's 3darmor mod
|
||||||
|
- restructured and cleaned up code
|
||||||
|
- added support for poisen food (damages player, but does not kill)
|
||||||
|
|
||||||
|
1.0
|
||||||
|
---
|
||||||
|
- hunger is reset after death
|
||||||
|
- health and hunger bar is shown correct on all screen resolutions now
|
||||||
|
- switched to changed native hotbar image support
|
||||||
|
- fixed revival of player when drown
|
||||||
|
- hunger bar is not shown anymore if hunger is disabled
|
||||||
|
- hunger can be disabled by minetest.conf ("hud_hunger_enable = false")
|
||||||
|
|
||||||
|
0.5 Beta
|
||||||
|
----------
|
||||||
|
- removed the fancy borders of hud inventory bar and moved to new native support
|
||||||
|
- moved crosshair to native support too
|
||||||
|
|
||||||
|
0.4 Beta
|
||||||
|
----------
|
||||||
|
- enabled drowning
|
||||||
|
|
||||||
|
0.3 Beta
|
||||||
|
----------
|
||||||
|
- added fancy borders of hud inventory bar (only for screenheight <= 800)
|
||||||
|
|
||||||
|
0.2.3 Beta
|
||||||
|
----------
|
||||||
|
- added support for food of glooptest and bushes (commit by CheeseKeg)
|
||||||
|
|
||||||
|
0.2.2 Beta
|
||||||
|
----------
|
||||||
|
- added support for food of animalmaterials (mobf modpack),fishing
|
||||||
|
|
||||||
|
0.2.1 Beta
|
||||||
|
----------
|
||||||
|
- tweaked override of food
|
||||||
|
- added support for food of dwares, moretrees and simple mobs
|
||||||
|
|
||||||
|
0.2 Beta
|
||||||
|
--------
|
||||||
|
- added support of custom config files
|
||||||
|
- you can eat max. 50% more than before (although it isnt shown in hunger bar)
|
||||||
|
- you get healed with 8 breads and more (in hunger bar) now
|
||||||
|
- a bread (from farming) == 2 breads in hunger bar
|
|
@ -0,0 +1 @@
|
||||||
|
3d_armor?
|
|
@ -0,0 +1,35 @@
|
||||||
|
--##Better HUD example config file##
|
||||||
|
------------------------------------
|
||||||
|
-- This example moves the statbars in the down left and down right corners. By Echoes91
|
||||||
|
|
||||||
|
-- NOTICE --
|
||||||
|
-- if damage is disabled no statbar is shown at all
|
||||||
|
-- Make sure that the statbars are shown correct on other screen resolutions aswell
|
||||||
|
|
||||||
|
|
||||||
|
HUD_SB_SIZE = {x = 24, y = 24} -- statbar icon size in pixel before (!) scaling
|
||||||
|
|
||||||
|
--
|
||||||
|
-- health bar
|
||||||
|
--
|
||||||
|
HUD_HEALTH_POS = {x = 0, y = 1} -- min 0, max 1
|
||||||
|
HUD_HEALTH_OFFSET = {x = 10, y = -30} -- offset in pixel
|
||||||
|
|
||||||
|
--
|
||||||
|
-- hunger bar
|
||||||
|
--
|
||||||
|
HUD_HUNGER_POS = {x = 1, y = 1} -- min 0, max 1
|
||||||
|
HUD_HUNGER_OFFSET = {x = -250, y = -30} -- offset in pixel
|
||||||
|
|
||||||
|
--
|
||||||
|
-- breath bar
|
||||||
|
--
|
||||||
|
HUD_AIR_POS = {x = 1, y = 1} -- min 0, max 1
|
||||||
|
HUD_AIR_OFFSET = {x = -250, y = -60} -- offset in pixel
|
||||||
|
|
||||||
|
--
|
||||||
|
-- armor bar
|
||||||
|
--
|
||||||
|
HUD_ARMOR_POS = {x = 0, y = 1} -- min 0, max 1
|
||||||
|
HUD_ARMOR_OFFSET = {x = 10, y = -60} -- offset in pixel
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
hud = {}
|
||||||
|
GameOS = 0
|
||||||
|
|
||||||
|
local path = minetest.get_modpath("hud")
|
||||||
|
|
||||||
|
if PLATFORM == "IOS" or PLATFORM == "Android" then
|
||||||
|
GameOS = "Mobile"
|
||||||
|
else
|
||||||
|
GameOS = "PC"
|
||||||
|
end
|
||||||
|
|
||||||
|
if GameOS == "Mobile" then
|
||||||
|
|
||||||
|
elseif GameOS == "PC" then
|
||||||
|
|
||||||
|
dofile(path .. "/api.lua")
|
||||||
|
dofile(path .. "/builtin.lua")
|
||||||
|
dofile(path .. "/legacy.lua")
|
||||||
|
dofile(path .. "/itemwheel.lua")
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
end
|
|
@ -0,0 +1,195 @@
|
||||||
|
local hb = {}
|
||||||
|
local scale = 0.5
|
||||||
|
|
||||||
|
local function update_wheel(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not player or not name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local i = player:get_wield_index()
|
||||||
|
local i1 = i - 1
|
||||||
|
local i3 = i + 1
|
||||||
|
|
||||||
|
-- it's a wheel
|
||||||
|
if i1 < 1 then
|
||||||
|
i1 = HUD_IW_MAX
|
||||||
|
end
|
||||||
|
if i3 > HUD_IW_MAX then
|
||||||
|
i3 = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
-- get the displayed items
|
||||||
|
local inv = player:get_inventory()
|
||||||
|
local item = hb[name].item
|
||||||
|
local index = hb[name].index
|
||||||
|
local item2 = player:get_wielded_item():get_name()
|
||||||
|
|
||||||
|
-- update all items when wielded has changed
|
||||||
|
if item and item2 and item ~= item2 or item == "wheel_init" or (index and index ~= i) then
|
||||||
|
local items = {}
|
||||||
|
items[1] = inv:get_stack("main", i1):get_name() or nil
|
||||||
|
items[2] = item2
|
||||||
|
items[3] = inv:get_stack("main", i3):get_name() or nil
|
||||||
|
local num = player:get_wielded_item():get_count()
|
||||||
|
local wear = player:get_wielded_item():get_wear()
|
||||||
|
if num < 2 then
|
||||||
|
num = ""
|
||||||
|
else
|
||||||
|
num = tostring(num)
|
||||||
|
end
|
||||||
|
if wear > 0 then
|
||||||
|
num = tostring(100 - math.floor((wear/65535)*100)) .. "%"
|
||||||
|
end
|
||||||
|
|
||||||
|
for n, m in pairs(items) do
|
||||||
|
-- some default values
|
||||||
|
local image = "hud_wielded.png"
|
||||||
|
local need_scale = false
|
||||||
|
local s1 = {x = 1*scale, y = 1*scale}
|
||||||
|
local s2 = {x = 3*scale, y = 3*scale}
|
||||||
|
if n ~= 2 then
|
||||||
|
s1 = {x = 0.6*scale, y = 0.6*scale}
|
||||||
|
s2 = {x = 2*scale, y = 2*scale}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- get the images
|
||||||
|
local def = minetest.registered_items[m]
|
||||||
|
if def then
|
||||||
|
if def.tiles and (def.tiles[1] and not def.tiles[1].name) then
|
||||||
|
image = minetest.inventorycube(def.tiles[1], def.tiles[6] or def.tiles[3] or def.tiles[1], def.tiles[3] or def.tiles[1])
|
||||||
|
need_scale = true
|
||||||
|
end
|
||||||
|
if def.inventory_image and def.inventory_image ~= "" then
|
||||||
|
image = def.inventory_image
|
||||||
|
need_scale = true
|
||||||
|
end
|
||||||
|
if def.wielded_image and def.wielded_image ~= "" then
|
||||||
|
image = def.wielded_image
|
||||||
|
need_scale = false
|
||||||
|
end
|
||||||
|
-- needed for nodes with inventory cube inv imges, e.g. glass
|
||||||
|
if string.find(image, 'inventorycube') then
|
||||||
|
need_scale = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- get the id and update hud elements
|
||||||
|
local id = hb[name].id[n]
|
||||||
|
if id and image then
|
||||||
|
if need_scale then
|
||||||
|
player:hud_change(id, "scale", s1)
|
||||||
|
else
|
||||||
|
player:hud_change(id, "scale", s2)
|
||||||
|
end
|
||||||
|
-- make previous and next item darker
|
||||||
|
--if n ~= 2 then
|
||||||
|
--image = image .. "^[colorize:#0005"
|
||||||
|
--end
|
||||||
|
player:hud_change(id, "text", image)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if hb[name].id[4] then
|
||||||
|
player:hud_change(hb[name].id[4], "text", num)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- update wielded buffer
|
||||||
|
if hb[name].id[2] ~= nil then
|
||||||
|
hb[name].item = item2
|
||||||
|
hb[name].index = i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
hb[name]= {}
|
||||||
|
hb[name].id = {}
|
||||||
|
hb[name].item = "wheel_init"
|
||||||
|
hb[name].index = 1
|
||||||
|
|
||||||
|
minetest.after(0.1, function()
|
||||||
|
|
||||||
|
-- hide builtin hotbar
|
||||||
|
local hud_flags = player:hud_get_flags()
|
||||||
|
hud_flags.hotbar = false
|
||||||
|
player:hud_set_flags(hud_flags)
|
||||||
|
|
||||||
|
player:hud_add({
|
||||||
|
hud_elem_type = "image",
|
||||||
|
text = "hud_new.png",
|
||||||
|
position = {x = 0.5, y = 1},
|
||||||
|
scale = {x = 1*scale, y = 1*scale},
|
||||||
|
alignment = {x = 0, y = -1},
|
||||||
|
offset = {x = 0, y = 0}
|
||||||
|
})
|
||||||
|
|
||||||
|
hb[name].id[1] = player:hud_add({
|
||||||
|
hud_elem_type = "image",
|
||||||
|
text = "hud_wielded.png",
|
||||||
|
position = {x = 0.5, y = 1},
|
||||||
|
scale = {x = 0.5, y = 0.5},
|
||||||
|
alignment = {x = -3.5, y = -1.5},
|
||||||
|
offset = {x = -75*scale, y = -8*scale}
|
||||||
|
})
|
||||||
|
|
||||||
|
hb[name].id[2] = player:hud_add({
|
||||||
|
hud_elem_type = "image",
|
||||||
|
text = "hud_wielded.png",
|
||||||
|
position = {x = 0.5, y = 1},
|
||||||
|
scale = {x = 3*scale, y = 3*scale},
|
||||||
|
alignment = {x = 0, y = -1.5},
|
||||||
|
offset = {x = 0, y = -12*scale}
|
||||||
|
})
|
||||||
|
|
||||||
|
hb[name].id[3] = player:hud_add({
|
||||||
|
hud_elem_type = "image",
|
||||||
|
text = "hud_wielded.png",
|
||||||
|
position = {x = 0.5, y = 1},
|
||||||
|
scale = {x = 1*scale, y = 1*scale},
|
||||||
|
alignment = {x = 3.5, y = -1.5},
|
||||||
|
offset = {x = 75*scale, y = -8*scale}
|
||||||
|
})
|
||||||
|
|
||||||
|
hb[name].id[4] = player:hud_add({
|
||||||
|
hud_elem_type = "text",
|
||||||
|
position = {x = 0.5, y = 1},
|
||||||
|
offset = {x = 35*scale, y = -55*scale},
|
||||||
|
alignment = {x = 0, y = -1},
|
||||||
|
number = 0xffffff,
|
||||||
|
text = "",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- init item wheel
|
||||||
|
minetest.after(0, function()
|
||||||
|
hb[name].item = "wheel_init"
|
||||||
|
update_wheel(player)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
local function update_wrapper(a, b, player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
minetest.after(0, function()
|
||||||
|
hb[name].item = "wheel_init"
|
||||||
|
update_wheel(player)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_on_placenode(update_wrapper)
|
||||||
|
minetest.register_on_dignode(update_wrapper)
|
||||||
|
|
||||||
|
|
||||||
|
local timer = 0
|
||||||
|
minetest.register_globalstep(function(dtime)
|
||||||
|
timer = timer + dtime
|
||||||
|
if timer >= HUD_IW_TICK then
|
||||||
|
timer = 0
|
||||||
|
for _, player in ipairs(minetest.get_connected_players()) do
|
||||||
|
update_wheel(player)
|
||||||
|
end
|
||||||
|
end--timer
|
||||||
|
end)
|
|
@ -0,0 +1,73 @@
|
||||||
|
-- Armor
|
||||||
|
function hud.set_armor()
|
||||||
|
end
|
||||||
|
|
||||||
|
if hud.show_armor then
|
||||||
|
local shields = minetest.get_modpath("shields") ~= nil
|
||||||
|
local armor_org_func = armor.set_player_armor
|
||||||
|
|
||||||
|
local function get_armor_lvl(def)
|
||||||
|
-- items/protection based display
|
||||||
|
local lvl = def.level or 0
|
||||||
|
local max = 63 -- full diamond armor
|
||||||
|
if shields then
|
||||||
|
max = 84.14 -- full diamond armor + diamond shield
|
||||||
|
end
|
||||||
|
-- TODO: is there a sane way to read out max values?
|
||||||
|
local ret = lvl/max
|
||||||
|
if ret > 1 then
|
||||||
|
ret = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
return tonumber(20 * ret)
|
||||||
|
end
|
||||||
|
|
||||||
|
function armor.set_player_armor(self, player)
|
||||||
|
armor_org_func(self, player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
local def = self.def
|
||||||
|
local armor_lvl = 0
|
||||||
|
if def[name] and def[name].level then
|
||||||
|
armor_lvl = get_armor_lvl(def[name])
|
||||||
|
end
|
||||||
|
hud.change_item(player, "armor", {number = armor_lvl})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function hud.notify_hunger(delay, use)
|
||||||
|
local txt_part = "enable"
|
||||||
|
if use then
|
||||||
|
txt_part = "use"
|
||||||
|
end
|
||||||
|
minetest.after(delay, function()
|
||||||
|
minetest.chat_send_all("#Better HUD: You can't " .. txt_part .. " hunger without the \"hunger\" mod")
|
||||||
|
minetest.chat_send_all(" Enable it or download it from \"https://github.com/BlockMen/hunger\"")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Hunger related functions
|
||||||
|
if not hud.show_hunger then
|
||||||
|
function hud.set_hunger()
|
||||||
|
hud.notify_hunger(1, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function hud.get_hunger()
|
||||||
|
hud.notify_hunger(1, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function hud.item_eat(hp_change, replace_with_item)
|
||||||
|
return function(itemstack, user, pointed_thing)
|
||||||
|
hud.notify_hunger(1, true)
|
||||||
|
local func = minetest.item_eat(hp_change, replace_with_item)
|
||||||
|
return func(itemstack, user, pointed_thing)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function hud.save_hunger()
|
||||||
|
hud.notify_hunger(1, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function hud.load_hunger(player)
|
||||||
|
hud.notify_hunger(1, true)
|
||||||
|
end
|
||||||
|
end
|
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 579 B |
After Width: | Height: | Size: 424 B |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 302 B |
After Width: | Height: | Size: 369 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 417 B |
After Width: | Height: | Size: 522 B |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 143 B |
|
@ -1,539 +0,0 @@
|
||||||
-- a
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.lettera then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:a_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:a_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:a_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:a_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:a_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:a_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:a_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:a_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- b
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterb then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:b_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:b_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:b_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:b_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:b_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:b_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:b_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:b_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- c
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterc then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:c_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:c_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:c_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:c_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:c_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:c_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:c_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:c_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- d
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterd then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:d_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:d_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:d_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:d_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:d_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:d_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:d_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:d_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- e
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.lettere then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:e_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:e_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:e_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:e_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:e_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:e_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:e_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:e_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- f
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterf then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:f_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:f_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:f_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:f_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:f_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:f_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:f_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:f_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- g
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterg then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:g_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:g_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:g_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:g_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:g_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:g_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:g_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:g_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterh then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:h_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:h_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:h_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:h_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:h_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:h_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:h_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:h_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letteri then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:i_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:i_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:i_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:i_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:i_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:i_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:i_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:i_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterj then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:j_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:j_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:j_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:j_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:j_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:j_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:j_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:j_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- k
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterk then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:k_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:k_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:k_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:k_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:k_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:k_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:k_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:k_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- l
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterl then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:l_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:l_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:l_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:l_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:l_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:l_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:l_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:l_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- m
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterm then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:m_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:m_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:m_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:m_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:m_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:m_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:m_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:m_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- n
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.lettern then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:n_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:n_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:n_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:n_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:n_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:n_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:n_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:n_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- o
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.lettero then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:o_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:o_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:o_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:o_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:o_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:o_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:o_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:o_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- p
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterp then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:p_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:p_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:p_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:p_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:p_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:p_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:p_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:p_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- q
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterq then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:q_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:q_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:q_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:q_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:q_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:q_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:q_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:q_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- r
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterr then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:r_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:r_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:r_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:r_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:r_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:r_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:r_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:r_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- s
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letters then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:s_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:s_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:s_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:s_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:s_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:s_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:s_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:s_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- t
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.lettert then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:t_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:t_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:t_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:t_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:t_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:t_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:t_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:t_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- u
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letteru then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:u_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:u_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:u_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:u_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:u_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:u_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:u_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:u_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- v
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterv then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:v_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:v_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:v_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:v_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:v_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:v_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:v_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:v_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- x
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterx then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:x_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:x_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:x_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:x_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:x_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:x_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:x_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:x_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- y
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.lettery then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:y_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:y_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:y_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:y_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:y_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:y_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:y_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:y_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- z
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterz then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:z_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:z_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:z_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:z_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:z_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:z_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:z_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:z_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- w
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.letterw then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:w_white')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:w_black')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:w_red')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:w_orange')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:w_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:w_pink')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:w_green')
|
|
||||||
player:get_inventory():add_item('main', 'letterscolors:w_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
|
@ -1,377 +0,0 @@
|
||||||
-- 0
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.math0 then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:0_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:0_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:0_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:0_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:0_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:0_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:0_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:0_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- 1
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.math1 then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:1_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:1_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:1_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:1_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:1_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:1_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:1_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:1_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- 2
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.math2 then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:2_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:2_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:2_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:2_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:2_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:2_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:2_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:2_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- 3
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.math3 then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:3_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:3_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:3_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:3_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:3_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:3_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:3_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:3_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- 4
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.math4 then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:4_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:4_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:4_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:4_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:4_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:4_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:4_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:4_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- 5
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.math5 then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:5_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:5_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:5_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:5_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:5_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:5_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:5_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:5_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- 6
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.math6 then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:6_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:6_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:6_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:6_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:6_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:6_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:6_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:6_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- 7
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.math7 then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:7_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:7_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:7_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:7_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:7_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:7_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:7_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:7_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- 8
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.math8 then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:8_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:8_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:8_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:8_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:8_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:8_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:8_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:8_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- 9
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.math9 then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:9_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:9_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:9_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:9_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:9_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:9_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:9_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:9_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- diviser
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.mathdiviser then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:diviser_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:diviser_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:diviser_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:diviser_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:diviser_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:diviser_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:diviser_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:diviser_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- egale
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.mathegale then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:egale_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:egale_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:egale_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:egale_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:egale_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:egale_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:egale_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:egale_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- inferieure
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.mathinferieure then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:inferieure_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:inferieure_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:inferieure_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:inferieure_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:inferieure_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:inferieure_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:inferieure_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:inferieure_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- moins
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.mathmoins then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:moins_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:moins_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:moins_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:moins_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:moins_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:moins_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:moins_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:moins_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- multiplier
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.mathmultiplier then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:multiplier_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:multiplier_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:multiplier_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:multiplier_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:multiplier_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:multiplier_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:multiplier_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:multiplier_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- plus
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.mathplus then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:plus_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:plus_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:plus_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:plus_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:plus_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:plus_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:plus_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:plus_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- superieure
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.mathsuperieure then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:superieure_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:superieure_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:superieure_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:superieure_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:superieure_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:superieure_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:superieure_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:superieure_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- virgule
|
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
if fields.mathvirgule then --main page
|
|
||||||
|
|
||||||
player:get_inventory():set_list("main", {})
|
|
||||||
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:virgule_white')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:virgule_black')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:virgule_red')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:virgule_orange')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:virgule_yellow')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:virgule_pink')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:virgule_green')
|
|
||||||
player:get_inventory():add_item('main', 'mathscolors:virgule_blue')
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
|
@ -10,8 +10,6 @@ Edited by TenPlus1 (23rd March 2016)
|
||||||
|
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
-- For Tooltip : First is name of button, Two is description
|
|
||||||
|
|
||||||
-- expose api
|
-- expose api
|
||||||
inventory_plus = {}
|
inventory_plus = {}
|
||||||
|
|
||||||
|
@ -19,7 +17,7 @@ inventory_plus = {}
|
||||||
inventory_plus.buttons = {}
|
inventory_plus.buttons = {}
|
||||||
|
|
||||||
-- default inventory page
|
-- default inventory page
|
||||||
inventory_plus.default = "main"
|
inventory_plus.default = minetest.settings:get("inventory_default") or "main"
|
||||||
|
|
||||||
-- register_button
|
-- register_button
|
||||||
inventory_plus.register_button = function(player, name, label)
|
inventory_plus.register_button = function(player, name, label)
|
||||||
|
@ -87,87 +85,34 @@ inventory_plus.get_formspec = function(player, page)
|
||||||
|
|
||||||
formspec = formspec
|
formspec = formspec
|
||||||
|
|
||||||
.. "image_button_exit[0,0.5;1,1;blocks.png;blocks;]"
|
.. "image_button_exit[0,0.5;1,1;gui_hotbar_selected.png^blocks.png;blocks;]"
|
||||||
.. "tooltip[blocks;Block]"
|
.. "image_button_exit[1,0.5;1,1;gui_hotbar_selected.png^stairs.png;stairs;]"
|
||||||
|
.. "image_button_exit[2,0.5;1,1;gui_hotbar_selected.png^slabs.png;slabs;]"
|
||||||
.. "image_button_exit[1,0.5;1,1;stairs.png;stairs;]"
|
.. "image_button_exit[3,0.5;1,1;gui_hotbar_selected.png^windows.png;windows;]"
|
||||||
.. "tooltip[stairs;Stair]"
|
.. "image_button_exit[4,0.5;1,1;gui_hotbar_selected.png^lights.png;lights;]"
|
||||||
|
.. "image_button_exit[5,0.5;1,1;gui_hotbar_selected.png^waters.png;waters;]"
|
||||||
.. "image_button_exit[2,0.5;1,1;slabs.png;slabs;]"
|
.. "image_button_exit[6,0.5;1,1;gui_hotbar_selected.png^doors.png;doors;] "
|
||||||
.. "tooltip[slabs;Slab]"
|
.. "image_button_exit[7,0.5;1,1;gui_hotbar_selected.png^carpets.png;carpets;]"
|
||||||
|
.. "image_button_exit[0,2.5;1,1;gui_hotbar_selected.png^trapdoor.png;trapdoor;]"
|
||||||
.. "image_button_exit[3,0.5;1,1;windows.png;windows;]"
|
.. "image_button_exit[1,2.5;1,1;gui_hotbar_selected.png^fence.png;fence;]"
|
||||||
.. "tooltip[windows;Window]"
|
.. "image_button_exit[2,2.5;1,1;gui_hotbar_selected.png^cylinder.png;cylinder;]"
|
||||||
|
.. "image_button_exit[3,2.5;1,1;gui_hotbar_selected.png^triangle.png;triangle;]"
|
||||||
.. "image_button_exit[4,0.5;1,1;lights.png;lights;]"
|
.. "image_button_exit[4,2.5;1,1;gui_hotbar_selected.png^long.png;long;]"
|
||||||
.. "tooltip[lights;Light]"
|
.. "image_button_exit[5,2.5;1,1;gui_hotbar_selected.png^cone.png;cone;]"
|
||||||
|
.. "image_button_exit[6,2.5;1,1;gui_hotbar_selected.png^sphere.png;sphere;]"
|
||||||
.. "image_button_exit[5,0.5;1,1;waters.png;waters;]"
|
.. "image_button_exit[7,2.5;1,1;gui_hotbar_selected.png^cornera.png;outcorner;]"
|
||||||
.. "tooltip[waters;Water]"
|
.. "image_button_exit[0,4.5;1,1;gui_hotbar_selected.png^cornerb.png;incorner;]"
|
||||||
|
.. "image_button_exit[1,4.5;1,1;gui_hotbar_selected.png^arc.png;arc;]"
|
||||||
.. "image_button_exit[6,0.5;1,1;doors.png;doors;] "
|
.. "image_button_exit[2,4.5;1,1;gui_hotbar_selected.png^arcin.png;inarc;]"
|
||||||
.. "tooltip[doors;Door]"
|
.. "image_button_exit[3,4.5;1,1;gui_hotbar_selected.png^arcout.png;outarc;]"
|
||||||
|
.. "image_button_exit[4,4.5;1,1;gui_hotbar_selected.png^fullpipe.png;fullpipe;]"
|
||||||
.. "image_button_exit[7,0.5;1,1;carpets.png;carpets;]"
|
.. "image_button_exit[5,4.5;1,1;gui_hotbar_selected.png^fullpipeborder.png;fullpipeborder;]"
|
||||||
.. "tooltip[carpets;Carpet]"
|
.. "image_button_exit[6,4.5;1,1;gui_hotbar_selected.png^edge.png;edge;]"
|
||||||
|
.. "image_button[7,4.5;1,1;gui_hotbar_selected.png^droite.png;nodes2;]"
|
||||||
.. "image_button_exit[0,2.5;1,1;trapdoor.png;trapdoor;]"
|
|
||||||
.. "tooltip[trapdoor;Trapdoor]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,2.5;1,1;fence.png;fence;]"
|
|
||||||
.. "tooltip[fence;Fence]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,2.5;1,1;cylinder.png;cylinder;]"
|
|
||||||
.. "tooltip[cylinder;Cylinder]"
|
|
||||||
|
|
||||||
.. "image_button_exit[3,2.5;1,1;triangle.png;triangle;]"
|
|
||||||
.. "tooltip[triangle;Triangle]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,2.5;1,1;long.png;long;]"
|
|
||||||
.. "tooltip[long;Long Triangle]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,2.5;1,1;cone.png;cone;]"
|
|
||||||
.. "tooltip[cone;Cone]"
|
|
||||||
|
|
||||||
.. "image_button_exit[6,2.5;1,1;sphere.png;sphere;]"
|
|
||||||
.. "tooltip[sphere;Sphere]"
|
|
||||||
|
|
||||||
.. "image_button_exit[7,2.5;1,1;cornera.png;outcorner;]"
|
|
||||||
.. "tooltip[outcorner;Out Corner]"
|
|
||||||
|
|
||||||
.. "image_button_exit[0,4.5;1,1;cornerb.png;incorner;]"
|
|
||||||
.. "tooltip[incorner;In Corner]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,4.5;1,1;arc.png;arc;]"
|
|
||||||
.. "tooltip[arc;Arc]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,4.5;1,1;arcin.png;inarc;]"
|
|
||||||
.. "tooltip[inarc;In Arc]"
|
|
||||||
|
|
||||||
.. "image_button_exit[3,4.5;1,1;arcout.png;outarc;]"
|
|
||||||
.. "tooltip[outarc;Out Arc]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,4.5;1,1;fullpipe.png;fullpipe;]"
|
|
||||||
.. "tooltip[fullpipe;Fullpipe]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,4.5;1,1;fullpipeborder.png;fullpipeborder;]"
|
|
||||||
.. "tooltip[fullpipeborder;Fullpipe Border]"
|
|
||||||
|
|
||||||
.. "image_button_exit[6,4.5;1,1;edge.png;edge;]"
|
|
||||||
.. "tooltip[edge;Edge]"
|
|
||||||
|
|
||||||
.. "image_button[7,4.5;1,1;droite.png;nodes2;]"
|
|
||||||
.. "tooltip[nodes2;Nodes Page 2]"
|
|
||||||
|
|
||||||
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
|
||||||
.. "tooltip[main;Back to Menu]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
||||||
.. "tooltip[rotate;Rotate]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
||||||
.. "tooltip[none;None]"
|
|
||||||
|
|
||||||
|
.. "image_button[0,6.5;1,1;gui_hotbar_selected.png^gauche.png;main;]"
|
||||||
|
.. "image_button_exit[1,6.5;1,1;gui_hotbar_selected.png^rotate.png;rotate;]"
|
||||||
|
.. "image_button_exit[2,6.5;1,1;gui_hotbar_selected.png^nones.png;none;]"
|
||||||
|
|
||||||
.. ""
|
.. ""
|
||||||
|
|
||||||
|
@ -186,17 +131,17 @@ inventory_plus.get_formspec = function(player, page)
|
||||||
|
|
||||||
formspec = formspec
|
formspec = formspec
|
||||||
|
|
||||||
.. "image_button_exit[0,0.5;1,1;edgecorner.png;edgecorner;]"
|
-- .. "image_button_exit[0,0.5;1,1;nctwoedge.png;nct;]"
|
||||||
.. "tooltip[edgecorner;Edge corner]"
|
-- .. "label[0.1,1;Node-T]"
|
||||||
|
|
||||||
.. "image_button[0,6.5;1,1;gauche.png;nodes;]"
|
-- .. "image_button_exit[1,0.5;1,1;nccross.png;nccross;]"
|
||||||
.. "tooltip[nodes;Nodes Page 1]"
|
-- .. "label[1.1,1;Cross]"
|
||||||
|
|
||||||
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
.. "image_button_exit[0,0.5;1,1;gui_hotbar_selected.png^edgecorner.png;edgecorner;]"
|
||||||
.. "tooltip[rotate;Rotate]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
.. "image_button[0,6.5;1,1;gui_hotbar_selected.png^gauche.png;nodes;]"
|
||||||
.. "tooltip[none;None]"
|
.. "image_button_exit[1,6.5;1,1;gui_hotbar_selected.png^rotate.png;rotate;]"
|
||||||
|
.. "image_button_exit[2,6.5;1,1;gui_hotbar_selected.png^nones.png;none;]"
|
||||||
|
|
||||||
.. ""
|
.. ""
|
||||||
|
|
||||||
|
@ -214,17 +159,9 @@ inventory_plus.get_formspec = function(player, page)
|
||||||
formspec = formspec
|
formspec = formspec
|
||||||
|
|
||||||
|
|
||||||
.. "image_button_exit[0,0.5;1,1;mobs_chicken_egg_overlay.png;panda;]"
|
.. "image_button_exit[0,0.5;1,1;gui_hotbar_selected.png^mobs_chicken_egg_overlay.png;panda;]"
|
||||||
.. "tooltip[panda;Animals & Tools]"
|
|
||||||
|
|
||||||
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
.. "image_button[0,6.5;1,1;gui_hotbar_selected.png^gauche.png;main;]"
|
||||||
.. "tooltip[main;Back to Menu]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
||||||
.. "tooltip[rotate;Rotate]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
||||||
.. "tooltip[none;None]"
|
|
||||||
|
|
||||||
.. ""
|
.. ""
|
||||||
|
|
||||||
|
@ -243,86 +180,36 @@ if page == "furnitures" then
|
||||||
|
|
||||||
formspec = formspec
|
formspec = formspec
|
||||||
|
|
||||||
.. "image_button_exit[0,0.5;1,1;chair.png;chair;]"
|
.. "image_button_exit[0,0.5;1,1;gui_hotbar_selected.png^chair.png;chair;]"
|
||||||
.. "tooltip[chair;Chair]"
|
.. "image_button_exit[1,0.5;1,1;gui_hotbar_selected.png^sofas.png;sofas;]"
|
||||||
|
.. "image_button_exit[2,0.5;1,1;gui_hotbar_selected.png^table.png;table;]"
|
||||||
|
.. "image_button_exit[3,0.5;1,1;gui_hotbar_selected.png^signs.png;signs;]"
|
||||||
|
.. "image_button_exit[4,0.5;1,1;gui_hotbar_selected.png^beds.png;beds;]"
|
||||||
|
.. "image_button_exit[5,0.5;1,1;gui_hotbar_selected.png^flowers.png;flowers;]"
|
||||||
|
.. "image_button_exit[6,0.5;1,1;gui_hotbar_selected.png^flag.png;flags;]"
|
||||||
|
.. "image_button_exit[7,0.5;1,1;gui_hotbar_selected.png^computer.png;computers;]"
|
||||||
|
.. "image_button_exit[0,2.5;1,1;gui_hotbar_selected.png^desk.png;desks;]"
|
||||||
|
.. "image_button_exit[1,2.5;1,1;gui_hotbar_selected.png^bench.png;bench;]"
|
||||||
|
.. "image_button_exit[2,2.5;1,1;gui_hotbar_selected.png^armoire.png;armoire;]"
|
||||||
|
.. "image_button_exit[3,2.5;1,1;gui_hotbar_selected.png^frigo.png;frigo;]"
|
||||||
|
.. "image_button_exit[4,2.5;1,1;gui_hotbar_selected.png^fbtrap.png;fbtrap;]"
|
||||||
|
.. "image_button_exit[5,2.5;1,1;gui_hotbar_selected.png^fbstair.png;fbstair;]"
|
||||||
|
.. "image_button_exit[6,2.5;1,1;gui_hotbar_selected.png^fbladder.png;fbladder;]"
|
||||||
|
.. "image_button_exit[7,2.5;1,1;gui_hotbar_selected.png^cgherse.png;cgherse;]"
|
||||||
|
.. "image_button_exit[0,4.5;1,1;gui_hotbar_selected.png^cgborder.png;cgborder;]"
|
||||||
|
.. "image_button_exit[1,4.5;1,1;gui_hotbar_selected.png^cgdoor.png;cgdoor;]"
|
||||||
|
-- .. "image_button_exit[2,4.5;1,1;gui_hotbar_selected.png^slabs.png;tslabs;]"
|
||||||
|
.. "image_button_exit[2,4.5;1,1;gui_hotbar_selected.png^torch.png;torch;]"
|
||||||
|
.. "image_button_exit[3,4.5;1,1;gui_hotbar_selected.png^invcross.png;shieldcross;]"
|
||||||
|
.. "image_button_exit[4,4.5;1,1;gui_hotbar_selected.png^invslash.png;shieldslash;]"
|
||||||
|
.. "image_button_exit[5,4.5;1,1;gui_hotbar_selected.png^invchevron.png;shieldchevron;]"
|
||||||
|
.."image_button_exit[6,4.5;1,1;gui_hotbar_selected.png^trampo.png;trampoline;]"
|
||||||
|
|
||||||
.. "image_button_exit[1,0.5;1,1;sofas.png;sofas;]"
|
.. "image_button[7,4.5;1,1;gui_hotbar_selected.png^droite.png;furnitures2;]"
|
||||||
.. "tooltip[sofas;Armchair]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,0.5;1,1;table.png;table;]"
|
.. "image_button[0,6.5;1,1;gui_hotbar_selected.png^gauche.png;main;]"
|
||||||
.. "tooltip[table;Table]"
|
.. "image_button_exit[1,6.5;1,1;gui_hotbar_selected.png^rotate.png;rotate;]"
|
||||||
|
.. "image_button_exit[2,6.5;1,1;gui_hotbar_selected.png^nones.png;none;]"
|
||||||
.. "image_button_exit[3,0.5;1,1;signs.png;signs;]"
|
|
||||||
.. "tooltip[signs;Sign]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,0.5;1,1;beds.png;beds;]"
|
|
||||||
.. "tooltip[beds;Bed]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,0.5;1,1;flowers.png;flowers;]"
|
|
||||||
.. "tooltip[flowers;Flower]"
|
|
||||||
|
|
||||||
.. "image_button_exit[6,0.5;1,1;flag.png;flags;]"
|
|
||||||
.. "tooltip[flags;Flag]"
|
|
||||||
|
|
||||||
.. "image_button_exit[7,0.5;1,1;computer.png;computers;]"
|
|
||||||
.. "tooltip[computers;Computer]"
|
|
||||||
|
|
||||||
.. "image_button_exit[0,2.5;1,1;desk.png;desks;]"
|
|
||||||
.. "tooltip[desks;Desk]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,2.5;1,1;bench.png;bench;]"
|
|
||||||
.. "tooltip[bench;Bench]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,2.5;1,1;armoire.png;armoire;]"
|
|
||||||
.. "tooltip[armoire;Cabinet]"
|
|
||||||
|
|
||||||
.. "image_button_exit[3,2.5;1,1;frigo.png;frigo;]"
|
|
||||||
.. "tooltip[frigo;Fridge]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,2.5;1,1;fbtrap.png;fbtrap;]"
|
|
||||||
.. "tooltip[fbtrap;Strap]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,2.5;1,1;fbstair.png;fbstair;]"
|
|
||||||
.. "tooltip[fbstair;Stair]"
|
|
||||||
|
|
||||||
.. "image_button_exit[6,2.5;1,1;fbladder.png;fbladder;]"
|
|
||||||
.. "tooltip[fbladder;Ladder]"
|
|
||||||
|
|
||||||
.. "image_button_exit[7,2.5;1,1;cgherse.png;cgherse;]"
|
|
||||||
.. "tooltip[cgherse;Cg Harrow]"
|
|
||||||
|
|
||||||
.. "image_button_exit[0,4.5;1,1;cgborder.png;cgborder;]"
|
|
||||||
.. "tooltip[cgborder;Cg Border]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,4.5;1,1;cgdoor.png;cgdoor;]"
|
|
||||||
.. "tooltip[cgdoor;Cg Door]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,4.5;1,1;torch.png;torch;]"
|
|
||||||
.. "tooltip[torch;Torch]"
|
|
||||||
|
|
||||||
.. "image_button_exit[3,4.5;1,1;invcross.png;shieldcross;]"
|
|
||||||
.. "tooltip[shieldcross;Shield cross]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,4.5;1,1;invslash.png;shieldslash;]"
|
|
||||||
.. "tooltip[shieldslash;Shield slash]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,4.5;1,1;invchevron.png;shieldchevron;]"
|
|
||||||
.. "tooltip[shieldchevron;Shield chevron]"
|
|
||||||
|
|
||||||
.."image_button_exit[6,4.5;1,1;trampo.png;trampoline;]"
|
|
||||||
.. "tooltip[trampoline;Trampoline]"
|
|
||||||
|
|
||||||
.. "image_button[7,4.5;1,1;droite.png;furnitures2;]"
|
|
||||||
.. "tooltip[furnitures2;Furnitures Page 2]"
|
|
||||||
|
|
||||||
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
|
||||||
.. "tooltip[main;Back to Menu]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
||||||
.. "tooltip[rotate;Rotate]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
||||||
.. "tooltip[none;None]"
|
|
||||||
.. ""
|
.. ""
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -340,20 +227,12 @@ if page == "furnitures" then
|
||||||
|
|
||||||
formspec = formspec
|
formspec = formspec
|
||||||
|
|
||||||
.. "image_button_exit[0,0.5;1,1;beaconon.png;beacon;]"
|
.. "image_button_exit[0,0.5;1,1;gui_hotbar_selected.png^beaconon.png;beacon;]"
|
||||||
.. "tooltip[beacon;Beacon]"
|
.. "image_button_exit[1,0.5;1,1;gui_hotbar_selected.png^beaconoff.png;beaconoff;]"
|
||||||
|
|
||||||
.. "image_button_exit[1,0.5;1,1;beaconoff.png;beaconoff;]"
|
.. "image_button[0,6.5;1,1;gui_hotbar_selected.png^gauche.png;furnitures;]"
|
||||||
.. "tooltip[beaconoff;Beacon Off]"
|
.. "image_button_exit[1,6.5;1,1;gui_hotbar_selected.png^rotate.png;rotate;]"
|
||||||
|
.. "image_button_exit[2,6.5;1,1;gui_hotbar_selected.png^nones.png;none;]"
|
||||||
.. "image_button[0,6.5;1,1;gauche.png;furnitures;]"
|
|
||||||
.. "tooltip[furnitures;Furnitures Page1]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
||||||
.. "tooltip[rotate;Rotate]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
||||||
.. "tooltip[none;None]"
|
|
||||||
|
|
||||||
.. ""
|
.. ""
|
||||||
|
|
||||||
|
@ -373,39 +252,18 @@ if page == "furnitures" then
|
||||||
|
|
||||||
formspec = formspec
|
formspec = formspec
|
||||||
|
|
||||||
.. "image_button_exit[0,0.5;1,1;cars.png;cars;]"
|
.. "image_button_exit[0,0.5;1,1;gui_hotbar_selected.png^cars.png;cars;]"
|
||||||
.. "tooltip[cars;Car]"
|
.. "image_button_exit[1,0.5;1,1;gui_hotbar_selected.png^surfboard.png;surfboard;]"
|
||||||
|
.. "image_button_exit[2,0.5;1,1;gui_hotbar_selected.png^airboat_airboat_inv.png;airboat;]"
|
||||||
.. "image_button_exit[1,0.5;1,1;surfboard.png;surfboard;]"
|
.. "image_button_exit[3,0.5;1,1;gui_hotbar_selected.png^spaceship_spaceship_inv.png;spaceship;]"
|
||||||
.. "tooltip[surfboard;Surfboard]"
|
.. "image_button_exit[4,0.5;1,1;gui_hotbar_selected.png^hovercraft_inv.png;hovercraft;]"
|
||||||
|
.. "image_button_exit[5,0.5;1,1;gui_hotbar_selected.png^hotair_inv.png;hotairballoon;]"
|
||||||
.. "image_button_exit[2,0.5;1,1;airboat_airboat_inv.png;airboat;]"
|
.. "image_button_exit[6,0.5;1,1;gui_hotbar_selected.png^cart.png;carts;]"
|
||||||
.. "tooltip[airboat;AirBoat]"
|
.. "image_button_exit[7,0.5;1,1;gui_hotbar_selected.png^carts_rail_straight_pwr.png;rails;]"
|
||||||
|
|
||||||
.. "image_button_exit[3,0.5;1,1;spaceship_spaceship_inv.png;spaceship;]"
|
|
||||||
.. "tooltip[spaceship;SpaceShip]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,0.5;1,1;hovercraft_inv.png;hovercraft;]"
|
|
||||||
.. "tooltip[hovercraft;Hovercraft]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,0.5;1,1;hotair_inv.png;hotairballoon;]"
|
|
||||||
.. "tooltip[hotairballoon;HotairBallon]"
|
|
||||||
|
|
||||||
.. "image_button_exit[6,0.5;1,1;cart.png;carts;]"
|
|
||||||
.. "tooltip[carts;Cart]"
|
|
||||||
|
|
||||||
.. "image_button_exit[7,0.5;1,1;carts_rail_straight_pwr.png;rails;]"
|
|
||||||
.. "tooltip[rails;Rail]"
|
|
||||||
|
|
||||||
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
|
||||||
.. "tooltip[main;Back to Menu]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
||||||
.. "tooltip[rotate;Rotate]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
||||||
.. "tooltip[none;None]"
|
|
||||||
|
|
||||||
|
.. "image_button[0,6.5;1,1;gui_hotbar_selected.png^gauche.png;main;]"
|
||||||
|
.. "image_button_exit[1,6.5;1,1;gui_hotbar_selected.png^rotate.png;rotate;]"
|
||||||
|
.. "image_button_exit[2,6.5;1,1;gui_hotbar_selected.png^nones.png;none;]"
|
||||||
|
|
||||||
.. ""
|
.. ""
|
||||||
|
|
||||||
|
@ -422,6 +280,12 @@ if page == "planets" then
|
||||||
|
|
||||||
formspec = formspec
|
formspec = formspec
|
||||||
|
|
||||||
|
.. "image_button_exit[0,0.5;1,1;gui_hotbar_selected.png^mmars.png;mars;]"
|
||||||
|
.. "image_button_exit[1,0.5;1,1;gui_hotbar_selected.png^moon.png;moon;]"
|
||||||
|
.. "image_button_exit[2,0.5;1,1;gui_hotbar_selected.png^earth.png;earth;]"
|
||||||
|
|
||||||
|
.. "image_button[0,6.5;1,1;gui_hotbar_selected.png^gauche.png;main;]"
|
||||||
|
|
||||||
.. ""
|
.. ""
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -437,232 +301,11 @@ if page == "trees" then
|
||||||
|
|
||||||
formspec = formspec
|
formspec = formspec
|
||||||
|
|
||||||
.. "image_button_exit[0,0.5;1,1;smalltrees.png;smalltrees;]"
|
.. "image_button_exit[0,0.5;1,1;gui_hotbar_selected.png^smalltrees.png;smalltrees;]"
|
||||||
.. "tooltip[smalltrees;Small Tree]"
|
.. "image_button_exit[1,0.5;1,1;gui_hotbar_selected.png^normaltrees.png;normaltrees;]"
|
||||||
.. "image_button_exit[1,0.5;1,1;normaltrees.png;normaltrees;]"
|
.. "image_button_exit[2,0.5;1,1;gui_hotbar_selected.png^bigtrees.png;bigtrees;]"
|
||||||
.. "tooltip[normaltrees;Tree]"
|
|
||||||
.. "image_button_exit[2,0.5;1,1;bigtrees.png;bigtrees;]"
|
|
||||||
.. "tooltip[bigtrees;Big Tree]"
|
|
||||||
|
|
||||||
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
.. "image_button[0,6.5;1,1;gui_hotbar_selected.png^gauche.png;main;]"
|
||||||
.. "tooltip[main;Back to Menu]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
||||||
.. "tooltip[rotate;Rotate]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
||||||
.. "tooltip[none;None]"
|
|
||||||
|
|
||||||
.. ""
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
-- letters page
|
|
||||||
if page == "mathmenu" then
|
|
||||||
|
|
||||||
local inv = player:get_inventory() or nil
|
|
||||||
|
|
||||||
if not inv then
|
|
||||||
print ("NO INVENTORY FOUND")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
formspec = formspec
|
|
||||||
|
|
||||||
.. "image_button_exit[0,0.5;1,1;0.png;math0;]"
|
|
||||||
.. "tooltip[math0;0]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,0.5;1,1;1.png;math1;]"
|
|
||||||
.. "tooltip[math1;1]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,0.5;1,1;2.png;math2;]"
|
|
||||||
.. "tooltip[math2;2]"
|
|
||||||
|
|
||||||
.. "image_button_exit[3,0.5;1,1;3.png;math3;]"
|
|
||||||
.. "tooltip[math3;3]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,0.5;1,1;4.png;math4;]"
|
|
||||||
.. "tooltip[math4;4]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,0.5;1,1;5.png;math5;]"
|
|
||||||
.. "tooltip[math5;5]"
|
|
||||||
|
|
||||||
.. "image_button_exit[6,0.5;1,1;6.png;math6;]"
|
|
||||||
.. "tooltip[math6;6]"
|
|
||||||
|
|
||||||
.. "image_button_exit[7,0.5;1,1;7.png;math7;]"
|
|
||||||
.. "tooltip[math7;7]"
|
|
||||||
|
|
||||||
.. "image_button_exit[0,2.5;1,1;8.png;math8;]"
|
|
||||||
.. "tooltip[math8;8]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,2.5;1,1;9.png;math9;]"
|
|
||||||
.. "tooltip[math9;9]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,2.5;1,1;egale.png;mathegale;]"
|
|
||||||
.. "tooltip[mathegale;Equal to]"
|
|
||||||
|
|
||||||
.. "image_button_exit[3,2.5;1,1;inferieure.png;mathinferieure;]"
|
|
||||||
.. "tooltip[mathinferieure;Less than]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,2.5;1,1;superieure.png;mathsuperieure;]"
|
|
||||||
.. "tooltip[mathsuperieure;Greater than]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,2.5;1,1;diviser.png;mathdiviser;]"
|
|
||||||
.. "tooltip[mathdiviser;Divide]"
|
|
||||||
|
|
||||||
.. "image_button_exit[6,2.5;1,1;plus.png;mathplus;]"
|
|
||||||
.. "tooltip[mathplus;Plus]"
|
|
||||||
|
|
||||||
.. "image_button_exit[7,2.5;1,1;moins.png;mathmoins;]"
|
|
||||||
.. "tooltip[mathmoins;Minus]"
|
|
||||||
|
|
||||||
.. "image_button_exit[0,4.5;1,1;multiplier.png;mathmultiplier;]"
|
|
||||||
.. "tooltip[mathmultiplier;Multiply]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,4.5;1,1;virgule.png;mathvirgule;]"
|
|
||||||
.. "tooltip[mathvirgule;Comma]"
|
|
||||||
|
|
||||||
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
|
||||||
.. "tooltip[main;Back to Menu]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
||||||
.. "tooltip[rotate;Rotate]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
||||||
.. "tooltip[none;None]"
|
|
||||||
|
|
||||||
.. ""
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
-- letters page
|
|
||||||
if page == "lettermenu" then
|
|
||||||
|
|
||||||
local inv = player:get_inventory() or nil
|
|
||||||
|
|
||||||
if not inv then
|
|
||||||
print ("NO INVENTORY FOUND")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
formspec = formspec
|
|
||||||
|
|
||||||
.. "image_button_exit[0,0.5;1,1;a.png;lettera;]"
|
|
||||||
.. "tooltip[lettera;A]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,0.5;1,1;b.png;letterb;]"
|
|
||||||
.. "tooltip[letterb;B]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,0.5;1,1;c.png;letterc;]"
|
|
||||||
.. "tooltip[letterc;C]"
|
|
||||||
|
|
||||||
.. "image_button_exit[3,0.5;1,1;d.png;letterd;]"
|
|
||||||
.. "tooltip[letterd;D]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,0.5;1,1;e.png;lettere;]"
|
|
||||||
.. "tooltip[lettere;E]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,0.5;1,1;f.png;letterf;]"
|
|
||||||
.. "tooltip[letterf;F]"
|
|
||||||
|
|
||||||
.. "image_button_exit[6,0.5;1,1;g.png;letterg;]"
|
|
||||||
.. "tooltip[letterg;G]"
|
|
||||||
|
|
||||||
.. "image_button_exit[7,0.5;1,1;h.png;letterh;]"
|
|
||||||
.. "tooltip[letterh;H]"
|
|
||||||
|
|
||||||
.. "image_button_exit[0,2.5;1,1;i.png;letteri;]"
|
|
||||||
.. "tooltip[letteri;I]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,2.5;1,1;j.png;letterj;]"
|
|
||||||
.. "tooltip[letterj;J]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,2.5;1,1;k.png;letterk;]"
|
|
||||||
.. "tooltip[letterk;K]"
|
|
||||||
|
|
||||||
.. "image_button_exit[3,2.5;1,1;l.png;letterl;]"
|
|
||||||
.. "tooltip[letterl;L]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,2.5;1,1;m.png;letterm;]"
|
|
||||||
.. "tooltip[letterm;M]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,2.5;1,1;n.png;lettern;]"
|
|
||||||
.. "tooltip[lettern;N]"
|
|
||||||
|
|
||||||
.. "image_button_exit[6,2.5;1,1;o.png;lettero;]"
|
|
||||||
.. "tooltip[lettero;O]"
|
|
||||||
|
|
||||||
.. "image_button_exit[7,2.5;1,1;p.png;letterp;]"
|
|
||||||
.. "tooltip[letterp;P]"
|
|
||||||
|
|
||||||
.. "image_button_exit[0,4.5;1,1;q.png;letterq;]"
|
|
||||||
.. "tooltip[letterq;Q]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,4.5;1,1;r.png;letterr;]"
|
|
||||||
.. "tooltip[letterr;R]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,4.5;1,1;s.png;letters;]"
|
|
||||||
.. "tooltip[letters;S]"
|
|
||||||
|
|
||||||
.. "image_button_exit[3,4.5;1,1;t.png;lettert;]"
|
|
||||||
.. "tooltip[lettert;T]"
|
|
||||||
|
|
||||||
.. "image_button_exit[4,4.5;1,1;u.png;letteru;]"
|
|
||||||
.. "tooltip[letteru;U]"
|
|
||||||
|
|
||||||
.. "image_button_exit[5,4.5;1,1;v.png;letterv;]"
|
|
||||||
.. "tooltip[letterv;V]"
|
|
||||||
|
|
||||||
.. "image_button_exit[6,4.5;1,1;w.png;letterw;]"
|
|
||||||
.. "tooltip[letterw;W]"
|
|
||||||
|
|
||||||
.. "image_button[7,4.5;1,1;droite.png;lettermenu2;]"
|
|
||||||
.. "tooltip[lettermenu2;Letters Page 2]"
|
|
||||||
|
|
||||||
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
|
||||||
.. "tooltip[main;Back to Menu]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
||||||
.. "tooltip[rotate;Rotate]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
||||||
.. "tooltip[none;None]"
|
|
||||||
|
|
||||||
.. ""
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
-- letters page 2
|
|
||||||
|
|
||||||
if page == "lettermenu2" then
|
|
||||||
|
|
||||||
local inv = player:get_inventory() or nil
|
|
||||||
|
|
||||||
if not inv then
|
|
||||||
print ("NO INVENTORY FOUND")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
formspec = formspec
|
|
||||||
|
|
||||||
.. "image_button_exit[0,0.5;1,1;x.png;letterx;]"
|
|
||||||
.. "tooltip[letterx;X]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,0.5;1,1;y.png;lettery;]"
|
|
||||||
.. "tooltip[lettery;Y]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,0.5;1,1;z.png;letterz;]"
|
|
||||||
.. "tooltip[letterz;Z]"
|
|
||||||
|
|
||||||
.. "image_button[0,6.5;1,1;gauche.png;lettermenu;]"
|
|
||||||
.. "tooltip[lettermenu;Letters Page 1]"
|
|
||||||
|
|
||||||
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
||||||
.. "tooltip[rotate;Rotate]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
||||||
.. "tooltip[none;None]"
|
|
||||||
|
|
||||||
.. ""
|
.. ""
|
||||||
|
|
||||||
|
@ -678,19 +321,16 @@ if page == "trees" then
|
||||||
|
|
||||||
formspec = formspec
|
formspec = formspec
|
||||||
|
|
||||||
.. "image_button[2,0.5;4,1;;character_creator;Skin]"
|
.. "image_button[2,0.5;4,1;gui_hotbar_selected.png;character_creator;Skin]"
|
||||||
.. "image_button[2,1.5;4,1;;vehicules;Vehicules]"
|
.. "image_button[2,1.5;4,1;gui_hotbar_selected.png;vehicules;Vehicules]"
|
||||||
|
|
||||||
.. "image_button[2,2.5;4,1;;trees;Trees]"
|
.. "image_button[2,2.5;4,1;gui_hotbar_selected.png;trees;Tree]"
|
||||||
.. "image_button[2,3.5;4,1;;animals;Animals]"
|
.. "image_button[2,3.5;4,1;gui_hotbar_selected.png;animals;Animals]"
|
||||||
|
|
||||||
.. "image_button[2,4.5;2,1;;nodes;Builds]"
|
.. "image_button[2,4.5;4,1;gui_hotbar_selected.png;nodes;Build]"
|
||||||
.. "image_button[4,4.5;2,1;;furnitures;Decorations]"
|
.. "image_button[2,5.5;4,1;gui_hotbar_selected.png;furnitures;Decorations]"
|
||||||
|
|
||||||
.. "image_button[2,5.5;2,1;;lettermenu;Letters]"
|
.. "image_button_exit[2,6.5;4,1;gui_hotbar_selected.png;quit;Back To Game]"
|
||||||
.. "image_button[4,5.5;2,1;;mathmenu;Maths]"
|
|
||||||
|
|
||||||
.. "image_button_exit[2,6.5;4,1;;quit;Back To Game]"
|
|
||||||
|
|
||||||
x = x
|
x = x
|
||||||
y = y + 1
|
y = y + 1
|
||||||
|
@ -732,38 +372,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if fields.lettermenu then
|
|
||||||
|
|
||||||
inventory_plus.set_inventory_formspec(player,
|
|
||||||
inventory_plus.get_formspec(player, "lettermenu"))
|
|
||||||
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if fields.lettermenu2 then
|
|
||||||
|
|
||||||
inventory_plus.set_inventory_formspec(player,
|
|
||||||
inventory_plus.get_formspec(player, "lettermenu2"))
|
|
||||||
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if fields.mathmenu then
|
|
||||||
|
|
||||||
inventory_plus.set_inventory_formspec(player,
|
|
||||||
inventory_plus.get_formspec(player, "mathmenu"))
|
|
||||||
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if fields.lettermenu2 then
|
|
||||||
|
|
||||||
inventory_plus.set_inventory_formspec(player,
|
|
||||||
inventory_plus.get_formspec(player, "mathmenu2"))
|
|
||||||
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if fields.nodes2 then
|
if fields.nodes2 then
|
||||||
|
|
||||||
inventory_plus.set_inventory_formspec(player,
|
inventory_plus.set_inventory_formspec(player,
|
||||||
|
|
|
@ -7,8 +7,6 @@ dofile(minetest.get_modpath("inventory_plus") .. "/trees.lua")
|
||||||
dofile(minetest.get_modpath("inventory_plus") .. "/planets.lua")
|
dofile(minetest.get_modpath("inventory_plus") .. "/planets.lua")
|
||||||
dofile(minetest.get_modpath("inventory_plus") .. "/vehicules.lua")
|
dofile(minetest.get_modpath("inventory_plus") .. "/vehicules.lua")
|
||||||
dofile(minetest.get_modpath("inventory_plus") .. "/animals.lua")
|
dofile(minetest.get_modpath("inventory_plus") .. "/animals.lua")
|
||||||
dofile(minetest.get_modpath("inventory_plus") .. "/letters.lua")
|
|
||||||
dofile(minetest.get_modpath("inventory_plus") .. "/maths.lua")
|
|
||||||
|
|
||||||
-- Initial Stuff and Delete Legacy Stuff
|
-- Initial Stuff and Delete Legacy Stuff
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 320 B |
|
@ -8,7 +8,7 @@ color7 = minetest.setting_get("color7") or "FFFF00"
|
||||||
color8 = minetest.setting_get("color8") or "FF69B4"
|
color8 = minetest.setting_get("color8") or "FF69B4"
|
||||||
|
|
||||||
local source_list = {
|
local source_list = {
|
||||||
{"black", "Color1", color1, 41, 36, 33},
|
{"black", "Color1", color1, 40, 36, 33},
|
||||||
{"blue", "Color2", color2, 0, 0, 255},
|
{"blue", "Color2", color2, 0, 0, 255},
|
||||||
{"green", "Color3", color3, 0, 255, 0},
|
{"green", "Color3", color3, 0, 255, 0},
|
||||||
{"white", "Color4", color4, 245, 245, 245},
|
{"white", "Color4", color4, 245, 245, 245},
|
||||||
|
|
Before Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 624 B |
Before Width: | Height: | Size: 550 B |
Before Width: | Height: | Size: 598 B |
Before Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 604 B |
Before Width: | Height: | Size: 579 B |
|
@ -53,37 +53,37 @@ local formspec = "size[8,7.5]"
|
||||||
|
|
||||||
-- Skin
|
-- Skin
|
||||||
|
|
||||||
-- .. "image_button[3.5,1;1,1;".. skins_array.skin[indexes.skin]..";skin;]"
|
-- .. "image_button[3.5,1;1,1;gui_hotbar_selected.png^".. skins_array.skin[indexes.skin]..";skin;]"
|
||||||
-- .. "image_button[1.5,1;1,1;gauche.png;skin_back;]"
|
-- .. "image_button[1.5,1;1,1;gui_hotbar_selected.png^gauche.png;skin_back;]"
|
||||||
-- .. "image_button[5.5,1;1,1;droite.png;skin_next;]"
|
-- .. "image_button[5.5,1;1,1;gui_hotbar_selected.png^droite.png;skin_next;]"
|
||||||
|
|
||||||
-- Eyes
|
-- Eyes
|
||||||
|
|
||||||
.. "image_button[3.5,1.5;1,1;".. skins_array.face[indexes.face]..";face;]"
|
.. "image_button[3.5,1.5;1,1;gui_hotbar_selected.png^".. skins_array.face[indexes.face]..";face;]"
|
||||||
.. "image_button[1.5,1.5;1,1;gauche.png;face_back;]"
|
.. "image_button[1.5,1.5;1,1;gui_hotbar_selected.png^gauche.png;face_back;]"
|
||||||
.. "image_button[5.5,1.5;1,1;droite.png;face_next;]"
|
.. "image_button[5.5,1.5;1,1;gui_hotbar_selected.png^droite.png;face_next;]"
|
||||||
|
|
||||||
-- T-Shirt
|
-- T-Shirt
|
||||||
|
|
||||||
.. "image_button[3.5,2.5;1,1;".. skins_array.tshirt[indexes.tshirt]..";tshirt;]"
|
.. "image_button[3.5,2.5;1,1;gui_hotbar_selected.png^".. skins_array.tshirt[indexes.tshirt]..";tshirt;]"
|
||||||
.. "image_button[1.5,2.5;1,1;gauche.png;tshirt_back;]"
|
.. "image_button[1.5,2.5;1,1;gui_hotbar_selected.png^gauche.png;tshirt_back;]"
|
||||||
.. "image_button[5.5,2.5;1,1;droite.png;tshirt_next;]"
|
.. "image_button[5.5,2.5;1,1;gui_hotbar_selected.png^droite.png;tshirt_next;]"
|
||||||
|
|
||||||
-- Pants
|
-- Pants
|
||||||
|
|
||||||
.. "image_button[3.5,3.5;1,1;".. skins_array.pants[indexes.pants]..";pants;]"
|
.. "image_button[3.5,3.5;1,1;gui_hotbar_selected.png^".. skins_array.pants[indexes.pants]..";pants;]"
|
||||||
.. "image_button[1.5,3.5;1,1;gauche.png;pants_back;]"
|
.. "image_button[1.5,3.5;1,1;gui_hotbar_selected.png^gauche.png;pants_back;]"
|
||||||
.. "image_button[5.5,3.5;1,1;droite.png;pants_next;]"
|
.. "image_button[5.5,3.5;1,1;gui_hotbar_selected.png^droite.png;pants_next;]"
|
||||||
|
|
||||||
-- Shoes
|
-- Shoes
|
||||||
|
|
||||||
.. "image_button[3.5,4.5;1,1;".. skins_array.shoes[indexes.shoes]..";shoes;]"
|
.. "image_button[3.5,4.5;1,1;gui_hotbar_selected.png^".. skins_array.shoes[indexes.shoes]..";shoes;]"
|
||||||
.. "image_button[1.5,4.5;1,1;gauche.png;shoes_back;]"
|
.. "image_button[1.5,4.5;1,1;gui_hotbar_selected.png^gauche.png;shoes_back;]"
|
||||||
.. "image_button[5.5,4.5;1,1;droite.png;shoes_next;]"
|
.. "image_button[5.5,4.5;1,1;gui_hotbar_selected.png^droite.png;shoes_next;]"
|
||||||
|
|
||||||
-- Done
|
-- Done
|
||||||
|
|
||||||
.. "image_button_exit[1.0,6.5;2,1;;main;Back to Game]"
|
.. "image_button_exit[1.0,6.5;2,1;gui_hotbar_selected.png;main;Back to Game]"
|
||||||
|
|
||||||
minetest.show_formspec(player:get_player_name(), "character_creator", formspec)
|
minetest.show_formspec(player:get_player_name(), "character_creator", formspec)
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,14 @@ function creative.is_enabled_for(name)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local digtime = 200
|
if creative_mode_cache then
|
||||||
|
-- Dig time is modified according to difference (leveldiff) between tool
|
||||||
|
-- 'maxlevel' and node 'level'. Digtime is divided by the larger of
|
||||||
|
-- leveldiff and 1.
|
||||||
|
-- To speed up digging in creative, hand 'maxlevel' and 'digtime' have been
|
||||||
|
-- increased such that nodes of differing levels have an insignificant
|
||||||
|
-- effect on digtime.
|
||||||
|
local digtime = 42
|
||||||
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
|
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
|
||||||
|
|
||||||
minetest.register_item(":", {
|
minetest.register_item(":", {
|
||||||
|
@ -28,6 +35,32 @@ local digtime = 200
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
local digtime = 42
|
||||||
|
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
|
||||||
|
|
||||||
|
minetest.register_item(":", {
|
||||||
|
type = "none",
|
||||||
|
wield_image = "wieldhand.png",
|
||||||
|
wield_scale = {x = 1, y = 1, z = 2.5},
|
||||||
|
range = 10,
|
||||||
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 0.5,
|
||||||
|
max_drop_level = 3,
|
||||||
|
groupcaps = {
|
||||||
|
crumbly = caps,
|
||||||
|
cracky = caps,
|
||||||
|
snappy = caps,
|
||||||
|
choppy = caps,
|
||||||
|
oddly_breakable_by_hand = caps,
|
||||||
|
},
|
||||||
|
damage_groups = {fleshy = 10},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
-- Unlimited node placement
|
-- Unlimited node placement
|
||||||
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
|
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
|
||||||
return creative.is_enabled_for(placer:get_player_name())
|
return creative.is_enabled_for(placer:get_player_name())
|
||||||
|
|
|
@ -29,6 +29,6 @@ local default_path = minetest.get_modpath("default")
|
||||||
|
|
||||||
dofile(default_path.."/functions.lua")
|
dofile(default_path.."/functions.lua")
|
||||||
dofile(default_path.."/mapgen.lua")
|
dofile(default_path.."/mapgen.lua")
|
||||||
|
dofile(default_path.."/player.lua")
|
||||||
dofile(default_path.."/aliases.lua")
|
dofile(default_path.."/aliases.lua")
|
||||||
dofile(default_path.."/creative.lua")
|
dofile(default_path.."/creative.lua")
|
||||||
dofile(default_path.."/player.lua")
|
|
|
@ -72,9 +72,6 @@ function default.player_set_model(player, model_name)
|
||||||
textures = player_textures[name] or model.textures,
|
textures = player_textures[name] or model.textures,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = 4,
|
visual_size = 4,
|
||||||
collisionbox = model.collisionbox or {-0.3, -1.00, -0.3, 0.3, 1.0, 0.3},
|
|
||||||
stepheight = model.stepheight or 0.4,
|
|
||||||
eye_height = model.eye_height or 0.8,
|
|
||||||
})
|
})
|
||||||
default.player_set_animation(player, "stand")
|
default.player_set_animation(player, "stand")
|
||||||
else
|
else
|
||||||
|
|