]> git.lizzy.rs Git - minetest-m13.git/commitdiff
Update to 4.6 base
authorElias Fleckenstein <eliasfleckenstein@web.de>
Sat, 15 May 2021 13:23:50 +0000 (15:23 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Sat, 15 May 2021 13:23:50 +0000 (15:23 +0200)
163 files changed:
CMakeLists.txt
CMakeLists.txt~ [new file with mode: 0644]
README.txt
data/mods/default/init.lua~ [new file with mode: 0644]
doc/changelog.txt [new file with mode: 0644]
doc/gpl-2.0.txt [new file with mode: 0644]
doc/mapformat.txt [new file with mode: 0644]
doc/protocol.txt [new file with mode: 0644]
minetest.conf~ [new file with mode: 0644]
po/da/minetest.po
po/de/minetest.po
po/fr/minetest.po
src/activeobject.h
src/auth.cpp
src/auth.h
src/ban.cpp
src/ban.h
src/camera.cpp
src/camera.h
src/client.cpp
src/client.h
src/clientobject.cpp
src/clientobject.h
src/clientserver.h
src/clouds.cpp
src/clouds.h
src/collision.cpp
src/collision.h
src/common_irrlicht.h
src/connection.cpp
src/connection.h
src/constants.h
src/content_abm.cpp
src/content_abm.h
src/content_cao.cpp
src/content_cao.h
src/content_mapblock.cpp
src/content_mapblock.h
src/content_mapnode.cpp
src/content_mapnode.h
src/content_nodemeta.cpp
src/content_nodemeta.h
src/content_object.h
src/content_sao.cpp
src/content_sao.h
src/craftdef.cpp
src/craftdef.h
src/debug.cpp
src/debug.h
src/defaultsettings.cpp
src/defaultsettings.cpp~ [new file with mode: 0644]
src/defaultsettings.h
src/environment.cpp
src/environment.h
src/exceptions.h
src/farmesh.cpp
src/farmesh.h
src/filesys.cpp
src/filesys.h
src/game.cpp
src/game.h
src/gamedef.h
src/gettime.h
src/guiDeathScreen.cpp
src/guiDeathScreen.h
src/guiInventoryMenu.cpp
src/guiInventoryMenu.h
src/guiKeyChangeMenu.cpp
src/guiKeyChangeMenu.h
src/guiMainMenu.cpp
src/guiMainMenu.h
src/guiMessageMenu.cpp
src/guiMessageMenu.h
src/guiPasswordChange.cpp
src/guiPasswordChange.h
src/guiPauseMenu.cpp
src/guiPauseMenu.h
src/guiTextInputMenu.cpp
src/guiTextInputMenu.h
src/inventory.cpp
src/inventory.h
src/inventorymanager.cpp
src/inventorymanager.h
src/irrlichttypes.h
src/itemdef.cpp
src/itemdef.h
src/keycode.cpp
src/keycode.h
src/light.cpp
src/light.h
src/log.cpp
src/log.h
src/logoutputbuffer.h
src/luaentity_common.cpp
src/luaentity_common.h
src/main.cpp
src/main.h
src/mainmenumanager.h
src/map.cpp
src/map.h
src/mapblock.cpp
src/mapblock.h
src/mapblock_mesh.cpp
src/mapblock_mesh.h
src/mapblock_nodemod.h
src/mapchunk.h
src/mapgen.cpp
src/mapgen.h
src/mapnode.cpp
src/mapnode.h
src/mapsector.cpp
src/mapsector.h
src/materials.cpp
src/materials.h
src/mesh.cpp
src/mesh.h
src/modalMenu.h
src/modifiedstate.h
src/mods.cpp
src/mods.h
src/nameidmapping.cpp
src/nameidmapping.h
src/nodedef.cpp
src/nodedef.h
src/nodemetadata.cpp
src/nodemetadata.h
src/noise.cpp
src/noise.h
src/player.cpp
src/player.h
src/porting.cpp
src/porting.h
src/profiler.h
src/script.cpp
src/script.h
src/scriptapi.cpp
src/scriptapi.h
src/serialization.cpp
src/serialization.h
src/server.cpp
src/server.h
src/servercommand.cpp
src/servercommand.h
src/servermain.cpp
src/serverobject.cpp
src/serverobject.h
src/serverremoteplayer.cpp
src/serverremoteplayer.h
src/settings.h
src/socket.cpp
src/socket.h
src/staticobject.h
src/strfnd.h
src/test.cpp
src/test.h
src/threads.h
src/tile.cpp
src/tile.h
src/utility.cpp
src/utility.h
src/voxel.cpp
src/voxel.h
util/wireshark/minetest.lua

index 2625c8deba91dc952d24e5d0ba90c319f67f86ed..f17833e69b8feeaa6e863f5a08a4fe4b3b65ef8e 100644 (file)
@@ -10,7 +10,7 @@ project(minetest)
 # Also remember to set PROTOCOL_VERSION in clientserver.h when releasing
 set(VERSION_MAJOR 0)
 set(VERSION_MINOR 4)
-set(VERSION_PATCH 4_2-Dev)
+set(VERSION_PATCH 6)
 set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
 
 MESSAGE(STATUS "*** Will build version ${VERSION_STRING} ***")
diff --git a/CMakeLists.txt~ b/CMakeLists.txt~
new file mode 100644 (file)
index 0000000..2625c8d
--- /dev/null
@@ -0,0 +1,123 @@
+cmake_minimum_required(VERSION 2.6)
+if(${CMAKE_VERSION} STREQUAL "2.8.2")
+  # bug http://vtk.org/Bug/view.php?id=11020
+  message( WARNING "CMake/CPack version 2.8.2 will not create working .deb packages!")
+endif(${CMAKE_VERSION} STREQUAL "2.8.2")
+
+# This can be read from ${PROJECT_NAME} after project() is called
+project(minetest)
+
+# Also remember to set PROTOCOL_VERSION in clientserver.h when releasing
+set(VERSION_MAJOR 0)
+set(VERSION_MINOR 4)
+set(VERSION_PATCH 4_2-Dev)
+set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
+
+MESSAGE(STATUS "*** Will build version ${VERSION_STRING} ***")
+
+# Configuration options
+
+if(WIN32)
+       set(RUN_IN_PLACE 1 CACHE BOOL "Run directly in source directory structure")
+else()
+       set(RUN_IN_PLACE 0 CACHE BOOL "Run directly in source directory structure")
+endif()
+
+set(BUILD_CLIENT 1 CACHE BOOL "Build client")
+if(WIN32)
+       set(BUILD_SERVER 0 CACHE BOOL "Build server")
+else()
+       set(BUILD_SERVER 1 CACHE BOOL "Build server")
+endif()
+
+set(WARN_ALL 1 CACHE BOOL "Enable -Wall for Release build")
+
+if(NOT CMAKE_BUILD_TYPE)
+       # Default to release
+       set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type: Debug or Release" FORCE)
+endif()
+
+# Included stuff
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
+include(${CMAKE_SOURCE_DIR}/cmake/Modules/misc.cmake)
+
+# This is done here so that relative search paths are more reasnable
+find_package(Irrlicht)
+
+#
+# Installation
+#
+
+if(WIN32)
+       set(DATADIR "data")
+       set(BINDIR "bin")
+       set(DOCDIR "doc")
+       set(EXAMPLE_CONF_DIR ".")
+elseif(APPLE)
+       # random placeholders
+       set(DATADIR "share/${PROJECT_NAME}")
+       set(BINDIR "bin")
+       set(DOCDIR "share/doc/${PROJECT_NAME}")
+       set(EXAMPLE_CONF_DIR ".")
+elseif(UNIX) # Linux, BSD etc
+       set(DATADIR "share/${PROJECT_NAME}")
+       set(BINDIR "bin")
+       set(DOCDIR "share/doc/${PROJECT_NAME}")
+       set(EXAMPLE_CONF_DIR "share/doc/${PROJECT_NAME}")
+endif()
+
+install(FILES "README.txt" DESTINATION "${DOCDIR}")
+install(FILES "doc/changelog.txt" DESTINATION "${DOCDIR}")
+install(FILES "minetest.conf.example" DESTINATION "${DOCDIR}")
+
+#
+# Subdirectories
+# Be sure to add all relevant definitions above this
+#
+
+add_subdirectory(src)
+
+# CPack
+
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An InfiniMiner/Minecraft inspired game")
+set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
+set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
+set(CPACK_PACKAGE_VENDOR "celeron55")
+set(CPACK_PACKAGE_CONTACT "Perttu Ahola <celeron55@gmail.com>")
+
+if(WIN32)
+       # For some reason these aren't copied otherwise
+       # NOTE: For some reason now it seems to work without these
+       #if(BUILD_CLIENT)
+       #       install(FILES bin/minetest.exe DESTINATION bin)
+       #endif()
+       #if(BUILD_SERVER)
+       #       install(FILES bin/minetestserver.exe DESTINATION bin)
+       #endif()
+
+       set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-win32")
+
+       set(CPACK_GENERATOR ZIP)
+
+       # This might be needed for some installer
+       #set(CPACK_PACKAGE_EXECUTABLES bin/minetest.exe "Minetest" bin/minetestserver.exe "Minetest Server")
+elseif(APPLE)
+       # TODO
+       # see http://cmake.org/Wiki/CMake:CPackPackageGenerators#Bundle_.28OSX_only.29
+       #
+       set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-osx")
+       set(CPACK_PACKAGE_ICON "")
+       set(CPACK_BUNDLE_NAME ${PROJECT_NAME})
+       set(CPACK_BUNDLE_ICON "")
+       set(CPACK_BUNDLE_PLIST "")
+       set(CPACK_BUNDLE_STARTUP_COMMAND "Contents/MacOS/${PROJECT_NAME}")
+       set(CPACK_GENERATOR "Bundle")
+else()
+       set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-linux")
+       set(CPACK_GENERATOR TGZ)
+       set(CPACK_SOURCE_GENERATOR TGZ)
+endif()
+
+include(CPack)
+
index de7ba37a05f043c1ad575128837d7e973a0f4a73..c10fa753771da951e015d747b6b3399113d6c051 100644 (file)
@@ -1,4 +1,4 @@
-Minetest-m13
+Minetest-c55
 ---------------
 An InfiniMiner/Minecraft inspired game.
 Copyright (c) 2010-2011 Perttu Ahola <celeron55@gmail.com>
@@ -93,7 +93,7 @@ Compiling on Windows:
        * Optional: gettext bibrary and tools:
                http://gnuwin32.sourceforge.net/downlinks/gettext.php
                - This is used for other UI languages. Feel free to leave it out.
-       * And, of course, Minetest-m13:
+       * And, of course, Minetest-c55:
                http://celeron.55.lt/~celeron55/minetest/download
 - Steps:
        - Select a directory called DIR hereafter in which you will operate.
@@ -195,7 +195,7 @@ cmake %sourcedir% -G "Visual Studio 10" -DIRRLICHT_SOURCE_DIR=%irrlichtpath% -DR
 "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" PACKAGE.vcxproj /p:Configuration=Release
 popd
 
-License of Minetest-m13 textures and sounds
+License of Minetest-c55 textures and sounds
 -------------------------------------------
 
 This applies to textures and sounds contained in the main Minetest
@@ -204,10 +204,10 @@ distribution.
 Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)                                 
 http://creativecommons.org/licenses/by-sa/3.0/
 
-License of Minetest-m13 source code
+License of Minetest-c55 source code
 -----------------------------------
 
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
diff --git a/data/mods/default/init.lua~ b/data/mods/default/init.lua~
new file mode 100644 (file)
index 0000000..bcd6b57
--- /dev/null
@@ -0,0 +1,2277 @@
+-- default (Minetest 0.4 mod)
+-- Most default stuff
+
+-- Quick documentation about the API
+-- =================================
+--
+-- Helper functions defined by builtin.lua:
+-- dump2(obj, name="_", dumped={})
+-- dump(obj, dumped={})
+--
+-- Mod load path
+-- -------------
+-- Generic:
+-- $path_data/mods/
+-- $path_userdata/usermods/
+-- $mapdir/worldmods/
+--
+-- On a run-in-place version (eg. the distributed windows version):
+-- minetest-0.4.x/data/mods/
+-- minetest-0.4.x/usermods/
+-- minetest-0.4.x/world/worldmods/
+--
+-- On an installed version on linux:
+-- /usr/share/minetest/mods/
+-- ~/.minetest/usermods
+-- ~/.minetest/world/worldmods
+--
+-- Naming convention for registered textual names
+-- ----------------------------------------------
+-- "modname:<whatever>" (<whatever> can have characters a-zA-Z0-9_)
+--
+-- This is to prevent conflicting names from corrupting maps and is
+-- enforced by the mod loader.
+--
+-- Example: mod "experimental", ideal item/node/entity name "tnt":
+--          -> the name should be "experimental:tnt".
+--
+-- Enforcement can be overridden by prefixing the name with ":". This can
+-- be used for overriding the registrations of some other mod.
+--
+-- Example: Any mod can redefine experimental:tnt by using the name
+--          ":experimental:tnt" when registering it.
+-- (also that mods is required to have "experimental" as a dependency)
+--
+-- The legacy mod uses ":" for maintaining backwards compatibility.
+--
+-- Textures
+-- --------
+-- Mods should generally prefix their textures with modname_, eg. given
+-- the mod name "foomod", a texture could be called "default_foomod_superfurnace.png"
+--
+-- This is not crucial and a conflicting name will not corrupt maps.
+--
+-- Representations of simple things
+-- --------------------------------
+--
+-- MapNode representation:
+-- {name="name", param1=num, param2=num}
+--
+-- param1 and param2 are 8 bit and 4 bit integers, respectively. They
+-- are reserved for certain automated functions. If you don't use these
+-- functions, you can use them to store arbitrary values.
+--
+-- param1 is reserved for the engine when:
+--   paramtype != "none"
+-- param2 is reserved for the engine when any of these are used:
+--   liquidtype == "flowing"
+--   drawtype == "flowingliquid"
+--   drawtype == "torchlike"
+--   drawtype == "signlike"
+--
+-- Position representation:
+-- {x=num, y=num, z=num}
+--
+-- stackstring/itemstring: A stack of items in serialized format.
+-- eg. 'node "default:dirt" 5'
+-- eg. 'tool "default:pick_wood" 21323'
+-- eg. 'craft "default:apple" 2'
+--
+-- item: A stack of items in Lua table format.
+-- eg. {name="default:dirt", count=1, wear=0, metadata=""} 
+--     ^ a single dirt node
+-- eg. {name="default:pick_wood", count=1, wear=21323, metadata=""}
+--     ^ a wooden pick about 1/3 weared out
+-- eg. {name="default:apple", count=1, wear=0, metadata=""}
+--     ^ an apple.
+--
+-- Any time an item must be passed to a function, it can be an
+-- ItemStack (see below), an itemstring or a table in the above format.
+--
+-- Global functions:
+-- minetest.register_entity(name, prototype table)
+-- minetest.register_abm(abm definition)
+-- minetest.register_node(name, node definition)
+-- minetest.register_tool(name, item definition)
+-- minetest.register_craftitem(name, item definition)
+-- minetest.register_alias(name, convert_to)
+-- minetest.register_craft(recipe)
+-- minetest.register_globalstep(func(dtime))
+-- minetest.register_on_placenode(func(pos, newnode, placer))
+-- minetest.register_on_dignode(func(pos, oldnode, digger))
+-- minetest.register_on_punchnode(func(pos, node, puncher))
+-- minetest.register_on_generated(func(minp, maxp))
+-- minetest.register_on_newplayer(func(ObjectRef))
+-- minetest.register_on_dieplayer(func(ObjectRef))
+-- minetest.register_on_respawnplayer(func(ObjectRef))
+-- ^ return true in func to disable regular player placement
+-- ^ currently called _before_ repositioning of player occurs
+-- minetest.register_on_chat_message(func(name, message))
+-- minetest.add_to_creative_inventory(itemstring)
+-- minetest.setting_get(name) -> string or nil
+-- minetest.setting_getbool(name) -> boolean value or nil
+-- minetest.chat_send_all(text)
+-- minetest.chat_send_player(name, text)
+-- minetest.get_player_privs(name) -> set of privs
+-- minetest.get_inventory(location) -> InvRef
+-- minetest.get_current_modname() -> string
+-- minetest.get_modpath(modname) -> eg. "/home/user/.minetest/usermods/modname"
+-- ^ location = eg. {type="player", name="celeron55"}
+--                  {type="node", pos={x=, y=, z=}}
+--
+-- minetest.debug(line)
+-- ^ Goes to dstream
+-- minetest.log(line)
+-- minetest.log(loglevel, line)
+-- ^ loglevel one of "error", "action", "info", "verbose"
+--
+-- minetest.digprop_constanttime(time)
+-- minetest.digprop_stonelike(toughness)
+-- minetest.digprop_dirtlike(toughness)
+-- minetest.digprop_gravellike(toughness)
+-- minetest.digprop_woodlike(toughness)
+-- minetest.digprop_leaveslike(toughness)
+-- minetest.digprop_glasslike(toughness)
+--
+-- Global objects:
+-- minetest.env - environment reference
+--
+-- Global tables:
+-- minetest.registered_items
+-- ^ List of registered items, indexed by name
+-- minetest.registered_nodes
+-- ^ List of registered node definitions, indexed by name
+-- minetest.registered_craftitems
+-- ^ List of registered craft item definitions, indexed by name
+-- minetest.registered_tools
+-- ^ List of registered tool definitions, indexed by name
+-- minetest.registered_entities
+-- ^ List of registered entity prototypes, indexed by name
+-- minetest.object_refs
+-- ^ List of object references, indexed by active object id
+-- minetest.luaentities
+-- ^ List of lua entities, indexed by active object id
+--
+-- EnvRef is basically ServerEnvironment and ServerMap combined.
+-- EnvRef methods:
+-- - add_node(pos, node)
+-- - remove_node(pos)
+-- - get_node(pos)
+--   ^ Returns {name="ignore", ...} for unloaded area
+-- - get_node_or_nil(pos)
+--   ^ Returns nil for unloaded area
+-- - get_node_light(pos, timeofday) -> 0...15 or nil
+--   ^ timeofday: nil = current time, 0 = night, 0.5 = day
+-- - add_entity(pos, name): Returns ObjectRef or nil if failed
+-- - add_item(pos, itemstring)
+-- - add_rat(pos)
+-- - add_firefly(pos)
+-- - get_meta(pos) -- Get a NodeMetaRef at that position
+-- - get_player_by_name(name) -- Get an ObjectRef to a player
+-- - get_objects_inside_radius(pos, radius)
+--
+-- NodeMetaRef (this stuff is subject to change in a future version)
+-- - get_type()
+-- - allows_text_input()
+-- - set_text(text) -- eg. set the text of a sign
+-- - get_text()
+-- - get_owner()
+-- - set_owner(string)
+-- Generic node metadata specific:
+-- - set_infotext(infotext)
+-- - get_inventory() -> InvRef
+-- - set_inventory_draw_spec(string)
+-- - set_allow_text_input(bool)
+-- - set_allow_removal(bool)
+-- - set_enforce_owner(bool)
+-- - is_inventory_modified()
+-- - reset_inventory_modified()
+-- - is_text_modified()
+-- - reset_text_modified()
+-- - set_string(name, value)
+-- - get_string(name)
+--
+-- ObjectRef is basically ServerActiveObject.
+-- ObjectRef methods:
+-- - remove(): remove object (after returning from Lua)
+-- - getpos() -> {x=num, y=num, z=num}
+-- - setpos(pos); pos={x=num, y=num, z=num}
+-- - moveto(pos, continuous=false): interpolated move
+-- - punch(puncher, time_from_last_punch)
+--   ^ puncher = an another ObjectRef,
+--   ^ time_from_last_punch = time since last punch action of the puncher
+-- - right_click(clicker); clicker = an another ObjectRef
+-- - get_hp(): returns number of hitpoints (2 * number of hearts)
+-- - set_hp(hp): set number of hitpoints (2 * number of hearts)
+-- - get_inventory() -> InvRef
+-- - get_wield_list(): returns the name of the inventory list the wielded item is in
+-- - get_wield_index(): returns the index of the wielded item
+-- - get_wielded_item() -> ItemStack
+-- - set_wielded_item(item): replaces the wielded item, returns true if successful
+-- LuaEntitySAO-only: (no-op for other objects)
+-- - setvelocity({x=num, y=num, z=num})
+-- - getvelocity() -> {x=num, y=num, z=num}
+-- - setacceleration({x=num, y=num, z=num})
+-- - getacceleration() -> {x=num, y=num, z=num}
+-- - setyaw(radians)
+-- - getyaw() -> radians
+-- - settexturemod(mod)
+-- - setsprite(p={x=0,y=0}, num_frames=1, framelength=0.2,
+-- -           select_horiz_by_yawpitch=false)
+-- - ^ Select sprite from spritesheet with optional animation and DM-style
+-- -   texture selection based on yaw relative to camera
+-- - get_entity_name() (DEPRECATED: Will be removed in a future version)
+-- - get_luaentity()
+-- Player-only: (no-op for other objects)
+-- - get_player_name(): will return nil if is not a player
+-- - get_look_dir(): get camera direction as a unit vector
+-- - get_look_pitch(): pitch in radians
+-- - get_look_yaw(): yaw in radians (wraps around pretty randomly as of now)
+--
+-- InvRef methods:
+-- - get_size(listname): get size of a list
+-- - set_size(listname, size): set size of a list
+-- - get_stack(listname, i): get a copy of stack index i in list
+-- - set_stack(listname, i, stack): copy stack to index i in list
+-- - get_list(listname): return full list
+-- - set_list(listname, list): set full list (size will not change)
+-- - add_item(listname, stack): add item somewhere in list, returns leftover ItemStack
+-- - room_for_item(listname, stack): returns true if the stack of items
+--     can be fully added to the list
+-- - contains_item(listname, stack): returns true if the stack of items
+--     can be fully taken from the list
+--   remove_item(listname, stack): take as many items as specified from the list,
+--     returns the items that were actually removed (as an ItemStack)
+--
+-- ItemStack methods:
+-- - is_empty(): return true if stack is empty
+-- - get_name(): returns item name (e.g. "default:stone")
+-- - get_count(): returns number of items on the stack
+-- - get_wear(): returns tool wear (0-65535), 0 for non-tools
+-- - get_metadata(): returns metadata (a string attached to an item stack)
+-- - clear(): removes all items from the stack, making it empty
+-- - replace(item): replace the contents of this stack (item can also
+--     be an itemstring or table)
+-- - to_string(): returns the stack in itemstring form
+-- - to_table(): returns the stack in Lua table form
+-- - get_stack_max(): returns the maximum size of the stack (depends on the item)
+-- - get_free_space(): returns get_stack_max() - get_count()
+-- - is_known(): returns true if the item name refers to a defined item type
+-- - get_definition(): returns the item definition table
+-- - get_tool_digging_properties(): returns the digging properties of the item,
+--   ^ or those of the hand if none are defined for this item type
+-- - add_wear(amount): increases wear by amount if the item is a tool
+-- - add_item(item): put some item or stack onto this stack,
+--   ^ returns leftover ItemStack
+-- - item_fits(item): returns true if item or stack can be fully added to this one
+-- - take_item(n): take (and remove) up to n items from this stack
+--   ^ returns taken ItemStack
+--   ^ if n is omitted, n=1 is used
+-- - peek_item(n): copy (don't remove) up to n items from this stack
+--   ^ returns copied ItemStack
+--   ^ if n is omitted, n=1 is used
+--
+-- Registered entities:
+-- - Functions receive a "luaentity" as self:
+--   - It has the member .name, which is the registered name ("mod:thing")
+--   - It has the member .object, which is an ObjectRef pointing to the object
+--   - The original prototype stuff is visible directly via a metatable
+-- - Callbacks:
+--   - on_activate(self, staticdata)
+--   - on_step(self, dtime)
+--   - on_punch(self, hitter)
+--   - on_rightclick(self, clicker)
+--   - get_staticdata(self)
+--     ^ return string that will be passed to on_activate when the object
+--       is created next time
+--
+-- Entity prototype table:
+-- {
+--     physical = true,
+--     collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
+--     visual = "cube"/"sprite",
+--     visual_size = {x=1, y=1},
+--     textures = {texture,texture,texture,texture,texture,texture},
+--     spritediv = {x=1, y=1},
+--     initial_sprite_basepos = {x=0, y=0},
+--     on_activate = function(self, staticdata),
+--     on_step = function(self, dtime),
+--     on_punch = function(self, hitter),
+--     on_rightclick = function(self, clicker),
+--     get_staticdata = function(self),
+--     # Also you can define arbitrary member variables here
+--     myvariable = whatever,
+-- }
+--
+-- Item definition options (register_node, register_craftitem, register_tool)
+-- {
+--     description = "Steel Axe",
+--     inventory_image = "default_tool_steelaxe.png",
+--     wield_image = "",
+--     wield_scale = {x=1,y=1,z=1},
+--     stack_max = 99,
+--     liquids_pointable = false,
+--     tool_digging_properties = {
+--         full_punch_interval = 1.0,
+--         basetime = 1.0,
+--         dt_weight = 0.5,
+--         dt_crackiness = -0.2,
+--         dt_crumbliness = 1,
+--         dt_cuttability = -0.5,
+--         basedurability = 330,
+--         dd_weight = 0,
+--         dd_crackiness = 0,
+--         dd_crumbliness = 0,
+--         dd_cuttability = 0,
+--     }
+--     on_drop = func(item, dropper, pos),
+--     on_place = func(item, placer, pointed_thing),
+--     on_use = func(item, user, pointed_thing),
+-- }
+--
+-- Node definition options (register_node):
+-- {
+--     <all fields allowed in item definitions>,
+--     drawtype = "normal",
+--     visual_scale = 1.0,
+--     tile_images = {"default_unknown_block.png"},
+--     special_materials = {
+--         {image="", backface_culling=true},
+--         {image="", backface_culling=true},
+--     },
+--     alpha = 255,
+--     post_effect_color = {a=0, r=0, g=0, b=0},
+--     paramtype = "none",
+--     paramtype2 = "none",
+--     is_ground_content = false,
+--     sunlight_propagates = false,
+--     walkable = true,
+--     pointable = true,
+--     diggable = true,
+--     climbable = false,
+--     buildable_to = false,
+--     drop = "",
+--     -- alternatively drop = { max_items = ..., items = { ... } }
+--     metadata_name = "",
+--     liquidtype = "none",
+--     liquid_alternative_flowing = "",
+--     liquid_alternative_source = "",
+--     liquid_viscosity = 0,
+--     light_source = 0,
+--     damage_per_second = 0,
+--     selection_box = {type="regular"},
+--     material = {
+--         diggablity = "normal",
+--         weight = 0,
+--         crackiness = 0,
+--         crumbliness = 0,
+--         cuttability = 0,
+--         flammability = 0,
+--     },
+--     legacy_facedir_simple = false, -- Support maps made in and before January 2012
+--     legacy_wallmounted = false, -- Support maps made in and before January 2012
+-- }
+--
+-- Recipe:
+-- {
+--     output = 'default:pick_stone',
+--     recipe = {
+--         {'default:cobble', 'default:cobble', 'default:cobble'},
+--         {'', 'default:stick', ''},
+--         {'', 'default:stick', ''},
+--     },
+--     replacements = <optional list of item pairs,
+--                     replace one input item with another item on crafting>
+-- }
+--
+-- Recipe (shapeless):
+-- {
+--     type = "shapeless",
+--     output = 'mushrooms:mushroom_stew',
+--     recipe = {
+--         "mushrooms:bowl",
+--         "mushrooms:mushroom_brown",
+--         "mushrooms:mushroom_red",
+--     },
+--     replacements = <optional list of item pairs,
+--                     replace one input item with another item on crafting>
+-- }
+--
+-- Recipe (tool repair):
+-- {
+--     type = "toolrepair",
+--     additional_wear = -0.02,
+-- }
+--
+-- Recipe (cooking):
+-- {
+--     type = "cooking",
+--     output = "default:glass",
+--     recipe = "default:sand",
+--     cooktime = 3,
+-- }
+--
+-- Recipe (furnace fuel):
+-- {
+--     type = "fuel",
+--     recipe = "default:leaves",
+--     burntime = 1,
+-- }
+--
+-- ABM (ActiveBlockModifier) definition:
+-- {
+--     nodenames = {"default:lava_source"},
+--     neighbors = {"default:water_source", "default:water_flowing"}, -- (any of these)
+--      ^ If left out or empty, any neighbor will do
+--      ^ This might get removed in the future
+--     interval = 1.0, -- (operation interval)
+--     chance = 1, -- (chance of trigger is 1.0/this)
+--     action = func(pos, node, active_object_count, active_object_count_wider),
+-- }
+
+WATER_ALPHA = 160
+WATER_VISC = 1
+LAVA_VISC = 7
+LIGHT_MAX = 14
+
+-- Definitions made by this mod that other mods can use too
+default = {}
+
+--
+-- Tool definition
+--
+
+minetest.register_tool("default:pick_wood", {
+       description = "Wooden Pickaxe",
+       inventory_image = "default_tool_woodpick.png",
+       tool_digging_properties = {
+               basetime = 2.0,
+               dt_weight = 0,
+               dt_crackiness = -0.5,
+               dt_crumbliness = 2,
+               dt_cuttability = 0,
+               basedurability = 30,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       },
+})
+minetest.register_tool("default:pick_stone", {
+       description = "Stone Pickaxe",
+       inventory_image = "default_tool_stonepick.png",
+       tool_digging_properties = {
+               basetime = 1.5,
+               dt_weight = 0,
+               dt_crackiness = -0.5,
+               dt_crumbliness = 2,
+               dt_cuttability = 0,
+               basedurability = 100,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       },
+})
+minetest.register_tool("default:pick_steel", {
+       description = "Steel Pickaxe",
+       inventory_image = "default_tool_steelpick.png",
+       tool_digging_properties = {
+               basetime = 1.0,
+               dt_weight = 0,
+               dt_crackiness = -0.5,
+               dt_crumbliness = 2,
+               dt_cuttability = 0,
+               basedurability = 333,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       },
+})
+minetest.register_tool("default:pick_mese", {
+       description = "Mese Pickaxe",
+       inventory_image = "default_tool_mesepick.png",
+       tool_digging_properties = {
+               basetime = 0,
+               dt_weight = 0,
+               dt_crackiness = 0,
+               dt_crumbliness = 0,
+               dt_cuttability = 0,
+               basedurability = 1337,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       },
+})
+minetest.register_tool("default:shovel_wood", {
+       description = "Wooden Shovel",
+       inventory_image = "default_tool_woodshovel.png",
+       tool_digging_properties = {
+               basetime = 2.0,
+               dt_weight = 0.5,
+               dt_crackiness = 2,
+               dt_crumbliness = -1.5,
+               dt_cuttability = 0.3,
+               basedurability = 30,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       },
+})
+minetest.register_tool("default:shovel_stone", {
+       description = "Stone Shovel",
+       inventory_image = "default_tool_stoneshovel.png",
+       tool_digging_properties = {
+               basetime = 1.5,
+               dt_weight = 0.5,
+               dt_crackiness = 2,
+               dt_crumbliness = -1.5,
+               dt_cuttability = 0.1,
+               basedurability = 100,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       },
+})
+minetest.register_tool("default:shovel_steel", {
+       description = "Steel Shovel",
+       inventory_image = "default_tool_steelshovel.png",
+       tool_digging_properties = {
+               basetime = 1.0,
+               dt_weight = 0.5,
+               dt_crackiness = 2,
+               dt_crumbliness = -1.5,
+               dt_cuttability = 0.0,
+               basedurability = 330,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       },
+})
+minetest.register_tool("default:axe_wood", {
+       description = "Wooden Axe",
+       inventory_image = "default_tool_woodaxe.png",
+       tool_digging_properties = {
+               basetime = 2.0,
+               dt_weight = 0.5,
+               dt_crackiness = -0.2,
+               dt_crumbliness = 1,
+               dt_cuttability = -0.5,
+               basedurability = 30,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       },
+})
+minetest.register_tool("default:axe_stone", {
+       description = "Stone Axe",
+       inventory_image = "default_tool_stoneaxe.png",
+       tool_digging_properties = {
+               basetime = 1.5,
+               dt_weight = 0.5,
+               dt_crackiness = -0.2,
+               dt_crumbliness = 1,
+               dt_cuttability = -0.5,
+               basedurability = 100,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       },
+})
+minetest.register_tool("default:axe_steel", {
+       description = "Steel Axe",
+       inventory_image = "default_tool_steelaxe.png",
+       tool_digging_properties = {
+               basetime = 1.0,
+               dt_weight = 0.5,
+               dt_crackiness = -0.2,
+               dt_crumbliness = 1,
+               dt_cuttability = -0.5,
+               basedurability = 330,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       },
+})
+minetest.register_tool("default:sword_wood", {
+       description = "Wooden Sword",
+       inventory_image = "default_tool_woodsword.png",
+       tool_digging_properties = {
+               basetime = 3.0,
+               dt_weight = 3,
+               dt_crackiness = 0,
+               dt_crumbliness = 1,
+               dt_cuttability = -1,
+               basedurability = 30,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       }
+})
+minetest.register_tool("default:sword_stone", {
+       description = "Stone Sword",
+       inventory_image = "default_tool_stonesword.png",
+       tool_digging_properties = {
+               basetime = 2.5,
+               dt_weight = 3,
+               dt_crackiness = 0,
+               dt_crumbliness = 1,
+               dt_cuttability = -1,
+               basedurability = 100,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       }
+})
+minetest.register_tool("default:sword_steel", {
+       description = "Steel Sword",
+       inventory_image = "default_tool_steelsword.png",
+       tool_digging_properties = {
+               basetime = 2.0,
+               dt_weight = 3,
+               dt_crackiness = 0,
+               dt_crumbliness = 1,
+               dt_cuttability = -1,
+               basedurability = 330,
+               dd_weight = 0,
+               dd_crackiness = 0,
+               dd_crumbliness = 0,
+               dd_cuttability = 0,
+       }
+})
+
+--
+-- Crafting definition
+--
+
+minetest.register_craft({
+       output = 'default:wood 4',
+       recipe = {
+               {'default:tree'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:stick 4',
+       recipe = {
+               {'default:wood'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:fence_wood 2',
+       recipe = {
+               {'default:stick', 'default:stick', 'default:stick'},
+               {'default:stick', 'default:stick', 'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:sign_wall',
+       recipe = {
+               {'default:wood', 'default:wood', 'default:wood'},
+               {'default:wood', 'default:wood', 'default:wood'},
+               {'', 'default:stick', ''},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:torch 4',
+       recipe = {
+               {'default:coal_lump'},
+               {'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:pick_wood',
+       recipe = {
+               {'default:wood', 'default:wood', 'default:wood'},
+               {'', 'default:stick', ''},
+               {'', 'default:stick', ''},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:pick_stone',
+       recipe = {
+               {'default:cobble', 'default:cobble', 'default:cobble'},
+               {'', 'default:stick', ''},
+               {'', 'default:stick', ''},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:pick_steel',
+       recipe = {
+               {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
+               {'', 'default:stick', ''},
+               {'', 'default:stick', ''},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:pick_mese',
+       recipe = {
+               {'default:mese', 'default:mese', 'default:mese'},
+               {'', 'default:stick', ''},
+               {'', 'default:stick', ''},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:shovel_wood',
+       recipe = {
+               {'default:wood'},
+               {'default:stick'},
+               {'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:shovel_stone',
+       recipe = {
+               {'default:cobble'},
+               {'default:stick'},
+               {'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:shovel_steel',
+       recipe = {
+               {'default:steel_ingot'},
+               {'default:stick'},
+               {'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:axe_wood',
+       recipe = {
+               {'default:wood', 'default:wood'},
+               {'default:wood', 'default:stick'},
+               {'', 'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:axe_stone',
+       recipe = {
+               {'default:cobble', 'default:cobble'},
+               {'default:cobble', 'default:stick'},
+               {'', 'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:axe_steel',
+       recipe = {
+               {'default:steel_ingot', 'default:steel_ingot'},
+               {'default:steel_ingot', 'default:stick'},
+               {'', 'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:sword_wood',
+       recipe = {
+               {'default:wood'},
+               {'default:wood'},
+               {'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:sword_stone',
+       recipe = {
+               {'default:cobble'},
+               {'default:cobble'},
+               {'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:sword_steel',
+       recipe = {
+               {'default:steel_ingot'},
+               {'default:steel_ingot'},
+               {'default:stick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:rail 15',
+       recipe = {
+               {'default:steel_ingot', '', 'default:steel_ingot'},
+               {'default:steel_ingot', 'default:stick', 'default:steel_ingot'},
+               {'default:steel_ingot', '', 'default:steel_ingot'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:chest',
+       recipe = {
+               {'default:wood', 'default:wood', 'default:wood'},
+               {'default:wood', '', 'default:wood'},
+               {'default:wood', 'default:wood', 'default:wood'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:chest_locked',
+       recipe = {
+               {'default:wood', 'default:wood', 'default:wood'},
+               {'default:wood', 'default:steel_ingot', 'default:wood'},
+               {'default:wood', 'default:wood', 'default:wood'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:furnace',
+       recipe = {
+               {'default:cobble', 'default:cobble', 'default:cobble'},
+               {'default:cobble', '', 'default:cobble'},
+               {'default:cobble', 'default:cobble', 'default:cobble'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:steelblock',
+       recipe = {
+               {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
+               {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
+               {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:sandstone',
+       recipe = {
+               {'default:sand', 'default:sand'},
+               {'default:sand', 'default:sand'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:clay',
+       recipe = {
+               {'default:clay_lump', 'default:clay_lump'},
+               {'default:clay_lump', 'default:clay_lump'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:brick',
+       recipe = {
+               {'default:clay_brick', 'default:clay_brick'},
+               {'default:clay_brick', 'default:clay_brick'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:paper',
+       recipe = {
+               {'default:papyrus', 'default:papyrus', 'default:papyrus'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:book',
+       recipe = {
+               {'default:paper'},
+               {'default:paper'},
+               {'default:paper'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:bookshelf',
+       recipe = {
+               {'default:wood', 'default:wood', 'default:wood'},
+               {'default:book', 'default:book', 'default:book'},
+               {'default:wood', 'default:wood', 'default:wood'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:ladder',
+       recipe = {
+               {'default:stick', '', 'default:stick'},
+               {'default:stick', 'default:stick', 'default:stick'},
+               {'default:stick', '', 'default:stick'},
+       }
+})
+
+--
+-- Crafting (tool repair)
+--
+minetest.register_craft({
+       type = "toolrepair",
+       additional_wear = -0.02,
+})
+
+--
+-- Cooking recipes
+--
+
+minetest.register_craft({
+       type = "cooking",
+       output = "default:glass",
+       recipe = "default:sand",
+})
+
+minetest.register_craft({
+       type = "cooking",
+       output = "default:coal_lump",
+       recipe = "default:tree",
+})
+
+minetest.register_craft({
+       type = "cooking",
+       output = "default:coal_lump",
+       recipe = "default:jungletree",
+})
+
+minetest.register_craft({
+       type = "cooking",
+       output = "default:stone",
+       recipe = "default:cobble",
+})
+
+minetest.register_craft({
+       type = "cooking",
+       output = "default:steel_ingot",
+       recipe = "default:iron_lump",
+})
+
+minetest.register_craft({
+       type = "cooking",
+       output = "default:clay_brick",
+       recipe = "default:clay_lump",
+})
+
+--
+-- Fuels
+--
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:tree",
+       burntime = 30,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:jungletree",
+       burntime = 30,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:junglegrass",
+       burntime = 2,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:leaves",
+       burntime = 1,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:cactus",
+       burntime = 15,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:papyrus",
+       burntime = 1,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:bookshelf",
+       burntime = 30,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:fence_wood",
+       burntime = 15,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:ladder",
+       burntime = 5,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:wood",
+       burntime = 7,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:mese",
+       burntime = 30,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:lava_source",
+       burntime = 60,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:torch",
+       burntime = 4,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:sign_wall",
+       burntime = 10,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:chest",
+       burntime = 30,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:chest_locked",
+       burntime = 30,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:nyancat",
+       burntime = 1,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:nyancat_rainbow",
+       burntime = 1,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:sapling",
+       burntime = 10,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:apple",
+       burntime = 3,
+})
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:coal_lump",
+       burntime = 40,
+})
+
+--
+-- Node definitions
+--
+
+minetest.register_node("default:stone", {
+       description = "Stone",
+       tile_images = {"default_stone.png"},
+       is_ground_content = true,
+       material = minetest.digprop_stonelike(1.0),
+       drop = 'default:cobble',
+       legacy_mineral = true,
+})
+
+minetest.register_node("default:stone_with_coal", {
+       description = "Stone with coal",
+       tile_images = {"default_stone.png^default_mineral_coal.png"},
+       is_ground_content = true,
+       material = minetest.digprop_stonelike(1.0),
+       drop = 'default:coal_lump',
+})
+
+minetest.register_node("default:stone_with_iron", {
+       description = "Stone with iron",
+       tile_images = {"default_stone.png^default_mineral_iron.png"},
+       is_ground_content = true,
+       material = minetest.digprop_stonelike(1.0),
+       drop = 'default:iron_lump',
+})
+
+minetest.register_node("default:dirt_with_grass", {
+       description = "Dirt with grass",
+       tile_images = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
+       is_ground_content = true,
+       material = minetest.digprop_dirtlike(1.0),
+       drop = 'default:dirt',
+})
+
+minetest.register_node("default:dirt_with_grass_footsteps", {
+       description = "Dirt with grass and footsteps",
+       tile_images = {"default_grass_footsteps.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
+       is_ground_content = true,
+       material = minetest.digprop_dirtlike(1.0),
+       drop = 'default:dirt',
+})
+
+minetest.register_node("default:dirt", {
+       description = "Dirt",
+       tile_images = {"default_dirt.png"},
+       is_ground_content = true,
+       material = minetest.digprop_dirtlike(1.0),
+})
+
+minetest.register_node("default:sand", {
+       description = "Sand",
+       tile_images = {"default_sand.png"},
+       is_ground_content = true,
+       material = minetest.digprop_dirtlike(1.0),
+})
+
+minetest.register_node("default:gravel", {
+       description = "Gravel",
+       tile_images = {"default_gravel.png"},
+       is_ground_content = true,
+       material = minetest.digprop_gravellike(1.0),
+})
+
+minetest.register_node("default:sandstone", {
+       description = "Sandstone",
+       tile_images = {"default_sandstone.png"},
+       is_ground_content = true,
+       material = minetest.digprop_dirtlike(1.0),  -- FIXME should this be stonelike?
+       drop = 'default:sand',
+})
+
+minetest.register_node("default:clay", {
+       description = "Clay",
+       tile_images = {"default_clay.png"},
+       is_ground_content = true,
+       material = minetest.digprop_dirtlike(1.0),
+       drop = 'default:clay_lump 4',
+})
+
+minetest.register_node("default:brick", {
+       description = "Brick",
+       tile_images = {"default_brick.png"},
+       is_ground_content = true,
+       material = minetest.digprop_stonelike(1.0),
+       drop = 'default:clay_brick 4',
+})
+
+minetest.register_node("default:tree", {
+       description = "Tree",
+       tile_images = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(1.0),
+})
+
+minetest.register_node("default:jungletree", {
+       description = "Jungle Tree",
+       tile_images = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(1.0),
+})
+
+minetest.register_node("default:junglegrass", {
+       description = "Jungle Grass",
+       drawtype = "plantlike",
+       visual_scale = 1.3,
+       tile_images = {"default_junglegrass.png"},
+       inventory_image = "default_junglegrass.png",
+       wield_image = "default_junglegrass.png",
+       paramtype = "light",
+       walkable = false,
+       material = minetest.digprop_leaveslike(1.0),
+})
+
+minetest.register_node("default:leaves", {
+       description = "Leaves",
+       drawtype = "allfaces_optional",
+       visual_scale = 1.3,
+       tile_images = {"default_leaves.png"},
+       paramtype = "light",
+       material = minetest.digprop_leaveslike(1.0),
+       drop = {
+               max_items = 1,
+               items = {
+                       {
+                               -- player will get sapling with 1/20 chance
+                               items = {'default:sapling'},
+                               rarity = 20,
+                       },
+                       {
+                               -- player will get leaves only if he get no saplings,
+                               -- this is because max_items is 1
+                               items = {'default:leaves'},
+                       }
+               }
+       },
+})
+
+minetest.register_node("default:cactus", {
+       description = "Cactus",
+       tile_images = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.75),
+})
+
+minetest.register_node("default:papyrus", {
+       description = "Papyrus",
+       drawtype = "plantlike",
+       tile_images = {"default_papyrus.png"},
+       inventory_image = "default_papyrus.png",
+       wield_image = "default_papyrus.png",
+       paramtype = "light",
+       is_ground_content = true,
+       walkable = false,
+       material = minetest.digprop_leaveslike(0.5),
+})
+
+minetest.register_node("default:bookshelf", {
+       description = "Bookshelf",
+       tile_images = {"default_wood.png", "default_wood.png", "default_bookshelf.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.75),
+})
+
+minetest.register_node("default:glass", {
+       description = "Glass",
+       drawtype = "glasslike",
+       tile_images = {"default_glass.png"},
+       inventory_image = minetest.inventorycube("default_glass.png"),
+       paramtype = "light",
+       sunlight_propagates = true,
+       is_ground_content = true,
+       material = minetest.digprop_glasslike(1.0),
+})
+
+minetest.register_node("default:fence_wood", {
+       description = "Wooden Fence",
+       drawtype = "fencelike",
+       tile_images = {"default_wood.png"},
+       inventory_image = "default_fence.png",
+       wield_image = "default_fence.png",
+       paramtype = "light",
+       is_ground_content = true,
+       selection_box = {
+               type = "fixed",
+               fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
+       },
+       material = minetest.digprop_woodlike(0.75),
+})
+
+minetest.register_node("default:rail", {
+       description = "Rail",
+       drawtype = "raillike",
+       tile_images = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
+       inventory_image = "default_rail.png",
+       wield_image = "default_rail.png",
+       paramtype = "light",
+       is_ground_content = true,
+       walkable = false,
+       selection_box = {
+               type = "fixed",
+               --fixed = <default>
+       },
+       material = minetest.digprop_dirtlike(0.75),
+})
+
+minetest.register_node("default:ladder", {
+       description = "Ladder",
+       drawtype = "signlike",
+       tile_images = {"default_ladder.png"},
+       inventory_image = "default_ladder.png",
+       wield_image = "default_ladder.png",
+       paramtype = "light",
+       paramtype2 = "wallmounted",
+       is_ground_content = true,
+       walkable = false,
+       climbable = true,
+       selection_box = {
+               type = "wallmounted",
+               --wall_top = = <default>
+               --wall_bottom = = <default>
+               --wall_side = = <default>
+       },
+       material = minetest.digprop_woodlike(0.5),
+       legacy_wallmounted = true,
+})
+
+minetest.register_node("default:wood", {
+       description = "Wood",
+       tile_images = {"default_wood.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.75),
+})
+
+minetest.register_node("default:mese", {
+       description = "Mese",
+       tile_images = {"default_mese.png"},
+       is_ground_content = true,
+       material = minetest.digprop_stonelike(0.5),
+})
+
+minetest.register_node("default:cloud", {
+       description = "Cloud",
+       tile_images = {"default_cloud.png"},
+       is_ground_content = true,
+})
+
+minetest.register_node("default:water_flowing", {
+       description = "Water (flowing)",
+       inventory_image = minetest.inventorycube("default_water.png"),
+       drawtype = "flowingliquid",
+       tile_images = {"default_water.png"},
+       alpha = WATER_ALPHA,
+       paramtype = "light",
+       walkable = false,
+       pointable = false,
+       diggable = false,
+       buildable_to = true,
+       liquidtype = "flowing",
+       liquid_alternative_flowing = "default:water_flowing",
+       liquid_alternative_source = "default:water_source",
+       liquid_viscosity = WATER_VISC,
+       post_effect_color = {a=64, r=100, g=100, b=200},
+       special_materials = {
+               {image="default_water.png", backface_culling=false},
+               {image="default_water.png", backface_culling=true},
+       },
+})
+
+minetest.register_node("default:water_source", {
+       description = "Water",
+       inventory_image = minetest.inventorycube("default_water.png"),
+       drawtype = "liquid",
+       tile_images = {"default_water.png"},
+       alpha = WATER_ALPHA,
+       paramtype = "light",
+       walkable = false,
+       pointable = false,
+       diggable = false,
+       buildable_to = true,
+       liquidtype = "source",
+       liquid_alternative_flowing = "default:water_flowing",
+       liquid_alternative_source = "default:water_source",
+       liquid_viscosity = WATER_VISC,
+       post_effect_color = {a=64, r=100, g=100, b=200},
+       special_materials = {
+               -- New-style water source material (mostly unused)
+               {image="default_water.png", backface_culling=false},
+       },
+})
+
+minetest.register_node("default:lava_flowing", {
+       description = "Lava (flowing)",
+       inventory_image = minetest.inventorycube("default_lava.png"),
+       drawtype = "flowingliquid",
+       tile_images = {"default_lava.png"},
+       paramtype = "light",
+       light_source = LIGHT_MAX - 1,
+       walkable = false,
+       pointable = false,
+       diggable = false,
+       buildable_to = true,
+       liquidtype = "flowing",
+       liquid_alternative_flowing = "default:lava_flowing",
+       liquid_alternative_source = "default:lava_source",
+       liquid_viscosity = LAVA_VISC,
+       damage_per_second = 4*2,
+       post_effect_color = {a=192, r=255, g=64, b=0},
+       special_materials = {
+               {image="default_lava.png", backface_culling=false},
+               {image="default_lava.png", backface_culling=true},
+       },
+})
+
+minetest.register_node("default:lava_source", {
+       description = "Lava",
+       inventory_image = minetest.inventorycube("default_lava.png"),
+       drawtype = "liquid",
+       tile_images = {"default_lava.png"},
+       paramtype = "light",
+       light_source = LIGHT_MAX - 1,
+       walkable = false,
+       pointable = false,
+       diggable = false,
+       buildable_to = true,
+       liquidtype = "source",
+       liquid_alternative_flowing = "default:lava_flowing",
+       liquid_alternative_source = "default:lava_source",
+       liquid_viscosity = LAVA_VISC,
+       damage_per_second = 4*2,
+       post_effect_color = {a=192, r=255, g=64, b=0},
+       special_materials = {
+               -- New-style lava source material (mostly unused)
+               {image="default_lava.png", backface_culling=false},
+       },
+})
+
+minetest.register_node("default:torch", {
+       description = "Torch",
+       drawtype = "torchlike",
+       tile_images = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"},
+       inventory_image = "default_torch_on_floor.png",
+       wield_image = "default_torch_on_floor.png",
+       paramtype = "light",
+       paramtype2 = "wallmounted",
+       sunlight_propagates = true,
+       walkable = false,
+       light_source = LIGHT_MAX-1,
+       selection_box = {
+               type = "wallmounted",
+               wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
+               wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
+               wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
+       },
+       material = minetest.digprop_constanttime(0.0),
+       legacy_wallmounted = true,
+})
+
+minetest.register_node("default:sign_wall", {
+       description = "Sign",
+       drawtype = "signlike",
+       tile_images = {"default_sign_wall.png"},
+       inventory_image = "default_sign_wall.png",
+       wield_image = "default_sign_wall.png",
+       paramtype = "light",
+       paramtype2 = "wallmounted",
+       sunlight_propagates = true,
+       walkable = false,
+       metadata_name = "sign",
+       selection_box = {
+               type = "wallmounted",
+               --wall_top = <default>
+               --wall_bottom = <default>
+               --wall_side = <default>
+       },
+       material = minetest.digprop_constanttime(0.5),
+       legacy_wallmounted = true,
+})
+
+minetest.register_node("default:chest", {
+       description = "Chest",
+       tile_images = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
+               "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
+       paramtype2 = "facedir",
+       metadata_name = "chest",
+       material = minetest.digprop_woodlike(1.0),
+       legacy_facedir_simple = true,
+})
+
+minetest.register_node("default:chest_locked", {
+       description = "Locked Chest",
+       tile_images = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
+               "default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"},
+       paramtype2 = "facedir",
+       metadata_name = "locked_chest",
+       material = minetest.digprop_woodlike(1.0),
+       legacy_facedir_simple = true,
+})
+
+minetest.register_node("default:furnace", {
+       description = "Furnace",
+       tile_images = {"default_furnace_side.png", "default_furnace_side.png", "default_furnace_side.png",
+               "default_furnace_side.png", "default_furnace_side.png", "default_furnace_front.png"},
+       paramtype2 = "facedir",
+       metadata_name = "furnace",
+       material = minetest.digprop_stonelike(3.0),
+       legacy_facedir_simple = true,
+})
+
+minetest.register_node("default:cobble", {
+       description = "Cobble",
+       tile_images = {"default_cobble.png"},
+       is_ground_content = true,
+       material = minetest.digprop_stonelike(0.9),
+})
+
+minetest.register_node("default:mossycobble", {
+       description = "Mossy Cobble",
+       tile_images = {"default_mossycobble.png"},
+       is_ground_content = true,
+       material = minetest.digprop_stonelike(0.8),
+})
+
+minetest.register_node("default:steelblock", {
+       description = "Steel Block",
+       tile_images = {"default_steel_block.png"},
+       is_ground_content = true,
+       material = minetest.digprop_stonelike(5.0),
+})
+
+minetest.register_node("default:nyancat", {
+       description = "Nyancat",
+       tile_images = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png",
+               "default_nc_side.png", "default_nc_back.png", "default_nc_front.png"},
+       inventory_image = "default_nc_front.png",
+       paramtype2 = "facedir",
+       material = minetest.digprop_stonelike(3.0),
+       legacy_facedir_simple = true,
+})
+
+minetest.register_node("default:nyancat_rainbow", {
+       description = "Nyancat Rainbow",
+       tile_images = {"default_nc_rb.png"},
+       inventory_image = "default_nc_rb.png",
+       material = minetest.digprop_stonelike(3.0),
+})
+
+minetest.register_node("default:sapling", {
+       description = "Sapling",
+       drawtype = "plantlike",
+       visual_scale = 1.0,
+       tile_images = {"default_sapling.png"},
+       inventory_image = "default_sapling.png",
+       wield_image = "default_sapling.png",
+       paramtype = "light",
+       walkable = false,
+       material = minetest.digprop_constanttime(0.0),
+})
+
+minetest.register_node("default:apple", {
+       description = "Apple",
+       drawtype = "plantlike",
+       visual_scale = 1.0,
+       tile_images = {"default_apple.png"},
+       inventory_image = "default_apple.png",
+       paramtype = "light",
+       sunlight_propagates = true,
+       walkable = false,
+       material = minetest.digprop_constanttime(0.0),
+       on_use = minetest.item_eat(4),
+})
+
+--
+-- Crafting items
+--
+
+minetest.register_craftitem("default:stick", {
+       description = "Stick",
+       inventory_image = "default_stick.png",
+})
+
+minetest.register_craftitem("default:paper", {
+       description = "Paper",
+       inventory_image = "default_paper.png",
+})
+
+minetest.register_craftitem("default:book", {
+       description = "Book",
+       inventory_image = "default_book.png",
+})
+
+minetest.register_craftitem("default:coal_lump", {
+       description = "Lump of coal",
+       inventory_image = "default_coal_lump.png",
+})
+
+minetest.register_craftitem("default:iron_lump", {
+       description = "Lump of iron",
+       inventory_image = "default_iron_lump.png",
+})
+
+minetest.register_craftitem("default:clay_lump", {
+       description = "Lump of clay",
+       inventory_image = "default_clay_lump.png",
+})
+
+minetest.register_craftitem("default:steel_ingot", {
+       description = "Steel ingot",
+       inventory_image = "default_steel_ingot.png",
+})
+
+minetest.register_craftitem("default:clay_brick", {
+       description = "Clay brick",
+       inventory_image = "default_steel_ingot.png",
+       inventory_image = "default_clay_brick.png",
+})
+
+minetest.register_craftitem("default:scorched_stuff", {
+       description = "Scorched stuff",
+       inventory_image = "default_scorched_stuff.png",
+})
+
+--
+-- Creative inventory
+--
+
+minetest.add_to_creative_inventory('default:pick_mese')
+minetest.add_to_creative_inventory('default:pick_steel')
+minetest.add_to_creative_inventory('default:axe_steel')
+minetest.add_to_creative_inventory('default:shovel_steel')
+
+minetest.add_to_creative_inventory('default:torch')
+minetest.add_to_creative_inventory('default:cobble')
+minetest.add_to_creative_inventory('default:dirt')
+minetest.add_to_creative_inventory('default:stone')
+minetest.add_to_creative_inventory('default:sand')
+minetest.add_to_creative_inventory('default:sandstone')
+minetest.add_to_creative_inventory('default:clay')
+minetest.add_to_creative_inventory('default:brick')
+minetest.add_to_creative_inventory('default:tree')
+minetest.add_to_creative_inventory('default:wood')
+minetest.add_to_creative_inventory('default:leaves')
+minetest.add_to_creative_inventory('default:cactus')
+minetest.add_to_creative_inventory('default:papyrus')
+minetest.add_to_creative_inventory('default:bookshelf')
+minetest.add_to_creative_inventory('default:glass')
+minetest.add_to_creative_inventory('default:fence')
+minetest.add_to_creative_inventory('default:rail')
+minetest.add_to_creative_inventory('default:mese')
+minetest.add_to_creative_inventory('default:chest')
+minetest.add_to_creative_inventory('default:furnace')
+minetest.add_to_creative_inventory('default:sign_wall')
+minetest.add_to_creative_inventory('default:water_source')
+minetest.add_to_creative_inventory('default:lava_source')
+minetest.add_to_creative_inventory('default:ladder')
+
+--
+-- Some common functions
+--
+
+default.falling_node_names = {}
+
+function nodeupdate_single(p)
+       n = minetest.env:get_node(p)
+       if default.falling_node_names[n.name] ~= nil then
+               p_bottom = {x=p.x, y=p.y-1, z=p.z}
+               n_bottom = minetest.env:get_node(p_bottom)
+               if n_bottom.name == "air" then
+                       minetest.env:remove_node(p)
+                       minetest.env:add_entity(p, "default:falling_"..n.name)
+                       nodeupdate(p)
+               end
+       end
+end
+
+function nodeupdate(p)
+       for x = -1,1 do
+       for y = -1,1 do
+       for z = -1,1 do
+               p2 = {x=p.x+x, y=p.y+y, z=p.z+z}
+               nodeupdate_single(p2)
+       end
+       end
+       end
+end
+
+--
+-- Falling stuff
+--
+
+function default.register_falling_node(nodename, texture)
+       default.falling_node_names[nodename] = true
+       -- Override naming conventions for stuff like :default:falling_default:sand
+       minetest.register_entity(":default:falling_"..nodename, {
+               -- Static definition
+               physical = true,
+               collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
+               visual = "cube",
+               textures = {texture,texture,texture,texture,texture,texture},
+               -- State
+               -- Methods
+               on_step = function(self, dtime)
+                       -- Set gravity
+                       self.object:setacceleration({x=0, y=-10, z=0})
+                       -- Turn to actual sand when collides to ground or just move
+                       local pos = self.object:getpos()
+                       local bcp = {x=pos.x, y=pos.y-0.7, z=pos.z} -- Position of bottom center point
+                       local bcn = minetest.env:get_node(bcp)
+                       if bcn.name ~= "air" then
+                               -- Turn to a sand node
+                               local np = {x=bcp.x, y=bcp.y+1, z=bcp.z}
+                               minetest.env:add_node(np, {name=nodename})
+                               self.object:remove()
+                       else
+                               -- Do nothing
+                       end
+               end
+       })
+end
+
+default.register_falling_node("default:sand", "default_sand.png")
+default.register_falling_node("default:gravel", "default_gravel.png")
+
+--
+-- Global callbacks
+--
+
+-- Global environment step function
+function on_step(dtime)
+       -- print("on_step")
+end
+minetest.register_globalstep(on_step)
+
+function on_placenode(p, node)
+       --print("on_placenode")
+       nodeupdate(p)
+end
+minetest.register_on_placenode(on_placenode)
+
+function on_dignode(p, node)
+       --print("on_dignode")
+       nodeupdate(p)
+end
+minetest.register_on_dignode(on_dignode)
+
+function on_punchnode(p, node)
+end
+minetest.register_on_punchnode(on_punchnode)
+
+local function handle_give_command(cmd, giver, receiver, stackstring)
+       if not minetest.get_player_privs(giver)["give"] then
+               minetest.chat_send_player(giver, "error: you don't have permission to give")
+               return
+       end
+       minetest.debug("DEBUG: "..cmd..' invoked, stackstring="'..stackstring..'"')
+       minetest.log(cmd..' invoked, stackstring="'..stackstring..'"')
+       local itemstack = ItemStack(stackstring)
+       if itemstack:is_empty() then
+               minetest.chat_send_player(giver, 'error: cannot give an empty item')
+               return
+       elseif not itemstack:is_known() then
+               minetest.chat_send_player(giver, 'error: cannot give an unknown item')
+               return
+       end
+       local receiverref = minetest.env:get_player_by_name(receiver)
+       if receiverref == nil then
+               minetest.chat_send_player(giver, receiver..' is not a known player')
+               return
+       end
+       local leftover = receiverref:get_inventory():add_item("main", itemstack)
+       if leftover:is_empty() then
+               partiality = ""
+       elseif leftover:get_count() == itemstack:get_count() then
+               partiality = "could not be "
+       else
+               partiality = "partially "
+       end
+       if giver == receiver then
+               minetest.chat_send_player(giver, '"'..stackstring
+                       ..'" '..partiality..'added to inventory.');
+       else
+               minetest.chat_send_player(giver, '"'..stackstring
+                       ..'" '..partiality..'added to '..receiver..'\'s inventory.');
+               minetest.chat_send_player(receiver, '"'..stackstring
+                       ..'" '..partiality..'added to inventory.');
+       end
+end
+
+minetest.register_on_chat_message(function(name, message)
+       --print("default on_chat_message: name="..dump(name).." message="..dump(message))
+       local cmd = "/giveme"
+       if message:sub(0, #cmd) == cmd then
+               local stackstring = string.match(message, cmd.." (.*)")
+               if stackstring == nil then
+                       minetest.chat_send_player(name, 'usage: '..cmd..' stackstring')
+                       return true -- Handled chat message
+               end
+               handle_give_command(cmd, name, name, stackstring)
+               return true
+       end
+       local cmd = "/give"
+       if message:sub(0, #cmd) == cmd then
+               local receiver, stackstring = string.match(message, cmd.." ([%a%d_-]+) (.*)")
+               if receiver == nil or stackstring == nil then
+                       minetest.chat_send_player(name, 'usage: '..cmd..' name stackstring')
+                       return true -- Handled chat message
+               end
+               handle_give_command(cmd, name, receiver, stackstring)
+               return true
+       end
+       local cmd = "/spawnentity"
+       if message:sub(0, #cmd) == cmd then
+               if not minetest.get_player_privs(name)["give"] then
+                       minetest.chat_send_player(name, "you don't have permission to spawn (give)")
+                       return true -- Handled chat message
+               end
+               if not minetest.get_player_privs(name)["interact"] then
+                       minetest.chat_send_player(name, "you don't have permission to interact")
+                       return true -- Handled chat message
+               end
+               local entityname = string.match(message, cmd.." (.*)")
+               if entityname == nil then
+                       minetest.chat_send_player(name, 'usage: '..cmd..' entityname')
+                       return true -- Handled chat message
+               end
+               print(cmd..' invoked, entityname="'..entityname..'"')
+               local player = minetest.env:get_player_by_name(name)
+               if player == nil then
+                       print("Unable to spawn entity, player is nil")
+                       return true -- Handled chat message
+               end
+               local p = player:getpos()
+               p.y = p.y + 1
+               minetest.env:add_entity(p, entityname)
+               minetest.chat_send_player(name, '"'..entityname
+                               ..'" spawned.');
+               return true -- Handled chat message
+       end
+       local cmd = "/pulverize"
+       if message:sub(0, #cmd) == cmd then
+               local player = minetest.env:get_player_by_name(name)
+               if player == nil then
+                       print("Unable to pulverize, player is nil")
+                       return true -- Handled chat message
+               end
+               if player:get_wielded_item():is_empty() then
+                       minetest.chat_send_player(name, 'Unable to pulverize, no item in hand.')
+               else
+                       player:set_wielded_item(nil)
+                       minetest.chat_send_player(name, 'An item was pulverized.')
+               end
+               return true
+       end
+end)
+
+--M13 Blocks--
+---nodes---
+minetest.register_node("default:m13", {
+       description = "M13 Block",
+       tile_images = {"m13.png"},
+       is_ground_content = true,
+       material = minetest.digprop_stonelike(1.00),
+})
+---crafting---
+minetest.register_craft({
+       output = 'default:m13',
+       recipe = {
+               {'default:mese'},
+               {'default:mese'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:m13_pick',
+       recipe = {
+               {'default:m13', 'default:m13', 'default:m13'},
+               {'', 'default:stick', ''},
+               {'', 'default:stick', ''},
+       }
+})
+
+---tools---
+
+minetest.register_tool("default:m13_pick", {
+       image = "m13_pick.png",
+       basetime = 0,
+       dt_weight = 0,
+       dt_crackiness = 0,
+       dt_crumbliness = 0,
+       dt_cuttability = 0,
+       basedurability = 3000,
+       dd_weight = 0,
+       dd_crackiness = 0,
+       dd_crumbliness = 0,
+       dd_cuttability = 0,
+})
+
+--Jungle Tree can be Crafted into wood!--
+minetest.register_craft({
+       output = 'default:wood 4' ,
+       recipe = {
+               {'default:jungletree'},
+       }
+})
+
+-- Wool --
+
+minetest.register_craft({
+       output = 'default:red 16',
+       recipe = {
+               {'default:apple', 'default:white'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:yellow 16',
+       recipe = {
+               {'default:sand', 'default:white'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:white 16',
+       recipe = {
+               {'default:coal_lump', 'default:sand'},
+       }
+})
+
+
+minetest.register_craft({
+       output = 'default:black 16',
+       recipe = {
+               {'default:coal_lump', 'default:grey'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:grey 16',
+       recipe = {
+               {'default:coal_lump', 'default:white'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:green 16',
+       recipe = {
+               {'default:leaves', 'default:white'},
+       }
+})
+
+
+minetest.register_craft({
+       output = 'default:brown 16',
+       recipe = {
+               {'default:dirt', 'default:white'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:cyan 16',
+       recipe = {
+               {'default:jungletree', 'default:white'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:magenta 16',
+       recipe = {
+               {'default:cyan', 'default:red'},
+       }
+})
+
+minetest.register_craft({
+       output = 'default:blue 16',
+       recipe = {
+               {'default:cyan', 'default:magenta'},
+       }
+})
+
+
+minetest.register_craft({
+       output = 'default:orange 16',
+       recipe = {
+               {'default:yellow', 'default:red'},
+       }
+})
+
+
+minetest.register_node("default:cyan", {
+       description = "Cyan",
+       tile_images = {"colour_cyan.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+minetest.register_node("default:red", {
+       description = "Red",
+       tile_images = {"colour_red.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+minetest.register_node("default:magenta", {
+       description = "Magenta",
+       tile_images = {"colour_magenta.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+minetest.register_node("default:white", {
+       description = "White",
+       tile_images = {"colour_white.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+minetest.register_node("default:blue", {
+       description = "Blue",
+       tile_images = {"colour_blue.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+minetest.register_node("default:yellow", {
+       description = "Yellow",
+       tile_images = {"colour_yellow.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+minetest.register_node("default:grey", {
+       description = "Grey",
+       tile_images = {"colour_grey.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+minetest.register_node("default:black", {
+       description = "Black",
+       tile_images = {"colour_black.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+minetest.register_node("default:green", {
+       description = "Green",
+       tile_images = {"colour_green.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+minetest.register_node("default:brown", {
+       description = "Brown",
+       tile_images = {"colour_brown.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+
+minetest.register_node("default:orange", {
+       description = "Orange",
+       tile_images = {"colour_orange.png"},
+       is_ground_content = true,
+       material = minetest.digprop_woodlike(0.25),
+})
+
+-- bucket (Minetest 0.4 mod)
+
+minetest.register_alias("bucket", "bucket:bucket_empty")
+minetest.register_alias("bucket_water", "bucket:bucket_water")
+minetest.register_alias("bucket_lava", "bucket:bucket_lava")
+
+minetest.register_craft({
+       output = 'bucket:bucket_empty 1',
+       recipe = {
+               {'default:steel_ingot', '', 'default:steel_ingot'},
+               {'', 'default:steel_ingot', ''},
+       }
+})
+
+bucket = {}
+bucket.liquids = {}
+
+-- Register a new liquid
+--   source = name of the source node
+--   flowing = name of the flowing node
+--   itemname = name of the new bucket item (or nil if liquid is not takeable)
+--   inventory_image = texture of the new bucket item (ignored if itemname == nil)
+-- This function can be called from any mod (that depends on bucket).
+function bucket.register_liquid(source, flowing, itemname, inventory_image)
+       bucket.liquids[source] = {
+               source = source,
+               flowing = flowing,
+               itemname = itemname,
+       }
+       bucket.liquids[flowing] = bucket.liquids[source]
+
+       if itemname ~= nil then
+               minetest.register_craftitem(itemname, {
+                       inventory_image = inventory_image,
+                       stack_max = 1,
+                       liquids_pointable = true,
+                       on_use = function(itemstack, user, pointed_thing)
+                               -- Must be pointing to node
+                               if pointed_thing.type ~= "node" then
+                                       return
+                               end
+                               -- Check if pointing to a liquid
+                               n = minetest.env:get_node(pointed_thing.under)
+                               if bucket.liquids[n.name] == nil then
+                                       -- Not a liquid
+                                       minetest.env:add_node(pointed_thing.above, {name=source})
+                               elseif n.name ~= source then
+                                       -- It's a liquid
+                                       minetest.env:add_node(pointed_thing.under, {name=source})
+                               end
+                               return {name="bucket:bucket_empty"}
+                       end
+               })
+       end
+end
+
+minetest.register_craftitem("bucket:bucket_empty", {
+       inventory_image = "bucket.png",
+       stack_max = 1,
+       liquids_pointable = true,
+       on_use = function(itemstack, user, pointed_thing)
+               -- Must be pointing to node
+               if pointed_thing.type ~= "node" then
+                       return
+               end
+               -- Check if pointing to a liquid source
+               n = minetest.env:get_node(pointed_thing.under)
+               liquiddef = bucket.liquids[n.name]
+               if liquiddef ~= nil and liquiddef.source == n.name and liquiddef.itemname ~= nil then
+                       minetest.env:add_node(pointed_thing.under, {name="air"})
+                       return {name=liquiddef.itemname}
+               end
+       end,
+})
+
+bucket.register_liquid(
+       "default:water_source",
+       "default:water_flowing",
+       "bucket:bucket_water",
+       "bucket_water.png"
+)
+
+bucket.register_liquid(
+       "default:lava_source",
+       "default:lava_flowing",
+       "bucket:bucket_lava",
+       "bucket_lava.png"
+)
+
+minetest.register_craft({
+       type = "fuel",
+       recipe = "default:bucket_lava",
+       burntime = 60,
+})
+
+--Ropes--
+
+minetest.register_on_placenode(function(pos, newnode, placer)
+       if newnode.name == "default:rope" then
+           place_rope(pos, newnode, placer)
+       end
+    end
+)
+
+minetest.register_on_dignode(function(pos, oldnode, digger)
+       if oldnode.name == "default:rope" then
+           remove_rope(pos, oldnode, digger, true)
+        end
+    end
+)
+
+minetest.register_on_punchnode(function(pos, oldnode, digger)
+       if oldnode.name == "default:rope" then
+           remove_rope(pos, oldnode, digger, false)
+        end
+    end
+)
+
+-- helper function
+inventory_find_item = function (object, name, item)
+    local inventory = object:inventory_get_list(name)
+    for key, value in pairs(inventory) do
+       if value == item then
+           return key, value
+       end
+    end
+    return nil, nil
+end
+
+place_rope = function (pos, newnode, placer)
+    local inventory = placer:inventory_get_list("main")
+    local witem = placer:get_wielded_itemstring()
+    local windex, witem = inventory_find_item(placer, "main", witem)
+    local param2 = newnode.param2
+    while witem ~= nil and witem:len() ~= 0 do
+       pos.y = pos.y - 1
+       if minetest.env:get_node(pos).name ~= "air" then
+           break
+       end
+       if minetest.env:add_node(pos, {name="default:rope", param2=param2}) ~= true
+       then
+           break
+       end
+       witem = stackstring_take_item(witem)
+    end
+    if windex == nil then
+    else
+        inventory[windex] = witem
+       placer:inventory_set_list("main", inventory)
+    end
+end
+
+remove_rope = function(pos, oldnode, digger, completely)
+    local num = 0
+    local below = pos
+    local above = pos
+    if completely == true then
+       above.y = above.y + 1
+       while minetest.env:get_node(above).name == "default:rope" do
+           minetest.env:remove_node(above)
+           above.y = above.y + 1
+           num = num + 1
+       end
+    end
+    below.y = below.y - 1
+    while minetest.env:get_node(below).name == "default:rope" do
+       minetest.env:remove_node(below)
+       below.y = below.y -1
+       num = num + 1
+    end
+    if num ~= 0 then
+        digger:add_to_inventory_later('node "default:rope" ' .. num)
+    end
+    return true
+end
+
+minetest.register_craft({
+    output = 'default:rope 16',
+    recipe = {
+       {'', 'tree', ''},
+       {'', 'tree', ''},
+       {'', 'tree', ''},
+    }
+})
+
+minetest.register_node("default:rope", {
+    drawtype = "signlike",
+    tile_images = {"rope2.png"},
+    inventory_image = "rope2.png",
+    light_propagates = true,
+    paramtype = "light",
+    is_ground_content = true,
+    wall_mounted = true,
+    walkable = false,
+    climbable = true,
+    selection_box = {
+        type = "wallmounted",
+       --wall_top = = <default>
+       --wall_bottom = = <default>
+       --wall_side = = <default>
+    },
+    furnace_burntime = 5,
+    material = {
+       diggablity = "normal",
+       cuttability = 1.5,
+    },
+})
+
+--
+-- Done, print some random stuff
+--
+
+--print("minetest.registered_entities:")
+--dump2(minetest.registered_entities)
+
+-- END
diff --git a/doc/changelog.txt b/doc/changelog.txt
new file mode 100644 (file)
index 0000000..b27fc50
--- /dev/null
@@ -0,0 +1,147 @@
+Minetest-c55 changelog
+----------------------
+This should contain all the major changes.
+For minor stuff, refer to the commit log of the repository.
+
+0.3.1: (released on 2011-11-09)
+- Fix frustum culling (previous versions have rendered too much stuff that is not actually visible (about 180 degrees, while should have been more like 100.))
+- Add occlusion culling (improves performance a lot)
+- Add “3d clouds” on/off checkbox in main menu
+- Add “opaque water” on/off checkbox
+- Fix some random minor stuff
+- Turn mipmapping off (This makes far-away textures a bit noisier but better looking)
+- Add Command-line signal handler for Windows (contributed by SpeedProg)
+- Fix network layer segmentation fault introduced in 0.3.dev-20111021
+- Fix water-glass and water-lava and lava-glass surfaces
+
+0.3.0: (released on 2011-11-01)
+- Some small fixes
+0.3.dev-20111021:
+- Modify dungeon masters to only try to shoot players
+- Fix object duplication bug at block load/unload bug
+- Improve network layer
+0.3.dev-20111016:
+- Locked chest (contributed)
+- Server user limit setting (max_users)
+- Wielded tool is shown in HUD (contributed)
+- View bobbing (contributed)
+- Saplings that drop from leaf blocks and when placed on ground will grow to trees (contributed)
+- Optimized map saving (does not re-save everything all the time)
+- New mob system and new mob: dungeon master
+- Death/respawn screen
+
+0.2.20110922_3:
+- Fix the build for MSVC2010; also released for windows using MSVC2010.
+
+0.2.20110922_1:
+- Make client report a newer version number to the server than 2011-07-31 does and make server disallow old clients
+
+0.2.20110922:
+- Map is saved in an SQLite database file (by Queatz)
+- Ladders (MarkTraceur)
+- Lava
+- Apple trees (sfan5)
+- Slightly better looking inventory with transparency
+- /me chat command (Oblomov)
+- Using chosen map seed possible through fixed_map_seed configuration option (kahrl)
+- Fix the long-existed PeerNotFound loop bug
+- Some translations and localization-related fixes
+- Lots of small fixes
+
+2011-07-31_3:
+- Fixes a bug that made the server to deny non-empty passwords from players connecting the first time
+
+2011-07-31_2:
+- Fixes a bug that caused the server to always read an empty password from the client when a client connected.
+
+2011-07-31:
+- A number of small fixes, build system stuff and such (refer to version control log)
+- Map generator no longer crashes at generation limit
+- Fixed mapgen producing lots of cut-down trees
+- Some minor tweaks in map generator (some contributed)
+- Volumetric clouds (contributed)
+- Icon added (graphic contributed)
+- Key configuration menu (contributed)
+- Decorative blocks and items: bookshelf, sandstone, cactus, clay, brick, papyrus, rail, paper, book (contributed)
+- Jungles!
+- Hotbar is a bit smaller
+- Health is now enabled by default; You can now eat cooked rats to heal yourself.
+- Finally added sword textures, altough sword is still of no use
+- Creative mode now preserves normal mode inventory
+
+2011-07-04:
+- Many small fixes
+- Code reorganizing to aid further development
+- Renewed map generator
+
+2011-06-02:
+- Password crash on windows fixed
+- Optimized server CPU usage a lot
+- Furnaces now work also while players are not near to them
+
+2011-05-29:
+- Optimized smooth lighting
+- A number of small fixes
+- Added clouds and simple skyboxes
+- The glass block added
+- Added key configuration to config file
+- Player privileges on server
+- Slightly updated map format
+- Player passwords
+- All textures first searched from texture_path
+- Map directory ("map") has been renamed to "world" (just rename it to load an old world)
+- Mouse inversion (invert_mouse)
+- Grass doesn't grow immediately anymore
+- Fence added
+
+2011-04-24:
+- Smooth lighting with simple ambient occlusion
+- Updated main menu
+
+2011-04-23_0_test:
+- Small bug fixes
+- Item drop multiplication fixed
+- HP added
+- Added A simple monster which spawns to dark places at map generation time
+- Some code refactoring and cleaning (possibly new bugs)
+
+2011-04-11:
+- Fixed crafting a bit
+
+2011-04-10_0:
+- Asynchronous map generation
+- New object system
+
+2011-04-06:
+- Mesh update of node addition/removal is now done asynchronously on client, removing frametime spike
+- Node addition/removal is sent directly only to clients that are closer than 100 nodes to the modification. For the others, the modified blocks are set unsent. (and are re-sent when applicable)
+
+2011-04-05:
+- Made furnace usable
+- Added cobblestone
+- Added wood, stone and steel tools: pickaxes, shovels and axes
+- Incremented to version 0.0.2
+
+2011-04-04:
+- Cleaned client to be completely synchronous, except for the mesh calculation, which is now done with queues in a separate thread.
+- Added node metadata support
+- Added chests
+
+2011-02-17:
+- Added better handling of textures. Now many file extensions are searched. Also too large textures are not put on the texture atlas, and the construction of the texture atlas is stopped when it is full.
+
+2011-02-16:
+- Better handling of Ctrl-C on POSIX systems
+
+2011-02-15:
+- Fixed a problem of not saving and loading the "lighting expired" value of MapBlocks properly. This caused high server CPU usage.
+- Ctrl-C handling on POSIX systems
+- Added simple command support to server
+- Added settings enable_texture_atlas and texture_path
+
+2011-02-14:
+- Created changelog.txt
+- Added sneaking/crouching
+- Modified the looks of the hotbar and cleaned code
+- Added code to allow generating 3D cube images for inventory
+
diff --git a/doc/gpl-2.0.txt b/doc/gpl-2.0.txt
new file mode 100644 (file)
index 0000000..d159169
--- /dev/null
@@ -0,0 +1,339 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 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.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, 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 or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+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 give any other recipients of the Program a copy of this License
+along with the Program.
+
+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 Program or any portion
+of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+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 Program, 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 Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) 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; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, 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 executable.  However, as a
+special exception, the source code 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.
+
+If distribution of executable or 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 counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program 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.
+
+  5. 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 Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program 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 to
+this License.
+
+  7. 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 Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program 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 Program.
+
+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.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program 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.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the 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 Program
+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 Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, 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
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), 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 Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  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 program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 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 General Public License for more details.
+
+    You should have received a copy of the GNU 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.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/doc/mapformat.txt b/doc/mapformat.txt
new file mode 100644 (file)
index 0000000..206f5f3
--- /dev/null
@@ -0,0 +1,94 @@
+I'll try to quickly document the newest block format in here (might contain
+errors). Refer to the mapgen or minetestmapper script for the directory
+structure and file naming. There are two sector namings possible,
+sector/XXXXZZZZ and sector/XXX/ZZZ.
+
+There also exists files map_meta.txt and chunk_meta, that are used by the
+generator. If they are not found or invalid, the generator will currently
+behave quite strangely.
+
+The MapBlock file format (sectors2/XXX/ZZZ/YYYY):
+-------------------------------------------------
+
+NOTE: Byte order is MSB first.
+
+u8 version
+- map format version number, this one is version 17
+
+u8 flags
+- Flag bitmasks:
+  - 0x01: is_underground: Should be set to 0 if there will be no light
+    obstructions above the block. If/when sunlight of a block is updated and
+       there is no block above it, this value is checked for determining whether
+       sunlight comes from the top.
+  - 0x02: day_night_differs: Whether the lighting of the block is different on
+    day and night. Only blocks that have this bit set are updated when day
+       transforms to night.
+  - 0x04: lighting_expired: If true, lighting is invalid and should be updated.
+    If you can't calculate lighting in your generator properly, you could try
+       setting this 1 to everything and setting the uppermost block in every
+       sector as is_underground=0. I am quite sure it doesn't work properly,
+       though.
+
+zlib-compressed map data:
+- content:
+  u8[4096]: content types
+  u8[4096]: param1 values
+  u8[4096]: param2 values
+
+zlib-compressed node metadata
+- content:
+  u16 version (=1)
+  u16 count of metadata
+  foreach count:
+    u16 position (= p.Z*MAP_BLOCKSIZE*MAP_BLOCKSIZE + p.Y*MAP_BLOCKSIZE + p.X)
+       u16 type_id
+       u16 content_size
+       u8[content_size] misc. stuff contained in the metadata
+
+u16 mapblockobject_count
+- always write as 0.
+- if read != 0, just fail.
+
+foreach mapblockobject_count:
+  - deprecated, should not be used. Length of this data can only be known by
+    properly parsing it. Just hope not to run into any of this.
+
+u8 static object version:
+- currently 0
+
+u16 static_object_count
+
+foreach static_object_count:
+  u8 type (object type-id)
+  s32 pos_x * 1000
+  s32 pos_y * 1000
+  s32 pos_z * 1000
+  u16 data_size
+  u8[data_size] data
+
+u32 timestamp
+- Timestamp when last saved, as seconds from starting the game.
+- 0xffffffff = invalid/unknown timestamp, nothing will be done with the time
+               difference when loaded (recommended)
+
+Node metadata format:
+---------------------
+
+Sign metadata:
+  u16 string_len
+  u8[string_len] string
+
+Furnace metadata:
+  TBD
+
+Chest metadata:
+  TBD
+
+Locking Chest metadata:
+  u16 string_len
+  u8[string_len] string
+  TBD
+
+// END
+
diff --git a/doc/protocol.txt b/doc/protocol.txt
new file mode 100644 (file)
index 0000000..82dca59
--- /dev/null
@@ -0,0 +1,72 @@
+Minetest-c55 protocol (incomplete, early draft):
+Updated 2011-06-18
+
+A custom protocol over UDP.
+Integers are big endian.
+Refer to connection.{h,cpp} for further reference.
+
+Initialization:
+- A dummy reliable packet with peer_id=PEER_ID_INEXISTENT=0 is sent to the server:
+       - Actually this can be sent without the reliable packet header, too, i guess,
+         but the sequence number in the header allows the sender to re-send the
+         packet without accidentally getting a double initialization.
+       - Packet content:
+               # Basic header
+               u32 protocol_id = PROTOCOL_ID = 0x4f457403
+               u16 sender_peer_id = PEER_ID_INEXISTENT = 0
+               u8 channel = 0
+               # Reliable packet header
+               u8 type = TYPE_RELIABLE = 3
+               u16 seqnum = SEQNUM_INITIAL = 65500
+               # Original packet header
+               u8 type = TYPE_ORIGINAL = 1
+               # And no actual payload.
+- Server responds with something like this:
+       - Packet content:
+               # Basic header
+               u32 protocol_id = PROTOCOL_ID = 0x4f457403
+               u16 sender_peer_id = PEER_ID_INEXISTENT = 0
+               u8 channel = 0
+               # Reliable packet header
+               u8 type = TYPE_RELIABLE = 3
+               u16 seqnum = SEQNUM_INITIAL = 65500
+               # Control packet header
+               u8 type = TYPE_CONTROL = 0
+               u8 controltype = CONTROLTYPE_SET_PEER_ID = 1
+               u16 peer_id_new = assigned peer id to client (other than 0 or 1)
+- Then the connection can be disconnected by sending:
+       - Packet content:
+               # Basic header
+               u32 protocol_id = PROTOCOL_ID = 0x4f457403
+               u16 sender_peer_id = whatever was gotten in CONTROLTYPE_SET_PEER_ID
+               u8 channel = 0
+               # Control packet header
+               u8 type = TYPE_CONTROL = 0
+               u8 controltype = CONTROLTYPE_DISCO = 3
+
+- Here's a quick untested connect-disconnect done in PHP:
+# host: ip of server (use gethostbyname(hostname) to get from a dns name)
+# port: port of server
+function check_if_minetestserver_up($host, $port)
+{
+       $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+       $timeout = array("sec" => 1, "usec" => 0);
+       socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, $timeout);
+       $buf = "\x4f\x45\x74\x03\x00\x00\x00\x03\xff\xdc\x01";
+       socket_sendto($socket, $buf, strlen($buf), 0, $host, $port);
+       $buf = socket_read($socket, 1000);
+       if($buf != "")
+       {
+               # We got a reply! read the peer id from it.
+               $peer_id = substr($buf, 9, 2);
+               
+               # Disconnect
+               $buf = "\x4f\x45\x74\x03".$peer_id."\x00\x00\x03";
+               socket_sendto($socket, $buf, strlen($buf), 0, $host, $port);
+               socket_close($socket);
+               
+               return true;
+       }
+       return false;
+}
+
diff --git a/minetest.conf~ b/minetest.conf~
new file mode 100644 (file)
index 0000000..e454d9b
--- /dev/null
@@ -0,0 +1,9 @@
+address = 192.168.0.10
+creative_mode = 0
+enable_3d_clouds = 0
+enable_damage = 1
+name = ubuntu2
+new_style_leaves = 0
+opaque_water = 0
+port = 30000
+smooth_lighting = 1
index d0e593da29f1879b172b55c56b8832743438be64..b64b5d82743b7e9ab55fc88a0bde07fed9a60e34 100644 (file)
@@ -1,6 +1,6 @@
-# German translations for minetest-m13 package.
+# German translations for minetest-c55 package.
 # Copyright (C) 2011 celeron
-# This file is distributed under the same license as the minetest-m13 package.
+# This file is distributed under the same license as the minetest-c55 package.
 # Frederik Helth <Guides@live.dk>, 2011.
 #
 msgid ""
index 328169856608cd1e834defa3fc7d133d7261fb92..4b22855a317f5b8b9dcabc2c99e3d54e7dafafa3 100644 (file)
@@ -1,6 +1,6 @@
-# German translations for minetest-m13 package.
+# German translations for minetest-c55 package.
 # Copyright (C) 2011 celeron
-# This file is distributed under the same license as the minetest-m13 package.
+# This file is distributed under the same license as the minetest-c55 package.
 # Constantin Wenger <constantin.wenger@googlemail.com>, 2011.
 #
 msgid ""
index a23ad42583aa99d81e79fb313c90d960dd0efe8a..52a02c2a713c852d4c4eac9499cbc0269e3d418b 100644 (file)
@@ -1,6 +1,6 @@
-# French translations for minetest-m13 package.
+# French translations for minetest-c55 package.
 # Copyright (C) 2011 celeron
-# This file is distributed under the same license as the minetest-m13 package.
+# This file is distributed under the same license as the minetest-c55 package.
 # Cyriaque 'Cisoun' Skrapits <cysoun@gmail.com>, 2011
 #
 msgid ""
index 080cf34b201296f71bdecd010ea273857522cb5d..c46ae61b2a980987a258e45895713f928e2a2bb2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 8bc7e4995fbe64efa3ca6f1a4c1ba27253129b37..7326a6042735acf9e64b23114ab11077aa07ae8f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 325a7a8c0d7366de1bfeed6dccf898d5539aaf12..6f176931a67e18ff187ca4ad37270ede95986c78 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 0408c8027355af063abd412971dee19791bfe95a..398976260cc3d33eab1632285836abce023970dc 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 0047d934544cd88b24083b50cf3a22eb6a82cd03..8fdcf4c6ae185f87a939b465ff9b28f9b41b56b4 100644 (file)
--- a/src/ban.h
+++ b/src/ban.h
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 85537d8f60fdc902a6f9f847ab014e8fa0cbd70e..066208569b1702cedaed7efbff1bc5f12714e6c1 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index bb7bffe39fdd24b479e8887b96d76bd9f15a4ff1..56c99d1014881a8ed1498d74ac7320ab196b039a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index b9c9cc1f623c8495541c451b8a789aa592674580..0463aa81c9cf5f47f56bdeefb469267465829d01 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 0cd060565085534ade5f26f32687cff17e27510d..efdf315f7d78c73bb2f2765c5b0fa9cc9a534493 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index e136d390a3019e72ec9f3b03818e790bb3922f83..93f3b1cca69fce3deb1176c8e00bb92db6efd440 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 885119dc88d52a44934d7d0955ff6a0711651476..2e1b850c74f51b271adb43c07e7ab05c2b7d5b0a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 9e3f4e6d89252770b068aec10f69608a3c843db3..acb4f85308f9ef6240933618694d963f07870cb6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 1af7aa8e556ca1de88465e72f0106f4c5a4021b0..23243659707bb8c56ddc2a9ce72f920d57d5e4f9 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 1b19aef63fcc793ed222a986385470021bda7da5..59861371efd221c5e84a663cd1603e6619b8dff3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index a943d801ea9ba5e0fb1f32cbb0a293beae826b54..3460b04fdb719f75072c444ae243f61a5957de0a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 1feeadf368990df350284da407fb4cf8d3d7a256..e823a08fefb978825e4fe76f24508a818d398163 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index bb8da62a3bfc029925c470c398a461c6e707281b..0a2ed0be1bc3db8ff0d5825637bb3ec3b37f082c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 8e72072e6e2754606924055bdfac4867403147c6..8f308c99fe1321860f431e68109b58b07e9f0594 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 0d07c195b7ac3e40a0a8d76f48f5c0101937cafc..6d26e2e35e8cc632450fe478468b0b851f2156df 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index d60dcb7765e2d9c3148e77f6a2e2d5c897f90025..a7cf1709b6ec036d864641616aecc02018f7b306 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 240fef395c3547ef26f418129d7ff4980307ae61..63867b78b6baff9b8e07f2e386fc66e72031b100 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index f9c907bdcbe4a5c3410fa78ecd91cf6682846cf4..4081512336953df4cb49f35b88c27587414d9bfc 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 08b4e887fd0945128fd26f7abe9343a880aaf5fd..809cfb032b78ac8b3380948ffbeecb5307b6f4ed 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index ba9de256f15aa4ab8a9c55099f860cf1496efe9c..6394bedbebe2af93b9c0c022a3979e57ba456334 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index ba94e0f5ce58e4427e0deb4fa6adcf299a2cb59c..dc1e1daed1e5045d74eed5ccb8877337f8e74161 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 35c5c29f90c57e2da2b6a1dc74fb0e173753f547..eaf74b142623fc65c6e1668725de50106a3ef89f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index c2463b8c0169ed784ac0b4980ff94c5a7397791f..ce7ee593f12cd1811f37fa4f1509a8678ab6ef73 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 2f370a8c375ec612f4d717d45b4091742026a023..003b7edd7e32e61551fb5fa8088f548e1b590fb3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index bc1f4deacee7fafbb9f20f48999dfe701493443a..9fb5450cfa42d42103dcae65b575c0eefaf662b8 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 6b72797f2617aa03ca699c0afb1afdb76a0998ba..6ce7a22be59d6d02ab34c3e11b7ba5337c624196 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index f2057631428a7abec8f7482598e20de9f0519bef..0b85e3cf14361d78adbdc7d51cbda58876864677 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 1a7a023b23d4069eb914767941dcf7204858c40f..02be64c64fd20b85fa1a5c5e2d724974abcd602f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index cead54d2f76ee992b8d4427d445b42ee08e6cf7c..f0c9cea9052c3a2a5fe2f582ec0c7f8bd1dcea0a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index df7150415fedf53ca31ce0b0d267ff1d4a6bd9f7..5bcbf6f941fdb5b4241d9a1655075183a3e1a2d0 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index d7a6864ab07ccce8259fe9d989c6fc375bb41b54..57f26f049ce4fd3e995ce6da9233335deb53ca07 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index df5d325d47ad7b4b9fc18a149ad904f57c2b636c..ad02c5110583c1c979e1773694a22d8acd6ab042 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index c6185b10d3c209540682c143eef00f9191b2cbef..5150758be13506d070b9ed8cca5bcd6ed4fd3f1b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 594e870d00d277cdd576c06df2d8f18c82e35d42..8c40314ced9a9fcf483a87a4d6c3dfef0add8ee9 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
diff --git a/src/defaultsettings.cpp~ b/src/defaultsettings.cpp~
new file mode 100644 (file)
index 0000000..1e48183
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+Minetest-c55
+Copyright (C) 2010 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 General Public License as published by
+the Free Software Foundation; either version 2 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 General Public License for more details.
+
+You should have received a copy of the GNU 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.
+*/
+
+#include "settings.h"
+
+void set_default_settings(Settings *settings)
+{
+       // Client and server
+
+       settings->setDefault("port", "");
+       settings->setDefault("name", "");
+       settings->setDefault("footprints", "false");
+
+       // Client stuff
+
+       settings->setDefault("keymap_forward", "KEY_KEY_W");
+       settings->setDefault("keymap_backward", "KEY_KEY_S");
+       settings->setDefault("keymap_left", "KEY_KEY_A");
+       settings->setDefault("keymap_right", "KEY_KEY_D");
+       settings->setDefault("keymap_jump", "KEY_SPACE");
+       settings->setDefault("keymap_sneak", "KEY_LSHIFT");
+       settings->setDefault("keymap_drop", "KEY_KEY_Q");
+       settings->setDefault("keymap_inventory", "KEY_KEY_I");
+       settings->setDefault("keymap_special1", "KEY_KEY_E");
+       settings->setDefault("keymap_chat", "KEY_KEY_T");
+       settings->setDefault("keymap_cmd", "/");
+       settings->setDefault("keymap_rangeselect", "KEY_KEY_R");
+       settings->setDefault("keymap_freemove", "KEY_KEY_K");
+       settings->setDefault("keymap_fastmove", "KEY_KEY_J");
+       settings->setDefault("keymap_frametime_graph", "KEY_F1");
+       settings->setDefault("keymap_screenshot", "KEY_F12");
+       settings->setDefault("keymap_toggle_profiler", "KEY_F2");
+       settings->setDefault("keymap_toggle_force_fog_off", "KEY_F3");
+       settings->setDefault("keymap_toggle_update_camera", "KEY_F4");
+       // Some (temporary) keys for debugging
+       settings->setDefault("keymap_print_debug_stacks", "KEY_KEY_P");
+
+       settings->setDefault("wanted_fps", "30");
+       settings->setDefault("fps_max", "60");
+       settings->setDefault("viewing_range_nodes_max", "300");
+       settings->setDefault("viewing_range_nodes_min", "15");
+       settings->setDefault("screenW", "800");
+       settings->setDefault("screenH", "600");
+       settings->setDefault("address", "");
+       settings->setDefault("random_input", "false");
+       settings->setDefault("client_unload_unused_data_timeout", "600");
+       settings->setDefault("enable_fog", "true");
+       settings->setDefault("fov", "72");
+       settings->setDefault("view_bobbing", "true");
+       settings->setDefault("new_style_water", "false");
+       settings->setDefault("new_style_leaves", "false");
+       settings->setDefault("smooth_lighting", "true");
+       settings->setDefault("frametime_graph", "false");
+       settings->setDefault("enable_texture_atlas", "true");
+       settings->setDefault("texture_path", "");
+       settings->setDefault("video_driver", "opengl");
+       settings->setDefault("free_move", "false");
+       settings->setDefault("continuous_forward", "false");
+       settings->setDefault("fast_move", "false");
+       settings->setDefault("invert_mouse", "false");
+       settings->setDefault("enable_farmesh", "false");
+       settings->setDefault("enable_clouds", "true");
+       settings->setDefault("screenshot_path", ".");
+       settings->setDefault("view_bobbing_amount", "1.0");
+       settings->setDefault("enable_3d_clouds", "false");
+       settings->setDefault("opaque_water", "false");
+
+       // Server stuff
+       // "map-dir" doesn't exist by default.
+       settings->setDefault("motd", "");
+       settings->setDefault("max_users", "20");
+       settings->setDefault("strict_protocol_version_checking", "true");
+       settings->setDefault("creative_mode", "false");
+       settings->setDefault("enable_damage", "true");
+       settings->setDefault("only_peaceful_mobs", "false");
+       settings->setDefault("fixed_map_seed", "");
+       settings->setDefault("give_initial_stuff", "false");
+       settings->setDefault("default_password", "");
+       settings->setDefault("default_privs", "build, shout");
+       settings->setDefault("unlimited_player_transfer_distance", "true");
+       settings->setDefault("enable_pvp", "true");
+
+       settings->setDefault("profiler_print_interval", "0");
+       settings->setDefault("enable_mapgen_debug_info", "false");
+       settings->setDefault("active_object_send_range_blocks", "3");
+       settings->setDefault("active_block_range", "2");
+       //settings->setDefault("max_simultaneous_block_sends_per_client", "1");
+       // This causes frametime jitter on client side, or does it?
+       settings->setDefault("max_simultaneous_block_sends_per_client", "2");
+       settings->setDefault("max_simultaneous_block_sends_server_total", "8");
+       settings->setDefault("max_block_send_distance", "7");
+       settings->setDefault("max_block_generate_distance", "5");
+       settings->setDefault("time_send_interval", "20");
+       settings->setDefault("time_speed", "96");
+       settings->setDefault("server_unload_unused_data_timeout", "29");
+       settings->setDefault("server_map_save_interval", "5.3");
+       settings->setDefault("full_block_send_enable_min_time_from_building", "2.0");
+       settings->setDefault("enable_experimental", "false");
+}
+
index 4f9164b0fb040625da2d3705cc6b72ebb6586759..c0bfcc69c20a0a16cd899f937f73c8aab400aac1 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 1f07742d3752fa06b15a4edd9a3e8b271b783e1a..7c2aef27208df1d1b439b7c366b23bfcbd0e0a5f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 619553f454e7fcd9901b843caeaa1225f4d4bea0..89c9fd67640a63771d1e955661bc4f26235f6e3b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 7bce60a1ca05f7f72dedebae42001b1b61957f0d..40a0db4aa86110e14f96dac38e0e085a7282a270 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 8379663a9764c95848dd62f6ef03a6140678ef90..fdc81057bc27fe52897fbf0282e984b748e74864 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Part of Minetest-m13
+Part of Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index cbf2510c1effa33305daef45df4d771a93e49fc8..0a30a8aefe348a000186f6f2213333c65ab13eb3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Part of Minetest-m13
+Part of Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 7c6efe1e24d6bffbcacee4581e0339f2734226f1..a65515d0351dc12f1a6e7236254922a652743cdb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
@@ -31,8 +31,8 @@ namespace fs
 #include <windows.h>
 #include <stdio.h>
 #include <malloc.h>
-#include <tchar.h>
-#include <wchar.h>
+#include <tchar.h> 
+#include <wchar.h> 
 #include <stdio.h>
 
 #define BUFSIZE MAX_PATH
@@ -71,13 +71,13 @@ std::vector<DirListNode> GetDirListing(std::string pathstring)
        // Find the first file in the directory.
        hFind = FindFirstFile(DirSpec, &FindFileData);
 
-       if (hFind == INVALID_HANDLE_VALUE)
+       if (hFind == INVALID_HANDLE_VALUE) 
        {
-         _tprintf (TEXT("Invalid file handle. Error is %u.\n"),
+         _tprintf (TEXT("Invalid file handle. Error is %u.\n"), 
                                GetLastError());
          retval = (-1);
-       }
-       else
+       } 
+       else 
        {
                // NOTE:
                // Be very sure to not include '..' in the results, it will
@@ -90,7 +90,7 @@ std::vector<DirListNode> GetDirListing(std::string pathstring)
                        listing.push_back(node);
 
                // List all the other files in the directory.
-               while (FindNextFile(hFind, &FindFileData) != 0)
+               while (FindNextFile(hFind, &FindFileData) != 0) 
                {
                        DirListNode node;
                        node.name = FindFileData.cFileName;
@@ -101,9 +101,9 @@ std::vector<DirListNode> GetDirListing(std::string pathstring)
 
                dwError = GetLastError();
                FindClose(hFind);
-               if (dwError != ERROR_NO_MORE_FILES)
+               if (dwError != ERROR_NO_MORE_FILES) 
                {
-                _tprintf (TEXT("FindNextFile error. Error is %u.\n"),
+                _tprintf (TEXT("FindNextFile error. Error is %u.\n"), 
                                   dwError);
                retval = (-1);
                goto Cleanup;
@@ -119,7 +119,7 @@ std::vector<DirListNode> GetDirListing(std::string pathstring)
        //for(unsigned int i=0; i<listing.size(); i++){
        //      std::cout<<listing[i].name<<(listing[i].dir?" (dir)":" (file)")<<std::endl;
        //}
-
+       
        return listing;
 }
 
@@ -143,7 +143,7 @@ bool RecursiveDelete(std::string path)
        std::cerr<<"Removing \""<<path<<"\""<<std::endl;
 
        //return false;
-
+       
        // This silly function needs a double-null terminated string...
        // Well, we'll just make sure it has at least two, then.
        path += "\0\0";
@@ -154,7 +154,7 @@ bool RecursiveDelete(std::string path)
        sfo.pFrom = path.c_str();
        sfo.pTo = NULL;
        sfo.fFlags = FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR;
-
+       
        int r = SHFileOperation(&sfo);
 
        if(r != 0)
@@ -166,7 +166,6 @@ bool RecursiveDelete(std::string path)
 
 #else // POSIX
 
-#include <unistd.h>
 #include <sys/types.h>
 #include <dirent.h>
 #include <errno.h>
@@ -255,11 +254,11 @@ bool RecursiveDelete(std::string path)
        /*
                Execute the 'rm' command directly, by fork() and execve()
        */
-
+       
        std::cerr<<"Removing \""<<path<<"\""<<std::endl;
 
        //return false;
-
+       
        pid_t child_pid = fork();
 
        if(child_pid == 0)
@@ -277,9 +276,9 @@ bool RecursiveDelete(std::string path)
 
                std::cerr<<"Executing '"<<argv[0]<<"' '"<<argv[1]<<"' '"
                                <<argv[2]<<"'"<<std::endl;
-
+               
                execv(argv[0], argv);
-
+               
                // Execv shouldn't return. Failed.
                _exit(1);
        }
index b8bd0e5d8a515908e29f73fc3deb947005564a0f..8bf43c3faf3de62a6eeb861216890f904659c373 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index d074cafa03f27c06bddb37c7f55f788a8a350a1b..47a0e6afe4002754ffb49d6faaeaa49690b2c1ea 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
@@ -917,7 +917,7 @@ void the_game(
 
        // First line of debug text
        gui::IGUIStaticText *guitext = guienv->addStaticText(
-                       L"Minetest-m13",
+                       L"Minetest-c55",
                        core::rect<s32>(5, 5, 795, 5+text_height),
                        false, false);
        // Second line of debug text
@@ -2116,7 +2116,7 @@ void the_game(
                        endscenetime_avg = endscenetime_avg * 0.95 + (float)endscenetime*0.05;
                        
                        char temptext[300];
-                       snprintf(temptext, 300, "Minetest-m13 %s ("
+                       snprintf(temptext, 300, "Minetest-c55 %s ("
                                        "R: range_all=%i"
                                        ")"
                                        " drawtime=%.0f, beginscenetime=%.0f"
index 19b0ff7a46fc8ab30b9ca49b81f2b96c59c2eb02..a9db6c3e1c6397bfab39d8c96c7ee72a07a82bed 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index d0360f53ba0182a719e88a96701d7babd44f6aef..10ab0b0bcfb57e4ecd9cc71516366ca81302d950 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index d0d2699d351dc332f1581b8b3f98acf3b03c5ecb..b195526d47a23782d32acd71a9cf58d91f1dff53 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 1ffd37e53bf8a566d693680fd58f52c04c3841f1..7a84126ea212afeaecbf8b074216f4ab1f70a163 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 14d76dfc8d22875b22a21b067ffdd52a28dc73ff..54cc49b0a4d8185bd897f7da9b3e95ae54b141cf 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index d84c827c9407e5469031bdc7930afab659b183b7..f3346090666bb05b72f87ae590e5b864437e19a5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 90f92b5be93bff2eda362fd143d259b3097e170c..ed8df88fc4a2744cd374ba4aa5d4e8ac40477c94 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 19217266fe4e8107d61009e1cded554aae76a435..01f583a0175dc8d79976079d5c62679b41aa8fd2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Minetest-m13
+ Minetest-c55
  Copyright (C) 2010-11 celeron55, Perttu Ahola <celeron55@gmail.com>
  Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
  Copyright (C) 2011 teddydestodes <derkomtur@schattengang.net>
index 052b2ea04e5a79e032d0b459cb0c9098ed3b10b6..a3d8b474351b1bfd8ee74884a766d2603ce0e48f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Minetest-m13
+ Minetest-c55
  Copyright (C) 2010-11 celeron55, Perttu Ahola <celeron55@gmail.com>
  Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
  Copyright (C) 2011 teddydestodes <derkomtur@schattengang.net>
index 83e7e543d44086430896c53d454fc1cf9bdab7c0..5c6104ca37063f8a6257bd8505af1fc7f1744829 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index c3df72054ec93cbd2e90f91f915376e6bc340ac0..ba2fc6be5e2329265edaad51112bcab603a17426 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 88fb55efa5c9e32469cbc909c383826625830c05..ff9316b8979b239332766be6e61993025ea618a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 14fe41c8a61c412df93a39db0ad214e603d80c00..82c40ce096a0247b15ad77f901c303fff184a79b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index f85b2bb01ae064415f11e11ff63b73c2c182b11a..ecae55e108c085c54b7a643c9bcbf7d4f01b90ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Part of Minetest-m13
+Part of Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
 
index 8449ad39048dcc8e787ddc831d7c8373aa302d2d..1748baadeafdedf010b65b0713046d8e1b1b48a0 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Part of Minetest-m13
+Part of Minetest-c55
 Copyright (C) 2010-11 celeron55, Perttu Ahola <celeron55@gmail.com>
 Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
 
index 5468df47071bfd47c038919b2836ae43a5cac5c1..3cd572387f24de92e02311c1af26d31008269437 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Minetest-m13\r
+Minetest-c55\r
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>\r
 \r
 This program is free software; you can redistribute it and/or modify\r
@@ -166,7 +166,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
 \r
                /*wchar_t text[200];\r
                swprintf(text, 200,\r
-                               L"Minetest-m13\n"\r
+                               L"Minetest-c55\n"\r
                                L"by Perttu Ahola\n"\r
                                L"celeron55@gmail.com\n\n"\r
                                SWPRINTF_CHARSTRING L"\n"\r
index 58d2edf15993ea14b36020aa09e2405c60fb308b..64e3c71f1d45a349aae990b25d1ab6fde1390476 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Minetest-m13\r
+Minetest-c55\r
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>\r
 \r
 This program is free software; you can redistribute it and/or modify\r
index 09a0227e9097fbfe9b98da336389fdc8f5e69ed9..364f69903290a07224d14802d999d2de1401aa2e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 0aaafacae2cf6840deeabfd57085069b9f4f62b1..2939cf654d916f0b74e2d897806dc65b6bd32890 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 60f2c6787c236d22b0880e8167da645c6af7b44f..056cf552d681da8c0059e9fc83024943a43049d4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 875454b05d08e0b530f2edf09eafb1cd840a4589..fcac5f647153cb9ecbf110ebe9888ac066610f67 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 1ca75aca5dd3d4577a872f9baceca661fcd8a1f7..b04a1c1777522aec1af58e6399d78c796d4dcb23 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index fc8e01685d2e0d865e265317a1a859299e055883..55e8f840215b9345e3b5e87f5aaecef28b139d32 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 6e604eaccc8633078ba6d4c0cd93a023db4b5268..67c96a653ca70f592bebea7aecc10ed2831336ef 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index c8dbd73d3afd63e35263e34b50b896bb78ca1f34..aa888bbdf20243a140b07c9ca7f4a9fa2b34bbb6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 Copyright (C) 2011 Kahrl <kahrl@gmx.net>
 
index ed01b1b6f727331cf04c302e7a44146576a36072..5a432591d7154bccd7072c75591fc6b789920513 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 Copyright (C) 2011 Kahrl <kahrl@gmx.net>
 
index 3d8fb80e1d10ab5ce28a975f6ed9eb506720b891..df2023074d3c56668f1486c05423ebeda2170109 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 9f97a6e94a20e7cf6efbdb4bc2bbe4538e7aa54f..28fb3f1fb86ccaf7ba7e3e85c0dd077b82407a65 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index dff4de22c3cd3f445a65db8c45e1743673458f08..f214d6ea06615f1c5512600e66ca80e395a99b35 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index e18a0d40ab362c63aa77887bc49c437ef52eef07..238acce43d2d73c52e0762f395e244c68a4ccb16 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index deaf637459122934f592a4e0371093d926a943fe..5798310962016ce7b42c46018030bfc8e59908ca 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 6c8f53f0a57d6b0bcb82ffc8835c7a3bf80b68cb..afbce57e92f541863cc3bd5ad20a756d2facd301 100644 (file)
--- a/src/log.h
+++ b/src/log.h
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 149ddcd726667a874e5cc6181a88536a796ba0eb..ffbaea409c5550ce6a53332ca648c9bf3fb9587e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 3a245fadea9cf1e5917d58682d829d2dafae19f2..40dc4de350f7053d40474ed9300e57b034770a38 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 394cc74d23f093164ea2f2a4ca587e3fd76b0c97..bc2871a94e34031dbacd95d947f201b4af31e8ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 37473eec564d403bdc2d4feee558cd8ba84d9c96..6cb9cf98419744493a2b017e440f5925d4dcabd3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
@@ -1480,7 +1480,7 @@ int main(int argc, char *argv[])
                                // (map at least?)
                                smgr->clear();
                                // Reset or hide the debug gui texts
-                               /*guitext->setText(L"Minetest-m13");
+                               /*guitext->setText(L"Minetest-c55");
                                guitext2->setVisible(false);
                                guitext_info->setVisible(false);
                                guitext_chat->setVisible(false);*/
index 1372a1b120ec36e12fba558e34efb0db6aed5737..0e353fce01e8edc60124b1755648949aea23a3fd 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 05a6f3cd91680f60948d40894d8201b6e1b471ca..11c74d958d54cd767ba6be7d13b25751e6ff5f17 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 92036af651511822f978903ddff2b29fb0a66242..c245242e8ec1358389a1e5da9b731bb4e1caf19c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
@@ -44,13 +44,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 /*
        SQLite format specification:
        - Initially only replaces sectors/ and sectors2/
-
+       
        If map.sqlite does not exist in the save dir
        or the block was not found in the database
        the map will try to load from sectors folder.
        In either case, map.sqlite will be created
        and all future saves will save there.
-
+       
        Structure of map.sqlite:
        Tables:
                blocks
@@ -113,14 +113,14 @@ MapSector * Map::getSectorNoGenerateNoExNoLock(v2s16 p)
                MapSector * sector = m_sector_cache;
                return sector;
        }
-
+       
        core::map<v2s16, MapSector*>::Node *n = m_sectors.find(p);
-
+       
        if(n == NULL)
                return NULL;
-
+       
        MapSector *sector = n->getValue();
-
+       
        // Cache the last result
        m_sector_cache_p = p;
        m_sector_cache = sector;
@@ -138,7 +138,7 @@ MapSector * Map::getSectorNoGenerate(v2s16 p)
        MapSector *sector = getSectorNoGenerateNoEx(p);
        if(sector == NULL)
                throw InvalidPositionException();
-
+       
        return sector;
 }
 
@@ -153,7 +153,7 @@ MapBlock * Map::getBlockNoCreateNoEx(v3s16 p3d)
 }
 
 MapBlock * Map::getBlockNoCreate(v3s16 p3d)
-{
+{      
        MapBlock *block = getBlockNoCreateNoEx(p3d);
        if(block == NULL)
                throw InvalidPositionException();
@@ -253,10 +253,10 @@ void Map::unspreadLight(enum LightBank bank,
                v3s16(0,-1,0), // bottom
                v3s16(-1,0,0), // left
        };
-
+       
        if(from_nodes.size() == 0)
                return;
-
+       
        u32 blockchangecount = 0;
 
        core::map<v3s16, u8> unlighted_nodes;
@@ -270,12 +270,12 @@ void Map::unspreadLight(enum LightBank bank,
        MapBlock *block = NULL;
        // Cache this a bit, too
        bool block_checked_in_modified = false;
-
+       
        for(; j.atEnd() == false; j++)
        {
                v3s16 pos = j.getNode()->getKey();
                v3s16 blockpos = getNodeBlockPos(pos);
-
+               
                // Only fetch a new block if the block position has changed
                try{
                        if(block == NULL || blockpos != blockpos_last){
@@ -789,7 +789,7 @@ void Map::updateLighting(enum LightBank bank,
 
                }
        }
-
+       
        /*
                Enable this to disable proper lighting for speeding up map
                generation for testing or whatever
@@ -1003,7 +1003,7 @@ void Map::addNodeAndUpdate(v3s16 p, MapNode n,
        /*
                Add intial metadata
        */
-
+       
        std::string metadata_name = nodemgr->get(n).metadata_name;
        if(metadata_name != ""){
                NodeMetadata *meta = NodeMetadata::create(metadata_name, m_gamedef);
@@ -1401,10 +1401,10 @@ void Map::timerUpdate(float dtime, float unload_timeout,
                core::list<v3s16> *unloaded_blocks)
 {
        bool save_before_unloading = (mapType() == MAPTYPE_SERVER);
-
+       
        // Profile modified reasons
        Profiler modprofiler;
-
+       
        core::list<v2s16> sector_deletion_queue;
        u32 deleted_blocks_count = 0;
        u32 saved_blocks_count = 0;
@@ -1422,14 +1422,14 @@ void Map::timerUpdate(float dtime, float unload_timeout,
 
                core::list<MapBlock*> blocks;
                sector->getBlocks(blocks);
-
+               
                for(core::list<MapBlock*>::Iterator i = blocks.begin();
                                i != blocks.end(); i++)
                {
                        MapBlock *block = (*i);
-
+                       
                        block->incrementUsageTimer(dtime);
-
+                       
                        if(block->getUsageTimer() > unload_timeout)
                        {
                                v3s16 p = block->getPos();
@@ -1464,10 +1464,10 @@ void Map::timerUpdate(float dtime, float unload_timeout,
                }
        }
        endSave();
-
+       
        // Finally delete the empty sectors
        deleteSectors(sector_deletion_queue);
-
+       
        if(deleted_blocks_count != 0)
        {
                PrintInfo(infostream); // ServerMap/ClientMap:
@@ -1521,7 +1521,7 @@ void Map::unloadUnusedData(float timeout,
                                i != blocks.end(); i++)
                {
                        MapBlock *block = (*i);
-
+                       
                        if(block->getUsageTimer() > timeout)
                        {
                                // Save if modified
@@ -1590,7 +1590,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
 
        // list of nodes that due to viscosity have not reached their max level height
        UniqueQueue<v3s16> must_reflow;
-
+       
        // List of MapBlocks that will require a lighting update (due to lava)
        core::map<v3s16, MapBlock*> lighting_modified_blocks;
 
@@ -1675,7 +1675,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
                                        }
                                        break;
                                case LIQUID_SOURCE:
-                                       // if this node is not (yet) of a liquid type, choose the first liquid type we encounter
+                                       // if this node is not (yet) of a liquid type, choose the first liquid type we encounter 
                                        if (liquid_kind == CONTENT_AIR)
                                                liquid_kind = nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing);
                                        if (nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing) != liquid_kind) {
@@ -2071,7 +2071,7 @@ void ServerMap::initBlockMake(mapgen::BlockMakeData *data, v3s16 blockpos)
        if(enable_mapgen_debug_info)
                infostream<<"initBlockMake(): ("<<blockpos.X<<","<<blockpos.Y<<","
                                <<blockpos.Z<<")"<<std::endl;
-
+       
        // Do nothing if not inside limits (+-1 because of neighbors)
        if(blockpos_over_limit(blockpos - v3s16(1,1,1)) ||
                blockpos_over_limit(blockpos + v3s16(1,1,1)))
@@ -2079,7 +2079,7 @@ void ServerMap::initBlockMake(mapgen::BlockMakeData *data, v3s16 blockpos)
                data->no_op = true;
                return;
        }
-
+       
        data->no_op = false;
        data->seed = m_seed;
        data->blockpos = blockpos;
@@ -2090,7 +2090,7 @@ void ServerMap::initBlockMake(mapgen::BlockMakeData *data, v3s16 blockpos)
        */
        {
                //TimeTaker timer("initBlockMake() create area");
-
+               
                for(s16 x=-1; x<=1; x++)
                for(s16 z=-1; z<=1; z++)
                {
@@ -2126,18 +2126,18 @@ void ServerMap::initBlockMake(mapgen::BlockMakeData *data, v3s16 blockpos)
                        }
                }
        }
-
+       
        /*
                Now we have a big empty area.
 
                Make a ManualMapVoxelManipulator that contains this and the
                neighboring blocks
        */
-
+       
        // The area that contains this block and it's neighbors
        v3s16 bigarea_blocks_min = blockpos - v3s16(1,1,1);
        v3s16 bigarea_blocks_max = blockpos + v3s16(1,1,1);
-
+       
        data->vmanip = new ManualMapVoxelManipulator(this);
        //data->vmanip->setMap(this);
 
@@ -2200,7 +2200,7 @@ MapBlock* ServerMap::finishBlockMake(mapgen::BlockMakeData *data,
                v3s16 p = data->transforming_liquid.pop_front();
                m_transforming_liquid.push_back(p);
        }
-
+       
        /*
                Get central block
        */
@@ -2278,7 +2278,7 @@ MapBlock* ServerMap::finishBlockMake(mapgen::BlockMakeData *data,
                }*/
 #endif
                updateLighting(lighting_update_blocks, changed_blocks);
-
+               
                /*
                        Set lighting to non-expired state in all of them.
                        This is cheating, but it is not fast enough if all of them
@@ -2324,7 +2324,7 @@ MapBlock* ServerMap::finishBlockMake(mapgen::BlockMakeData *data,
                Set central block as generated
        */
        block->setGenerated(true);
-
+       
        /*
                Save changed parts of map
                NOTE: Will be saved later.
@@ -2361,14 +2361,14 @@ ServerMapSector * ServerMap::createSector(v2s16 p2d)
        DSTACKF("%s: p2d=(%d,%d)",
                        __FUNCTION_NAME,
                        p2d.X, p2d.Y);
-
+       
        /*
                Check if it exists already in memory
        */
        ServerMapSector *sector = (ServerMapSector*)getSectorNoGenerateNoEx(p2d);
        if(sector != NULL)
                return sector;
-
+       
        /*
                Try to load it from disk (with blocks)
        */
@@ -2401,9 +2401,9 @@ ServerMapSector * ServerMap::createSector(v2s16 p2d)
        /*
                Generate blank sector
        */
-
+       
        sector = new ServerMapSector(this, p2d, m_gamedef);
-
+       
        // Sector position on map in nodes
        v2s16 nodepos2d = p2d * MAP_BLOCKSIZE;
 
@@ -2411,7 +2411,7 @@ ServerMapSector * ServerMap::createSector(v2s16 p2d)
                Insert to container
        */
        m_sectors.insert(p2d, sector);
-
+       
        return sector;
 }
 
@@ -2424,20 +2424,20 @@ MapBlock * ServerMap::generateBlock(
 )
 {
        DSTACKF("%s: p=(%d,%d,%d)", __FUNCTION_NAME, p.X, p.Y, p.Z);
-
+       
        /*infostream<<"generateBlock(): "
                        <<"("<<p.X<<","<<p.Y<<","<<p.Z<<")"
                        <<std::endl;*/
-
+       
        bool enable_mapgen_debug_info = g_settings->getBool("enable_mapgen_debug_info");
 
        TimeTaker timer("generateBlock");
-
+       
        //MapBlock *block = original_dummy;
-
+                       
        v2s16 p2d(p.X, p.Z);
        v2s16 p2d_nodes = p2d * MAP_BLOCKSIZE;
-
+       
        /*
                Do not generate over-limit
        */
@@ -2532,7 +2532,7 @@ MapBlock * ServerMap::createBlock(v3s16 p)
 {
        DSTACKF("%s: p=(%d,%d,%d)",
                        __FUNCTION_NAME, p.X, p.Y, p.Z);
-
+       
        /*
                Do not create over-limit
        */
@@ -2543,7 +2543,7 @@ MapBlock * ServerMap::createBlock(v3s16 p)
        || p.Z < -MAP_GENERATION_LIMIT / MAP_BLOCKSIZE
        || p.Z > MAP_GENERATION_LIMIT / MAP_BLOCKSIZE)
                throw InvalidPositionException("createBlock(): pos. over limit");
-
+       
        v2s16 p2d(p.X, p.Z);
        s16 block_y = p.Y;
        /*
@@ -2596,7 +2596,7 @@ MapBlock * ServerMap::emergeBlock(v3s16 p, bool allow_generate)
        DSTACKF("%s: p=(%d,%d,%d), allow_generate=%d",
                        __FUNCTION_NAME,
                        p.X, p.Y, p.Z, allow_generate);
-
+       
        {
                MapBlock *block = getBlockNoCreateNoEx(p);
                if(block && block->isDummy() == false)
@@ -2629,7 +2629,7 @@ MapBlock * ServerMap::emergeBlock(v3s16 p, bool allow_generate)
 
                        // Queue event
                        dispatchEvent(&event);
-
+                                                               
                        return block;
                }
        }
@@ -2673,7 +2673,7 @@ s16 ServerMap::findGroundLevel(v2s16 p2d)
        /*
                Determine from map generator noise functions
        */
-
+       
        s16 level = mapgen::find_ground_level_from_noise(m_seed, p2d, 1);
        return level;
 
@@ -2699,48 +2699,48 @@ void ServerMap::createDatabase() {
 void ServerMap::verifyDatabase() {
        if(m_database)
                return;
-
+       
        {
                std::string dbp = m_savedir + DIR_DELIM + "map.sqlite";
                bool needs_create = false;
                int d;
-
+               
                /*
                        Open the database connection
                */
-
+       
                createDirs(m_savedir);
-
+       
                if(!fs::PathExists(dbp))
                        needs_create = true;
-
+       
                d = sqlite3_open_v2(dbp.c_str(), &m_database, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
                if(d != SQLITE_OK) {
                        infostream<<"WARNING: Database failed to open: "<<sqlite3_errmsg(m_database)<<std::endl;
                        throw FileNotGoodException("Cannot open database file");
                }
-
+               
                if(needs_create)
                        createDatabase();
-
+       
                d = sqlite3_prepare(m_database, "SELECT `data` FROM `blocks` WHERE `pos`=? LIMIT 1", -1, &m_database_read, NULL);
                if(d != SQLITE_OK) {
                        infostream<<"WARNING: Database read statment failed to prepare: "<<sqlite3_errmsg(m_database)<<std::endl;
                        throw FileNotGoodException("Cannot prepare read statement");
                }
-
+               
                d = sqlite3_prepare(m_database, "REPLACE INTO `blocks` VALUES(?, ?)", -1, &m_database_write, NULL);
                if(d != SQLITE_OK) {
                        infostream<<"WARNING: Database write statment failed to prepare: "<<sqlite3_errmsg(m_database)<<std::endl;
                        throw FileNotGoodException("Cannot prepare write statement");
                }
-
+               
                d = sqlite3_prepare(m_database, "SELECT `pos` FROM `blocks`", -1, &m_database_list, NULL);
                if(d != SQLITE_OK) {
                        infostream<<"WARNING: Database list statment failed to prepare: "<<sqlite3_errmsg(m_database)<<std::endl;
                        throw FileNotGoodException("Cannot prepare read statement");
                }
-
+               
                infostream<<"Server: Database opened"<<std::endl;
        }
 }
@@ -2845,11 +2845,11 @@ void ServerMap::save(ModifiedState save_level)
                infostream<<"WARNING: Not saving map, saving disabled."<<std::endl;
                return;
        }
-
+       
        if(save_level == MOD_STATE_CLEAN)
                infostream<<"ServerMap: Saving whole map, this can take time."
                                <<std::endl;
-
+       
        if(m_map_metadata_changed || save_level == MOD_STATE_CLEAN)
        {
                saveMapMeta();
@@ -2857,11 +2857,11 @@ void ServerMap::save(ModifiedState save_level)
 
        // Profile modified reasons
        Profiler modprofiler;
-
+       
        u32 sector_meta_count = 0;
        u32 block_count = 0;
        u32 block_count_all = 0; // Number of blocks in memory
-
+       
        // Don't do anything with sqlite unless something is really saved
        bool save_started = false;
 
@@ -2870,7 +2870,7 @@ void ServerMap::save(ModifiedState save_level)
        {
                ServerMapSector *sector = (ServerMapSector*)i.getNode()->getValue();
                assert(sector->getId() == MAPSECTOR_SERVER);
-
+       
                if(sector->differs_from_disk || save_level == MOD_STATE_CLEAN)
                {
                        saveSectorMeta(sector);
@@ -2879,11 +2879,11 @@ void ServerMap::save(ModifiedState save_level)
                core::list<MapBlock*> blocks;
                sector->getBlocks(blocks);
                core::list<MapBlock*>::Iterator j;
-
+               
                for(j=blocks.begin(); j!=blocks.end(); j++)
                {
                        MapBlock *block = *j;
-
+                       
                        block_count_all++;
 
                        if(block->getModified() >= save_level)
@@ -2959,10 +2959,10 @@ void ServerMap::listAllLoadableBlocks(core::list<v3s16> &dst)
                errorstream<<"Map::listAllLoadableBlocks(): Result will be missing "
                                <<"all blocks that are stored in flat files"<<std::endl;
        }
-
+       
        {
                verifyDatabase();
-
+               
                while(sqlite3_step(m_database_list) == SQLITE_ROW)
                {
                        sqlite3_int64 block_i = sqlite3_column_int64(m_database_list, 0);
@@ -2976,13 +2976,13 @@ void ServerMap::listAllLoadableBlocks(core::list<v3s16> &dst)
 void ServerMap::saveMapMeta()
 {
        DSTACK(__FUNCTION_NAME);
-
+       
        infostream<<"ServerMap::saveMapMeta(): "
                        <<"seed="<<m_seed
                        <<std::endl;
 
        createDirs(m_savedir);
-
+       
        std::string fullpath = m_savedir + DIR_DELIM + "map_meta.txt";
        std::ofstream os(fullpath.c_str(), std::ios_base::binary);
        if(os.good() == false)
@@ -2991,21 +2991,21 @@ void ServerMap::saveMapMeta()
                                <<"could not open"<<fullpath<<std::endl;
                throw FileNotGoodException("Cannot open chunk metadata");
        }
-
+       
        Settings params;
        params.setU64("seed", m_seed);
 
        params.writeLines(os);
 
        os<<"[end_of_params]\n";
-
+       
        m_map_metadata_changed = false;
 }
 
 void ServerMap::loadMapMeta()
 {
        DSTACK(__FUNCTION_NAME);
-
+       
        infostream<<"ServerMap::loadMapMeta(): Loading map metadata"
                        <<std::endl;
 
@@ -3047,14 +3047,14 @@ void ServerMap::saveSectorMeta(ServerMapSector *sector)
        v2s16 pos = sector->getPos();
        std::string dir = getSectorDir(pos);
        createDirs(dir);
-
+       
        std::string fullpath = dir + DIR_DELIM + "meta";
        std::ofstream o(fullpath.c_str(), std::ios_base::binary);
        if(o.good() == false)
                throw FileNotGoodException("Cannot open sector metafile");
 
        sector->serialize(o, version);
-
+       
        sector->differs_from_disk = false;
 }
 
@@ -3093,7 +3093,7 @@ MapSector* ServerMap::loadSectorMeta(std::string sectordir, bool save_after_load
                if(save_after_load)
                        saveSectorMeta(sector);
        }
-
+       
        sector->differs_from_disk = false;
 
        return sector;
@@ -3138,7 +3138,7 @@ bool ServerMap::loadSectorMeta(v2s16 p2d)
        {
                return false;
        }
-
+       
        return true;
 }
 
@@ -3182,7 +3182,7 @@ bool ServerMap::loadSectorFull(v2s16 p2d)
        {
                return false;
        }
-
+       
        /*
                Load blocks
        */
@@ -3244,8 +3244,8 @@ void ServerMap::saveBlock(MapBlock *block)
        u8 version = SER_FMT_VER_HIGHEST;
        // Get destination
        v3s16 p3d = block->getPos();
-
-
+       
+       
 #if 0
        v2s16 p2d(p3d.X, p3d.Z);
        std::string sectordir = getSectorDir(p2d);
@@ -3261,21 +3261,21 @@ void ServerMap::saveBlock(MapBlock *block)
                [0] u8 serialization version
                [1] data
        */
-
+       
        verifyDatabase();
-
+       
        std::ostringstream o(std::ios_base::binary);
-
+       
        o.write((char*)&version, 1);
-
+       
        // Write basic data
        block->serialize(o, version, true);
-
+       
        // Write block to database
-
+       
        std::string tmp = o.str();
        const char *bytes = tmp.c_str();
-
+       
        if(sqlite3_bind_int64(m_database_write, 1, getBlockAsInteger(p3d)) != SQLITE_OK)
                infostream<<"WARNING: Block position failed to bind: "<<sqlite3_errmsg(m_database)<<std::endl;
        if(sqlite3_bind_blob(m_database_write, 2, (void *)bytes, o.tellp(), NULL) != SQLITE_OK) // TODO this mught not be the right length
@@ -3286,7 +3286,7 @@ void ServerMap::saveBlock(MapBlock *block)
                <<sqlite3_errmsg(m_database)<<std::endl;
        // Make ready for later reuse
        sqlite3_reset(m_database_write);
-
+       
        // We just wrote it to the disk so clear modified flag
        block->resetModified();
 }
@@ -3301,12 +3301,12 @@ void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSecto
                std::ifstream is(fullpath.c_str(), std::ios_base::binary);
                if(is.good() == false)
                        throw FileNotGoodException("Cannot open block file");
-
+               
                v3s16 p3d = getBlockPos(sectordir, blockfile);
                v2s16 p2d(p3d.X, p3d.Z);
-
+               
                assert(sector->getPos() == p2d);
-
+               
                u8 version = SER_FMT_VER_INVALID;
                is.read((char*)&version, 1);
 
@@ -3329,14 +3329,14 @@ void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSecto
                        block = sector->createBlankBlockNoInsert(p3d.Y);
                        created_new = true;
                }
-
+               
                // Read basic data
                block->deSerialize(is, version, true);
 
                // If it's a new block, insert it to the map
                if(created_new)
                        sector->insertBlock(block);
-
+               
                /*
                        Save blocks loaded in old format in new format
                */
@@ -3344,11 +3344,11 @@ void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSecto
                if(version < SER_FMT_VER_HIGHEST || save_after_load)
                {
                        saveBlock(block);
-
+                       
                        // Should be in database now, so delete the old file
                        fs::RecursiveDelete(fullpath);
                }
-
+               
                // We just loaded it from the disk, so it's up-to-date.
                block->resetModified();
 
@@ -3373,7 +3373,7 @@ void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool
 
        try {
                std::istringstream is(*blob, std::ios_base::binary);
-
+               
                u8 version = SER_FMT_VER_INVALID;
                is.read((char*)&version, 1);
 
@@ -3396,14 +3396,14 @@ void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool
                        block = sector->createBlankBlockNoInsert(p3d.Y);
                        created_new = true;
                }
-
+               
                // Read basic data
                block->deSerialize(is, version, true);
-
+               
                // If it's a new block, insert it to the map
                if(created_new)
                        sector->insertBlock(block);
-
+               
                /*
                        Save blocks loaded in old format in new format
                */
@@ -3412,7 +3412,7 @@ void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool
                // Only save if asked to; no need to update version
                if(save_after_load)
                        saveBlock(block);
-
+               
                // We just loaded it from, so it's up-to-date.
                block->resetModified();
 
@@ -3438,7 +3438,7 @@ MapBlock* ServerMap::loadBlock(v3s16 blockpos)
 
        if(!loadFromFolders()) {
                verifyDatabase();
-
+               
                if(sqlite3_bind_int64(m_database_read, 1, getBlockAsInteger(blockpos)) != SQLITE_OK)
                        infostream<<"WARNING: Could not bind block position for load: "
                                <<sqlite3_errmsg(m_database)<<std::endl;
@@ -3447,15 +3447,15 @@ MapBlock* ServerMap::loadBlock(v3s16 blockpos)
                                Make sure sector is loaded
                        */
                        MapSector *sector = createSector(p2d);
-
+                       
                        /*
                                Load block
                        */
                        const char * data = (const char *)sqlite3_column_blob(m_database_read, 0);
                        size_t len = sqlite3_column_bytes(m_database_read, 0);
-
+                       
                        std::string datastr(data, len);
-
+                       
                        loadBlock(&datastr, blockpos, sector, false);
 
                        sqlite3_step(m_database_read);
@@ -3465,7 +3465,7 @@ MapBlock* ServerMap::loadBlock(v3s16 blockpos)
                        return getBlockNoCreateNoEx(blockpos);
                }
                sqlite3_reset(m_database_read);
-
+               
                // Not found in database, try the files
        }
 
@@ -3486,7 +3486,7 @@ MapBlock* ServerMap::loadBlock(v3s16 blockpos)
                loadlayout = 2;
                sectordir = getSectorDir(p2d, 2);
        }
-
+       
        /*
                Make sure sector is loaded
        */
@@ -3498,18 +3498,18 @@ MapBlock* ServerMap::loadBlock(v3s16 blockpos)
                }
                catch(InvalidFilenameException &e)
                {
-                       return NULL;
+                       return false;
                }
                catch(FileNotGoodException &e)
                {
-                       return NULL;
+                       return false;
                }
                catch(std::exception &e)
                {
-                       return NULL;
+                       return false;
                }
        }
-
+       
        /*
                Make sure file exists
        */
@@ -3554,7 +3554,7 @@ ClientMap::ClientMap(
 {
        m_camera_mutex.Init();
        assert(m_camera_mutex.IsInitialized());
-
+       
        m_box = core::aabbox3d<f32>(-BS*1000000,-BS*1000000,-BS*1000000,
                        BS*1000000,BS*1000000,BS*1000000);
 }
@@ -3562,7 +3562,7 @@ ClientMap::ClientMap(
 ClientMap::~ClientMap()
 {
        /*JMutexAutoLock lock(mesh_mutex);
-
+       
        if(mesh != NULL)
        {
                mesh->drop();
@@ -3580,15 +3580,15 @@ MapSector * ClientMap::emergeSector(v2s16 p2d)
        catch(InvalidPositionException &e)
        {
        }
-
+       
        // Create a sector
        ClientMapSector *sector = new ClientMapSector(this, p2d, m_gamedef);
-
+       
        {
                //JMutexAutoLock lock(m_sector_mutex); // Bulk comment-out
                m_sectors.insert(p2d, sector);
        }
-
+       
        return sector;
 }
 
@@ -3599,7 +3599,7 @@ void ClientMap::deSerializeSector(v2s16 p2d, std::istream &is)
        ClientMapSector *sector = NULL;
 
        //JMutexAutoLock lock(m_sector_mutex); // Bulk comment-out
-
+       
        core::map<v2s16, MapSector*>::Node *n = m_sectors.find(p2d);
 
        if(n != NULL)
@@ -3668,7 +3668,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
        DSTACK(__FUNCTION_NAME);
 
        bool is_transparent_pass = pass == scene::ESNRP_TRANSPARENT;
-
+       
        std::string prefix;
        if(pass == scene::ESNRP_SOLID)
                prefix = "CM: solid: ";
@@ -3685,7 +3685,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
 
        /*
                Get time for measuring timeout.
-
+               
                Measuring time is very useful for long delays when the
                machine is swapping a lot.
        */
@@ -3704,7 +3704,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
        */
 
        v3s16 cam_pos_nodes = floatToInt(camera_position, BS);
-
+       
        v3s16 box_nodes_d = m_control.wanted_range * v3s16(1,1,1);
 
        v3s16 p_nodes_min = cam_pos_nodes - box_nodes_d;
@@ -3720,13 +3720,13 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                        p_nodes_max.X / MAP_BLOCKSIZE + 1,
                        p_nodes_max.Y / MAP_BLOCKSIZE + 1,
                        p_nodes_max.Z / MAP_BLOCKSIZE + 1);
-
+       
        u32 vertex_count = 0;
        u32 meshbuffer_count = 0;
-
+       
        // For limiting number of mesh updates per frame
        u32 mesh_update_count = 0;
-
+       
        // Number of blocks in rendering range
        u32 blocks_in_range = 0;
        // Number of blocks occlusion culled
@@ -3746,7 +3746,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
        /*
                Collect a set of blocks for drawing
        */
-
+       
        core::map<v3s16, MapBlock*> drawset;
 
        {
@@ -3758,7 +3758,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
        {
                MapSector *sector = si.getNode()->getValue();
                v2s16 sp = sector->getPos();
-
+               
                if(m_control.range_all == false)
                {
                        if(sp.X < p_blocks_min.X
@@ -3770,13 +3770,13 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
 
                core::list< MapBlock * > sectorblocks;
                sector->getBlocks(sectorblocks);
-
+               
                /*
                        Loop through blocks in sector
                */
 
                u32 sector_blocks_drawn = 0;
-
+               
                core::list< MapBlock * >::Iterator i;
                for(i=sectorblocks.begin(); i!=sectorblocks.end(); i++)
                {
@@ -3786,7 +3786,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                                Compare block position to camera position, skip
                                if not seen on display
                        */
-
+                       
                        float range = 100000 * BS;
                        if(m_control.range_all == false)
                                range = m_control.wanted_range * BS;
@@ -3805,7 +3805,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                                continue;*/
 
                        blocks_in_range++;
-
+                       
 #if 1
                        /*
                                Update expired mesh (used for day/night change)
@@ -3815,7 +3815,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                        */
 
                        bool mesh_expired = false;
-
+                       
                        {
                                JMutexAutoLock lock(block->mesh_mutex);
 
@@ -3831,7 +3831,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
 
                        f32 faraway = BS*50;
                        //f32 faraway = m_control.wanted_range * BS;
-
+                       
                        /*
                                This has to be done with the mesh_mutex unlocked
                        */
@@ -3840,7 +3840,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                                        (mesh_update_count < 3
                                                && (d < faraway || mesh_update_count < 2)
                                        )
-                                       ||
+                                       || 
                                        (m_control.range_all && mesh_update_count < 20)
                                )
                        )
@@ -3894,7 +3894,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                                blocks_occlusion_culled++;
                                continue;
                        }
-
+                       
                        // This block is in range. Reset usage timer.
                        block->resetUsageTimer();
 
@@ -3905,23 +3905,23 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                                JMutexAutoLock lock(block->mesh_mutex);
 
                                scene::SMesh *mesh = block->mesh;
-
+                               
                                if(mesh == NULL){
                                        blocks_in_range_without_mesh++;
                                        continue;
                                }
                        }
-
+                       
                        // Limit block count in case of a sudden increase
                        blocks_would_have_drawn++;
                        if(blocks_drawn >= m_control.wanted_max_blocks
                                        && m_control.range_all == false
                                        && d > m_control.wanted_min_range * BS)
                                continue;
-
+                       
                        // Add to set
                        drawset[block->getPos()] = block;
-
+                       
                        sector_blocks_drawn++;
                        blocks_drawn++;
 
@@ -3931,7 +3931,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                        m_last_drawn_sectors[sp] = true;
        }
        } // ScopeProfiler
-
+       
        /*
                Draw the selected MapBlocks
        */
@@ -3959,7 +3959,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                                }
                        }
                }
-
+               
                MapBlock *block = i.getNode()->getValue();
 
                /*
@@ -3970,7 +3970,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
 
                        scene::SMesh *mesh = block->mesh;
                        assert(mesh);
-
+                       
                        u32 c = mesh->getMeshBufferCount();
                        bool stuff_actually_drawn = false;
                        for(u32 i=0; i<c; i++)
@@ -4005,7 +4005,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                }
        }
        } // ScopeProfiler
-
+       
        // Log only on solid pass because values are the same
        if(pass == scene::ESNRP_SOLID){
                g_profiler->avg("CM: blocks in range", blocks_in_range);
@@ -4015,7 +4015,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                                        (float)blocks_in_range_without_mesh/blocks_in_range);
                g_profiler->avg("CM: blocks drawn", blocks_drawn);
        }
-
+       
        g_profiler->avg(prefix+"vertices drawn", vertex_count);
        if(blocks_had_pass_meshbuf != 0)
                g_profiler->avg(prefix+"meshbuffers per block",
@@ -4165,7 +4165,7 @@ void ClientMap::expireMeshes(bool only_daynight_diffed)
 
                core::list< MapBlock * > sectorblocks;
                sector->getBlocks(sectorblocks);
-
+               
                core::list< MapBlock * >::Iterator i;
                for(i=sectorblocks.begin(); i!=sectorblocks.end(); i++)
                {
@@ -4175,7 +4175,7 @@ void ClientMap::expireMeshes(bool only_daynight_diffed)
                        {
                                continue;
                        }
-
+                       
                        {
                                JMutexAutoLock lock(block->mesh_mutex);
                                if(block->mesh != NULL)
@@ -4305,7 +4305,7 @@ void MapVoxelManipulator::emerge(VoxelArea a, s32 caller_id)
                n = m_loaded_blocks.find(p);
                if(n != NULL)
                        continue;
-
+               
                bool block_data_inexistent = false;
                try
                {
@@ -4316,7 +4316,7 @@ void MapVoxelManipulator::emerge(VoxelArea a, s32 caller_id)
                                        <<" wanted area: ";
                        a.print(infostream);
                        infostream<<std::endl;*/
-
+                       
                        MapBlock *block = m_map->getBlockNoCreate(p);
                        if(block->isDummy())
                                block_data_inexistent = true;
@@ -4356,12 +4356,12 @@ void MapVoxelManipulator::blitBack
 {
        if(m_area.getExtent() == v3s16(0,0,0))
                return;
-
+       
        //TimeTaker timer1("blitBack");
 
        /*infostream<<"blitBack(): m_loaded_blocks.size()="
                        <<m_loaded_blocks.size()<<std::endl;*/
-
+       
        /*
                Initialize block cache
        */
@@ -4380,9 +4380,9 @@ void MapVoxelManipulator::blitBack
                        continue;
 
                MapNode &n = m_data[m_area.index(p)];
-
+                       
                v3s16 blockpos = getNodeBlockPos(p);
-
+               
                try
                {
                        // Get block
@@ -4391,7 +4391,7 @@ void MapVoxelManipulator::blitBack
                                blockpos_last = blockpos;
                                block_checked_in_modified = false;
                        }
-
+                       
                        // Calculate relative position in block
                        v3s16 relpos = p - blockpos * MAP_BLOCKSIZE;
 
@@ -4401,7 +4401,7 @@ void MapVoxelManipulator::blitBack
 
                        //m_map->setNode(m_area.MinEdge + p, n);
                        block->setNode(relpos, n);
-
+                       
                        /*
                                Make sure block is in modified_blocks
                        */
@@ -4444,7 +4444,7 @@ void ManualMapVoxelManipulator::initialEmerge(
 
        VoxelArea block_area_nodes
                        (p_min*MAP_BLOCKSIZE, (p_max+1)*MAP_BLOCKSIZE-v3s16(1,1,1));
-
+       
        u32 size_MB = block_area_nodes.getVolume()*4/1000000;
        if(size_MB >= 1)
        {
@@ -4465,7 +4465,7 @@ void ManualMapVoxelManipulator::initialEmerge(
                n = m_loaded_blocks.find(p);
                if(n != NULL)
                        continue;
-
+               
                bool block_data_inexistent = false;
                try
                {
@@ -4506,7 +4506,7 @@ void ManualMapVoxelManipulator::blitBackAll(
 {
        if(m_area.getExtent() == v3s16(0,0,0))
                return;
-
+       
        /*
                Copy data of all blocks
        */
index 695e97b16e4924510eb2754717c0f1bf21b20951..90255c1d9cf289564f95581d4263d428d92fa955 100644 (file)
--- a/src/map.h
+++ b/src/map.h
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index cd26d0712f1d289bb10e6fc0c2cca5d32a85caaa..b436378da5a2cbc3f4f907fbabcee7e860640e6a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 532a844d077fb204e99a90a8050fdf564ec6d44a..c9ff366794911526817fe2db5cebbae2df25db87 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index da120c32c01044ac1c0a27fb6c1dcdd0ce35f18c..b843448c484c1cb70461d80593d4d27f433f6b1e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 921daf2d2342bc29c6d31f0f66c3e63cc1e3694d..4d3e7d29d1d73232bab8a3b5324a6241e6c95e72 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 2e3eedbdcd78351398981e7152faded9a3a81662..4952df107f741fb55c3f5b8870e636e0172510b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 10326f2a2bd272fc847d351995f27f4ca1a04128..98df7ce66a2691b1140d6c5784920f473c294eb7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index f2ea6eb3756340846024b230c26cf933841808d5..fe2ce13f58540cea813525e7e5c7976dbf9e1882 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 70e34540b462b7f85c7119e91f166e90e59f037a..207dfdaf78cfdb336d7ef2970475038a86695816 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 369a2af6a51d28bf2d9383f8fc4ac60f6a0a32e1..6cb9671b51b998671a920cdfa24f801f1677043b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 9b8ea4e05c2b9a0cec6d1bb8ad50715d30a44e64..5e066604bfc00ddc02bd23b7cd4b9739effb399d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 340a932acc85c414cc80f00c8e2e810afbce1e68..9b54328076ba69a1c8f4cfb88e299726768ed7c4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 887bffa5630072943a22b10b34c0b1d2138dcbcc..be9243e67bf49b25bc421fc9732061ab462d3103 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index d9a95bff59a3c8ea8c8b22e52d1e6206ab3932f0..c37b7c5053736d85674dbca4c61606f6765f21f1 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index f242dfd2afcf28382549e01a641c20dafd56d3ab..058b2ab8525b59c4a431fa8ea249370431c84d83 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 8772249a08d4b515ce97a4bd815e480ea798aee3..5afb4af592ba7306831212290895eb5523a15a85 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index f7844ac2fef02a67b25c2afa0fe430cc40f5bf59..57166235ebf834391bc1cd252a38117d776df812 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 90e44aaa5c86780d40366d985e953801d35e645c..1f6d4d897dfe6126d0a69a8c375c50a4188edaab 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 730cc943cc7c9d70f0aaa98b69773927dc7bbd17..280b0e09283143a00fa6966286a1e4d08d25849e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 3ecf107e530e3437977ea425200208a143ea50a1..db878d78b40b83634786a00215ed9d5df364c9a9 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index c23ad94664b4df57f1d6a2b9daaa7a213e9431b2..e85ec2f4c85f4dc5f5c22a64904f1c6d35eb3538 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 4892836abbb9abcba02922f3547fbd7d83ddd8b6..0fb6632784e960e7d2886236fe425c38814532c0 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index ee2634b2f927284b61573a7dbee90216a4487697..238deb451514ef12abeeb5792db93e1c844eb332 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 5e168bd5e86ac08a4183c76debd3e759f79f17f7..0c2793a0ea04a456a58a1bfea18511f1f6add4b8 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index ee6413b2813ddcfda3cfb70fe62802e270f16854..9524385cf075d6e8618b0ac65f6f83863fff7fc4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 82b6b394a024cc9a9ed968e76551a3b194f90104..410b4e2ea78bcb12cf89020dba9451aeb2336312 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 023580c973625a39fe6cdfb28d22b1db9af75a81..19ce80a42ca4ec8c2c30c886e6102cadd41cb5af 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 6587c9a1fc649ab26c358138bb7095235427bb12..9c2141ce086842618daefbb7283d54580f32d082 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 3c2cfa4a3f6a5b955e6462318d398b827bb1e896..ed75f316dca7d4fcca2ef48136f51951b49beacb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 5deaaec91bf6a5a29362c915c0514f5f0bf041c3..688be5d9890e060d899b3918d4b0d6b5e4163911 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 109033d019f3ab0c7b1a3da36df9b38e8f6a3f7e..085a4a15a76a8d27a465b9df97e2da4db1b300bc 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 628d789b7be77cc09707a04a17704a2b191058f7..0adc955a94f77b28861a5bd8b4c00e118feeab09 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index eb5a8e66cfe76a4455caa6c83e86c9eb8a1d94a0..4970a84787856d24a4b3e82ff6ce37206d50fd58 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 8cd96935afeba2991518ac11efa413e481cb2510..129118ef6216c567281044f1e8b8741f009f764a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 63f059f24f8e3f253b8fef32ed3e1439f6152d80..f91b228960c27ef17420cb1f7c737392fc9e892b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 90e9d43500151830c6f451f924d5fa1003574ad4..3bf5342f5e29c7558fcb7e2123a71400fa4866d8 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 60c9e3f80de50442e040ad35c3b1c9972a648efc..5d68793e248a619ab8802cc024860f19b0161c54 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index c6dfffc9fdf7c970c0e3b462a461841791a0e31b..500a9ab99471f236242319802ff94add6ca0324c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 07376a385c9cfc84c2cf8cf3c332c2015615b539..f150d45f05edd150b253fbd4184d43fad117f566 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index ba70a94cd65c3b2a4b36803cd6d8e8388f5da65a..bcfea451a0c26421d0bc2903cedf76a2138f6264 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 8dc8dbdd5968d6e1efc0c5e88bbce4abb04a66bd..a0c8a00928011740af8f9e862f7c03b6d3556871 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index c187d03f5d1871e6406aab7a512a61f3bc1b5d94..4fdb600657b69746d4a74e678d1e0edcfb0cd96b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 5152fca024f009a0026fffbcc662cfda362162f3..e2e84bacb000945e4bf2ac08a392217cc8045fea 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Part of Minetest-m13
+Part of Minetest-c55
 Copyright (C) 2010-11 celeron55, Perttu Ahola <celeron55@gmail.com>
 Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
 
index b6eb31503486eacce367420b15811a6a8eda1ea7..648a57332716ebbbf5f05e42eb830ad2a271aa9d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Part of Minetest-m13
+Part of Minetest-c55
 Copyright (C) 2010-11 celeron55, Perttu Ahola <celeron55@gmail.com>
 Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
 
index 0bcec74e4e5fbca0a00e16b7a9cead6ca190e284..3ef1d9479a75788ac70c6a6753322b4eb59d1633 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 264794d1a91bbba65e7ffa581d364ff7af50095a..2609e301534a82abb2fd61112eb56c549e22d5fb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 54ed8aa7691459e30322ac9eba4a5e16196a4de5..94ceb4895c4feb9bee56393dafeaf381c1734eee 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 17c75c392986f76e2b72f6d077c71bf75b1ada5f..2d700202c2430c8065aa1756dd9abea95be1557f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 50aa0a08c6e042a44f26db61fc931c2a0141a1a4..9d943764619db4a4e8f56948ea216469ee1a8b41 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 6883cce1e6454f8debae7bbd18c436ab55900e4e..4bc22eaa1e08f47682108872b272a7790dc246d4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 2eb1e78154751721e52d4679025e73334df6a1df..6d48178f963504c24075e270bc945da31ef3a25f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index ccb023fef339e6d15fe2f171a7cbd60e94d70f8a..74b5fb64391173c6142ccbd95c3e3bd3606022f7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 80b5f1d0fed70fca318305fbd19ab52c8020c9f4..c3369af3cd6b5b2724bdc1828e77e239e2457af2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 5821559ad68fd8e2a705ed9fb4891565a31afe6d..049ae0bae99375554e596418849fb0e1bbd1469d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 3c73418cfaaac3b3faaba5304965d9f7ee3f7a1d..23113b1233ac77dc74d5cee186fc051ebda80ebb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index f45043b34089a7fbd824576872496b95aaa30dc7..6c97d10cdf1f88ab0016fb0b1e4b1aaee85cb5bb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index c233859703acc66314ec5674223ea3a9d4ef2ae6..1ea7d0a94c4678a5d88d6e0d96372ec73c782c3c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 398fab11e11a53e931b9f9c5b180ae501a057300..bc4c49cb1717a548babd6a5204f67c58cdd8e43d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 38292d2d57a82be0741b87734975d7e361e143f3..c0d8914b09b6c09d288dc045f8caa9271588d0da 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 6d90c7b0576795c29bedb2f66cf82610ce89f261..06b60884f8b547485e8ec8426eeb65f0d7398251 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index 8515c1752d1d83e308f72dbde5b9fc5520b26488..50f27c11bf3d4814eb8cc0ed8d38d53cd648a759 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index f0ac98005371c59c90abac48e92677b3609d2ce5..bd06be877b67ae4a5de024aa538cb30bb5c63435 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index f5a6bac8929daf7809e0f2a4d0f36dd52ff08574..46864e06e83a81318648d60c709588d3fdc7038f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Minetest-m13
+Minetest-c55
 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
index c38ebb6b1e48bdc6fc78b591c4bee67118337258..de3e842a0b5dffcd3ae1f2f781a9f5a2cbc29e3a 100644 (file)
@@ -4,7 +4,7 @@
 
 
 --
--- Minetest-m13
+-- Minetest-c55
 -- Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 --
 -- This program is free software; you can redistribute it and/or modify