ver. 1.1.2
Fix license, remove npc, fix creative inventory, mobs spawning fix, doc improve
11
README.md
@ -5,17 +5,12 @@ MultiCraft is an Open Source sandbox game inspired by [Minecraft](https://minecr
|
|||||||
|
|
||||||
MultiCraft is based on Minetest project which is developed by a [number of contributors](https://github.com/minetest/minetest/graphs/contributors).
|
MultiCraft is based on Minetest project which is developed by a [number of contributors](https://github.com/minetest/minetest/graphs/contributors).
|
||||||
|
|
||||||
Copyright (c) 2014-2015 Maksim Gamarnik [MoNTE48] <MoNTE48@mail.ua> & MultiCraft Developement Team.
|
Copyright (c) 2014-2016 Maksim Gamarnik [MoNTE48] <MoNTE48@mail.ua> & MultiCraft Developement Team.
|
||||||
|
|
||||||
The engine and the game is licensed under LGPLv3 (or higher). Resources games licensed under CC-BY-SA 4.0, unless otherwise stated.
|
The engine and the game is licensed under LGPLv3 (or higher). Resources games licensed under CC-BY-SA 3.0, unless otherwise stated, and also a bit of proprietary code and resources.
|
||||||
|
|
||||||
You can help in the development. But you should always publish your source code after any changes.
|
You can help in the development. But you should always publish your source code after any changes.
|
||||||
Before any use of source code MultiCraft or any part of you should be familiar with [LGPL-3.0](doc/LGPL-3.0.md).
|
Before any use of source code MultiCraft or any part of you should be familiar with [LGPL-3.0](doc/LGPL-3.0.md) and [Other License.txt](doc/Other%20License.md)
|
||||||
|
|
||||||
Any code that you push to this repository is automatically licensed as LGPLv3 (or higher) and belongs MultiCraft Project and/or the owner of the project without exception.
|
Any code that you push to this repository is automatically licensed as LGPLv3 (or higher) and belongs MultiCraft Project and/or the owner of the project without exception.
|
||||||
Adding code under another license is possible only by agreement with the owner of the project and the creation of appropriate notes.
|
Adding code under another license is possible only by agreement with the owner of the project and the creation of appropriate notes.
|
||||||
|
|
||||||
After compiling you need to archive files in assets into three zips - Files.zip, games.zip and worlds.zip.
|
|
||||||
games.zip must contain "games" folder.
|
|
||||||
worlds.zip must contain "worlds" folder and "multicraf.conf" text file.
|
|
||||||
Finally, remaining files must be packed into Files.zip.
|
|
@ -1,4 +1,4 @@
|
|||||||
Minetest Android port
|
MultiCraft Android version
|
||||||
=====================
|
=====================
|
||||||
Date: 2015 12 16
|
Date: 2015 12 16
|
||||||
|
|
||||||
@ -128,3 +128,9 @@ Other things that may be nice to know
|
|||||||
e.g.:
|
e.g.:
|
||||||
|
|
||||||
> make clean_irrlicht
|
> make clean_irrlicht
|
||||||
|
|
||||||
|
|
||||||
|
After compiling you need to archive files in assets into three zips - Files.zip, games.zip and worlds.zip.
|
||||||
|
games.zip must contain "games" folder.
|
||||||
|
worlds.zip must contain "worlds" folder and "multicraf.conf" text file.
|
||||||
|
Finally, remaining files must be packed into Files.zip.
|
@ -1,21 +1,21 @@
|
|||||||
.TH minetest 6 "10 September 2013" "" ""
|
.TH MultiCraft 6 "10 September 2013" "" ""
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
minetest, minetestserver \- Multiplayer infinite-world block sandbox
|
MultiCraft, MultiCraftServer \- Multiplayer infinite-world block sandbox
|
||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B minetest
|
.B MultiCraft
|
||||||
[\fB--server SERVER OPTIONS\fR | \fBCLIENT OPTIONS\fR]
|
[\fB--server SERVER OPTIONS\fR | \fBCLIENT OPTIONS\fR]
|
||||||
[\fBCOMMON OPTIONS\fR]
|
[\fBCOMMON OPTIONS\fR]
|
||||||
[\fBWORLD PATH\fR]
|
[\fBWORLD PATH\fR]
|
||||||
|
|
||||||
.B minetestserver
|
.B MultiCraftServer
|
||||||
[\fBSERVER OPTIONS\fR]
|
[\fBSERVER OPTIONS\fR]
|
||||||
[\fBCOMMON OPTIONS\fR]
|
[\fBCOMMON OPTIONS\fR]
|
||||||
[\fBWORLD PATH\fR]
|
[\fBWORLD PATH\fR]
|
||||||
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B Minetest
|
.B MultiCraft
|
||||||
is one of the first InfiniMiner/Minecraft(/whatever) inspired games (started October 2010), with a goal of taking the survival multiplayer gameplay to a slightly different direction.
|
is one of the first InfiniMiner/Minecraft(/whatever) inspired games (started October 2010), with a goal of taking the survival multiplayer gameplay to a slightly different direction.
|
||||||
.PP
|
.PP
|
||||||
The main design philosophy is to keep it technically simple, stable and portable. It will be kept lightweight enough to run on fairly old hardware.
|
The main design philosophy is to keep it technically simple, stable and portable. It will be kept lightweight enough to run on fairly old hardware.
|
||||||
@ -95,7 +95,7 @@ Display an interactive terminal over ncurses during execution.
|
|||||||
|
|
||||||
.SH ENVIRONMENT
|
.SH ENVIRONMENT
|
||||||
.TP
|
.TP
|
||||||
.B MINETEST_SUBGAME_PATH
|
.B MULTICRAFT_SUBGAME_PATH
|
||||||
Colon delimited list of directories to search for subgames.
|
Colon delimited list of directories to search for subgames.
|
||||||
|
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
.so man6/minetest.6
|
.so man6/MultiCraft.6
|
||||||
|
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
License of Minetest textures and sounds
|
MultiCraft Open Source Project:
|
||||||
---------------------------------------
|
|
||||||
|
LGPLv3.0+, CC-BY-SA 3.0 and a little bit proprietary textures. The list in the file nearby.
|
||||||
|
You can use these textures without restriction within MultiCraft Project.
|
||||||
|
You can not use them in another project.
|
||||||
|
They are an integral part of this project and created exclusively for him.
|
||||||
|
|
||||||
|
|
||||||
|
--- --- ---
|
||||||
|
|
||||||
|
License of Minetest textures and sounds:
|
||||||
|
|
||||||
This applies to textures and sounds contained in the main Minetest
|
This applies to textures and sounds contained in the main Minetest
|
||||||
distribution.
|
distribution.
|
||||||
@ -12,17 +21,11 @@ Authors of media files
|
|||||||
Everything not listed in here:
|
Everything not listed in here:
|
||||||
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||||
|
|
||||||
BlockMen:
|
|
||||||
textures/base/pack/menuheader.png
|
|
||||||
|
|
||||||
erlehmann:
|
erlehmann:
|
||||||
misc/minetest-icon-24x24.png
|
|
||||||
misc/minetest-icon.ico
|
|
||||||
misc/minetest.svg
|
misc/minetest.svg
|
||||||
textures/base/pack/logo.png
|
|
||||||
|
|
||||||
License of Minetest source code
|
License of Minetest source code:
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
Minetest
|
Minetest
|
||||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||||
@ -41,8 +44,9 @@ You should have received a copy of the GNU Lesser General Public License along
|
|||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
Irrlicht
|
|
||||||
---------------
|
|
||||||
|
Irrlicht:
|
||||||
|
|
||||||
This program uses the Irrlicht Engine. http://irrlicht.sourceforge.net/
|
This program uses the Irrlicht Engine. http://irrlicht.sourceforge.net/
|
||||||
|
|
||||||
@ -99,9 +103,9 @@ Vattic's Terms:
|
|||||||
- If I decide I don't want you using stuff from the pack then that is final. This will only be the case in unusual circumstances.
|
- If I decide I don't want you using stuff from the pack then that is final. This will only be the case in unusual circumstances.
|
||||||
- These guidelines can be changed at any time.
|
- These guidelines can be changed at any time.
|
||||||
|
|
||||||
|
--- --- ---
|
||||||
|
|
||||||
JThread
|
JThread:
|
||||||
---------------
|
|
||||||
|
|
||||||
This program uses the JThread library. License for JThread follows:
|
This program uses the JThread library. License for JThread follows:
|
||||||
|
|
||||||
@ -125,8 +129,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
IN THE SOFTWARE.
|
IN THE SOFTWARE.
|
||||||
|
|
||||||
Lua
|
--- --- ---
|
||||||
---------------
|
|
||||||
|
Lua:
|
||||||
|
|
||||||
Lua is licensed under the terms of the MIT license reproduced below.
|
Lua is licensed under the terms of the MIT license reproduced below.
|
||||||
This means that Lua is free software and can be used for both academic
|
This means that Lua is free software and can be used for both academic
|
||||||
@ -154,8 +159,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
Fonts
|
--- --- ---
|
||||||
---------------
|
|
||||||
|
Fonts:
|
||||||
|
|
||||||
DejaVu Sans Mono:
|
DejaVu Sans Mono:
|
||||||
|
|
||||||
@ -191,13 +197,7 @@ DroidSansFallback:
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
|
basis33
|
||||||
basis33 is a fixed-width bitmap font for programming and text editing, which contains Latin, Cyrillic, Greek and Hebrew characters.
|
|
||||||
|
|
||||||
It’s designed by Manchson basing on Latin-only font Proggy Clean by Tristan Grimmer.
|
|
||||||
|
|
||||||
basis33 is free/libre software, you are welcome to redistribute and/or modify it under the terms of MIT/Expat license; see LICENSE for details.
|
|
||||||
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
@ -221,3 +221,35 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
|
--- --- ---
|
||||||
|
|
||||||
|
Mod "Dungeon Loot" [dungeon_loot]
|
||||||
|
=================================
|
||||||
|
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||||
|
and Amoeba <amoeba@iki.fi>
|
||||||
|
|
||||||
|
In MultiCraft Project this code has been changed:
|
||||||
|
I changed the drop in a few lines.
|
||||||
|
|
||||||
|
=================================
|
||||||
|
|
||||||
|
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty. In no
|
||||||
|
event will the authors be held liable for any damages arising from the use of
|
||||||
|
this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose, including
|
||||||
|
commercial applications, and to alter it and redistribute it freely, subject to the
|
||||||
|
following restrictions:
|
||||||
|
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software in a
|
||||||
|
product, an acknowledgment in the product documentation is required.
|
||||||
|
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not
|
||||||
|
be misrepresented as being the original software.
|
||||||
|
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
@ -320,164 +320,3 @@ exit /b 0
|
|||||||
popd
|
popd
|
||||||
echo Failed.
|
echo Failed.
|
||||||
exit /b 1
|
exit /b 1
|
||||||
|
|
||||||
License of Minetest textures and sounds
|
|
||||||
---------------------------------------
|
|
||||||
|
|
||||||
This applies to textures and sounds contained in the main Minetest
|
|
||||||
distribution.
|
|
||||||
|
|
||||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
|
||||||
http://creativecommons.org/licenses/by-sa/3.0/
|
|
||||||
|
|
||||||
Authors of media files
|
|
||||||
-----------------------
|
|
||||||
Everything not listed in here:
|
|
||||||
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
|
||||||
|
|
||||||
BlockMen:
|
|
||||||
textures/base/pack/menuheader.png
|
|
||||||
|
|
||||||
erlehmann:
|
|
||||||
misc/minetest-icon-24x24.png
|
|
||||||
misc/minetest-icon.ico
|
|
||||||
misc/minetest.svg
|
|
||||||
textures/base/pack/logo.png
|
|
||||||
|
|
||||||
License of Minetest source code
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
Minetest
|
|
||||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
|
||||||
|
|
||||||
This program 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 3.0 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program 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 program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Irrlicht
|
|
||||||
---------------
|
|
||||||
|
|
||||||
This program uses the Irrlicht Engine. http://irrlicht.sourceforge.net/
|
|
||||||
|
|
||||||
The Irrlicht Engine License
|
|
||||||
|
|
||||||
Copyright © 2002-2005 Nikolaus Gebhardt
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
|
||||||
warranty. In no event will the authors be held liable for any damages
|
|
||||||
arising from the use of this software.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any purpose,
|
|
||||||
including commercial applications, and to alter it and redistribute
|
|
||||||
it freely, subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you
|
|
||||||
must not claim that you wrote the original software. If you use
|
|
||||||
this software in a product, an acknowledgment in the product
|
|
||||||
documentation would be appreciated but is not required.
|
|
||||||
2. Altered source versions must be plainly marked as such, and must
|
|
||||||
not be misrepresented as being the original software.
|
|
||||||
3. This notice may not be removed or altered from any source
|
|
||||||
distribution.
|
|
||||||
|
|
||||||
|
|
||||||
JThread
|
|
||||||
---------------
|
|
||||||
|
|
||||||
This program uses the JThread library. License for JThread follows:
|
|
||||||
|
|
||||||
Copyright (c) 2000-2006 Jori Liesenborgs (jori.liesenborgs@gmail.com)
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and associated documentation files (the "Software"),
|
|
||||||
to deal in the Software without restriction, including without limitation
|
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Lua
|
|
||||||
---------------
|
|
||||||
|
|
||||||
Lua is licensed under the terms of the MIT license reproduced below.
|
|
||||||
This means that Lua is free software and can be used for both academic
|
|
||||||
and commercial purposes at absolutely no cost.
|
|
||||||
|
|
||||||
For details and rationale, see http://www.lua.org/license.html .
|
|
||||||
|
|
||||||
Copyright (C) 1994-2008 Lua.org, PUC-Rio.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
Fonts
|
|
||||||
---------------
|
|
||||||
|
|
||||||
DejaVu Sans Mono:
|
|
||||||
|
|
||||||
Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
|
|
||||||
Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
|
|
||||||
|
|
||||||
Bitstream Vera Fonts Copyright:
|
|
||||||
|
|
||||||
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
|
|
||||||
a trademark of Bitstream, Inc.
|
|
||||||
|
|
||||||
Arev Fonts Copyright:
|
|
||||||
|
|
||||||
Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
|
|
||||||
|
|
||||||
Liberation Fonts Copyright:
|
|
||||||
|
|
||||||
Copyright (c) 2007 Red Hat, Inc. All rights reserved. LIBERATION is a trademark of Red Hat, Inc.
|
|
||||||
|
|
||||||
DroidSansFallback:
|
|
||||||
|
|
||||||
Copyright (C) 2008 The Android Open Source Project
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
@ -1,7 +1,7 @@
|
|||||||
/** @mainpage The Minetest engine internal documentation
|
/** @mainpage The MultiCraft engine internal documentation
|
||||||
|
|
||||||
Welcome to the Minetest engine Doxygen documentation site!\n
|
Welcome to the MultiCraft engine Doxygen documentation site!\n
|
||||||
This page documents the internal structure of the Minetest engine's C++ code.\n
|
This page documents the internal structure of the MultiCraft engine's C++ code.\n
|
||||||
Use the tree view at the left to navigate.
|
Use the tree view at the left to navigate.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Minetest protocol (incomplete, early draft):
|
MultiCraft protocol (incomplete, early draft):
|
||||||
Updated 2011-06-18
|
Updated 2011-06-18
|
||||||
|
|
||||||
A custom protocol over UDP.
|
A custom protocol over UDP.
|
||||||
|
@ -289,11 +289,11 @@ default.player_register_model("3d_armor_character.x", {
|
|||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if inventory_plus and fields.armor then
|
--if inventory_plus and fields.armor then
|
||||||
local formspec = armor:get_armor_formspec(name)
|
--local formspec = armor:get_armor_formspec(name)
|
||||||
inventory_plus.set_inventory_formspec(player, formspec)
|
--inventory_plus.set_inventory_formspec(player, formspec)
|
||||||
return
|
--return
|
||||||
end
|
--end
|
||||||
for field, _ in pairs(fields) do
|
for field, _ in pairs(fields) do
|
||||||
if string.find(field, "skins_set_") then
|
if string.find(field, "skins_set_") then
|
||||||
minetest.after(0, function(player)
|
minetest.after(0, function(player)
|
||||||
@ -421,9 +421,9 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
for i=1, ARMOR_INIT_TIMES do
|
for i=1, ARMOR_INIT_TIMES do
|
||||||
minetest.after(ARMOR_INIT_DELAY * i, function(player)
|
minetest.after(ARMOR_INIT_DELAY * i, function(player)
|
||||||
armor:set_player_armor(player)
|
armor:set_player_armor(player)
|
||||||
if inventory_plus == nil and unified_inventory == nil then
|
--if inventory_plus == nil and unified_inventory == nil then
|
||||||
--armor:update_inventory(player)
|
--armor:update_inventory(player)
|
||||||
end
|
--end
|
||||||
end, player)
|
end, player)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
default
|
|
@ -1,168 +0,0 @@
|
|||||||
--[[
|
|
||||||
#!#!#!#Cake mod created by Jordan4ibanez#!#!#
|
|
||||||
#!#!#!#Released under CC Attribution-ShareAlike 3.0 Unported #!#!#
|
|
||||||
]]--
|
|
||||||
|
|
||||||
cake_texture = {"cake_top.png","cake_bottom.png","cake_inner.png","cake_side.png","cake_side.png","cake_side.png"}
|
|
||||||
slice_1 = { -7/16, -8/16, -7/16, -5/16, 0/16, 7/16}
|
|
||||||
slice_2 = { -7/16, -8/16, -7/16, -2/16, 0/16, 7/16}
|
|
||||||
slice_3 = { -7/16, -8/16, -7/16, 1/16, 0/16, 7/16}
|
|
||||||
slice_4 = { -7/16, -8/16, -7/16, 3/16, 0/16, 7/16}
|
|
||||||
slice_5 = { -7/16, -8/16, -7/16, 5/16, 0/16, 7/16}
|
|
||||||
slice_6 = { -7/16, -8/16, -7/16, 7/16, 0/16, 7/16}
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "cake:cake",
|
|
||||||
recipe = {
|
|
||||||
{'bucket:bucket_water', 'bucket:bucket_water', 'bucket:bucket_water'},
|
|
||||||
{'default:sugar', 'default:leaves', 'default:sugar'},
|
|
||||||
{'farming:wheat_harvested', 'farming:wheat_harvested', 'farming:wheat_harvested'},
|
|
||||||
},
|
|
||||||
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("cake:cake", {
|
|
||||||
description = "Cake",
|
|
||||||
tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"},
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_6
|
|
||||||
},
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_6
|
|
||||||
},
|
|
||||||
is_ground_content = true,
|
|
||||||
stack_max = 1,
|
|
||||||
groups = {crumbly=3,falling_node=1, foodstuffs = 1},
|
|
||||||
drop = '',
|
|
||||||
--legacy_mineral = true,
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
|
||||||
if clicker:get_hp() < 20 then
|
|
||||||
clicker:set_hp(clicker:get_hp()+2)
|
|
||||||
minetest.add_node(pos,{type="node",name="cake:cake_5",param2=param2})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
minetest.register_node("cake:cake_5", {
|
|
||||||
description = "Cake [5 Slices Left]",
|
|
||||||
tiles = cake_texture,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_5
|
|
||||||
},
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_5
|
|
||||||
},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=3,falling_node=1,not_in_creative_inventory=1},
|
|
||||||
drop = '',
|
|
||||||
--legacy_mineral = true,
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
|
||||||
if clicker:get_hp() < 20 then
|
|
||||||
clicker:set_hp(clicker:get_hp()+2)
|
|
||||||
minetest.add_node(pos,{type="node",name="cake:cake_4",param2=param2})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
minetest.register_node("cake:cake_4", {
|
|
||||||
description = "Cake [4 Slices Left]",
|
|
||||||
tiles = cake_texture,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_4
|
|
||||||
},
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_4
|
|
||||||
},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=3,falling_node=1,not_in_creative_inventory=1},
|
|
||||||
drop = '',
|
|
||||||
--legacy_mineral = true,
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
|
||||||
if clicker:get_hp() < 20 then
|
|
||||||
clicker:set_hp(clicker:get_hp()+2)
|
|
||||||
minetest.add_node(pos,{type="node",name="cake:cake_3",param2=param2})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
minetest.register_node("cake:cake_3", {
|
|
||||||
description = "Cake [3 Slices Left]",
|
|
||||||
tiles = cake_texture,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_3
|
|
||||||
},
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_3
|
|
||||||
},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=3,falling_node=1,not_in_creative_inventory=1},
|
|
||||||
drop = '',
|
|
||||||
--legacy_mineral = true,
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
|
||||||
if clicker:get_hp() < 20 then
|
|
||||||
clicker:set_hp(clicker:get_hp()+2)
|
|
||||||
minetest.add_node(pos,{type="node",name="cake:cake_2",param2=param2})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
minetest.register_node("cake:cake_2", {
|
|
||||||
description = "Cake [2 Slices Left]",
|
|
||||||
tiles = cake_texture,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_2
|
|
||||||
},
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_2
|
|
||||||
},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=3,falling_node=1,not_in_creative_inventory=1},
|
|
||||||
drop = '',
|
|
||||||
--legacy_mineral = true,
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
|
||||||
if clicker:get_hp() < 20 then
|
|
||||||
clicker:set_hp(clicker:get_hp()+2)
|
|
||||||
minetest.add_node(pos,{type="node",name="cake:cake_1",param2=param2})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
minetest.register_node("cake:cake_1", {
|
|
||||||
description = "Cake [1 Slice Left]",
|
|
||||||
tiles = cake_texture,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_1
|
|
||||||
},
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = slice_1
|
|
||||||
},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=3,falling_node=1,not_in_creative_inventory=1},
|
|
||||||
drop = '',
|
|
||||||
--legacy_mineral = true,
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack)
|
|
||||||
if clicker:get_hp() < 20 then
|
|
||||||
clicker:set_hp(clicker:get_hp()+2)
|
|
||||||
minetest.remove_node(pos)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
@ -6,21 +6,13 @@ crafting.pages = {}
|
|||||||
function init()
|
function init()
|
||||||
local inv = minetest.create_detached_inventory("creative", {
|
local inv = minetest.create_detached_inventory("creative", {
|
||||||
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||||
if minetest.setting_getbool("creative_mode") then
|
|
||||||
return count
|
return count
|
||||||
else
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
allow_put = function(inv, listname, index, stack, player)
|
allow_put = function(inv, listname, index, stack, player)
|
||||||
return 0
|
return 0
|
||||||
end,
|
end,
|
||||||
allow_take = function(inv, listname, index, stack, player)
|
allow_take = function(inv, listname, index, stack, player)
|
||||||
if minetest.setting_getbool("creative_mode") then
|
|
||||||
return -1
|
return -1
|
||||||
else
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||||
end,
|
end,
|
||||||
@ -135,11 +127,7 @@ end
|
|||||||
-- Create the trash field
|
-- Create the trash field
|
||||||
local trash = minetest.create_detached_inventory("creative_trash", {
|
local trash = minetest.create_detached_inventory("creative_trash", {
|
||||||
allow_put = function(inv, listname, index, stack, player)
|
allow_put = function(inv, listname, index, stack, player)
|
||||||
if minetest.setting_getbool("creative_mode") then
|
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
else
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
on_put = function(inv, listname, index, stack, player)
|
on_put = function(inv, listname, index, stack, player)
|
||||||
inv:set_stack(listname, index, "")
|
inv:set_stack(listname, index, "")
|
||||||
@ -149,7 +137,7 @@ trash:set_size("main", 1)
|
|||||||
|
|
||||||
|
|
||||||
-- Create detached creative inventory after loading all mods
|
-- Create detached creative inventory after loading all mods
|
||||||
minetest.after(0, init)
|
minetest.after(0.5, init)
|
||||||
|
|
||||||
local offset = {}
|
local offset = {}
|
||||||
local hoch = {}
|
local hoch = {}
|
||||||
@ -201,15 +189,15 @@ end
|
|||||||
crafting.set_creative_formspec = function(player, start_i, pagenum, show, page, scroll)
|
crafting.set_creative_formspec = function(player, start_i, pagenum, show, page, scroll)
|
||||||
reset_menu_item_bg()
|
reset_menu_item_bg()
|
||||||
pagenum = math.floor(pagenum) or 1
|
pagenum = math.floor(pagenum) or 1
|
||||||
local pagemax = math.floor((crafting.creative_inventory_size) / (9*5) + 1)
|
local pagemax = math.floor((crafting.creative_inventory_size-1) / (9*5) + 1)
|
||||||
local slider_height = 4/pagemax
|
local slider_height = 4/pagemax
|
||||||
local slider_pos = slider_height*(pagenum-1)+2.2
|
local slider_pos = slider_height*(pagenum-1)+2.2
|
||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
crafting.start_is[player_name] = start_i
|
crafting.start_is[player_name] = start_i
|
||||||
crafting.pages[player_name] = page
|
crafting.pages[player_name] = page
|
||||||
local formspec = ""
|
local name = "nix"
|
||||||
local main_list = "list[detached:creative;main;0,1.75;9,5;"..tostring(start_i).."]"
|
local formspec = ""
|
||||||
local name = "nix"
|
local main_list = "list[detached:creative;main;0,1.75;9,5;"..tostring(start_i).."]"
|
||||||
if page ~= nil then name = page end
|
if page ~= nil then name = page end
|
||||||
bg[name] = "crafting_creative_bg.png"
|
bg[name] = "crafting_creative_bg.png"
|
||||||
if name == "inv" then
|
if name == "inv" then
|
||||||
@ -238,8 +226,9 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page,
|
|||||||
"image[0,1;5,0.75;fnt_"..name..".png]"..
|
"image[0,1;5,0.75;fnt_"..name..".png]"..
|
||||||
"list[current_player;main;0,7;9,1;]"..
|
"list[current_player;main;0,7;9,1;]"..
|
||||||
main_list..
|
main_list..
|
||||||
"image_button[9.03,1.74;0.85,0.6;crafting_creative_up.png;creative_prev;]"..
|
"image_button[9.03,1.74;0.85,0.6;crafting_creative_up.png;creative_prev;]"..
|
||||||
"image_button[9.03,6.15;0.85,0.6;crafting_creative_down.png;creative_next;]"..
|
"image[9.04," .. tostring(slider_pos) .. ";0.75,"..tostring(slider_height) .. ";crafting_slider.png]"..
|
||||||
|
"image_button[9.03,6.15;0.85,0.6;crafting_creative_down.png;creative_next;]"..
|
||||||
"image_button[-0.1,8.28;1,1;"..bg["food"].."^crafting_food.png;food;]".. --foodstuff
|
"image_button[-0.1,8.28;1,1;"..bg["food"].."^crafting_food.png;food;]".. --foodstuff
|
||||||
"image_button[1.15,8.28;1,1;"..bg["tools"].."^crafting_creative_tool.png;tools;]".. --tools
|
"image_button[1.15,8.28;1,1;"..bg["tools"].."^crafting_creative_tool.png;tools;]".. --tools
|
||||||
"image_button[2.415,8.28;1,1;"..bg["combat"].."^crafting_creative_sword.png;combat;]".. --combat
|
"image_button[2.415,8.28;1,1;"..bg["combat"].."^crafting_creative_sword.png;combat;]".. --combat
|
||||||
@ -247,28 +236,23 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page,
|
|||||||
"image_button[4.93,8.28;1,1;"..bg["brew"].."^crafting_inventory_brew.png;brew;]".. --materials^
|
"image_button[4.93,8.28;1,1;"..bg["brew"].."^crafting_inventory_brew.png;brew;]".. --materials^
|
||||||
"image_button[9.19,8.28;1,1;"..bg["inv"].."^crafting_creative_inv.png;inv;]".. --inventory
|
"image_button[9.19,8.28;1,1;"..bg["inv"].."^crafting_creative_inv.png;inv;]".. --inventory
|
||||||
"list[detached:creative_trash;main;9,7;1,1;]"..
|
"list[detached:creative_trash;main;9,7;1,1;]"..
|
||||||
"image[9,7;1,1;crafting_creative_trash.png]"..
|
"image[9,7;1,1;crafting_creative_trash.png]"
|
||||||
|
|
||||||
"image[9.04," .. tostring(slider_pos) .. ";0.78,"..tostring(slider_height) .. ";crafting_slider.png]"
|
if name == "nix" then formspec = formspec .. "field[5.3,1.3;4,0.75;suche;;]" end
|
||||||
|
if pagenum ~= nil then formspec = formspec .. "p"..tostring(pagenum) end
|
||||||
|
|
||||||
if name == "nix" then formspec = formspec .. "field[5.3,1.3;4,0.75;suche;;]" end
|
player:set_inventory_formspec(formspec)
|
||||||
if pagenum ~= nil then formspec = formspec .. "p"..tostring(pagenum) end
|
|
||||||
|
|
||||||
player:set_inventory_formspec(formspec)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
local page = nil
|
local page = nil
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if fields.bgcolor then
|
if fields.bgcolor then
|
||||||
-- minetest.chat_send_all("jupp")
|
-- minetest.chat_send_all("jupp")
|
||||||
end
|
end
|
||||||
if fields.suche ~= nil and fields.suche ~= "" then
|
if fields.suche ~= nil and fields.suche ~= "" then
|
||||||
set_inv(string.lower(fields.suche))
|
set_inv(string.lower(fields.suche))
|
||||||
minetest.after(0, function()
|
minetest.after(0.5, function()
|
||||||
minetest.show_formspec(player:get_player_name(), "detached:creative", player:get_inventory_formspec())
|
minetest.show_formspec(player:get_player_name(), "detached:creative", player:get_inventory_formspec())
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@ -321,78 +305,36 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
page = "brew"
|
page = "brew"
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Figure out current page from formspec
|
-- Figure out current page from formspec
|
||||||
local current_page = 0
|
local current_page = 0
|
||||||
local formspec = player:get_inventory_formspec()
|
local formspec = player:get_inventory_formspec()
|
||||||
|
|
||||||
local size = string.len(formspec)
|
|
||||||
local marker = string.sub(formspec,size-1)
|
|
||||||
marker = string.sub(marker,1,1)
|
|
||||||
|
|
||||||
|
local size = string.len(formspec)
|
||||||
|
local marker = string.sub(formspec,size-2)
|
||||||
|
marker = string.sub(marker,1)
|
||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
local start_i = crafting.start_is[player_name]
|
local start_i = crafting.start_is[player_name]
|
||||||
if not page then page = crafting.pages[player_name] end
|
if not page then page = crafting.pages[player_name] end
|
||||||
if page ~= crafting.pages[player_name] then
|
if page ~= crafting.pages[player_name] then
|
||||||
start_i = 0
|
start_i = 0
|
||||||
end
|
end
|
||||||
--if marker ~= nil and marker == "p" then
|
start_i = tonumber(start_i) or 0
|
||||||
--local ppage = string.sub(formspec,size)
|
if fields.creative_prev then
|
||||||
-- print('ppage ' .. (ppage or 'nope'))
|
start_i = start_i - 9*5
|
||||||
--minetest.chat_send_all(page)
|
page = tmp_page
|
||||||
--start_i = ppage - 1
|
end
|
||||||
--end
|
if fields.creative_next then
|
||||||
--start_i = tonumber(start_i) or 0
|
start_i = start_i + 9*5
|
||||||
|
page = tmp_page
|
||||||
if fields.creative_prev then
|
end
|
||||||
start_i = start_i - 9*5
|
if start_i < 0 then
|
||||||
end
|
start_i = start_i + 9*5
|
||||||
if fields.creative_next
|
end
|
||||||
and start_i + 9*5 <= crafting.creative_inventory_size+1 then
|
if start_i >= crafting.creative_inventory_size then
|
||||||
start_i = start_i + 9*5
|
start_i = start_i - 9*5
|
||||||
end
|
end
|
||||||
if start_i < 0 then
|
if start_i < 0 or start_i >= crafting.creative_inventory_size then
|
||||||
start_i = 0
|
start_i = 0
|
||||||
end
|
end
|
||||||
|
crafting.set_creative_formspec(player, start_i, start_i / (9*5) + 1, false, page)
|
||||||
crafting.set_creative_formspec(player, start_i, start_i/(9*5) +1, false, page)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
if minetest.setting_getbool("creative_mode") then
|
|
||||||
minetest.register_item(":", {
|
|
||||||
type = "none",
|
|
||||||
wield_image = "wieldhand.png",
|
|
||||||
wield_scale = {x=1,y=1,z=0.5},
|
|
||||||
tool_capabilities = {
|
|
||||||
full_punch_interval = 0.5,
|
|
||||||
max_drop_level = 3,
|
|
||||||
groupcaps = {
|
|
||||||
crumbly = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3},
|
|
||||||
cracky = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3},
|
|
||||||
snappy = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3},
|
|
||||||
choppy = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3},
|
|
||||||
oddly_breakable_by_hand = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
|
|
||||||
return true
|
|
||||||
end)
|
|
||||||
|
|
||||||
function minetest.handle_node_drops(pos, drops, digger)
|
|
||||||
if not digger or not digger:is_player() then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local inv = digger:get_inventory()
|
|
||||||
if inv then
|
|
||||||
for _,item in ipairs(drops) do
|
|
||||||
item = ItemStack(item):get_name()
|
|
||||||
if not inv:contains_item("main", item) then
|
|
||||||
inv:add_item("main", item)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
@ -1,9 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
dofile(minetest.get_modpath("crafting").."/formspecs.lua")
|
dofile(minetest.get_modpath("crafting").."/formspecs.lua")
|
||||||
|
|
||||||
local show_armor = false
|
local show_armor = true
|
||||||
if minetest.get_modpath("3d_armor") ~= nil then show_armor = true end
|
|
||||||
|
|
||||||
local function item_drop(itemstack, dropper, pos)
|
local function item_drop(itemstack, dropper, pos)
|
||||||
if dropper:is_player() then
|
if dropper:is_player() then
|
||||||
@ -11,7 +8,7 @@ local function item_drop(itemstack, dropper, pos)
|
|||||||
local p = {x=pos.x, y=pos.y+1.2, z=pos.z}
|
local p = {x=pos.x, y=pos.y+1.2, z=pos.z}
|
||||||
p.x = p.x+(math.random(1,3)*0.2)
|
p.x = p.x+(math.random(1,3)*0.2)
|
||||||
p.z = p.z+(math.random(1,3)*0.2)
|
p.z = p.z+(math.random(1,3)*0.2)
|
||||||
local obj = minetest.add_item(p, itemstack)
|
local obj = minetest.env:add_item(p, itemstack)
|
||||||
if obj then
|
if obj then
|
||||||
v.x = v.x*4
|
v.x = v.x*4
|
||||||
v.y = v.y*4 + 2
|
v.y = v.y*4 + 2
|
||||||
@ -57,18 +54,12 @@ local function update_armor(player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function set_inventory(player)
|
local function set_inventory(player)
|
||||||
if minetest.setting_getbool("creative_mode") then
|
player:get_inventory():set_width("craft", 3)
|
||||||
minetest.after(0.5,function()
|
player:get_inventory():set_size("craft", 9)
|
||||||
crafting.set_creative_formspec(player, 0, 1)
|
player:get_inventory():set_size("main", 9*4)
|
||||||
return
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
player:get_inventory():set_width("craft", 3)
|
|
||||||
player:get_inventory():set_size("craft", 9)
|
|
||||||
player:get_inventory():set_size("main", 9*4)
|
|
||||||
|
|
||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
local img = "crafting_inventory_player.png"
|
local img = "crafting_player2d.png"
|
||||||
local armor_img = ""
|
local armor_img = ""
|
||||||
if show_armor then
|
if show_armor then
|
||||||
armor_img = "^crafting_inventory_armor.png"
|
armor_img = "^crafting_inventory_armor.png"
|
||||||
@ -76,7 +67,7 @@ local function set_inventory(player)
|
|||||||
img = img .. player_armor[player_name]
|
img = img .. player_armor[player_name]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local img_element = "image[1,0;3,4;"..img.."]"
|
local img_element = "image[1.5,0;2,4;"..img.."]"
|
||||||
if show_armor and armor.textures[player_name] and armor.textures[player_name].preview then
|
if show_armor and armor.textures[player_name] and armor.textures[player_name].preview then
|
||||||
img = armor.textures[player_name].preview
|
img = armor.textures[player_name].preview
|
||||||
local s1 = img:find("character_preview")
|
local s1 = img:find("character_preview")
|
||||||
@ -118,7 +109,7 @@ local function set_inventory(player)
|
|||||||
"inv"
|
"inv"
|
||||||
|
|
||||||
player:set_inventory_formspec(form)
|
player:set_inventory_formspec(form)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function set_workbench(player)
|
local function set_workbench(player)
|
||||||
player:get_inventory():set_width("craft", 3)
|
player:get_inventory():set_width("craft", 3)
|
||||||
@ -136,7 +127,6 @@ local function set_workbench(player)
|
|||||||
"list[current_player;craftpreview;5.75,1.5;1,1;]"..
|
"list[current_player;craftpreview;5.75,1.5;1,1;]"..
|
||||||
"wob"
|
"wob"
|
||||||
|
|
||||||
--player:set_inventory_formspec(form)
|
|
||||||
minetest.show_formspec(player:get_player_name(), "main", form)
|
minetest.show_formspec(player:get_player_name(), "main", form)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -154,32 +144,37 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
minetest.after(0,function(dt)
|
if minetest.setting_getbool("creative_mode") then
|
||||||
if player then set_inventory(player) end
|
minetest.after(0.5,function()
|
||||||
end)
|
dofile(minetest.get_modpath("crafting").."/creative.lua")
|
||||||
if minetest.setting_getbool("creative_mode") then
|
crafting.set_creative_formspec(player, 0, 1)
|
||||||
dofile(minetest.get_modpath("crafting").."/creative.lua")
|
return
|
||||||
end
|
end)
|
||||||
--init inventory
|
else
|
||||||
set_inventory(player)
|
--init inventory
|
||||||
--set hotbar size
|
set_inventory(player)
|
||||||
if player.hud_set_hotbar_itemcount then
|
end
|
||||||
minetest.after(0, player.hud_set_hotbar_itemcount, player, 8)
|
--set hotbar size
|
||||||
end
|
--if player.hud_set_hotbar_itemcount then
|
||||||
--add hotbar images
|
--minetest.after(0.5, player.hud_set_hotbar_itemcount, player, 8)
|
||||||
minetest.after(0,function()
|
--end
|
||||||
player:hud_set_hotbar_image("crafting_hotbar.png")
|
--add hotbar images
|
||||||
player:hud_set_hotbar_selected_image("crafting_hotbar_selected.png")
|
minetest.after(0.5,function()
|
||||||
|
player:hud_set_hotbar_image("crafting_hotbar.png")
|
||||||
|
player:hud_set_hotbar_selected_image("crafting_hotbar_selected.png")
|
||||||
|
|
||||||
if show_armor then
|
if show_armor then
|
||||||
local armor_orginal = armor.set_player_armor
|
local armor_orginal = armor.set_player_armor
|
||||||
armor.set_player_armor = function(self, player)
|
armor.set_player_armor = function(self, player)
|
||||||
armor_orginal(self, player)
|
armor_orginal(self, player)
|
||||||
update_armor(player)
|
update_armor(player)
|
||||||
-- set_inventory(player)
|
minetest.after(0.5,function()
|
||||||
end
|
--set_inventory(player)
|
||||||
end
|
return
|
||||||
end)
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_node("crafting:workbench", {
|
minetest.register_node("crafting:workbench", {
|
||||||
@ -195,9 +190,9 @@ minetest.register_node("crafting:workbench", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "crafting:workbench",
|
output = "crafting:workbench",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"group:wood", "group:wood"},
|
{"group:wood", "group:wood"},
|
||||||
{"group:wood", "group:wood"}
|
{"group:wood", "group:wood"}
|
||||||
}
|
}
|
||||||
})
|
})
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 288 B |
BIN
games/default/files/crafting/textures/crafting_creative_bg.png
Normal file
After Width: | Height: | Size: 200 B |
After Width: | Height: | Size: 86 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 451 B |
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 668 B After Width: | Height: | Size: 668 B |
Before Width: | Height: | Size: 494 B After Width: | Height: | Size: 494 B |
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 292 B After Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 283 B After Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 432 B |
Before Width: | Height: | Size: 253 B After Width: | Height: | Size: 253 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 550 B After Width: | Height: | Size: 550 B |
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 583 B After Width: | Height: | Size: 583 B |
Before Width: | Height: | Size: 571 B After Width: | Height: | Size: 571 B |
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 447 B |
@ -1,31 +0,0 @@
|
|||||||
multicraft mod "Crafting"
|
|
||||||
=======================
|
|
||||||
version: 2.0.1
|
|
||||||
|
|
||||||
License of source code and Textures: WTFPL
|
|
||||||
------------------------------------
|
|
||||||
Copyright (c) 2013-2014 BlockMen
|
|
||||||
|
|
||||||
This program is free software. It comes without any warranty, to
|
|
||||||
the extent permitted by applicable law. You can redistribute it
|
|
||||||
and/or modify it under the terms of the Do What The Fuck You Want
|
|
||||||
To Public License, Version 2, as published by Sam Hocevar. See
|
|
||||||
http://sam.zoy.org/wtfpl/COPYING for more details.
|
|
||||||
|
|
||||||
|
|
||||||
--USING the mod--
|
|
||||||
=================
|
|
||||||
This mod changes the players inventory (survival and creative) with more slots (9*4 instead of 8*4)
|
|
||||||
Like known from Minecraft you have a 2x2 crafting grid at inventory now. Furthermore a categorized creative
|
|
||||||
inventory and a support for stu's 3d armor mod (To use the armor and a preview of player).
|
|
||||||
|
|
||||||
Left items in the crafting slots are dropped infront of you.
|
|
||||||
|
|
||||||
Workbench
|
|
||||||
=========
|
|
||||||
With following recipe you craft a workbench (aka crafting table):
|
|
||||||
|
|
||||||
wood wood
|
|
||||||
wood wood
|
|
||||||
|
|
||||||
The workbench has a 3x3 crafting grid, that allows to use all recipes.
|
|
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
default
|
|
||||||
crafting
|
|
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
inventory_plus = {}
|
|
||||||
|
|
||||||
function inventory_plus.set_inventory_formspec(player, formspec)
|
|
||||||
end
|
|
||||||
|
|
||||||
function inventory_plus.register_button(player,str1, str2)
|
|
||||||
end
|
|
@ -1,6 +1,3 @@
|
|||||||
creative = {}
|
|
||||||
local player_inventory = {}
|
|
||||||
|
|
||||||
if minetest.setting_getbool("creative_mode") then
|
if minetest.setting_getbool("creative_mode") then
|
||||||
local digtime = 1
|
local digtime = 1
|
||||||
minetest.register_item(":", {
|
minetest.register_item(":", {
|
||||||
|
Before Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 256 B |
Before Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 82 B |
@ -9,6 +9,8 @@ Version: 1.1 alpha
|
|||||||
A simple mod that add to dungeons chests that contain some loot.
|
A simple mod that add to dungeons chests that contain some loot.
|
||||||
Configurable in many aspects, see "config.lua" for more details.
|
Configurable in many aspects, see "config.lua" for more details.
|
||||||
|
|
||||||
|
In MultiCraft Project this code has been changed:
|
||||||
|
I changed the drop in a few lines.
|
||||||
|
|
||||||
License:
|
License:
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
@ -61,21 +61,6 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- net
|
|
||||||
minetest.register_tool("mobs:net", {
|
|
||||||
description = "Net (right-click animal to put in inventory)",
|
|
||||||
inventory_image = "mobs_net.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mobs:net",
|
|
||||||
recipe = {
|
|
||||||
{"default:stick", "", "default:stick"},
|
|
||||||
{"default:stick", "", "default:stick"},
|
|
||||||
{"farming:string", "default:stick", "farming:string"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- shears (right click to shear animal)
|
-- shears (right click to shear animal)
|
||||||
minetest.register_tool("mobs:shears", {
|
minetest.register_tool("mobs:shears", {
|
||||||
description = "Steel Shears (right-click to shear)",
|
description = "Steel Shears (right-click to shear)",
|
||||||
|
@ -1,99 +1,3 @@
|
|||||||
|
|
||||||
-- Npc by TenPlus1
|
|
||||||
|
|
||||||
mobs.npc_drops = {
|
|
||||||
"default:pick_steel", "mobs:meat", "default:sword_steel",
|
|
||||||
"default:shovel_steel", "farming:bread", "bucket:bucket_water"
|
|
||||||
}
|
|
||||||
|
|
||||||
mobs:register_mob("mobs:npc", {
|
mobs:register_mob("mobs:npc", {
|
||||||
type = "npc",
|
lifetimer = 1,
|
||||||
passive = false,
|
|
||||||
damage = 3,
|
|
||||||
attack_type = "dogfight",
|
|
||||||
attacks_monsters = true,
|
|
||||||
reach = 2,
|
|
||||||
hp_min = 10,
|
|
||||||
hp_max = 20,
|
|
||||||
armor = 100,
|
|
||||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
|
||||||
visual = "mesh",
|
|
||||||
mesh = "character.b3d",
|
|
||||||
drawtype = "front",
|
|
||||||
textures = {
|
|
||||||
{"mobs_npc.png"},
|
|
||||||
{"mobs_npc2.png"}, -- female by nuttmeg20
|
|
||||||
},
|
|
||||||
child_texture = {
|
|
||||||
{"mobs_npc_baby.png"}, -- derpy baby by AmirDerAssassine
|
|
||||||
},
|
|
||||||
makes_footstep_sound = true,
|
|
||||||
sounds = {},
|
|
||||||
walk_velocity = 2,
|
|
||||||
run_velocity = 3,
|
|
||||||
jump = true,
|
|
||||||
drops = {
|
|
||||||
{name = "default:wood",
|
|
||||||
chance = 1, min = 1, max = 3},
|
|
||||||
{name = "default:apple",
|
|
||||||
chance = 2, min = 1, max = 2},
|
|
||||||
{name = "default:axe_stone",
|
|
||||||
chance = 5, min = 1, max = 1},
|
|
||||||
},
|
|
||||||
water_damage = 0,
|
|
||||||
lava_damage = 2,
|
|
||||||
light_damage = 0,
|
|
||||||
follow = {"farming:bread", "mobs:meat", "default:diamond"},
|
|
||||||
view_range = 15,
|
|
||||||
owner = "",
|
|
||||||
order = "follow",
|
|
||||||
animation = {
|
|
||||||
speed_normal = 30,
|
|
||||||
speed_run = 30,
|
|
||||||
stand_start = 0,
|
|
||||||
stand_end = 79,
|
|
||||||
walk_start = 168,
|
|
||||||
walk_end = 187,
|
|
||||||
run_start = 168,
|
|
||||||
run_end = 187,
|
|
||||||
punch_start = 200,
|
|
||||||
punch_end = 219,
|
|
||||||
},
|
|
||||||
on_rightclick = function(self, clicker)
|
|
||||||
|
|
||||||
-- feed to heal npc
|
|
||||||
if not mobs:feed_tame(self, clicker, 8, true, true) then
|
|
||||||
local item = clicker:get_wielded_item()
|
|
||||||
local name = clicker:get_player_name()
|
|
||||||
|
|
||||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
|
||||||
if item:get_name() == "default:gold_lump" then
|
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
|
||||||
item:take_item()
|
|
||||||
clicker:set_wielded_item(item)
|
|
||||||
end
|
|
||||||
local pos = self.object:getpos()
|
|
||||||
pos.y = pos.y + 0.5
|
|
||||||
minetest.add_item(pos, {
|
|
||||||
name = mobs.npc_drops[math.random(1, #mobs.npc_drops)]
|
|
||||||
})
|
|
||||||
return
|
|
||||||
else
|
|
||||||
-- if owner switch between follow and stand
|
|
||||||
if self.owner and self.owner == clicker:get_player_name() then
|
|
||||||
if self.order == "follow" then
|
|
||||||
self.order = "stand"
|
|
||||||
else
|
|
||||||
self.order = "follow"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
mobs:capture_mob(self, clicker, 0, 5, 80, false, nil)
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_spawn("mobs:npc", {"default:dirt", "default:sand", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, 20, 0, 10000, 1, 31000)
|
|
||||||
|
|
||||||
mobs:register_egg("mobs:npc", "Npc", "default_brick.png", 1)
|
|
@ -7,7 +7,7 @@ mobs:register_mob("mobs:rat", {
|
|||||||
hp_min = 1,
|
hp_min = 1,
|
||||||
hp_max = 4,
|
hp_max = 4,
|
||||||
armor = 100,
|
armor = 100,
|
||||||
collisionbox = {-0.2, -1, -0.2, 0.2, -0.8, 0.2},
|
collisionbox = {-0.25, -1, -0.25, 0.25, -0.8, 0.25},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_rat.b3d",
|
mesh = "mobs_rat.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
|
@ -44,6 +44,6 @@ mobs:register_mob("mobs:skeleton", {
|
|||||||
mobs:spawn_specific("mobs:skeleton",
|
mobs:spawn_specific("mobs:skeleton",
|
||||||
{"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
|
{"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
|
||||||
{"air"},
|
{"air"},
|
||||||
0, 5, 0, 4000, 1, -31000, 31000
|
0, 7, 0, 4000, 1, -31000, 31000
|
||||||
)
|
)
|
||||||
--mobs:register_egg("mobs:skeleton", "Zombie", "zombie_head.png", 0)
|
--mobs:register_egg("mobs:skeleton", "Zombie", "zombie_head.png", 0)
|
@ -51,7 +51,7 @@ mobs:register_mob("mobs:spider", {
|
|||||||
mobs:spawn_specific("mobs:spider",
|
mobs:spawn_specific("mobs:spider",
|
||||||
{"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
|
{"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
|
||||||
{"air"},
|
{"air"},
|
||||||
0, 5, 0, 5000, 1, -31000, 31000
|
0, 7, 0, 5000, 1, -31000, 31000
|
||||||
)
|
)
|
||||||
|
|
||||||
mobs:register_egg("mobs:spider", "Spider", "mobs_cobweb.png", 1)
|
mobs:register_egg("mobs:spider", "Spider", "mobs_cobweb.png", 1)
|
||||||
|
Before Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 875 B |
Before Width: | Height: | Size: 988 B |
Before Width: | Height: | Size: 642 B |
@ -44,7 +44,7 @@ mobs:register_mob("mobs:zombie", {
|
|||||||
mobs:spawn_specific("mobs:zombie",
|
mobs:spawn_specific("mobs:zombie",
|
||||||
{"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
|
{"default:dirt", "default:sandstone", "default:sand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:cobble", "default:mossycobble"},
|
||||||
{"air"},
|
{"air"},
|
||||||
0, 5, 0, 4000, 1, -31000, 31000
|
0, 7, 0, 4000, 1, -31000, 31000
|
||||||
)
|
)
|
||||||
mobs:register_egg("mobs:zombie", "Zombie", "zombie_head.png", 0)
|
mobs:register_egg("mobs:zombie", "Zombie", "zombie_head.png", 0)
|
||||||
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
[mod] visible wielded items [wieldview]
|
|
||||||
=======================================
|
|
||||||
|
|
||||||
depends: default, 3d_armor
|
|
||||||
|
|
||||||
Makes hand wielded items visible to other players.
|
|
||||||
|
|
||||||
default settings: [minetest.conf]
|
|
||||||
|
|
||||||
# Set number of seconds between visible wielded item updates.
|
|
||||||
wieldview_update_time = 2
|
|
||||||
|
|
||||||
# Show nodes as tiles, disabled by default
|
|
||||||
wieldview_node_tiles = false
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
default
|
|
||||||
3d_armor
|
|
@ -1,76 +0,0 @@
|
|||||||
local time = 0
|
|
||||||
local update_time = tonumber(minetest.setting_get("wieldview_update_time"))
|
|
||||||
if not update_time then
|
|
||||||
update_time = 2
|
|
||||||
minetest.setting_set("wieldview_update_time", tostring(update_time))
|
|
||||||
end
|
|
||||||
local node_tiles = minetest.setting_getbool("wieldview_node_tiles")
|
|
||||||
if not node_tiles then
|
|
||||||
node_tiles = false
|
|
||||||
minetest.setting_set("wieldview_node_tiles", "false")
|
|
||||||
end
|
|
||||||
|
|
||||||
wieldview = {
|
|
||||||
wielded_item = {},
|
|
||||||
transform = {},
|
|
||||||
}
|
|
||||||
|
|
||||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/transform.lua")
|
|
||||||
|
|
||||||
wieldview.get_item_texture = function(self, item)
|
|
||||||
local texture = "3d_armor_trans.png"
|
|
||||||
if item ~= "" then
|
|
||||||
if minetest.registered_items[item] then
|
|
||||||
if minetest.registered_items[item].inventory_image ~= "" then
|
|
||||||
texture = minetest.registered_items[item].inventory_image
|
|
||||||
elseif node_tiles == true and minetest.registered_items[item].tiles
|
|
||||||
and type(minetest.registered_items[item].tiles[1]) == "string"
|
|
||||||
and minetest.registered_items[item].tiles[1] ~= "" then
|
|
||||||
texture = minetest.inventorycube(minetest.registered_items[item].tiles[1])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if wieldview.transform[item] then
|
|
||||||
texture = texture.."^[transform"..wieldview.transform[item]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return texture
|
|
||||||
end
|
|
||||||
|
|
||||||
wieldview.update_wielded_item = function(self, player)
|
|
||||||
if not player then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local name = player:get_player_name()
|
|
||||||
local stack = player:get_wielded_item()
|
|
||||||
local item = stack:get_name()
|
|
||||||
if not item then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if self.wielded_item[name] then
|
|
||||||
if self.wielded_item[name] == item then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
armor.textures[name].wielditem = self:get_item_texture(item)
|
|
||||||
armor:update_player_visuals(player)
|
|
||||||
end
|
|
||||||
self.wielded_item[name] = item
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
wieldview.wielded_item[name] = ""
|
|
||||||
minetest.after(0, function(player)
|
|
||||||
wieldview:update_wielded_item(player)
|
|
||||||
end, player)
|
|
||||||
end)
|
|
||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
|
||||||
time = time + dtime
|
|
||||||
if time > update_time then
|
|
||||||
for _,player in ipairs(minetest.get_connected_players()) do
|
|
||||||
wieldview:update_wielded_item(player)
|
|
||||||
end
|
|
||||||
time = 0
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
-- Wielded Item Transformations - http://dev.minetest.net/texture
|
|
||||||
|
|
||||||
wieldview.transform = {
|
|
||||||
["default:torch"]="R270",
|
|
||||||
["default:sapling"]="R270",
|
|
||||||
["flowers:dandelion_white"]="R270",
|
|
||||||
["flowers:dandelion_yellow"]="R270",
|
|
||||||
["flowers:orchid"]="R270",
|
|
||||||
["flowers:rose"]="R270",
|
|
||||||
["flowers:tulip"]="R270",
|
|
||||||
["flowers:allium"]="R270",
|
|
||||||
["bucket:bucket_empty"]="R270",
|
|
||||||
["bucket:bucket_water"]="R270",
|
|
||||||
["bucket:bucket_lava"]="R270",
|
|
||||||
["screwdriver:screwdriver"]="R270",
|
|
||||||
["screwdriver:screwdriver1"]="R270",
|
|
||||||
["screwdriver:screwdriver2"]="R270",
|
|
||||||
["screwdriver:screwdriver3"]="R270",
|
|
||||||
["screwdriver:screwdriver4"]="R270",
|
|
||||||
["vessels:glass_bottle"]="R270",
|
|
||||||
["vessels:drinking_glass"]="R270",
|
|
||||||
["vessels:steel_bottle"]="R270",
|
|
||||||
}
|
|
||||||
|
|
@ -1136,7 +1136,7 @@ static void show_pause_menu(GUIFormSpecMenu **cur_formspec,
|
|||||||
<< strgettext("Continue") << "]";
|
<< strgettext("Continue") << "]";
|
||||||
|
|
||||||
if (!singleplayermode) {
|
if (!singleplayermode) {
|
||||||
os << "button_exit[1," << (ypos++) << ";3,0.5;btn_change_password;"
|
os << "button_exit[4," << (ypos++) << ";3,0.5;btn_change_password;"
|
||||||
<< strgettext("Change Password") << "]";
|
<< strgettext("Change Password") << "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|