Merge remote-tracking branch 'minetest/master'

master
Brandon 2017-07-01 11:54:00 -05:00
commit a2d83f3128
258 changed files with 12032 additions and 8527 deletions

View File

@ -2,7 +2,7 @@ BasedOnStyle: LLVM
IndentWidth: 8
UseTab: Always
BreakBeforeBraces: Custom
Standard: Cpp03
Standard: Cpp11
BraceWrapping:
AfterClass: true
AfterControlStatement: false

9
.gitignore vendored
View File

@ -22,9 +22,12 @@ tags
!tags/
gtags.files
.idea/*
# Codelite
*.project
## Files related to minetest development cycle
/*.patch
*.diff
# GNU Patch reject file
*.rej
@ -43,13 +46,17 @@ gtags.files
!/mods/minetest/mods_here.txt
/worlds
/world/
/clientmods/mods.conf
/clientmods/*
!/clientmods/preview/
/client/mod_storage/
## Configuration/log files
minetest.conf
debug.txt
## Other files generated by minetest
screenshot_*.png
## Doxygen files
doc/Doxyfile
doc/html/

View File

@ -22,7 +22,7 @@ variables:
- make install
artifacts:
when: on_success
expire_in: 1h
expire_in: 2h
paths:
- artifact/*
@ -39,12 +39,12 @@ variables:
- rm -Rf build/deb/minetest/usr/share/minetest/games/minetest/.git
- sed -i 's/DATEPLACEHOLDER/'$(date +%y.%m.%d)'/g' build/deb/minetest/DEBIAN/control
- sed -i 's/LEVELDB_PLACEHOLDER/'$LEVELDB_PKG'/g' build/deb/minetest/DEBIAN/control
- cd build/deb/ && dpkg-deb -b minetest/
- cd build/deb/ && dpkg-deb -b minetest/ && mv minetest.deb ../../
artifacts:
when: on_success
expire_in: 30 day
expire_in: 90 day
paths:
- build/deb/*.deb
- ./*.deb
.debpkg_install: &debpkg_install
stage: deploy
@ -52,7 +52,7 @@ variables:
- apt-get update -y
- apt-get install -y libc6 libcurl3-gnutls libfreetype6 libirrlicht1.8 $LEVELDB_PKG liblua5.1-0 libluajit-5.1-2 libopenal1 libstdc++6 libvorbisfile3 libx11-6 zlib1g
script:
- dpkg -i build/deb/*.deb
- dpkg -i ./*.deb
##
## Debian
@ -64,8 +64,13 @@ build:debian-8:
<<: *build_definition
image: debian:8
before_script:
- echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main" > /etc/apt/sources.list.d/uptodate-toolchain.list
- apt-key adv --keyserver keyserver.ubuntu.com --recv BA9EF27F
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
- apt-get -y install build-essential gcc-6 g++-6 libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
variables:
CC: gcc-6
CXX: g++-6
package:debian-8:
image: debian:8
@ -115,11 +120,16 @@ deploy:debian-9:
# Trusty
build:ubuntu-14.04:
<<: *build_definition
image: ubuntu:trusty
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
<<: *build_definition
image: ubuntu:trusty
before_script:
- echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main" > /etc/apt/sources.list.d/uptodate-toolchain.list
- apt-key adv --keyserver keyserver.ubuntu.com --recv BA9EF27F
- apt-get update -y
- apt-get -y install build-essential gcc-6 g++-6 libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
variables:
CC: gcc-6
CXX: g++-6
package:ubuntu-14.04:
image: ubuntu:trusty
@ -140,11 +150,11 @@ deploy:ubuntu-14.04:
# Xenial
build:ubuntu-16.04:
<<: *build_definition
image: ubuntu:xenial
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
<<: *build_definition
image: ubuntu:xenial
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
package:ubuntu-16.04:
image: ubuntu:xenial
@ -165,11 +175,11 @@ deploy:ubuntu-16.04:
# Yakkety
build:ubuntu-16.10:
<<: *build_definition
image: ubuntu:yakkety
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
<<: *build_definition
image: ubuntu:yakkety
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
package:ubuntu-16.10:
image: ubuntu:yakkety
@ -190,11 +200,11 @@ deploy:ubuntu-16.10:
# Zesty
build:ubuntu-17.04:
<<: *build_definition
image: ubuntu:zesty
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
<<: *build_definition
image: ubuntu:zesty
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
package:ubuntu-17.04:
image: ubuntu:zesty
@ -221,3 +231,80 @@ build:fedora-24:
image: fedora:24
before_script:
- dnf -y install make automake gcc gcc-c++ kernel-devel cmake libcurl* openal* libvorbis* libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel irrlicht-devel bzip2-libs gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel doxygen spatialindex-devel bzip2-devel
##
## Mingw for Windows
##
.generic_win_template: &generic_win_template
image: ubuntu:xenial
before_script:
- apt-get update -y
- apt-get install -y p7zip-full wget unzip git cmake gettext
- wget http://minetest.kitsunemimi.pw/mingw-w64-${WIN_ARCH}_7.1.1_ubuntu14.04.7z -O mingw.7z > /dev/null
- sed -e "s|%PREFIX%|${WIN_ARCH}-w64-mingw32|" -e "s|%ROOTPATH%|/usr/${WIN_ARCH}-w64-mingw32|" < util/travis/toolchain_mingw.cmake.in > ${TOOLCHAIN_OUTPUT}
- 7z x -y -o/usr mingw.7z > /dev/null
.build_win_template: &build_win_template
<<: *generic_win_template
stage: build
artifacts:
when: on_success
expire_in: 2h
paths:
- build/*
.package_win_template: &package_win_template
<<: *generic_win_template
stage: package
script:
- cd build/minetest/_build
- make package
- cd ../../../
- mkdir minetest-win-${WIN_ARCH}
- unzip build/minetest/_build/minetest-*-win*.zip -d minetest-win-${WIN_ARCH}
- cp /usr/${WIN_ARCH}-w64-mingw32/bin/libgcc*.dll minetest-win-${WIN_ARCH}/minetest-*-win*/bin
- cp /usr/${WIN_ARCH}-w64-mingw32/bin/libstdc++*.dll minetest-win-${WIN_ARCH}/minetest-*-win*/bin
- cp /usr/${WIN_ARCH}-w64-mingw32/bin/libwinpthread*.dll minetest-win-${WIN_ARCH}/minetest-*-win*/bin
artifacts:
when: on_success
expire_in: 90 day
paths:
- minetest-win-*/*
build:win32:
<<: *build_win_template
script:
- ./util/buildbot/buildwin32.sh build
variables:
NO_PACKAGE: "1"
WIN_ARCH: "i686"
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw.cmake"
package:win32:
<<: *package_win_template
dependencies:
- build:win32
variables:
NO_PACKAGE: "1"
WIN_ARCH: "i686"
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw.cmake"
build:win64:
<<: *build_win_template
script:
- ./util/buildbot/buildwin64.sh build
variables:
NO_PACKAGE: "1"
WIN_ARCH: "x86_64"
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw64.cmake"
package:win64:
<<: *package_win_template
dependencies:
- build:win64
variables:
NO_PACKAGE: "1"
WIN_ARCH: "x86_64"
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw64.cmake"

View File

@ -2,6 +2,7 @@ language: cpp
before_install: ./util/travis/before_install.sh
script: ./util/travis/script.sh
sudo: required
dist: trusty
notifications:
email: false
matrix:
@ -10,30 +11,81 @@ matrix:
- env: PLATFORM=Win32
compiler: gcc
os: linux
addons:
apt:
packages: ['gcc-mingw-w64-i686', 'g++-mingw-w64-i686', 'binutils-mingw-w64-i686']
sources: &sources
- ubuntu-toolchain-r-test
- sourceline: 'deb http://mirrors.kernel.org/ubuntu xenial main universe'
- env: PLATFORM=Win64
compiler: gcc
os: linux
- env: PLATFORM=Unix COMPILER=clang
addons:
apt:
packages: ['gcc-mingw-w64-x86-64', 'g++-mingw-w64-x86-64', 'binutils-mingw-w64-x86-64']
sources: &sources
- ubuntu-toolchain-r-test
- sourceline: 'deb http://mirrors.kernel.org/ubuntu xenial main universe'
- env: PLATFORM=Unix
compiler: clang
os: osx
- env: PLATFORM=Unix COMPILER=g++
osx_image: xcode8
- env: PLATFORM=Unix COMPILER=gcc-6
compiler: gcc
os: linux
- env: PLATFORM=Unix COMPILER=clang
compiler: clang
os: linux
- env: PLATFORM=Unix COMPILER=clang VALGRIND=1
compiler: clang
os: linux
dist: trusty
- env: COMPILER=none LINT=1
compiler: clang
os: linux
dist: trusty
- env: PLATFORM=Unix COMPILER=g++-6
addons:
apt:
packages: ['gcc-6', 'g++-6']
sources: &sources
- ubuntu-toolchain-r-test
- env: PLATFORM=Unix COMPILER=gcc-7
compiler: gcc
os: linux
addons:
apt:
sources: &sources
- ubuntu-toolchain-r-test
addons:
apt:
packages: ['gcc-7', 'g++-7']
sources: &sources
- ubuntu-toolchain-r-test
- env: PLATFORM=Unix COMPILER=clang-3.6
compiler: clang
os: linux
addons:
apt:
packages: ['clang-3.6', 'clang++-3.6']
sources: &sources
- llvm-toolchain-trusty-3.6
- env: PLATFORM=Unix COMPILER=clang-4.0
compiler: clang
os: linux
addons:
apt:
packages: ['clang-4.0', 'clang++-4.0']
sources: &sources
- llvm-toolchain-trusty-4.0
- env: PLATFORM=Unix COMPILER=clang-4.0 VALGRIND=1
compiler: clang
os: linux
addons:
apt:
packages: ['valgrind', 'clang-4.0', 'clang++-4.0']
sources: &sources
- llvm-toolchain-trusty-4.0
- env: LINT=1
compiler: clang
os: linux
addons:
apt:
packages: ['clang-format-4.0']
sources: &sources
- llvm-toolchain-trusty-4.0

View File

@ -9,11 +9,13 @@ endif()
project(minetest)
set(PROJECT_NAME_CAPITALIZED "Voxel Adventures Client")
# Works only for cmake 3.1 and greater
set(CMAKE_CXX_STANDARD 11)
# Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing
set(VERSION_MAJOR 0)
set(VERSION_MINOR 4)
set(VERSION_PATCH 15)
set(VERSION_PATCH 16)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
# Change to false for releases
@ -155,18 +157,22 @@ endif()
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/builtin" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/clientmods" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games" DESTINATION "${SHAREDIR}" PATTERN ".git*" EXCLUDE)
if(BUILD_CLIENT)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/textures/base/pack" DESTINATION "${SHAREDIR}/textures/base")
endif()
if(RUN_IN_PLACE)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/mods/mods_here.txt" DESTINATION "${SHAREDIR}/mods")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/textures/texture_packs_here.txt" DESTINATION "${SHAREDIR}/textures")
endif()
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games" DESTINATION "${SHAREDIR}" PATTERN ".git*" EXCLUDE)
if(BUILD_CLIENT)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client/shaders" DESTINATION "${SHAREDIR}/client")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/textures/base/pack" DESTINATION "${SHAREDIR}/textures/base")
if(RUN_IN_PLACE)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/clientmods" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client/serverlist" DESTINATION "${SHAREDIR}/client")
endif()
endif()
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}")
install(FILES "README.txt" DESTINATION "${DOCDIR}")

View File

@ -11,10 +11,10 @@ apply plugin: "com.android.application"
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
buildToolsVersion "25.0.3"
defaultConfig {
versionCode 16
versionCode 17
versionName "${System.env.VERSION_STR}.${versionCode}"
minSdkVersion 9
targetSdkVersion 9

View File

@ -124,7 +124,6 @@ LOCAL_SRC_FILES := \
jni/src/clientobject.cpp \
jni/src/clouds.cpp \
jni/src/collision.cpp \
jni/src/content_abm.cpp \
jni/src/content_cao.cpp \
jni/src/content_cso.cpp \
jni/src/content_mapblock.cpp \
@ -152,7 +151,7 @@ LOCAL_SRC_FILES := \
jni/src/gettext.cpp \
jni/src/guiChatConsole.cpp \
jni/src/guiEngine.cpp \
jni/src/guiFileSelectMenu.cpp \
jni/src/guiPathSelectMenu.cpp \
jni/src/guiFormSpecMenu.cpp \
jni/src/guiKeyChangeMenu.cpp \
jni/src/guiPasswordChange.cpp \

View File

@ -1,7 +1,7 @@
-- Minetest: builtin/client/chatcommands.lua
core.register_on_sending_chat_messages(function(message)
core.register_on_sending_chat_message(function(message)
if message:sub(1,2) == ".." then
return false
end

View File

@ -61,8 +61,8 @@ end
core.registered_globalsteps, core.register_globalstep = make_registration()
core.registered_on_shutdown, core.register_on_shutdown = make_registration()
core.registered_on_connect, core.register_on_connect = make_registration()
core.registered_on_receiving_chat_messages, core.register_on_receiving_chat_messages = make_registration()
core.registered_on_sending_chat_messages, core.register_on_sending_chat_messages = make_registration()
core.registered_on_receiving_chat_message, core.register_on_receiving_chat_message = make_registration()
core.registered_on_sending_chat_message, core.register_on_sending_chat_message = make_registration()
core.registered_on_death, core.register_on_death = make_registration()
core.registered_on_hp_modification, core.register_on_hp_modification = make_registration()
core.registered_on_damage_taken, core.register_on_damage_taken = make_registration()

View File

@ -97,7 +97,7 @@ end
if INIT == "client" then
core.register_chatcommand("help", {
params = gettext("[all/<cmd>]"),
params = gettext("[all | <cmd>]"),
description = gettext("Get help for commands"),
func = function(param)
return do_help_cmd(nil, param)
@ -105,7 +105,7 @@ if INIT == "client" then
})
else
core.register_chatcommand("help", {
params = "[all/privs/<cmd>]",
params = "[all | privs | <cmd>]",
description = "Get help for commands or list privileges",
func = do_help_cmd,
})

View File

@ -642,44 +642,26 @@ end
local ESCAPE_CHAR = string.char(0x1b)
-- Client-side mods don't have access to settings
if core.settings and core.settings:get_bool("disable_escape_sequences") then
function core.get_color_escape_sequence(color)
return ""
end
function core.get_background_escape_sequence(color)
return ""
end
function core.colorize(color, message)
return message
end
else
function core.get_color_escape_sequence(color)
return ESCAPE_CHAR .. "(c@" .. color .. ")"
end
function core.get_background_escape_sequence(color)
return ESCAPE_CHAR .. "(b@" .. color .. ")"
end
function core.colorize(color, message)
local lines = tostring(message):split("\n", true)
local color_code = core.get_color_escape_sequence(color)
for i, line in ipairs(lines) do
lines[i] = color_code .. line
end
return table.concat(lines, "\n") .. core.get_color_escape_sequence("#ffffff")
end
function core.get_color_escape_sequence(color)
return ESCAPE_CHAR .. "(c@" .. color .. ")"
end
function core.get_background_escape_sequence(color)
return ESCAPE_CHAR .. "(b@" .. color .. ")"
end
function core.colorize(color, message)
local lines = tostring(message):split("\n", true)
local color_code = core.get_color_escape_sequence(color)
for i, line in ipairs(lines) do
lines[i] = color_code .. line
end
return table.concat(lines, "\n") .. core.get_color_escape_sequence("#ffffff")
end
function core.strip_foreground_colors(str)
return (str:gsub(ESCAPE_CHAR .. "%(c@[^)]+%)", ""))
end
@ -723,3 +705,28 @@ function core.pointed_thing_to_face_pos(placer, pointed_thing)
end
return fine_pos
end
function core.string_to_privs(str, delim)
assert(type(str) == "string")
delim = delim or ','
local privs = {}
for _, priv in pairs(string.split(str, delim)) do
privs[priv:trim()] = true
end
return privs
end
function core.privs_to_string(privs, delim)
assert(type(privs) == "table")
delim = delim or ','
local list = {}
for priv, bool in pairs(privs) do
if bool then
list[#list + 1] = priv
end
end
return table.concat(list, delim)
end
assert(core.string_to_privs("a,b").b == true)
assert(core.privs_to_string({a=true,b=true}) == "a,b")

View File

@ -4,31 +4,6 @@
-- Authentication handler
--
function core.string_to_privs(str, delim)
assert(type(str) == "string")
delim = delim or ','
local privs = {}
for _, priv in pairs(string.split(str, delim)) do
privs[priv:trim()] = true
end
return privs
end
function core.privs_to_string(privs, delim)
assert(type(privs) == "table")
delim = delim or ','
local list = {}
for priv, bool in pairs(privs) do
if bool then
list[#list + 1] = priv
end
end
return table.concat(list, delim)
end
assert(core.string_to_privs("a,b").b == true)
assert(core.privs_to_string({a=true,b=true}) == "a,b")
core.auth_file_path = core.get_worldpath().."/auth.txt"
core.auth_table = {}

View File

@ -92,7 +92,7 @@ core.register_chatcommand("admin", {
})
core.register_chatcommand("privs", {
params = "<name>",
params = "[<name>]",
description = "Print privileges of player",
func = function(caller, param)
param = param:trim()
@ -145,7 +145,7 @@ local function handle_grant_command(caller, grantname, grantprivstr)
end
core.register_chatcommand("grant", {
params = "<name> <privilege>|all",
params = "<name> (<privilege> | all)",
description = "Give privilege to player",
func = function(name, param)
local grantname, grantprivstr = string.match(param, "([^ ]+) (.+)")
@ -157,7 +157,7 @@ core.register_chatcommand("grant", {
})
core.register_chatcommand("grantme", {
params = "<privilege>|all",
params = "<privilege> | all",
description = "Grant privileges to yourself",
func = function(name, param)
if param == "" then
@ -168,7 +168,7 @@ core.register_chatcommand("grantme", {
})
core.register_chatcommand("revoke", {
params = "<name> <privilege>|all",
params = "<name> (<privilege> | all)",
description = "Remove privilege from player",
privs = {},
func = function(name, param)
@ -305,7 +305,7 @@ core.register_chatcommand("remove_player", {
})
core.register_chatcommand("teleport", {
params = "<X>,<Y>,<Z> | <to_name> | <name> <X>,<Y>,<Z> | <name> <to_name>",
params = "<X>,<Y>,<Z> | <to_name> | (<name> <X>,<Y>,<Z>) | (<name> <to_name>)",
description = "Teleport to player or position",
privs = {teleport=true},
func = function(name, param)
@ -413,7 +413,7 @@ core.register_chatcommand("teleport", {
})
core.register_chatcommand("set", {
params = "[-n] <name> <value> | <name>",
params = "([-n] <name> <value>) | <name>",
description = "Set or read server configuration setting",
privs = {server=true},
func = function(name, param)
@ -468,9 +468,9 @@ local function emergeblocks_progress_update(ctx)
end
core.register_chatcommand("emergeblocks", {
params = "(here [radius]) | (<pos1> <pos2>)",
params = "(here [<radius>]) | (<pos1> <pos2>)",
description = "Load (or, if nonexistent, generate) map blocks "
.. "contained in area pos1 to pos2",
.. "contained in area pos1 to pos2 (<pos1> and <pos2> must be in parentheses)",
privs = {server=true},
func = function(name, param)
local p1, p2 = parse_range_str(name, param)
@ -494,8 +494,9 @@ core.register_chatcommand("emergeblocks", {
})
core.register_chatcommand("deleteblocks", {
params = "(here [radius]) | (<pos1> <pos2>)",
description = "Delete map blocks contained in area pos1 to pos2",
params = "(here [<radius>]) | (<pos1> <pos2>)",
description = "Delete map blocks contained in area pos1 to pos2 "
.. "(<pos1> and <pos2> must be in parentheses)",
privs = {server=true},
func = function(name, param)
local p1, p2 = parse_range_str(name, param)
@ -513,8 +514,9 @@ core.register_chatcommand("deleteblocks", {
})
core.register_chatcommand("fixlight", {
params = "(here [radius]) | (<pos1> <pos2>)",
description = "Resets lighting in the area between pos1 and pos2",
params = "(here [<radius>]) | (<pos1> <pos2>)",
description = "Resets lighting in the area between pos1 and pos2 "
.. "(<pos1> and <pos2> must be in parentheses)",
privs = {server = true},
func = function(name, param)
local p1, p2 = parse_range_str(name, param)
@ -661,7 +663,7 @@ core.register_on_punchnode(function(pos, node, puncher)
end)
core.register_chatcommand("rollback_check", {
params = "[<range>] [<seconds>] [limit]",
params = "[<range>] [<seconds>] [<limit>]",
description = "Check who last touched a node or a node near it"
.. " within the time specified by <seconds>. Default: range = 0,"
.. " seconds = 86400 = 24h, limit = 5",
@ -714,7 +716,7 @@ core.register_chatcommand("rollback_check", {
})
core.register_chatcommand("rollback", {
params = "<player name> [<seconds>] | :<actor> [<seconds>]",
params = "(<name> [<seconds>]) | (:<actor> [<seconds>])",
description = "Revert actions of a player. Default for <seconds> is 60",
privs = {rollback=true},
func = function(name, param)
@ -806,8 +808,8 @@ core.register_chatcommand("days", {
})
core.register_chatcommand("shutdown", {
description = "Shutdown server",
params = "[delay_in_seconds(0..inf) or -1 for cancel] [reconnect] [message]",
params = "[<delay_in_seconds> | -1] [reconnect] [<message>]",
description = "Shutdown server (-1 cancels a delayed shutdown)",
privs = {server=true},
func = function(name, param)
local delay, reconnect, message = param:match("([^ ][-]?[0-9]+)([^ ]+)(.*)")
@ -845,7 +847,7 @@ core.register_chatcommand("ban", {
})
core.register_chatcommand("unban", {
params = "<name/ip>",
params = "<name> | <IP_address>",
description = "Remove IP ban",
privs = {ban=true},
func = function(name, param)
@ -858,7 +860,7 @@ core.register_chatcommand("unban", {
})
core.register_chatcommand("kick", {
params = "<name> [reason]",
params = "<name> [<reason>]",
description = "Kick a player",
privs = {kick=true},
func = function(name, param)
@ -877,7 +879,7 @@ core.register_chatcommand("kick", {
})
core.register_chatcommand("clearobjects", {
params = "[full|quick]",
params = "[full | quick]",
description = "Clear all objects in world",
privs = {server=true},
func = function(name, param)
@ -923,7 +925,7 @@ core.register_chatcommand("msg", {
})
core.register_chatcommand("last-login", {
params = "[name]",
params = "[<name>]",
description = "Get the last login time of a player",
func = function(name, param)
if param == "" then
@ -940,7 +942,7 @@ core.register_chatcommand("last-login", {
})
core.register_chatcommand("clearinv", {
params = "[name]",
params = "[<name>]",
description = "Clear the inventory of yourself or another player",
func = function(name, param)
local player

View File

@ -196,7 +196,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
return
end
if setting_type == "path" then
if setting_type == "path" or setting_type == "filepath" then
local default = remaining_line:match("^(.*)$")
if not default then
@ -206,7 +206,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
table.insert(settings, {
name = name,
readable_name = readable_name,
type = "path",
type = setting_type,
default = default,
comment = current_comment,
})
@ -504,14 +504,14 @@ local function create_change_setting_formspec(dialogdata)
end
formspec = formspec .. ";" .. selected_index .. "]"
elseif setting.type == "path" then
elseif setting.type == "path" or setting.type == "filepath" then
local current_value = dialogdata.selected_path
if not current_value then
current_value = get_current_value(setting)
end
formspec = formspec .. "field[0.5,4;7.5,1;te_setting_value;;"
.. core.formspec_escape(current_value) .. "]"
.. "button[8,3.75;2,1;btn_browser_path;" .. fgettext("Browse") .. "]"
.. "button[8,3.75;2,1;btn_browser_" .. setting.type .. ";" .. fgettext("Browse") .. "]"
else
-- TODO: fancy input for float, int, flags, noise_params, v3f
@ -606,7 +606,13 @@ local function handle_change_setting_buttons(this, fields)
end
if fields["btn_browser_path"] then
core.show_file_open_dialog("dlg_browse_path", fgettext_ne("Select path"))
core.show_path_select_dialog("dlg_browse_path",
fgettext_ne("Select directory"), false)
end
if fields["btn_browser_filepath"] then
core.show_path_select_dialog("dlg_browse_path",
fgettext_ne("Select file"), true)
end
if fields["dlg_browse_path_accepted"] then

View File

@ -19,61 +19,68 @@
local core_developers = {
"Perttu Ahola (celeron55) <celeron55@gmail.com>",
"Ryan Kwolek (kwolekr) <kwolekr@minetest.net>",
"sfan5 <sfan5@live.de>",
"kahrl <kahrl@gmx.net>",
"sapier",
"ShadowNinja <shadowninja@minetest.net>",
"Nathanaël Courant (Nore/Ekdohibs) <nore@mesecons.net>",
"Loic Blot (nerzhul/nrz) <loic.blot@unix-experience.fr>",
"Matt Gregory (paramat)",
"est31 <MTest31@outlook.com>",
"paramat",
"Craig Robbins (Zeno) <craig.d.robbins@gmail.com>",
"Auke Kok (sofar) <sofar@foo-projects.org>",
"Andrew Ward (rubenwardy) <rubenwardy@gmail.com>",
"rubenwardy <rw@rubenwardy.com>",
"Krock/SmallJoker <mk939@ymail.com>",
}
local active_contributors = {
"Duane Robertson <duane@duanerobertson.com>",
"SmallJoker <mk939@ymail.com>",
"Lars Hofhansl <larsh@apache.org>",
"Jeija <jeija@mesecons.net>",
"Gregory Currie (gregorycu)",
"Sokomine <wegwerf@anarres.dyndns.org>",
"TeTpaAka",
"Jean-Patrick G (kilbith) <jeanpatrick.guerrero@gmail.com>",
"Diego Martínez (kaeza) <kaeza@users.sf.net>",
"Dániel Juhász (juhdanad) <juhdanad@gmail.com>",
"Rogier <rogier777@gmail.com>",
"red-001 <red-001@outlook.ie> [CSM & Menu fixes]",
"Dániel Juhász (juhdanad) <juhdanad@gmail.com> [Audiovisuals: lighting]",
"numberZero [Audiovisuals: meshgen]",
"Lars Hofhansl <larsh@apache.org> [Occulusion culling, fixes]",
"Jean-Patrick G (kilbith) <jeanpatrick.guerrero@gmail.com> [Audiovisuals]",
"Vincent Glize (Dumbeldor) <vincent.glize@live.fr> [CSM]",
"bigfoot547 [CSM]",
"Rogier <rogier777@gmail.com> [Fixes]",
"Wuzzy [Audiovisuals]",
"Shara/Ezhh [Settings]",
}
local previous_core_developers = {
"BlockMen",
"Maciej Kasatkin (RealBadAngel) <maciej.kasatkin@o2.pl>",
"Maciej Kasatkin (RealBadAngel) [RIP]",
"Lisa Milne (darkrose) <lisa@ltmnet.com>",
"proller",
"Ilya Zhuravlev (xyz) <xyz@minetest.net>",
"PilzAdam <pilzadam@minetest.net>",
"est31 <MTest31@outlook.com>",
"kahrl <kahrl@gmx.net>",
"Ryan Kwolek (kwolekr) <kwolekr@minetest.net>",
"sapier",
}
local previous_contributors = {
"Vanessa Ezekowitz (VanessaE) <vanessaezekowitz@gmail.com>",
"Jurgen Doser (doserj) <jurgen.doser@gmail.com>",
"MirceaKitsune <mirceakitsune@gmail.com>",
"dannydark <the_skeleton_of_a_child@yahoo.co.uk>",
"0gb.us <0gb.us@0gb.us>",
"Guiseppe Bilotta (Oblomov) <guiseppe.bilotta@gmail.com>",
"Jonathan Neuschafer <j.neuschaefer@gmx.net>",
"Nils Dagsson Moskopp (erlehmann) <nils@dieweltistgarnichtso.net>",
"Břetislav Štec (t0suj4/TBC_x)",
"Aaron Suen <warr1024@gmail.com>",
"Constantin Wenger (SpeedProg) <constantin.wenger@googlemail.com>",
"matttpt <matttpt@gmail.com>",
"JacobF <queatz@gmail.com>",
"TriBlade9 <triblade9@mail.com>",
"Zefram <zefram@fysh.org>",
"Gregory Currie (gregorycu) [optimisation]",
"Diego Martínez (kaeza) <kaeza@users.sf.net>",
"T4im [Profiler]",
"TeTpaAka [Hand overriding, nametag colors]",
"HybridDog [Fixes]",
"Duane Robertson <duane@duanerobertson.com> [MGValleys]",
"neoascetic [OS X Fixes]",
"TriBlade9 <triblade9@mail.com> [Audiovisuals]",
"Jurgen Doser (doserj) <jurgen.doser@gmail.com> [Fixes]",
"MirceaKitsune <mirceakitsune@gmail.com> [Audiovisuals]",
"Guiseppe Bilotta (Oblomov) <guiseppe.bilotta@gmail.com> [Fixes]",
"matttpt <matttpt@gmail.com> [Fixes]",
"Nils Dagsson Moskopp (erlehmann) <nils@dieweltistgarnichtso.net> [Minetest Logo]",
"Jeija <jeija@mesecons.net> [HTTP, particles]",
}
local function buildCreditList(source)
local ret = {}
for i = 1, #source do
ret[i] = core.formspec_escape(source[i])
end
return table.concat(ret, ",,")
end
return {
name = "credits",
caption = fgettext("Credits"),
@ -87,13 +94,13 @@ return {
"tableoptions[background=#00000000;highlight=#00000000;border=false]" ..
"table[3.5,-0.25;8.5,6.05;list_credits;" ..
"#FFFF00," .. fgettext("Core Developers") .. ",," ..
table.concat(core_developers, ",,") .. ",,," ..
buildCreditList(core_developers) .. ",,," ..
"#FFFF00," .. fgettext("Active Contributors") .. ",," ..
table.concat(active_contributors, ",,") .. ",,," ..
buildCreditList(active_contributors) .. ",,," ..
"#FFFF00," .. fgettext("Previous Core Developers") ..",," ..
table.concat(previous_core_developers, ",,") .. ",,," ..
buildCreditList(previous_core_developers) .. ",,," ..
"#FFFF00," .. fgettext("Previous Contributors") .. ",," ..
table.concat(previous_contributors, ",,") .. "," ..
buildCreditList(previous_contributors) .. "," ..
";1]"
end
}

View File

@ -247,17 +247,20 @@ local function formspec(tabview, name, tabdata)
.. dump(core.settings:get_bool("enable_waving_plants")) .. "]"
else
tab_string = tab_string ..
"tablecolumns[color;text]" ..
"tableoptions[background=#00000000;highlight=#00000000;border=false]" ..
"table[8.33,0.7;3.5,4;shaders;" ..
"#888888," .. fgettext("Bump Mapping") .. "," ..
"#888888," .. fgettext("Tone Mapping") .. "," ..
"#888888," .. fgettext("Normal Mapping") .. "," ..
"#888888," .. fgettext("Parallax Occlusion") .. "," ..
"#888888," .. fgettext("Waving Water") .. "," ..
"#888888," .. fgettext("Waving Leaves") .. "," ..
"#888888," .. fgettext("Waving Plants") .. "," ..
";1]"
"label[8.38,0.7;" .. core.colorize("#888888",
fgettext("Bump Mapping")) .. "]" ..
"label[8.38,1.2;" .. core.colorize("#888888",
fgettext("Tone Mapping")) .. "]" ..
"label[8.38,1.7;" .. core.colorize("#888888",
fgettext("Normal Mapping")) .. "]" ..
"label[8.38,2.2;" .. core.colorize("#888888",
fgettext("Parallax Occlusion")) .. "]" ..
"label[8.38,2.7;" .. core.colorize("#888888",
fgettext("Waving Water")) .. "]" ..
"label[8.38,3.2;" .. core.colorize("#888888",
fgettext("Waving Leaves")) .. "]" ..
"label[8.38,3.7;" .. core.colorize("#888888",
fgettext("Waving Plants")) .. "]"
end
return tab_string

View File

@ -12,6 +12,7 @@
# - float
# - enum
# - path
# - filepath
# - key (will be ignored in GUI, since a special key change dialog exists)
# - flags
# - noise_params
@ -31,6 +32,8 @@
# - default value1,value2,...
# * path:
# - default (if default is not specified then "" is set)
# * filepath:
# - default (if default is not specified then "" is set)
# * key:
# - default
# * flags:
@ -101,7 +104,7 @@ repeat_rightclick_time (Rightclick repetition interval) float 0.25
# Enable random user input (only used for testing).
random_input (Random input) bool false
# Continuous forward movement (only used for testing).
# Continuous forward movement, toggled by autoforward key.
continuous_forward (Continuous forward) bool false
# Enable Joysticks
@ -206,9 +209,9 @@ keymap_increase_volume (Inc. volume key) key
# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3
keymap_decrease_volume (Dec. volume key) key
# Key for toggling autorun.
# Key for toggling autoforward.
# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3
keymap_autorun (Autorun key) key
keymap_autoforward (Automatic forwards key) key
# Key for toggling cinematic mode.
# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3
@ -477,10 +480,10 @@ pause_fps_max (FPS in pause menu) int 20
viewing_range (Viewing range) int 100 20 4000
# Width component of the initial window size.
screenW (Screen width) int 800
screen_w (Screen width) int 800
# Height component of the initial window size.
screenH (Screen height) int 600
screen_h (Screen height) int 600
# Save window size automatically when modified.
autosave_screensize (Autosave Screen Size) bool true
@ -642,7 +645,7 @@ tooltip_show_delay (Tooltip delay) int 400
freetype (Freetype fonts) bool true
# Path to TrueTypeFont or bitmap.
font_path (Font path) path fonts/liberationsans.ttf
font_path (Font path) filepath fonts/liberationsans.ttf
font_size (Font size) int 16
@ -652,12 +655,12 @@ font_shadow (Font shadow) int 1
# Font shadow alpha (opaqueness, between 0 and 255).
font_shadow_alpha (Font shadow alpha) int 127 0 255
mono_font_path (Monospace font path) path fonts/liberationmono.ttf
mono_font_path (Monospace font path) filepath fonts/liberationmono.ttf
mono_font_size (Monospace font size) int 15
# This font will be used for certain languages.
fallback_font_path (Fallback font) path fonts/DroidSansFallbackFull.ttf
fallback_font_path (Fallback font) filepath fonts/DroidSansFallbackFull.ttf
fallback_font_size (Fallback font size) int 15
fallback_font_shadow (Fallback font shadow) int 1
fallback_font_shadow_alpha (Fallback font shadow alpha) int 128 0 255
@ -721,10 +724,9 @@ server_announce (Announce server) bool false
# If you want to announce your ipv6 address, use serverlist_url = v6.servers.minetest.net.
serverlist_url (Serverlist URL) string servers.minetest.net
# Disable escape sequences, e.g. chat coloring.
# Use this if you want to run a server with pre-0.4.14 clients and you want to disable
# the escape sequences generated by mods.
disable_escape_sequences (Disable escape sequences) bool false
# Remove color codes from incoming chat messages
# Use this to stop players from being able to use color in their messages
strip_color_codes (Strip color codes) bool false
[*Network]
@ -886,7 +888,6 @@ movement_speed_crouch (Crouch speed) float 1.35
movement_speed_fast (Fast mode speed) float 20
movement_speed_climb (Climbing speed) float 3
movement_speed_jump (Jumping speed) float 6.5
movement_speed_descend (Descending speed) float 6
movement_liquid_fluidity (Liquid fluidity) float 1
movement_liquid_fluidity_smooth (Liquid fluidity smoothing) float 0.5
movement_liquid_sink (Liquid sink) float 10

View File

@ -30,13 +30,13 @@ core.register_on_item_use(function(itemstack, pointed_thing)
end)
-- This is an example function to ensure it's working properly, should be removed before merge
core.register_on_receiving_chat_messages(function(message)
core.register_on_receiving_chat_message(function(message)
print("[PREVIEW] Received message " .. message)
return false
end)
-- This is an example function to ensure it's working properly, should be removed before merge
core.register_on_sending_chat_messages(function(message)
core.register_on_sending_chat_message(function(message)
print("[PREVIEW] Sending message " .. message)
return false
end)
@ -150,3 +150,8 @@ core.register_on_punchnode(function(pos, node)
return false
end)
core.register_chatcommand("privs", {
func = function(param)
return true, core.privs_to_string(minetest.get_privilege_list())
end,
})

View File

@ -1,4 +1,4 @@
Minetest Lua Client Modding API Reference 0.4.15
Minetest Lua Client Modding API Reference 0.4.16
================================================
* More information at <http://www.minetest.net/>
* Developer Wiki: <http://dev.minetest.net/>
@ -648,10 +648,10 @@ Call these functions only at load time!
semi-frequent intervals as well as on server shutdown.
* `minetest.register_on_connect(func())`
* Called at the end of client connection (when player is loaded onto map)
* `minetest.register_on_receiving_chat_message(func(name, message))`
* `minetest.register_on_receiving_chat_message(func(message))`
* Called always when a client receive a message
* Return `true` to mark the message as handled, which means that it will not be shown to chat
* `minetest.register_on_sending_chat_message(func(name, message))`
* `minetest.register_on_sending_chat_message(func(message))`
* Called always when a client send a message from chat
* Return `true` to mark the message as handled, which means that it will not be sent to server
* `minetest.register_chatcommand(cmd, chatcommand definition)`
@ -676,7 +676,7 @@ Call these functions only at load time!
* Called when the local player punches a node
* Newest functions are called first
* If any function returns true, the punch is ignored
* `minetest.register_on_placenode(function(pointed_thing, node))`
* `minetest.register_on_placenode(function(pointed_thing, node))`
* Called when a node has been placed
* `minetest.register_on_item_use(func(item, pointed_thing))`
* Called when the local player uses an item.
@ -730,6 +730,13 @@ Call these functions only at load time!
* `minetest.localplayer`
* Reference to the LocalPlayer object. See [`LocalPlayer`](#localplayer) class reference for methods.
### Privileges
* `minetest.get_privilege_list()`
* Returns a list of privileges the currect player has in the format `{priv1=true,...}`
* `minetest.string_to_privs(str)`: returns `{priv1=true,...}`
* `minetest.privs_to_string(privs)`: returns `"priv1,priv2,..."`
* Convert between two privilege representations
### Client Environment
* `minetest.get_player_names()`
* Returns list of player names on server
@ -1117,15 +1124,15 @@ The following functions provide escape sequences:
`minetest.get_color_escape_sequence(color) ..
message ..
minetest.get_color_escape_sequence("#ffffff")`
* `color.get_background_escape_sequence(color)`
* `minetest.get_background_escape_sequence(color)`
* `color` is a [ColorString](#colorstring)
* The escape sequence sets the background of the whole text element to
`color`. Only defined for item descriptions and tooltips.
* `color.strip_foreground_colors(str)`
* `minetest.strip_foreground_colors(str)`
* Removes foreground colors added by `get_color_escape_sequence`.
* `color.strip_background_colors(str)`
* `minetest.strip_background_colors(str)`
* Removes background colors added by `get_background_escape_sequence`.
* `color.strip_colors(str)`
* `minetest.strip_colors(str)`
* Removes all color escape sequences.
`ColorString`

View File

@ -1,4 +1,4 @@
Minetest Lua Modding API Reference 0.4.15
Minetest Lua Modding API Reference 0.4.16
=========================================
* More information at <http://www.minetest.net/>
* Developer Wiki: <http://dev.minetest.net/>
@ -186,7 +186,11 @@ Naming convention for registered textual names
----------------------------------------------
Registered names should generally be in this format:
"modname:<whatever>" (<whatever> can have characters a-zA-Z0-9_)
`modname:<whatever>`
`<whatever>` can have these characters:
a-zA-Z0-9_
This is to prevent conflicting names from corrupting maps and is
enforced by the mod loader.
@ -209,7 +213,7 @@ The `:` prefix can also be used for maintaining backwards compatibility.
### Aliases
Aliases can be added by using `minetest.register_alias(name, convert_to)` or
`minetest.register_alias_force(name, convert_to).
`minetest.register_alias_force(name, convert_to)`.
This will make Minetest to convert things called name to things called
`convert_to`.
@ -309,10 +313,10 @@ Example:
default_sandstone.png^[resize:16x16
#### `[opacity:<r>`
Makes the base image transparent according to the given ratio.
r must be between 0 and 255.
0 means totally transparent.
255 means totally opaque.
Makes the base image transparent according to the given ratio.
`r` must be between 0 and 255.
0 means totally transparent. 255 means totally opaque.
Example:
@ -426,6 +430,167 @@ Result is more like what you'd expect if you put a color on top of another
color. Meaning white surfaces get a lot of your new color while black parts don't
change very much.
Hardware coloring
-----------------
The goal of hardware coloring is to simplify the creation of
colorful nodes. If your textures use the same pattern, and they only
differ in their color (like colored wool blocks), you can use hardware
coloring instead of creating and managing many texture files.
All of these methods use color multiplication (so a white-black texture
with red coloring will result in red-black color).
### Static coloring
This method is useful if you wish to create nodes/items with
the same texture, in different colors, each in a new node/item definition.
#### Global color
When you register an item or node, set its `color` field (which accepts a
`ColorSpec`) to the desired color.
An `ItemStack`s static color can be overwritten by the `color` metadata
field. If you set that field to a `ColorString`, that color will be used.
#### Tile color
Each tile may have an individual static color, which overwrites every
other coloring methods. To disable the coloring of a face,
set its color to white (because multiplying with white does nothing).
You can set the `color` property of the tiles in the node's definition
if the tile is in table format.
### Palettes
For nodes and items which can have many colors, a palette is more
suitable. A palette is a texture, which can contain up to 256 pixels.
Each pixel is one possible color for the node/item.
You can register one node/item, which can have up to 256 colors.
#### Palette indexing
When using palettes, you always provide a pixel index for the given
node or `ItemStack`. The palette is read from left to right and from
top to bottom. If the palette has less than 256 pixels, then it is
stretched to contain exactly 256 pixels (after arranging the pixels
to one line). The indexing starts from 0.
Examples:
* 16x16 palette, index = 0: the top left corner
* 16x16 palette, index = 4: the fifth pixel in the first row
* 16x16 palette, index = 16: the pixel below the top left corner
* 16x16 palette, index = 255: the bottom right corner
* 2 (width)x4 (height) palette, index=31: the top left corner.
The palette has 8 pixels, so each pixel is stretched to 32 pixels,
to ensure the total 256 pixels.
* 2x4 palette, index=32: the top right corner
* 2x4 palette, index=63: the top right corner
* 2x4 palette, index=64: the pixel below the top left corner
#### Using palettes with items
When registering an item, set the item definition's `palette` field to
a texture. You can also use texture modifiers.
The `ItemStack`'s color depends on the `palette_index` field of the
stack's metadata. `palette_index` is an integer, which specifies the
index of the pixel to use.
#### Linking palettes with nodes
When registering a node, set the item definition's `palette` field to
a texture. You can also use texture modifiers.
The node's color depends on its `param2`, so you also must set an
appropriate `drawtype`:
* `drawtype = "color"` for nodes which use their full `param2` for
palette indexing. These nodes can have 256 different colors.
The palette should contain 256 pixels.
* `drawtype = "colorwallmounted"` for nodes which use the first
five bits (most significant) of `param2` for palette indexing.
The remaining three bits are describing rotation, as in `wallmounted`
draw type. Division by 8 yields the palette index (without stretching the
palette). These nodes can have 32 different colors, and the palette
should contain 32 pixels.
Examples:
* `param2 = 17` is 2 * 8 + 1, so the rotation is 1 and the third (= 2 + 1)
pixel will be picked from the palette.
* `param2 = 35` is 4 * 8 + 3, so the rotation is 3 and the fifth (= 4 + 1)
pixel will be picked from the palette.
* `drawtype = "colorfacedir"` for nodes which use the first
three bits of `param2` for palette indexing. The remaining
five bits are describing rotation, as in `facedir` draw type.
Division by 32 yields the palette index (without stretching the
palette). These nodes can have 8 different colors, and the
palette should contain 8 pixels.
Examples:
* `param2 = 17` is 0 * 32 + 17, so the rotation is 17 and the
first (= 0 + 1) pixel will be picked from the palette.
* `param2 = 35` is 1 * 32 + 3, so the rotation is 3 and the
second (= 1 + 1) pixel will be picked from the palette.
To colorize a node on the map, set its `param2` value (according
to the node's draw type).
### Conversion between nodes in the inventory and the on the map
Static coloring is the same for both cases, there is no need
for conversion.
If the `ItemStack`'s metadata contains the `color` field, it will be
lost on placement, because nodes on the map can only use palettes.
If the `ItemStack`'s metadata contains the `palette_index` field, you
currently must manually convert between it and the node's `param2` with
custom `on_place` and `on_dig` callbacks.
### Colored items in craft recipes
Craft recipes only support item strings, but fortunately item strings
can also contain metadata. Example craft recipe registration:
local stack = ItemStack("wool:block")
dyed:get_meta():set_int("palette_index", 3) -- add index
minetest.register_craft({
output = dyed:to_string(), -- convert to string
type = "shapeless",
recipe = {
"wool:block",
"dye:red",
},
})
Metadata field filtering in the `recipe` field are not supported yet,
so the craft output is independent of the color of the ingredients.
Soft texture overlay
--------------------
Sometimes hardware coloring is not enough, because it affects the
whole tile. Soft texture overlays were added to Minetest to allow
the dynamic coloring of only specific parts of the node's texture.
For example a grass block may have colored grass, while keeping the
dirt brown.
These overlays are 'soft', because unlike texture modifiers, the layers
are not merged in the memory, but they are simply drawn on top of each
other. This allows different hardware coloring, but also means that
tiles with overlays are drawn slower. Using too much overlays might
cause FPS loss.
To define an overlay, simply set the `overlay_tiles` field of the node
definition. These tiles are defined in the same way as plain tiles:
they can have a texture name, color etc.
To skip one face, set that overlay tile to an empty string.
Example (colored grass block):
minetest.register_node("default:dirt_with_grass", {
description = "Dirt with Grass",
-- Regular tiles, as usual
-- The dirt tile disables palette coloring
tiles = {{name = "default_grass.png"},
{name = "default_dirt.png", color = "white"}},
-- Overlay tiles: define them in the same style
-- The top and bottom tile does not have overlay
overlay_tiles = {"", "",
{name = "default_grass_side.png", tileable_vertical = false}},
-- Global color, used in inventory
color = "green",
-- Palette in the world
paramtype2 = "color",
palette = "default_foilage.png",
})
Sounds
------
Only Ogg Vorbis files are supported.
@ -457,12 +622,14 @@ Examples of sound parameter tables:
{
gain = 1.0, -- default
fade = 0.0, -- default, change to a value > 0 to fade the sound in
pitch = 1.0, -- default
}
-- Play locationless to one player
{
to_player = name,
gain = 1.0, -- default
fade = 0.0, -- default, change to a value > 0 to fade the sound in
pitch = 1.0, -- default
}
-- Play locationless to one player, looped
{
@ -493,6 +660,7 @@ one player using `to_player = name,`
* e.g. `{}`
* e.g. `{name = "default_place_node"}`
* e.g. `{name = "default_place_node", gain = 1.0}`
* e.g. `{name = "default_place_node", gain = 1.0, pitch = 1.0}`
Registered definitions of stuff
-------------------------------
@ -515,7 +683,7 @@ the global `minetest.registered_*` tables.
* `minetest.unregister_item(name)`
* Unregisters the item name from engine, and deletes the entry with key
* `name` from `minetest.registered_items` and from the associated item
* table according to its nature: minetest.registered_nodes[] etc
* table according to its nature: `minetest.registered_nodes[]` etc
* `minetest.register_biome(biome definition)`
* returns an integer uniquely identifying the registered biome
@ -593,9 +761,9 @@ They are represented by a table:
{name="name", param1=num, param2=num}
`param1` and `param2` are 8-bit integers. The engine uses them for certain
automated functions. If you don't use these functions, you can use them to
store arbitrary values.
`param1` and `param2` are 8-bit integers ranging from 0 to 255. The engine uses
them for certain automated functions. If you don't use these functions, you can
use them to store arbitrary values.
The functions of `param1` and `param2` are determined by certain fields in the
node definition:
@ -664,15 +832,6 @@ node definition:
^ Only valid for "glasslike_framed" or "glasslike_framed_optional" drawtypes.
param2 defines 64 levels of internal liquid.
Liquid texture is defined using `special_tiles = {"modname_tilename.png"},`
collision_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
},
^ defines list of collision boxes for the node. If empty, collision boxes
will be the same as nodeboxes, in case of any other nodes will be full cube
as in the example above.
Nodes can also contain extra data. See "Node Metadata".
@ -823,6 +982,7 @@ If no flags are specified (or defaults is), 2D noise is eased and 3D noise is no
Accumulates the absolute value of each noise gradient result.
Noise parameters format example for 2D or 3D perlin noise or perlin noise maps:
np_terrain = {
offset = 0,
scale = 1,
@ -833,8 +993,8 @@ Noise parameters format example for 2D or 3D perlin noise or perlin noise maps:
lacunarity = 2.0,
flags = "defaults, absvalue"
}
^ A single noise parameter table can be used to get 2D or 3D noise,
when getting 2D noise spread.z is ignored.
^ A single noise parameter table can be used to get 2D or 3D noise,
when getting 2D noise spread.z is ignored.
Ore types
@ -906,14 +1066,15 @@ to small changes. The following is a decent set of parameters to work from:
},
noise_threshold = 1.6
WARNING: Use this ore type *very* sparingly since it is ~200x more
**WARNING**: Use this ore type *very* sparingly since it is ~200x more
computationally expensive than any other ore.
Ore attributes
--------------
See section "Flag Specifier Format".
Currently supported flags: `absheight`
Currently supported flags:
`absheight`, `puff_cliffs`, `puff_additive_composition`.
### `absheight`
Also produce this same ore between the height range of `-y_max` and `-y_min`.
@ -969,6 +1130,7 @@ in the form of a table. This table specifies the following fields:
previous contents (default: false)
About probability values:
* A probability value of `0` or `1` means that node will never appear (0% chance).
* A probability value of `254` or `255` means the node will always appear (100% chance).
* If the probability value `p` is greater than `1`, then there is a
@ -1123,16 +1285,32 @@ There are three kinds of items: nodes, tools and craftitems.
things according to `tool_capabilities`.
* Craftitem (`register_craftitem`): A miscellaneous item.
### Amount and wear
All item stacks have an amount between 0 to 65535. It is 1 by
default. Tool item stacks can not have an amount greater than 1.
Tools use a wear (=damage) value ranging from 0 to 65535. The
value 0 is the default and used is for unworn tools. The values
1 to 65535 are used for worn tools, where a higher value stands for
a higher wear. Non-tools always have a wear value of 0.
### Item formats
Items and item stacks can exist in three formats: Serializes, table format
and `ItemStack`.
#### Serialized
This is called "stackstring" or "itemstring":
This is called "stackstring" or "itemstring". It is a simple string with
1-3 components: the full item identifier, an optional amount and an optional
wear value. Syntax:
* e.g. `'default:dirt 5'`
* e.g. `'default:pick_wood 21323'`
* e.g. `'default:apple'`
<identifier> [<amount>[ <wear>]]
Examples:
* `'default:apple'`: 1 apple
* `'default:dirt 5'`: 5 dirt
* `'default:pick_stone'`: a new stone pickaxe
* `'default:pick_wood 1 21323'`: a wooden pickaxe, ca. 1/3 worn out
#### Table format
Examples:
@ -1226,6 +1404,9 @@ Another example: Make red wool from white wool and red dye:
### Special groups
* `immortal`: Disables the group damage system for an entity
* `punch_operable`: For entities; disables the regular damage mechanism for
players punching it by hand or a non-tool item, so that it can do something
else than take damage.
* `level`: Can be used to give an additional sense of progression in the game.
* A larger level will cause e.g. a weapon of a lower level make much less
damage, and get worn out much faster, or not be able to get drops
@ -1264,6 +1445,7 @@ Another example: Make red wool from white wool and red dye:
### Examples of custom groups
Item groups are often used for defining, well, _groups of items_.
* `meat`: any meat-kind of a thing (rating might define the size or healing
ability or be irrelevant -- it is not defined as of yet)
* `eatable`: anything that can be eaten. Rating might define HP gain in half
@ -1484,7 +1666,7 @@ Item metadata only contains a key-value store.
Some of the values in the key-value store are handled specially:
* `description`: Set the itemstack's description. Defaults to idef.description
* `description`: Set the item stack's description. Defaults to `idef.description`
* `color`: A `ColorString`, which sets the stack's color.
* `palette_index`: If the item has a palette, this is used to get the
current color from the palette.
@ -1546,7 +1728,7 @@ examples.
#### `container[<X>,<Y>]`
* Start of a container block, moves all physical elements in the container by (X, Y)
* Must have matching container_end
* Must have matching `container_end`
* Containers can be nested, in which case the offsets are added
(child containers are relative to parent containers)
@ -1631,7 +1813,7 @@ examples.
#### `field[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]`
* Textual field; will be sent to server when a button is clicked
* When enter is pressed in field, fields.key_enter_field will be sent with the name
* When enter is pressed in field, `fields.key_enter_field` will be sent with the name
of this field.
* `x` and `y` position the field relative to the top left of the menu
* `w` and `h` are the size of the field
@ -1643,16 +1825,16 @@ examples.
* `default` may contain variable references such as `${text}'` which
will fill the value from the metadata value `text`
* **Note**: no extra text or more than a single variable is supported ATM.
* See field_close_on_enter to stop enter closing the formspec
* See `field_close_on_enter` to stop enter closing the formspec
#### `field[<name>;<label>;<default>]`
* As above, but without position/size units
* When enter is pressed in field, fields.key_enter_field will be sent with the name
* When enter is pressed in field, `fields.key_enter_field` will be sent with the name
of this field.
* Special field for creating simple forms, such as sign text input
* Must be used without a `size[]` element
* A "Proceed" button will be added automatically
* See field_close_on_enter to stop enter closing the formspec
* See `field_close_on_enter` to stop enter closing the formspec
#### `field_close_on_enter[<name>;<close_on_enter>]`
* <name> is the name of the field
@ -1872,6 +2054,7 @@ Escape sequences
Most text can contain escape sequences, that can for example color the text.
There are a few exceptions: tab headers, dropdowns and vertical labels can't.
The following functions provide escape sequences:
* `minetest.get_color_escape_sequence(color)`:
* `color` is a ColorString
* The escape sequence sets the text color to `color`
@ -1880,15 +2063,15 @@ The following functions provide escape sequences:
`minetest.get_color_escape_sequence(color) ..
message ..
minetest.get_color_escape_sequence("#ffffff")`
* `color.get_background_escape_sequence(color)`
* `minetest.get_background_escape_sequence(color)`
* `color` is a ColorString
* The escape sequence sets the background of the whole text element to
`color`. Only defined for item descriptions and tooltips.
* `color.strip_foreground_colors(str)`
* `minetest.strip_foreground_colors(str)`
* Removes foreground colors added by `get_color_escape_sequence`.
* `color.strip_background_colors(str)`
* `minetest.strip_background_colors(str)`
* Removes background colors added by `get_background_escape_sequence`.
* `color.strip_colors(str)`
* `minetest.strip_colors(str)`
* Removes all color escape sequences.
Spatial Vectors
@ -1966,51 +2149,51 @@ Helper functions
* Useful for storing custom data
* `minetest.is_singleplayer()`
* `minetest.features`: Table containing API feature flags
{
glasslike_framed = true,
nodebox_as_selectionbox = true,
chat_send_player_param3 = true,
get_all_craft_recipes_works = true,
use_texture_alpha = true,
-- ^ The transparency channel of textures can be used optionally
no_legacy_abms = true,
-- ^ Tree and grass ABMs are no longer done from C++
texture_names_parens = true,
-- ^ Texture grouping is possible using parentheses
area_store_custom_ids = true,
-- ^ Unique Area ID for AreaStore:insert_area
add_entity_with_staticdata = true,
-- ^ add_entity supports passing initial staticdata to on_activate
no_chat_message_prediction = true,
-- ^ Chat messages are no longer predicted
}
{
glasslike_framed = true,
nodebox_as_selectionbox = true,
chat_send_player_param3 = true,
get_all_craft_recipes_works = true,
use_texture_alpha = true,
-- ^ The transparency channel of textures can be used optionally
no_legacy_abms = true,
-- ^ Tree and grass ABMs are no longer done from C++
texture_names_parens = true,
-- ^ Texture grouping is possible using parentheses
area_store_custom_ids = true,
-- ^ Unique Area ID for AreaStore:insert_area
add_entity_with_staticdata = true,
-- ^ add_entity supports passing initial staticdata to on_activate
no_chat_message_prediction = true,
-- ^ Chat messages are no longer predicted
}
* `minetest.has_feature(arg)`: returns `boolean, missing_features`
* `arg`: string or table in format `{foo=true, bar=true}`
* `missing_features`: `{foo=true, bar=true}`
* `minetest.get_player_information(player_name)`:
* Returns a table containing information about a player
Example return value:
{
address = "127.0.0.1", -- IP address of client
ip_version = 4, -- IPv4 / IPv6
min_rtt = 0.01, -- minimum round trip time
max_rtt = 0.2, -- maximum round trip time
avg_rtt = 0.02, -- average round trip time
min_jitter = 0.01, -- minimum packet time jitter
max_jitter = 0.5, -- maximum packet time jitter
avg_jitter = 0.03, -- average packet time jitter
connection_uptime = 200, -- seconds since client connected
prot_vers = 31, -- protocol version used by client
* Returns a table containing information about a player. Example return value:
-- following information is available on debug build only!!!
-- DO NOT USE IN MODS
--ser_vers = 26, -- serialization version used by client
--major = 0, -- major version number
--minor = 4, -- minor version number
--patch = 10, -- patch version number
--vers_string = "0.4.9-git", -- full version string
--state = "Active" -- current client state
}
{
address = "127.0.0.1", -- IP address of client
ip_version = 4, -- IPv4 / IPv6
min_rtt = 0.01, -- minimum round trip time
max_rtt = 0.2, -- maximum round trip time
avg_rtt = 0.02, -- average round trip time
min_jitter = 0.01, -- minimum packet time jitter
max_jitter = 0.5, -- maximum packet time jitter
avg_jitter = 0.03, -- average packet time jitter
connection_uptime = 200, -- seconds since client connected
prot_vers = 31, -- protocol version used by client
-- following information is available on debug build only!!!
-- DO NOT USE IN MODS
--ser_vers = 26, -- serialization version used by client
--major = 0, -- major version number
--minor = 4, -- minor version number
--patch = 10, -- patch version number
--vers_string = "0.4.9-git", -- full version string
--state = "Active" -- current client state
}
* `minetest.mkdir(path)`: returns success.
* Creates a directory specified by `path`, creating parent directories
if they don't exist.
@ -2057,7 +2240,7 @@ Call these functions only at load time!
* Specify either output or input only. If you specify both, input will be ignored. For input use the same recipe table
syntax as for `minetest.register_craft(recipe)`. For output specify only the item, without a quantity.
* If no erase candidate could be found, Lua exception will be thrown.
* Warning! The type field ("shaped","cooking" or any other) will be ignored if the recipe
* **Warning**! The type field ("shaped","cooking" or any other) will be ignored if the recipe
contains output. Erasing is then done independently from the crafting method.
* `minetest.register_ore(ore definition)`
* `minetest.register_biome(biome definition)`
@ -2112,7 +2295,7 @@ Call these functions only at load time!
* Called when the player gets damaged or healed
* `player`: ObjectRef of the player
* `hp_change`: the amount of change. Negative when it is damage.
* `modifier`: when true, the function should return the actual hp_change.
* `modifier`: when true, the function should return the actual `hp_change`.
Note: modifiers only get a temporary hp_change that can be modified by later modifiers.
modifiers can return true as a second argument to stop the execution of further functions.
Non-modifiers receive the final hp change calculated by the modifiers.
@ -2166,16 +2349,16 @@ Call these functions only at load time!
### Other registration functions
* `minetest.register_chatcommand(cmd, chatcommand definition)`
* Adds definition to minetest.registered_chatcommands
* Adds definition to `minetest.registered_chatcommands`
* `minetest.override_chatcommand(name, redefinition)`
* Overrides fields of a chatcommand registered with register_chatcommand.
* Overrides fields of a chatcommand registered with `register_chatcommand`.
* `minetest.unregister_chatcommand(name)`
* Unregisters a chatcommands registered with register_chatcommand.
* Unregisters a chatcommands registered with `register_chatcommand`.
* `minetest.register_privilege(name, definition)`
* `definition`: `"description text"`
* `definition`: `{ description = "description text", give_to_singleplayer = boolean}`
the default of `give_to_singleplayer` is true
* To allow players with basic_privs to grant, see basic_privs minetest.conf setting.
* To allow players with `basic_privs` to grant, see `basic_privs` minetest.conf setting.
* `minetest.register_authentication_handler(handler)`
* See `minetest.builtin_auth_handler` in `builtin.lua` for reference
@ -2203,7 +2386,7 @@ Call these functions only at load time!
* on comparing the password hash in the database with the password hash
* from the function, with an externally provided password, as the hash
* in the db might use the new SRP verifier format.
* For this purpose, use minetest.check_password_entry instead.
* For this purpose, use `minetest.check_password_entry` instead.
* `minetest.string_to_privs(str)`: returns `{priv1=true,...}`
* `minetest.privs_to_string(privs)`: returns `"priv1,priv2,..."`
* Convert between two privilege representations
@ -2299,7 +2482,7 @@ and `minetest.auth_reload` call the authetification handler.
* `flags` is a flag field with the available flags: `dungeon`, `temple`, `cave_begin`,
`cave_end`, `large_cave_begin`, `large_cave_end`, `decoration`
* The second parameter is a list of IDS of decorations which notification is requested for
* `get_gen_notify()`: returns a flagstring and a table with the deco_ids
* `get_gen_notify()`: returns a flagstring and a table with the `deco_id`s
* `minetest.get_mapgen_object(objectname)`
* Return requested mapgen object if available (see "Mapgen objects")
* `minetest.get_biome_id(biome_name)`
@ -2307,9 +2490,9 @@ and `minetest.auth_reload` call the authetification handler.
given biome_name string.
* `minetest.get_mapgen_params()` Returns mapgen parameters, a table containing
`mgname`, `seed`, `chunksize`, `water_level`, and `flags`.
* Deprecated: use minetest.get_mapgen_setting(name) instead
* Deprecated: use `minetest.get_mapgen_setting(name)` instead
* `minetest.set_mapgen_params(MapgenParams)`
* Deprecated: use minetest.set_mapgen_setting(name, value, override) instead
* Deprecated: use `minetest.set_mapgen_setting(name, value, override)` instead
* Set map generation parameters
* Function cannot be called after the registration period; only initialization
and `on_mapgen_init`
@ -2334,7 +2517,7 @@ and `minetest.auth_reload` call the authetification handler.
is not already present in map_meta.txt.
* `override_meta` is an optional boolean (default: `false`). If this is set to true,
the setting will become the active setting regardless of the map metafile contents.
* Note: to set the seed, use "seed", not "fixed_map_seed"
* Note: to set the seed, use `"seed"`, not `"fixed_map_seed"`
* `minetest.set_mapgen_setting_noiseparams(name, value, [override_meta])`
* Same as above, except value is a NoiseParams table.
* `minetest.set_noiseparams(name, noiseparams, set_default)`
@ -2387,8 +2570,6 @@ and `minetest.auth_reload` call the authetification handler.
* `algorithm`: One of `"A*_noprefetch"` (default), `"A*"`, `"Dijkstra"`
* `minetest.spawn_tree (pos, {treedef})`
* spawns L-system tree at given `pos` with definition in `treedef` table
* Warning: L-system generation currently creates lighting bugs in the form of mapblock-sized shadows.
Often these bugs appear as subtle shadows in water.
* `minetest.transforming_liquid_add(pos)`
* add node to liquid update queue
* `minetest.get_node_max_level(pos)`
@ -2437,7 +2618,7 @@ and `minetest.auth_reload` call the authetification handler.
* `{type="detached", name="creative"}`
* `minetest.create_detached_inventory(name, callbacks, [player_name])`: returns an `InvRef`
* callbacks: See "Detached inventory callbacks"
* player_name: Make detached inventory available to one player exclusively,
* `player_name`: Make detached inventory available to one player exclusively,
by default they will be sent to every player (even if not used).
Note that this parameter is mostly just a workaround and will be removed in future releases.
* Creates a detached inventory. If it already exists, it is cleared.
@ -2453,11 +2634,11 @@ and `minetest.auth_reload` call the authetification handler.
* `formspec`: formspec to display
* `minetest.close_formspec(playername, formname)`
* `playername`: name of player to close formspec
* `formname`: has to exactly match the one given in show_formspec, or the formspec will
* `formname`: has to exactly match the one given in `show_formspec`, or the formspec will
not close.
* calling show_formspec(playername, formname, "") is equal to this expression
* calling `show_formspec(playername, formname, "")` is equal to this expression
* to close a formspec regardless of the formname, call
minetest.close_formspec(playername, ""). USE THIS ONLY WHEN ABSOLUTELY NECESSARY!
`minetest.close_formspec(playername, "")`. **USE THIS ONLY WHEN ABSOLUTELY NECESSARY!**
* `minetest.formspec_escape(string)`: returns a string
* escapes the characters "[", "]", "\", "," and ";", which can not be used in formspecs
* `minetest.explode_table_event(string)`: returns a table
@ -2523,6 +2704,7 @@ and `minetest.auth_reload` call the authetification handler.
* returns indexed table with all registered recipes for query item (node)
or `nil` if no recipe was found
* recipe entry table:
{
method = 'normal' or 'cooking' or 'fuel'
width = 0-3, 0 means shapeless recipe
@ -2530,10 +2712,11 @@ and `minetest.auth_reload` call the authetification handler.
output = string with item name and quantity
}
* Example query for `"default:gold_ingot"` will return table:
{
[1]={type = "cooking", width = 3, output = "default:gold_ingot",
[1]={method = "cooking", width = 3, output = "default:gold_ingot",
items = {1 = "default:gold_lump"}},
[2]={type = "normal", width = 1, output = "default:gold_ingot 9",
[2]={method = "normal", width = 1, output = "default:gold_ingot 9",
items = {1 = "default:goldblock"}}
}
* `minetest.handle_node_drops(pos, drops, digger)`
@ -2589,7 +2772,7 @@ These functions return the leftover itemstack.
* `parameters` is a sound parameter table
* `minetest.sound_stop(handle)`
* `minetest.sound_fade(handle, step, gain)`
* `handle` is a handle returned by minetest.sound_play
* `handle` is a handle returned by `minetest.sound_play`
* `step` determines how fast a sound will fade.
Negative step will lower the sound volume, positive step will increase the sound volume
* `gain` the target gain for the fade.
@ -2609,6 +2792,7 @@ These functions return the leftover itemstack.
* `minetest.get_server_status()`: returns server status string
* `minetest.get_server_uptime()`: returns the server uptime in seconds
* `minetest.remove_player(name)`: remove player from database (if he is not connected).
* Does not remove player authentication data, minetest.player_exists will continue to return true.
* Returns a code (0: successful, 1: no such player, 2: player is connected)
### Bans
@ -2634,7 +2818,7 @@ These functions return the leftover itemstack.
minsize, maxsize,
collisiondetection, texture, playername)`
* `minetest.delete_particlespawner(id, player)``
* `minetest.delete_particlespawner(id, player)`
* Delete `ParticleSpawner` with `id` (return value from `minetest.add_particlespawner`)
* If playername is specified, only deletes on the player's client,
* otherwise on all clients
@ -2901,7 +3085,7 @@ Can be obtained via `minetest.get_meta(pos)`.
* `mark_as_private(name or {name1, name2, ...})`: Mark specific vars as private
This will prevent them from being sent to the client. Note that the "private"
status will only be remembered if an associated key-value pair exists, meaning
it's best to call this when initializing all other meta (e.g. on_construct).
it's best to call this when initializing all other meta (e.g. `on_construct`).
### `ItemStackMetaRef`
ItemStack metadata: reference extra data and functionality stored in a stack.
@ -2926,7 +3110,7 @@ Can be gotten via `minetest.get_node_timer(pos)`.
* set a timer's state
* `timeout` is in seconds, and supports fractional values (0.1 etc)
* `elapsed` is in seconds, and supports fractional values (0.1 etc)
* will trigger the node's `on_timer` function after `timeout`-elapsed seconds
* will trigger the node's `on_timer` function after `(timeout - elapsed)` seconds
* `start(timeout)`
* start a timer
* equivalent to `set(timeout,0)`
@ -2935,7 +3119,7 @@ Can be gotten via `minetest.get_node_timer(pos)`.
* `get_timeout()`: returns current timeout in seconds
* if `timeout` equals `0`, timer is inactive
* `get_elapsed()`: returns current elapsed time in seconds
* the node's `on_timer` function will be called after `timeout`-elapsed seconds
* the node's `on_timer` function will be called after `(timeout - elapsed)` seconds
* `is_started()`: returns boolean state of timer
* returns `true` if timer is started, otherwise `false`
@ -2946,7 +3130,7 @@ This is basically a reference to a C++ `ServerActiveObject`
#### Methods
* `remove()`: remove object (after returning from Lua)
* Note: Doesn't work on players, use minetest.kick_player instead
* Note: Doesn't work on players, use `minetest.kick_player` instead
* `get_pos()`: returns `{x=num, y=num, z=num}`
* `set_pos(pos)`; `pos`=`{x=num, y=num, z=num}`
* `move_to(pos, continuous=false)`: interpolated move
@ -2965,7 +3149,7 @@ This is basically a reference to a C++ `ServerActiveObject`
* `set_armor_groups({group1=rating, group2=rating, ...})`
* `get_armor_groups()`: returns a table with the armor group ratings
* `set_animation({x=1,y=1}, frame_speed=15, frame_blend=0, frame_loop=true)`
* `get_animation()`: returns range, frame_speed, frame_blend and frame_loop
* `get_animation()`: returns `range`, `frame_speed`, `frame_blend` and `frame_loop`
* `set_attach(parent, bone, position, rotation)`
* `bone`: string
* `position`: `{x=num, y=num, z=num}` (relative)
@ -3023,12 +3207,12 @@ This is basically a reference to a C++ `ServerActiveObject`
* radians - Angle from looking forward, where positive is downwards.
* `set_look_horizontal(radians)`: sets look yaw
* radians - Angle from the +z direction, where positive is counter-clockwise.
* `get_look_pitch()`: pitch in radians - Deprecated as broken. Use get_look_vertical.
* `get_look_pitch()`: pitch in radians - Deprecated as broken. Use `get_look_vertical`.
* Angle ranges between -pi/2 and pi/2, which are straight down and up respectively.
* `get_look_yaw()`: yaw in radians - Deprecated as broken. Use get_look_horizontal.
* `get_look_yaw()`: yaw in radians - Deprecated as broken. Use `get_look_horizontal`.
* Angle is counter-clockwise from the +x direction.
* `set_look_pitch(radians)`: sets look pitch - Deprecated. Use set_look_vertical.
* `set_look_yaw(radians)`: sets look yaw - Deprecated. Use set_look_horizontal.
* `set_look_pitch(radians)`: sets look pitch - Deprecated. Use `set_look_vertical`.
* `set_look_yaw(radians)`: sets look yaw - Deprecated. Use `set_look_horizontal`.
* `get_breath()`: returns players breath
* `set_breath(value)`: sets players breath
* values:
@ -3037,11 +3221,14 @@ This is basically a reference to a C++ `ServerActiveObject`
* `11`: bubbles bar is not shown
* `set_attribute(attribute, value)`:
* Sets an extra attribute with value on player.
* If value is nil, remove attribute from player.
* `get_attribute(attribute)`: returns value for extra attribute. Returns nil if no attribute found.
* `value` must be a string.
* If `value` is `nil`, remove attribute from player.
* `get_attribute(attribute)`:
* Returns value (a string) for extra attribute.
* Returns `nil` if no attribute found.
* `set_inventory_formspec(formspec)`
* Redefine player's inventory form
* Should usually be called in on_joinplayer
* Should usually be called in `on_joinplayer`
* `get_inventory_formspec()`: returns a formspec string
* `get_player_control()`: returns table with player pressed keys
* `{jump=bool,right=bool,left=bool,LMB=bool,RMB=bool,sneak=bool,aux1=bool,down=bool,up=bool}`
@ -3058,7 +3245,7 @@ This is basically a reference to a C++ `ServerActiveObject`
(default: `false`)
* `new_move`: use new move/sneak code. When `false` the exact old code
is used for the specific old sneak behaviour (default: `true`)
* `get_physics_override()`: returns the table given to set_physics_override
* `get_physics_override()`: returns the table given to `set_physics_override`
* `hud_add(hud definition)`: add a HUD element described by HUD def, returns ID
number on success
* `hud_remove(id)`: remove the HUD element of the specified id
@ -3113,11 +3300,11 @@ This is basically a reference to a C++ `ServerActiveObject`
{x=189, y=198}, -- < dig animation key frames
{x=200, y=219}, -- < walk+dig animation key frames
frame_speed=30): -- < animation frame speed
* `get_local_animation()`: returns stand, walk, dig, dig+walk tables and frame_speed
* `get_local_animation()`: returns stand, walk, dig, dig+walk tables and `frame_speed`
* `set_eye_offset({x=0,y=0,z=0},{x=0,y=0,z=0})`: defines offset value for camera per player
* in first person view
* in third person view (max. values `{x=-10/10,y=-10,15,z=-5/5}`)
* `get_eye_offset()`: returns offset_first and offset_third
* `get_eye_offset()`: returns `offset_first` and `offset_third`
### `InvRef`
An `InvRef` is a reference to an inventory.
@ -3250,9 +3437,9 @@ It can be created via `PcgRandom(seed)` or `PcgRandom(seed, sequence)`.
* `next(min, max)`: return next integer random number [`min`...`max`]
* `rand_normal_dist(min, max, num_trials=6)`: return normally distributed random number [`min`...`max`]
* This is only a rough approximation of a normal distribution with:
* mean = (max - min) / 2, and
* variance = (((max - min + 1) ^ 2) - 1) / (12 * num_trials)
* Increasing num_trials improves accuracy of the approximation
* `mean = (max - min) / 2`, and
* `variance = (((max - min + 1) ^ 2) - 1) / (12 * num_trials)`
* Increasing `num_trials` improves accuracy of the approximation
### `SecureRandom`
Interface for the operating system's crypto-secure PRNG.
@ -3320,11 +3507,11 @@ destruction callbacks run, and no rollback information is logged.
It is important to note that VoxelManip is designed for speed, and *not* ease of use or flexibility.
If your mod requires a map manipulation facility that will handle 100% of all edge cases, or the use
of high level node placement features, perhaps minetest.set_node() is better suited for the job.
of high level node placement features, perhaps `minetest.set_node()` is better suited for the job.
In addition, VoxelManip might not be faster, or could even be slower, for your specific use case.
VoxelManip is most effective when setting very large areas of map at once - for example, if only
setting a 5x5x5 node area, a minetest.set_node() loop may be more optimal. Always profile code
setting a 5x5x5 node area, a `minetest.set_node()` loop may be more optimal. Always profile code
using both methods of map manipulation to determine which is most appropriate for your usage.
#### Using VoxelManip
@ -3360,10 +3547,10 @@ otherwise explicitly stated.
Once the bulk data has been edited to your liking, the internal VoxelManip state can be set using:
`VoxelManip:set_data()` for node content (in Content ID form, see section 'Content IDs'),
`VoxelManip:set_light_data()` for node light levels, and
`VoxelManip:set_param2_data()` for the node type-dependent "param2" values.
`VoxelManip:set_param2_data()` for the node type-dependent `param2` values.
The parameter to each of the above three functions can use any table at all in the same flat array
format as produced by get_data() et al. and is *not required* to be a table retrieved from get_data().
format as produced by `get_data()` et al. and is *not required* to be a table retrieved from `get_data()`.
Once the internal VoxelManip state has been modified to your liking, the changes can be committed back
to the map by calling `VoxelManip:write_to_map()`.
@ -3379,6 +3566,7 @@ Then, for a loaded region of p1..p2, this array ranges from `1` up to and includ
the expression `Nx * Ny * Nz`.
Positions offset from p1 are present in the array with the format of:
```
[
(0, 0, 0), (1, 0, 0), (2, 0, 0), ... (Nx, 0, 0),
@ -3410,11 +3598,10 @@ After registration of a node, its Content ID will remain the same throughout exe
Note that the node being queried needs to have already been been registered.
The following builtin node types have their Content IDs defined as constants:
```
minetest.CONTENT_UNKNOWN (ID for "unknown" nodes)
minetest.CONTENT_AIR (ID for "air" nodes)
minetest.CONTENT_IGNORE (ID for "ignore" nodes)
```
* `minetest.CONTENT_UNKNOWN`: ID for "unknown" nodes
* `minetest.CONTENT_AIR`: ID for "air" nodes
* `minetest.CONTENT_IGNORE`: ID for "ignore" nodes
##### Mapgen VoxelManip objects
Inside of `on_generated()` callbacks, it is possible to retrieve the same VoxelManip object used by the

View File

@ -1,4 +1,4 @@
Minetest Lua Mainmenu API Reference 0.4.15
Minetest Lua Mainmenu API Reference 0.4.16
========================================
Introduction
@ -35,6 +35,8 @@ core.get_builtin_path()
^ returns path to builtin root
core.get_modpath() (possible in async calls)
^ returns path to global modpath
core.get_clientmodpath() (possible in async calls)
^ returns path to global client-side modpath
core.get_modstore_details(modid) (possible in async calls)
^ modid numeric id of mod in modstore
^ returns {
@ -234,7 +236,7 @@ Limitations of Async operations
-Limited set of available functions
e.g. No access to functions modifying menu like core.start,core.close,
core.file_open_dialog
Class reference
----------------

View File

@ -6,28 +6,28 @@
// //////////////////////////////////////////////////////////////////////
/*
The JsonCpp library's source code, including accompanying documentation,
The JsonCpp library's source code, including accompanying documentation,
tests and demonstration applications, are licensed under the following
conditions...
The author (Baptiste Lepilleur) explicitly disclaims copyright in all
jurisdictions which recognize such a disclaimer. In such jurisdictions,
The author (Baptiste Lepilleur) explicitly disclaims copyright in all
jurisdictions which recognize such a disclaimer. In such jurisdictions,
this software is released into the Public Domain.
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
released under the terms of the MIT License (see below).
In jurisdictions which recognize Public Domain property, the user of this
software may choose to accept it either as 1) Public Domain, 2) under the
conditions of the MIT License (see below), or 3) under the terms of dual
In jurisdictions which recognize Public Domain property, the user of this
software may choose to accept it either as 1) Public Domain, 2) under the
conditions of the MIT License (see below), or 3) under the terms of dual
Public Domain/MIT License conditions described here, as they choose.
The MIT License is about as close to Public Domain as a license can get, and is
described in clear, concise terms at:
http://en.wikipedia.org/wiki/MIT_License
The full text of the MIT License follows:
========================================================================
@ -77,7 +77,7 @@ license you like.
/// If defined, indicates that the source file is amalgated
/// to prevent private header inclusion.
#define JSON_IS_AMALGAMATION
#define JSONCPP_STRING
// //////////////////////////////////////////////////////////////////////
// Beginning of content of file: include/json/version.h
// //////////////////////////////////////////////////////////////////////
@ -87,13 +87,20 @@ license you like.
#ifndef JSON_VERSION_H_INCLUDED
# define JSON_VERSION_H_INCLUDED
# define JSONCPP_VERSION_STRING "0.10.6"
# define JSONCPP_VERSION_MAJOR 0
# define JSONCPP_VERSION_MINOR 10
# define JSONCPP_VERSION_PATCH 6
# define JSONCPP_VERSION_STRING "1.8.0"
# define JSONCPP_VERSION_MAJOR 1
# define JSONCPP_VERSION_MINOR 8
# define JSONCPP_VERSION_PATCH 0
# define JSONCPP_VERSION_QUALIFIER
# define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8))
#ifdef JSONCPP_USING_SECURE_MEMORY
#undef JSONCPP_USING_SECURE_MEMORY
#endif
#define JSONCPP_USING_SECURE_MEMORY 0
// If non-zero, the library zeroes any memory that it has allocated before
// it frees its memory.
#endif // JSON_VERSION_H_INCLUDED
// //////////////////////////////////////////////////////////////////////
@ -116,6 +123,9 @@ license you like.
#ifndef JSON_CONFIG_H_INCLUDED
#define JSON_CONFIG_H_INCLUDED
#include <stddef.h>
#include <string> //typedef String
#include <stdint.h> //typedef int64_t, uint64_t
/// If defined, indicates that json library is embedded in CppTL library.
//# define JSON_IN_CPPTL 1
@ -148,12 +158,12 @@ license you like.
#ifdef JSON_IN_CPPTL
#define JSON_API CPPTL_API
#elif defined(JSON_DLL_BUILD)
#if defined(_MSC_VER)
#if defined(_MSC_VER) || defined(__MINGW32__)
#define JSON_API __declspec(dllexport)
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
#endif // if defined(_MSC_VER)
#elif defined(JSON_DLL)
#if defined(_MSC_VER)
#if defined(_MSC_VER) || defined(__MINGW32__)
#define JSON_API __declspec(dllimport)
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
#endif // if defined(_MSC_VER)
@ -167,34 +177,93 @@ license you like.
// Storages, and 64 bits integer support is disabled.
// #define JSON_NO_INT64 1
#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
// Microsoft Visual Studio 6 only support conversion from __int64 to double
// (no conversion from unsigned __int64).
#define JSON_USE_INT64_DOUBLE_CONVERSION 1
// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
// characters in the debug information)
// All projects I've ever seen with VS6 were using this globally (not bothering
// with pragma push/pop).
#pragma warning(disable : 4786)
#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
#if defined(_MSC_VER) // MSVC
# if _MSC_VER <= 1200 // MSVC 6
// Microsoft Visual Studio 6 only support conversion from __int64 to double
// (no conversion from unsigned __int64).
# define JSON_USE_INT64_DOUBLE_CONVERSION 1
// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
// characters in the debug information)
// All projects I've ever seen with VS6 were using this globally (not bothering
// with pragma push/pop).
# pragma warning(disable : 4786)
# endif // MSVC 6
#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
/// Indicates that the following function is deprecated.
#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
#elif defined(__clang__) && defined(__has_feature)
#if __has_feature(attribute_deprecated_with_message)
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
# if _MSC_VER >= 1500 // MSVC 2008
/// Indicates that the following function is deprecated.
# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
# endif
#endif // defined(_MSC_VER)
// In c++11 the override keyword allows you to explicity define that a function
// is intended to override the base-class version. This makes the code more
// managable and fixes a set of common hard-to-find bugs.
#if __cplusplus >= 201103L
# define JSONCPP_OVERRIDE override
# define JSONCPP_NOEXCEPT noexcept
#elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900
# define JSONCPP_OVERRIDE override
# define JSONCPP_NOEXCEPT throw()
#elif defined(_MSC_VER) && _MSC_VER >= 1900
# define JSONCPP_OVERRIDE override
# define JSONCPP_NOEXCEPT noexcept
#else
# define JSONCPP_OVERRIDE
# define JSONCPP_NOEXCEPT throw()
#endif
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
#ifndef JSON_HAS_RVALUE_REFERENCES
#if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010
#define JSON_HAS_RVALUE_REFERENCES 1
#endif // MSVC >= 2010
#ifdef __clang__
#if __has_feature(cxx_rvalue_references)
#define JSON_HAS_RVALUE_REFERENCES 1
#endif // has_feature
#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
#define JSON_HAS_RVALUE_REFERENCES 1
#endif // GXX_EXPERIMENTAL
#endif // __clang__ || __GNUC__
#endif // not defined JSON_HAS_RVALUE_REFERENCES
#ifndef JSON_HAS_RVALUE_REFERENCES
#define JSON_HAS_RVALUE_REFERENCES 0
#endif
#ifdef __clang__
#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
# define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
# endif // GNUC version
#endif // __clang__ || __GNUC__
#if !defined(JSONCPP_DEPRECATED)
#define JSONCPP_DEPRECATED(message)
#endif // if !defined(JSONCPP_DEPRECATED)
#if __GNUC__ >= 6
# define JSON_USE_INT64_DOUBLE_CONVERSION 1
#endif
#if !defined(JSON_IS_AMALGAMATION)
# include "version.h"
# if JSONCPP_USING_SECURE_MEMORY
# include "allocator.h" //typedef Allocator
# endif
#endif // if !defined(JSON_IS_AMALGAMATION)
namespace Json {
typedef int Int;
typedef unsigned int UInt;
@ -208,13 +277,26 @@ typedef unsigned int LargestUInt;
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
#else // if defined(_MSC_VER) // Other platforms, use long long
typedef long long int Int64;
typedef unsigned long long int UInt64;
typedef int64_t Int64;
typedef uint64_t UInt64;
#endif // if defined(_MSC_VER)
typedef Int64 LargestInt;
typedef UInt64 LargestUInt;
#define JSON_HAS_INT64
#endif // if defined(JSON_NO_INT64)
#if JSONCPP_USING_SECURE_MEMORY
#define JSONCPP_STRING std::basic_string<char, std::char_traits<char>, Json::SecureAllocator<char> >
#define JSONCPP_OSTRINGSTREAM std::basic_ostringstream<char, std::char_traits<char>, Json::SecureAllocator<char> >
#define JSONCPP_OSTREAM std::basic_ostream<char, std::char_traits<char>>
#define JSONCPP_ISTRINGSTREAM std::basic_istringstream<char, std::char_traits<char>, Json::SecureAllocator<char> >
#define JSONCPP_ISTREAM std::istream
#else
#define JSONCPP_STRING std::string
#define JSONCPP_OSTRINGSTREAM std::ostringstream
#define JSONCPP_OSTREAM std::ostream
#define JSONCPP_ISTRINGSTREAM std::istringstream
#define JSONCPP_ISTREAM std::istream
#endif // if JSONCPP_USING_SECURE_MEMORY
} // end namespace Json
#endif // JSON_CONFIG_H_INCLUDED
@ -295,6 +377,8 @@ class ValueConstIterator;
#include "forwards.h"
#endif // if !defined(JSON_IS_AMALGAMATION)
#pragma pack(push, 8)
namespace Json {
/** \brief Configuration passed to reader and writer.
@ -329,10 +413,18 @@ public:
/// \c true if root must be either an array or an object value. Default: \c
/// false.
bool strictRoot_;
/// \c true if dropped null placeholders are allowed. Default: \c false.
bool allowDroppedNullPlaceholders_;
/// \c true if numeric object key are allowed. Default: \c false.
bool allowNumericKeys_;
};
} // namespace Json
#pragma pack(pop)
#endif // CPPTL_JSON_FEATURES_H_INCLUDED
// //////////////////////////////////////////////////////////////////////
@ -372,15 +464,8 @@ public:
#include <cpptl/forwards.h>
#endif
// Disable warning C4251: <data member>: <type> needs to have dll-interface to
// be used by...
#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
#pragma warning(push)
#pragma warning(disable : 4251)
#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
//Conditional NORETURN attribute on the throw functions would:
// a) suppress false positives from static code analysis
// a) suppress false positives from static code analysis
// b) possibly improve optimization opportunities.
#if !defined(JSONCPP_NORETURN)
# if defined(_MSC_VER)
@ -392,6 +477,15 @@ public:
# endif
#endif
// Disable warning C4251: <data member>: <type> needs to have dll-interface to
// be used by...
#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
#pragma warning(push)
#pragma warning(disable : 4251)
#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
#pragma pack(push, 8)
/** \brief JSON (JavaScript Object Notation).
*/
namespace Json {
@ -402,39 +496,39 @@ namespace Json {
*/
class JSON_API Exception : public std::exception {
public:
Exception(std::string const& msg);
virtual ~Exception() throw();
virtual char const* what() const throw();
Exception(JSONCPP_STRING const& msg);
~Exception() JSONCPP_NOEXCEPT JSONCPP_OVERRIDE;
char const* what() const JSONCPP_NOEXCEPT JSONCPP_OVERRIDE;
protected:
std::string const msg_;
JSONCPP_STRING msg_;
};
/** Exceptions which the user cannot easily avoid.
*
* E.g. out-of-memory (when we use malloc), stack-overflow, malicious input
*
*
* \remark derived from Json::Exception
*/
class JSON_API RuntimeError : public Exception {
public:
RuntimeError(std::string const& msg);
RuntimeError(JSONCPP_STRING const& msg);
};
/** Exceptions thrown by JSON_ASSERT/JSON_FAIL macros.
*
* These are precondition-violations (user bugs) and internal errors (our bugs).
*
*
* \remark derived from Json::Exception
*/
class JSON_API LogicError : public Exception {
public:
LogicError(std::string const& msg);
LogicError(JSONCPP_STRING const& msg);
};
/// used internally
JSONCPP_NORETURN void throwRuntimeError(std::string const& msg);
JSONCPP_NORETURN void throwRuntimeError(JSONCPP_STRING const& msg);
/// used internally
JSONCPP_NORETURN void throwLogicError(std::string const& msg);
JSONCPP_NORETURN void throwLogicError(JSONCPP_STRING const& msg);
/** \brief Type of the value held by a Value object.
*/
@ -525,7 +619,7 @@ private:
class JSON_API Value {
friend class ValueIteratorBase;
public:
typedef std::vector<std::string> Members;
typedef std::vector<JSONCPP_STRING> Members;
typedef ValueIterator iterator;
typedef ValueConstIterator const_iterator;
typedef Json::UInt UInt;
@ -538,11 +632,10 @@ public:
typedef Json::LargestUInt LargestUInt;
typedef Json::ArrayIndex ArrayIndex;
static const Value& nullRef;
#if !defined(__ARMEL__)
/// \deprecated This exists for binary compatibility only. Use nullRef.
static const Value null;
#endif
static const Value& null; ///< We regret this reference to a global instance; prefer the simpler Value().
static const Value& nullRef; ///< just a kludge for binary-compatibility; same as null
static Value const& nullSingleton(); ///< Prefer this to null or nullRef.
/// Minimum signed integer value that can be stored in a Json::Value.
static const LargestInt minLargestInt;
/// Maximum signed integer value that can be stored in a Json::Value.
@ -578,6 +671,9 @@ private:
CZString(ArrayIndex index);
CZString(char const* str, unsigned length, DuplicationPolicy allocate);
CZString(CZString const& other);
#if JSON_HAS_RVALUE_REFERENCES
CZString(CZString&& other);
#endif
~CZString();
CZString& operator=(CZString other);
bool operator<(CZString const& other) const;
@ -653,18 +749,22 @@ Json::Value obj_value(Json::objectValue); // {}
* \endcode
*/
Value(const StaticString& value);
Value(const std::string& value); ///< Copy data() til size(). Embedded zeroes too.
Value(const JSONCPP_STRING& value); ///< Copy data() til size(). Embedded zeroes too.
#ifdef JSON_USE_CPPTL
Value(const CppTL::ConstString& value);
#endif
Value(bool value);
/// Deep copy.
Value(const Value& other);
#if JSON_HAS_RVALUE_REFERENCES
/// Move constructor
Value(Value&& other);
#endif
~Value();
/// Deep copy, then swap(other).
/// \note Over-write existing comments. To preserve comments, use #swapPayload().
Value &operator=(const Value &other);
Value& operator=(Value other);
/// Swap everything.
void swap(Value& other);
/// Swap values but leave comments and source offsets in place.
@ -682,7 +782,10 @@ Json::Value obj_value(Json::objectValue); // {}
int compare(const Value& other) const;
const char* asCString() const; ///< Embedded zeroes could cause you trouble!
std::string asString() const; ///< Embedded zeroes are possible.
#if JSONCPP_USING_SECURE_MEMORY
unsigned getCStringLength() const; //Allows you to understand the length of the CString
#endif
JSONCPP_STRING asString() const; ///< Embedded zeroes are possible.
/** Get raw char* of string-value.
* \return false if !string. (Seg-fault if str or end are NULL.)
*/
@ -786,11 +889,11 @@ Json::Value obj_value(Json::objectValue); // {}
const Value& operator[](const char* key) const;
/// Access an object value by name, create a null member if it does not exist.
/// \param key may contain embedded nulls.
Value& operator[](const std::string& key);
Value& operator[](const JSONCPP_STRING& key);
/// Access an object value by name, returns null if there is no member with
/// that name.
/// \param key may contain embedded nulls.
const Value& operator[](const std::string& key) const;
const Value& operator[](const JSONCPP_STRING& key) const;
/** \brief Access an object value by name, create a null member if it does not
exist.
@ -821,7 +924,7 @@ Json::Value obj_value(Json::objectValue); // {}
/// Return the member named key if it exist, defaultValue otherwise.
/// \note deep copy
/// \param key may contain embedded nulls.
Value get(const std::string& key, const Value& defaultValue) const;
Value get(const JSONCPP_STRING& key, const Value& defaultValue) const;
#ifdef JSON_USE_CPPTL
/// Return the member named key if it exist, defaultValue otherwise.
/// \note deep copy
@ -846,7 +949,7 @@ Json::Value obj_value(Json::objectValue); // {}
/// Same as removeMember(const char*)
/// \param key may contain embedded nulls.
/// \deprecated
Value removeMember(const std::string& key);
Value removeMember(const JSONCPP_STRING& key);
/// Same as removeMember(const char* begin, const char* end, Value* removed),
/// but 'key' is null-terminated.
bool removeMember(const char* key, Value* removed);
@ -856,8 +959,8 @@ Json::Value obj_value(Json::objectValue); // {}
\param key may contain embedded nulls.
\return true iff removed (no exceptions)
*/
bool removeMember(std::string const& key, Value* removed);
/// Same as removeMember(std::string const& key, Value* removed)
bool removeMember(JSONCPP_STRING const& key, Value* removed);
/// Same as removeMember(JSONCPP_STRING const& key, Value* removed)
bool removeMember(const char* begin, const char* end, Value* removed);
/** \brief Remove the indexed array element.
@ -872,8 +975,8 @@ Json::Value obj_value(Json::objectValue); // {}
bool isMember(const char* key) const;
/// Return true if the object has a member named key.
/// \param key may contain embedded nulls.
bool isMember(const std::string& key) const;
/// Same as isMember(std::string const& key)const
bool isMember(const JSONCPP_STRING& key) const;
/// Same as isMember(JSONCPP_STRING const& key)const
bool isMember(const char* begin, const char* end) const;
#ifdef JSON_USE_CPPTL
/// Return true if the object has a member named key.
@ -893,17 +996,17 @@ Json::Value obj_value(Json::objectValue); // {}
//# endif
/// \deprecated Always pass len.
JSONCPP_DEPRECATED("Use setComment(std::string const&) instead.")
JSONCPP_DEPRECATED("Use setComment(JSONCPP_STRING const&) instead.")
void setComment(const char* comment, CommentPlacement placement);
/// Comments must be //... or /* ... */
void setComment(const char* comment, size_t len, CommentPlacement placement);
/// Comments must be //... or /* ... */
void setComment(const std::string& comment, CommentPlacement placement);
void setComment(const JSONCPP_STRING& comment, CommentPlacement placement);
bool hasComment(CommentPlacement placement) const;
/// Include delimiters and embedded newlines.
std::string getComment(CommentPlacement placement) const;
JSONCPP_STRING getComment(CommentPlacement placement) const;
std::string toStyledString() const;
JSONCPP_STRING toStyledString() const;
const_iterator begin() const;
const_iterator end() const;
@ -911,6 +1014,13 @@ Json::Value obj_value(Json::objectValue); // {}
iterator begin();
iterator end();
// Accessors for the [start, limit) range of bytes within the JSON text from
// which this value was parsed, if any.
void setOffsetStart(ptrdiff_t start);
void setOffsetLimit(ptrdiff_t limit);
ptrdiff_t getOffsetStart() const;
ptrdiff_t getOffsetLimit() const;
private:
void initBasic(ValueType type, bool allocated = false);
@ -947,6 +1057,11 @@ private:
unsigned int allocated_ : 1; // Notes: if declared as bool, bitfield is useless.
// If not allocated_, string_ must be null-terminated.
CommentInfo* comments_;
// [start, limit) byte offsets in the source JSON text from which this Value
// was extracted.
ptrdiff_t start_;
ptrdiff_t limit_;
};
/** \brief Experimental and untested: represents an element of the "path" to
@ -959,7 +1074,7 @@ public:
PathArgument();
PathArgument(ArrayIndex index);
PathArgument(const char* key);
PathArgument(const std::string& key);
PathArgument(const JSONCPP_STRING& key);
private:
enum Kind {
@ -967,7 +1082,7 @@ private:
kindIndex,
kindKey
};
std::string key_;
JSONCPP_STRING key_;
ArrayIndex index_;
Kind kind_;
};
@ -985,7 +1100,7 @@ private:
*/
class JSON_API Path {
public:
Path(const std::string& path,
Path(const JSONCPP_STRING& path,
const PathArgument& a1 = PathArgument(),
const PathArgument& a2 = PathArgument(),
const PathArgument& a3 = PathArgument(),
@ -1002,12 +1117,12 @@ private:
typedef std::vector<const PathArgument*> InArgs;
typedef std::vector<PathArgument> Args;
void makePath(const std::string& path, const InArgs& in);
void addPathInArg(const std::string& path,
void makePath(const JSONCPP_STRING& path, const InArgs& in);
void addPathInArg(const JSONCPP_STRING& path,
const InArgs& in,
InArgs::const_iterator& itInArg,
PathArgument::Kind kind);
void invalidPath(const std::string& path, int location);
void invalidPath(const JSONCPP_STRING& path, int location);
Args args_;
};
@ -1040,7 +1155,7 @@ public:
/// Return the member name of the referenced Value, or "" if it is not an
/// objectValue.
/// \note Avoid `c_str()` on result, as embedded zeroes are possible.
std::string name() const;
JSONCPP_STRING name() const;
/// Return the member name of the referenced Value. "" if it is not an
/// objectValue.
@ -1092,6 +1207,7 @@ public:
typedef ValueConstIterator SelfType;
ValueConstIterator();
ValueConstIterator(ValueIterator const& other);
private:
/*! \internal Use by Value to create an iterator.
@ -1141,7 +1257,7 @@ public:
typedef ValueIterator SelfType;
ValueIterator();
ValueIterator(const ValueConstIterator& other);
explicit ValueIterator(const ValueConstIterator& other);
ValueIterator(const ValueIterator& other);
private:
@ -1187,6 +1303,7 @@ template<>
inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); }
}
#pragma pack(pop)
#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
#pragma warning(pop)
@ -1232,6 +1349,8 @@ inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); }
#pragma warning(disable : 4251)
#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
#pragma pack(push, 8)
namespace Json {
/** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a
@ -1244,6 +1363,18 @@ public:
typedef char Char;
typedef const Char* Location;
/** \brief An error tagged with where in the JSON text it was encountered.
*
* The offsets give the [start, limit) range of bytes within the text. Note
* that this is bytes, not codepoints.
*
*/
struct StructuredError {
ptrdiff_t offset_start;
ptrdiff_t offset_limit;
JSONCPP_STRING message;
};
/** \brief Constructs a Reader allowing all features
* for parsing.
*/
@ -1296,7 +1427,7 @@ public:
/// \brief Parse from input stream.
/// \see Json::operator>>(std::istream&, Json::Value&).
bool parse(std::istream& is, Value& root, bool collectComments = true);
bool parse(JSONCPP_ISTREAM& is, Value& root, bool collectComments = true);
/** \brief Returns a user friendly string that list errors in the parsed
* document.
@ -1308,7 +1439,7 @@ public:
* \deprecated Use getFormattedErrorMessages() instead (typo fix).
*/
JSONCPP_DEPRECATED("Use getFormattedErrorMessages() instead.")
std::string getFormatedErrorMessages() const;
JSONCPP_STRING getFormatedErrorMessages() const;
/** \brief Returns a user friendly string that list errors in the parsed
* document.
@ -1318,7 +1449,39 @@ public:
* occurred
* during parsing.
*/
std::string getFormattedErrorMessages() const;
JSONCPP_STRING getFormattedErrorMessages() const;
/** \brief Returns a vector of structured erros encounted while parsing.
* \return A (possibly empty) vector of StructuredError objects. Currently
* only one error can be returned, but the caller should tolerate
* multiple
* errors. This can occur if the parser recovers from a non-fatal
* parse error and then encounters additional errors.
*/
std::vector<StructuredError> getStructuredErrors() const;
/** \brief Add a semantic error message.
* \param value JSON Value location associated with the error
* \param message The error message.
* \return \c true if the error was successfully added, \c false if the
* Value offset exceeds the document size.
*/
bool pushError(const Value& value, const JSONCPP_STRING& message);
/** \brief Add a semantic error message with extra context.
* \param value JSON Value location associated with the error
* \param message The error message.
* \param extra Additional JSON Value location to contextualize the error
* \return \c true if the error was successfully added, \c false if either
* Value offset exceeds the document size.
*/
bool pushError(const Value& value, const JSONCPP_STRING& message, const Value& extra);
/** \brief Return whether there are any errors.
* \return \c true if there are no errors to report \c false if
* errors have occurred.
*/
bool good() const;
private:
enum TokenType {
@ -1348,7 +1511,7 @@ private:
class ErrorInfo {
public:
Token token_;
std::string message_;
JSONCPP_STRING message_;
Location extra_;
};
@ -1368,7 +1531,7 @@ private:
bool decodeNumber(Token& token);
bool decodeNumber(Token& token, Value& decoded);
bool decodeString(Token& token);
bool decodeString(Token& token, std::string& decoded);
bool decodeString(Token& token, JSONCPP_STRING& decoded);
bool decodeDouble(Token& token);
bool decodeDouble(Token& token, Value& decoded);
bool decodeUnicodeCodePoint(Token& token,
@ -1379,9 +1542,9 @@ private:
Location& current,
Location end,
unsigned int& unicode);
bool addError(const std::string& message, Token& token, Location extra = 0);
bool addError(const JSONCPP_STRING& message, Token& token, Location extra = 0);
bool recoverFromError(TokenType skipUntilToken);
bool addErrorAndRecover(const std::string& message,
bool addErrorAndRecover(const JSONCPP_STRING& message,
Token& token,
TokenType skipUntilToken);
void skipUntilSpace();
@ -1389,20 +1552,20 @@ private:
Char getNextChar();
void
getLocationLineAndColumn(Location location, int& line, int& column) const;
std::string getLocationLineAndColumn(Location location) const;
JSONCPP_STRING getLocationLineAndColumn(Location location) const;
void addComment(Location begin, Location end, CommentPlacement placement);
void skipCommentTokens(Token& token);
typedef std::stack<Value*> Nodes;
Nodes nodes_;
Errors errors_;
std::string document_;
JSONCPP_STRING document_;
Location begin_;
Location end_;
Location current_;
Location lastValueEnd_;
Value* lastValue_;
std::string commentsBefore_;
JSONCPP_STRING commentsBefore_;
Features features_;
bool collectComments_;
}; // Reader
@ -1431,9 +1594,9 @@ public:
*/
virtual bool parse(
char const* beginDoc, char const* endDoc,
Value* root, std::string* errs) = 0;
Value* root, JSONCPP_STRING* errs) = 0;
class Factory {
class JSON_API Factory {
public:
virtual ~Factory() {}
/** \brief Allocate a CharReader via operator new().
@ -1451,7 +1614,7 @@ Usage:
CharReaderBuilder builder;
builder["collectComments"] = false;
Value value;
std::string errs;
JSONCPP_STRING errs;
bool ok = parseFromStream(builder, std::cin, &value, &errs);
\endcode
*/
@ -1487,7 +1650,7 @@ public:
- `"rejectDupKeys": false or true`
- If true, `parse()` returns false when a key is duplicated within an object.
- `"allowSpecialFloats": false or true`
- If true, special float values (NaNs and infinities) are allowed
- If true, special float values (NaNs and infinities) are allowed
and their values are lossfree restorable.
You can examine 'settings_` yourself
@ -1498,9 +1661,9 @@ public:
Json::Value settings_;
CharReaderBuilder();
virtual ~CharReaderBuilder();
~CharReaderBuilder() JSONCPP_OVERRIDE;
virtual CharReader* newCharReader() const;
CharReader* newCharReader() const JSONCPP_OVERRIDE;
/** \return true if 'settings' are legal and consistent;
* otherwise, indicate bad settings via 'invalid'.
@ -1509,7 +1672,7 @@ public:
/** A simple way to update a specific setting.
*/
Value& operator[](std::string key);
Value& operator[](JSONCPP_STRING key);
/** Called by ctor, but you can use this to reset settings_.
* \pre 'settings' != NULL (but Json::null is fine)
@ -1531,7 +1694,7 @@ public:
*/
bool JSON_API parseFromStream(
CharReader::Factory const&,
std::istream&,
JSONCPP_ISTREAM&,
Value* root, std::string* errs);
/** \brief Read from 'sin' into 'root'.
@ -1558,10 +1721,12 @@ bool JSON_API parseFromStream(
\throw std::exception on parse error.
\see Json::operator<<()
*/
JSON_API std::istream& operator>>(std::istream&, Value&);
JSON_API JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM&, Value&);
} // namespace Json
#pragma pack(pop)
#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
#pragma warning(pop)
#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
@ -1603,6 +1768,8 @@ JSON_API std::istream& operator>>(std::istream&, Value&);
#pragma warning(disable : 4251)
#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
#pragma pack(push, 8)
namespace Json {
class Value;
@ -1622,7 +1789,7 @@ Usage:
*/
class JSON_API StreamWriter {
protected:
std::ostream* sout_; // not owned; will not delete
JSONCPP_OSTREAM* sout_; // not owned; will not delete
public:
StreamWriter();
virtual ~StreamWriter();
@ -1632,7 +1799,7 @@ public:
\return zero on success (For now, we always return zero, so check the stream instead.)
\throw std::exception possibly, depending on configuration
*/
virtual int write(Value const& root, std::ostream* sout) = 0;
virtual int write(Value const& root, JSONCPP_OSTREAM* sout) = 0;
/** \brief A simple abstract factory.
*/
@ -1649,7 +1816,7 @@ public:
/** \brief Write into stringstream, then return string, for convenience.
* A StreamWriter will be created from the factory, used, and then deleted.
*/
std::string JSON_API writeString(StreamWriter::Factory const& factory, Value const& root);
JSONCPP_STRING JSON_API writeString(StreamWriter::Factory const& factory, Value const& root);
/** \brief Build a StreamWriter implementation.
@ -1695,12 +1862,12 @@ public:
Json::Value settings_;
StreamWriterBuilder();
virtual ~StreamWriterBuilder();
~StreamWriterBuilder() JSONCPP_OVERRIDE;
/**
* \throw std::exception if something goes wrong (e.g. invalid settings)
*/
virtual StreamWriter* newStreamWriter() const;
StreamWriter* newStreamWriter() const JSONCPP_OVERRIDE;
/** \return true if 'settings' are legal and consistent;
* otherwise, indicate bad settings via 'invalid'.
@ -1708,7 +1875,7 @@ public:
bool validate(Json::Value* invalid) const;
/** A simple way to update a specific setting.
*/
Value& operator[](std::string key);
Value& operator[](JSONCPP_STRING key);
/** Called by ctor, but you can use this to reset settings_.
* \pre 'settings' != NULL (but Json::null is fine)
@ -1725,7 +1892,7 @@ class JSON_API Writer {
public:
virtual ~Writer();
virtual std::string write(const Value& root) = 0;
virtual JSONCPP_STRING write(const Value& root) = 0;
};
/** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format
@ -1741,18 +1908,29 @@ class JSON_API FastWriter : public Writer {
public:
FastWriter();
virtual ~FastWriter() {}
~FastWriter() JSONCPP_OVERRIDE {}
void enableYAMLCompatibility();
/** \brief Drop the "null" string from the writer's output for nullValues.
* Strictly speaking, this is not valid JSON. But when the output is being
* fed to a browser's Javascript, it makes for smaller output and the
* browser can handle the output just fine.
*/
void dropNullPlaceholders();
void omitEndingLineFeed();
public: // overridden from Writer
virtual std::string write(const Value& root);
JSONCPP_STRING write(const Value& root) JSONCPP_OVERRIDE;
private:
void writeValue(const Value& value);
std::string document_;
JSONCPP_STRING document_;
bool yamlCompatiblityEnabled_;
bool dropNullPlaceholders_;
bool omitEndingLineFeed_;
};
/** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a
@ -1782,36 +1960,36 @@ private:
class JSON_API StyledWriter : public Writer {
public:
StyledWriter();
virtual ~StyledWriter() {}
~StyledWriter() JSONCPP_OVERRIDE {}
public: // overridden from Writer
/** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
* \param root Value to serialize.
* \return String containing the JSON document that represents the root value.
*/
virtual std::string write(const Value& root);
JSONCPP_STRING write(const Value& root) JSONCPP_OVERRIDE;
private:
void writeValue(const Value& value);
void writeArrayValue(const Value& value);
bool isMultineArray(const Value& value);
void pushValue(const std::string& value);
void pushValue(const JSONCPP_STRING& value);
void writeIndent();
void writeWithIndent(const std::string& value);
void writeWithIndent(const JSONCPP_STRING& value);
void indent();
void unindent();
void writeCommentBeforeValue(const Value& root);
void writeCommentAfterValueOnSameLine(const Value& root);
bool hasCommentForValue(const Value& value);
static std::string normalizeEOL(const std::string& text);
static JSONCPP_STRING normalizeEOL(const JSONCPP_STRING& text);
typedef std::vector<std::string> ChildValues;
typedef std::vector<JSONCPP_STRING> ChildValues;
ChildValues childValues_;
std::string document_;
std::string indentString_;
int rightMargin_;
int indentSize_;
JSONCPP_STRING document_;
JSONCPP_STRING indentString_;
unsigned int rightMargin_;
unsigned int indentSize_;
bool addChildValues_;
};
@ -1843,7 +2021,7 @@ private:
*/
class JSON_API StyledStreamWriter {
public:
StyledStreamWriter(std::string indentation = "\t");
StyledStreamWriter(JSONCPP_STRING indentation = "\t");
~StyledStreamWriter() {}
public:
@ -1853,49 +2031,51 @@ public:
* \note There is no point in deriving from Writer, since write() should not
* return a value.
*/
void write(std::ostream& out, const Value& root);
void write(JSONCPP_OSTREAM& out, const Value& root);
private:
void writeValue(const Value& value);
void writeArrayValue(const Value& value);
bool isMultineArray(const Value& value);
void pushValue(const std::string& value);
void pushValue(const JSONCPP_STRING& value);
void writeIndent();
void writeWithIndent(const std::string& value);
void writeWithIndent(const JSONCPP_STRING& value);
void indent();
void unindent();
void writeCommentBeforeValue(const Value& root);
void writeCommentAfterValueOnSameLine(const Value& root);
bool hasCommentForValue(const Value& value);
static std::string normalizeEOL(const std::string& text);
static JSONCPP_STRING normalizeEOL(const JSONCPP_STRING& text);
typedef std::vector<std::string> ChildValues;
typedef std::vector<JSONCPP_STRING> ChildValues;
ChildValues childValues_;
std::ostream* document_;
std::string indentString_;
int rightMargin_;
std::string indentation_;
JSONCPP_OSTREAM* document_;
JSONCPP_STRING indentString_;
unsigned int rightMargin_;
JSONCPP_STRING indentation_;
bool addChildValues_ : 1;
bool indented_ : 1;
};
#if defined(JSON_HAS_INT64)
std::string JSON_API valueToString(Int value);
std::string JSON_API valueToString(UInt value);
JSONCPP_STRING JSON_API valueToString(Int value);
JSONCPP_STRING JSON_API valueToString(UInt value);
#endif // if defined(JSON_HAS_INT64)
std::string JSON_API valueToString(LargestInt value);
std::string JSON_API valueToString(LargestUInt value);
std::string JSON_API valueToString(double value);
std::string JSON_API valueToString(bool value);
std::string JSON_API valueToQuotedString(const char* value);
JSONCPP_STRING JSON_API valueToString(LargestInt value);
JSONCPP_STRING JSON_API valueToString(LargestUInt value);
JSONCPP_STRING JSON_API valueToString(double value);
JSONCPP_STRING JSON_API valueToString(bool value);
JSONCPP_STRING JSON_API valueToQuotedString(const char* value);
/// \brief Output using the StyledStreamWriter.
/// \see Json::operator>>()
JSON_API std::ostream& operator<<(std::ostream&, const Value& root);
JSON_API JSONCPP_OSTREAM& operator<<(JSONCPP_OSTREAM&, const Value& root);
} // namespace Json
#pragma pack(pop)
#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
#pragma warning(pop)
#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
@ -1942,7 +2122,7 @@ JSON_API std::ostream& operator<<(std::ostream&, const Value& root);
# define JSON_FAIL_MESSAGE(message) \
{ \
std::ostringstream oss; oss << message; \
JSONCPP_OSTRINGSTREAM oss; oss << message; \
Json::throwLogicError(oss.str()); \
abort(); \
}
@ -1955,7 +2135,7 @@ JSON_API std::ostream& operator<<(std::ostream&, const Value& root);
// release builds we abort, for a core-dump or debugger.
# define JSON_FAIL_MESSAGE(message) \
{ \
std::ostringstream oss; oss << message; \
JSONCPP_OSTRINGSTREAM oss; oss << message; \
assert(false && oss.str().c_str()); \
abort(); \
}

File diff suppressed because it is too large Load Diff

View File

@ -79,7 +79,7 @@
# type: bool
# random_input = false
# Continuous forward movement (only used for testing).
# Continuous forward movement, toggled by autoforward key.
# type: bool
# continuous_forward = false
@ -211,10 +211,10 @@
# type: key
# keymap_decrease_volume =
# Key for toggling autorun.
# Key for toggling autoforward.
# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3
# type: key
# keymap_autorun =
# keymap_autoforward =
# Key for toggling cinematic mode.
# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3
@ -344,8 +344,8 @@
# serverlist_file = favoriteservers.txt
# Maximum size of the out chat queue. 0 to disable queueing and -1 to make the queue size unlimited
# type: int min: -1
max_out_chat_queue_size = 20
# type: int
# max_out_chat_queue_size = 20
## Graphics
@ -549,13 +549,13 @@ max_out_chat_queue_size = 20
# Width component of the initial window size.
# type: int
# screenW = 800
# screen_w = 800
# Height component of the initial window size.
# type: int
# screenH = 600
# screen_h = 600
# Save the window size automatically when modified.
# Save window size automatically when modified.
# type: bool
# autosave_screensize = true
@ -757,7 +757,7 @@ max_out_chat_queue_size = 20
# freetype = true
# Path to TrueTypeFont or bitmap.
# type: path
# type: filepath
# font_path = fonts/liberationsans.ttf
# type: int
@ -771,14 +771,14 @@ max_out_chat_queue_size = 20
# type: int min: 0 max: 255
# font_shadow_alpha = 127
# type: path
# type: filepath
# mono_font_path = fonts/liberationmono.ttf
# type: int
# mono_font_size = 15
# This font will be used for certain languages.
# type: path
# type: filepath
# fallback_font_path = fonts/DroidSansFallbackFull.ttf
# type: int
@ -867,11 +867,10 @@ max_out_chat_queue_size = 20
# type: string
# serverlist_url = servers.minetest.net
# Disable escape sequences, e.g. chat coloring.
# Use this if you want to run a server with pre-0.4.14 clients and you want to disable
# the escape sequences generated by mods.
# Remove color codes from incoming chat messages
# Use this to stop players from being able to use color in their messages
# type: bool
# disable_escape_sequences = false
# strip_color_codes = false
## Network
@ -1078,9 +1077,6 @@ max_out_chat_queue_size = 20
# type: float
# movement_speed_jump = 6.5
# type: float
# movement_speed_descend = 6
# type: float
# movement_liquid_fluidity = 1
@ -1844,3 +1840,4 @@ max_out_chat_queue_size = 20
# Print the engine's profiling data in regular intervals (in seconds). 0 = disable. Useful for developers.
# type: int
# profiler_print_interval = 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,16 +7,16 @@ msgstr ""
"Project-Id-Version: Minetest 0.4.9\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-21 17:40+0200\n"
"PO-Revision-Date: 2017-04-25 19:08+0000\n"
"Last-Translator: Michele Mainardi <capopanzone@gmail.com>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/minetest/"
"minetest/it/>\n"
"PO-Revision-Date: 2017-06-03 10:10+0000\n"
"Last-Translator: pandaro <padarogames@gmail.com>\n"
"Language-Team: Italian "
"<https://hosted.weblate.org/projects/minetest/minetest/it/>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 2.14-dev\n"
"X-Generator: Weblate 2.15-dev\n"
#: builtin/client/init.lua
msgid "Respawn"
@ -124,7 +124,7 @@ msgstr "Mod:"
#: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua
msgid "Optional dependencies:"
msgstr ""
msgstr "Dipendenze opzionali:"
#: builtin/mainmenu/dlg_config_world.lua
#: builtin/mainmenu/dlg_settings_advanced.lua src/guiKeyChangeMenu.cpp
@ -339,7 +339,7 @@ msgstr ""
#: builtin/mainmenu/modmgr.lua
msgid "Subgame Mods"
msgstr ""
msgstr "Mods del gioco"
#: builtin/mainmenu/store.lua
msgid "Close store"
@ -472,7 +472,7 @@ msgstr "Informazioni sulla mod:"
#: builtin/mainmenu/tab_mods.lua
msgid "No dependencies."
msgstr ""
msgstr "Nessuna dipendenza."
#: builtin/mainmenu/tab_mods.lua
msgid "No mod description available"
@ -565,7 +565,7 @@ msgstr "Siete certi di volere azzerare il vostro mondo di giocatore singolo?"
#: builtin/mainmenu/tab_settings.lua
msgid "Autosave screen size"
msgstr ""
msgstr "Salva automaticamente la dimensione dello schermo"
#: builtin/mainmenu/tab_settings.lua
msgid "Bilinear Filter"
@ -774,7 +774,7 @@ msgstr "Nome del giocatore troppo lungo."
#: src/client/clientlauncher.cpp
msgid "Please choose a name!"
msgstr ""
msgstr "Prego, scegli un nome!"
#: src/client/clientlauncher.cpp
msgid "Provided world path doesn't exist: "
@ -809,7 +809,7 @@ msgstr "Danno"
#: src/game.cpp
msgid "- Mode: "
msgstr ""
msgstr "- Modalità: "
#: src/game.cpp
#, fuzzy
@ -956,11 +956,11 @@ msgstr "Definizioni del nodo..."
#: src/game.cpp
msgid "Off"
msgstr ""
msgstr "spento"
#: src/game.cpp
msgid "On"
msgstr ""
msgstr "Acceso"
#: src/game.cpp
#, fuzzy
@ -990,11 +990,11 @@ msgstr ""
#: src/game.cpp
msgid "Volume changed to 0%"
msgstr ""
msgstr "Volume impostato allo 0%"
#: src/game.cpp
msgid "Volume changed to 100%"
msgstr ""
msgstr "Volume impostato al 100%"
#: src/game.cpp src/guiFormSpecMenu.cpp
msgid "ok"
@ -1078,7 +1078,7 @@ msgstr "Comandi di messaggistica"
#: src/guiKeyChangeMenu.cpp
msgid "Mute"
msgstr ""
msgstr "Muto"
#: src/guiKeyChangeMenu.cpp
#, fuzzy

View File

@ -3,16 +3,16 @@ msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-21 17:40+0200\n"
"PO-Revision-Date: 2017-04-18 12:21+0000\n"
"PO-Revision-Date: 2017-05-29 12:33+0000\n"
"Last-Translator: BreadW <toshiharu.uno@gmail.com>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/minetest/"
"minetest/ja/>\n"
"Language-Team: Japanese "
"<https://hosted.weblate.org/projects/minetest/minetest/ja/>\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 2.14-dev\n"
"X-Generator: Weblate 2.14.1\n"
#: builtin/client/init.lua
msgid "Respawn"
@ -83,18 +83,16 @@ msgid "Cancel"
msgstr "キャンセル"
#: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua
#, fuzzy
msgid "Dependencies:"
msgstr "依存Mod:"
msgstr "依存:"
#: builtin/mainmenu/dlg_config_world.lua
msgid "Disable MP"
msgstr "Modパック無効化"
msgstr "Modパック無効化"
#: builtin/mainmenu/dlg_config_world.lua
#, fuzzy
msgid "Disable all"
msgstr "Modパックを無効化"
msgstr "全て無効化"
#: builtin/mainmenu/dlg_config_world.lua
msgid "Enable MP"
@ -114,11 +112,11 @@ msgstr ""
#: builtin/mainmenu/dlg_config_world.lua
msgid "Mod:"
msgstr "Mod:"
msgstr "Mod:"
#: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua
msgid "Optional dependencies:"
msgstr ""
msgstr "任意:"
#: builtin/mainmenu/dlg_config_world.lua
#: builtin/mainmenu/dlg_settings_advanced.lua src/guiKeyChangeMenu.cpp
@ -296,12 +294,10 @@ msgid "Show technical names"
msgstr "パラメータ名を表示"
#: builtin/mainmenu/dlg_settings_advanced.lua
#, fuzzy
msgid "The value must be at least $1."
msgstr "値は$1より大きくなければなりません。"
#: builtin/mainmenu/dlg_settings_advanced.lua
#, fuzzy
msgid "The value must not be larger than $1."
msgstr "値は$1より小さくなければなりません。"
@ -331,7 +327,7 @@ msgstr "Modインストール: Modパック$1に適したフォルダ名が不
#: builtin/mainmenu/modmgr.lua
msgid "Subgame Mods"
msgstr ""
msgstr "サブゲームのMod"
#: builtin/mainmenu/store.lua
msgid "Close store"
@ -390,9 +386,8 @@ msgid "Previous Core Developers"
msgstr "以前の開発者"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Announce Server"
msgstr "サーバを公開"
msgstr "公開サーバ"
#: builtin/mainmenu/tab_local.lua
msgid "Bind Address"
@ -411,19 +406,16 @@ msgid "Enable Damage"
msgstr "ダメージ有効"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Host Game"
msgstr "ゲームを非表示"
msgstr "ゲームホスト"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Host Server"
msgstr "サーバ"
msgstr "ホストサーバ"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Local Game"
msgstr "ゲームスタート"
msgstr "ローカルゲーム"
#: builtin/mainmenu/tab_local.lua
msgid "Name/Password"
@ -438,9 +430,8 @@ msgid "No world created or selected!"
msgstr "ワールドが作成または選択されていません!"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Play Game"
msgstr "プレイヤ名"
msgstr "ゲームプレイ"
#: builtin/mainmenu/tab_local.lua
msgid "Port"
@ -464,7 +455,7 @@ msgstr "Modの情報:"
#: builtin/mainmenu/tab_mods.lua
msgid "No dependencies."
msgstr ""
msgstr "依存なし。"
#: builtin/mainmenu/tab_mods.lua
msgid "No mod description available"
@ -519,9 +510,8 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgstr "プレイヤ名"
msgstr "オンラインプレイ"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
msgid "PvP enabled"
@ -557,7 +547,7 @@ msgstr "シングルプレイヤーのワールドをリセットしてよろし
#: builtin/mainmenu/tab_settings.lua
msgid "Autosave screen size"
msgstr ""
msgstr "画面の大きさを自動保存"
#: builtin/mainmenu/tab_settings.lua
msgid "Bilinear Filter"
@ -636,9 +626,8 @@ msgid "Reset singleplayer world"
msgstr "シングルプレイヤーのワールドをリセット"
#: builtin/mainmenu/tab_settings.lua
#, fuzzy
msgid "Screen:"
msgstr "スクリーンショット"
msgstr "画面:"
#: builtin/mainmenu/tab_settings.lua
msgid "Settings"
@ -785,42 +774,36 @@ msgstr ""
"詳細はdebug.txtを確認してください。"
#: src/game.cpp
#, fuzzy
msgid "- Address: "
msgstr "バインドアドレス"
msgstr "- アドレス: "
#: src/game.cpp
#, fuzzy
msgid "- Creative Mode: "
msgstr "クリエイティブモード"
msgstr "- クリエイティブモード: "
#: src/game.cpp
#, fuzzy
msgid "- Damage: "
msgstr "ダメージ"
msgstr "- ダメージ: "
#: src/game.cpp
msgid "- Mode: "
msgstr ""
msgstr "- モード: "
#: src/game.cpp
#, fuzzy
msgid "- Port: "
msgstr "ポート"
msgstr "- ポート: "
#: src/game.cpp
#, fuzzy
msgid "- Public: "
msgstr "公開サーバ"
msgstr "- 公開サーバ: "
#: src/game.cpp
msgid "- PvP: "
msgstr ""
msgstr "- PvP: "
#: src/game.cpp
#, fuzzy
msgid "- Server Name: "
msgstr "サーバ名"
msgstr "- サーバ名: "
#: src/game.cpp
msgid "Change Keys"
@ -839,7 +822,7 @@ msgid "Continue"
msgstr "再開"
#: src/game.cpp
#, fuzzy, c-format
#, c-format
msgid ""
"Controls:\n"
"- %s: move forwards\n"
@ -856,17 +839,20 @@ msgid ""
"- Mouse wheel: select item\n"
"- %s: chat\n"
msgstr ""
"デフォルトの操作:\n"
"- WASD: 移動\n"
"- スペース: ジャンプ/登る\n"
"- Shift: スニーク/降りる\n"
"- Q: アイテムを落とす\n"
"- I: インベントリ\n"
"操作:\n"
"- %s: 前進\n"
"- %s: 後退\n"
"- %s: 左\n"
"- %s: 右\n"
"- %s: ジャンプ/登る\n"
"- %s: スニーク/降りる\n"
"- %s: アイテムを落とす\n"
"- %s: インベントリ\n"
"- マウス: 見回す\n"
"- 左クリック: 破壊/パンチ\n"
"- 右クリック: 設置/使用\n"
"- マウスホイール: アイテム選択\n"
"- T: チャット\n"
"- ホイール: アイテム選択\n"
"- %s: チャット\n"
#: src/game.cpp
msgid "Creating client..."
@ -914,17 +900,15 @@ msgstr "終了"
#: src/game.cpp
msgid "Game info:"
msgstr ""
msgstr "ゲーム情報:"
#: src/game.cpp
#, fuzzy
msgid "Game paused"
msgstr "ゲーム"
msgstr "ポーズメニュー"
#: src/game.cpp
#, fuzzy
msgid "Hosting server"
msgstr "サーバを作成中..."
msgstr "ホスティングサーバ"
#: src/game.cpp
msgid "Item definitions..."
@ -948,11 +932,11 @@ msgstr "ノードを定義中..."
#: src/game.cpp
msgid "Off"
msgstr ""
msgstr "オフ"
#: src/game.cpp
msgid "On"
msgstr ""
msgstr "オン"
#: src/game.cpp
#, fuzzy
@ -976,17 +960,19 @@ msgid "Sound Volume"
msgstr "音量"
#: src/game.cpp
#, c-format
#, c-format, fuzzy
msgid "Volume changed to %d%%"
msgstr ""
msgstr "音量を %d%% に変更"
#: src/game.cpp
#, fuzzy
msgid "Volume changed to 0%"
msgstr ""
msgstr "音量を 0% に変更"
#: src/game.cpp
#, fuzzy
msgid "Volume changed to 100%"
msgstr ""
msgstr "音量を 100% に変更"
#: src/game.cpp src/guiFormSpecMenu.cpp
msgid "ok"
@ -1022,7 +1008,7 @@ msgstr "コンソール"
#: src/guiKeyChangeMenu.cpp
msgid "Dec. volume"
msgstr ""
msgstr "音量を下げる"
#: src/guiKeyChangeMenu.cpp
msgid "Double tap \"jump\" to toggle fly"
@ -1037,9 +1023,8 @@ msgid "Forward"
msgstr "前進"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Inc. volume"
msgstr "音量"
msgstr "音量を上げる"
#: src/guiKeyChangeMenu.cpp
msgid "Inventory"
@ -1064,22 +1049,20 @@ msgid "Left"
msgstr "左"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Local command"
msgstr "コマンド"
msgstr "ローカルコマンド"
#: src/guiKeyChangeMenu.cpp
msgid "Mute"
msgstr ""
msgstr "消音"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Next item"
msgstr "PageDown"
msgstr "次のアイテム"
#: src/guiKeyChangeMenu.cpp
msgid "Prev. item"
msgstr ""
msgstr "前のアイテム"
#: src/guiKeyChangeMenu.cpp src/settings_translation_file.cpp
msgid "Print stacks"
@ -1098,24 +1081,20 @@ msgid "Sneak"
msgstr "スニーク"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Toggle Cinematic"
msgstr "映画風カメラ"
msgstr "映画風モード切替"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Toggle fast"
msgstr "高速移動モード"
msgstr "高速移動モード切替"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Toggle fly"
msgstr "飛行モード"
msgstr "飛行モード切替"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Toggle noclip"
msgstr "すり抜けモード"
msgstr "すり抜けモード切替"
#: src/guiKeyChangeMenu.cpp
msgid "Use"
@ -1126,7 +1105,6 @@ msgid "Zoom"
msgstr "ズーム"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "press key"
msgstr "キー入力待ち"
@ -1168,7 +1146,7 @@ msgstr "Back"
#: src/keycode.cpp
msgid "Caps Lock"
msgstr ""
msgstr "Caps Lock"
#: src/keycode.cpp
msgid "Clear"
@ -1214,7 +1192,6 @@ msgid "IME Convert"
msgstr "変換"
#: src/keycode.cpp
#, fuzzy
msgid "IME Escape"
msgstr "Escape"
@ -1224,7 +1201,6 @@ msgid "IME Mode Change"
msgstr "モード変更"
#: src/keycode.cpp
#, fuzzy
msgid "IME Nonconvert"
msgstr "無変換"
@ -1688,7 +1664,6 @@ msgid "Bits per pixel (aka color depth) in fullscreen mode."
msgstr "フルスクリーンモードでの1ピクセル(色深度)あたりのビット数。"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Build inside player"
msgstr "プレイヤーの位置に設置"
@ -1701,12 +1676,10 @@ msgid "Bumpmapping"
msgstr "バンプマッピング"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Camera smoothing"
msgstr "滑らかなカメラ"
msgstr "カメラの滑らかさ"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Camera smoothing in cinematic mode"
msgstr "映画風モードでのカメラの滑らかさ"
@ -1911,7 +1884,7 @@ msgstr "ガラスを繋げる"
#: src/settings_translation_file.cpp
msgid "Connect to external media server"
msgstr "外部メディアサーバに接続"
msgstr "外部メディアサーバに接続"
#: src/settings_translation_file.cpp
#, fuzzy
@ -2046,9 +2019,8 @@ msgid "Debug log level"
msgstr "デバッグログのレベル"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Dec. volume key"
msgstr "HUD切り替えキー"
msgstr "音量を下げるキー"
#: src/settings_translation_file.cpp
#, fuzzy
@ -2256,7 +2228,7 @@ msgstr "マップ生成のデバッグ情報を出力します。"
#: src/settings_translation_file.cpp
msgid "Enable Joysticks"
msgstr ""
msgstr "ジョイスティックを有効化"
#: src/settings_translation_file.cpp
msgid ""
@ -2270,7 +2242,7 @@ msgstr "有効化"
#: src/settings_translation_file.cpp
msgid "Enable console window"
msgstr ""
msgstr "コンソールウィンドウを有効化"
#: src/settings_translation_file.cpp
msgid "Enable creative mode for new created maps."
@ -2420,9 +2392,8 @@ msgstr ""
"き起こすかもしれません。"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "FPS in pause menu"
msgstr "ポーズメニューのFPS"
msgstr "ポーズメニューのFPS"
#: src/settings_translation_file.cpp
#, fuzzy
@ -2463,19 +2434,16 @@ msgid "Fast key"
msgstr "高速移動キー"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Fast mode acceleration"
msgstr "高速モードの加速度"
msgstr "高速移動モードの加速度"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Fast mode speed"
msgstr "高速モードの速度"
msgstr "高速移動モードの速度"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Fast movement"
msgstr "高速移動"
msgstr "高速移動モード"
#: src/settings_translation_file.cpp
#, fuzzy
@ -2586,9 +2554,8 @@ msgid "Fly key"
msgstr "飛行キー"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Flying"
msgstr "飛行"
msgstr "飛行モード"
#: src/settings_translation_file.cpp
#, fuzzy
@ -2610,12 +2577,10 @@ msgid "Font path"
msgstr "フォントパス"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Font shadow"
msgstr "フォントの影"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Font shadow alpha"
msgstr "フォントの影の透過"
@ -2629,7 +2594,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Font size"
msgstr ""
msgstr "フォントの大きさ"
#: src/settings_translation_file.cpp
msgid "Format of screenshots."
@ -2723,7 +2688,7 @@ msgstr "グラフィック"
#: src/settings_translation_file.cpp
msgid "Gravity"
msgstr ""
msgstr "重力"
#: src/settings_translation_file.cpp
#, fuzzy
@ -2947,9 +2912,8 @@ msgid "In-game chat console height, between 0.1 (10%) and 1.0 (100%)."
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Inc. volume key"
msgstr "コンソールキー"
msgstr "音量を上げるキー"
#: src/settings_translation_file.cpp
msgid ""
@ -3008,11 +2972,11 @@ msgstr "インベントリキー"
#: src/settings_translation_file.cpp
msgid "Invert mouse"
msgstr ""
msgstr "マウスの反転"
#: src/settings_translation_file.cpp
msgid "Invert vertical mouse movement."
msgstr ""
msgstr "マウスの上下の動きを反転させます。"
#: src/settings_translation_file.cpp
msgid "Item entity TTL"
@ -3381,7 +3345,7 @@ msgstr "マップ生成フラグ"
#: src/settings_translation_file.cpp
msgid "Language"
msgstr ""
msgstr "言語"
#: src/settings_translation_file.cpp
msgid "Large cave depth"
@ -3700,11 +3664,11 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Maximum FPS"
msgstr ""
msgstr "最大FPS"
#: src/settings_translation_file.cpp
msgid "Maximum FPS when game is paused."
msgstr ""
msgstr "ポーズメニューでの最大FPS。"
#: src/settings_translation_file.cpp
msgid "Maximum forceloaded blocks"
@ -3787,7 +3751,7 @@ msgstr "ファイルダウンロード (例: Modのダウンロード)の最大
#: src/settings_translation_file.cpp
msgid "Maximum users"
msgstr ""
msgstr "最大ユーザー数"
#: src/settings_translation_file.cpp
msgid "Menus"
@ -3863,7 +3827,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Mouse sensitivity"
msgstr ""
msgstr "マウスの感度"
#: src/settings_translation_file.cpp
msgid "Mouse sensitivity multiplier."
@ -3914,11 +3878,11 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "New users need to input this password."
msgstr ""
msgstr "新しいユーザーはこのパスワードを入力する必要があります。"
#: src/settings_translation_file.cpp
msgid "Noclip"
msgstr ""
msgstr "すり抜けモード"
#: src/settings_translation_file.cpp
msgid "Noclip key"
@ -3974,7 +3938,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Opaque liquids"
msgstr ""
msgstr "不透明な水"
#: src/settings_translation_file.cpp
msgid "Overall bias of parallax occlusion effect, usually scale/2."
@ -4195,17 +4159,15 @@ msgstr "スクリーンショット"
#: src/settings_translation_file.cpp
msgid "Screenshot folder"
msgstr ""
msgstr "スクリーンショットのフォルダ"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Screenshot format"
msgstr "スクリーンショット"
msgstr "スクリーンショットのファイル形式"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Screenshot quality"
msgstr "スクリーンショット"
msgstr "スクリーンショットの品質"
#: src/settings_translation_file.cpp
msgid ""
@ -4333,7 +4295,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Shutdown message"
msgstr ""
msgstr "サーバ終了時のメッセージ"
#: src/settings_translation_file.cpp
msgid ""
@ -4570,7 +4532,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Time speed"
msgstr ""
msgstr "時間の速さ"
#: src/settings_translation_file.cpp
msgid "Timeout for client to remove unused map data from memory."
@ -4609,7 +4571,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Trusted mods"
msgstr ""
msgstr "信頼するMod"
#: src/settings_translation_file.cpp
msgid ""

File diff suppressed because it is too large Load Diff

View File

@ -7,20 +7,20 @@ msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-21 17:40+0200\n"
"PO-Revision-Date: 2016-12-16 10:49+0000\n"
"Last-Translator: Rogier <rogier777@gmail.com>\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/minetest/minetest/"
"nl/>\n"
"PO-Revision-Date: 2017-06-03 09:50+0000\n"
"Last-Translator: Emiel van Rooijen <evrooije@outlook.com>\n"
"Language-Team: Dutch "
"<https://hosted.weblate.org/projects/minetest/minetest/nl/>\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 2.10\n"
"X-Generator: Weblate 2.15-dev\n"
#: builtin/client/init.lua
msgid "Respawn"
msgstr "Respawn"
msgstr "Herboren worden"
#: builtin/client/init.lua
msgid "You died."
@ -90,22 +90,21 @@ msgid "Cancel"
msgstr "Annuleer"
#: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua
#, fuzzy
msgid "Dependencies:"
msgstr "Afhankelijkheden:"
#: builtin/mainmenu/dlg_config_world.lua
msgid "Disable MP"
msgstr "MV uitzetten"
msgstr "ModVerzameling uitschakelen"
#: builtin/mainmenu/dlg_config_world.lua
#, fuzzy
msgid "Disable all"
msgstr "MV uitzetten"
msgstr "Alles uitschakelen"
#: builtin/mainmenu/dlg_config_world.lua
msgid "Enable MP"
msgstr "MV aanzetten"
msgstr "Mod Verzameling aanzetten"
#: builtin/mainmenu/dlg_config_world.lua
msgid "Enable all"
@ -124,8 +123,9 @@ msgid "Mod:"
msgstr "Mod:"
#: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua
#, fuzzy
msgid "Optional dependencies:"
msgstr ""
msgstr "Optionele afhankelijkheden"
#: builtin/mainmenu/dlg_config_world.lua
#: builtin/mainmenu/dlg_settings_advanced.lua src/guiKeyChangeMenu.cpp
@ -150,11 +150,11 @@ msgstr "Maak aan"
#: builtin/mainmenu/dlg_create_world.lua
msgid "Download a subgame, such as minetest_game, from minetest.net"
msgstr "Download een sub-spel, zoals minetest_game, van minetest.net"
msgstr "Laad een spel, zoals minetest_game, van minetest.net"
#: builtin/mainmenu/dlg_create_world.lua
msgid "Download one from minetest.net"
msgstr "Download er een van minetest.net"
msgstr "Laad er een van minetest.net"
#: builtin/mainmenu/dlg_create_world.lua src/settings_translation_file.cpp
msgid "Game"
@ -201,7 +201,7 @@ msgstr "Modmgr: kan mod \"$1\" niet verwijderen"
#: builtin/mainmenu/dlg_delete_mod.lua
msgid "Modmgr: invalid modpath \"$1\""
msgstr "Modbeheer: onjuist pad \"$1\""
msgstr "Modmgr: verkeerd pad voor mod \"$1\""
#: builtin/mainmenu/dlg_delete_world.lua
msgid "Delete World \"$1\"?"
@ -290,7 +290,7 @@ msgstr "Mogelijke waarden zijn: "
#: builtin/mainmenu/dlg_settings_advanced.lua
msgid "Restore Default"
msgstr "Standaardwaarde"
msgstr "Herstel de Standaardwaarde"
#: builtin/mainmenu/dlg_settings_advanced.lua builtin/mainmenu/store.lua
#: builtin/mainmenu/tab_online.lua
@ -308,12 +308,12 @@ msgstr "Technische namen weergeven"
#: builtin/mainmenu/dlg_settings_advanced.lua
#, fuzzy
msgid "The value must be at least $1."
msgstr "De waarde moet groter zijn dan $1."
msgstr "De waarde moet tenminste $1 zijn."
#: builtin/mainmenu/dlg_settings_advanced.lua
#, fuzzy
msgid "The value must not be larger than $1."
msgstr "De waarde moet lager zijn dan $1."
msgstr "De waarde mag niet groter zijn dan $1."
#: builtin/mainmenu/modmgr.lua
msgid ""
@ -342,7 +342,7 @@ msgstr ""
#: builtin/mainmenu/modmgr.lua
msgid "Subgame Mods"
msgstr ""
msgstr "Subspel Mods"
#: builtin/mainmenu/store.lua
msgid "Close store"
@ -424,17 +424,17 @@ msgstr "Verwondingen inschakelen"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Host Game"
msgstr "Verberg std. mods"
msgstr "Spel Hosten"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Host Server"
msgstr "Server"
msgstr "Server Hosten"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Local Game"
msgstr "Plaatselijk installeren"
msgstr "Lokaal Spel"
#: builtin/mainmenu/tab_local.lua
msgid "Name/Password"
@ -451,7 +451,7 @@ msgstr "Geen wereldnaam opgegeven of geen wereld aangemaakt!"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Play Game"
msgstr "Spelernaam"
msgstr "Spel Spelen"
#: builtin/mainmenu/tab_local.lua
msgid "Port"
@ -462,8 +462,9 @@ msgid "Select World:"
msgstr "Selecteer Wereld:"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Server Port"
msgstr "Serverpoort"
msgstr "Server-poort"
#: builtin/mainmenu/tab_mods.lua
msgid "Installed Mods:"
@ -475,7 +476,7 @@ msgstr "Mod-beschrijving:"
#: builtin/mainmenu/tab_mods.lua
msgid "No dependencies."
msgstr ""
msgstr "Geen afhankelijkheden."
#: builtin/mainmenu/tab_mods.lua
msgid "No mod description available"
@ -527,12 +528,12 @@ msgstr "Naam / Wachtwoord"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
msgid "Ping"
msgstr ""
msgstr "Ping"
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgstr "Spelernaam"
msgstr "Online Spelen"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
msgid "PvP enabled"
@ -568,7 +569,7 @@ msgstr "Weet je zeker dat je je wereld wilt resetten?"
#: builtin/mainmenu/tab_settings.lua
msgid "Autosave screen size"
msgstr ""
msgstr "Scherm afmetingen automatisch bewaren"
#: builtin/mainmenu/tab_settings.lua
msgid "Bilinear Filter"
@ -777,7 +778,7 @@ msgstr "Spelernaam is te lang."
#: src/client/clientlauncher.cpp
msgid "Please choose a name!"
msgstr ""
msgstr "Kies een naam, a.u.b.!"
#: src/client/clientlauncher.cpp
msgid "Provided world path doesn't exist: "
@ -812,7 +813,7 @@ msgstr "Verwondingen"
#: src/game.cpp
msgid "- Mode: "
msgstr ""
msgstr "- Mode(creatief/overleving): "
#: src/game.cpp
#, fuzzy
@ -826,7 +827,7 @@ msgstr "Publiek"
#: src/game.cpp
msgid "- PvP: "
msgstr ""
msgstr "- PVP; "
#: src/game.cpp
#, fuzzy
@ -925,7 +926,7 @@ msgstr "Afsluiten"
#: src/game.cpp
msgid "Game info:"
msgstr ""
msgstr "Spel info:"
#: src/game.cpp
#, fuzzy
@ -959,11 +960,11 @@ msgstr "Node definities..."
#: src/game.cpp
msgid "Off"
msgstr ""
msgstr "Uitgeschakeld"
#: src/game.cpp
msgid "On"
msgstr ""
msgstr "Ingeschakeld"
#: src/game.cpp
#, fuzzy
@ -987,17 +988,17 @@ msgid "Sound Volume"
msgstr "Geluidsvolume"
#: src/game.cpp
#, c-format
#, c-format, fuzzy
msgid "Volume changed to %d%%"
msgstr ""
msgstr "Volume veranderd naar %d1%%2"
#: src/game.cpp
msgid "Volume changed to 0%"
msgstr ""
msgstr "Volume veranderd naar 0%"
#: src/game.cpp
msgid "Volume changed to 100%"
msgstr ""
msgstr "Volume veranderd naar 100%"
#: src/game.cpp src/guiFormSpecMenu.cpp
msgid "ok"
@ -1033,7 +1034,7 @@ msgstr "Console"
#: src/guiKeyChangeMenu.cpp
msgid "Dec. volume"
msgstr ""
msgstr "Volume verminderen"
#: src/guiKeyChangeMenu.cpp
msgid "Double tap \"jump\" to toggle fly"
@ -1081,7 +1082,7 @@ msgstr "Chat-commando's"
#: src/guiKeyChangeMenu.cpp
msgid "Mute"
msgstr ""
msgstr "Dempen"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
@ -1090,7 +1091,7 @@ msgstr "Volgende"
#: src/guiKeyChangeMenu.cpp
msgid "Prev. item"
msgstr ""
msgstr "Vorig element"
#: src/guiKeyChangeMenu.cpp src/settings_translation_file.cpp
msgid "Print stacks"
@ -1174,7 +1175,7 @@ msgstr "Terug"
#: src/keycode.cpp
msgid "Caps Lock"
msgstr ""
msgstr "Hoofdletter vergrendeling"
#: src/keycode.cpp
msgid "Clear"
@ -1456,17 +1457,19 @@ msgstr "3D modus"
#: src/settings_translation_file.cpp
msgid "3D noise defining giant caverns."
msgstr ""
msgstr "3D geluid voor grote holtes."
#: src/settings_translation_file.cpp
msgid ""
"3D noise defining mountain structure and height.\n"
"Also defines structure of floatland mountain terrain."
msgstr ""
"3D geluid voor gebergte of hoge toppen.\n"
"Ook voor luchtdrijvende bergen."
#: src/settings_translation_file.cpp
msgid "3D noise defining structure of river canyon walls."
msgstr ""
msgstr "3D geluid voor wanden van diepe rivier kloof."
#: src/settings_translation_file.cpp
msgid ""
@ -1550,7 +1553,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Adds particles when digging a node."
msgstr ""
msgstr "Voeg opvliegende deeltjes toe bij het graven."
#: src/settings_translation_file.cpp
msgid ""
@ -1596,6 +1599,10 @@ msgid ""
"Android systems only: Tries to create inventory textures from meshes\n"
"when no supported render was found."
msgstr ""
"Enkel bij Android systemen: Tracht inventaris beelden te maken van object "
"mazen\n"
"\n"
"als er geen ondersteunde afbeelding werd gevonden."
#: src/settings_translation_file.cpp
msgid "Anisotropic filtering"
@ -1617,7 +1624,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Apple trees noise"
msgstr ""
msgstr "Appel boom geluid"
#: src/settings_translation_file.cpp
msgid "Approximate (X,Y,Z) scale of fractal in nodes."
@ -1639,6 +1646,15 @@ msgid ""
"optimization.\n"
"Stated in mapblocks (16 nodes)"
msgstr ""
"Op deze afstand zal de server agressief optimaliseren welke blokken naar de "
"cliënt worden gezonden.\n"
"Kleine waarden kunnen prestaties verbeteren ten koste van zichtbare fouten "
"in de weergave.\n"
"(sommige blokken onder water en in grotten en soms op land zullen niet "
"worden weergegeven)\n"
"Indien deze waarde groter is dan max_block_send_distance is deze "
"optimalisatie uitgeschakeld.\n"
"Getal duidt het aantal mapblocks aan (16 nodes)"
#: src/settings_translation_file.cpp
msgid "Automaticaly report to the serverlist."
@ -1666,11 +1682,11 @@ msgstr "Basisvoorrechten"
#: src/settings_translation_file.cpp
msgid "Beach noise"
msgstr ""
msgstr "Strand geluid"
#: src/settings_translation_file.cpp
msgid "Beach noise threshold"
msgstr ""
msgstr "Strand geluid grenswaarde"
#: src/settings_translation_file.cpp
msgid "Bilinear filtering"
@ -1757,7 +1773,7 @@ msgstr "Grot ruispatroon #1"
#: src/settings_translation_file.cpp
msgid "Cavern taper"
msgstr ""
msgstr "Grot hoogtepunt"
#: src/settings_translation_file.cpp
#, fuzzy
@ -1969,6 +1985,8 @@ msgid ""
"Controls the density of floatland mountain terrain.\n"
"Is an offset added to the 'np_mountain' noise value."
msgstr ""
"Bepaalt de dichtheid van drijvende bergen.\n"
"Dit wordt bijgevoegd bij de 'np_mountain' ruis waarde."
#: src/settings_translation_file.cpp
msgid "Controls width of tunnels, a smaller value creates wider tunnels."
@ -2083,38 +2101,42 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Defines areas of 'terrain_higher' (cliff-top terrain)."
msgstr ""
msgstr "Bepaalt gebieden van 'terrain_higher' (rotswand-top terrein)."
#: src/settings_translation_file.cpp
msgid ""
"Defines areas of floatland smooth terrain.\n"
"Smooth floatlands occur when noise > 0."
msgstr ""
"Bepaalt gebieden van drijvend glijdend terrein.\n"
"Drijvend glijdend terrein ontstaat wanneer ruis > 0."
#: src/settings_translation_file.cpp
msgid ""
"Defines areas of higher (cliff-top) terrain and affects steepness of cliffs."
msgstr ""
"Bepaalt gebieden van hoger (rotswand-top) terrein en de steilte van de "
"rotswand."
#: src/settings_translation_file.cpp
msgid "Defines areas where trees have apples."
msgstr ""
msgstr "Bepaalt gebieden met appels in de bomen."
#: src/settings_translation_file.cpp
msgid "Defines areas with sandy beaches."
msgstr ""
msgstr "Bepaalt gebieden met zandstranden."
#: src/settings_translation_file.cpp
msgid "Defines full size of caverns, smaller values create larger caverns."
msgstr ""
msgstr "Bepaalt de grootte van grotten, kleinere waarden geven grotere grotten."
#: src/settings_translation_file.cpp
msgid "Defines large-scale river channel structure."
msgstr ""
msgstr "Bepaalt de grootschalige rivierkanaal structuren."
#: src/settings_translation_file.cpp
msgid "Defines location and terrain of optional hills and lakes."
msgstr ""
msgstr "Bepaalt de plaats van bijkomende heuvels en vijvers."
#: src/settings_translation_file.cpp
msgid ""
@ -2133,13 +2155,16 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Defines tree areas and tree density."
msgstr ""
msgstr "Bepaalt de gebieden met bomen en hun dichtheid."
#: src/settings_translation_file.cpp
msgid ""
"Delay between mesh updates on the client in ms. Increasing this will slow\n"
"down the rate of mesh updates, thus reducing jitter on slower clients."
msgstr ""
"Tussenpauze tussen bijwerkingen van de maas weergave bij de cliënt in ms.\n"
"Dit verhogen zal de bijwerkingen vertragen wat flikkeringen op langzamere "
"cliënten moet verminderen."
#: src/settings_translation_file.cpp
msgid "Delay in sending blocks after building"
@ -2175,13 +2200,15 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Desert noise threshold"
msgstr ""
msgstr "Woestijn ruis drempelwaarde"
#: src/settings_translation_file.cpp
msgid ""
"Deserts occur when np_biome exceeds this value.\n"
"When the new biome system is enabled, this is ignored."
msgstr ""
"Woestijnen ontstaan wanneer np_biome deze waarde overstijgt.\n"
"Indien het nieuwe biome systeem is ingeschakeld wordt dit genegeerd."
#: src/settings_translation_file.cpp
msgid "Desynchronize block animation"
@ -2245,6 +2272,8 @@ msgid ""
"Enable Lua modding support on client.\n"
"This support is experimental and API can change."
msgstr ""
"Schakel Lua modding ondersteuning op cliënt in.\n"
"Deze ondersteuning is experimenteel en de API kan wijzigen."
#: src/settings_translation_file.cpp
msgid "Enable VBO"
@ -2252,11 +2281,11 @@ msgstr "VBO aanzetten"
#: src/settings_translation_file.cpp
msgid "Enable console window"
msgstr ""
msgstr "Schakel het console venster in"
#: src/settings_translation_file.cpp
msgid "Enable creative mode for new created maps."
msgstr ""
msgstr "Schakel creatieve modus in voor nieuwe kaarten."
#: src/settings_translation_file.cpp
msgid "Enable mod security"
@ -2377,7 +2406,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Enables view bobbing when walking."
msgstr ""
msgstr "Schakel op en neer gaan bij wandelen in."
#: src/settings_translation_file.cpp
msgid "Engine profiling data print interval"
@ -2405,7 +2434,7 @@ msgstr "FSAA"
#: src/settings_translation_file.cpp
msgid "Factor noise"
msgstr ""
msgstr "Ruis factor"
#: src/settings_translation_file.cpp
#, fuzzy
@ -2512,7 +2541,7 @@ msgstr "Filters"
#: src/settings_translation_file.cpp
msgid "First of 2 3D noises that together define tunnels."
msgstr ""
msgstr "Eerste van 2 3D geluiden voor tunnels."
#: src/settings_translation_file.cpp
msgid "Fixed map seed"
@ -2520,11 +2549,11 @@ msgstr "Vast kiemgetal"
#: src/settings_translation_file.cpp
msgid "Floatland base height noise"
msgstr ""
msgstr "Drijvend land basis hoogte ruis"
#: src/settings_translation_file.cpp
msgid "Floatland base noise"
msgstr ""
msgstr "Drijvend land basis ruis"
#: src/settings_translation_file.cpp
#, fuzzy
@ -2533,11 +2562,11 @@ msgstr "Waterniveau"
#: src/settings_translation_file.cpp
msgid "Floatland mountain density"
msgstr ""
msgstr "Drijvend gebergte dichtheid"
#: src/settings_translation_file.cpp
msgid "Floatland mountain height"
msgstr ""
msgstr "Drijvend gebergte hoogte"
#: src/settings_translation_file.cpp
msgid "Fly key"
@ -2553,7 +2582,7 @@ msgstr "Mist"
#: src/settings_translation_file.cpp
msgid "Fog Start"
msgstr ""
msgstr "Nevel aanvang"
#: src/settings_translation_file.cpp
msgid "Fog toggle key"
@ -2593,15 +2622,16 @@ msgstr "Vooruit toets"
#: src/settings_translation_file.cpp
msgid "Fractal type"
msgstr ""
msgstr "Fractaal type"
#: src/settings_translation_file.cpp
msgid "Fraction of the visible distance at which fog starts to be rendered"
msgstr ""
msgstr "Fractie van de zichtbare afstand vanaf waar de nevel wordt getoond"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Freetype fonts"
msgstr "Freetype fonts"
msgstr "Freetype lettertypes"
#: src/settings_translation_file.cpp
msgid ""
@ -2702,7 +2732,7 @@ msgstr "HTTP Modules"
#: src/settings_translation_file.cpp
msgid "HUD scale factor"
msgstr ""
msgstr "HUD schaal factor"
#: src/settings_translation_file.cpp
msgid "HUD toggle key"
@ -2786,11 +2816,11 @@ msgstr "Home-pagina van de server. Wordt getoond in de serverlijst."
#: src/settings_translation_file.cpp
msgid "Hotbar next key"
msgstr ""
msgstr "Toets voor volgend gebruikte tool"
#: src/settings_translation_file.cpp
msgid "Hotbar previous key"
msgstr ""
msgstr "Toets voor vorig gebruikte tool"
#: src/settings_translation_file.cpp
msgid "How deep to make rivers"
@ -2823,15 +2853,15 @@ msgstr "Breedte van rivieren"
#: src/settings_translation_file.cpp
msgid "Humidity blend noise"
msgstr ""
msgstr "Vochtigheid vermenging ruis"
#: src/settings_translation_file.cpp
msgid "Humidity noise"
msgstr ""
msgstr "Vochtigheid ruis"
#: src/settings_translation_file.cpp
msgid "Humidity variation for biomes."
msgstr ""
msgstr "Vochtigheidsvariatie voor biomen."
#: src/settings_translation_file.cpp
msgid "IPv6"
@ -2870,6 +2900,12 @@ msgid ""
"invisible\n"
"so that the utility of noclip mode is reduced."
msgstr ""
"Indien aan zal de server achterliggende map blokken niet tonen afgaande\n"
"op de oog positie van de speler. Dit kan de hoeveelheid blokken die naar de "
"cliënt\n"
"gestuurd worden met 50-80 % verminderen. De cliënt zal niet langer de "
"meeste\n"
"onzichtbare blokken ontvangen zodat noclip mode niet meer nodig is."
#: src/settings_translation_file.cpp
msgid ""
@ -3053,11 +3089,11 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Joystick ID"
msgstr ""
msgstr "Stuurknuppel ID"
#: src/settings_translation_file.cpp
msgid "Joystick Type"
msgstr ""
msgstr "Stuurknuppel Type"
#: src/settings_translation_file.cpp
msgid "Joystick button repetition interval"
@ -3106,20 +3142,24 @@ msgstr ""
"Bereik is ongeveer -2 tot 2."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Julia w"
msgstr ""
msgstr "Julia w"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Julia x"
msgstr ""
msgstr "Julia x"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Julia y"
msgstr ""
msgstr "Julia y"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Julia z"
msgstr ""
msgstr "Julia z"
#: src/settings_translation_file.cpp
msgid "Jump key"
@ -3626,6 +3666,10 @@ msgid ""
"Only mapchunks completely within the mapgen limit are generated.\n"
"Value is stored per-world."
msgstr ""
"Limiet van de landkaart generatie in aantal noden van (0,0,0) in alle 6 "
"richtingen.\n"
"Enkel mapchunks die volledig in de limiet vallen worden gegenereerd.\n"
"Deze waarde wordt per wereld bewaard."
#: src/settings_translation_file.cpp
msgid ""
@ -3714,7 +3758,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Makes all liquids opaque"
msgstr ""
msgstr "Maak alle vloeistoffen ondoorzichtig"
#: src/settings_translation_file.cpp
msgid "Map directory"
@ -3824,7 +3868,7 @@ msgstr "Wereld-grens"
#: src/settings_translation_file.cpp
msgid "Mapblock mesh generator's MapBlock cache size MB"
msgstr ""
msgstr "Mapblock maas generator's MapBlock cache grootte in MB"
#: src/settings_translation_file.cpp
msgid "Mapblock unload timeout"
@ -4030,7 +4074,7 @@ msgstr "Maximaal aantal gebruikers"
#: src/settings_translation_file.cpp
msgid "Menus"
msgstr "Menus"
msgstr "Menu's"
#: src/settings_translation_file.cpp
msgid "Mesh cache"
@ -4073,7 +4117,7 @@ msgstr "Mip-Mapping"
#: src/settings_translation_file.cpp
msgid "Modifies the size of the hudbar elements."
msgstr ""
msgstr "Veranderd de grootte van de HUDbar elementen."
#: src/settings_translation_file.cpp
msgid "Modstore details URL"
@ -4102,7 +4146,7 @@ msgstr "Heuvel-hoogte ruisparameters"
#: src/settings_translation_file.cpp
msgid "Mountain noise"
msgstr ""
msgstr "Bergen ruis"
#: src/settings_translation_file.cpp
msgid "Mouse sensitivity"
@ -4114,7 +4158,7 @@ msgstr "Muis-gevoeligheidsfactor."
#: src/settings_translation_file.cpp
msgid "Mud noise"
msgstr ""
msgstr "Modder ruis"
#: src/settings_translation_file.cpp
msgid ""
@ -4240,11 +4284,11 @@ msgstr "Aantal parallax occlusie iteraties."
#: src/settings_translation_file.cpp
msgid "Offset"
msgstr ""
msgstr "afstand"
#: src/settings_translation_file.cpp
msgid "Opaque liquids"
msgstr ""
msgstr "Ondoorschijnende vloeistoffen"
#: src/settings_translation_file.cpp
msgid "Overall bias of parallax occlusion effect, usually scale/2."
@ -4292,6 +4336,8 @@ msgid ""
"Path to shader directory. If no path is defined, default location will be "
"used."
msgstr ""
"Pad naar de schader. Indien geen pad wordt gegeven zal de standaard locatie "
"gebruikt worden."
#: src/settings_translation_file.cpp
msgid "Path to texture directory. All textures are first searched from here."
@ -4403,7 +4449,7 @@ msgstr "Rivier ruis parameters"
#: src/settings_translation_file.cpp
msgid "Ridge underwater noise"
msgstr ""
msgstr "Onderwater richel ruis"
#: src/settings_translation_file.cpp
msgid "Right key"
@ -4441,7 +4487,7 @@ msgstr "Ronde mini-kaart"
#: src/settings_translation_file.cpp
msgid "Sandy beaches occur when np_beach exceeds this value."
msgstr ""
msgstr "Zandstranden komen voor wanneer np_beach groter is dan deze waarde."
#: src/settings_translation_file.cpp
msgid "Save the map received by the client on disk."
@ -4453,7 +4499,7 @@ msgstr "Lokaal bewaren van de server-wereld"
#: src/settings_translation_file.cpp
msgid "Scale"
msgstr ""
msgstr "Schaal"
#: src/settings_translation_file.cpp
msgid ""
@ -4510,7 +4556,7 @@ msgstr "Grot ruispatroon #1"
#: src/settings_translation_file.cpp
msgid "Second of 2 3D noises that together define tunnels."
msgstr ""
msgstr "Tweede van 2 3d geluiden voor tunnels."
#: src/settings_translation_file.cpp
msgid "Security"
@ -4558,7 +4604,7 @@ msgstr "Netwerkpoort van de server"
#: src/settings_translation_file.cpp
msgid "Server side occlusion culling"
msgstr ""
msgstr "Door server worden onzichtbare nodes niet doorgegeven"
#: src/settings_translation_file.cpp
msgid "Serverlist URL"
@ -4650,10 +4696,14 @@ msgid ""
"increase the cache hit %, reducing the data being copied from the main\n"
"thread, thus reducing jitter."
msgstr ""
"Grootte van de MapBlock cache voor de maas generator. Dit verhogen vergroot\n"
"de kans op een cache hit, waardoor minder data van de main thread\n"
"wordt gekopieerd waardoor flikkeren verminderd."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Slice w"
msgstr ""
msgstr "Slice w"
#: src/settings_translation_file.cpp
msgid "Slope and fill work together to modify the heights"
@ -4661,11 +4711,11 @@ msgstr "Helling en vulling bepalen in combinatie de hoogte"
#: src/settings_translation_file.cpp
msgid "Small-scale humidity variation for blending biomes on borders."
msgstr ""
msgstr "Kleinschalig vochtigheidsvariatie voor de overgang van biomen."
#: src/settings_translation_file.cpp
msgid "Small-scale temperature variation for blending biomes on borders."
msgstr ""
msgstr "Kleinschalig temperatuursvariatie voor de overgang van biomen."
#: src/settings_translation_file.cpp
msgid "Smooth lighting"
@ -4716,11 +4766,11 @@ msgstr "Vast geboortepunt"
#: src/settings_translation_file.cpp
msgid "Status message on connection"
msgstr ""
msgstr "Status bericht bij verbinding"
#: src/settings_translation_file.cpp
msgid "Steepness noise"
msgstr ""
msgstr "Steilte ruis"
#: src/settings_translation_file.cpp
msgid "Strength of generated normalmaps."
@ -4744,7 +4794,7 @@ msgstr "Sqlite synchrone modus"
#: src/settings_translation_file.cpp
msgid "Temperature variation for biomes."
msgstr ""
msgstr "Temperatuurvariatie voor biomen."
#: src/settings_translation_file.cpp
msgid "Terrain Height"
@ -4752,7 +4802,7 @@ msgstr "Terrein hoogte"
#: src/settings_translation_file.cpp
msgid "Terrain alt noise"
msgstr ""
msgstr "Terrain_alt ruis"
#: src/settings_translation_file.cpp
#, fuzzy
@ -4791,7 +4841,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Terrain persistence noise"
msgstr ""
msgstr "Terrein persistentie ruis"
#: src/settings_translation_file.cpp
msgid "Texture path"
@ -4823,7 +4873,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "The identifier of the joystick to use"
msgstr ""
msgstr "De identificatie van de stuurknuppel die u gebruikt"
#: src/settings_translation_file.cpp
msgid "The network interface that the server listens on."
@ -4891,7 +4941,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "The type of joystick"
msgstr ""
msgstr "Het type van stuurknuppel"
#: src/settings_translation_file.cpp
msgid "This font will be used for certain languages."
@ -4945,7 +4995,7 @@ msgstr "Tooltip tijdsduur"
#: src/settings_translation_file.cpp
msgid "Trees noise"
msgstr ""
msgstr "Bomen ruis"
#: src/settings_translation_file.cpp
msgid "Trilinear filtering"
@ -4970,6 +5020,8 @@ msgid ""
"Typical maximum height, above and below midpoint, of floatland mountain "
"terrain."
msgstr ""
"Typisch maximum hoogte, boven en onder het middelpunt van drijvend berg "
"terrein."
#: src/settings_translation_file.cpp
msgid "URL to the server list displayed in the Multiplayer Tab."
@ -4987,6 +5039,11 @@ msgid ""
"It should give significant performance boost at the cost of less detailed "
"image."
msgstr ""
"Onderbemonstering is gelijkaardig aan het gebruik van een lagere "
"schermresolutie,\n"
"maar het behelst enkel de spel wereld. De GUI resolutie blijft intact.\n"
"Dit zou een gewichtige prestatie verbetering moeten geven ten koste van een "
"verminderde detailweergave."
#: src/settings_translation_file.cpp
msgid "Unlimited player transfer distance"
@ -5056,35 +5113,40 @@ msgstr "Valleien vlaggen"
#: src/settings_translation_file.cpp
msgid "Variation of biome filler depth."
msgstr ""
msgstr "Variatie van de biome vullingsdiepte."
#: src/settings_translation_file.cpp
msgid "Variation of hill height and lake depth on floatland smooth terrain."
msgstr ""
"Variatie van de heuvel hoogte en vijver diepte op drijvend egaal terrein."
#: src/settings_translation_file.cpp
msgid "Variation of maximum mountain height (in nodes)."
msgstr ""
msgstr "Variatie van de maximum berg hoogte (in noden)."
#: src/settings_translation_file.cpp
msgid "Variation of number of caves."
msgstr ""
msgstr "Variatie van het aantal grotten."
#: src/settings_translation_file.cpp
msgid ""
"Variation of terrain vertical scale.\n"
"When noise is < -0.55 terrain is near-flat."
msgstr ""
"Variatie in de verticale schaal van het terrein.\n"
"Indien ruis < -0.55 is het terrein haast vlak."
#: src/settings_translation_file.cpp
msgid "Varies depth of biome surface nodes."
msgstr ""
msgstr "Varieert de diepte van de biome oppervlakte noden."
#: src/settings_translation_file.cpp
msgid ""
"Varies roughness of terrain.\n"
"Defines the 'persistence' value for terrain_base and terrain_alt noises."
msgstr ""
"Varieert de ruwheid van het terrein.\n"
"Definieert de 'persistence' waarde voor terrain_base en terrain_alt ruis."
#: src/settings_translation_file.cpp
#, fuzzy
@ -5121,7 +5183,7 @@ msgstr "Toets voor vergroten zichtafstand"
#: src/settings_translation_file.cpp
msgid "View zoom key"
msgstr ""
msgstr "Toets voor het inzoomen"
#: src/settings_translation_file.cpp
msgid "Viewing range"
@ -5301,6 +5363,9 @@ msgid ""
"background.\n"
"Contains the same information as the file debug.txt (default name)."
msgstr ""
"Enkel Windows systemen: Start Minetest met een commando (DOS-prompt) window "
"in de achtergrond.\n"
"Bevat dezelfde informatie als het bestand debug.txt (standaard naam)."
#: src/settings_translation_file.cpp
msgid ""
@ -5325,31 +5390,31 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Y-level of average terrain surface."
msgstr ""
msgstr "Y-niveau van gemiddeld terrein oppervlak."
#: src/settings_translation_file.cpp
msgid "Y-level of cavern upper limit."
msgstr ""
msgstr "Y-niveau van hoogste limiet voor grotten."
#: src/settings_translation_file.cpp
msgid "Y-level of floatland midpoint and lake surface."
msgstr ""
msgstr "Y-niveau van drijvend land middelpunt en vijver oppervlak."
#: src/settings_translation_file.cpp
msgid "Y-level of higher (cliff-top) terrain."
msgstr ""
msgstr "Y-niveau van hoger (rotswand-top) terrein."
#: src/settings_translation_file.cpp
msgid "Y-level of lower terrain and lakebeds."
msgstr ""
msgstr "Y-niveau van lager terrein en vijver bodems."
#: src/settings_translation_file.cpp
msgid "Y-level of seabed."
msgstr ""
msgstr "Y-niveau van zee bodem."
#: src/settings_translation_file.cpp
msgid "Y-level to which floatland shadows extend."
msgstr ""
msgstr "Y-niveau tot waar de schaduw van drijvend land reikt."
#: src/settings_translation_file.cpp
#, fuzzy

View File

@ -8,17 +8,17 @@ msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-21 17:40+0200\n"
"PO-Revision-Date: 2017-02-04 14:50+0000\n"
"Last-Translator: Jakub Mendel <jimikuba@o2.pl>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/minetest/minetest/"
"pl/>\n"
"PO-Revision-Date: 2017-05-31 19:57+0000\n"
"Last-Translator: Mateusz Mendel <mendelm9@gmail.com>\n"
"Language-Team: Polish "
"<https://hosted.weblate.org/projects/minetest/minetest/pl/>\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 2.11\n"
"X-Generator: Weblate 2.15-dev\n"
#: builtin/client/init.lua
msgid "Respawn"
@ -93,16 +93,15 @@ msgstr "Anuluj"
#: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua
#, fuzzy
msgid "Dependencies:"
msgstr "Zależy od:"
msgstr "Zależności"
#: builtin/mainmenu/dlg_config_world.lua
msgid "Disable MP"
msgstr "Wyłącz paczkę modów"
#: builtin/mainmenu/dlg_config_world.lua
#, fuzzy
msgid "Disable all"
msgstr "Wyłącz paczkę modów"
msgstr "Wyłącz wszystko"
#: builtin/mainmenu/dlg_config_world.lua
msgid "Enable MP"
@ -125,8 +124,9 @@ msgid "Mod:"
msgstr "Mod:"
#: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua
#, fuzzy
msgid "Optional dependencies:"
msgstr ""
msgstr "Dodatkowe zależności:"
#: builtin/mainmenu/dlg_config_world.lua
#: builtin/mainmenu/dlg_settings_advanced.lua src/guiKeyChangeMenu.cpp
@ -336,8 +336,9 @@ msgstr ""
"Instalacja moda: nie można znaleźć odpowiedniego folderu dla paczki modów $1"
#: builtin/mainmenu/modmgr.lua
#, fuzzy
msgid "Subgame Mods"
msgstr ""
msgstr "Mody trybów gry"
#: builtin/mainmenu/store.lua
msgid "Close store"
@ -419,17 +420,17 @@ msgstr "Włącz obrażenia"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Host Game"
msgstr "Ukryj Grę"
msgstr "Utwórz grę"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Host Server"
msgstr "Serwer"
msgstr "Udostępnij serwer"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Local Game"
msgstr "Instaluj"
msgstr "Lokalna gra"
#: builtin/mainmenu/tab_local.lua
msgid "Name/Password"
@ -444,9 +445,8 @@ msgid "No world created or selected!"
msgstr "Nie wybrano bądź nie utworzono świata!"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Play Game"
msgstr "Nazwa gracza"
msgstr "Graj"
#: builtin/mainmenu/tab_local.lua
msgid "Port"
@ -469,8 +469,9 @@ msgid "Mod information:"
msgstr "Informacje o modzie:"
#: builtin/mainmenu/tab_mods.lua
#, fuzzy
msgid "No dependencies."
msgstr ""
msgstr "Brak wymaganych zależności."
#: builtin/mainmenu/tab_mods.lua
msgid "No mod description available"
@ -521,13 +522,14 @@ msgid "Name / Password"
msgstr "Nazwa gracza / Hasło"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
#, fuzzy
msgid "Ping"
msgstr ""
msgstr "Ping"
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgstr "Nazwa gracza"
msgstr "Gra przez sieć"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
msgid "PvP enabled"
@ -562,8 +564,9 @@ msgid "Are you sure to reset your singleplayer world?"
msgstr "Jesteś pewny że chcesz zresetować świat singleplayer?"
#: builtin/mainmenu/tab_settings.lua
#, fuzzy
msgid "Autosave screen size"
msgstr ""
msgstr "Automatyczny zapis rozmiaru okienka"
#: builtin/mainmenu/tab_settings.lua
msgid "Bilinear Filter"
@ -644,7 +647,7 @@ msgstr "Resetuj świat pojedynczego gracza"
#: builtin/mainmenu/tab_settings.lua
#, fuzzy
msgid "Screen:"
msgstr "Zrzut ekranu"
msgstr "Ekran:"
#: builtin/mainmenu/tab_settings.lua
msgid "Settings"
@ -771,8 +774,9 @@ msgid "Player name too long."
msgstr "Nazwa gracza jest za długa."
#: src/client/clientlauncher.cpp
#, fuzzy
msgid "Please choose a name!"
msgstr ""
msgstr "Wybierz nazwę"
#: src/client/clientlauncher.cpp
msgid "Provided world path doesn't exist: "
@ -791,42 +795,39 @@ msgstr ""
"Sprawdź plik debug.txt by uzyskać więcej informacji."
#: src/game.cpp
#, fuzzy
msgid "- Address: "
msgstr "Adres"
msgstr "Adres "
#: src/game.cpp
#, fuzzy
msgid "- Creative Mode: "
msgstr "Tryb kreatywny"
msgstr "Tryb kreatywny "
#: src/game.cpp
#, fuzzy
msgid "- Damage: "
msgstr "Włącz obrażenia"
msgstr "Włącz obrażenia "
#: src/game.cpp
#, fuzzy
msgid "- Mode: "
msgstr ""
msgstr "Tryb: "
#: src/game.cpp
#, fuzzy
msgid "- Port: "
msgstr "Port"
msgstr "Port "
#: src/game.cpp
#, fuzzy
msgid "- Public: "
msgstr "Publiczne"
msgstr "Publiczne "
#: src/game.cpp
msgid "- PvP: "
msgstr ""
msgstr "Gracz przeciwko graczowi: "
#: src/game.cpp
#, fuzzy
msgid "- Server Name: "
msgstr "Nazwa serwera"
msgstr "Nazwa serwera "
#: src/game.cpp
msgid "Change Keys"
@ -864,6 +865,10 @@ msgid ""
msgstr ""
"Domyślne sterowanie:↵\n"
"- WASD: ruch↵\n"
"- W: do przodu\n"
"- S: do tyłu\n"
"- A: lewo\n"
"- D: prawo\n"
"- Spacja: skok/wspinanie się↵\n"
"- Shift: skradanie się/schodzenie w dół↵\n"
"- Q: upuszczenie przedmiotu↵\n"
@ -920,12 +925,12 @@ msgstr "Wyjście z gry"
#: src/game.cpp
msgid "Game info:"
msgstr ""
msgstr "Informacje o grze:"
#: src/game.cpp
#, fuzzy
msgid "Game paused"
msgstr "Nazwa Gry"
msgstr "Gra wstrzymana"
#: src/game.cpp
#, fuzzy
@ -953,17 +958,18 @@ msgid "Node definitions..."
msgstr "Definicje bloków..."
#: src/game.cpp
#, fuzzy
msgid "Off"
msgstr ""
#: src/game.cpp
msgid "On"
msgstr ""
msgstr "Wyłącz"
#: src/game.cpp
#, fuzzy
msgid "On"
msgstr "Włącz"
#: src/game.cpp
msgid "Remote server"
msgstr "Port zdalny"
msgstr "Serwer zdalny"
#: src/game.cpp
msgid "Resolving address..."
@ -982,17 +988,19 @@ msgid "Sound Volume"
msgstr "Głośność"
#: src/game.cpp
#, c-format
#, c-format, fuzzy
msgid "Volume changed to %d%%"
msgstr ""
msgstr "Zmieniono poziom głośności na %d%%"
#: src/game.cpp
#, fuzzy
msgid "Volume changed to 0%"
msgstr ""
msgstr "Zmieniono poziom głośności na 0%"
#: src/game.cpp
#, fuzzy
msgid "Volume changed to 100%"
msgstr ""
msgstr "Zmieniono poziom głośności na 100%"
#: src/game.cpp src/guiFormSpecMenu.cpp
msgid "ok"
@ -1027,8 +1035,9 @@ msgid "Console"
msgstr "Konsola"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Dec. volume"
msgstr ""
msgstr "Zmniejsz głośność"
#: src/guiKeyChangeMenu.cpp
msgid "Double tap \"jump\" to toggle fly"
@ -1045,7 +1054,7 @@ msgstr "Przód"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Inc. volume"
msgstr "Głośność"
msgstr "Zwiększ Głośność"
#: src/guiKeyChangeMenu.cpp
msgid "Inventory"
@ -1072,11 +1081,12 @@ msgstr "Lewo"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Local command"
msgstr "Komenda"
msgstr "Główne polecenie"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Mute"
msgstr ""
msgstr "Wycisz"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
@ -1084,8 +1094,9 @@ msgid "Next item"
msgstr "Następny"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Prev. item"
msgstr ""
msgstr "Poprzedni"
#: src/guiKeyChangeMenu.cpp src/settings_translation_file.cpp
msgid "Print stacks"
@ -1168,8 +1179,9 @@ msgid "Back"
msgstr "Backspace"
#: src/keycode.cpp
#, fuzzy
msgid "Caps Lock"
msgstr ""
msgstr "Klawisz Caps Lock"
#: src/keycode.cpp
msgid "Clear"
@ -1190,7 +1202,7 @@ msgstr "End"
#: src/keycode.cpp
#, fuzzy
msgid "Erase EOF"
msgstr "Erase OEF"
msgstr "Usuń EOF"
#: src/keycode.cpp
msgid "Execute"
@ -1207,12 +1219,12 @@ msgstr "Home"
#: src/keycode.cpp
#, fuzzy
msgid "IME Accept"
msgstr "Zaakceptuj"
msgstr "Zaakceptuj IME"
#: src/keycode.cpp
#, fuzzy
msgid "IME Convert"
msgstr "Konwertuj"
msgstr "Konwertuj IME"
#: src/keycode.cpp
#, fuzzy
@ -1225,9 +1237,8 @@ msgid "IME Mode Change"
msgstr "Zmiana Trybu"
#: src/keycode.cpp
#, fuzzy
msgid "IME Nonconvert"
msgstr "Nonconvert"
msgstr "Niezmienialny"
#: src/keycode.cpp
msgid "Insert"
@ -1379,16 +1390,18 @@ msgid "Scroll Lock"
msgstr "Scroll Lock"
#: src/keycode.cpp
#, fuzzy
msgid "Select"
msgstr "Select"
msgstr "Wybierz"
#: src/keycode.cpp
msgid "Shift"
msgstr "Shift"
#: src/keycode.cpp
#, fuzzy
msgid "Sleep"
msgstr "Sleep"
msgstr "Uśpij"
#: src/keycode.cpp
msgid "Snapshot"
@ -1447,18 +1460,23 @@ msgid "3D mode"
msgstr "Modele 3D"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "3D noise defining giant caverns."
msgstr ""
msgstr "Szum 3d określający olbrzymie jaskinie."
#: src/settings_translation_file.cpp
#, fuzzy
msgid ""
"3D noise defining mountain structure and height.\n"
"Also defines structure of floatland mountain terrain."
msgstr ""
"Szum 3d określający strukturę i wysokość gór.\n"
"Określa również strukturę wznoszącego się terenu górzystego."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "3D noise defining structure of river canyon walls."
msgstr ""
msgstr "Szum 3d określający strukturę kanionów rzecznych."
#: src/settings_translation_file.cpp
msgid ""
@ -1540,7 +1558,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Adds particles when digging a node."
msgstr ""
msgstr "Dodaje efekty cząstkowe podczas wykopywania bloków."
#: src/settings_translation_file.cpp
msgid ""
@ -1557,8 +1575,9 @@ msgid ""
"brighter.\n"
"This setting is for the client only and is ignored by the server."
msgstr ""
"Ustaw enkodowanie gamma dla tablic świateł. Niższe wartości są jaśniejsze.\n"
"Te ustawienie jest tylko dla klientów i jest ignorowane przez serwer."
"Ustaw kodowanie gamma dla tablic świateł. Niższe wartości to większa jasność."
"\n"
"To ustawienie jest tylko dla klientów, ignorowane przez serwer."
#: src/settings_translation_file.cpp
msgid "Advanced"
@ -1573,8 +1592,9 @@ msgid "Always fly and fast"
msgstr "Zawsze lataj oraz poruszaj się szybko"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Ambient occlusion gamma"
msgstr ""
msgstr "Ambient occlusion gamma"
#: src/settings_translation_file.cpp
msgid "Amplifies the valleys"
@ -1585,6 +1605,8 @@ msgid ""
"Android systems only: Tries to create inventory textures from meshes\n"
"when no supported render was found."
msgstr ""
"Tylko na systemie Android: próba stworzenia tekstur inwentarza z meshy, "
"kiedy nie znaleziono wspomaganego renderowania."
#: src/settings_translation_file.cpp
msgid "Anisotropic filtering"
@ -1605,8 +1627,9 @@ msgstr ""
"minetest.net."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Apple trees noise"
msgstr ""
msgstr "Szum jabłoni"
#: src/settings_translation_file.cpp
msgid "Approximate (X,Y,Z) scale of fractal in nodes."
@ -1617,6 +1640,7 @@ msgid "Ask to reconnect after crash"
msgstr "Poproś o ponowne połączenie po awarii"
#: src/settings_translation_file.cpp
#, fuzzy
msgid ""
"At this distance the server will aggressively optimize which blocks are sent "
"to clients.\n"
@ -1628,6 +1652,15 @@ msgid ""
"optimization.\n"
"Stated in mapblocks (16 nodes)"
msgstr ""
"Z tej odległości serwer mocno zoptymalizuje, które bloki są wysłane do "
"klientów.\n"
"Małe wartości mogą bardzo poprawić działanie, kosztem widocznego "
"renderowania glitchy.\n"
"(Niektóre bloki nie będą wygenerowane pod wodą ani w jaskiniach, jak również "
"na lądzie.\n"
"Zmiana wartości na wyższą niż max_block_send_distance wyłącza tą "
"optymalizację.\n"
"Zapisane w blokach mapy (16 bloków)"
#: src/settings_translation_file.cpp
msgid "Automaticaly report to the serverlist."
@ -1636,7 +1669,7 @@ msgstr "Automatycznie zgłoś do listy serwerów."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Autorun key"
msgstr "Tryb szybki"
msgstr "Tryb automatycznego biegania"
#: src/settings_translation_file.cpp
msgid "Backward key"
@ -1655,12 +1688,14 @@ msgid "Basic Privileges"
msgstr "Podstawowe uprawnienia"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Beach noise"
msgstr ""
msgstr "Szum plaży"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Beach noise threshold"
msgstr ""
msgstr "Granica szumu plaży"
#: src/settings_translation_file.cpp
msgid "Bilinear filtering"
@ -1673,12 +1708,11 @@ msgstr "Sprawdzanie adresu"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Biome API temperature and humidity noise parameters"
msgstr "Wilgotność oraz parametry hałasu biomu Mapgen"
msgstr "Parametry temperatury oraz wilgotności biomu Mapgen"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Biome noise"
msgstr "Szum rzeki"
msgstr "Szum biomu"
#: src/settings_translation_file.cpp
msgid "Bits per pixel (aka color depth) in fullscreen mode."
@ -1687,7 +1721,7 @@ msgstr "Bity na piksel (głębia koloru) w trybie pełnoekranowym."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Build inside player"
msgstr "Gra wieloosobowa"
msgstr "Buduj w pozycji gracza"
#: src/settings_translation_file.cpp
msgid "Builtin"
@ -1727,12 +1761,10 @@ msgid "Cave width"
msgstr "Szerokość jaskini"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Cave1 noise"
msgstr "Szum jaskini #1"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Cave2 noise"
msgstr "Szum jaskini #1"
@ -1742,18 +1774,18 @@ msgid "Cavern limit"
msgstr "Szerokość jaskini"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Cavern noise"
msgstr "Szum jaskini #1"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Cavern taper"
msgstr ""
msgstr "Zwężenie jaskini"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Cavern threshold"
msgstr "Generator mapy"
msgstr "Granica jaskinii"
#: src/settings_translation_file.cpp
msgid "Caves and tunnels form at the intersection of the two noises"
@ -1840,7 +1872,7 @@ msgstr "Klient i Serwer"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Client modding"
msgstr "Klient"
msgstr "Modyfikacja klienta"
#: src/settings_translation_file.cpp
msgid "Climbing speed"
@ -1913,7 +1945,7 @@ msgstr "Kolor konsoli"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Console height"
msgstr "Klawisz konsoli"
msgstr "Wysokość konsoli"
#: src/settings_translation_file.cpp
msgid "Console key"
@ -1950,10 +1982,13 @@ msgid "Controls steepness/height of hills."
msgstr "Kontroluje stromość/wysokość gór."
#: src/settings_translation_file.cpp
#, fuzzy
msgid ""
"Controls the density of floatland mountain terrain.\n"
"Is an offset added to the 'np_mountain' noise value."
msgstr ""
"Kontroluje gęstość wznoszącego się terenu górzystego.\n"
"Jest to wartość dodana do wartość szumu 'np_mountain'."
#: src/settings_translation_file.cpp
msgid "Controls width of tunnels, a smaller value creates wider tunnels."
@ -1982,7 +2017,7 @@ msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Creative"
msgstr "Utwórz"
msgstr "Kreatywny"
#: src/settings_translation_file.cpp
msgid "Crosshair alpha"
@ -2023,7 +2058,7 @@ msgstr "Poziom logowania debugowania"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Dec. volume key"
msgstr "Klawisz przełączania HUD"
msgstr "Klawisz zmniejszania głośności"
#: src/settings_translation_file.cpp
msgid "Dedicated server step"
@ -2066,39 +2101,46 @@ msgstr ""
"Ma znaczenie tylko gdy skompilowane z cURL."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Defines areas of 'terrain_higher' (cliff-top terrain)."
msgstr ""
msgstr "Określa obszary 'terrain_higher' (szczyt wzgórza)."
#: src/settings_translation_file.cpp
#, fuzzy
msgid ""
"Defines areas of floatland smooth terrain.\n"
"Smooth floatlands occur when noise > 0."
msgstr ""
"Określa obszary wznoszącego się gładkiego terenu.\n"
"Wygładzone powierzchnie pojawiają się gdy szum > 0."
#: src/settings_translation_file.cpp
#, fuzzy
msgid ""
"Defines areas of higher (cliff-top) terrain and affects steepness of cliffs."
msgstr ""
msgstr "Określa obszary wyższych terenów oraz wpływa na stromość klifów."
#: src/settings_translation_file.cpp
msgid "Defines areas where trees have apples."
msgstr ""
msgstr "Określa obszary na których drzewa mają jabłka."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Defines areas with sandy beaches."
msgstr ""
msgstr "Określa obszary z piaszczystymi plażami."
#: src/settings_translation_file.cpp
msgid "Defines full size of caverns, smaller values create larger caverns."
msgstr ""
msgstr "Określa wielkość jaskiń, mniejsze wartości tworzą większe jaskinie."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Defines large-scale river channel structure."
msgstr ""
msgstr "Określa strukturę kanałów rzecznych."
#: src/settings_translation_file.cpp
msgid "Defines location and terrain of optional hills and lakes."
msgstr ""
msgstr "Określa położenie oraz teren z dodatkowymi górami i jeziorami."
#: src/settings_translation_file.cpp
msgid ""
@ -2115,14 +2157,19 @@ msgstr ""
"nieskończoność)."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Defines tree areas and tree density."
msgstr ""
msgstr "Określa obszar z drzewami oraz ich gęstość."
#: src/settings_translation_file.cpp
#, fuzzy
msgid ""
"Delay between mesh updates on the client in ms. Increasing this will slow\n"
"down the rate of mesh updates, thus reducing jitter on slower clients."
msgstr ""
"Opóźnienie między aktualizacją meshy na kliencie podawane w milisekundach. "
"Zwiększenie zredukuje częstość aktualizacji meshy, ograniczając w ten sposób "
"jitter na wolniejszych klientach."
#: src/settings_translation_file.cpp
msgid "Delay in sending blocks after building"
@ -2721,7 +2768,7 @@ msgstr "Wysokość początkowego rozmiaru okna."
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Height noise"
msgstr "Prawy Windows"
msgstr "Wysokość szumu"
#: src/settings_translation_file.cpp
msgid "Height on which clouds are appearing."
@ -2738,12 +2785,12 @@ msgstr "FPU Wysokiej precyzji"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Hill steepness"
msgstr "Generator mapy"
msgstr "Stromość zbocza"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Hill threshold"
msgstr "Generator mapy"
msgstr "Granica zbocza"
#: src/settings_translation_file.cpp
msgid "Homepage of server, to be displayed in the serverlist."
@ -3097,9 +3144,9 @@ msgid ""
"See http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
msgstr ""
"Klawisz zmniejszania zasięgu widzenia.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
"Klawisz zmniejszania głośności.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901"
"735e3da1b0edf72eb3"
#: src/settings_translation_file.cpp
msgid ""
@ -3128,9 +3175,9 @@ msgid ""
"See http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
msgstr ""
"Klawisz zwiększania zasięgu widzenia.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
"Klawisz zwiększania głośności.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901"
"735e3da1b0edf72eb3"
#: src/settings_translation_file.cpp
msgid ""
@ -3199,9 +3246,9 @@ msgid ""
"See http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
msgstr ""
"Klawisz skakania.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
"Klawisz wyciszania gry.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901"
"735e3da1b0edf72eb3"
#: src/settings_translation_file.cpp
msgid ""
@ -3271,9 +3318,9 @@ msgid ""
"See http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
msgstr ""
"Klawisz otwierania inwentarza.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
"Klawisz wyboru następnej pozycji na pasku akcji.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901"
"735e3da1b0edf72eb3"
#: src/settings_translation_file.cpp
#, fuzzy
@ -3282,9 +3329,9 @@ msgid ""
"See http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
msgstr ""
"Klawisz otwierania inwentarza.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
"Klawisz wyboru poprzedniej pozycji na pasku akcji.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901"
"735e3da1b0edf72eb3"
#: src/settings_translation_file.cpp
msgid ""
@ -3469,23 +3516,21 @@ msgid ""
"See http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
msgstr ""
"Klawisz skakania.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr."
"html#a54da2a0e231901735e3da1b0edf72eb3"
"Klawisz wyświetlania zoom kiedy to możliwe.\n"
"Zobacz http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901"
"735e3da1b0edf72eb3"
#: src/settings_translation_file.cpp
msgid "Key use for climbing/descending"
msgstr "Klawisz używany do wspinania"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Lake steepness"
msgstr "Generator mapy"
msgstr "Stromość jeziora"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Lake threshold"
msgstr "Generator mapy"
msgstr "Granica jeziora"
#: src/settings_translation_file.cpp
msgid "Language"

File diff suppressed because it is too large Load Diff

4684
po/sl/minetest.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,17 +8,17 @@ msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-21 17:40+0200\n"
"PO-Revision-Date: 2017-02-06 16:24+0000\n"
"Last-Translator: lisacvuk <lisacvukhome@gmail.com>\n"
"Language-Team: Serbian (cyrillic) <https://hosted.weblate.org/projects/"
"minetest/minetest/sr_Cyrl/>\n"
"PO-Revision-Date: 2017-06-02 14:47+0000\n"
"Last-Translator: Лазар Вукановић <gavranvukhome@gmail.com>\n"
"Language-Team: Serbian (cyrillic) "
"<https://hosted.weblate.org/projects/minetest/minetest/sr_Cyrl/>\n"
"Language: sr_Cyrl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 2.11\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 2.15-dev\n"
#: builtin/client/init.lua
msgid "Respawn"
@ -1531,13 +1531,15 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Adds particles when digging a node."
msgstr ""
msgstr "Додаје честице када се блок ископа."
#: src/settings_translation_file.cpp
msgid ""
"Adjust dpi configuration to your screen (non X11/Android only) e.g. for 4k "
"screens."
msgstr ""
"Подеси dpi конфигурацију за твој екран (само за оне који нису X11/Android) "
"нпр. за 4k екране."
#: src/settings_translation_file.cpp
msgid ""
@ -1545,10 +1547,12 @@ msgid ""
"brighter.\n"
"This setting is for the client only and is ignored by the server."
msgstr ""
"Подеси осветљење унутар игре. Веће вредности су светлије.\n"
"Ово подешавање је само за клијента, сервер га игнорише."
#: src/settings_translation_file.cpp
msgid "Advanced"
msgstr ""
msgstr "Напредно"
#: src/settings_translation_file.cpp
msgid "Altitude Chill"
@ -1556,7 +1560,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Always fly and fast"
msgstr ""
msgstr "Увек летење и брзина"
#: src/settings_translation_file.cpp
msgid "Ambient occlusion gamma"
@ -1571,6 +1575,8 @@ msgid ""
"Android systems only: Tries to create inventory textures from meshes\n"
"when no supported render was found."
msgstr ""
"Само за Андроид системе: Покушава да направи текстуру у инвентару из модела\n"
"када није пронађен ниједан подржани драјвер."
#: src/settings_translation_file.cpp
msgid "Anisotropic filtering"
@ -1578,7 +1584,7 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Announce server"
msgstr ""
msgstr "Јавни сервер"
#: src/settings_translation_file.cpp
msgid ""
@ -1586,18 +1592,21 @@ msgid ""
"If you want to announce your ipv6 address, use serverlist_url = v6.servers."
"minetest.net."
msgstr ""
"Пријави овој сервер-листи.\n"
"Ако желите да пријавите вашу ipv6 адресу, користите serverlist_url = "
"v6.servers.minetest.net."
#: src/settings_translation_file.cpp
msgid "Apple trees noise"
msgstr ""
msgstr "Насумично семе за генерисање јабукових дрвећа"
#: src/settings_translation_file.cpp
msgid "Approximate (X,Y,Z) scale of fractal in nodes."
msgstr ""
msgstr "Приближна величина (X,Y,Z) фрактала у блоковима."
#: src/settings_translation_file.cpp
msgid "Ask to reconnect after crash"
msgstr ""
msgstr "Питај за реконекцију после пада"
#: src/settings_translation_file.cpp
msgid ""
@ -1611,18 +1620,27 @@ msgid ""
"optimization.\n"
"Stated in mapblocks (16 nodes)"
msgstr ""
"При овој раздаљини сервер ће агресивно оптимизовати који блокови се шаљу "
"клијенту\n"
"Мање вредности ће потенцијално пролично побољшати преформансе, по цену "
"видљивих грешака на приказаној слици.\n"
"(неки блокови се неће приказивати под водом и у пећинама, као ни понеки на "
"земљи)\n"
"Постављање овога на вредност већу од max_block_send_distance искључује ову "
"оптимизацију.\n"
"Постављено у мапа-блоковима (16 блокова)"
#: src/settings_translation_file.cpp
msgid "Automaticaly report to the serverlist."
msgstr ""
msgstr "Аутоматски пријави сервер-листи."
#: src/settings_translation_file.cpp
msgid "Autorun key"
msgstr ""
msgstr "Кључ за аутоматско трчање"
#: src/settings_translation_file.cpp
msgid "Backward key"
msgstr ""
msgstr "Кључ за назад"
#: src/settings_translation_file.cpp
msgid "Base terrain height"
@ -1630,39 +1648,39 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Basic"
msgstr ""
msgstr "Основно"
#: src/settings_translation_file.cpp
msgid "Basic Privileges"
msgstr ""
msgstr "Основне привилегије"
#: src/settings_translation_file.cpp
msgid "Beach noise"
msgstr ""
msgstr "Семе за плаже"
#: src/settings_translation_file.cpp
msgid "Beach noise threshold"
msgstr ""
msgstr "Граница семена за плаже"
#: src/settings_translation_file.cpp
msgid "Bilinear filtering"
msgstr ""
msgstr "Билинеарно филтрирање"
#: src/settings_translation_file.cpp
msgid "Bind address"
msgstr ""
msgstr "Вежи адресу"
#: src/settings_translation_file.cpp
msgid "Biome API temperature and humidity noise parameters"
msgstr ""
msgstr "Параметри семена температуре и влажности API-ја за биоме"
#: src/settings_translation_file.cpp
msgid "Biome noise"
msgstr ""
msgstr "Семе биома"
#: src/settings_translation_file.cpp
msgid "Bits per pixel (aka color depth) in fullscreen mode."
msgstr ""
msgstr "Битови по пикселу (или дубина боје) у моду целог екрана."
#: src/settings_translation_file.cpp
msgid "Build inside player"
@ -1670,75 +1688,75 @@ msgstr "Градња унутар играча"
#: src/settings_translation_file.cpp
msgid "Builtin"
msgstr ""
msgstr "Уграђено"
#: src/settings_translation_file.cpp
msgid "Bumpmapping"
msgstr ""
msgstr "Рељефна тектура"
#: src/settings_translation_file.cpp
msgid "Camera smoothing"
msgstr ""
msgstr "Изглађивање камере"
#: src/settings_translation_file.cpp
msgid "Camera smoothing in cinematic mode"
msgstr ""
msgstr "Изглађивање камере у синематском моду"
#: src/settings_translation_file.cpp
msgid "Camera update toggle key"
msgstr ""
msgstr "Кључ за укључивање/искључивање освежавања камере"
#: src/settings_translation_file.cpp
msgid "Cave noise"
msgstr ""
msgstr "Семе пећина"
#: src/settings_translation_file.cpp
msgid "Cave noise #1"
msgstr ""
msgstr "Семе пећина #1"
#: src/settings_translation_file.cpp
msgid "Cave noise #2"
msgstr ""
msgstr "Семе пећина #2"
#: src/settings_translation_file.cpp
msgid "Cave width"
msgstr ""
msgstr "Ширина пећина"
#: src/settings_translation_file.cpp
msgid "Cave1 noise"
msgstr ""
msgstr "Cave1 семе"
#: src/settings_translation_file.cpp
msgid "Cave2 noise"
msgstr ""
msgstr "Cave2 семе"
#: src/settings_translation_file.cpp
msgid "Cavern limit"
msgstr ""
msgstr "Граница пећина"
#: src/settings_translation_file.cpp
msgid "Cavern noise"
msgstr ""
msgstr "Семе пећина"
#: src/settings_translation_file.cpp
msgid "Cavern taper"
msgstr ""
msgstr "Конус пећине"
#: src/settings_translation_file.cpp
msgid "Cavern threshold"
msgstr ""
msgstr "Граница пећине"
#: src/settings_translation_file.cpp
msgid "Caves and tunnels form at the intersection of the two noises"
msgstr ""
msgstr "Пећине и тунели се формирају при укрштању два семена"
#: src/settings_translation_file.cpp
msgid "Chat key"
msgstr ""
msgstr "Кључ за чет"
#: src/settings_translation_file.cpp
msgid "Chat toggle key"
msgstr ""
msgstr "Кључ за укључивање чета"
#: src/settings_translation_file.cpp
msgid "Chatcommands"
@ -1766,22 +1784,41 @@ msgid ""
"17 = 4D \"Mandelbulb\" mandelbrot set.\n"
"18 = 4D \"Mandelbulb\" julia set."
msgstr ""
"Избор 18 фрактала из 9 формула.\n"
"1 = 4Д \"Округласти\" манделбротов скуп.\n"
"2 = 4Д \"Округласти\" жулијин скуп.\n"
"3 = 4Д \"Коцкасти\" манделбротов скуп.\n"
"4 = 4Д \"Коцкасти\" жулијин скуп.\n"
"5 = 4Д \"Mandy Cousin\" манделбротов скуп.\n"
"6 = 4Д \"Mandy Cousin\" жулијин скуп.\n"
"7 = 4Д \"Варијација\" манделбротов скуп.\n"
"8 = 4Д \"Варијација\" жулијин скуп.\n"
"9 = 3Д \"Mandelbrot/Mandelbar\" манделбротов скуп.\n"
"10 = 3Д \"Mandelbrot/Mandelbar\" жулијин скуп.\n"
"11 = 3Д \"Новогодишње Дрво\" манделбротоб скуп.\n"
"12 = 3Д \"Новогодишње Дрво\" жулијин скуп.\n"
"13 = 3Д \"Mandelbulb\" манделбротов скуп.\n"
"14 = 3Д \"Mandelbulb\" жулијин скуп.\n"
"15 = 3Д \"Косинусни Mandelbulb\" манделбротов скуп.\n"
"16 = 3Д \"Косинусни Mandelbulb\" жулијин скуп.\n"
"17 = 4Д \"Mandelbulb\" манделбротов скуп.\n"
"18 = 4Д \"Mandelbulb\" жулијин скуп."
#: src/settings_translation_file.cpp
msgid "Chunk size"
msgstr ""
msgstr "Величина комада"
#: src/settings_translation_file.cpp
msgid "Cinematic mode"
msgstr ""
msgstr "Синематски мод"
#: src/settings_translation_file.cpp
msgid "Cinematic mode key"
msgstr ""
msgstr "Кључ за синематски мод"
#: src/settings_translation_file.cpp
msgid "Clean transparent textures"
msgstr ""
msgstr "Очисти провидне трекстуре"
#: src/settings_translation_file.cpp
msgid "Client"
@ -1789,93 +1826,98 @@ msgstr "Клијент"
#: src/settings_translation_file.cpp
msgid "Client and Server"
msgstr ""
msgstr "Клијент и Сервер"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Client modding"
msgstr "Клијент"
msgstr "Модификовање клијента"
#: src/settings_translation_file.cpp
msgid "Climbing speed"
msgstr ""
msgstr "Брзина успона"
#: src/settings_translation_file.cpp
msgid "Cloud height"
msgstr ""
msgstr "Висина облака"
#: src/settings_translation_file.cpp
msgid "Cloud radius"
msgstr ""
msgstr "Величина облака"
#: src/settings_translation_file.cpp
msgid "Clouds"
msgstr ""
msgstr "Облаци"
#: src/settings_translation_file.cpp
msgid "Clouds are a client side effect."
msgstr ""
msgstr "Облаци су ефекат од стране клијента."
#: src/settings_translation_file.cpp
msgid "Clouds in menu"
msgstr ""
msgstr "Облаци у менију"
#: src/settings_translation_file.cpp
msgid "Colored fog"
msgstr ""
msgstr "Обојена магла"
#: src/settings_translation_file.cpp
msgid ""
"Comma-separated list of mods that are allowed to access HTTP APIs, which\n"
"allow them to upload and download data to/from the internet."
msgstr ""
"Зарезом одвојена листа модова којима је дозвољено да приступе HTTP API-јима, "
"који\n"
"им дозвољавају да узимају и шаљу податке од/према интернету."
#: src/settings_translation_file.cpp
msgid ""
"Comma-separated list of trusted mods that are allowed to access insecure\n"
"functions even when mod security is on (via request_insecure_environment())."
msgstr ""
"Зарезом одвојена листа поверених модова којима је дозвољено да приступе "
"несигурним\n"
"функцијама чак и када је сигурност модова укључена (путем "
"request_insecure_environment())."
#: src/settings_translation_file.cpp
msgid "Command key"
msgstr ""
msgstr "Кључ за команду"
#: src/settings_translation_file.cpp
msgid "Connect glass"
msgstr ""
msgstr "Споји стакло"
#: src/settings_translation_file.cpp
msgid "Connect to external media server"
msgstr ""
msgstr "Споји са спољашњим медија сервером"
#: src/settings_translation_file.cpp
msgid "Connects glass if supported by node."
msgstr ""
msgstr "Спаја стакло ако је то подржано од стране блока."
#: src/settings_translation_file.cpp
msgid "Console alpha"
msgstr ""
msgstr "Провидност козоле"
#: src/settings_translation_file.cpp
msgid "Console color"
msgstr ""
msgstr "Боја конзоле"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Console height"
msgstr "Конзола"
msgstr "Висина конзоле"
#: src/settings_translation_file.cpp
msgid "Console key"
msgstr ""
msgstr "Кључ за конзолу"
#: src/settings_translation_file.cpp
msgid "Continuous forward"
msgstr ""
msgstr "Непрекидно напред"
#: src/settings_translation_file.cpp
msgid "Continuous forward movement (only used for testing)."
msgstr ""
msgstr "Непрекидно кретање унапред (користи се само за тестирање)."
#: src/settings_translation_file.cpp
msgid "Controls"
@ -1887,81 +1929,89 @@ msgid ""
"Examples: 72 = 20min, 360 = 4min, 1 = 24hour, 0 = day/night/whatever stays "
"unchanged."
msgstr ""
"Контролна дужина трајања даноноћног циклуса.\n"
"Примери: 72 = 20 минута, 360 = 4 минута, 1 = 24 сата, 0 = дан/ноћ/штагод "
"остаје непромењено."
#: src/settings_translation_file.cpp
msgid "Controls steepness/depth of lake depressions."
msgstr ""
msgstr "Контролише стрмину/дубину језерских депресија."
#: src/settings_translation_file.cpp
msgid "Controls steepness/height of hills."
msgstr ""
msgstr "Контролише стрмину/висину брда."
#: src/settings_translation_file.cpp
msgid ""
"Controls the density of floatland mountain terrain.\n"
"Is an offset added to the 'np_mountain' noise value."
msgstr ""
"Контролише густину планинског терена на лебдећим острвима.\n"
"Као одступање се додаје на вредност 'np_mountain' семена."
#: src/settings_translation_file.cpp
msgid "Controls width of tunnels, a smaller value creates wider tunnels."
msgstr ""
msgstr "Контролише ширину тунела, мања вредност ствара шире тунеле."
#: src/settings_translation_file.cpp
msgid "Crash message"
msgstr ""
msgstr "Порука после пада"
#: src/settings_translation_file.cpp
msgid ""
"Creates unpredictable lava features in caves.\n"
"These can make mining difficult. Zero disables them. (0-10)"
msgstr ""
"Ствара непредвидиве шеме лаве у пећинама.\n"
"Ове могу чинити копање тежим. Нула их онемогућава. (0-10)"
#: src/settings_translation_file.cpp
msgid ""
"Creates unpredictable water features in caves.\n"
"These can make mining difficult. Zero disables them. (0-10)"
msgstr ""
"Ствара непредвидиве шеме воде у пећинама.\n"
"Ове могу чинити копање тежим. Нула их онемогућава. (0-10)"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Creative"
msgstr "Направи"
msgstr "Креативни мод"
#: src/settings_translation_file.cpp
msgid "Crosshair alpha"
msgstr ""
msgstr "Провидност нишана"
#: src/settings_translation_file.cpp
msgid "Crosshair alpha (opaqueness, between 0 and 255)."
msgstr ""
msgstr "Провидност нишана (видљивост, између 0 и 255)."
#: src/settings_translation_file.cpp
msgid "Crosshair color"
msgstr ""
msgstr "Боја нишана"
#: src/settings_translation_file.cpp
msgid "Crosshair color (R,G,B)."
msgstr ""
msgstr "Боја нишана (R,G,B)."
#: src/settings_translation_file.cpp
msgid "Crouch speed"
msgstr ""
msgstr "Брзина при чучању"
#: src/settings_translation_file.cpp
msgid "DPI"
msgstr ""
msgstr "DPI"
#: src/settings_translation_file.cpp
msgid "Damage"
msgstr ""
msgstr "Штета"
#: src/settings_translation_file.cpp
msgid "Debug info toggle key"
msgstr ""
msgstr "Кључ за укључивање debug информација"
#: src/settings_translation_file.cpp
msgid "Debug log level"
msgstr ""
msgstr "Ниво записивања у debug"
#: src/settings_translation_file.cpp
msgid "Dec. volume key"
@ -1969,33 +2019,35 @@ msgstr ""
#: src/settings_translation_file.cpp
msgid "Dedicated server step"
msgstr ""
msgstr "Корак на посвећеном серверу"
#: src/settings_translation_file.cpp
msgid "Default acceleration"
msgstr ""
msgstr "Уобичајено убрзање"
#: src/settings_translation_file.cpp
msgid "Default game"
msgstr ""
msgstr "Уобичајена игра"
#: src/settings_translation_file.cpp
msgid ""
"Default game when creating a new world.\n"
"This will be overridden when creating a world from the main menu."
msgstr ""
"Уобичајена игра при стварању новог света.\n"
"Ово се може премостити при стварању новог света из главног менија."
#: src/settings_translation_file.cpp
msgid "Default password"
msgstr ""
msgstr "Уобичајена лозинка"
#: src/settings_translation_file.cpp
msgid "Default privileges"
msgstr ""
msgstr "Уобичајене привилегије"
#: src/settings_translation_file.cpp
msgid "Default report format"
msgstr ""
msgstr "Уобичајен формат рапорта"
#: src/settings_translation_file.cpp
msgid ""

View File

@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-21 17:39+0200\n"
"PO-Revision-Date: 2017-04-14 14:33+0000\n"
"Last-Translator: metarmask <ihvarfner@gmail.com>\n"
"Language-Team: Swedish <https://hosted.weblate.org/projects/minetest/"
"minetest/sv/>\n"
"PO-Revision-Date: 2017-05-31 07:56+0000\n"
"Last-Translator: texmex <josefsahlberg+minetest@gmail.com>\n"
"Language-Team: Swedish "
"<https://hosted.weblate.org/projects/minetest/minetest/sv/>\n"
"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 2.14-dev\n"
"X-Generator: Weblate 2.14.1\n"
#: builtin/client/init.lua
msgid "Respawn"
@ -25,11 +25,11 @@ msgstr ""
#: builtin/client/init.lua
msgid "You died."
msgstr ""
msgstr "Du dog."
#: builtin/fstk/ui.lua
msgid "An error occured in a Lua script, such as a mod:"
msgstr ""
msgstr "Ett fel uppstod i ett Lua-skript, såsom en mod:"
#: builtin/fstk/ui.lua
msgid "An error occured:"
@ -57,11 +57,11 @@ msgstr "Laddar..."
#: builtin/mainmenu/common.lua
msgid "Protocol version mismatch. "
msgstr ""
msgstr "Protokollversionen matchar ej. "
#: builtin/mainmenu/common.lua
msgid "Server enforces protocol version $1. "
msgstr ""
msgstr "Servern tvingar protokollversion $1."
#: builtin/mainmenu/common.lua
msgid "Server supports protocol versions between $1 and $2. "
@ -124,7 +124,7 @@ msgstr "Mod:"
#: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua
msgid "Optional dependencies:"
msgstr ""
msgstr "Stödjer:"
#: builtin/mainmenu/dlg_config_world.lua
#: builtin/mainmenu/dlg_settings_advanced.lua src/guiKeyChangeMenu.cpp
@ -521,7 +521,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgstr ""
msgstr "Spela online"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
msgid "PvP enabled"
@ -529,27 +529,27 @@ msgstr "PvP aktiverat"
#: builtin/mainmenu/tab_settings.lua
msgid "2x"
msgstr ""
msgstr "2x"
#: builtin/mainmenu/tab_settings.lua
msgid "3D Clouds"
msgstr ""
msgstr "3D-moln"
#: builtin/mainmenu/tab_settings.lua
msgid "4x"
msgstr ""
msgstr "4x"
#: builtin/mainmenu/tab_settings.lua
msgid "8x"
msgstr ""
msgstr "8x"
#: builtin/mainmenu/tab_settings.lua
msgid "Advanced Settings"
msgstr ""
msgstr "Avancerade inställningar"
#: builtin/mainmenu/tab_settings.lua
msgid "Antialiasing:"
msgstr ""
msgstr "Kantutjämning:"
#: builtin/mainmenu/tab_settings.lua
msgid "Are you sure to reset your singleplayer world?"
@ -589,7 +589,7 @@ msgstr ""
#: builtin/mainmenu/tab_settings.lua
msgid "No"
msgstr ""
msgstr "Nej"
#: builtin/mainmenu/tab_settings.lua
msgid "No Filter"
@ -621,7 +621,7 @@ msgstr "Ogenomskinliga löv"
#: builtin/mainmenu/tab_settings.lua
msgid "Opaque Water"
msgstr ""
msgstr "Ogenomskinligt vatten"
#: builtin/mainmenu/tab_settings.lua src/settings_translation_file.cpp
msgid "Parallax Occlusion"
@ -641,7 +641,7 @@ msgstr ""
#: builtin/mainmenu/tab_settings.lua
msgid "Settings"
msgstr ""
msgstr "Inställningar"
#: builtin/mainmenu/tab_settings.lua src/settings_translation_file.cpp
msgid "Shaders"

File diff suppressed because it is too large Load Diff

View File

@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-21 17:40+0200\n"
"PO-Revision-Date: 2017-05-21 11:17+0000\n"
"PO-Revision-Date: 2017-05-21 20:31+0000\n"
"Last-Translator: Fixer <artem.brz@gmail.com>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/minetest/"
"minetest/uk/>\n"
"Language-Team: Ukrainian "
"<https://hosted.weblate.org/projects/minetest/minetest/uk/>\n"
"Language: uk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 2.14.1-dev\n"
#: builtin/client/init.lua
@ -91,7 +91,6 @@ msgid "Cancel"
msgstr "Скасувати"
#: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua
#, fuzzy
msgid "Dependencies:"
msgstr "Залежить від:"
@ -100,9 +99,8 @@ msgid "Disable MP"
msgstr "Вимкнути модпак"
#: builtin/mainmenu/dlg_config_world.lua
#, fuzzy
msgid "Disable all"
msgstr "Вимкнути модпак"
msgstr "Вимкнути все"
#: builtin/mainmenu/dlg_config_world.lua
msgid "Enable MP"
@ -126,7 +124,7 @@ msgstr "Мод:"
#: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua
msgid "Optional dependencies:"
msgstr ""
msgstr "Необов'язкові залежності:"
#: builtin/mainmenu/dlg_config_world.lua
#: builtin/mainmenu/dlg_settings_advanced.lua src/guiKeyChangeMenu.cpp
@ -228,7 +226,7 @@ msgstr "< Назад до Налаштувань"
#: builtin/mainmenu/dlg_settings_advanced.lua
msgid "Browse"
msgstr "Проглянути"
msgstr "Переглянути"
#: builtin/mainmenu/dlg_settings_advanced.lua
msgid "Disabled"
@ -247,7 +245,6 @@ msgid "Format is 3 numbers separated by commas and inside brackets."
msgstr "Формат: 3 номера, відокремлених комами і всередині дужок."
#: builtin/mainmenu/dlg_settings_advanced.lua
#, fuzzy
msgid ""
"Format: <offset>, <scale>, (<spreadX>, <spreadY>, <spreadZ>), <seed>, "
"<octaves>, <persistence>"
@ -265,7 +262,7 @@ msgstr "Модифікації"
#: builtin/mainmenu/dlg_settings_advanced.lua
msgid "Optionally the lacunarity can be appended with a leading comma."
msgstr ""
msgstr "За бажанням лакунарність може бути доповнена комою попереду."
#: builtin/mainmenu/dlg_settings_advanced.lua
msgid "Please enter a comma seperated list of flags."
@ -277,7 +274,7 @@ msgstr "Будь-ласка введіть дійсне ціле число."
#: builtin/mainmenu/dlg_settings_advanced.lua
msgid "Please enter a valid number."
msgstr "Будь-ласка введіть дійсний номер."
msgstr "Будь-ласка введіть дійсне число."
#: builtin/mainmenu/dlg_settings_advanced.lua
msgid "Possible values are: "
@ -301,14 +298,12 @@ msgid "Show technical names"
msgstr "Показувати технічні назви"
#: builtin/mainmenu/dlg_settings_advanced.lua
#, fuzzy
msgid "The value must be at least $1."
msgstr "Значення має бути більше за $1."
msgstr "Значення має бути як мінімум $1."
#: builtin/mainmenu/dlg_settings_advanced.lua
#, fuzzy
msgid "The value must not be larger than $1."
msgstr "Значення має бути менше ніж $1."
msgstr "Значення має бути не більше $1."
#: builtin/mainmenu/modmgr.lua
msgid ""
@ -340,7 +335,7 @@ msgstr ""
#: builtin/mainmenu/modmgr.lua
msgid "Subgame Mods"
msgstr ""
msgstr "Вбудовані моди"
#: builtin/mainmenu/store.lua
msgid "Close store"
@ -384,7 +379,7 @@ msgstr "Активні учасники"
#: builtin/mainmenu/tab_credits.lua
msgid "Core Developers"
msgstr "Основні розробники ядра гри"
msgstr "Розробники ядра"
#: builtin/mainmenu/tab_credits.lua
msgid "Credits"
@ -392,16 +387,15 @@ msgstr "Подяка"
#: builtin/mainmenu/tab_credits.lua
msgid "Previous Contributors"
msgstr "Колишні учасники"
msgstr "Попередні учасники"
#: builtin/mainmenu/tab_credits.lua
msgid "Previous Core Developers"
msgstr "Попередні основні розробники ядра"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Announce Server"
msgstr "Публічний сервер"
msgstr "Публічний"
#: builtin/mainmenu/tab_local.lua
msgid "Bind Address"
@ -420,19 +414,16 @@ msgid "Enable Damage"
msgstr "Поранення"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Host Game"
msgstr "Приховати гру"
msgstr "Грати (сервер)"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Host Server"
msgstr "Сервер"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Local Game"
msgstr "Почати гру"
msgstr "Локальна гра"
#: builtin/mainmenu/tab_local.lua
msgid "Name/Password"
@ -447,9 +438,8 @@ msgid "No world created or selected!"
msgstr "Світ не створено або не обрано!"
#: builtin/mainmenu/tab_local.lua
#, fuzzy
msgid "Play Game"
msgstr "Ім'я гравця"
msgstr "Грати"
#: builtin/mainmenu/tab_local.lua
msgid "Port"
@ -473,7 +463,7 @@ msgstr "Інформація модифікації:"
#: builtin/mainmenu/tab_mods.lua
msgid "No dependencies."
msgstr ""
msgstr "Без залежностей."
#: builtin/mainmenu/tab_mods.lua
msgid "No mod description available"
@ -508,7 +498,6 @@ msgid "Creative mode"
msgstr "Творчість"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
#, fuzzy
msgid "Damage enabled"
msgstr "Поранення"
@ -526,12 +515,11 @@ msgstr "Ім'я / Пароль"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
msgid "Ping"
msgstr ""
msgstr "Пінг"
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgstr "Ім'я гравця"
msgstr "Мережа"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
msgid "PvP enabled"
@ -562,13 +550,12 @@ msgid "Antialiasing:"
msgstr "Згладжування:"
#: builtin/mainmenu/tab_settings.lua
#, fuzzy
msgid "Are you sure to reset your singleplayer world?"
msgstr "Ви впевнені, що бажаєте скинути свій світ однокористувацької гри?"
msgstr "Ви впевнені, що бажаєте скинути свій світ одиночної гри?"
#: builtin/mainmenu/tab_settings.lua
msgid "Autosave screen size"
msgstr ""
msgstr "Зберігати розмір вікна"
#: builtin/mainmenu/tab_settings.lua
msgid "Bilinear Filter"
@ -644,12 +631,11 @@ msgstr "Часточки"
#: builtin/mainmenu/tab_settings.lua
msgid "Reset singleplayer world"
msgstr "Скинути світ однокористувацької гри"
msgstr "Скинути світ одиночної гри"
#: builtin/mainmenu/tab_settings.lua
#, fuzzy
msgid "Screen:"
msgstr "Знімок екрану"
msgstr "Екран:"
#: builtin/mainmenu/tab_settings.lua
msgid "Settings"
@ -673,8 +659,7 @@ msgstr "Текстурування:"
#: builtin/mainmenu/tab_settings.lua
msgid "To enable shaders the OpenGL driver needs to be used."
msgstr ""
"Для того, щоб увімкнути шейдери, потрібно використовувати драйвер OpenGL."
msgstr "Для того, щоб увімкнути шейдери, потрібно мати драйвер OpenGL."
#: builtin/mainmenu/tab_settings.lua src/settings_translation_file.cpp
msgid "Tone Mapping"
@ -682,7 +667,7 @@ msgstr "Тоновий шейдер"
#: builtin/mainmenu/tab_settings.lua
msgid "Touchthreshold (px)"
msgstr ""
msgstr "Чутливість дотику (пкс)"
#: builtin/mainmenu/tab_settings.lua
msgid "Trilinear Filter"
@ -761,9 +746,8 @@ msgid "Could not find or load game \""
msgstr "Неможливо знайти або завантажити гру \""
#: src/client/clientlauncher.cpp
#, fuzzy
msgid "Invalid gamespec."
msgstr "Помилкова конфігурація гри."
msgstr "Помилкова конфігурація gamespec."
#: src/client/clientlauncher.cpp
msgid "Main Menu"
@ -779,7 +763,7 @@ msgstr "Ім'я гравця занадто довге."
#: src/client/clientlauncher.cpp
msgid "Please choose a name!"
msgstr ""
msgstr "Будь-ласка введіть ім'я!"
#: src/client/clientlauncher.cpp
msgid "Provided world path doesn't exist: "
@ -787,7 +771,7 @@ msgstr "Вказаний шлях до світу не існує: "
#: src/fontengine.cpp
msgid "needs_fallback_font"
msgstr ""
msgstr "needs_fallback_font"
#: src/game.cpp
msgid ""
@ -798,42 +782,36 @@ msgstr ""
"Деталі у файлі debug.txt."
#: src/game.cpp
#, fuzzy
msgid "- Address: "
msgstr "Закріпити адресу"
msgstr "- Адреса: "
#: src/game.cpp
#, fuzzy
msgid "- Creative Mode: "
msgstr "Творчість"
msgstr "- Творчість: "
#: src/game.cpp
#, fuzzy
msgid "- Damage: "
msgstr "Поранення"
msgstr "- Поранення: "
#: src/game.cpp
msgid "- Mode: "
msgstr ""
msgstr "- Тип: "
#: src/game.cpp
#, fuzzy
msgid "- Port: "
msgstr "Порт"
msgstr "- Порт: "
#: src/game.cpp
#, fuzzy
msgid "- Public: "
msgstr "Публічний"
msgstr "- Публічний: "
#: src/game.cpp
msgid "- PvP: "
msgstr ""
msgstr "- PvP (бої): "
#: src/game.cpp
#, fuzzy
msgid "- Server Name: "
msgstr "Назва сервера"
msgstr "- Назва сервера: "
#: src/game.cpp
msgid "Change Keys"
@ -841,7 +819,7 @@ msgstr "Змінити клавіші"
#: src/game.cpp
msgid "Change Password"
msgstr "Змінити Пароль"
msgstr "Змінити пароль"
#: src/game.cpp
msgid "Connecting to server..."
@ -852,7 +830,7 @@ msgid "Continue"
msgstr "Продовжити"
#: src/game.cpp
#, fuzzy, c-format
#, c-format
msgid ""
"Controls:\n"
"- %s: move forwards\n"
@ -870,16 +848,19 @@ msgid ""
"- %s: chat\n"
msgstr ""
"Стандартне керування клавішами:\n"
"- WASD: рух\n"
"- Space: стрибок/лізти вгору\n"
"- Shift: крастися/лізти вниз\n"
"- Q: кинути предмет\n"
"- I: інвентар\n"
"- %s: вперед\n"
"- %s: назад\n"
"- %s: ліворуч\n"
"- %s: праворуч\n"
"- %s: стрибок/лізти вгору\n"
"- %s: крастися/лізти вниз\n"
"- %s: кинути предмет\n"
"- %s: інвентар\n"
"- Мишка: поворот/дивитися\n"
"- Ліва клавіша миші: копати/удар\n"
"- Права клавіша миші: поставити/використовувати\n"
"- Ліва кнопка миші: копати/удар\n"
"- Права кнопка миші: поставити/зробити\n"
"- Колесо миші: вибір предмета\n"
"- T: чат\n"
"- %s: чат\n"
#: src/game.cpp
msgid "Creating client..."
@ -927,17 +908,15 @@ msgstr "Вихід з гри"
#: src/game.cpp
msgid "Game info:"
msgstr ""
msgstr "Інформація про гру:"
#: src/game.cpp
#, fuzzy
msgid "Game paused"
msgstr "Гра"
msgstr "Гра на паузі"
#: src/game.cpp
#, fuzzy
msgid "Hosting server"
msgstr "Створення сервера..."
msgstr "Сервер (хост)"
#: src/game.cpp
msgid "Item definitions..."
@ -961,16 +940,15 @@ msgstr "Визначення блоків..."
#: src/game.cpp
msgid "Off"
msgstr ""
msgstr "Вимкнено"
#: src/game.cpp
msgid "On"
msgstr ""
msgstr "Увімкнено"
#: src/game.cpp
#, fuzzy
msgid "Remote server"
msgstr "Публічний сервер"
msgstr "Віддалений сервер"
#: src/game.cpp
msgid "Resolving address..."
@ -991,15 +969,15 @@ msgstr "Гучність звуку"
#: src/game.cpp
#, c-format
msgid "Volume changed to %d%%"
msgstr ""
msgstr "Гучність звуку змінено на %d%%"
#: src/game.cpp
msgid "Volume changed to 0%"
msgstr ""
msgstr "Гучність 0%"
#: src/game.cpp
msgid "Volume changed to 100%"
msgstr ""
msgstr "Гучність 100%"
#: src/game.cpp src/guiFormSpecMenu.cpp
msgid "ok"
@ -1015,7 +993,7 @@ msgstr "Далі"
#: src/guiKeyChangeMenu.cpp
msgid "\"Use\" = climb down"
msgstr "\"Використовувати\" = підніматися вгору"
msgstr "\"Використати\" = спускатися"
#: src/guiKeyChangeMenu.cpp
msgid "Backward"
@ -1035,11 +1013,11 @@ msgstr "Консоль"
#: src/guiKeyChangeMenu.cpp
msgid "Dec. volume"
msgstr ""
msgstr "Зменшити звук"
#: src/guiKeyChangeMenu.cpp
msgid "Double tap \"jump\" to toggle fly"
msgstr "Двічі доторкніться до \"стрибок\" щоб полетіти"
msgstr "Подвійне торкання \"стрибок\" вмикає політ"
#: src/guiKeyChangeMenu.cpp
msgid "Drop"
@ -1047,12 +1025,11 @@ msgstr "Викинути"
#: src/guiKeyChangeMenu.cpp
msgid "Forward"
msgstr "Уперед"
msgstr "Вперед"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Inc. volume"
msgstr "Гучність звуку"
msgstr "Збільшити звук"
#: src/guiKeyChangeMenu.cpp
msgid "Inventory"
@ -1077,21 +1054,20 @@ msgid "Left"
msgstr "Ліворуч"
#: src/guiKeyChangeMenu.cpp
#, fuzzy
msgid "Local command"
msgstr "Команди чату"
msgstr "Команда (локальна)"
#: src/guiKeyChangeMenu.cpp
msgid "Mute"
msgstr ""
msgstr "Вимкнути звук"
#: src/guiKeyChangeMenu.cpp
msgid "Next item"
msgstr ""
msgstr "Наступний слот"
#: src/guiKeyChangeMenu.cpp
msgid "Prev. item"
msgstr ""
msgstr "Попередній слот"
#: src/guiKeyChangeMenu.cpp src/settings_translation_file.cpp
msgid "Print stacks"
@ -1111,26 +1087,25 @@ msgstr "Крастися"
#: src/guiKeyChangeMenu.cpp
msgid "Toggle Cinematic"
msgstr "Переключити кінематографічний режим"
msgstr "Кінематографічний режим"
#: src/guiKeyChangeMenu.cpp
msgid "Toggle fast"
msgstr "Переключити швидкий режим"
msgstr "Прискорення"
#: src/guiKeyChangeMenu.cpp
msgid "Toggle fly"
msgstr "Переключити режим польоту"
msgstr "Політ"
#: src/guiKeyChangeMenu.cpp
msgid "Toggle noclip"
msgstr "Переключити режим проходження крізь стіни"
msgstr "Прохід крізь стіни"
#: src/guiKeyChangeMenu.cpp
msgid "Use"
msgstr "Використовувати"
msgstr "Використати"
#: src/guiKeyChangeMenu.cpp src/keycode.cpp
#, fuzzy
msgid "Zoom"
msgstr "Збільшити"
@ -1144,15 +1119,15 @@ msgstr "Змінити"
#: src/guiPasswordChange.cpp
msgid "Confirm Password"
msgstr "Підтвердження нового пароля"
msgstr "Підтвердити новий пароль"
#: src/guiPasswordChange.cpp
msgid "New Password"
msgstr "Новий Пароль"
msgstr "Новий пароль"
#: src/guiPasswordChange.cpp
msgid "Old Password"
msgstr "Старий Пароль"
msgstr "Старий пароль"
#: src/guiPasswordChange.cpp
msgid "Passwords do not match!"
@ -1176,7 +1151,7 @@ msgstr "Назад"
#: src/keycode.cpp
msgid "Caps Lock"
msgstr ""
msgstr "Caps Lock"
#: src/keycode.cpp
msgid "Clear"
@ -1192,11 +1167,11 @@ msgstr "Вниз"
#: src/keycode.cpp
msgid "End"
msgstr ""
msgstr "End"
#: src/keycode.cpp
msgid "Erase EOF"
msgstr ""
msgstr "Стерти EOF"
#: src/keycode.cpp
msgid "Execute"
@ -1208,32 +1183,27 @@ msgstr "Допомога"
#: src/keycode.cpp
msgid "Home"
msgstr ""
msgstr "Home"
#: src/keycode.cpp
#, fuzzy
msgid "IME Accept"
msgstr "Прийняти"
msgstr "IME Прийняти"
#: src/keycode.cpp
#, fuzzy
msgid "IME Convert"
msgstr "Конвертувати"
msgstr "IME Конвертувати"
#: src/keycode.cpp
#, fuzzy
msgid "IME Escape"
msgstr "Esc"
msgstr "IME Esc"
#: src/keycode.cpp
#, fuzzy
msgid "IME Mode Change"
msgstr "Змінити режим"
msgstr "IME Змінити режим"
#: src/keycode.cpp
#, fuzzy
msgid "IME Nonconvert"
msgstr "Не обернено"
msgstr "IME Не обернено"
#: src/keycode.cpp
msgid "Insert"
@ -1245,19 +1215,19 @@ msgstr "Ліва кнопка"
#: src/keycode.cpp
msgid "Left Control"
msgstr "Ліва клавіша Ctrl"
msgstr "Лівий Ctrl"
#: src/keycode.cpp
msgid "Left Menu"
msgstr "Ліва клавіша Menu"
msgstr "Лівий Menu"
#: src/keycode.cpp
msgid "Left Shift"
msgstr "Ліва клавіша Shift"
msgstr "Лівий Shift"
#: src/keycode.cpp
msgid "Left Windows"
msgstr "Ліва клавіша Win"
msgstr "Лівий Win"
#: src/keycode.cpp
msgid "Menu"
@ -1269,7 +1239,7 @@ msgstr "Середня кнопка"
#: src/keycode.cpp
msgid "Next"
msgstr ""
msgstr "Next"
#: src/keycode.cpp
msgid "Num Lock"
@ -1288,9 +1258,8 @@ msgid "Numpad -"
msgstr "Num -"
#: src/keycode.cpp
#, fuzzy
msgid "Numpad ."
msgstr "Num *"
msgstr "Num ."
#: src/keycode.cpp
msgid "Numpad /"
@ -1338,7 +1307,7 @@ msgstr "Num 9"
#: src/keycode.cpp
msgid "OEM Clear"
msgstr ""
msgstr "OEM Clear"
#: src/keycode.cpp
msgid "Pause"
@ -1353,34 +1322,32 @@ msgid "Print"
msgstr "Print Screen"
#: src/keycode.cpp
#, fuzzy
msgid "Prior"
msgstr "Page Down"
msgstr "Page Up"
#: src/keycode.cpp
msgid "Return"
msgstr "Ввід"
#: src/keycode.cpp
#, fuzzy
msgid "Right Button"
msgstr "Права кнопка"
#: src/keycode.cpp
msgid "Right Control"
msgstr "Права клавіша Ctrl"
msgstr "Правий Ctrl"
#: src/keycode.cpp
msgid "Right Menu"
msgstr "Права клавіша Menu"
msgstr "Правий Menu"
#: src/keycode.cpp
msgid "Right Shift"
msgstr "Права клавіша Shift"
msgstr "Правий Shift"
#: src/keycode.cpp
msgid "Right Windows"
msgstr "Права клавіша Win"
msgstr "Правий Win"
#: src/keycode.cpp
msgid "Scroll Lock"
@ -1432,13 +1399,12 @@ msgid ""
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid ""
"0 = parallax occlusion with slope information (faster).\n"
"1 = relief mapping (slower, more accurate)."
msgstr ""
"0 = технологія \"parallax occlusion\" з інформацією про криві (швидше)\n"
"1 = технологія \"relief mapping\" (повільніше, більш акуратніше)"
"0 = технологія \"parallax occlusion\" з інформацією про криві (швидше).\n"
"1 = технологія \"relief mapping\" (повільніше, більш акуратніше)."
#: src/settings_translation_file.cpp
msgid "3D clouds"
@ -1571,7 +1537,6 @@ msgid "Anisotropic filtering"
msgstr "Анізотропна фільтрація"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Announce server"
msgstr "Публічний сервер"
@ -1616,7 +1581,6 @@ msgid "Autorun key"
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Backward key"
msgstr "Назад"
@ -1681,9 +1645,8 @@ msgid "Camera smoothing in cinematic mode"
msgstr "Згладжування руху камери у кінорежимі"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Camera update toggle key"
msgstr "Клавіша для контролю оновлення камери"
msgstr "Контроль оновлення камери"
#: src/settings_translation_file.cpp
msgid "Cave noise"
@ -1738,7 +1701,6 @@ msgid "Chat toggle key"
msgstr "Чат"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Chatcommands"
msgstr "Команди чату"
@ -1790,9 +1752,8 @@ msgid "Client and Server"
msgstr "Клієнт і сервер"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Client modding"
msgstr "Клієнт"
msgstr "Клієнт-моди"
#: src/settings_translation_file.cpp
msgid "Climbing speed"
@ -1859,9 +1820,8 @@ msgid "Console color"
msgstr "Колір консолі"
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Console height"
msgstr "Консоль"
msgstr "Висота консолі"
#: src/settings_translation_file.cpp
msgid "Console key"
@ -1921,9 +1881,8 @@ msgid ""
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Creative"
msgstr "Створити"
msgstr "Творчість"
#: src/settings_translation_file.cpp
msgid "Crosshair alpha"
@ -2101,9 +2060,8 @@ msgid "Desynchronize block animation"
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Digging particles"
msgstr "Часточки"
msgstr "Часточки при копанні"
#: src/settings_translation_file.cpp
msgid "Disable anticheat"
@ -2500,7 +2458,6 @@ msgid "GUI scaling"
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "GUI scaling filter"
msgstr "Масштаб інтерфейсу"
@ -2588,9 +2545,8 @@ msgid "Height component of the initial window size."
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Height noise"
msgstr "Права клавіша Win"
msgstr "Висотний шум"
#: src/settings_translation_file.cpp
msgid "Height on which clouds are appearing."
@ -2759,9 +2715,8 @@ msgid "In-game chat console height, between 0.1 (10%) and 1.0 (100%)."
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Inc. volume key"
msgstr "Консоль"
msgstr "Збільшити гучність"
#: src/settings_translation_file.cpp
msgid ""
@ -2806,9 +2761,8 @@ msgid "Interval of sending time of day to clients."
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Inventory image hack"
msgstr "Інвентар"
msgstr "Хак для інвентарних рисунків"
#: src/settings_translation_file.cpp
msgid "Inventory items animations"
@ -3198,9 +3152,8 @@ msgid "Large cave depth"
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Large chat console key"
msgstr "Консоль"
msgstr "Консоль (повна)"
#: src/settings_translation_file.cpp
msgid "Lava Features"
@ -3685,9 +3638,8 @@ msgid ""
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Mute key"
msgstr "Чат"
msgstr "Вимкнути звук"
#: src/settings_translation_file.cpp
msgid ""
@ -3917,9 +3869,8 @@ msgid "Replaces the default main menu with a custom one."
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Report path"
msgstr "Вибрати шлях"
msgstr "Шлях для звіту"
#: src/settings_translation_file.cpp
msgid "Ridge noise"
@ -4106,9 +4057,8 @@ msgid ""
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Shader path"
msgstr "Шейдери"
msgstr "Шлях до шейдерів"
#: src/settings_translation_file.cpp
msgid ""
@ -4596,7 +4546,6 @@ msgid "Water surface level of the world."
msgstr ""
#: src/settings_translation_file.cpp
#, fuzzy
msgid "Waving Nodes"
msgstr "Блоки, що коливаються"

View File

@ -370,7 +370,6 @@ set(common_SRCS
chat.cpp
clientiface.cpp
collision.cpp
content_abm.cpp
content_mapnode.cpp
content_nodemeta.cpp
content_sao.cpp
@ -492,7 +491,7 @@ set(client_SRCS
${sound_SRCS}
${client_network_SRCS}
${client_irrlicht_changes_SRCS}
ambiance.cpp
#ambiance.cpp
camera.cpp
client.cpp
clientenvironment.cpp
@ -510,7 +509,7 @@ set(client_SRCS
game.cpp
guiChatConsole.cpp
guiEngine.cpp
guiFileSelectMenu.cpp
guiPathSelectMenu.cpp
guiFormSpecMenu.cpp
guiKeyChangeMenu.cpp
guiPasswordChange.cpp
@ -709,7 +708,7 @@ include(CheckCXXCompilerFlag)
if(MSVC)
# Visual Studio
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++11")
# EHa enables SEH exceptions (used for catching segfaults)
set(CMAKE_CXX_FLAGS_RELEASE "/EHa /Ox /GL /FD /MT /GS- /Zi /arch:SSE /fp:fast /D NDEBUG /D _HAS_ITERATOR_DEBUGGING=0 /TP")
#set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /NODEFAULTLIB:\"libcmtd.lib\" /NODEFAULTLIB:\"libcmt.lib\"")
@ -729,9 +728,10 @@ if(MSVC)
# /MT = Link statically with standard library stuff
set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /MT")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Probably GCC
if(APPLE)
SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000" )
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000" )
endif()
if(WARN_ALL)
set(RELEASE_WARNING_FLAGS "-Wall")

View File

@ -28,14 +28,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "filesys.h"
BanManager::BanManager(const std::string &banfilepath):
m_banfilepath(banfilepath),
m_modified(false)
m_banfilepath(banfilepath)
{
try{
try {
load();
}
catch(SerializationError &e)
{
} catch(SerializationError &e) {
warningstream<<"BanManager: creating "
<<m_banfilepath<<std::endl;
}

View File

@ -22,10 +22,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/string.h"
#include "threading/thread.h"
#include "threading/mutex.h"
#include "exceptions.h"
#include <map>
#include <string>
#include <mutex>
class BanManager
{
@ -43,10 +43,10 @@ public:
bool isModified();
private:
Mutex m_mutex;
std::string m_banfilepath;
std::mutex m_mutex;
std::string m_banfilepath = "";
StringMap m_ips;
bool m_modified;
bool m_modified = false;
};
#endif

View File

@ -41,36 +41,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control,
Client *client):
m_playernode(NULL),
m_headnode(NULL),
m_cameranode(NULL),
m_wieldmgr(NULL),
m_wieldnode(NULL),
m_draw_control(draw_control),
m_client(client),
m_camera_position(0,0,0),
m_camera_direction(0,0,0),
m_camera_offset(0,0,0),
m_aspect(1.0),
m_fov_x(1.0),
m_fov_y(1.0),
m_view_bobbing_anim(0),
m_view_bobbing_state(0),
m_view_bobbing_speed(0),
m_view_bobbing_fall(0),
m_digging_anim(0),
m_digging_button(-1),
m_wield_change_timer(0.125),
m_wield_item_next(),
m_camera_mode(CAMERA_MODE_FIRST)
m_client(client)
{
//dstream<<FUNCTION_NAME<<std::endl;
@ -558,9 +530,10 @@ void Camera::drawNametags()
f32 transformed_pos[4] = { pos.X, pos.Y, pos.Z, 1.0f };
trans.multiplyWith1x4Matrix(transformed_pos);
if (transformed_pos[3] > 0) {
std::string nametag_colorless = unescape_enriched(nametag->nametag_text);
core::dimension2d<u32> textsize =
g_fontengine->getFont()->getDimension(
utf8_to_wide(nametag->nametag_text).c_str());
utf8_to_wide(nametag_colorless).c_str());
f32 zDiv = transformed_pos[3] == 0.0f ? 1.0f :
core::reciprocal(transformed_pos[3]);
v2u32 screensize = m_driver->getScreenSize();

View File

@ -168,12 +168,12 @@ public:
private:
// Nodes
scene::ISceneNode* m_playernode;
scene::ISceneNode* m_headnode;
scene::ICameraSceneNode* m_cameranode;
scene::ISceneNode *m_playernode = nullptr;
scene::ISceneNode *m_headnode = nullptr;
scene::ICameraSceneNode *m_cameranode = nullptr;
scene::ISceneManager* m_wieldmgr;
WieldMeshSceneNode* m_wieldnode;
scene::ISceneManager *m_wieldmgr = nullptr;
WieldMeshSceneNode *m_wieldnode = nullptr;
// draw control
MapDrawControl& m_draw_control;
@ -189,33 +189,33 @@ private:
v3s16 m_camera_offset;
// Field of view and aspect ratio stuff
f32 m_aspect;
f32 m_fov_x;
f32 m_fov_y;
f32 m_aspect = 1.0f;
f32 m_fov_x = 1.0f;
f32 m_fov_y = 1.0f;
// View bobbing animation frame (0 <= m_view_bobbing_anim < 1)
f32 m_view_bobbing_anim;
f32 m_view_bobbing_anim = 0.0f;
// If 0, view bobbing is off (e.g. player is standing).
// If 1, view bobbing is on (player is walking).
// If 2, view bobbing is getting switched off.
s32 m_view_bobbing_state;
s32 m_view_bobbing_state = 0;
// Speed of view bobbing animation
f32 m_view_bobbing_speed;
f32 m_view_bobbing_speed = 0.0f;
// Fall view bobbing
f32 m_view_bobbing_fall;
f32 m_view_bobbing_fall = 0.0f;
// Digging animation frame (0 <= m_digging_anim < 1)
f32 m_digging_anim;
f32 m_digging_anim = 0.0f;
// If -1, no digging animation
// If 0, left-click digging animation
// If 1, right-click digging animation
s32 m_digging_button;
s32 m_digging_button = -1;
// Animation when changing wielded item
f32 m_wield_change_timer;
f32 m_wield_change_timer = 0.125f;
ItemStack m_wield_item_next;
CameraMode m_camera_mode;
CameraMode m_camera_mode = CAMERA_MODE_FIRST;
f32 m_cache_fall_bobbing_amount;
f32 m_cache_view_bobbing_amount;

View File

@ -27,13 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/numeric.h"
ChatBuffer::ChatBuffer(u32 scrollback):
m_scrollback(scrollback),
m_unformatted(),
m_cols(0),
m_rows(0),
m_scroll(0),
m_formatted(),
m_empty_formatted_line()
m_scrollback(scrollback)
{
if (m_scrollback == 0)
m_scrollback = 1;
@ -383,16 +377,7 @@ s32 ChatBuffer::getBottomScrollPos() const
ChatPrompt::ChatPrompt(const std::wstring &prompt, u32 history_limit):
m_prompt(prompt),
m_line(L""),
m_history(),
m_history_index(0),
m_history_limit(history_limit),
m_cols(0),
m_view(0),
m_cursor(0),
m_cursor_len(0),
m_nick_completion_start(0),
m_nick_completion_end(0)
m_history_limit(history_limit)
{
}

View File

@ -32,21 +32,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
struct ChatLine
{
// age in seconds
f32 age;
f32 age = 0.0f;
// name of sending player, or empty if sent by server
EnrichedString name;
// message text
EnrichedString text;
ChatLine(const std::wstring &a_name, const std::wstring &a_text):
age(0.0),
name(a_name),
text(a_text)
{
}
ChatLine(const EnrichedString &a_name, const EnrichedString &a_text):
age(0.0),
name(a_name),
text(a_text)
{
@ -132,11 +130,11 @@ private:
std::vector<ChatLine> m_unformatted;
// Number of character columns in console
u32 m_cols;
u32 m_cols = 0;
// Number of character rows in console
u32 m_rows;
u32 m_rows = 0;
// Scroll position (console's top line index into m_formatted)
s32 m_scroll;
s32 m_scroll = 0;
// Array of formatted lines
std::vector<ChatFormattedLine> m_formatted;
// Empty formatted line, for error returns
@ -225,29 +223,29 @@ protected:
private:
// Prompt prefix
std::wstring m_prompt;
std::wstring m_prompt = L"";
// Currently edited line
std::wstring m_line;
std::wstring m_line = L"";
// History buffer
std::vector<std::wstring> m_history;
// History index (0 <= m_history_index <= m_history.size())
u32 m_history_index;
u32 m_history_index = 0;
// Maximum number of history entries
u32 m_history_limit;
// Number of columns excluding columns reserved for the prompt
s32 m_cols;
s32 m_cols = 0;
// Start of visible portion (index into m_line)
s32 m_view;
s32 m_view = 0;
// Cursor (index into m_line)
s32 m_cursor;
s32 m_cursor = 0;
// Cursor length (length of selected portion of line)
s32 m_cursor_len;
s32 m_cursor_len = 0;
// Last nick completion start (index into m_line)
s32 m_nick_completion_start;
s32 m_nick_completion_start = 0;
// Last nick completion start (index into m_line)
s32 m_nick_completion_end;
s32 m_nick_completion_end = 0;
};
class ChatBackend

View File

@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/srp.h"
#include "client.h"
#include "ambiance.h"
//#include "ambiance.h"
#include "network/clientopcodes.h"
#include "filesys.h"
#include "mapblock_mesh.h"
@ -72,11 +72,6 @@ Client::Client(
bool ipv6,
GameUIFlags *game_ui_flags
):
m_packetcounter_timer(0.0),
m_connection_reinit_timer(0.1),
m_avg_rtt_timer(0.0),
m_playerpos_send_timer(0.0),
m_ignore_damage_timer(0.0),
m_tsrc(tsrc),
m_shsrc(shsrc),
m_itemdef(itemdef),
@ -95,40 +90,13 @@ Client::Client(
m_con(PROTOCOL_ID, 512, CONNECTION_TIMEOUT, ipv6, this),
m_address_name(address_name),
m_device(device),
m_camera(NULL),
m_minimap(NULL),
m_minimap_disabled_by_server(false),
m_server_ser_ver(SER_FMT_VER_INVALID),
m_proto_ver(0),
m_playeritem(0),
m_inventory_updated(false),
m_inventory_from_server(NULL),
m_inventory_from_server_age(0.0),
m_animation_time(0),
m_crack_level(-1),
m_crack_pos(0,0,0),
m_last_chat_message_sent(time(NULL)),
m_chat_message_allowance(5.0f),
m_map_seed(0),
m_password(password),
m_chosen_auth_mech(AUTH_MECHANISM_NONE),
m_auth_data(NULL),
m_access_denied(false),
m_access_denied_reconnect(false),
m_itemdef_received(false),
m_nodedef_received(false),
m_media_downloader(new ClientMediaDownloader()),
m_time_of_day_set(false),
m_last_time_of_day_f(-1),
m_time_of_day_update_timer(0),
m_recommended_send_interval(0.1),
m_removed_sounds_check_timer(0),
m_state(LC_Created),
m_localdb(NULL),
m_script(NULL),
m_mod_storage_save_timer(10.0f),
m_game_ui_flags(game_ui_flags),
m_shutdown(false)
m_game_ui_flags(game_ui_flags)
{
// Add local player
m_env.setLocalPlayer(new LocalPlayer(this, playername));
@ -245,7 +213,7 @@ Client::~Client()
delete m_inventory_from_server;
// Delete detached inventories
for (UNORDERED_MAP<std::string, Inventory*>::iterator
for (std::unordered_map<std::string, Inventory*>::iterator
i = m_detached_inventories.begin();
i != m_detached_inventories.end(); ++i) {
delete i->second;
@ -256,7 +224,7 @@ Client::~Client()
scene::IAnimatedMesh *mesh =
m_device->getSceneManager()->getMeshCache()->getMeshByIndex(0);
if (mesh != NULL)
if (mesh)
m_device->getSceneManager()->getMeshCache()->removeMesh(mesh);
}
@ -418,16 +386,16 @@ void Client::step(float dtime)
*/
// Control local player (0ms)
LocalPlayer *player = m_env.getLocalPlayer();
assert(player != NULL);
assert(player);
player->applyControl(dtime);
// Step environment
m_env.step(dtime);
m_sound->step(dtime);
if ( g_settings->getBool("ambiance") ){
m_ambiance->doAmbiance(dtime,m_env.getTimeOfDay());
}
//if ( g_settings->getBool("ambiance") ){
// m_ambiance->doAmbiance(dtime,m_env.getTimeOfDay());
//}
/*
Get events
@ -497,10 +465,8 @@ void Client::step(float dtime)
MapBlock *block = m_env.getMap().getBlockNoCreateNoEx(r.p);
if (block) {
// Delete the old mesh
if (block->mesh != NULL) {
delete block->mesh;
block->mesh = NULL;
}
delete block->mesh;
block->mesh = nullptr;
if (r.mesh) {
minimap_mapblock = r.mesh->moveMinimapMapblock();
@ -578,7 +544,7 @@ void Client::step(float dtime)
Update positions of sounds attached to objects
*/
{
for(UNORDERED_MAP<int, u16>::iterator i = m_sounds_to_objects.begin();
for(std::unordered_map<int, u16>::iterator i = m_sounds_to_objects.begin();
i != m_sounds_to_objects.end(); ++i) {
int client_id = i->first;
u16 object_id = i->second;
@ -598,7 +564,7 @@ void Client::step(float dtime)
m_removed_sounds_check_timer = 0;
// Find removed sounds and clear references to them
std::vector<s32> removed_server_ids;
for(UNORDERED_MAP<s32, int>::iterator i = m_sounds_server_to_client.begin();
for (std::unordered_map<s32, int>::iterator i = m_sounds_server_to_client.begin();
i != m_sounds_server_to_client.end();) {
s32 server_id = i->first;
int client_id = i->second;
@ -621,7 +587,7 @@ void Client::step(float dtime)
if (m_mod_storage_save_timer <= 0.0f) {
verbosestream << "Saving registered mod storages." << std::endl;
m_mod_storage_save_timer = g_settings->getFloat("server_map_save_interval");
for (UNORDERED_MAP<std::string, ModMetadata *>::const_iterator
for (std::unordered_map<std::string, ModMetadata *>::const_iterator
it = m_mod_storages.begin(); it != m_mod_storages.end(); ++it) {
if (it->second->isModified()) {
it->second->save(getModStoragePath());
@ -1411,7 +1377,7 @@ void Client::addNode(v3s16 p, MapNode n, bool remove_metadata)
void Client::setPlayerControl(PlayerControl &control)
{
LocalPlayer *player = m_env.getLocalPlayer();
assert(player != NULL);
assert(player);
player->control = control;
}
@ -1435,7 +1401,7 @@ bool Client::getLocalInventoryUpdated()
void Client::getLocalInventory(Inventory &dst)
{
LocalPlayer *player = m_env.getLocalPlayer();
assert(player != NULL);
assert(player);
dst = player->inventory;
}
@ -1448,7 +1414,7 @@ Inventory* Client::getInventory(const InventoryLocation &loc)
case InventoryLocation::CURRENT_PLAYER:
{
LocalPlayer *player = m_env.getLocalPlayer();
assert(player != NULL);
assert(player);
return &player->inventory;
}
break;
@ -1537,7 +1503,7 @@ void Client::setCrack(int level, v3s16 pos)
u16 Client::getHP()
{
LocalPlayer *player = m_env.getLocalPlayer();
assert(player != NULL);
assert(player);
return player->hp;
}
@ -1570,7 +1536,7 @@ void Client::typeChatMessage(const std::wstring &message)
// compatibility code
if (m_proto_ver < 29) {
LocalPlayer *player = m_env.getLocalPlayer();
assert(player != NULL);
assert(player);
std::wstring name = narrow_to_wide(player->getName());
pushToChatQueue((std::wstring)L"<" + name + L"> " + message);
}
@ -1966,7 +1932,8 @@ bool Client::registerModStorage(ModMetadata *storage)
void Client::unregisterModStorage(const std::string &name)
{
UNORDERED_MAP<std::string, ModMetadata *>::const_iterator it = m_mod_storages.find(name);
std::unordered_map<std::string, ModMetadata *>::const_iterator it =
m_mod_storages.find(name);
if (it != m_mod_storages.end()) {
// Save unconditionaly on unregistration
it->second->save(getModStoragePath());

View File

@ -23,13 +23,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "network/connection.h"
#include "clientenvironment.h"
#include "irrlichttypes_extrabloated.h"
#include "threading/mutex.h"
#include <ostream>
#include <map>
#include <set>
#include <vector>
#include "ambiance.h"
#include <unordered_set>
#include "clientobject.h"
#include "gamedef.h"
#include "inventorymanager.h"
@ -274,6 +274,7 @@ public:
);
~Client();
DISABLE_CLASS_COPY(Client);
void initMods();
@ -350,6 +351,7 @@ public:
void handleCommand_OverrideDayNightRatio(NetworkPacket* pkt);
void handleCommand_LocalPlayerAnimations(NetworkPacket* pkt);
void handleCommand_EyeOffset(NetworkPacket* pkt);
void handleCommand_UpdatePlayerList(NetworkPacket* pkt);
void handleCommand_SrpBytesSandB(NetworkPacket* pkt);
void ProcessData(NetworkPacket *pkt);
@ -418,6 +420,9 @@ public:
bool checkPrivilege(const std::string &priv) const
{ return (m_privileges.count(priv) != 0); }
const std::unordered_set<std::string> &getPrivilegeList() const
{ return m_privileges; }
bool getChatMessage(std::wstring &message);
void typeChatMessage(const std::wstring& message);
@ -454,7 +459,7 @@ public:
bool nodedefReceived()
{ return m_nodedef_received; }
bool mediaReceived()
{ return m_media_downloader == NULL; }
{ return !m_media_downloader; }
u8 getProtoVersion()
{ return m_proto_ver; }
@ -572,11 +577,11 @@ private:
bool canSendChatMessage() const;
float m_packetcounter_timer;
float m_connection_reinit_timer;
float m_avg_rtt_timer;
float m_playerpos_send_timer;
float m_ignore_damage_timer; // Used after server moves player
float m_packetcounter_timer = 0.0f;
float m_connection_reinit_timer = 0.1f;
float m_avg_rtt_timer = 0.0f;
float m_playerpos_send_timer = 0.0f;
float m_ignore_damage_timer = 0.0f; // Used after server moves player
IntervalLimiter m_map_timer_and_unload_interval;
IWritableTextureSource *m_tsrc;
@ -589,14 +594,14 @@ private:
MeshUpdateThread m_mesh_update_thread;
ClientEnvironment m_env;
Ambiance *m_ambiance;
//Ambiance *m_ambiance;
ParticleManager m_particle_manager;
con::Connection m_con;
std::string m_address_name;
IrrlichtDevice *m_device;
Camera *m_camera;
Minimap *m_minimap;
bool m_minimap_disabled_by_server;
Camera *m_camera = nullptr;
Minimap *m_minimap = nullptr;
bool m_minimap_disabled_by_server = false;
// Server serialization version
u8 m_server_ser_ver;
@ -605,16 +610,16 @@ private:
// and aren't accurate. We simply just don't know, because
// the server didn't send the version back then.
// If 0, server init hasn't been received yet.
u8 m_proto_ver;
u8 m_proto_ver = 0;
u16 m_playeritem;
bool m_inventory_updated;
Inventory *m_inventory_from_server;
float m_inventory_from_server_age;
u16 m_playeritem = 0;
bool m_inventory_updated = false;
Inventory *m_inventory_from_server = nullptr;
float m_inventory_from_server_age = 0.0f;
PacketCounter m_packetcounter;
// Block mesh animation parameters
float m_animation_time;
int m_crack_level;
float m_animation_time = 0.0f;
int m_crack_level = -1;
v3s16 m_crack_pos;
// 0 <= m_daynight_i < DAYNIGHT_CACHE_COUNT
//s32 m_daynight_i;
@ -622,13 +627,13 @@ private:
std::queue<std::wstring> m_chat_queue;
std::queue<std::wstring> m_out_chat_queue;
u32 m_last_chat_message_sent;
float m_chat_message_allowance;
float m_chat_message_allowance = 5.0f;
// The authentication methods we can use to enter sudo mode (=change password)
u32 m_sudo_auth_methods;
// The seed returned by the server in TOCLIENT_INIT is stored here
u64 m_map_seed;
u64 m_map_seed = 0;
// Auth data
std::string m_playername;
@ -637,40 +642,40 @@ private:
std::string m_new_password;
// Usable by auth mechanisms.
AuthMechanism m_chosen_auth_mech;
void * m_auth_data;
void *m_auth_data = nullptr;
bool m_access_denied;
bool m_access_denied_reconnect;
std::string m_access_denied_reason;
bool m_access_denied = false;
bool m_access_denied_reconnect = false;
std::string m_access_denied_reason = "";
std::queue<ClientEvent> m_client_event_queue;
bool m_itemdef_received;
bool m_nodedef_received;
bool m_itemdef_received = false;
bool m_nodedef_received = false;
ClientMediaDownloader *m_media_downloader;
// time_of_day speed approximation for old protocol
bool m_time_of_day_set;
float m_last_time_of_day_f;
float m_time_of_day_update_timer;
bool m_time_of_day_set = false;
float m_last_time_of_day_f = -1.0f;
float m_time_of_day_update_timer = 0.0f;
// An interval for generally sending object positions and stuff
float m_recommended_send_interval;
float m_recommended_send_interval = 0.1f;
// Sounds
float m_removed_sounds_check_timer;
float m_removed_sounds_check_timer = 0.0f;
// Mapping from server sound ids to our sound ids
UNORDERED_MAP<s32, int> m_sounds_server_to_client;
std::unordered_map<s32, int> m_sounds_server_to_client;
// And the other way!
UNORDERED_MAP<int, s32> m_sounds_client_to_server;
std::unordered_map<int, s32> m_sounds_client_to_server;
// And relations to objects
UNORDERED_MAP<int, u16> m_sounds_to_objects;
std::unordered_map<int, u16> m_sounds_to_objects;
// Privileges
UNORDERED_SET<std::string> m_privileges;
std::unordered_set<std::string> m_privileges;
// Detached inventories
// key = name
UNORDERED_MAP<std::string, Inventory*> m_detached_inventories;
std::unordered_map<std::string, Inventory*> m_detached_inventories;
// Storage for mesh data for creating multiple instances of the same mesh
StringMap m_mesh_data;
@ -679,20 +684,17 @@ private:
LocalClientState m_state;
// Used for saving server map to disk client-side
MapDatabase *m_localdb;
MapDatabase *m_localdb = nullptr;
IntervalLimiter m_localdb_save_interval;
u16 m_cache_save_interval;
ClientScripting *m_script;
ClientScripting *m_script = nullptr;
bool m_modding_enabled;
UNORDERED_MAP<std::string, ModMetadata *> m_mod_storages;
float m_mod_storage_save_timer;
std::unordered_map<std::string, ModMetadata *> m_mod_storages;
float m_mod_storage_save_timer = 10.0f;
GameUIFlags *m_game_ui_flags;
//DISABLE_CLASS_COPY(Client);
bool m_shutdown;
bool m_shutdown = false;
};
#endif // !CLIENT_HEADER

View File

@ -53,14 +53,11 @@ MainGameCallback *g_gamecallback = NULL;
ClientLauncher::~ClientLauncher()
{
if (receiver)
delete receiver;
delete receiver;
if (input)
delete input;
delete input;
if (g_fontengine)
delete g_fontengine;
delete g_fontengine;
if (device)
device->drop();
@ -360,8 +357,6 @@ bool ClientLauncher::launch_game(std::string &error_message,
if (cmd_args.exists("password"))
menudata.password = cmd_args.get("password");
menudata.enable_public = g_settings->getBool("server_announce");
// If a world was commanded, append and select it
if (game_params.world_path != "") {
worldspec.gameid = getWorldGameId(game_params.world_path, true);
@ -522,8 +517,8 @@ bool ClientLauncher::create_engine_device()
{
// Resolution selection
bool fullscreen = g_settings->getBool("fullscreen");
u16 screenW = g_settings->getU16("screenW");
u16 screenH = g_settings->getU16("screenH");
u16 screen_w = g_settings->getU16("screen_w");
u16 screen_h = g_settings->getU16("screen_h");
// bpp, fsaa, vsync
bool vsync = g_settings->getBool("vsync");
@ -553,7 +548,7 @@ bool ClientLauncher::create_engine_device()
SIrrlichtCreationParameters params = SIrrlichtCreationParameters();
params.DriverType = driverType;
params.WindowSize = core::dimension2d<u32>(screenW, screenH);
params.WindowSize = core::dimension2d<u32>(screen_w, screen_h);
params.Bits = bits;
params.AntiAlias = fsaa;
params.Fullscreen = fullscreen;
@ -657,7 +652,7 @@ void ClientLauncher::speed_tests()
infostream << "Around 5000/ms should do well here." << std::endl;
TimeTaker timer("Testing mutex speed");
Mutex m;
std::mutex m;
u32 n = 0;
u32 i = 0;
do {

View File

@ -35,7 +35,7 @@ public:
JUMP,
SPECIAL1,
SNEAK,
AUTORUN,
AUTOFORWARD,
ESC,

View File

@ -386,7 +386,7 @@ public:
private:
// The id of the thread that is allowed to use irrlicht directly
threadid_t m_main_thread;
std::thread::id m_main_thread;
// The irrlicht device
IrrlichtDevice *m_device;
@ -417,7 +417,7 @@ private:
// Maps a texture name to an index in the former.
std::map<std::string, u32> m_name_to_id;
// The two former containers are behind this mutex
Mutex m_textureinfo_cache_mutex;
std::mutex m_textureinfo_cache_mutex;
// Queued texture fetches (to be processed by the main thread)
RequestQueue<std::string, u32, u8, u8> m_get_texture_queue;
@ -427,7 +427,7 @@ private:
std::vector<video::ITexture*> m_texture_trash;
// Maps image file names to loaded palettes.
UNORDERED_MAP<std::string, Palette> m_palettes;
std::unordered_map<std::string, Palette> m_palettes;
// Cached settings needed for making textures from meshes
bool m_setting_trilinear_filter;
@ -445,7 +445,7 @@ TextureSource::TextureSource(IrrlichtDevice *device):
{
assert(m_device); // Pre-condition
m_main_thread = thr_get_current_thread_id();
m_main_thread = std::this_thread::get_id();
// Add a NULL TextureInfo as the first index, named ""
m_textureinfo_cache.push_back(TextureInfo(""));
@ -508,7 +508,7 @@ u32 TextureSource::getTextureId(const std::string &name)
/*
Get texture
*/
if (thr_is_current_thread(m_main_thread))
if (std::this_thread::get_id() == m_main_thread)
{
return generateTexture(name);
}
@ -616,7 +616,7 @@ u32 TextureSource::generateTexture(const std::string &name)
/*
Calling only allowed from main thread
*/
if (!thr_is_current_thread(m_main_thread)) {
if (std::this_thread::get_id() != m_main_thread) {
errorstream<<"TextureSource::generateTexture() "
"called not from main thread"<<std::endl;
return 0;
@ -695,12 +695,12 @@ video::ITexture* TextureSource::getTextureForMesh(const std::string &name, u32 *
Palette* TextureSource::getPalette(const std::string &name)
{
// Only the main thread may load images
sanity_check(thr_is_current_thread(m_main_thread));
sanity_check(std::this_thread::get_id() == m_main_thread);
if (name == "")
return NULL;
UNORDERED_MAP<std::string, Palette>::iterator it = m_palettes.find(name);
std::unordered_map<std::string, Palette>::iterator it = m_palettes.find(name);
if (it == m_palettes.end()) {
// Create palette
video::IImage *img = generateImage(name);
@ -771,7 +771,7 @@ void TextureSource::insertSourceImage(const std::string &name, video::IImage *im
{
//infostream<<"TextureSource::insertSourceImage(): name="<<name<<std::endl;
sanity_check(thr_is_current_thread(m_main_thread));
sanity_check(std::this_thread::get_id() == m_main_thread);
m_sourcecache.insert(name, img, true, m_device->getVideoDriver());
m_source_image_existence.set(name, true);

View File

@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irr_v3d.h"
#include <ITexture.h>
#include <IrrlichtDevice.h>
#include "threads.h"
#include <string>
#include <vector>
#include "util/numeric.h"

View File

@ -41,11 +41,9 @@ ClientEnvironment::ClientEnvironment(ClientMap *map, scene::ISceneManager *smgr,
IrrlichtDevice *irr):
Environment(client),
m_map(map),
m_local_player(NULL),
m_smgr(smgr),
m_texturesource(texturesource),
m_client(client),
m_script(NULL),
m_irr(irr)
{
char zero = 0;
@ -55,8 +53,8 @@ ClientEnvironment::ClientEnvironment(ClientMap *map, scene::ISceneManager *smgr,
ClientEnvironment::~ClientEnvironment()
{
// delete active objects
for (UNORDERED_MAP<u16, ClientActiveObject*>::iterator i = m_active_objects.begin();
i != m_active_objects.end(); ++i) {
for (ClientActiveObjectMap::iterator i = m_active_objects.begin();
i != m_active_objects.end(); ++i) {
delete i->second;
}
@ -346,8 +344,8 @@ void ClientEnvironment::step(float dtime)
g_profiler->avg("CEnv: num of objects", m_active_objects.size());
bool update_lighting = m_active_object_light_update_interval.step(dtime, 0.21);
for (UNORDERED_MAP<u16, ClientActiveObject*>::iterator i = m_active_objects.begin();
i != m_active_objects.end(); ++i) {
for (ClientActiveObjectMap::iterator i = m_active_objects.begin();
i != m_active_objects.end(); ++i) {
ClientActiveObject* obj = i->second;
// Step object
obj->step(dtime, this);
@ -406,14 +404,14 @@ GenericCAO* ClientEnvironment::getGenericCAO(u16 id)
ClientActiveObject* ClientEnvironment::getActiveObject(u16 id)
{
UNORDERED_MAP<u16, ClientActiveObject*>::iterator n = m_active_objects.find(id);
ClientActiveObjectMap::iterator n = m_active_objects.find(id);
if (n == m_active_objects.end())
return NULL;
return n->second;
}
bool isFreeClientActiveObjectId(const u16 id,
UNORDERED_MAP<u16, ClientActiveObject*> &objects)
ClientActiveObjectMap &objects)
{
if(id == 0)
return false;
@ -421,7 +419,7 @@ bool isFreeClientActiveObjectId(const u16 id,
return objects.find(id) == objects.end();
}
u16 getFreeClientActiveObjectId(UNORDERED_MAP<u16, ClientActiveObject*> &objects)
u16 getFreeClientActiveObjectId(ClientActiveObjectMap &objects)
{
//try to reuse id's as late as possible
static u16 last_used_id = 0;
@ -583,8 +581,8 @@ void ClientEnvironment::updateLocalPlayerBreath(u16 breath)
void ClientEnvironment::getActiveObjects(v3f origin, f32 max_d,
std::vector<DistanceSortedActiveObject> &dest)
{
for (UNORDERED_MAP<u16, ClientActiveObject*>::iterator i = m_active_objects.begin();
i != m_active_objects.end(); ++i) {
for (ClientActiveObjectMap::iterator i = m_active_objects.begin();
i != m_active_objects.end(); ++i) {
ClientActiveObject* obj = i->second;
f32 d = (obj->getPosition() - origin).getLength();

View File

@ -64,6 +64,7 @@ struct ClientEnvEvent
};
};
typedef std::unordered_map<u16, ClientActiveObject*> ClientActiveObjectMap;
class ClientEnvironment : public Environment
{
public:
@ -175,13 +176,13 @@ public:
v3s16 getCameraOffset() const { return m_camera_offset; }
private:
ClientMap *m_map;
LocalPlayer *m_local_player;
LocalPlayer *m_local_player = nullptr;
scene::ISceneManager *m_smgr;
ITextureSource *m_texturesource;
Client *m_client;
ClientScripting *m_script;
ClientScripting *m_script = nullptr;
IrrlichtDevice *m_irr;
UNORDERED_MAP<u16, ClientActiveObject*> m_active_objects;
ClientActiveObjectMap m_active_objects;
std::vector<ClientSimpleObject*> m_simple_objects;
std::queue<ClientEnvEvent> m_client_event_queue;
IntervalLimiter m_active_object_light_update_interval;

View File

@ -79,11 +79,11 @@ void RemoteClient::GetNextBlocks (
RemotePlayer *player = env->getPlayer(peer_id);
// This can happen sometimes; clients and players are not in perfect sync.
if (player == NULL)
if (!player)
return;
PlayerSAO *sao = player->getPlayerSAO();
if (sao == NULL)
if (!sao)
return;
// Won't send anything if already sending
@ -275,8 +275,7 @@ void RemoteClient::GetNextBlocks (
bool surely_not_found_on_disk = false;
bool block_is_invalid = false;
if(block != NULL)
{
if (block) {
// Reset usage timer, this block will be of use in the future.
block->resetUsageTimer();
@ -611,7 +610,7 @@ ClientInterface::~ClientInterface()
{
MutexAutoLock clientslock(m_clients_mutex);
for (UNORDERED_MAP<u16, RemoteClient*>::iterator i = m_clients.begin();
for (RemoteClientMap::iterator i = m_clients.begin();
i != m_clients.end(); ++i) {
// Delete client
delete i->second;
@ -624,7 +623,7 @@ std::vector<u16> ClientInterface::getClientIDs(ClientState min_state)
std::vector<u16> reply;
MutexAutoLock clientslock(m_clients_mutex);
for(UNORDERED_MAP<u16, RemoteClient*>::iterator i = m_clients.begin();
for (RemoteClientMap::iterator i = m_clients.begin();
i != m_clients.end(); ++i) {
if (i->second->getState() >= min_state)
reply.push_back(i->second->peer_id);
@ -645,7 +644,7 @@ void ClientInterface::step(float dtime)
void ClientInterface::UpdatePlayerList()
{
if (m_env != NULL) {
if (m_env) {
std::vector<u16> clients = getClientIDs();
m_clients_names.clear();
@ -664,7 +663,7 @@ void ClientInterface::UpdatePlayerList()
{
MutexAutoLock clientslock(m_clients_mutex);
RemoteClient* client = lockedGetClientNoEx(*i);
if(client != NULL)
if (client)
client->PrintInfo(infostream);
}
@ -682,7 +681,7 @@ void ClientInterface::send(u16 peer_id, u8 channelnum,
void ClientInterface::sendToAll(NetworkPacket *pkt)
{
MutexAutoLock clientslock(m_clients_mutex);
for (UNORDERED_MAP<u16, RemoteClient*>::iterator i = m_clients.begin();
for (RemoteClientMap::iterator i = m_clients.begin();
i != m_clients.end(); ++i) {
RemoteClient *client = i->second;
@ -697,7 +696,7 @@ void ClientInterface::sendToAll(NetworkPacket *pkt)
RemoteClient* ClientInterface::getClientNoEx(u16 peer_id, ClientState state_min)
{
MutexAutoLock clientslock(m_clients_mutex);
UNORDERED_MAP<u16, RemoteClient*>::iterator n = m_clients.find(peer_id);
RemoteClientMap::const_iterator n = m_clients.find(peer_id);
// The client may not exist; clients are immediately removed if their
// access is denied, and this event occurs later then.
if (n == m_clients.end())
@ -711,7 +710,7 @@ RemoteClient* ClientInterface::getClientNoEx(u16 peer_id, ClientState state_min)
RemoteClient* ClientInterface::lockedGetClientNoEx(u16 peer_id, ClientState state_min)
{
UNORDERED_MAP<u16, RemoteClient*>::iterator n = m_clients.find(peer_id);
RemoteClientMap::const_iterator n = m_clients.find(peer_id);
// The client may not exist; clients are immediately removed if their
// access is denied, and this event occurs later then.
if (n == m_clients.end())
@ -726,7 +725,7 @@ RemoteClient* ClientInterface::lockedGetClientNoEx(u16 peer_id, ClientState stat
ClientState ClientInterface::getClientState(u16 peer_id)
{
MutexAutoLock clientslock(m_clients_mutex);
UNORDERED_MAP<u16, RemoteClient*>::iterator n = m_clients.find(peer_id);
RemoteClientMap::const_iterator n = m_clients.find(peer_id);
// The client may not exist; clients are immediately removed if their
// access is denied, and this event occurs later then.
if (n == m_clients.end())
@ -738,7 +737,7 @@ ClientState ClientInterface::getClientState(u16 peer_id)
void ClientInterface::setPlayerName(u16 peer_id,std::string name)
{
MutexAutoLock clientslock(m_clients_mutex);
UNORDERED_MAP<u16, RemoteClient*>::iterator n = m_clients.find(peer_id);
RemoteClientMap::iterator n = m_clients.find(peer_id);
// The client may not exist; clients are immediately removed if their
// access is denied, and this event occurs later then.
if (n != m_clients.end())
@ -750,7 +749,7 @@ void ClientInterface::DeleteClient(u16 peer_id)
MutexAutoLock conlock(m_clients_mutex);
// Error check
UNORDERED_MAP<u16, RemoteClient*>::iterator n = m_clients.find(peer_id);
RemoteClientMap::iterator n = m_clients.find(peer_id);
// The client may not exist; clients are immediately removed if their
// access is denied, and this event occurs later then.
if (n == m_clients.end())
@ -762,10 +761,8 @@ void ClientInterface::DeleteClient(u16 peer_id)
//TODO this should be done by client destructor!!!
RemoteClient *client = n->second;
// Handle objects
for(std::set<u16>::iterator
i = client->m_known_objects.begin();
i != client->m_known_objects.end(); ++i)
{
for (std::set<u16>::iterator i = client->m_known_objects.begin();
i != client->m_known_objects.end(); ++i) {
// Get object
u16 id = *i;
ServerActiveObject* obj = m_env->getActiveObject(id);
@ -784,7 +781,7 @@ void ClientInterface::CreateClient(u16 peer_id)
MutexAutoLock conlock(m_clients_mutex);
// Error check
UNORDERED_MAP<u16, RemoteClient*>::iterator n = m_clients.find(peer_id);
RemoteClientMap::iterator n = m_clients.find(peer_id);
// The client shouldn't already exist
if (n != m_clients.end()) return;
@ -800,7 +797,7 @@ void ClientInterface::event(u16 peer_id, ClientStateEvent event)
MutexAutoLock clientlock(m_clients_mutex);
// Error check
UNORDERED_MAP<u16, RemoteClient*>::iterator n = m_clients.find(peer_id);
RemoteClientMap::iterator n = m_clients.find(peer_id);
// No client to deliver event
if (n == m_clients.end())
@ -821,7 +818,7 @@ u16 ClientInterface::getProtocolVersion(u16 peer_id)
MutexAutoLock conlock(m_clients_mutex);
// Error check
UNORDERED_MAP<u16, RemoteClient*>::iterator n = m_clients.find(peer_id);
RemoteClientMap::iterator n = m_clients.find(peer_id);
// No client to get version
if (n == m_clients.end())
@ -835,7 +832,7 @@ void ClientInterface::setClientVersion(u16 peer_id, u8 major, u8 minor, u8 patch
MutexAutoLock conlock(m_clients_mutex);
// Error check
UNORDERED_MAP<u16, RemoteClient*>::iterator n = m_clients.find(peer_id);
RemoteClientMap::iterator n = m_clients.find(peer_id);
// No client to set versions
if (n == m_clients.end())

View File

@ -23,14 +23,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "constants.h"
#include "serialization.h" // for SER_FMT_VER_INVALID
#include "threading/mutex.h"
#include "network/networkpacket.h"
#include "util/cpp11_container.h"
#include "porting.h"
#include <list>
#include <vector>
#include <set>
#include <mutex>
class MapBlock;
class ServerEnvironment;
@ -227,51 +226,27 @@ public:
// NOTE: If client is made allowed to exist while peer doesn't,
// this has to be set to 0 when there is no peer.
// Also, the client must be moved to some other container.
u16 peer_id;
u16 peer_id = PEER_ID_INEXISTENT;
// The serialization version to use with the client
u8 serialization_version;
u8 serialization_version = SER_FMT_VER_INVALID;
//
u16 net_proto_version;
u16 net_proto_version = 0;
/* Authentication information */
std::string enc_pwd;
bool create_player_on_auth_success;
AuthMechanism chosen_mech;
void * auth_data;
u32 allowed_auth_mechs;
u32 allowed_sudo_mechs;
std::string enc_pwd = "";
bool create_player_on_auth_success = false;
AuthMechanism chosen_mech = AUTH_MECHANISM_NONE;
void *auth_data = nullptr;
u32 allowed_auth_mechs = 0;
u32 allowed_sudo_mechs = 0;
bool isSudoMechAllowed(AuthMechanism mech)
{ return allowed_sudo_mechs & mech; }
bool isMechAllowed(AuthMechanism mech)
{ return allowed_auth_mechs & mech; }
RemoteClient():
peer_id(PEER_ID_INEXISTENT),
serialization_version(SER_FMT_VER_INVALID),
net_proto_version(0),
create_player_on_auth_success(false),
chosen_mech(AUTH_MECHANISM_NONE),
auth_data(NULL),
m_time_from_building(9999),
m_pending_serialization_version(SER_FMT_VER_INVALID),
m_state(CS_Created),
m_nearest_unsent_d(0),
m_nearest_unsent_reset_timer(0.0),
m_excess_gotblocks(0),
m_nothing_to_send_pause_timer(0.0),
m_name(""),
m_version_major(0),
m_version_minor(0),
m_version_patch(0),
m_full_version("unknown"),
m_deployed_compression(0),
m_connection_time(porting::getTimeS())
{
}
~RemoteClient()
{
}
RemoteClient() {}
~RemoteClient() {}
/*
Finds block that should be sent next to the client.
@ -318,7 +293,7 @@ public:
}
// Time from last placing or removing blocks
float m_time_from_building;
float m_time_from_building = 9999;
/*
List of active objects that the client knows of.
@ -362,10 +337,10 @@ public:
u8 getPatch() const { return m_version_patch; }
private:
// Version is stored in here after INIT before INIT2
u8 m_pending_serialization_version;
u8 m_pending_serialization_version = SER_FMT_VER_INVALID;
/* current state of client */
ClientState m_state;
ClientState m_state = CS_Created;
/*
Blocks that have been sent to client.
@ -377,9 +352,9 @@ private:
No MapBlock* is stored here because the blocks can get deleted.
*/
std::set<v3s16> m_blocks_sent;
s16 m_nearest_unsent_d;
s16 m_nearest_unsent_d = 0;
v3s16 m_last_center;
float m_nearest_unsent_reset_timer;
float m_nearest_unsent_reset_timer = 0.0f;
/*
Blocks that are currently on the line.
@ -408,33 +383,35 @@ private:
and the client then sends two GOTBLOCKs.
This is resetted by PrintInfo()
*/
u32 m_excess_gotblocks;
u32 m_excess_gotblocks = 0;
// CPU usage optimization
float m_nothing_to_send_pause_timer;
float m_nothing_to_send_pause_timer = 0.0f;
/*
name of player using this client
*/
std::string m_name;
std::string m_name = "";
/*
client information
*/
u8 m_version_major;
u8 m_version_minor;
u8 m_version_patch;
u8 m_version_major = 0;
u8 m_version_minor = 0;
u8 m_version_patch = 0;
std::string m_full_version;
std::string m_full_version = "unknown";
u16 m_deployed_compression;
u16 m_deployed_compression = 0;
/*
time this client was created
*/
const u64 m_connection_time;
const u64 m_connection_time = porting::getTimeS();
};
typedef std::unordered_map<u16, RemoteClient*> RemoteClientMap;
class ClientInterface {
public:
@ -499,7 +476,7 @@ protected:
void lock() { m_clients_mutex.lock(); }
void unlock() { m_clients_mutex.unlock(); }
UNORDERED_MAP<u16, RemoteClient*>& getClientList() { return m_clients; }
RemoteClientMap& getClientList() { return m_clients; }
private:
/* update internal player list */
@ -507,14 +484,14 @@ private:
// Connection
con::Connection* m_con;
Mutex m_clients_mutex;
std::mutex m_clients_mutex;
// Connected clients (behind the con mutex)
UNORDERED_MAP<u16, RemoteClient*> m_clients;
RemoteClientMap m_clients;
std::vector<std::string> m_clients_names; //for announcing masterserver
// Environment
ServerEnvironment *m_env;
Mutex m_env_mutex;
std::mutex m_env_mutex;
float m_print_info_timer;

View File

@ -67,13 +67,6 @@ ClientMap::ClientMap(
ClientMap::~ClientMap()
{
/*MutexAutoLock lock(mesh_mutex);
if(mesh != NULL)
{
mesh->drop();
mesh = NULL;
}*/
}
MapSector * ClientMap::emergeSector(v2s16 p2d)
@ -219,11 +212,11 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
if not seen on display
*/
if (block->mesh != NULL)
if (block->mesh)
block->mesh->updateCameraOffset(m_camera_offset);
float range = 100000 * BS;
if (m_control.range_all == false)
if (!m_control.range_all)
range = m_control.wanted_range * BS;
float d = 0.0;
@ -236,7 +229,7 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
/*
Ignore if mesh doesn't exist
*/
if (block->mesh == NULL) {
if (!block->mesh) {
blocks_in_range_without_mesh++;
continue;
}
@ -405,7 +398,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
MapBlock *block = i->second;
// If the mesh of the block happened to get deleted, ignore it
if (block->mesh == NULL)
if (!block->mesh)
continue;
float d = 0.0;

View File

@ -28,30 +28,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
struct MapDrawControl
{
MapDrawControl():
range_all(false),
wanted_range(0),
wanted_max_blocks(0),
show_wireframe(false),
blocks_drawn(0),
blocks_would_have_drawn(0),
farthest_drawn(0)
{
}
// Overrides limits by drawing everything
bool range_all;
bool range_all = false;
// Wanted drawing range
float wanted_range;
float wanted_range = 0.0f;
// Maximum number of blocks to draw
u32 wanted_max_blocks;
u32 wanted_max_blocks = 0;
// show a wire frame for debugging
bool show_wireframe;
bool show_wireframe = false;
// Number of blocks rendered is written here by the renderer
u32 blocks_drawn;
u32 blocks_drawn = 0;
// Number of blocks that would have been drawn in wanted_range
u32 blocks_would_have_drawn;
u32 blocks_would_have_drawn = 0;
// Distance to the farthest block drawn
float farthest_drawn;
float farthest_drawn = 0;
};
class Client;
@ -137,13 +127,14 @@ public:
private:
Client *m_client;
aabb3f m_box;
aabb3f m_box = aabb3f(-BS * 1000000, -BS * 1000000, -BS * 1000000,
BS * 1000000, BS * 1000000, BS * 1000000);
MapDrawControl &m_control;
v3f m_camera_position;
v3f m_camera_direction;
f32 m_camera_fov;
v3f m_camera_direction = v3f(0,0,1);
f32 m_camera_fov = M_PI;
v3s16 m_camera_offset;
std::map<v3s16, MapBlock*> m_drawlist;

View File

@ -43,17 +43,8 @@ static std::string getMediaCacheDir()
ClientMediaDownloader::ClientMediaDownloader():
m_media_cache(getMediaCacheDir()),
m_initial_step_done(false),
m_uncached_count(0),
m_uncached_received_count(0),
m_name_bound("")
m_httpfetch_caller(HTTPFETCH_DISCARD)
{
m_httpfetch_caller = HTTPFETCH_DISCARD;
m_httpfetch_active = 0;
m_httpfetch_active_limit = 0;
m_httpfetch_next_id = 0;
m_httpfetch_timeout = 0;
m_outstanding_hash_sets = 0;
}
ClientMediaDownloader::~ClientMediaDownloader()
@ -348,7 +339,7 @@ void ClientMediaDownloader::remoteMediaReceived(
std::string name;
{
UNORDERED_MAP<unsigned long, std::string>::iterator it =
std::unordered_map<unsigned long, std::string>::iterator it =
m_remote_file_transfers.find(fetch_result.request_id);
assert(it != m_remote_file_transfers.end());
name = it->second;

View File

@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <map>
#include <set>
#include <vector>
#include "util/cpp11_container.h"
#include <unordered_map>
class Client;
struct HTTPFetchResult;
@ -123,28 +123,28 @@ private:
// Has an attempt been made to load media files from the file cache?
// Have hash sets been requested from remote servers?
bool m_initial_step_done;
bool m_initial_step_done = false;
// Total number of media files to load
s32 m_uncached_count;
s32 m_uncached_count = 0;
// Number of media files that have been received
s32 m_uncached_received_count;
s32 m_uncached_received_count = 0;
// Status of remote transfers
unsigned long m_httpfetch_caller;
unsigned long m_httpfetch_next_id;
long m_httpfetch_timeout;
s32 m_httpfetch_active;
s32 m_httpfetch_active_limit;
s32 m_outstanding_hash_sets;
UNORDERED_MAP<unsigned long, std::string> m_remote_file_transfers;
unsigned long m_httpfetch_next_id = 0;
long m_httpfetch_timeout = 0;
s32 m_httpfetch_active = 0;
s32 m_httpfetch_active_limit = 0;
s32 m_outstanding_hash_sets = 0;
std::unordered_map<unsigned long, std::string> m_remote_file_transfers;
// All files up to this name have either been received from a
// remote server or failed on all remote servers, so those files
// don't need to be looked at again
// (use m_files.upper_bound(m_name_bound) to get an iterator)
std::string m_name_bound;
std::string m_name_bound = "";
};

View File

@ -42,8 +42,8 @@ ClientActiveObject* ClientActiveObject::create(ActiveObjectType type,
Client *client, ClientEnvironment *env)
{
// Find factory function
UNORDERED_MAP<u16, Factory>::iterator n = m_types.find(type);
if(n == m_types.end()) {
std::unordered_map<u16, Factory>::iterator n = m_types.find(type);
if (n == m_types.end()) {
// If factory is not found, just return.
warningstream << "ClientActiveObject: No factory for type="
<< (int)type << std::endl;
@ -57,7 +57,7 @@ ClientActiveObject* ClientActiveObject::create(ActiveObjectType type,
void ClientActiveObject::registerType(u16 type, Factory f)
{
UNORDERED_MAP<u16, Factory>::iterator n = m_types.find(type);
std::unordered_map<u16, Factory>::iterator n = m_types.find(type);
if(n != m_types.end())
return;
m_types[type] = f;

View File

@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes_extrabloated.h"
#include "activeobject.h"
#include <map>
#include "util/cpp11_container.h"
#include <unordered_map>
class ClientEnvironment;
class ITextureSource;
@ -89,7 +89,7 @@ protected:
ClientEnvironment *m_env;
private:
// Used for creating objects based on type
static UNORDERED_MAP<u16, Factory> m_types;
static std::unordered_map<u16, Factory> m_types;
};
struct DistanceSortedActiveObject

View File

@ -27,9 +27,9 @@ class ClientSimpleObject
{
protected:
public:
bool m_to_be_removed;
bool m_to_be_removed = false;
ClientSimpleObject() : m_to_be_removed(false) {}
ClientSimpleObject() {}
virtual ~ClientSimpleObject() {}
virtual void step(float dtime) {}
};

View File

@ -44,11 +44,7 @@ Clouds::Clouds(
s16 cloudheight
):
scene::ISceneNode(parent, mgr, id),
m_seed(seed),
m_camera_pos(0.0f, 0.0f),
m_origin(0.0f, 0.0f),
m_camera_offset(0.0f, 0.0f, 0.0f),
m_color(1.0f, 1.0f, 1.0f, 1.0f)
m_seed(seed)
{
m_material.setFlag(video::EMF_LIGHTING, false);
//m_material.setFlag(video::EMF_BACK_FACE_CULLING, false);

View File

@ -53,7 +53,7 @@ public:
virtual void OnRegisterSceneNode();
virtual void render();
virtual const aabb3f &getBoundingBox() const
{
return m_box;
@ -68,7 +68,7 @@ public:
{
return m_material;
}
/*
Other stuff
*/
@ -76,7 +76,7 @@ public:
void step(float dtime);
void update(v2f camera_p, video::SColorf color);
void updateCameraOffset(v3s16 camera_offset)
{
m_camera_offset = camera_offset;
@ -135,9 +135,8 @@ private:
u32 m_seed;
v2f m_camera_pos;
v2f m_origin;
v2f m_speed;
v3s16 m_camera_offset;
video::SColorf m_color;
video::SColorf m_color = video::SColorf(1.0f, 1.0f, 1.0f, 1.0f);
CloudParams m_params;
};

View File

@ -39,7 +39,6 @@ struct NearbyCollisionInfo {
NearbyCollisionInfo(bool is_ul, bool is_obj, int bouncy,
const v3s16 &pos, const aabb3f &box) :
is_unloaded(is_ul),
is_step_up(false),
is_object(is_obj),
bouncy(bouncy),
position(pos),
@ -47,7 +46,7 @@ struct NearbyCollisionInfo {
{}
bool is_unloaded;
bool is_step_up;
bool is_step_up = false;
bool is_object;
int bouncy;
v3s16 position;
@ -469,7 +468,6 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
d));
// Get bounce multiplier
bool bouncy = (nearest_info.bouncy >= 1);
float bounce = -(float)nearest_info.bouncy / 100.0;
// Move to the point of collision and reduce dtime by nearest_dtime
@ -499,7 +497,6 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
info.type = COLLISION_NODE;
info.node_p = nearest_info.position;
info.bouncy = bouncy;
info.old_speed = *speed_f;
// Set the speed component that caused the collision to zero
@ -513,7 +510,6 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
else
speed_f->X = 0;
result.collides = true;
result.collides_xz = true;
} else if (nearest_collided == 1) { // Y
if(fabs(speed_f->Y) > BS * 3)
speed_f->Y *= bounce;
@ -526,7 +522,6 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
else
speed_f->Z = 0;
result.collides = true;
result.collides_xz = true;
}
info.new_speed = *speed_f;
@ -572,8 +567,6 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
if (box_info.is_object)
result.standing_on_object = true;
if (box_info.is_unloaded)
result.standing_on_unloaded = true;
}
}
}

View File

@ -36,37 +36,20 @@ enum CollisionType
struct CollisionInfo
{
enum CollisionType type;
v3s16 node_p; // COLLISION_NODE
bool bouncy;
CollisionInfo() {}
CollisionType type = COLLISION_NODE;
v3s16 node_p = v3s16(-32768,-32768,-32768); // COLLISION_NODE
v3f old_speed;
v3f new_speed;
CollisionInfo():
type(COLLISION_NODE),
node_p(-32768,-32768,-32768),
bouncy(false),
old_speed(0,0,0),
new_speed(0,0,0)
{}
};
struct collisionMoveResult
{
bool touching_ground;
bool collides;
bool collides_xz;
bool standing_on_unloaded;
bool standing_on_object;
collisionMoveResult() {}
bool touching_ground = false;
bool collides = false;
bool standing_on_object = false;
std::vector<CollisionInfo> collisions;
collisionMoveResult():
touching_ground(false),
collides(false),
collides_xz(false),
standing_on_unloaded(false),
standing_on_object(false)
{}
};
// Moves using a single iteration; speed should not exceed pos_max_d/dtime

View File

@ -1,34 +0,0 @@
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "content_abm.h"
#include "environment.h"
#include "gamedef.h"
#include "nodedef.h"
#include "content_sao.h"
#include "settings.h"
#include "mapblock.h" // For getNodeBlockPos
#include "map.h"
#include "scripting_server.h"
#include "log.h"
void add_legacy_abms(ServerEnvironment *env, INodeDefManager *nodedef)
{
}

View File

@ -1,32 +0,0 @@
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CONTENT_ABM_HEADER
#define CONTENT_ABM_HEADER
class ServerEnvironment;
class INodeDefManager;
/*
Legacy ActiveBlockModifiers
*/
void add_legacy_abms(ServerEnvironment *env, INodeDefManager *nodedef);
#endif

View File

@ -49,17 +49,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class Settings;
struct ToolCapabilities;
UNORDERED_MAP<u16, ClientActiveObject::Factory> ClientActiveObject::m_types;
SmoothTranslator::SmoothTranslator():
vect_old(0,0,0),
vect_show(0,0,0),
vect_aim(0,0,0),
anim_counter(0),
anim_time(0),
anim_time_counter(0),
aim_is_end(true)
{}
std::unordered_map<u16, ClientActiveObject::Factory> ClientActiveObject::m_types;
void SmoothTranslator::init(v3f vect)
{
@ -72,11 +62,6 @@ void SmoothTranslator::init(v3f vect)
aim_is_end = true;
}
void SmoothTranslator::sharpen()
{
init(vect_show);
}
void SmoothTranslator::update(v3f vect_new, bool is_end_position, float update_interval)
{
aim_is_end = is_end_position;
@ -113,11 +98,6 @@ void SmoothTranslator::translate(f32 dtime)
vect_show = vect_old + vect_move * moveratio;
}
bool SmoothTranslator::is_moving()
{
return ((anim_time_counter / anim_time) < 1.4);
}
/*
Other stuff
*/
@ -222,7 +202,7 @@ void TestCAO::addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc,
void TestCAO::removeFromScene(bool permanent)
{
if(m_node == NULL)
if (!m_node)
return;
m_node->remove();
@ -240,7 +220,7 @@ v3s16 TestCAO::getLightPosition()
void TestCAO::updateNodePos()
{
if(m_node == NULL)
if (!m_node)
return;
m_node->setPosition(m_position);
@ -325,8 +305,6 @@ private:
std::string m_infotext;
};
#include "inventory.h"
// Prototype
ItemCAO proto_ItemCAO(NULL, NULL);
@ -399,16 +377,16 @@ void ItemCAO::addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc,
void ItemCAO::removeFromScene(bool permanent)
{
if(m_node == NULL)
if (!m_node)
return;
m_node->remove();
m_node = NULL;
m_node = nullptr;
}
void ItemCAO::updateLight(u8 light_at_pos)
{
if(m_node == NULL)
if (!m_node)
return;
u8 li = decode_light(light_at_pos);
@ -423,7 +401,7 @@ v3s16 ItemCAO::getLightPosition()
void ItemCAO::updateNodePos()
{
if(m_node == NULL)
if (!m_node)
return;
m_node->setPosition(m_position);
@ -450,7 +428,7 @@ void ItemCAO::updateInfoText()
void ItemCAO::updateTexture()
{
if(m_node == NULL)
if (!m_node)
return;
// Create an inventory item to see what is its image
@ -538,49 +516,7 @@ void ItemCAO::initialize(const std::string &data)
#include "genericobject.h"
GenericCAO::GenericCAO(Client *client, ClientEnvironment *env):
ClientActiveObject(0, client, env),
//
m_is_player(false),
m_is_local_player(false),
//
m_smgr(NULL),
m_irr(NULL),
m_client(NULL),
m_selection_box(-BS/3.,-BS/3.,-BS/3., BS/3.,BS/3.,BS/3.),
m_meshnode(NULL),
m_animated_meshnode(NULL),
m_wield_meshnode(NULL),
m_spritenode(NULL),
m_nametag(NULL),
m_position(v3f(0,10*BS,0)),
m_velocity(v3f(0,0,0)),
m_acceleration(v3f(0,0,0)),
m_yaw(0),
m_hp(1),
m_tx_size(1,1),
m_tx_basepos(0,0),
m_initial_tx_basepos_set(false),
m_tx_select_horiz_by_yawpitch(false),
m_animation_range(v2s32(0,0)),
m_animation_speed(15),
m_animation_blend(0),
m_animation_loop(true),
m_bone_position(UNORDERED_MAP<std::string, core::vector2d<v3f> >()),
m_attachment_bone(""),
m_attachment_position(v3f(0,0,0)),
m_attachment_rotation(v3f(0,0,0)),
m_attached_to_local(false),
m_anim_frame(0),
m_anim_num_frames(1),
m_anim_framelength(0.2),
m_anim_timer(0),
m_reset_textures_timer(-1),
m_previous_texture_modifier(""),
m_current_texture_modifier(""),
m_visuals_expired(false),
m_step_distance_counter(0),
m_last_light(255),
m_is_visible(false)
ClientActiveObject(0, client, env)
{
if (client == NULL) {
ClientActiveObject::registerType(getType(), create);
@ -624,7 +560,8 @@ void GenericCAO::initialize(const std::string &data)
m_is_visible = false;
player->setCAO(this);
}
m_env->addPlayerName(m_name.c_str());
if (m_client->getProtoVersion() < 33)
m_env->addPlayerName(m_name.c_str());
}
}
@ -638,7 +575,7 @@ void GenericCAO::processInitData(const std::string &data)
if (version == 1) { // In PROTOCOL_VERSION 14
m_name = deSerializeString(is);
m_is_player = readU8(is);
m_id = readS16(is);
m_id = readU16(is);
m_position = readV3F1000(is);
m_yaw = readF1000(is);
m_hp = readS16(is);
@ -667,7 +604,7 @@ void GenericCAO::processInitData(const std::string &data)
GenericCAO::~GenericCAO()
{
if (m_is_player) {
if (m_is_player && m_client->getProtoVersion() < 33) {
m_env->removePlayerName(m_name.c_str());
}
removeFromScene(true);
@ -1218,13 +1155,13 @@ void GenericCAO::step(float dtime, ClientEnvironment *env)
updateTextures(m_previous_texture_modifier);
}
}
if(getParent() == NULL && fabs(m_prop.automatic_rotate) > 0.001)
if(!getParent() && fabs(m_prop.automatic_rotate) > 0.001)
{
m_yaw += dtime * m_prop.automatic_rotate * 180 / M_PI;
updateNodePos();
}
if (getParent() == NULL && m_prop.automatic_face_movement_dir &&
if (!getParent() && m_prop.automatic_face_movement_dir &&
(fabs(m_velocity.Z) > 0.001 || fabs(m_velocity.X) > 0.001))
{
float optimal_yaw = atan2(m_velocity.Z,m_velocity.X) * 180 / M_PI
@ -1471,7 +1408,7 @@ void GenericCAO::updateTextures(std::string mod)
void GenericCAO::updateAnimation()
{
if(m_animated_meshnode == NULL)
if (!m_animated_meshnode)
return;
if (m_animated_meshnode->getStartFrame() != m_animation_range.X ||
@ -1489,11 +1426,11 @@ void GenericCAO::updateAnimation()
void GenericCAO::updateBonePosition()
{
if(m_bone_position.empty() || m_animated_meshnode == NULL)
if(m_bone_position.empty() || !m_animated_meshnode)
return;
m_animated_meshnode->setJointMode(irr::scene::EJUOR_CONTROL); // To write positions to the mesh on render
for(UNORDERED_MAP<std::string, core::vector2d<v3f> >::const_iterator
for(std::unordered_map<std::string, core::vector2d<v3f>>::const_iterator
ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii) {
std::string bone_name = (*ii).first;
v3f bone_pos = (*ii).second.X;
@ -1510,7 +1447,7 @@ void GenericCAO::updateBonePosition()
void GenericCAO::updateAttachments()
{
if (getParent() == NULL) { // Detach or don't attach
if (!getParent()) { // Detach or don't attach
scene::ISceneNode *node = getSceneNode();
if (node) {
v3f old_position = node->getAbsolutePosition();

View File

@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "clientobject.h"
#include "object_properties.h"
#include "itemgroup.h"
#include "constants.h"
class Camera;
class Client;
@ -39,75 +40,74 @@ struct SmoothTranslator
v3f vect_old;
v3f vect_show;
v3f vect_aim;
f32 anim_counter;
f32 anim_counter = 0;
f32 anim_time;
f32 anim_time_counter;
bool aim_is_end;
f32 anim_time_counter = 0;
bool aim_is_end = true;
SmoothTranslator();
SmoothTranslator() {};
void init(v3f vect);
void sharpen();
void update(v3f vect_new, bool is_end_position=false, float update_interval=-1);
void translate(f32 dtime);
bool is_moving();
};
class GenericCAO : public ClientActiveObject
{
private:
// Only set at initialization
std::string m_name;
bool m_is_player;
bool m_is_local_player;
std::string m_name = "";
bool m_is_player = false;
bool m_is_local_player = false;
// Property-ish things
ObjectProperties m_prop;
//
scene::ISceneManager *m_smgr;
IrrlichtDevice *m_irr;
Client *m_client;
aabb3f m_selection_box;
scene::IMeshSceneNode *m_meshnode;
scene::IAnimatedMeshSceneNode *m_animated_meshnode;
WieldMeshSceneNode *m_wield_meshnode;
scene::IBillboardSceneNode *m_spritenode;
Nametag* m_nametag;
v3f m_position;
scene::ISceneManager *m_smgr = nullptr;
IrrlichtDevice *m_irr = nullptr;
Client *m_client = nullptr;
aabb3f m_selection_box = aabb3f(-BS/3.,-BS/3.,-BS/3., BS/3.,BS/3.,BS/3.);
scene::IMeshSceneNode *m_meshnode = nullptr;
scene::IAnimatedMeshSceneNode *m_animated_meshnode = nullptr;
WieldMeshSceneNode *m_wield_meshnode = nullptr;
scene::IBillboardSceneNode *m_spritenode = nullptr;
Nametag *m_nametag = nullptr;
v3f m_position = v3f(0.0f, 10.0f * BS, 0);
v3f m_velocity;
v3f m_acceleration;
float m_yaw;
s16 m_hp;
float m_yaw = 0.0f;
s16 m_hp = 1;
SmoothTranslator pos_translator;
// Spritesheet/animation stuff
v2f m_tx_size;
v2f m_tx_size = v2f(1,1);
v2s16 m_tx_basepos;
bool m_initial_tx_basepos_set;
bool m_tx_select_horiz_by_yawpitch;
bool m_initial_tx_basepos_set = false;
bool m_tx_select_horiz_by_yawpitch = false;
v2s32 m_animation_range;
int m_animation_speed;
int m_animation_blend;
bool m_animation_loop;
UNORDERED_MAP<std::string, core::vector2d<v3f> > m_bone_position; // stores position and rotation for each bone name
std::string m_attachment_bone;
int m_animation_speed = 15;
int m_animation_blend = 0;
bool m_animation_loop = true;
// stores position and rotation for each bone name
std::unordered_map<std::string, core::vector2d<v3f>> m_bone_position;
std::string m_attachment_bone = "";
v3f m_attachment_position;
v3f m_attachment_rotation;
bool m_attached_to_local;
int m_anim_frame;
int m_anim_num_frames;
float m_anim_framelength;
float m_anim_timer;
bool m_attached_to_local = false;
int m_anim_frame = 0;
int m_anim_num_frames = 1;
float m_anim_framelength = 0.2f;
float m_anim_timer = 0.0f;
ItemGroupList m_armor_groups;
float m_reset_textures_timer;
std::string m_previous_texture_modifier; // stores texture modifier before punch update
std::string m_current_texture_modifier; // last applied texture modifier
bool m_visuals_expired;
float m_step_distance_counter;
u8 m_last_light;
bool m_is_visible;
float m_reset_textures_timer = -1.0f;
// stores texture modifier before punch update
std::string m_previous_texture_modifier = "";
// last applied texture modifier
std::string m_current_texture_modifier = "";
bool m_visuals_expired = false;
float m_step_distance_counter = 0.0f;
u8 m_last_light = 255;
bool m_is_visible = false;
std::vector<u16> m_children;

View File

@ -26,13 +26,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class SmokePuffCSO: public ClientSimpleObject
{
float m_age;
scene::IBillboardSceneNode *m_spritenode;
float m_age = 0.0f;
scene::IBillboardSceneNode *m_spritenode = nullptr;
public:
SmokePuffCSO(scene::ISceneManager *smgr,
ClientEnvironment *env, v3f pos, v2f size):
m_age(0),
m_spritenode(NULL)
ClientEnvironment *env, v3f pos, v2f size)
{
infostream<<"SmokePuffCSO: constructing"<<std::endl;
m_spritenode = smgr->addBillboardSceneNode(

View File

@ -29,7 +29,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "client.h"
#include "log.h"
#include "noise.h"
#include "util/cpp11.h"
// Distance of light extrapolation (for oversized nodes)
// After this distance, it gives up and considers light level constant
@ -43,7 +42,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
// Corresponding offsets are listed in g_27dirs
#define FRAMED_NEIGHBOR_COUNT 18
static constexpr v3s16 light_dirs[8] = {
static const v3s16 light_dirs[8] = {
v3s16(-1, -1, -1),
v3s16(-1, -1, 1),
v3s16(-1, 1, -1),
@ -837,7 +836,7 @@ void MapblockMeshGenerator::drawPlantlikeQuad(float rotation, float quad_offset,
};
if (random_offset_Y) {
PseudoRandom yrng(face_num++ | p.X << 16 | p.Z << 8 | p.Y << 24);
offset.Y = BS * ((yrng.next() % 16 / 16.0) * 0.125);
offset.Y = -BS * ((yrng.next() % 16 / 16.0) * 0.125);
}
int offset_count = offset_top_only ? 2 : 4;
for (int i = 0; i < offset_count; i++)

View File

@ -189,12 +189,3 @@ void content_nodemeta_deserialize_legacy(std::istream &is,
timers->set(NodeTimer(1., 0., p));
}
}
void content_nodemeta_serialize_legacy(std::ostream &os, NodeMetadataList *meta)
{
// Sorry, I was too lazy to implement this. --kahrl
writeU16(os, 1); // version
writeU16(os, 0); // count
}
// END

View File

@ -34,7 +34,5 @@ void content_nodemeta_deserialize_legacy(std::istream &is,
NodeMetadataList *meta, NodeTimerList *timers,
IItemDefManager *item_def_mgr);
void content_nodemeta_serialize_legacy(std::ostream &os, NodeMetadataList *meta);
#endif

View File

@ -106,19 +106,7 @@ TestSAO proto_TestSAO(NULL, v3f(0,0,0));
*/
UnitSAO::UnitSAO(ServerEnvironment *env, v3f pos):
ServerActiveObject(env, pos),
m_hp(-1),
m_yaw(0),
m_properties_sent(true),
m_armor_groups_sent(false),
m_animation_range(0,0),
m_animation_speed(0),
m_animation_blend(0),
m_animation_loop(true),
m_animation_sent(false),
m_bone_position_sent(false),
m_attachment_parent_id(0),
m_attachment_sent(false)
ServerActiveObject(env, pos)
{
// Initialize something to armor groups
m_armor_groups["fleshy"] = 100;
@ -213,7 +201,7 @@ void UnitSAO::removeAttachmentChild(int child_id)
m_attachment_child_ids.erase(child_id);
}
const UNORDERED_SET<int> &UnitSAO::getAttachmentChildIds()
const std::unordered_set<int> &UnitSAO::getAttachmentChildIds()
{
return m_attachment_child_ids;
}
@ -239,16 +227,7 @@ LuaEntitySAO::LuaEntitySAO(ServerEnvironment *env, v3f pos,
const std::string &name, const std::string &state):
UnitSAO(env, pos),
m_init_name(name),
m_init_state(state),
m_registered(false),
m_velocity(0,0,0),
m_acceleration(0,0,0),
m_last_sent_yaw(0),
m_last_sent_position(0,0,0),
m_last_sent_velocity(0,0,0),
m_last_sent_position_timer(0),
m_last_sent_move_precision(0),
m_current_texture_modifier("")
m_init_state(state)
{
// Only register type if no environment supplied
if(env == NULL){
@ -263,7 +242,7 @@ LuaEntitySAO::~LuaEntitySAO()
m_env->getScriptIface()->luaentity_Remove(m_id);
}
for (UNORDERED_SET<u32>::iterator it = m_attached_particle_spawners.begin();
for (std::unordered_set<u32>::iterator it = m_attached_particle_spawners.begin();
it != m_attached_particle_spawners.end(); ++it) {
m_env->deleteParticleSpawner(*it, false);
}
@ -406,6 +385,20 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
m_env->getScriptIface()->luaentity_Step(m_id, dtime);
}
// Remove LuaEntity beyond terrain edges
{
ServerMap *map = dynamic_cast<ServerMap *>(&m_env->getMap());
assert(map);
if (!m_pending_deactivation &&
map->saoPositionOverLimit(m_base_position)) {
infostream << "Remove SAO " << m_id << "(" << m_init_name
<< "), outside of limits" << std::endl;
m_pending_deactivation = true;
m_removed = true;
return;
}
}
if(send_recommended == false)
return;
@ -447,7 +440,7 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
if(m_bone_position_sent == false){
m_bone_position_sent = true;
for (UNORDERED_MAP<std::string, core::vector2d<v3f> >::const_iterator
for (std::unordered_map<std::string, core::vector2d<v3f>>::const_iterator
ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
std::string str = gob_cmd_update_bone_position((*ii).first,
(*ii).second.X, (*ii).second.Y);
@ -484,7 +477,7 @@ std::string LuaEntitySAO::getClientInitializationData(u16 protocol_version)
msg_os << serializeLongString(gob_cmd_update_armor_groups(m_armor_groups)); // 2
msg_os << serializeLongString(gob_cmd_update_animation(
m_animation_range, m_animation_speed, m_animation_blend, m_animation_loop)); // 3
for (UNORDERED_MAP<std::string, core::vector2d<v3f> >::const_iterator
for (std::unordered_map<std::string, core::vector2d<v3f>>::const_iterator
ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii) {
msg_os << serializeLongString(gob_cmd_update_bone_position((*ii).first,
(*ii).second.X, (*ii).second.Y)); // m_bone_position.size
@ -492,7 +485,7 @@ std::string LuaEntitySAO::getClientInitializationData(u16 protocol_version)
msg_os << serializeLongString(gob_cmd_update_attachment(m_attachment_parent_id,
m_attachment_bone, m_attachment_position, m_attachment_rotation)); // 4
int message_count = 4 + m_bone_position.size();
for (UNORDERED_SET<int>::const_iterator ii = m_attachment_child_ids.begin();
for (std::unordered_set<int>::const_iterator ii = m_attachment_child_ids.begin();
(ii != m_attachment_child_ids.end()); ++ii) {
if (ServerActiveObject *obj = m_env->getActiveObject(*ii)) {
message_count++;
@ -769,29 +762,7 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, u16 peer_id
UnitSAO(env_, v3f(0,0,0)),
m_player(player_),
m_peer_id(peer_id_),
m_inventory(NULL),
m_damage(0),
m_last_good_position(0,0,0),
m_time_from_last_teleport(0),
m_time_from_last_punch(0),
m_nocheat_dig_pos(32767, 32767, 32767),
m_nocheat_dig_time(0),
m_wield_index(0),
m_position_not_sent(false),
m_is_singleplayer(is_singleplayer),
m_breath(PLAYER_MAX_BREATH),
m_pitch(0),
m_fov(0),
m_wanted_range(0),
m_extended_attributes_modified(false),
// public
m_physics_override_speed(1),
m_physics_override_jump(1),
m_physics_override_gravity(1),
m_physics_override_sneak(true),
m_physics_override_sneak_glitch(false),
m_physics_override_new_move(true),
m_physics_override_sent(false)
m_is_singleplayer(is_singleplayer)
{
assert(m_peer_id != 0); // pre-condition
@ -854,7 +825,7 @@ void PlayerSAO::removingFromEnvironment()
ServerActiveObject::removingFromEnvironment();
if (m_player->getPlayerSAO() == this) {
unlinkPlayerSessionAndSave();
for (UNORDERED_SET<u32>::iterator it = m_attached_particle_spawners.begin();
for (std::unordered_set<u32>::iterator it = m_attached_particle_spawners.begin();
it != m_attached_particle_spawners.end(); ++it) {
m_env->deleteParticleSpawner(*it, false);
}
@ -879,7 +850,7 @@ std::string PlayerSAO::getClientInitializationData(u16 protocol_version)
msg_os << serializeLongString(gob_cmd_update_armor_groups(m_armor_groups)); // 2
msg_os << serializeLongString(gob_cmd_update_animation(
m_animation_range, m_animation_speed, m_animation_blend, m_animation_loop)); // 3
for (UNORDERED_MAP<std::string, core::vector2d<v3f> >::const_iterator
for (std::unordered_map<std::string, core::vector2d<v3f>>::const_iterator
ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii) {
msg_os << serializeLongString(gob_cmd_update_bone_position((*ii).first,
(*ii).second.X, (*ii).second.Y)); // m_bone_position.size
@ -892,7 +863,7 @@ std::string PlayerSAO::getClientInitializationData(u16 protocol_version)
// (GENERIC_CMD_UPDATE_NAMETAG_ATTRIBUTES) : Deprecated, for backwards compatibility only.
msg_os << serializeLongString(gob_cmd_update_nametag_attributes(m_prop.nametag_color)); // 6
int message_count = 6 + m_bone_position.size();
for (UNORDERED_SET<int>::const_iterator ii = m_attachment_child_ids.begin();
for (std::unordered_set<int>::const_iterator ii = m_attachment_child_ids.begin();
ii != m_attachment_child_ids.end(); ++ii) {
if (ServerActiveObject *obj = m_env->getActiveObject(*ii)) {
message_count++;
@ -1069,7 +1040,7 @@ void PlayerSAO::step(float dtime, bool send_recommended)
if (!m_bone_position_sent) {
m_bone_position_sent = true;
for (UNORDERED_MAP<std::string, core::vector2d<v3f> >::const_iterator
for (std::unordered_map<std::string, core::vector2d<v3f>>::const_iterator
ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii) {
std::string str = gob_cmd_update_bone_position((*ii).first,
(*ii).second.X, (*ii).second.Y);

View File

@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "serverobject.h"
#include "itemgroup.h"
#include "object_properties.h"
#include "constants.h"
class UnitSAO: public ServerActiveObject
{
@ -52,35 +53,35 @@ public:
void getAttachment(int *parent_id, std::string *bone, v3f *position, v3f *rotation);
void addAttachmentChild(int child_id);
void removeAttachmentChild(int child_id);
const UNORDERED_SET<int> &getAttachmentChildIds();
const std::unordered_set<int> &getAttachmentChildIds();
ObjectProperties* accessObjectProperties();
void notifyObjectPropertiesModified();
protected:
s16 m_hp;
float m_yaw;
s16 m_hp = -1;
float m_yaw = 0.0f;
bool m_properties_sent;
bool m_properties_sent = true;
struct ObjectProperties m_prop;
ItemGroupList m_armor_groups;
bool m_armor_groups_sent;
bool m_armor_groups_sent = false;
v2f m_animation_range;
float m_animation_speed;
float m_animation_blend;
bool m_animation_loop;
bool m_animation_sent;
float m_animation_speed = 0.0f;
float m_animation_blend = 0.0f;
bool m_animation_loop = true;
bool m_animation_sent = false;
// Stores position and rotation for each bone name
UNORDERED_MAP<std::string, core::vector2d<v3f> > m_bone_position;
bool m_bone_position_sent;
std::unordered_map<std::string, core::vector2d<v3f>> m_bone_position;
bool m_bone_position_sent = false;
int m_attachment_parent_id;
UNORDERED_SET<int> m_attachment_child_ids;
std::string m_attachment_bone;
int m_attachment_parent_id = 0;
std::unordered_set<int> m_attachment_child_ids;
std::string m_attachment_bone = "";
v3f m_attachment_position;
v3f m_attachment_rotation;
bool m_attachment_sent;
bool m_attachment_sent = false;
};
/*
@ -133,17 +134,17 @@ private:
std::string m_init_name;
std::string m_init_state;
bool m_registered;
bool m_registered = false;
v3f m_velocity;
v3f m_acceleration;
float m_last_sent_yaw;
float m_last_sent_yaw = 0.0f;
v3f m_last_sent_position;
v3f m_last_sent_velocity;
float m_last_sent_position_timer;
float m_last_sent_move_precision;
std::string m_current_texture_modifier;
float m_last_sent_position_timer = 0.0f;
float m_last_sent_move_precision = 0.0f;
std::string m_current_texture_modifier = "";
};
/*
@ -152,11 +153,10 @@ private:
class LagPool
{
float m_pool;
float m_max;
float m_pool = 15.0f;
float m_max = 15.0f;
public:
LagPool(): m_pool(15), m_max(15)
{}
LagPool() {}
void setMax(float new_max)
{
@ -188,7 +188,7 @@ public:
}
};
typedef UNORDERED_MAP<std::string, std::string> PlayerAttributes;
typedef std::unordered_map<std::string, std::string> PlayerAttributes;
class RemotePlayer;
class PlayerSAO : public UnitSAO
@ -368,47 +368,47 @@ private:
std::string getPropertyPacket();
void unlinkPlayerSessionAndSave();
RemotePlayer *m_player;
u16 m_peer_id;
Inventory *m_inventory;
s16 m_damage;
RemotePlayer *m_player = nullptr;
u16 m_peer_id = 0;
Inventory *m_inventory = nullptr;
s16 m_damage = 0;
// Cheat prevention
LagPool m_dig_pool;
LagPool m_move_pool;
v3f m_last_good_position;
float m_time_from_last_teleport;
float m_time_from_last_punch;
v3s16 m_nocheat_dig_pos;
float m_nocheat_dig_time;
float m_time_from_last_teleport = 0.0f;
float m_time_from_last_punch = 0.0f;
v3s16 m_nocheat_dig_pos = v3s16(32767, 32767, 32767);
float m_nocheat_dig_time = 0.0f;
// Timers
IntervalLimiter m_breathing_interval;
IntervalLimiter m_drowning_interval;
IntervalLimiter m_node_hurt_interval;
int m_wield_index;
bool m_position_not_sent;
int m_wield_index = 0;
bool m_position_not_sent = false;
// Cached privileges for enforcement
std::set<std::string> m_privs;
bool m_is_singleplayer;
u16 m_breath;
f32 m_pitch;
f32 m_fov;
s16 m_wanted_range;
u16 m_breath = PLAYER_MAX_BREATH;
f32 m_pitch = 0.0f;
f32 m_fov = 0.0f;
s16 m_wanted_range = 0.0f;
PlayerAttributes m_extra_attributes;
bool m_extended_attributes_modified;
bool m_extended_attributes_modified = false;
public:
float m_physics_override_speed;
float m_physics_override_jump;
float m_physics_override_gravity;
bool m_physics_override_sneak;
bool m_physics_override_sneak_glitch;
bool m_physics_override_new_move;
bool m_physics_override_sent;
float m_physics_override_speed = 1.0f;
float m_physics_override_jump = 1.0f;
float m_physics_override_gravity = 1.0f;
bool m_physics_override_sneak = true;
bool m_physics_override_sneak_glitch = false;
bool m_physics_override_new_move = true;
bool m_physics_override_sent = false;
};
#endif

View File

@ -70,17 +70,17 @@ const int craft_hash_type_max = (int) CRAFT_HASH_TYPE_UNHASHED;
*/
struct CraftInput
{
CraftMethod method;
unsigned int width;
CraftMethod method = CRAFT_METHOD_NORMAL;
unsigned int width = 0;
std::vector<ItemStack> items;
CraftInput():
method(CRAFT_METHOD_NORMAL), width(0), items()
{}
CraftInput() {}
CraftInput(CraftMethod method_, unsigned int width_,
const std::vector<ItemStack> &items_):
method(method_), width(width_), items(items_)
{}
std::string dump() const;
};
@ -90,13 +90,12 @@ struct CraftInput
struct CraftOutput
{
// Used for normal crafting and cooking, itemstring
std::string item;
std::string item = "";
// Used for cooking (cook time) and fuel (burn time), seconds
float time;
float time = 0.0f;
CraftOutput() {}
CraftOutput():
item(""), time(0)
{}
CraftOutput(const std::string &item_, float time_):
item(item_), time(time_)
{}
@ -171,16 +170,15 @@ public:
class CraftDefinitionShaped: public CraftDefinition
{
public:
CraftDefinitionShaped():
output(""), width(1), recipe(), hash_inited(false), replacements()
{}
CraftDefinitionShaped() {}
CraftDefinitionShaped(
const std::string &output_,
unsigned int width_,
const std::vector<std::string> &recipe_,
const CraftReplacements &replacements_):
output(output_), width(width_), recipe(recipe_),
hash_inited(false), replacements(replacements_)
replacements(replacements_)
{}
virtual ~CraftDefinitionShaped(){}
@ -200,15 +198,15 @@ public:
private:
// Output itemstring
std::string output;
std::string output = "";
// Width of recipe
unsigned int width;
unsigned int width = 1;
// Recipe matrix (itemstrings)
std::vector<std::string> recipe;
// Recipe matrix (item names)
std::vector<std::string> recipe_names;
// bool indicating if initHash has been called already
bool hash_inited;
bool hash_inited = false;
// Replacement items for decrementInput()
CraftReplacements replacements;
};

View File

@ -40,6 +40,7 @@ public:
void beginSave() {}
void endSave() {}
private:
std::map<s64, std::string> m_database;
};

View File

@ -41,6 +41,7 @@ public:
void beginSave() {}
void endSave() {}
private:
leveldb::DB *m_database;
};

View File

@ -43,9 +43,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "remoteplayer.h"
Database_PostgreSQL::Database_PostgreSQL(const std::string &connect_string) :
m_connect_string(connect_string),
m_conn(NULL),
m_pgversion(0)
m_connect_string(connect_string)
{
if (m_connect_string.empty()) {
throw SettingNotFoundException(

View File

@ -104,8 +104,8 @@ private:
// Attributes
std::string m_connect_string;
PGconn *m_conn;
int m_pgversion;
PGconn *m_conn = nullptr;
int m_pgversion = 0;
};
class MapDatabasePostgreSQL : private Database_PostgreSQL, public MapDatabase

View File

@ -45,8 +45,8 @@ public:
void listAllLoadableBlocks(std::vector<v3s16> &dst);
private:
redisContext *ctx;
std::string hash;
redisContext *ctx = nullptr;
std::string hash = "";
};
#endif // USE_REDIS

View File

@ -114,12 +114,8 @@ int Database_SQLite3::busyHandler(void *data, int count)
Database_SQLite3::Database_SQLite3(const std::string &savedir, const std::string &dbname) :
m_database(NULL),
m_initialized(false),
m_savedir(savedir),
m_dbname(dbname),
m_stmt_begin(NULL),
m_stmt_end(NULL)
m_dbname(dbname)
{
}
@ -203,13 +199,8 @@ Database_SQLite3::~Database_SQLite3()
MapDatabaseSQLite3::MapDatabaseSQLite3(const std::string &savedir):
Database_SQLite3(savedir, "map"),
MapDatabase(),
m_stmt_read(NULL),
m_stmt_write(NULL),
m_stmt_list(NULL),
m_stmt_delete(NULL)
MapDatabase()
{
}
MapDatabaseSQLite3::~MapDatabaseSQLite3()
@ -334,24 +325,10 @@ void MapDatabaseSQLite3::listAllLoadableBlocks(std::vector<v3s16> &dst)
PlayerDatabaseSQLite3::PlayerDatabaseSQLite3(const std::string &savedir):
Database_SQLite3(savedir, "players"),
PlayerDatabase(),
m_stmt_player_load(NULL),
m_stmt_player_add(NULL),
m_stmt_player_update(NULL),
m_stmt_player_remove(NULL),
m_stmt_player_list(NULL),
m_stmt_player_load_inventory(NULL),
m_stmt_player_load_inventory_items(NULL),
m_stmt_player_add_inventory(NULL),
m_stmt_player_add_inventory_items(NULL),
m_stmt_player_remove_inventory(NULL),
m_stmt_player_remove_inventory_items(NULL),
m_stmt_player_metadata_load(NULL),
m_stmt_player_metadata_remove(NULL),
m_stmt_player_metadata_add(NULL)
PlayerDatabase()
{
}
PlayerDatabaseSQLite3::~PlayerDatabaseSQLite3()
{
FINALIZE_STATEMENT(m_stmt_player_load)

View File

@ -113,18 +113,18 @@ protected:
virtual void createDatabase() = 0;
virtual void initStatements() = 0;
sqlite3 *m_database;
sqlite3 *m_database = nullptr;
private:
// Open the database
void openDatabase();
bool m_initialized;
bool m_initialized = false;
std::string m_savedir;
std::string m_dbname;
std::string m_savedir = "";
std::string m_dbname = "";
sqlite3_stmt *m_stmt_begin;
sqlite3_stmt *m_stmt_end;
sqlite3_stmt *m_stmt_begin = nullptr;
sqlite3_stmt *m_stmt_end = nullptr;
s64 m_busy_handler_data[2];
@ -152,10 +152,10 @@ private:
void bindPos(sqlite3_stmt *stmt, const v3s16 &pos, int index = 1);
// Map
sqlite3_stmt *m_stmt_read;
sqlite3_stmt *m_stmt_write;
sqlite3_stmt *m_stmt_list;
sqlite3_stmt *m_stmt_delete;
sqlite3_stmt *m_stmt_read = nullptr;
sqlite3_stmt *m_stmt_write = nullptr;
sqlite3_stmt *m_stmt_list = nullptr;
sqlite3_stmt *m_stmt_delete = nullptr;
};
class PlayerDatabaseSQLite3 : private Database_SQLite3, public PlayerDatabase
@ -177,20 +177,20 @@ private:
bool playerDataExists(const std::string &name);
// Players
sqlite3_stmt *m_stmt_player_load;
sqlite3_stmt *m_stmt_player_add;
sqlite3_stmt *m_stmt_player_update;
sqlite3_stmt *m_stmt_player_remove;
sqlite3_stmt *m_stmt_player_list;
sqlite3_stmt *m_stmt_player_load_inventory;
sqlite3_stmt *m_stmt_player_load_inventory_items;
sqlite3_stmt *m_stmt_player_add_inventory;
sqlite3_stmt *m_stmt_player_add_inventory_items;
sqlite3_stmt *m_stmt_player_remove_inventory;
sqlite3_stmt *m_stmt_player_remove_inventory_items;
sqlite3_stmt *m_stmt_player_metadata_load;
sqlite3_stmt *m_stmt_player_metadata_remove;
sqlite3_stmt *m_stmt_player_metadata_add;
sqlite3_stmt *m_stmt_player_load = nullptr;
sqlite3_stmt *m_stmt_player_add = nullptr;
sqlite3_stmt *m_stmt_player_update = nullptr;
sqlite3_stmt *m_stmt_player_remove = nullptr;
sqlite3_stmt *m_stmt_player_list = nullptr;
sqlite3_stmt *m_stmt_player_load_inventory = nullptr;
sqlite3_stmt *m_stmt_player_load_inventory_items = nullptr;
sqlite3_stmt *m_stmt_player_add_inventory = nullptr;
sqlite3_stmt *m_stmt_player_add_inventory_items = nullptr;
sqlite3_stmt *m_stmt_player_remove_inventory = nullptr;
sqlite3_stmt *m_stmt_player_remove_inventory_items = nullptr;
sqlite3_stmt *m_stmt_player_metadata_load = nullptr;
sqlite3_stmt *m_stmt_player_metadata_remove = nullptr;
sqlite3_stmt *m_stmt_player_metadata_add = nullptr;
};
#endif

View File

@ -21,13 +21,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "porting.h"
#include "debug.h"
#include "exceptions.h"
#include "threads.h"
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
#include <map>
#include <sstream>
#include "threading/mutex.h"
#include <thread>
#include "threading/mutex_auto_lock.h"
#include "config.h"
@ -53,7 +52,7 @@ void sanity_check_fn(const char *assertion, const char *file,
#endif
errorstream << std::endl << "In thread " << std::hex
<< thr_get_current_thread_id() << ":" << std::endl;
<< std::this_thread::get_id() << ":" << std::endl;
errorstream << file << ":" << line << ": " << function
<< ": An engine assumption '" << assertion << "' failed." << std::endl;
@ -70,7 +69,7 @@ void fatal_error_fn(const char *msg, const char *file,
#endif
errorstream << std::endl << "In thread " << std::hex
<< thr_get_current_thread_id() << ":" << std::endl;
<< std::this_thread::get_id() << ":" << std::endl;
errorstream << file << ":" << line << ": " << function
<< ": A fatal error occured: " << msg << std::endl;
@ -85,19 +84,19 @@ void fatal_error_fn(const char *msg, const char *file,
struct DebugStack
{
DebugStack(threadid_t id);
DebugStack(std::thread::id id);
void print(FILE *file, bool everything);
void print(std::ostream &os, bool everything);
threadid_t threadid;
std::thread::id thread_id;
char stack[DEBUG_STACK_SIZE][DEBUG_STACK_TEXT_SIZE];
int stack_i; // Points to the lowest empty position
int stack_max_i; // Highest i that was seen
};
DebugStack::DebugStack(threadid_t id)
DebugStack::DebugStack(std::thread::id id)
{
threadid = id;
thread_id = id;
stack_i = 0;
stack_max_i = 0;
memset(stack, 0, DEBUG_STACK_SIZE*DEBUG_STACK_TEXT_SIZE);
@ -106,57 +105,44 @@ DebugStack::DebugStack(threadid_t id)
void DebugStack::print(FILE *file, bool everything)
{
std::ostringstream os;
os << threadid;
os << thread_id;
fprintf(file, "DEBUG STACK FOR THREAD %s:\n",
os.str().c_str());
for(int i=0; i<stack_max_i; i++)
{
if(i == stack_i && everything == false)
for (int i = 0; i < stack_max_i; i++) {
if (i == stack_i && everything == false)
break;
if(i < stack_i)
if (i < stack_i)
fprintf(file, "#%d %s\n", i, stack[i]);
else
fprintf(file, "(Leftover data: #%d %s)\n", i, stack[i]);
}
if(stack_i == DEBUG_STACK_SIZE)
if (stack_i == DEBUG_STACK_SIZE)
fprintf(file, "Probably overflown.\n");
}
void DebugStack::print(std::ostream &os, bool everything)
{
os<<"DEBUG STACK FOR THREAD "<<threadid<<": "<<std::endl;
os<<"DEBUG STACK FOR THREAD "<<thread_id<<": "<<std::endl;
for(int i=0; i<stack_max_i; i++)
{
for(int i = 0; i < stack_max_i; i++) {
if(i == stack_i && everything == false)
break;
if(i < stack_i)
if (i < stack_i)
os<<"#"<<i<<" "<<stack[i]<<std::endl;
else
os<<"(Leftover data: #"<<i<<" "<<stack[i]<<")"<<std::endl;
}
if(stack_i == DEBUG_STACK_SIZE)
if (stack_i == DEBUG_STACK_SIZE)
os<<"Probably overflown."<<std::endl;
}
// Note: Using pthread_t (that is, threadid_t on POSIX platforms) as the key to
// a std::map is naughty. Formally, a pthread_t may only be compared using
// pthread_equal() - pthread_t lacks the well-ordered property needed for
// comparisons in binary searches. This should be fixed at some point by
// defining a custom comparator with an arbitrary but stable ordering of
// pthread_t, but it isn't too important since none of our supported platforms
// implement pthread_t as a non-ordinal type.
std::map<threadid_t, DebugStack*> g_debug_stacks;
Mutex g_debug_stacks_mutex;
void debug_stacks_init()
{
}
std::map<std::thread::id, DebugStack*> g_debug_stacks;
std::mutex g_debug_stacks_mutex;
void debug_stacks_print_to(std::ostream &os)
{
@ -164,11 +150,8 @@ void debug_stacks_print_to(std::ostream &os)
os<<"Debug stacks:"<<std::endl;
for(std::map<threadid_t, DebugStack*>::iterator
i = g_debug_stacks.begin();
i != g_debug_stacks.end(); ++i)
{
i->second->print(os, false);
for (auto it : g_debug_stacks) {
it.second->print(os, false);
}
}
@ -179,36 +162,29 @@ void debug_stacks_print()
DebugStacker::DebugStacker(const char *text)
{
threadid_t threadid = thr_get_current_thread_id();
std::thread::id thread_id = std::this_thread::get_id();
MutexAutoLock lock(g_debug_stacks_mutex);
std::map<threadid_t, DebugStack*>::iterator n;
n = g_debug_stacks.find(threadid);
if(n != g_debug_stacks.end())
{
auto n = g_debug_stacks.find(thread_id);
if (n != g_debug_stacks.end()) {
m_stack = n->second;
}
else
{
} else {
/*DEBUGPRINT("Creating new debug stack for thread %x\n",
(unsigned int)threadid);*/
m_stack = new DebugStack(threadid);
g_debug_stacks[threadid] = m_stack;
(unsigned int)thread_id);*/
m_stack = new DebugStack(thread_id);
g_debug_stacks[thread_id] = m_stack;
}
if(m_stack->stack_i >= DEBUG_STACK_SIZE)
{
if (m_stack->stack_i >= DEBUG_STACK_SIZE) {
m_overflowed = true;
}
else
{
} else {
m_overflowed = false;
snprintf(m_stack->stack[m_stack->stack_i],
DEBUG_STACK_TEXT_SIZE, "%s", text);
m_stack->stack_i++;
if(m_stack->stack_i > m_stack->stack_max_i)
if (m_stack->stack_i > m_stack->stack_max_i)
m_stack->stack_max_i = m_stack->stack_i;
}
}
@ -217,18 +193,17 @@ DebugStacker::~DebugStacker()
{
MutexAutoLock lock(g_debug_stacks_mutex);
if(m_overflowed == true)
if (m_overflowed == true)
return;
m_stack->stack_i--;
if(m_stack->stack_i == 0)
{
threadid_t threadid = m_stack->threadid;
if (m_stack->stack_i == 0) {
std::thread::id thread_id = m_stack->thread_id;
/*DEBUGPRINT("Deleting debug stack for thread %x\n",
(unsigned int)threadid);*/
(unsigned int)thread_id);*/
delete m_stack;
g_debug_stacks.erase(threadid);
g_debug_stacks.erase(thread_id);
}
}

View File

@ -92,7 +92,6 @@ void debug_set_exception_handler();
#define DEBUG_STACK_SIZE 50
#define DEBUG_STACK_TEXT_SIZE 300
extern void debug_stacks_init();
extern void debug_stacks_print_to(std::ostream &os);
extern void debug_stacks_print();

View File

@ -63,7 +63,7 @@ void set_default_settings(Settings *settings)
// Keymap
settings->setDefault("remote_port", "30000");
settings->setDefault("keymap_forward", "KEY_KEY_W");
settings->setDefault("keymap_autorun", "");
settings->setDefault("keymap_autoforward", "");
settings->setDefault("keymap_backward", "KEY_KEY_S");
settings->setDefault("keymap_left", "KEY_KEY_A");
settings->setDefault("keymap_right", "KEY_KEY_D");
@ -126,8 +126,8 @@ void set_default_settings(Settings *settings)
settings->setDefault("fps_max", "60");
settings->setDefault("pause_fps_max", "20");
settings->setDefault("viewing_range", "100");
settings->setDefault("screenW", "800");
settings->setDefault("screenH", "600");
settings->setDefault("screen_w", "800");
settings->setDefault("screen_h", "600");
settings->setDefault("autosave_screensize", "true");
settings->setDefault("fullscreen", "false");
settings->setDefault("fullscreen_bpp", "24");
@ -264,6 +264,7 @@ void set_default_settings(Settings *settings)
// Server
settings->setDefault("disable_escape_sequences", "false");
settings->setDefault("strip_color_codes", "false");
// Network
settings->setDefault("enable_ipv6", "true");
@ -375,8 +376,8 @@ void set_default_settings(Settings *settings)
settings->setDefault("enable_console", "false");
#ifdef __ANDROID__
settings->setDefault("screenW", "0");
settings->setDefault("screenH", "0");
settings->setDefault("screen_w", "0");
settings->setDefault("screen_h", "0");
settings->setDefault("enable_shaders", "false");
settings->setDefault("fullscreen", "true");
settings->setDefault("video_driver", "ogles1");

View File

@ -474,7 +474,7 @@ void draw_plain(Camera &camera, bool show_hud,
// Undersampling-specific stuff
static video::ITexture *image = NULL;
static v2u32 last_pixelated_size = v2u32(0, 0);
int undersampling = g_settings->getU16("undersampling");
static thread_local int undersampling = g_settings->getU16("undersampling");
v2u32 pixelated_size;
v2u32 dest_size;
if (undersampling > 0) {

View File

@ -96,12 +96,10 @@ EmergeManager::EmergeManager(Server *server)
this->oremgr = new OreManager(server);
this->decomgr = new DecorationManager(server);
this->schemmgr = new SchematicManager(server);
this->gen_notify_on = 0;
// Note that accesses to this variable are not synchronized.
// This is because the *only* thread ever starting or stopping
// EmergeThreads should be the ServerThread.
this->m_threads_active = false;
enable_mapgen_debug_info = g_settings->getBool("enable_mapgen_debug_info");
@ -375,7 +373,7 @@ bool EmergeManager::pushBlockEmergeData(
bool EmergeManager::popBlockEmergeData(v3s16 pos, BlockEmergeData *bedata)
{
std::map<v3s16, BlockEmergeData>::iterator it;
UNORDERED_MAP<u16, u16>::iterator it2;
std::unordered_map<u16, u16>::iterator it2;
it = m_blocks_enqueued.find(pos);
if (it == m_blocks_enqueued.end())

View File

@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define EMERGE_HEADER
#include <map>
#include <mutex>
#include "irr_v3d.h"
#include "util/container.h"
#include "mapgen.h" // for MapgenParams
@ -46,20 +47,15 @@ class Server;
// Structure containing inputs/outputs for chunk generation
struct BlockMakeData {
MMVManip *vmanip;
u64 seed;
MMVManip *vmanip = nullptr;
u64 seed = 0;
v3s16 blockpos_min;
v3s16 blockpos_max;
v3s16 blockpos_requested;
UniqueQueue<v3s16> transforming_liquid;
INodeDefManager *nodedef;
BlockMakeData():
vmanip(NULL),
seed(0),
nodedef(NULL)
{}
INodeDefManager *nodedef = nullptr;
BlockMakeData() {}
~BlockMakeData() { delete vmanip; }
};
@ -95,7 +91,7 @@ public:
bool enable_mapgen_debug_info;
// Generation Notify
u32 gen_notify_on;
u32 gen_notify_on = 0;
std::set<u32> gen_notify_on_deco_ids;
// Parameters passed to mapgens owned by ServerMap
@ -118,6 +114,7 @@ public:
// Methods
EmergeManager(Server *server);
~EmergeManager();
DISABLE_CLASS_COPY(EmergeManager);
bool initMapgens(MapgenParams *mgparams);
@ -143,7 +140,6 @@ public:
Mapgen *getCurrentMapgen();
// Mapgen helpers methods
Biome *getBiomeAtPoint(v3s16 p);
int getSpawnLevelAtPoint(v2s16 p);
int getGroundLevelAtPoint(v2s16 p);
bool isBlockUnderground(v3s16 blockpos);
@ -153,11 +149,11 @@ public:
private:
std::vector<Mapgen *> m_mapgens;
std::vector<EmergeThread *> m_threads;
bool m_threads_active;
bool m_threads_active = false;
Mutex m_queue_mutex;
std::mutex m_queue_mutex;
std::map<v3s16, BlockEmergeData> m_blocks_enqueued;
UNORDERED_MAP<u16, u16> m_peer_queue_count;
std::unordered_map<u16, u16> m_peer_queue_count;
u16 m_qlimit_total;
u16 m_qlimit_diskonly;
@ -177,8 +173,6 @@ private:
bool popBlockEmergeData(v3s16 pos, BlockEmergeData *bedata);
friend class EmergeThread;
//DISABLE_CLASS_COPY(EmergeManager);
};
#endif

View File

@ -28,12 +28,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Environment::Environment(IGameDef *gamedef):
m_time_of_day_speed(0),
m_time_of_day(9000),
m_time_of_day_f(9000./24000),
m_time_conversion_skew(0.0f),
m_enable_day_night_ratio_override(false),
m_day_night_ratio_override(0.0f),
m_time_of_day_speed(0.0f),
m_day_count(0),
m_gamedef(gamedef)
{
m_cache_enable_shaders = g_settings->getBool("enable_shaders");

View File

@ -33,11 +33,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <list>
#include <queue>
#include <map>
#include <atomic>
#include <mutex>
#include "irr_v3d.h"
#include "activeobject.h"
#include "util/numeric.h"
#include "threading/mutex.h"
#include "threading/atomic.h"
#include "network/networkprotocol.h" // for AccessDeniedCode
class IGameDef;
@ -79,25 +79,26 @@ public:
u32 m_added_objects;
IGameDef *getGameDef() { return m_gamedef; }
protected:
GenericAtomic<float> m_time_of_day_speed;
std::atomic<float> m_time_of_day_speed;
/*
* Below: values managed by m_time_lock
*/
// Time of day in milli-hours (0-23999); determines day and night
u32 m_time_of_day;
u32 m_time_of_day = 9000;
// Time of day in 0...1
float m_time_of_day_f;
float m_time_of_day_f = 9000.0f / 24000.0f;
// Stores the skew created by the float -> u32 conversion
// to be applied at next conversion, so that there is no real skew.
float m_time_conversion_skew;
float m_time_conversion_skew = 0.0f;
// Overriding the day-night ratio is useful for custom sky visuals
bool m_enable_day_night_ratio_override;
u32 m_day_night_ratio_override;
bool m_enable_day_night_ratio_override = false;
u32 m_day_night_ratio_override = 0.0f;
// Days from the server start, accounts for time shift
// in game (e.g. /time or bed usage)
Atomic<u32> m_day_count;
std::atomic<u32> m_day_count;
/*
* Above: values managed by m_time_lock
*/
@ -119,9 +120,7 @@ protected:
IGameDef *m_gamedef;
private:
Mutex m_time_lock;
//DISABLE_CLASS_COPY(Environment);
std::mutex m_time_lock;
};
#endif

View File

@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class MtEvent
{
public:
virtual ~MtEvent(){};
virtual ~MtEvent() {};
//virtual MtEvent* clone(){ return new IEvent; }
virtual const char* getType() const = 0;

View File

@ -37,16 +37,6 @@ protected:
std::string m_s;
};
class AsyncQueuedException : public BaseException {
public:
AsyncQueuedException(const std::string &s): BaseException(s) {}
};
class NotImplementedException : public BaseException {
public:
NotImplementedException(const std::string &s): BaseException(s) {}
};
class AlreadyExistsException : public BaseException {
public:
AlreadyExistsException(const std::string &s): BaseException(s) {}
@ -77,16 +67,6 @@ public:
PacketError(const std::string &s): BaseException(s) {}
};
class LoadError : public BaseException {
public:
LoadError(const std::string &s): BaseException(s) {}
};
class ContainerFullException : public BaseException {
public:
ContainerFullException(const std::string &s): BaseException(s) {}
};
class SettingNotFoundException : public BaseException {
public:
SettingNotFoundException(const std::string &s): BaseException(s) {}
@ -97,16 +77,6 @@ public:
InvalidFilenameException(const std::string &s): BaseException(s) {}
};
class ProcessingLimitException : public BaseException {
public:
ProcessingLimitException(const std::string &s): BaseException(s) {}
};
class CommandLineError : public BaseException {
public:
CommandLineError(const std::string &s): BaseException(s) {}
};
class ItemNotFoundException : public BaseException {
public:
ItemNotFoundException(const std::string &s): BaseException(s) {}
@ -160,21 +130,5 @@ public:
{}
};
class TargetInexistentException : public std::exception
{
virtual const char * what() const throw()
{
return "Somebody tried to refer to something that doesn't exist.";
}
};
class NullPointerException : public std::exception
{
virtual const char * what() const throw()
{
return "NullPointerException";
}
};
#endif

View File

@ -21,14 +21,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "threading/mutex_auto_lock.h"
UNORDERED_MAP<u16, std::vector<v3s16> > FacePositionCache::cache;
Mutex FacePositionCache::cache_mutex;
std::unordered_map<u16, std::vector<v3s16>> FacePositionCache::cache;
std::mutex FacePositionCache::cache_mutex;
// Calculate the borders of a "d-radius" cube
const std::vector<v3s16> &FacePositionCache::getFacePositions(u16 d)
{
MutexAutoLock lock(cache_mutex);
UNORDERED_MAP<u16, std::vector<v3s16> >::iterator it = cache.find(d);
std::unordered_map<u16, std::vector<v3s16>>::const_iterator it = cache.find(d);
if (it != cache.end())
return it->second;

View File

@ -21,11 +21,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define FACE_POSITION_CACHE_HEADER
#include "irr_v3d.h"
#include "threading/mutex.h"
#include "util/cpp11_container.h"
#include <map>
#include <vector>
#include <unordered_map>
#include <mutex>
/*
* This class permits caching getFacePosition call results.
@ -37,8 +37,8 @@ public:
private:
static const std::vector<v3s16> &generateFacePosition(u16 d);
static UNORDERED_MAP<u16, std::vector<v3s16> > cache;
static Mutex cache_mutex;
static std::unordered_map<u16, std::vector<v3s16>> cache;
static std::mutex cache_mutex;
};
#endif

View File

@ -43,12 +43,7 @@ static void font_setting_changed(const std::string &name, void *userdata)
/******************************************************************************/
FontEngine::FontEngine(Settings* main_settings, gui::IGUIEnvironment* env) :
m_settings(main_settings),
m_env(env),
m_font_cache(),
m_currentMode(FM_Standard),
m_lastMode(),
m_lastSize(0),
m_lastFont(NULL)
m_env(env)
{
for (unsigned int i = 0; i < FM_MaxMode; i++) {

View File

@ -120,16 +120,16 @@ private:
unsigned int m_default_size[FM_MaxMode];
/** current font engine mode */
FontMode m_currentMode;
FontMode m_currentMode = FM_Standard;
/** font mode of last request */
FontMode m_lastMode;
/** size of last request */
unsigned int m_lastSize;
unsigned int m_lastSize = 0;
/** last font returned */
irr::gui::IGUIFont* m_lastFont;
irr::gui::IGUIFont* m_lastFont = nullptr;
};

View File

@ -1033,7 +1033,7 @@ void KeyCache::populate()
key[KeyType::SPECIAL1] = getKeySetting("keymap_special1");
key[KeyType::SNEAK] = getKeySetting("keymap_sneak");
key[KeyType::AUTORUN] = getKeySetting("keymap_autorun");
key[KeyType::AUTOFORWARD] = getKeySetting("keymap_autoforward");
key[KeyType::DROP] = getKeySetting("keymap_drop");
key[KeyType::INVENTORY] = getKeySetting("keymap_inventory");
@ -1238,7 +1238,7 @@ protected:
void toggleFast();
void toggleNoClip();
void toggleCinematic();
void toggleAutorun();
void toggleAutoforward();
void toggleChat();
void toggleHud();
@ -1633,8 +1633,8 @@ void Game::run()
&& client->checkPrivilege("fast");
#endif
irr::core::dimension2d<u32> previous_screen_size(g_settings->getU16("screenW"),
g_settings->getU16("screenH"));
irr::core::dimension2d<u32> previous_screen_size(g_settings->getU16("screen_w"),
g_settings->getU16("screen_h"));
while (device->run()
&& !(*kill || g_gamecallback->shutdown_requested
@ -1648,8 +1648,8 @@ void Game::run()
if (previous_screen_size != current_screen_size &&
current_screen_size != irr::core::dimension2d<u32>(0,0) &&
g_settings->getBool("autosave_screensize")) {
g_settings->setU16("screenW", current_screen_size.Width);
g_settings->setU16("screenH", current_screen_size.Height);
g_settings->setU16("screen_w", current_screen_size.Width);
g_settings->setU16("screen_h", current_screen_size.Height);
previous_screen_size = current_screen_size;
}
@ -2473,8 +2473,8 @@ void Game::processKeyInput()
{
if (wasKeyDown(KeyType::DROP)) {
dropSelectedItem();
} else if (wasKeyDown(KeyType::AUTORUN)) {
toggleAutorun();
} else if (wasKeyDown(KeyType::AUTOFORWARD)) {
toggleAutoforward();
} else if (wasKeyDown(KeyType::INVENTORY)) {
openInventory();
} else if (wasKeyDown(KeyType::ESC) || input->wasKeyDown(CancelKey)) {
@ -2690,7 +2690,7 @@ void Game::openInventory()
*/
LocalPlayer *player = client->getEnv().getLocalPlayer();
if (player == NULL || player->getCAO() == NULL)
if (!player || !player->getCAO())
return;
infostream << "the_game: " << "Launching inventory" << std::endl;
@ -2802,15 +2802,15 @@ void Game::toggleCinematic()
m_statustext = msg[cinematic];
}
// Add WoW-style autorun by toggling continuous forward.
void Game::toggleAutorun()
// Autoforward by toggling continuous forward.
void Game::toggleAutoforward()
{
static const wchar_t *msg[] = { L"autorun disabled", L"autorun enabled" };
bool autorun_enabled = !g_settings->getBool("continuous_forward");
g_settings->set("continuous_forward", bool_to_cstr(autorun_enabled));
static const wchar_t *msg[] = { L"autoforward disabled", L"autoforward enabled" };
bool autoforward_enabled = !g_settings->getBool("continuous_forward");
g_settings->set("continuous_forward", bool_to_cstr(autoforward_enabled));
runData.statustext_time = 0;
m_statustext = msg[autorun_enabled ? 1 : 0];
m_statustext = msg[autoforward_enabled ? 1 : 0];
}
void Game::toggleChat()
@ -3278,8 +3278,7 @@ void Game::processClientEvents(CameraOrientation *cam)
{
HudElement *e = player->removeHud(event.hudrm.id);
if (e != NULL)
delete e;
delete e;
}
break;
@ -3450,7 +3449,7 @@ void Game::updateCamera(u32 busy_time, f32 dtime)
GenericCAO *playercao = player->getCAO();
// If playercao not loaded, don't change camera
if (playercao == NULL)
if (!playercao)
return;
camera->toggleCameraMode();
@ -3653,7 +3652,7 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud, bool show_debug)
} else if (pointed.type == POINTEDTHING_NODE) {
ToolCapabilities playeritem_toolcap =
playeritem.getToolCapabilities(itemdef_manager);
if (playeritem.name.empty()) {
if (playeritem.name.empty() && hand_def.tool_capabilities != NULL) {
playeritem_toolcap = *hand_def.tool_capabilities;
}
handlePointingAtNode(pointed, playeritem_def, playeritem_toolcap, dtime);
@ -3694,7 +3693,7 @@ PointedThing Game::updatePointedThing(
std::vector<aabb3f> *selectionboxes = hud->getSelectionBoxes();
selectionboxes->clear();
hud->setSelectedFaceNormal(v3f(0.0, 0.0, 0.0));
static const bool show_entity_selectionbox = g_settings->getBool(
static thread_local const bool show_entity_selectionbox = g_settings->getBool(
"show_entity_selectionbox");
ClientMap &map = client->getEnv().getClientMap();

Some files were not shown because too many files have changed in this diff Show More