Compare commits

...

89 Commits

Author SHA1 Message Date
sfan5
298a27c743 Port most shaders to GLSL ES 3.0 (#16639) 2025-11-06 19:31:35 +01:00
SmallJoker
98fb381910 Break include chains and tidy (part 2) 2025-11-06 19:31:13 +01:00
sfan5
8593d38030 Add non-headless singleplayer tests to CI 2025-11-06 11:42:36 +01:00
sfan5
b6bfc494e6 Fix singleplayer with --gameid and new world 2025-11-06 11:42:36 +01:00
frogTheSecond
e82495d98c Allow image formats other than PNG for game backgrounds in the main menu (#16395) 2025-11-06 11:42:26 +01:00
sfan5
8042b5512f Irrlicht: remove some dead code 2025-11-05 11:56:05 +01:00
sfan5
2368126d0a Fix memory leak in rollback (and more) (#16644) 2025-11-05 11:55:57 +01:00
sfan5
7a6e639d61 Tune "block send throttling while building" optimization (#16614)
it can lead to terrain not loading/updating at all if you're constantly building and moving.

for more see the IRC logs <https://irc.luanti.org/luanti/2025-10-26#i_6293100>
2025-11-04 11:44:49 +01:00
sfan5
8350fb734a Default-initialize SColor 2025-11-02 21:36:39 +01:00
SmallJoker
329e210326 Break include chains and tidy (#16640)
Co-authored-by: cx384 <cx384@proton.me>
2025-11-02 21:33:10 +01:00
cx384
f2eabdd1d5 Fix missing airlike buffer info 2025-11-02 10:01:53 +01:00
y5nw
36f052198c defaultsettings: drop the USEKEY2 macro 2025-11-01 17:22:09 +01:00
Marcin Serwin
631cbb3018 Use CMAKE_INSTALL_FULL_*DIR for installation directories (#16629)
`CMAKE_INSTALL_*DIR`s can be set to absolute paths and in such cases
they should not be appended to the installation prefix. This logic is
automatically handled by CMake and exposed via the corresponding FULL
path variant.
2025-11-01 17:21:54 +01:00
sfan5
de5ef4ca29 Introduce array textures for node rendering (#16574) 2025-11-01 17:21:41 +01:00
Lars Müller
1ead48c58b Refactor: Remove obsolete IAnimatedMeshSceneNode interface (#16631) 2025-10-30 17:34:45 +01:00
sfan5
4b41e20000 Remove unused drawtype shader constant
might lead to better material merging
2025-10-30 15:19:31 +01:00
sfan5
04a443e392 Irrlicht: fix mipmaps regenerated multiple times 2025-10-30 15:19:30 +01:00
sfan5
ae6aac8aa9 Irrlicht: upload array textures more efficiently 2025-10-30 15:19:27 +01:00
sfan5
3c60b348a6 Irrlicht: expose MaxArrayTextureLayers 2025-10-30 15:19:26 +01:00
sfan5
0794912374 Refactor texture source to prepare for array textures 2025-10-30 15:19:26 +01:00
sfan5
e924f425f2 Remove Irrlicht devices except SDL (#16580) 2025-10-30 13:39:44 +01:00
cx384
d4d3e10531 Fixes and improvements for item image animations (#16620) 2025-10-29 10:26:59 +01:00
Lars Müller
97c9f8f709 Fix wrong normal shading for objects (apply transform) 2025-10-29 10:26:38 +01:00
Lars Müller
7331156650 Fix interpolating to identity bone overrides (#16609)
The previous code immediately dropped identity overrides, even if there still was an interpolation to be done.
Also a little bit of cleanup, and setting an appropriate identity default for the scale property when interpolating.

For modders: As a workaround, you can add a tiny offset so that overrides aren't identity overrides.
2025-10-29 10:25:50 +01:00
cx384
93ccb4b355 Add inventory image animation API (#16538) 2025-10-26 18:48:53 +01:00
Xeno333
dde463635e Add default_mapgen game setting (#16238) 2025-10-26 18:46:54 +01:00
sfan5
4f8a847085 Guard new object from being added at shutdown (#16610) 2025-10-26 10:28:41 +01:00
corpserot
f1c0f292fa Correct info about ObjectRef:set_attach() bones "" default value 2025-10-26 10:28:30 +01:00
Lars Müller
377cdfb601 Check if object is gone before calling on_rightclick
fix #16601
2025-10-25 17:37:12 +02:00
cx384
ff15b413b0 Don't use bilinear/trilinear filter on small overlay if large base texture 2025-10-25 17:33:56 +02:00
sfan5
35357e4300 Silence non-useful CI whitespace check 2025-10-22 22:33:40 +02:00
sfan5
4756e23477 Move crack overlay to shader 2025-10-22 22:33:40 +02:00
sfan5
c58a7ad98a Move Game class definition of out game.cpp 2025-10-22 22:33:40 +02:00
sfan5
f4977b1e33 Allow mapgen chunk size to be non-cubic (#16429) 2025-10-22 22:31:23 +02:00
sfan5
0f943e5810 Restore BlendOperation in shadow rendering
was removed in d834c45d1c
2025-10-21 08:56:05 +02:00
sfan5
081624a229 Android: update NDK and SDL version (#16586) 2025-10-18 20:00:46 +02:00
Lars Müller
51f19b4329 Fix overly strict bounds check in tiniergltf (#16590)
This makes sure that models exported by Goxel are not falsely rejected. It applies to exporters using strides more broadly.

A workaround is to add padding to the buffer and buffer view.
2025-10-18 20:00:37 +02:00
sfan5
a049174f12 Make logging timestamps configurable (#16581) 2025-10-17 00:18:06 +02:00
Thomas--S
6b0e1e9b67 Clarify set_yaw() behaviour in documentation 2025-10-17 00:17:52 +02:00
PtiLuky
d834c45d1c Port shadow shaders to work with OpenGL3
Co-authored-by: sfan5 <sfan5@live.de>
2025-10-15 23:08:43 +02:00
sfan5
5e23e478b1 Increase flexibility of ShaderSource 2025-10-15 23:08:43 +02:00
birdlover32767
1b37eb2e0b Add tooltips to noiseparams settings (#16462) 2025-10-15 23:08:35 +02:00
sfan5
c965bb77bd Fix possible sendPlayerPos desync situation (#16498) 2025-10-15 00:21:07 +02:00
Tygyh
7d4f80f1cc Fix segfault with null video driver (#16579) 2025-10-15 00:20:56 +02:00
SmallJoker
6ff4a2a3d2 IrrlichtMt: Implement double- and triple-click text selection (#16559) 2025-10-15 00:20:46 +02:00
lhofhansl
7ca5f3baa0 Allow FXAA to be used together with FSAA or SSAA (#16555)
This allows FXAA post-processing to be used together with FSAA or SSAA
2025-10-11 20:50:23 -07:00
SmallJoker
0b13fd0b01 Driver: Change the texture check condition
The return value of 'ensureTexture' is unsuited for the texture "".
This fixes an undesired side-effect introduced by 9213b7f1.
2025-10-11 22:16:30 +02:00
SmallJoker
9213b7f164 Driver: Handle errors during texture creation (#16565)
The OpenGL drivers do accept 'nullptr' textures, however the
recent Mip-Mapping change did not respect that.
Furthermore, errors during texture creation for the pipeline are
now properly handled and shown as an error to the user.
2025-10-11 19:38:38 +02:00
cx384
f205f6f539 Fix meta tool capabilities regression (#16563)
This also adds a unittest to avoid issues in the future.
2025-10-11 19:38:21 +02:00
sfan5
c2e2b97944 Respect node alpha node for inventory drawing (#16556) 2025-10-11 19:37:30 +02:00
sfan5
a141f8478b Fix broken 'updating nodes' progress
was broken by fbec378869
2025-10-11 19:36:51 +02:00
sfan5
1a6bf66f2a Clean up tiledef/layer handling for node particles 2025-10-11 19:36:51 +02:00
Leonard-Orlando Menzel
35fda3710d settingtypes.txt: document float/int without max but with min 2025-10-09 11:49:40 +02:00
Zughy
a3e27f06fc Update roadmap (#16468) 2025-10-09 11:48:09 +02:00
sfan5
0afb6df810 Test CSM in CI runs 2025-10-09 11:42:57 +02:00
sfan5
5b5b4b3eff Verify sandbox a bit in an unit test 2025-10-09 11:42:57 +02:00
sfan5
05e86bb1e8 Restrict function references returned by debug.getinfo() 2025-10-09 11:42:57 +02:00
Travis Wrightsman
c4e0c9d408 Fix invalid duplicate provides tag in AppStream metainfo 2025-10-07 11:10:42 +02:00
sfan5
06250f8b27 Clean up RequestQueue a bunch 2025-10-07 11:10:19 +02:00
sfan5
293544fb48 Clean up tiledef/layer handling in wield mesh 2025-10-07 11:10:19 +02:00
Wuzzy
b816542e22 Require 'give' priv for /pulverize and /clearinv (#16526) 2025-10-05 19:01:12 +02:00
rubenwardy
29476f406b Enable strip_color_codes by default 2025-10-05 19:00:56 +02:00
SmallJoker
76a8d8b0e2 Continue with 5.15.0-dev 2025-10-05 17:51:12 +02:00
SmallJoker
6d1a208018 Bump version to 5.14.0 2025-10-05 17:32:14 +02:00
StoyanDimitrov
d500241e3d Update builtin Bulgarian translation 2025-10-05 17:32:17 +02:00
sfan5
61f3812f73 Fix incorrect MapgenV6 chunk size warning 2025-10-05 17:11:04 +02:00
y5nw
f2be1c39c8 SDL: Remove SDL_syswm.h include 2025-10-05 14:44:14 +02:00
y5nw
244dc7ac06 shell.nix: add gmp and luajit 2025-10-05 14:44:14 +02:00
maxchen32
3a0152c491 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.5% (1442 of 1463 strings)
2025-10-04 21:55:05 +02:00
Tarás Lavrentiev
52e36b06e6 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1463 of 1463 strings)
2025-10-04 21:35:52 +02:00
Karol1165
f1f1fce2db Translated using Weblate (Polish)
Currently translated at 88.0% (1288 of 1463 strings)
2025-10-04 21:35:52 +02:00
Тарас Арт
4aae915e4f Translated using Weblate (Ukrainian)
Currently translated at 98.9% (1448 of 1463 strings)
2025-10-04 21:35:52 +02:00
Neil Rizen
814eb21def Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1463 of 1463 strings)
2025-10-04 21:35:52 +02:00
y5nw
b5eb11c0ae Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.5% (1442 of 1463 strings)
2025-10-04 21:35:52 +02:00
dvchd
72b14910da Translated using Weblate (Vietnamese)
Currently translated at 42.5% (623 of 1463 strings)
2025-10-04 21:35:52 +02:00
Neil Rizen
bca99fc723 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1463 of 1463 strings)
2025-10-04 21:35:52 +02:00
Ludus
b6fe5fee43 Translated using Weblate (Italian)
Currently translated at 87.2% (1276 of 1463 strings)
2025-10-04 21:35:52 +02:00
Wuzzy
23e208c7aa Translated using Weblate (German)
Currently translated at 100.0% (1463 of 1463 strings)
2025-10-04 21:35:52 +02:00
109247019824
8b3e80f534 Translated using Weblate (Bulgarian)
Currently translated at 90.8% (1329 of 1463 strings)
2025-10-04 21:35:52 +02:00
SmallJoker
4f77a91e04 IrrlichtMt: Fix Win32 device compile error (non-SDL)
This issue was caused by one of the recent header refactoring commits.
2025-10-04 12:57:14 +02:00
SmallJoker
c2a4d5f82d Update credits for 5.14.0 (#16531) 2025-10-03 13:20:14 +02:00
Lars Müller
4238aa423b Fix a memory leak: Use irr_ptr for bones (#16530) 2025-10-01 12:53:01 +02:00
DS
ae35167a5e Fix debug.getinfo not being unset in CPCSM (#16506)
regression was introduced in eeb6cab
2025-10-01 12:52:48 +02:00
SmallJoker
499f2284bd Server: Fix Server::Send exception caused by leaving players
Leaving players will have PEER_ID_INVALID for database saving purposes.
This patch clarifies that, and properly protects the batch send function.

Bug introduced by 5f5ea132.
2025-09-29 19:23:43 +02:00
Wuzzy
274d8a7c65 Update builtin locale (#16512)
* Update builtin locale files

* Update German builtin translation
2025-09-29 13:25:42 +02:00
sfan5
8f98b4f243 Android: Update to SDK 35 (#16513) 2025-09-29 13:25:23 +02:00
fetsorn
e3ec044ed0 Update comments referring to obsolete TOCLIENT_INIT (#16522) 2025-09-29 13:21:52 +02:00
SmallJoker
dd3530dc79 Mapgen: Correct border block criteria (#16524)
This addresses a regression from e86d2fea8.

Co-authored-by: Po Lu <luangruo@yahoo.com>
2025-09-29 13:21:30 +02:00
SmallJoker
421835a30e Formspec: Fix missing CHG:n fields (regression)
The GUIScrollBar type was changed in commit 39f2727503.
This commit updates a corresponding check in guiFormSpecMenu accordingly.
2025-09-24 18:37:31 +02:00
302 changed files with 5256 additions and 11778 deletions

View File

@@ -119,7 +119,7 @@ jobs:
- name: Install deps
run: |
source ./util/ci/common.sh
install_linux_deps clang-18 lldb
install_linux_deps clang-18 lldb xvfb
- name: Build
run: |
@@ -136,6 +136,10 @@ jobs:
run: |
./util/test_multiplayer.sh
- name: Singleplayer test
run: |
xvfb-run ./util/test_singleplayer.sh
# Build with prometheus-cpp (server-only), also runs on ARM64
clang_prometheus_arm:
name: "clang (with Prometheus, ARM64)"

View File

@@ -23,7 +23,7 @@ jobs:
- name: Install deps
run: |
source ./util/ci/common.sh
install_linux_deps clang gdb libluajit-5.1-dev
install_linux_deps clang gdb libluajit-5.1-dev xvfb
- name: Build
run: |
@@ -37,6 +37,10 @@ jobs:
run: |
serverconf="profiler.load=true" ./util/test_multiplayer.sh
- name: Singleplayer test (GL3)
run: |
clientconf="video_driver=opengl3" xvfb-run ./util/test_singleplayer.sh
luacheck:
name: "Builtin Luacheck and Unit Tests"
runs-on: ubuntu-latest

View File

@@ -50,29 +50,8 @@ jobs:
steps:
- uses: actions/checkout@v4
# Line endings are already ensured by .gitattributes
# Multiple multline comments in one line is not supported by this check
# and there is no reason to use them
# So lines like: "/* */ /*" or "*/ a = 5; /*" will result in error
- name: Check for unsupported multiline comments
run: |
if git ls-files |\
grep -E '^src/.*\.cpp$|^src/.*\.[ch]$' |\
xargs grep -n '\*/.*/\*';\
then
echo -e "\033[0;31mUnsupported combination of multiline comments. New multiline comment should begin on new line.";\
(exit 1);\
else\
(exit 0);\
fi
if git ls-files |\
grep -E '\.lua$' |\
xargs grep -n -e '\]\].*--\[\[';\
then
echo -e "\033[0;31mUnsupported combination of multiline comments. New multiline comment should begin on new line.";\
(exit 1);\
else\
(exit 0);\
fi
# Warning: Multiple multline comments in one line
# is not supported by this check and may misbehave.
# This prepare files for final check
# See python script ./util/ci/indent_tab_preprocess.py for details.
- name: Preprocess files

View File

@@ -23,7 +23,7 @@ read_globals = {
"tracy",
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "copy_with_metatables", "getn", "indexof", "keyof", "insert_all"}},
table = {fields = {"copy", "copy_with_metatables", "getn", "indexof", "keyof", "insert_all", "shuffle"}},
math = {fields = {"hypot", "round"}},
}
@@ -41,7 +41,7 @@ stds.menu_common = {
},
}
files["builtin/client/register.lua"] = {
files["builtin/client/init.lua"] = {
globals = {
debug = {fields={"getinfo"}},
}

View File

@@ -14,7 +14,7 @@ set(CLANG_MINIMUM_VERSION "7.0.1")
# You should not need to edit these manually, use util/bump_version.sh
set(VERSION_MAJOR 5)
set(VERSION_MINOR 14)
set(VERSION_MINOR 15)
set(VERSION_PATCH 0)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
@@ -169,15 +169,15 @@ elseif(UNIX) # Linux, BSD etc
set(LOCALEDIR "locale")
else()
include(GNUInstallDirs)
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}")
set(BINDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}")
set(MANDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_MANDIR}")
set(SHAREDIR "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}")
set(BINDIR "${CMAKE_INSTALL_FULL_BINDIR}")
set(DOCDIR "${CMAKE_INSTALL_FULL_DOCDIR}")
set(MANDIR "${CMAKE_INSTALL_FULL_MANDIR}")
set(EXAMPLE_CONF_DIR ${DOCDIR})
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/applications")
set(METAINFODIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/metainfo")
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/icons")
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LOCALEDIR}")
set(XDG_APPS_DIR "${CMAKE_INSTALL_FULL_DATADIR}/applications")
set(METAINFODIR "${CMAKE_INSTALL_FULL_DATADIR}/metainfo")
set(ICONDIR "${CMAKE_INSTALL_FULL_DATADIR}/icons")
set(LOCALEDIR "${CMAKE_INSTALL_FULL_LOCALEDIR}")
endif()
endif()

View File

@@ -6,7 +6,7 @@ android {
applicationId 'net.minetest.minetest'
minSdkVersion 21
compileSdk 34
targetSdkVersion 34
targetSdkVersion 35
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
}

View File

@@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 2;
private static final int SDL_MINOR_VERSION = 32;
private static final int SDL_MICRO_VERSION = 0;
private static final int SDL_MICRO_VERSION = 10;
/*
// Display InputType.SOURCE/CLASS of events and devices
//

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="loading">Carregando…</string>
<string name="notification_channel_name">Notificação geral</string>
<string name="notification_channel_description">Notificações do Luanti</string>
<string name="unzip_notification_title">Carregando Luanti</string>
<string name="unzip_notification_description">Menos de 1 minuto…</string>
<string name="game_notification_title">O Luanti está em execução</string>
<string name="ime_dialog_done">Concluído</string>
<string name="no_web_browser">Nenhum navegador encontrado</string>
</resources>

View File

@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
project.ext.set("versionMajor", 5) // Version Major
project.ext.set("versionMinor", 14) // Version Minor
project.ext.set("versionMinor", 15) // Version Minor
project.ext.set("versionPatch", 0) // Version Patch
// ^ keep in sync with cmake
@@ -9,14 +9,14 @@ project.ext.set("versionBuild", 0) // Version Build
// ^ fourth version number to allow releasing Android-only fixes and beta versions
buildscript {
ext.ndk_version = '27.3.13750724'
ext.ndk_version = '29.0.14206865'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.5.1'
classpath 'de.undercouch:gradle-download-task:4.1.1'
classpath 'com.android.tools.build:gradle:8.12.3'
classpath 'de.undercouch:gradle-download-task:5.6.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
@@ -30,5 +30,5 @@ allprojects {
}
task clean(type: Delete) {
delete rootProject.buildDir
delete rootProject.layout.buildDirectory
}

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -68,5 +68,5 @@ if (new File(depsDir, 'armeabi-v7a').exists()) {
preBuild.dependsOn getDeps
clean {
delete new File(buildDir.parent, 'deps')
delete depsDir
}

View File

@@ -13,3 +13,6 @@ dofile(commonpath .. "information_formspecs.lua")
dofile(clientpath .. "chatcommands.lua")
dofile(clientpath .. "misc.lua")
assert(loadfile(commonpath .. "item_s.lua"))({}) -- Just for push/read node functions
-- unset, as promised in initializeSecurityClient()
debug.getinfo = nil

View File

@@ -119,6 +119,9 @@ end
-- }]]
function dump(value, indent)
indent = indent or "\t"
assert(type(indent) == "string", "dump()'s second argument should be a string or nil.")
local newline = indent == "" and "" or "\n"
local rope = {}
@@ -873,3 +876,4 @@ function core.parse_coordinates(x, y, z, relative_to)
local rz = core.parse_relative_number(z, relative_to.z)
return rx and ry and rz and vector.new(rx, ry, rz)
end

View File

@@ -1,4 +1,5 @@
local builtin_shared = ...
local debug_getinfo = debug.getinfo
do
local default = {mod = "??", name = "??"}
@@ -56,7 +57,7 @@ function builtin_shared.make_registration()
core.callback_origins[func] = {
-- may be nil or return nil
mod = core.get_current_modname and core.get_current_modname() or "??",
name = debug.getinfo(1, "n").name or "??"
name = debug_getinfo(1, "n").name or "??"
}
end
return t, registerfunc
@@ -69,7 +70,7 @@ function builtin_shared.make_registration_reverse()
core.callback_origins[func] = {
-- may be nil or return nil
mod = core.get_current_modname and core.get_current_modname() or "??",
name = debug.getinfo(1, "n").name or "??"
name = debug_getinfo(1, "n").name or "??"
}
end
return t, registerfunc

View File

@@ -46,33 +46,55 @@ local function get_formspec(dialogdata)
end
local fields = {}
local function add_field(x, name, label, value)
local function add_field(x, name, label, value, tooltips)
fields[#fields + 1] = ("field[%f,%f;3.3,1;%s;%s;%s]"):format(
x, height, name, label, core.formspec_escape(value or "")
)
if tooltips then
fields[#fields + 1] = ("tooltip[%s;%s]"):format(name, table.concat(tooltips, "\n"))
end
end
-- First row
height = height + 0.3
add_field(0.3, "te_offset", fgettext("Offset"), t[1])
add_field(3.6, "te_scale", fgettext("Scale"), t[2])
add_field(6.9, "te_seed", fgettext("Seed"), t[6])
add_field(0.3, "te_offset", fgettext("Offset"), t[1], {fgettext("Offsets the final noise by this value.")})
add_field(3.6, "te_scale", fgettext("Scale"), t[2], {
fgettext("The multiplier for the noise before the offset is added.")})
add_field(6.9, "te_seed", fgettext("Seed"), t[6], {
fgettext("The random seed for the noise. The same seed results in the same noise.")})
height = height + 1.1
-- Second row
add_field(0.3, "te_spreadx", fgettext("X spread"), t[3])
add_field(0.3, "te_spreadx", fgettext("$1 spread", "X"), t[3], {
fgettext("Scales the noise in the $1 axis by this value.", "X"),
fgettext("This is also the scale of the largest structures in the $1 direction of the noise.", "X")})
if dimension == 3 then
add_field(3.6, "te_spready", fgettext("Y spread"), t[4])
add_field(3.6, "te_spready", fgettext("$1 spread", "Y"), t[4], {
fgettext("Scales the noise in the $1 axis by this value."),
fgettext("This is also the scale of the largest structures in the $1 direction of the noise.", "Y")})
else
fields[#fields + 1] = "label[4," .. height - 0.2 .. ";" ..
fgettext("2D Noise") .. "]"
end
add_field(6.9, "te_spreadz", fgettext("Z spread"), t[5])
add_field(6.9, "te_spreadz", fgettext("$1 spread", "Z"), t[5], {
fgettext("Scales the noise in the $1 axis by this value.", "Z"),
fgettext("This is also the scale of the largest structures in the $1 direction of the noise.", "Z")})
height = height + 1.1
-- Third row
add_field(0.3, "te_octaves", fgettext("Octaves"), t[7])
add_field(3.6, "te_persist", fgettext("Persistence"), t[8])
add_field(6.9, "te_lacun", fgettext("Lacunarity"), t[9])
add_field(0.3, "te_octaves", fgettext("Octaves"), t[7], {
fgettext("Controls how many octaves (layers) the noise will have."),
fgettext("Each octave is a simple noise generator. Each one also adds more detail to the noise."),
fgettext("Lower values will result in smoother noise and higher values will result in rougher noise."),
fgettext("Finally, all of the octaves will be combined to generate the noise."),
fgettext("Having lots of octaves is not recommended because it increases terrain generation time.")})
add_field(3.6, "te_persist", fgettext("Persistence"), t[8], {
fgettext("Amplifies every octave by (amplitude of the previous octave * Persistence)."),
fgettext("The first octave is amplified by 1."),
fgettext("Lower values make the terrain simple and higher values make the terrain rough.")})
add_field(6.9, "te_lacun", fgettext("Lacunarity"), t[9], {
fgettext("Scales every octave by (scale of the previous octave / Lacunarity)."),
fgettext("The first octave is scaled by 1."),
fgettext("Lower values make the terrain smooth and higher values make the terrain have fine detail.")})
height = height + 1.1
@@ -95,6 +117,8 @@ local function get_formspec(dialogdata)
for noise settings in the settings menu. ]]
.. fgettext("defaults") .. ";" -- defaults
.. tostring(flags["defaults"] == true) .. "]" -- to get false if nil
.. "tooltip[cb_defaults;" .. fgettext("Overrides the 'eased' flag based on the noise type.")
.. "\n" .. fgettext("2D noise: flag on.\n3D noise: flag off.") .. "]"
.. "checkbox[5," .. height - 0.6 .. ";cb_eased;"
--[[~ "eased" is a noise parameter flag.
It is used to make the map smoother and
@@ -102,6 +126,10 @@ local function get_formspec(dialogdata)
the settings menu. ]]
.. fgettext("eased") .. ";" -- eased
.. tostring(flags["eased"] == true) .. "]"
.. "tooltip[cb_eased;"
.. fgettext("Maps noise gradient values onto a quintic S-curve before performing interpolation.")
.. "\n" .. fgettext("This results in smooth noise instead of gridlike noise.") .. "\n"
.. fgettext("Making 3D noise eased is not recommended because it significantly increases the load.") .. "]"
.. "checkbox[5," .. height - 0.15 .. ";cb_absvalue;"
--[[~ "absvalue" is a noise parameter flag.
It is short for "absolute value".
@@ -109,6 +137,9 @@ local function get_formspec(dialogdata)
the settings menu. ]]
.. fgettext("absvalue") .. ";" -- absvalue
.. tostring(flags["absvalue"] == true) .. "]"
.. "tooltip[cb_absvalue;"
.. fgettext("Takes the absolute value of each octave while adding them together.")
.. "\n" .. fgettext("This results in spiky noise.") .. "]"
height = height + 1

View File

@@ -1,4 +1,4 @@
local getinfo, rawget, rawset = debug.getinfo, rawget, rawset
local debug_getinfo, rawget, rawset = debug.getinfo, rawget, rawset
function core.global_exists(name)
if type(name) ~= "string" then
@@ -18,7 +18,7 @@ function meta:__newindex(name, value)
if declared[name] then
return
end
local info = getinfo(2, "Sl")
local info = debug_getinfo(2, "Sl")
if info ~= nil then
local desc = ("%s:%d"):format(info.short_src, info.currentline)
local warn_key = ("%s\0%d\0%s"):format(info.source, info.currentline, name)
@@ -36,7 +36,7 @@ function meta:__index(name)
if declared[name] then
return
end
local info = getinfo(2, "Sl")
local info = debug_getinfo(2, "Sl")
if info == nil then
return
end

View File

@@ -43,7 +43,7 @@ end
-- Chat command handler
--
core.chatcommands = core.registered_chatcommands -- BACKWARDS COMPATIBILITY
core.chatcommands = core.registered_chatcommands -- backwards compatibility
local msg_time_threshold =
tonumber(core.settings:get("chatcommand_msg_time_threshold")) or 0.1
@@ -902,6 +902,7 @@ core.register_chatcommand("spawnentity", {
core.register_chatcommand("pulverize", {
params = "",
description = S("Destroy item in hand"),
privs = {give=true},
func = function(name, param)
local player = core.get_player_by_name(name)
if not player then
@@ -1302,6 +1303,7 @@ core.register_chatcommand("last-login", {
core.register_chatcommand("clearinv", {
params = S("[<name>]"),
description = S("Clear the inventory of yourself or another player"),
privs = {give=true},
func = function(name, param)
local player
if param and param ~= "" and param ~= name then

View File

@@ -51,6 +51,8 @@ core.features = {
on_timer_four_args = true,
particlespawner_exclude_player = true,
generate_decorations_biomes = true,
chunksize_vector = true,
item_inventory_image_animation = true,
}
function core.has_feature(arg)

View File

@@ -132,6 +132,7 @@ core.protocol_versions = {
["5.12.0"] = 48,
["5.13.0"] = 49,
["5.14.0"] = 50,
["5.15.0"] = 51,
}
setmetatable(core.protocol_versions, {__newindex = function()

View File

@@ -71,7 +71,7 @@ core.register_privilege("kick", {
give_to_admin = true,
})
core.register_privilege("give", {
description = S("Can use /give and /giveme"),
description = S("Can use /give, /giveme, /pulverize and /clearinv"),
give_to_singleplayer = false,
})
core.register_privilege("password", {

View File

@@ -1,5 +1,6 @@
local builtin_shared = ...
local S = core.get_translator("__builtin")
local debug_getinfo = debug.getinfo
--
-- Make raw registration functions inaccessible to anyone except this file
@@ -548,7 +549,7 @@ function core.registered_on_player_hpchange(player, hp_change, reason)
local func = core.registered_on_player_hpchanges.modifiers[i]
hp_change, last = func(player, hp_change, reason)
if type(hp_change) ~= "number" then
local debuginfo = debug.getinfo(func)
local debuginfo = debug_getinfo(func)
error("The register_on_hp_changes function has to return a number at " ..
debuginfo.short_src .. " line " .. debuginfo.linedefined)
end
@@ -570,7 +571,7 @@ function core.register_on_player_hpchange(func, modifier)
end
core.callback_origins[func] = {
mod = core.get_current_modname() or "??",
name = debug.getinfo(1, "n").name or "??"
name = debug_getinfo(1, "n").name or "??"
}
end

View File

@@ -1,3 +1,246 @@
# textdomain: __builtin
Empty command.=Празна команда.
Invalid command: @1=Неприемлива команда: @1
Invalid command usage.=Неприемлива употреба на команда.
(@1 s)= (@1 сек)
Command execution took @1 s=Изпълнението на командата отне @1сек.
You don't have permission to run this command (missing privileges: @1).=Нямате права да изпълните тази команда (липсващи права: @1).
Unable to get position of player @1.=Неуспешно получаване на позицията на играч @1.
Incorrect area format. Expected: (x1,y1,z1) (x2,y2,z2)=Неправилен формат на област. Очаква се: (x1,y1,z1) (x2,y2,z2)
<action>=<действие>
Show chat action (e.g., '/me orders a pizza' displays '<player name> orders a pizza')=Показва действие в разговорите (напр. „/me поръчва пица“ показва „<име на играч> поръчва пица“)
Show the name of the server owner=Показва името на собственика на сървъра
The administrator of this server is @1.=Администраторът на този сървър е @1.
There's no administrator named in the config file.=Във файла с настройки не е зададен администратор.
@1 does not have any privileges.=@1 няма никакви права.
Privileges of @1: @2=Правата на @1: @2
[<name>]=[<име>]
Show privileges of yourself or another player=Показва вашите права или тези на друг играч
Player @1 does not exist.=Играчът @1 не съществува.
<privilege>=<права>
Return list of all online players with privilege=Показва списък на играчите на линия с дадени права
Invalid parameters (see /help haspriv).=Неприемливи параметри (вижте /help haspriv).
Unknown privilege!=Неизвестно право!
No online player has the "@1" privilege.=Няма играч на линия с правата „@1“.
Players online with the "@1" privilege: @2=Играчи на линия с правата „@1“: @2
Your privileges are insufficient.=Нямате достатъчно права.
Your privileges are insufficient. '@1' only allows you to grant: @2=Нямате достатъчно права. „@1“ ви позволява да давате само: @2
Unknown privilege: @1=Неизвестни права: @1
@1 granted you privileges: @2=@1 ви даде правото: @2
<name> (<privilege> [, <privilege2> [<...>]] | all)=<име> (<право> [, <право2> [<…>]] | all)
Give privileges to player=Дава права на играч
Invalid parameters (see /help grant).=Неприемливи параметри (вижте /help grant).
<privilege> [, <privilege2> [<...>]] | all=<право> [, <право2> [<…>]] | all
Grant privileges to yourself=Дава права на себе си
Invalid parameters (see /help grantme).=Неприемливи параметри (вижте /help grantme).
Your privileges are insufficient. '@1' only allows you to revoke: @2=Нямате достатъчно права. „@1“ ви позволява да отнемате само: @2
Note: Cannot revoke in singleplayer: @1=Забележка: Не може да отнемате права в режим един играч: @1
Note: Cannot revoke from admin: @1=Забележка: Не може да отнемате права на администратор: @1
No privileges were revoked.=Не са отнети права.
@1 revoked privileges from you: @2=@1 ви отне права: @2
Remove privileges from player=Отнема права от играч
Invalid parameters (see /help revoke).=Неприемливи параметри (вижте /help revoke).
Revoke privileges from yourself=Отнема права от себе си
Invalid parameters (see /help revokeme).=Неприемливи параметри (вижте /help revokeme).
<name> <password>=<име> <парола>
Set player's password (sent unencrypted, thus insecure)=Задава парола на играч (изпраща се нешифрована, следователно несигурно)
Name field required.=Полето за име е задължително.
Your password was cleared by @1.=Вашата парола е премахната от @1.
Password of player "@1" cleared.=Паролата на играч „@1“ е премахната.
Your password was set by @1.=Вашата парола е зададена от @1.
Password of player "@1" set.=Паролата на играча „@1“ е зададена.
<name>=<име>
Set empty password for a player=Задава празна парола на играч
Reload authentication data=Презарежда данните за удостоверяване
Done.=Готово.
Failed.=Грешка.
Remove a player's data=Премахва данните на играч
Player "@1" removed.=Играч „@1“ е премахнат.
No such player "@1" to remove.=Няма такъв играч „@1“, който да бъде премахнат.
Player "@1" is connected, cannot remove.=Играч „@1“ е свързан, не може да бъде премахнат.
Unhandled remove_player return code @1.=Неподдържан код на състояние remove_player @1.
Cannot teleport out of map bounds!=Не може да се телепортира извън границите на света!
Cannot get player with name @1.=Не може да бъде намерен играч с име @1.
Cannot teleport, @1 is attached to an object!=Не може да се телепортира, @1 е прикрепен към обект!
Teleporting @1 to @2.=Телепортиране на @1 до @2.
One does not teleport to oneself.=Не може да се телепортирате към себе си.
Cannot get teleportee with name @1.=Не може да бъде намерен телепортиран играч с име @1.
Cannot get target player with name @1.=Не може да бъде намерен целеви играч с име @1.
Teleporting @1 to @2 at @3.=Телепортиране на @1 до @2 на @3.
<X>,<Y>,<Z> | <to_name> | <name> <X>,<Y>,<Z> | <name> <to_name>=<X>,<Y>,<Z> | <до_име> | <име> <X>,<Y>,<Z> | <име> <до_име>
Teleport to position or player=Телепортира до координати или играч
You don't have permission to teleport other players (missing privilege: @1).=Нямате право да телепортирате други играчи (липсващи права: @1).
([-n] <name> <value>) | <name>=([-n] <име> <стойност>) | <име>
Set or read server configuration setting=Задава или извежда на екрата настройка на сървъра
Failed. Cannot modify secure settings. Edit the settings file manually.=Грешка! Настройките за сигурност не могат да бъдат променяни. Променете файла с настройки ръчно.
Failed. Use '/set -n <name> <value>' to create a new setting.=Грешка! Използвайте „/set -n <име> <стойност>“, за да създадете нова настройка.
@1 @= @2=@1 @= @2
<not set>=<не е зададено>
Invalid parameters (see /help set).=Неприемливи параметри (вижте /help set).
Finished emerging @1 blocks in @2ms.=Зареждането на @1 блока завърши за @2 мс.
emergeblocks update: @1/@2 blocks emerged (@3%)=обновяване на emergeblocks: @1/@2 блока заредени (@3%)
(here [<radius>]) | (<pos1> <pos2>)=(тук [<радиус>]) | (<коорд1> <коорд2>)
Load (or, if nonexistent, generate) map blocks contained in area pos1 to pos2 (<pos1> and <pos2> must be in parentheses)=Зарежда (или ако липсват, генерира) блокове от света в областта от коорд1 до коорд2 (<коорд1> и <коорд2> трябва да са в скоби)
Started emerge of area ranging from @1 to @2.=Започна зареждане на областта от @1 до @2.
Delete map blocks contained in area pos1 to pos2 (<pos1> and <pos2> must be in parentheses)=Премахва блокове от света в областта от коорд1 до коорд2 (<коорд1> и <коорд2> трябва да са в скоби)
Successfully cleared area ranging from @1 to @2.=Успешно изчистена област от @1 до @2.
Failed to clear one or more blocks in area.=Неуспешно изчистване на един или повече блока в областта.
Resets lighting in the area between pos1 and pos2 (<pos1> and <pos2> must be in parentheses)=Нулира осветлението в областта между коорд1 и коорд2 (<коорд1> и <коорд2> трябва да са в скоби)
Successfully reset light in the area ranging from @1 to @2.=Успешно нулирано осветление в област от @1 до @2.
Failed to load one or more blocks in area.=Неуспешно зареждане на един или повече блока в областта.
List mods installed on the server=Показва списък с модификациите, инсталирани на сървъра
No mods installed.=Няма инсталирани модификации.
Cannot give an empty item.=Не може да бъде даден празен предмет.
Cannot give an unknown item.=Не може да бъде даден неизвестен предмет.
Giving 'ignore' is not allowed.=Не е позволено да бъде даван „ignore“.
@1 is not a known player.=@1 не е известен играч.
@1 partially added to inventory.=@1 частично добавен в инвентара.
@1 could not be added to inventory.=@1 не може да бъде добавен в инвентара.
@1 added to inventory.=@1 добавен в инвентара.
@1 partially added to inventory of @2.=@1 частично добавен в инвентара на @2.
@1 could not be added to inventory of @2.=@1 не може да бъде добавен в инвентара на @2.
@1 added to inventory of @2.=@1 добавен в инвентара на @2.
<name> <ItemString> [<count> [<wear>]]=<име> <име-на-предмет> [<брой> [<износване>]]
Give item to player=Дава предмет на играч
Name and ItemString required.=Изисква се име и име-на-предмет.
<ItemString> [<count> [<wear>]]=<име-на-предмет> [<брой> [<износване>]]
Give item to yourself=Дава предмет на себе си
ItemString required.=Изисква се име-на-предмет.
<EntityName> [<X>,<Y>,<Z>]=<име-на-същество> [<X>,<Y>,<Z>]
Spawn entity at given (or your) position=Създава същество на дадена (или вашата) позиция
EntityName required.=Изисква се име-на-същество.
Unable to spawn entity, player is nil.=Неуспешно създаване на същество, играчът е null.
Cannot spawn an unknown entity.=Не може да бъде създадено неизвестно същество.
Invalid parameters (@1).=Неприемливи параметри (@1).
@1 spawned.=@1 е създаден.
@1 failed to spawn.=@1 не можа да бъде създаден.
Destroy item in hand=Унищожава предмета в ръката
Unable to pulverize, no player.=Неуспешно смачкване, няма играч.
Unable to pulverize, no item in hand.=Неуспешно смачкване, няма предмет в ръката.
An item was pulverized.=Предмет беше смачкан.
[<range>] [<seconds>] [<limit>]=[<обхват>] [<секунди>] [<ограничение>]
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. Set <seconds> to inf for no time limit=Проверява кой последно е докоснал възел или близък възел в рамките на времето, зададено от <секунди>. По подразбиране: обхват @= 0, секунди @= 86400 @= 24ч, ограничение @= 5. Задайте <секунди> на inf за без ограничение.
Rollback functions are disabled.=Функциите за отменяне на действия са изключени.
That limit is too high!=Ограничението е твърде голямо!
Checking @1 ...=Проверка @1…
Nobody has touched the specified location in @1 seconds.=Никой не е докосвал указаното място през последните @1 секунди.
@1 @2 @3 -> @4 @5 seconds ago.=@1 @2 @3 -> @4 преди @5 секунди.
Punch a node (range@=@1, seconds@=@2, limit@=@3).=Удар на възел (обхват@=@1, секунди@=@2, ограничение@=@3).
(<name> [<seconds>]) | (:<actor> [<seconds>])=(<име> [<секунди>]) | (:<променящ> [<секунди>])
Revert actions of a player. Default for <seconds> is 60. Set <seconds> to inf for no time limit=Отменя действията на играч. По подразбиране <секунди> е 60. Задайте <секунди> на inf за без ограничение.
Invalid parameters. See /help rollback and /help rollback_check.=Неприемливи параметри. Вижте /help rollback и /help rollback_check.
Reverting actions of player '@1' since @2 seconds.=Отменяне действията на играча „@1“ отпреди @2 секунди.
Reverting actions of @1 since @2 seconds.=Отменяне действията на @1 отпреди @2 секунди.
(log is too long to show)=(дневникът е твърде дълъг, за да бъде показан)
Reverting actions succeeded.=Действията са отменени.
Reverting actions FAILED.=Грешка при отменяне на действията.
Show server status=Показва състоянието на сървъра
This command was disabled by a mod or game.=Тази команда е изключена от модификация или игра.
[<0..23>:<0..59> | <0..24000>]=[<0..23>:<0..59> | <0..24000>]
Show or set time of day=Показва или задава часа на деня
Current time is @1:@2.=Текущото време е @1:@2.
You don't have permission to run this command (missing privilege: @1).=Нямате право да изпълните тази команда (липсващи права: @1).
Invalid time (must be between 0 and 24000).=Неправилно време (трябва да бъде между 0 и 24000).
Time of day changed.=Часът на деня е променен.
Invalid hour (must be between 0 and 23 inclusive).=Неверен час (трябва да бъде между 0 и 23 включително).
Invalid minute (must be between 0 and 59 inclusive).=Невярна минута (трябва да бъде между 0 и 59 включително).
Show day count since world creation=Показва броя дни от създаването на света
Current day is @1.=Текущият ден е @1.
[<delay_in_seconds> | -1] [-r] [<message>]=[<забавяне_в_секунди> | -1] [-r] [<съобщение>]
Shutdown server (-1 cancels a delayed shutdown, -r allows players to reconnect)=Изключва сървъра (-1 отменя забавено спиране, -r позволява на играчите повторно да се свързват)
Server shutting down (operator request).=Сървърът се изключва (по искане на оператор).
Ban the IP of a player or show the ban list=Забранява играч/IP или извежда списък със забранените
The ban list is empty.=Списъкът със забранени е празен.
Ban list: @1=Списък със забранени: @1
You cannot ban players in singleplayer!=Не можете да забраните играчи в режим един играч!
Player is not online.=Играчът не е на линия.
Failed to ban player.=Грешка при забраняване на играч.
Banned @1.=Играчът @1 е забранен.
<name> | <IP_address>=<име> | <IP_адрес>
Remove IP ban belonging to a player/IP=Премахва забрана по IP на играч/IP.
Failed to unban player/IP.=Грешка при премахване забраната на играч/IP.
Unbanned @1.=Премахната забрана на @1.
<name> [<reason>]=<име> [<причина>]
Kick a player=Изгонва играч
Failed to kick player @1.=Грешка при изгонване на играча @1.
Kicked @1.=Играчът @1 е изгонен.
[full | quick]=[пълно | бързо]
Clear all objects in world=Премахва всички обекти в света
Invalid usage, see /help clearobjects.=Неприемливи параметри. Вижте /help clearobjects.
Clearing all objects. This may take a long time. You may experience a timeout. (by @1)=Премахване на всички обекти. Може да отнеме време. Може и времето за връзка да изтече. (by @1)
Cleared all objects.=Премахнати са всички обекти.
<name> <message>=<име> <съобщение>
Send a direct message to a player=Изпраща лично съобщение на играч
Invalid usage, see /help msg.=Неприемливи параметри. Вижте /help msg.
The player @1 is not online.=Играчът @1 не е на линия.
DM from @1: @2=ЛС от @1: @2
DM sent to @1: @2=ЛС изпратено до @1: @2
Get the last login time of a player or yourself=Получава последното влизане на играч или себе си
@1's last login time was @2.=Последното влизане на @1 е @2.
@1's last login time is unknown.=Последното влизане на @1 е неизвестно.
Clear the inventory of yourself or another player=Изчиства инвентара на друг играч или вас
You don't have permission to clear another player's inventory (missing privilege: @1).=Нямате право да изчиствате инвентара на друг играч (липсващи права: @1).
@1 cleared your inventory.=@1 изчисти вашия инвентар.
Cleared @1's inventory.=Инвентарът на @1 е изчистен.
Player must be online to clear inventory!=Играчът трябва да е онлайн, за да изчистите инвентара му!
Players can't be killed, damage has been disabled.=Играчите не могат да бъдат убивани, щетите са изключени.
Player @1 is not online.=Играчът @1 не е на линия.
You are already dead.=Вече сте мъртви.
@1 is already dead.=@1 вече е мъртъв.
@1 has been killed.=@1 е убит.
Kill player or yourself=Убива играч или себе си
Invalid parameters (see /help @1).=Неприемливи параметри (вижте /help @1).
Too many arguments, try using just /help <command>=Твърде много аргументи, опитайте /help <команда>
Available commands: @1=Достъпни команди: @1
Use '/help <cmd>' to get more information, or '/help all' to list everything.=Използвайте „/help <cmd>“, за да получите повече информация, или „/help all“, за да видите списък с всички команди.
Available commands:=Достъпни команди:
Command not available: @1=Командата не е достъпна: @1
[all | privs | <cmd>] [-t]=[all | privs | <команда>] [-t]
Get help for commands or list privileges (-t: output in chat)=Получава помощ за команди или списък с права (-t: извежда в панела за разговори)
Available privileges:=Достъпни права:
You died=Умряхте
Respawn=Прераждане
Command=Команда
Parameters=Параметри
For more information, click on any entry in the list.=За повече информация щракнете върху елемент от списъка.
Double-click to copy the entry to the chat history.=Двоен клик за копиране на елемента в историята на разговори.
Command: @1 @2=Команда: @1 @2
Available commands: (see also: /help <cmd>)=Достъпни команди: (вижте /help <команда>)
Close=Затваряне
Privilege=Права
Description=Описание
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=Управлява инструмента за профилиране и данните от него. Може да изведе в панела за разговори (print), в дневника (dump) или във файл в света (save). Форматът може да бъде txt, csv, lua, json, json_pretty (структурите може да бъдат променени). Филтърът е шаблон на lua за ограничаване на изхода до съвпадащи имена на модификации.
Statistics written to action log.=Статистиката е записана в дневника.
Statistics were reset.=Статистиката е нулирана.
@1 joined the game.=@1 се присъедини.
@1 left the game.=@1 напусна играта.
@1 left the game (timed out).=@1 напусна играта (изтекло време).
(no description)=(няма описание)
Can interact with things and modify the world=Може да взаимодейства с неща и променя света
Can speak in chat=Може да пише съобщения
Can modify basic privileges (@1)=Може да променя основните права (@1)
Can modify privileges=Може да променя права
Can teleport self=Може да телепортира себе си
Can teleport other players=Може да телепортира играчи
Can set the time of day using /time=Може да задава часа през деня чрез /time
Can do server maintenance stuff=Може да извършва поддръжка на сървъра
Can bypass node protection in the world=Може да заобикаля защитата на възли в света
Can ban and unban players=Може да забранява и разрешава играчи
Can kick players=Може да изгонва играчи
Can use /give and /giveme=Може да използва /give и /giveme
Can use /setpassword and /clearpassword=Може да използва /setpassword и /clearpassword
Can use fly mode=Може да използва режим на летене
Can use fast mode=Може да използва режим на бързо придвижване
Can fly through solid nodes using noclip mode=Може да преминава през твърди възли в режим „без изрязване“
Can use the rollback functionality=Може да използва възможността за отменяне на действия
Can enable wireframe=Може да включва телени рамки
Unknown Item=Неизвестен предмет
Air=Въздух
Ignore=Пренебрегване
You can't place 'ignore' nodes!=Не можете да поставяте възли „пренебрегване“!
Values below show absolute/relative times spend per server step by the instrumented function.=Стойностите по-долу показват абсолютното/относителното време за всяка стъпка на сървъра от замерваната функция.
A total of @1 sample(s) were taken.=Взети са общи @1 проби.
The output is limited to '@1'.=Изходът е ограничен до „@1“.
Saving of profile failed: @1=Грешка при запазване на профила: @1
Profile saved to @1=Профилът е запазен в @1

View File

@@ -236,6 +236,7 @@ Air=Luft
Ignore=Ignorieren
You can't place 'ignore' nodes!=Sie können keine „ignore“-Blöcke platzieren!
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<Filter>] | dump [<Filter>] | save [<Format> [<Filter>]] | reset
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=Den Profiler benutzen und mit Profiling-Daten arbeiten. Kann in den Chat (print), in das Action-Protokoll (dump) oder in eine Datei in der Welt (save) ausgeben. Das Format kann „txt“, „csv“, „lua“, „json“ oder „json_pretty“ sein (die Strukturen könnten sich in Zukunft ändern). Filter ist ein Lua-Pattern, das benutzt wird, um die Ausgabe auf passende Modnamen einzuschränken.
Statistics written to action log.=Statistiken zum Aktionsprotokoll geschrieben.
Statistics were reset.=Statistiken wurden zurückgesetzt.
Values below show absolute/relative times spend per server step by the instrumented function.=Die unten angegebenen Werte zeigen absolute/relative Zeitspannen, die je Server-Step von der instrumentierten Funktion in Anspruch genommen wurden.

View File

@@ -192,6 +192,7 @@ Send a direct message to a player=Sendu rekte privatan mesaĝon al ludanto
Invalid usage, see /help msg.=Nevalida uzo, vidu /help msg.
The player @1 is not online.=La ludanto @1 ne ĉeretas.
DM from @1: @2=Privata mesaĝo de @1: @2
DM sent to @1: @2=
Get the last login time of a player or yourself=Vidi la lastan salutotempon de ludanto, aŭ vi mem
@1's last login time was @2.=Lasta salutotempo de @1 estas @2.
@1's last login time is unknown.=Lasta salutotempo de @1 estas nesciata.
@@ -235,6 +236,7 @@ Air=Aero
Ignore=Malatenti
You can't place 'ignore' nodes!=Vi ne povas meti «malatentajn» monderojn!
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtrilo>] | dump [<filtrilo>] | save [<formo> [<filtrilo>]] | reset
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
Statistics written to action log.=Analizoj skribitaj al agoprotokolo.
Statistics were reset.=Analizoj forviŝitaj.
Values below show absolute/relative times spend per server step by the instrumented function.=Valoroj subaj montras la malrelativan/relativan tempon pasigitan de la servilo je ĉiu paŝo de la funkcio.

View File

@@ -192,6 +192,7 @@ Send a direct message to a player=Envoyer un message privé à un joueur.
Invalid usage, see /help msg.=Usage invalide, voir /help msg.
The player @1 is not online.=Le joueur @1 n'est pas en ligne.
DM from @1: @2=Message privé de @1 : @2
DM sent to @1: @2=
Get the last login time of a player or yourself=Obtenir l'horodatage de la dernière connexion d'un joueur ou de vous-même.
@1's last login time was @2.=@1 s'est connecté pour la dernière fois au @2.
@1's last login time is unknown.=L'horodatage de la dernière connexion de @1 est inconnu.
@@ -235,6 +236,7 @@ Air=Air
Ignore=Ignorer
You can't place 'ignore' nodes!=Vous ne pouvez pas placé de nœuds 'ignorés' !
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtre>] | dump [<filtre>] | save [<format> [<filtre>]] | reset
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
Statistics written to action log.=Les statistiques sont écrites dans les journaux d'actions.
Statistics were reset.=Les statistiques ont été réinitialisées.
Values below show absolute/relative times spend per server step by the instrumented function.=Les valeurs inférieures affichent les temps absolu et relatif dépensés par étape du serveur par la fonction utilisée.

View File

@@ -192,6 +192,7 @@ Send a direct message to a player=Kirim pesan langsung kepada pemain
Invalid usage, see /help msg.=Penggunaan tidak sah. Lihat /help msg.
The player @1 is not online.=Pemain @1 tidak daring.
DM from @1: @2=Pesan langsung dari @1: @2
DM sent to @1: @2=
Get the last login time of a player or yourself=Ambil waktu masuk terakhir pemain atau diri Anda
@1's last login time was @2.=Waktu masuk terakhir @1 adalah @2.
@1's last login time is unknown.=Waktu masuk terakhir @1 tidak diketahui.
@@ -235,6 +236,7 @@ Air=Udara
Ignore=Ignore
You can't place 'ignore' nodes!=Anda tidak dapat menaruh nodus 'ignore'!
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
Statistics written to action log.=Statistik ditulis ke log action.
Statistics were reset.=Statistik diatur ulang.
Values below show absolute/relative times spend per server step by the instrumented function.=Nilai berikut menampilkan waktu mutlak/relatif yang dihabiskan tiap langkah server oleh fungsi instrumen.

View File

@@ -193,6 +193,7 @@ Send a direct message to a player=Invia un messaggio privato a unə giocatore
Invalid usage, see /help msg.=Uso incorretto, vedi /help msg
The player @1 is not online.=Lə giocatore @1 non è connessə.
DM from @1: @2=Messaggio privato da @1: @2
DM sent to @1: @2=
Get the last login time of a player or yourself=Ritorna l'ultimo accesso di unə giocatore o di te stessǝ
@1's last login time was @2.=L'ultimo accesso di @1 è avvenuto il @2.
@1's last login time is unknown.=L'ultimo accesso di @1 è ignoto.
@@ -236,6 +237,7 @@ Air=Aria
Ignore=Ignora
You can't place 'ignore' nodes!=Non puoi piazzare nodi 'ignore'!
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtro>] | dump [<filtro>] | save [<formato> [<filtro>]] | reset
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
Statistics written to action log.=Statistiche scritte nel registro delle azioni.
Statistics were reset.=Le statistiche sono state resettate.
Values below show absolute/relative times spend per server step by the instrumented function.=I valori sottostanti mostrano i tempi assoluti/relativi impiegati su ogni singolo step dalla funzione analizzata

View File

@@ -192,6 +192,7 @@ Send a direct message to a player=Menghantar mesej terus kepada seorang pemain
Invalid usage, see /help msg.=Kegunaan tidak sah, sila lihat /help msg.
The player @1 is not online.=Pemain @1 tidak berada dalam talian.
DM from @1: @2=DM daripada @1: @2
DM sent to @1: @2=
Get the last login time of a player or yourself=Dapatkan waktu log masuk terakhir bagi seorang pemain atau diri sendiri
@1's last login time was @2.=Waktu log masuk terakhir @1 ialah pada @2.
@1's last login time is unknown.=Waktu log masuk terakhir @1 tidak diketahui.
@@ -235,6 +236,7 @@ Air=Udara
Ignore=Abai
You can't place 'ignore' nodes!=Anda tidak boleh meletakkan nod 'abai'!
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<tapisan>] | dump [<tapisan>] | save [<format> [<tapisan>]] | reset
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
Statistics written to action log.=Statistik telah ditulis ke log perlakuan.
Statistics were reset.=Statistik telah ditetapkan semula.
Values below show absolute/relative times spend per server step by the instrumented function.=Nilai di bawah menunjukkan masa mutlak/relatif yang digunakan oleh fungsi yang dipasangkan pada setiap langkah pelayan

View File

@@ -192,6 +192,7 @@ Send a direct message to a player=Enviar uma mensagem direta a um jogador
Invalid usage, see /help msg.=Uso inválido, veja /help msg.
The player @1 is not online.=O jogador @1 não está online.
DM from @1: @2=DM de @1: @2
DM sent to @1: @2=
Get the last login time of a player or yourself=Pegue o último horário de login de um jogador ou de você mesmo
@1's last login time was @2.=O último login de @1 foi às @2.
@1's last login time is unknown.=O último login de @1 é desconhecido.
@@ -235,6 +236,7 @@ Air=Ar
Ignore=Ignorar
You can't place 'ignore' nodes!=Você não pode colocar nós 'ignorar'!
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtro>] | dump [<filtro>] | save [<formato> [<filtro>]] | reset
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
Statistics written to action log.=Estatísticas salvas no log de ações.
Statistics were reset.=As estatísticas foram redefinidas.
Values below show absolute/relative times spend per server step by the instrumented function.=Os valores abaixo mostram os tempos absolutos/relativos gastos por etapa do servidor pela função instrumentada.

View File

@@ -192,6 +192,7 @@ Send a direct message to a player=Отправить прямое сообщен
Invalid usage, see /help msg.=Недопустимое использование, см. /help msg.
The player @1 is not online.=Игрок @1 не находится в игре.
DM from @1: @2=DM от @1: @2
DM sent to @1: @2=
Get the last login time of a player or yourself=Вывести время последнего входа игрока или своё
@1's last login time was @2.=Время последнего входа @1: @2.
@1's last login time is unknown.=Время последнего входа @1 неизвестно.
@@ -235,6 +236,7 @@ Air=Воздух
Ignore=Игнорируемая встроенная нода (":ignore")
You can't place 'ignore' nodes!=Вы не можете установить ноду 'ignore'!
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
Statistics written to action log.=Статистика записывается в журнал действий.
Statistics were reset.=Статистика была сброшена.
Values below show absolute/relative times spend per server step by the instrumented function.=Приведенные ниже значения показывают абсолютное/относительное время, затрачиваемое функцией на каждый шаг сервера.

View File

@@ -12,7 +12,7 @@
"v-rob <robinsonvincent89@gmail.com>",
"Desour/DS",
"srifqi",
"Gregor Parzefall (grorp)",
"grorp",
"Lars Müller (luatic)",
"cx384",
"sfence",
@@ -47,14 +47,11 @@
],
"#": "For updating active/previous contributors, see the script in ./util/gather_git_credits.py",
"contributors": [
"Erich Schubert",
"Lucas OH",
"Xeno333",
"Miguel P.L",
"siliconsniffer",
"JosiahWI"
"Xeno333"
],
"previous_contributors": [
"Wuzzy (Wuzzy2)",
"Ælla Chiana Moskopp (erle) <erle@dieweltistgarnichtso.net> [Logo]",
"numzero",
"red-001 <red-001@outlook.ie>",
@@ -66,6 +63,7 @@
"Jean-Patrick Guerrero (kilbith)",
"MoNTE48",
"Constantin Wenger (SpeedProg)",
"JosiahWI",
"Ciaran Gultnieks (CiaranG)",
"ROllerozxa",
"Paul Ouellette (pauloue)",

View File

@@ -96,6 +96,8 @@ local function create_world_formspec(dialogdata)
if game ~= nil then
local gameconfig = Settings(game.path.."/game.conf")
current_mg = current_mg or gameconfig:get("default_mapgen") or core.settings:get("mg_name")
local allowed_mapgens = (gameconfig:get("allowed_mapgens") or ""):split()
for key, value in pairs(allowed_mapgens) do
allowed_mapgens[key] = value:trim()
@@ -456,7 +458,6 @@ function create_create_world_dlg()
worldname = "",
-- settings the world is created with:
seed = core.settings:get("fixed_map_seed") or "",
mg = core.settings:get("mg_name"),
flags = {
main = core.settings:get_flags("mg_flags"),
v5 = core.settings:get_flags("mgv5_spflags"),

View File

@@ -2,7 +2,6 @@
-- Copyright (C) 2013 sapier
-- SPDX-License-Identifier: LGPL-2.1-or-later
mm_game_theme = {}
--------------------------------------------------------------------------------
@@ -21,7 +20,7 @@ function mm_game_theme.set_engine(hide_decorations)
core.set_topleft_text("")
local have_bg = false
local have_bg = false
local have_overlay = mm_game_theme.set_engine_single("overlay")
if not have_overlay then
@@ -58,7 +57,7 @@ function mm_game_theme.set_game(gamedetails)
core.set_topleft_text(gamedetails.name)
local have_bg = false
local have_bg = false
local have_overlay = mm_game_theme.set_game_single("overlay", gamedetails)
if not have_overlay then
@@ -83,17 +82,25 @@ end
--------------------------------------------------------------------------------
function mm_game_theme.clear_single(identifier)
core.set_background(identifier,"")
core.set_background(identifier, "")
end
--------------------------------------------------------------------------------
local valid_image_extensions = {
".png",
".jpg",
".jpeg",
}
--------------------------------------------------------------------------------
function mm_game_theme.set_engine_single(identifier)
--try texture pack first
if mm_game_theme.texturepack ~= nil then
local path = mm_game_theme.texturepack .. DIR_DELIM .."menu_" ..
identifier .. ".png"
if core.set_background(identifier,path) then
return true
for _, extension in pairs(valid_image_extensions) do
local path = mm_game_theme.texturepack .. DIR_DELIM .. "menu_" .. identifier .. extension
if core.set_background(identifier, path) then
return true
end
end
end
@@ -106,49 +113,53 @@ function mm_game_theme.set_engine_single(identifier)
end
--------------------------------------------------------------------------------
function mm_game_theme.set_game_single(identifier, gamedetails)
assert(gamedetails ~= nil)
if mm_game_theme.texturepack ~= nil then
local path = mm_game_theme.texturepack .. DIR_DELIM ..
gamedetails.id .. "_menu_" .. identifier .. ".png"
function mm_game_theme.set_game_single(identifier, gamedetails)
local extensions_randomised = table.copy(valid_image_extensions)
table.shuffle(extensions_randomised)
for _, extension in pairs(extensions_randomised) do
assert(gamedetails ~= nil)
if mm_game_theme.texturepack ~= nil then
local path = mm_game_theme.texturepack .. DIR_DELIM .. gamedetails.id .. "_menu_" .. identifier .. extension
if core.set_background(identifier, path) then
return true
end
end
-- Find out how many randomized textures the game provides
local n = 0
local filename
local menu_files = core.get_dir_list(gamedetails.path .. DIR_DELIM .. "menu", false)
for i = 1, #menu_files do
filename = identifier .. "." .. i .. extension
if table.indexof(menu_files, filename) == -1 then
n = i - 1
break
end
end
-- Select random texture, 0 means standard texture
n = math.random(0, n)
if n == 0 then
filename = identifier .. extension
else
filename = identifier .. "." .. n .. extension
end
local path = gamedetails.path .. DIR_DELIM .. "menu" .. DIR_DELIM .. filename
if core.set_background(identifier, path) then
return true
end
end
-- Find out how many randomized textures the game provides
local n = 0
local filename
local menu_files = core.get_dir_list(gamedetails.path .. DIR_DELIM .. "menu", false)
for i = 1, #menu_files do
filename = identifier .. "." .. i .. ".png"
if table.indexof(menu_files, filename) == -1 then
n = i - 1
break
end
end
-- Select random texture, 0 means standard texture
n = math.random(0, n)
if n == 0 then
filename = identifier .. ".png"
else
filename = identifier .. "." .. n .. ".png"
end
local path = gamedetails.path .. DIR_DELIM .. "menu" ..
DIR_DELIM .. filename
if core.set_background(identifier, path) then
return true
end
return false
end
--------------------------------------------------------------------------------
function mm_game_theme.set_dirt_bg()
if mm_game_theme.texturepack ~= nil then
local path = mm_game_theme.texturepack .. DIR_DELIM .."default_dirt.png"
local path = mm_game_theme.texturepack .. DIR_DELIM .. "default_dirt.png"
if core.set_background("background", path, true, 128) then
return true
end

View File

@@ -5,6 +5,7 @@
local format, ipairs, type = string.format, ipairs, type
local core, get_current_modname = core, core.get_current_modname
local profiler, sampler = ...
local debug_getinfo = debug.getinfo
local instrument_builtin = core.settings:get_bool("instrument.builtin", false)
@@ -67,7 +68,7 @@ local worldmods_path = regex_escape(core.get_worldpath())
local user_path = regex_escape(core.get_user_path())
local builtin_path = regex_escape(core.get_builtin_path())
local function generate_source_location(def)
local info = debug.getinfo(def.func)
local info = debug_getinfo(def.func)
local modpath = regex_escape(core.get_modpath(def.mod) or "")
local source = info.source
if modpath ~= "" then

View File

@@ -40,6 +40,7 @@
# `type_args` can be:
# * int:
# - default
# - default min
# - default min max
# * string:
# - default (if default is not specified then "" is set)
@@ -47,8 +48,10 @@
# - default
# * float:
# - default
# - default min
# - default min max
# * enum:
# Empty string "" is a valid enum value
# - default value1,value2,...
# * path:
# - default (if default is not specified then "" is set)
@@ -431,7 +434,6 @@ window_maximized (Window maximized) bool false
# Save window size automatically when modified.
# If true, screen size is saved in screen_w and screen_h, and whether the window
# is maximized is stored in window_maximized.
# (Autosaving window_maximized only works if compiled with SDL.)
#
# Requires: desktop
autosave_screensize (Remember screen size) bool true
@@ -611,19 +613,22 @@ anisotropic_filter (Anisotropic filtering) bool false
# Also, if Post Processing is disabled, FSAA will not work together with
# undersampling or a non-default "3d_mode" setting.
#
# * FXAA - Fast approximate antialiasing
# Applies a post-processing filter to detect and smoothen high-contrast edges.
# Provides balance between speed and image quality.
#
# * SSAA - Super-sampling antialiasing
# Renders higher-resolution image of the scene, then scales down to reduce
# the aliasing effects. This is the slowest and the most accurate method.
antialiasing (Antialiasing method) enum none none,fsaa,fxaa,ssaa
antialiasing (Antialiasing method) enum none none,fsaa,ssaa
# Defines the size of the sampling grid for FSAA and SSAA antialiasing methods.
# Value of 2 means taking 2x2 = 4 samples.
fsaa (Anti-aliasing scale) enum 2 2,4,8,16
# Applies a post-processing filter to detect and smoothen high-contrast edges.
# Provides balance between speed and image quality.
# fxaa can used in combination with the other anti-aliasing methods
#
# Requires: enable_post_processing
fxaa (Fast approximate antialiasing) bool false
[**Occlusion Culling]
# Type of occlusion_culler
@@ -866,7 +871,7 @@ formspec_fullscreen_bg_color (Formspec Full-Screen Background Color) string (0,0
gui_scaling_filter (GUI scaling filter) bool false
# Delay showing tooltips, stated in milliseconds.
tooltip_show_delay (Tooltip delay) int 400 0 18446744073709551615
tooltip_show_delay (Tooltip delay) int 400 0
# Append item name to tooltip.
tooltip_append_itemname (Append item name) bool false
@@ -1052,10 +1057,6 @@ anticheat_flags (Anticheat flags) flags digging,interaction,movement digging,int
# Increase the value if players experience stuttery movement.
anticheat_movement_tolerance (Anticheat movement tolerance) float 1.0 1.0
# If enabled, actions are recorded for rollback.
# This option is only read when server starts.
enable_rollback_recording (Rollback recording) bool false
[**Client-side Modding]
# Restricts the access of certain client-side functions on servers.
@@ -1078,7 +1079,7 @@ csm_restriction_noderange (Client-side node lookup range restriction) int 0 0 42
# 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
strip_color_codes (Strip color codes) bool true
# Set the maximum length of a chat message (in characters) sent by clients.
chat_message_max_size (Chat message max length) int 500 10 65535
@@ -2052,6 +2053,10 @@ world_aligned_mode (World-aligned textures mode) enum enable disable,enable,forc
# Warning: This option is EXPERIMENTAL!
autoscale_mode (Autoscaling mode) enum disable disable,enable,force
# Caps the maximum number of layers used with array textures (if supported).
# This is only useful for debugging.
array_texture_max (Array texture max layers) int 65535 0 65535
# When using bilinear/trilinear filtering, low-resolution textures
# can be blurred, so this option automatically upscales them to preserve
# crisp pixels. This defines the minimum texture size for the upscaled textures;
@@ -2204,10 +2209,10 @@ client_mapblock_limit (Mapblock limit) [client] int 7500 -1 2147483647
# Maximum number of blocks that are simultaneously sent per client.
# The maximum total count is calculated dynamically:
# max_total = ceil((#clients + max_users) * per_client / 4)
max_simultaneous_block_sends_per_client (Maximum simultaneous block sends per client) [server] int 40 1 4294967295
max_simultaneous_block_sends_per_client (Maximum simultaneous block sends per client) [server] int 40 1
# To reduce lag, block transfers are slowed down when a player is building something.
# This determines how long they are slowed down after placing or removing a node.
# To save bandwidth, block transfers are slowed down when a player is building something.
# This determines how long the throttling lasts after placing a node.
full_block_send_enable_min_time_from_building (Delay in sending blocks after building) [server] float 2.0 0.0
# Maximum number of packets sent per send step in the low-level networking code.
@@ -2240,6 +2245,11 @@ kick_msg_crash (Crash message) string This server has experienced an internal er
# Set this to true if your server is set up to restart automatically.
ask_reconnect_on_crash (Ask to reconnect after crash) bool false
# If enabled, node and inventory actions are recorded for rollback.
# This option is only read on server start. Note that the engine will not
# automatically clean old entries from the rollback database.
enable_rollback_recording (Rollback recording) bool false
[**Server/Env Performance] [server]
# Length of a server tick (the interval at which everything is generally updated),

View File

@@ -6,7 +6,7 @@ uniform sampler2D textureFlags;
#define rightImage normalTexture
#define maskImage textureFlags
varying mediump vec4 varTexCoord;
VARYING_ mediump vec4 varTexCoord;
void main(void)
{

View File

@@ -1,4 +1,4 @@
varying mediump vec4 varTexCoord;
VARYING_ mediump vec4 varTexCoord;
void main(void)
{

View File

@@ -5,11 +5,7 @@
uniform sampler2D rendered;
uniform vec2 texelSize0;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
void main(void)
{

View File

@@ -1,8 +1,4 @@
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
void main(void)
{

View File

@@ -6,11 +6,7 @@ uniform sampler2D previous;
uniform vec2 texelSize0;
uniform mediump float bloomRadius;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
void main(void)
{

View File

@@ -1,8 +1,4 @@
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
void main(void)
{

View File

@@ -5,11 +5,7 @@ uniform vec2 texelSize0;
uniform mediump float bloomRadius;
uniform mat3 bloomBlurWeights;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
// smoothstep - squared
float smstsq(float f)

View File

@@ -1,8 +1,4 @@
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
void main(void)
{

View File

@@ -5,11 +5,7 @@ uniform vec2 texelSize0;
uniform mediump float bloomRadius;
uniform mat3 bloomBlurWeights;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
// smoothstep - squared
float smstsq(float f)

View File

@@ -1,8 +1,4 @@
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
void main(void)
{

View File

@@ -1,9 +1,9 @@
uniform lowp vec4 fogColor;
uniform float fogDistance;
uniform float fogShadingParameter;
varying highp vec3 eyeVec;
VARYING_ highp vec3 eyeVec;
varying lowp vec4 varColor;
VARYING_ lowp vec4 varColor;
void main(void)
{

View File

@@ -1,8 +1,8 @@
uniform lowp vec4 materialColor;
varying lowp vec4 varColor;
VARYING_ lowp vec4 varColor;
varying highp vec3 eyeVec;
VARYING_ highp vec3 eyeVec;
void main(void)
{

View File

@@ -8,14 +8,10 @@ uniform sampler2D rendered;
uniform mediump float bloomStrength;
uniform ExposureParams exposureParams;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
#ifdef ENABLE_AUTO_EXPOSURE
varying float exposure; // linear exposure factor, see vertex shader
VARYING_ float exposure; // linear exposure factor, see vertex shader
#endif
void main(void)

View File

@@ -3,14 +3,10 @@
uniform sampler2D exposureMap;
varying float exposure;
VARYING_ float exposure;
#endif
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
void main(void)

View File

@@ -3,16 +3,12 @@
uniform sampler2D rendered;
uniform vec2 texelSize0;
varying vec2 sampleNW;
varying vec2 sampleNE;
varying vec2 sampleSW;
varying vec2 sampleSE;
VARYING_ vec2 sampleNW;
VARYING_ vec2 sampleNE;
VARYING_ vec2 sampleSW;
VARYING_ vec2 sampleSE;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
/**
Basic FXAA implementation based on the code on geeks3d.com with the
@@ -63,7 +59,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,
vec2 v_rgbNW, vec2 v_rgbNE,
vec2 v_rgbSW, vec2 v_rgbSE,
vec2 v_rgbM) {
vec2 v_rgbM)
{
vec4 color;
vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;
vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;

View File

@@ -1,15 +1,11 @@
uniform vec2 texelSize0;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
varying vec2 sampleNW;
varying vec2 sampleNE;
varying vec2 sampleSW;
varying vec2 sampleSE;
VARYING_ vec2 sampleNW;
VARYING_ vec2 sampleNE;
VARYING_ vec2 sampleSW;
VARYING_ vec2 sampleSE;
/*
Based on

View File

@@ -0,0 +1,37 @@
#ifdef USE_ARRAY_TEXTURE
uniform mediump sampler2DArray baseTexture;
#else
uniform sampler2D baseTexture;
#endif
VARYING_ vec3 vNormal;
VARYING_ vec3 vPosition;
CENTROID_ VARYING_ lowp vec4 varColor;
CENTROID_ VARYING_ mediump vec2 varTexCoord;
CENTROID_ VARYING_ float varTexLayer; // actually int
void main(void)
{
vec2 uv = varTexCoord.st;
#ifdef USE_ARRAY_TEXTURE
vec4 base = texture(baseTexture, vec3(uv, varTexLayer)).rgba;
#else
vec4 base = texture2D(baseTexture, uv).rgba;
#endif
// Handle transparency by discarding pixel as appropriate.
#ifdef USE_DISCARD
if (base.a == 0.0)
discard;
#endif
#ifdef USE_DISCARD_REF
if (base.a < 0.5)
discard;
#endif
vec4 col = vec4(base.rgb * varColor.rgb, base.a);
gl_FragColor = col;
}

View File

@@ -0,0 +1,21 @@
VARYING_ vec3 vNormal;
VARYING_ vec3 vPosition;
CENTROID_ VARYING_ lowp vec4 varColor;
CENTROID_ VARYING_ mediump vec2 varTexCoord;
CENTROID_ VARYING_ float varTexLayer; // actually int
void main(void)
{
#ifdef USE_ARRAY_TEXTURE
varTexLayer = inVertexAux;
#endif
varTexCoord = inTexCoord0.st;
vec4 pos = inVertexPosition;
gl_Position = mWorldViewProj * pos;
vPosition = gl_Position.xyz;
vNormal = inVertexNormal;
vec4 color = inVertexColor;
varColor = clamp(color, 0.0, 1.0);
}

View File

@@ -2,8 +2,8 @@ uniform sampler2D baseTexture;
uniform sampler2D normalTexture;
uniform vec3 yawVec;
varying lowp vec4 varColor;
varying mediump vec2 varTexCoord;
VARYING_ lowp vec4 varColor;
VARYING_ mediump vec2 varTexCoord;
void main (void)
{

View File

@@ -1,7 +1,7 @@
uniform mat4 mWorld;
varying lowp vec4 varColor;
varying mediump vec2 varTexCoord;
VARYING_ lowp vec4 varColor;
VARYING_ mediump vec2 varTexCoord;
void main(void)
{

View File

@@ -1,4 +1,10 @@
uniform sampler2D baseTexture;
#ifdef USE_ARRAY_TEXTURE
uniform mediump sampler2DArray baseTexture;
#else
uniform sampler2D baseTexture;
#endif
#define crackTexture texture1
uniform sampler2D crackTexture;
uniform vec3 dayLight;
uniform lowp vec4 fogColor;
@@ -9,6 +15,10 @@ uniform float fogShadingParameter;
uniform highp vec3 cameraOffset;
uniform vec3 cameraPosition;
uniform float animationTimer;
uniform float crackAnimationLength;
uniform float crackLevel;
uniform float crackTextureScale;
#ifdef ENABLE_DYNAMIC_SHADOWS
// shadow texture
uniform sampler2D ShadowMapSampler;
@@ -23,32 +33,27 @@ uniform float animationTimer;
uniform float xyPerspectiveBias1;
uniform vec3 shadow_tint;
varying float adj_shadow_strength;
varying float cosLight;
varying float f_normal_length;
varying vec3 shadow_position;
varying float perspective_factor;
VARYING_ float adj_shadow_strength;
VARYING_ float cosLight;
VARYING_ float f_normal_length;
VARYING_ vec3 shadow_position;
VARYING_ float perspective_factor;
#endif
varying vec3 vNormal;
varying vec3 vPosition;
VARYING_ vec3 vNormal;
VARYING_ vec3 vPosition;
// World position in the visible world (i.e. relative to the cameraOffset.)
// This can be used for many shader effects without loss of precision.
// If the absolute position is required it can be calculated with
// cameraOffset + worldPosition (for large coordinates the limits of float
// precision must be considered).
varying vec3 worldPosition;
#ifdef GL_ES
varying lowp vec4 varColor;
varying mediump vec2 varTexCoord;
varying float nightRatio;
#else
centroid varying lowp vec4 varColor;
centroid varying vec2 varTexCoord;
centroid varying float nightRatio;
#endif
varying highp vec3 eyeVec;
VARYING_ vec3 worldPosition;
CENTROID_ VARYING_ lowp vec4 varColor;
CENTROID_ VARYING_ mediump vec2 varTexCoord;
CENTROID_ VARYING_ float varTexLayer; // actually int
CENTROID_ VARYING_ float nightRatio;
VARYING_ highp vec3 eyeVec;
#ifdef ENABLE_DYNAMIC_SHADOWS
#if (defined(ENABLE_WATER_REFLECTIONS) && MATERIAL_WATER_REFLECTIONS && ENABLE_WAVING_WATER)
@@ -411,15 +416,27 @@ float getShadow(sampler2D shadowsampler, vec2 smTexCoord, float realDistance)
#endif
#endif
// maps [0, N] to [0, 1] like GL_REPEAT would
vec2 uv_repeat(vec2 v)
{
if (v.x > 1.0)
v.x = fract(v.x);
if (v.y > 1.0)
v.y = fract(v.y);
return v;
}
void main(void)
{
vec3 color;
vec2 uv = varTexCoord.st;
#ifdef USE_ARRAY_TEXTURE
vec4 base = texture(baseTexture, vec3(uv, varTexLayer)).rgba;
#else
vec4 base = texture2D(baseTexture, uv).rgba;
// If alpha is zero, we can just discard the pixel. This fixes transparency
// on GPUs like GC7000L, where GL_ALPHA_TEST is not implemented in mesa,
// and also on GLES 2, where GL_ALPHA_TEST is missing entirely.
#endif
// Handle transparency by discarding pixel as appropriate.
#ifdef USE_DISCARD
if (base.a == 0.0)
discard;
@@ -429,8 +446,19 @@ void main(void)
discard;
#endif
color = base.rgb;
vec4 col = vec4(color.rgb * varColor.rgb, 1.0);
// Apply crack overlay
float crack_progress = min(crackLevel, crackAnimationLength - 1.0);
if (crack_progress >= 0.0) {
// undo scaling of e.g. world-aligned nodes
vec2 orig_uv = uv_repeat(uv * vec2(crackTextureScale));
vec2 cuv_offset = vec2(0.0, crack_progress / crackAnimationLength);
vec2 cuv_factor = vec2(1.0, 1.0 / crackAnimationLength);
vec4 crack = texture2D(crackTexture, cuv_offset + orig_uv * cuv_factor);
base = mix(base, crack, crack.a);
}
vec4 col = vec4(base.rgb * varColor.rgb, 1.0);
#ifdef ENABLE_DYNAMIC_SHADOWS
// Fragment normal, can differ from vNormal which is derived from vertex normals.
@@ -570,5 +598,5 @@ void main(void)
col = mix(fogColor * pow(fogColor / fogColorMax, vec4(2.0 * clarity)), col, clarity);
col = vec4(col.rgb, base.a);
gl_FragData[0] = col;
gl_FragColor = col;
}

View File

@@ -6,26 +6,22 @@ uniform vec3 dayLight;
uniform highp vec3 cameraOffset;
uniform float animationTimer;
varying vec3 vNormal;
varying vec3 vPosition;
VARYING_ vec3 vNormal;
VARYING_ vec3 vPosition;
// World position in the visible world (i.e. relative to the cameraOffset.)
// This can be used for many shader effects without loss of precision.
// If the absolute position is required it can be calculated with
// cameraOffset + worldPosition (for large coordinates the limits of float
// precision must be considered).
varying vec3 worldPosition;
VARYING_ vec3 worldPosition;
// The centroid keyword ensures that after interpolation the texture coordinates
// lie within the same bounds when MSAA is en- and disabled.
// lie within the same bounds when MSAA is en- or disabled.
// This fixes the stripes problem with nearest-neighbor textures and MSAA.
#ifdef GL_ES
varying lowp vec4 varColor;
varying mediump vec2 varTexCoord;
varying float nightRatio;
#else
centroid varying lowp vec4 varColor;
centroid varying vec2 varTexCoord;
centroid varying float nightRatio;
#endif
CENTROID_ VARYING_ lowp vec4 varColor;
CENTROID_ VARYING_ mediump vec2 varTexCoord;
CENTROID_ VARYING_ float varTexLayer; // actually int
CENTROID_ VARYING_ float nightRatio;
#ifdef ENABLE_DYNAMIC_SHADOWS
// shadow uniforms
uniform vec3 v_LightDirection;
@@ -36,15 +32,15 @@ centroid varying float nightRatio;
uniform float f_timeofday;
uniform vec4 CameraPos;
varying float cosLight;
varying float normalOffsetScale;
varying float adj_shadow_strength;
varying float f_normal_length;
varying vec3 shadow_position;
varying float perspective_factor;
VARYING_ float cosLight;
VARYING_ float normalOffsetScale;
VARYING_ float adj_shadow_strength;
VARYING_ float f_normal_length;
VARYING_ vec3 shadow_position;
VARYING_ float perspective_factor;
#endif
varying highp vec3 eyeVec;
VARYING_ highp vec3 eyeVec;
// Color of the light emitted by the light sources.
const vec3 artificialLight = vec3(1.04, 1.04, 1.04);
const float e = 2.718281828459;
@@ -149,6 +145,9 @@ float snoise(vec3 p)
void main(void)
{
#ifdef USE_ARRAY_TEXTURE
varTexLayer = inVertexAux;
#endif
varTexCoord = inTexCoord0.st;
float disp_x;
@@ -181,6 +180,7 @@ void main(void)
pos.y += disp_z * 0.1;
pos.z += disp_z;
#elif MATERIAL_TYPE == TILE_MATERIAL_WAVING_PLANTS && ENABLE_WAVING_PLANTS
// bottom of plant doesn't wave
if (varTexCoord.y < 0.05) {
pos.x += disp_x;
pos.z += disp_z;

View File

@@ -1,4 +1,8 @@
uniform sampler2D baseTexture;
#ifdef USE_ARRAY_TEXTURE
uniform mediump sampler2DArray baseTexture;
#else
uniform sampler2D baseTexture;
#endif
uniform vec3 dayLight;
uniform lowp vec4 fogColor;
@@ -22,32 +26,29 @@ uniform float animationTimer;
uniform float xyPerspectiveBias1;
uniform vec3 shadow_tint;
varying float adj_shadow_strength;
varying float cosLight;
varying float f_normal_length;
varying vec3 shadow_position;
varying float perspective_factor;
VARYING_ float adj_shadow_strength;
VARYING_ float cosLight;
VARYING_ float f_normal_length;
VARYING_ vec3 shadow_position;
VARYING_ float perspective_factor;
#endif
varying vec3 vNormal;
varying vec3 vPosition;
VARYING_ vec3 vNormal;
VARYING_ vec3 vPosition;
// World position in the visible world (i.e. relative to the cameraOffset.)
// This can be used for many shader effects without loss of precision.
// If the absolute position is required it can be calculated with
// cameraOffset + worldPosition (for large coordinates the limits of float
// precision must be considered).
varying vec3 worldPosition;
varying lowp vec4 varColor;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
varying highp vec3 eyeVec;
varying float nightRatio;
VARYING_ vec3 worldPosition;
VARYING_ lowp vec4 varColor;
CENTROID_ VARYING_ mediump vec2 varTexCoord;
CENTROID_ VARYING_ float varTexLayer; // actually int
VARYING_ highp vec3 eyeVec;
VARYING_ float nightRatio;
varying float vIDiff;
VARYING_ float vIDiff;
#ifdef ENABLE_DYNAMIC_SHADOWS
@@ -365,10 +366,13 @@ void main(void)
vec3 color;
vec2 uv = varTexCoord.st;
#ifdef USE_ARRAY_TEXTURE
vec4 base = texture(baseTexture, vec3(uv, varTexLayer)).rgba;
#else
vec4 base = texture2D(baseTexture, uv).rgba;
// If alpha is zero, we can just discard the pixel. This fixes transparency
// on GPUs like GC7000L, where GL_ALPHA_TEST is not implemented in mesa,
// and also on GLES 2, where GL_ALPHA_TEST is missing entirely.
#endif
// Handle transparency by discarding pixel as appropriate.
#ifdef USE_DISCARD
if (base.a == 0.0)
discard;
@@ -458,5 +462,5 @@ void main(void)
col = mix(fogColor * pow(fogColor / fogColorMax, vec4(2.0 * clarity)), col, clarity);
col = vec4(col.rgb, base.a);
gl_FragData[0] = col;
gl_FragColor = col;
}

View File

@@ -3,15 +3,12 @@ uniform vec3 dayLight;
uniform float animationTimer;
uniform lowp vec4 materialColor;
varying vec3 vNormal;
varying vec3 vPosition;
varying vec3 worldPosition;
varying lowp vec4 varColor;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
VARYING_ vec3 vNormal;
VARYING_ vec3 vPosition;
VARYING_ vec3 worldPosition;
VARYING_ lowp vec4 varColor;
CENTROID_ VARYING_ mediump vec2 varTexCoord;
CENTROID_ VARYING_ float varTexLayer; // actually int
#ifdef ENABLE_DYNAMIC_SHADOWS
// shadow uniforms
@@ -23,18 +20,18 @@ centroid varying vec2 varTexCoord;
uniform float f_timeofday;
uniform vec4 CameraPos;
varying float cosLight;
varying float adj_shadow_strength;
varying float f_normal_length;
varying vec3 shadow_position;
varying float perspective_factor;
VARYING_ float cosLight;
VARYING_ float adj_shadow_strength;
VARYING_ float f_normal_length;
VARYING_ vec3 shadow_position;
VARYING_ float perspective_factor;
#endif
varying highp vec3 eyeVec;
varying float nightRatio;
VARYING_ highp vec3 eyeVec;
VARYING_ float nightRatio;
// Color of the light emitted by the light sources.
const vec3 artificialLight = vec3(1.04, 1.04, 1.04);
varying float vIDiff;
VARYING_ float vIDiff;
const float e = 2.718281828459;
const float BS = 10.0;
uniform float xyPerspectiveBias0;
@@ -91,7 +88,11 @@ float directional_ambient(vec3 normal)
void main(void)
{
#ifdef USE_ARRAY_TEXTURE
varTexLayer = inVertexAux;
#endif
varTexCoord = (mTexture * vec4(inTexCoord0.xy, 1.0, 1.0)).st;
gl_Position = mWorldViewProj * inVertexPosition;
vPosition = gl_Position.xyz;
@@ -104,9 +105,9 @@ void main(void)
#else
// This is intentional comparison with zero without any margin.
// If normal is not equal to zero exactly, then we assume it's a valid, just not normalized vector
vIDiff = length(inVertexNormal) == 0.0
vIDiff = length(vNormal) == 0.0
? 1.0
: directional_ambient(normalize(inVertexNormal));
: directional_ambient(normalize(vNormal));
#endif
vec4 color = inVertexColor;

View File

@@ -21,14 +21,10 @@ uniform ExposureParams exposureParams;
uniform lowp float bloomIntensity;
uniform lowp float saturation;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
#ifdef ENABLE_AUTO_EXPOSURE
varying float exposure; // linear exposure factor, see vertex shader
VARYING_ float exposure; // linear exposure factor, see vertex shader
#endif
#ifdef ENABLE_BLOOM

View File

@@ -3,14 +3,10 @@
uniform sampler2D exposureMap;
varying float exposure;
VARYING_ float exposure;
#endif
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
void main(void)
{

View File

@@ -1,12 +1,12 @@
uniform sampler2D baseTexture;
varying lowp vec4 varColor;
varying mediump vec2 varTexCoord;
VARYING_ lowp vec4 varColor;
VARYING_ mediump vec2 varTexCoord;
void main(void)
{
vec2 uv = varTexCoord.st;
vec4 color = texture2D(baseTexture, uv);
color.rgb *= varColor.rgb;
gl_FragData[0] = color;
fragColor = color;
}

View File

@@ -1,5 +1,5 @@
varying lowp vec4 varColor;
varying mediump vec2 varTexCoord;
VARYING_ lowp vec4 varColor;
VARYING_ mediump vec2 varTexCoord;
void main(void)
{

View File

@@ -0,0 +1,20 @@
// FIXME missing array texture handling
uniform sampler2D ColorMapSampler;
varying vec4 tPos;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
void main()
{
vec4 col = texture2D(ColorMapSampler, varTexCoord);
// FIXME: magic number???
if (col.a < 0.70)
discard;
float depth = 0.5 + tPos.z * 0.5;
gl_FragColor = vec4(depth, 0.0, 0.0, 1.0);
}

View File

@@ -6,6 +6,12 @@ uniform float xyPerspectiveBias0;
uniform float xyPerspectiveBias1;
uniform float zPerspectiveBias;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
vec4 getRelativePosition(in vec4 position)
{
vec2 l = position.xy - CameraPos.xy;
@@ -34,10 +40,10 @@ vec4 applyPerspectiveDistortion(in vec4 position)
void main()
{
vec4 pos = LightMVP * gl_Vertex;
vec4 pos = LightMVP * inVertexPosition;
tPos = applyPerspectiveDistortion(pos);
gl_Position = vec4(tPos.xyz, 1.0);
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
varTexCoord = (mTexture * vec4(inTexCoord0.xy, 0.0, 1.0)).xy;
}

View File

@@ -1,6 +1,13 @@
// FIXME missing array texture handling
uniform sampler2D ColorMapSampler;
varying vec4 tPos;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
#ifdef COLORED_SHADOWS
varying vec3 varColor;
@@ -20,7 +27,7 @@ const vec3 black = vec3(0.0);
void main()
{
vec4 col = texture2D(ColorMapSampler, gl_TexCoord[0].st);
vec4 col = texture2D(ColorMapSampler, varTexCoord);
#ifndef COLORED_SHADOWS
if (col.a < 0.5)
discard;

View File

@@ -9,6 +9,12 @@ uniform float xyPerspectiveBias0;
uniform float xyPerspectiveBias1;
uniform float zPerspectiveBias;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
vec4 getRelativePosition(in vec4 position)
{
vec2 l = position.xy - CameraPos.xy;
@@ -37,14 +43,14 @@ vec4 applyPerspectiveDistortion(in vec4 position)
void main()
{
vec4 pos = LightMVP * gl_Vertex;
vec4 pos = LightMVP * inVertexPosition;
tPos = applyPerspectiveDistortion(LightMVP * gl_Vertex);
tPos = applyPerspectiveDistortion(pos);
gl_Position = vec4(tPos.xyz, 1.0);
gl_TexCoord[0].st = gl_MultiTexCoord0.st;
varTexCoord = inTexCoord0.xy;
#ifdef COLORED_SHADOWS
varColor = gl_Color.rgb;
varColor = inVertexColor.rgb;
#endif
}

View File

@@ -4,20 +4,25 @@ uniform sampler2D ShadowMapClientMapTraslucent;
#endif
uniform sampler2D ShadowMapSamplerdynamic;
void main() {
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
void main()
{
#ifdef COLORED_SHADOWS
vec2 first_depth = texture2D(ShadowMapClientMap, gl_TexCoord[0].st).rg;
vec2 depth_splitdynamics = vec2(texture2D(ShadowMapSamplerdynamic, gl_TexCoord[2].st).r, 0.0);
vec2 first_depth = texture2D(ShadowMapClientMap, varTexCoord).rg;
vec2 depth_splitdynamics = vec2(texture2D(ShadowMapSamplerdynamic, varTexCoord).r, 0.0);
if (first_depth.r > depth_splitdynamics.r)
first_depth = depth_splitdynamics;
vec2 depth_color = texture2D(ShadowMapClientMapTraslucent, gl_TexCoord[1].st).rg;
vec2 depth_color = texture2D(ShadowMapClientMapTraslucent, varTexCoord).rg;
gl_FragColor = vec4(first_depth.r, first_depth.g, depth_color.r, depth_color.g);
#else
float first_depth = texture2D(ShadowMapClientMap, gl_TexCoord[0].st).r;
float depth_splitdynamics = texture2D(ShadowMapSamplerdynamic, gl_TexCoord[2].st).r;
float first_depth = texture2D(ShadowMapClientMap, varTexCoord).r;
float depth_splitdynamics = texture2D(ShadowMapSamplerdynamic, varTexCoord).r;
first_depth = min(first_depth, depth_splitdynamics);
gl_FragColor = vec4(first_depth, 0.0, 0.0, 1.0);
#endif
}

View File

@@ -0,0 +1,12 @@
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
void main()
{
vec4 uv = vec4(inVertexPosition.xyz, 1.0) * 0.5 + 0.5;
varTexCoord = uv.st;
gl_Position = vec4(inVertexPosition.xyz, 1.0);
}

View File

@@ -1,13 +0,0 @@
uniform sampler2D ColorMapSampler;
varying vec4 tPos;
void main()
{
vec4 col = texture2D(ColorMapSampler, gl_TexCoord[0].st);
if (col.a < 0.70)
discard;
float depth = 0.5 + tPos.z * 0.5;
gl_FragColor = vec4(depth, 0.0, 0.0, 1.0);
}

View File

@@ -1,9 +0,0 @@
void main()
{
vec4 uv = vec4(gl_Vertex.xyz, 1.0) * 0.5 + 0.5;
gl_TexCoord[0] = uv;
gl_TexCoord[1] = uv;
gl_TexCoord[2] = uv;
gl_Position = vec4(gl_Vertex.xyz, 1.0);
}

View File

@@ -1,11 +1,4 @@
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
void main(void)
{
varTexCoord.st = inTexCoord0.st;
gl_Position = inVertexPosition;
}

View File

@@ -18,11 +18,7 @@ uniform vec3 v_LightDirection;
const vec3 v_LightDirection = vec3(0.0, -1.0, 0.0);
#endif
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
const float far = 1000.;
float mapDepth(float depth)

View File

@@ -1,9 +1,4 @@
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
CENTROID_ VARYING_ mediump vec2 varTexCoord;
void main(void)
{

View File

@@ -77,30 +77,28 @@ some shader settings cannot be used on OpenGL ES.
Changing the graphic driver setting to OpenGL will not work.
## Building Requirements
In order to build, your PC has to be set up to build Luanti in the usual
manner (see the regular Luanti documentation for how to get this done).
In addition to what is required for Luanti in general, you will need the
following software packages. The version number in parenthesis denotes the
version that was tested at the time this README was drafted; newer/older
versions may or may not work.
* Android SDK 29
* Android NDK r21
* Android Studio 3 [optional]
In order to build, you will need the following development tools:
* Java JDK
* Android SDK
* `gettext` command line tools
* Android Studio [optional]
Additionally, you'll need to have an Internet connection available on the
build system, as the Android build will download some source packages.
## Build
The new build system Luanti Android is fully functional and is designed to
speed up and simplify the work, as well as adding the possibility of
cross-platform build.
You can use `./gradlew assemblerelease` or `./gradlew assembledebug` from the
You can use `./gradlew assembleRelease` or `./gradlew assembleDebug` from the
command line or use Android Studio and click the build button.
When using gradlew, the newest NDK will be downloaded and installed
automatically. Or you can create a `local.properties` file and specify
`sdk.dir` and `ndk.dir` yourself.
automatically. You have to create a `local.properties` file and specify
`sdk.dir` yourself if you want to use an existing installation.
* In order to make a release build you'll have to have a keystore setup to sign
the resulting apk package. How this is done is not part of this README. There

View File

@@ -1,4 +1,4 @@
Luanti Lua Client Modding API Reference 5.14.0
Luanti Lua Client Modding API Reference 5.15.0
==============================================
**WARNING**: if you're looking for the `minetest` namespace (e.g. `minetest.something`),

View File

@@ -22,7 +22,6 @@ General options and their default values:
MinSizeRel - Release build with -Os passed to compiler to make executable as small as possible
PRECOMPILE_HEADERS=FALSE - Precompile some headers (experimental; requires CMake 3.16 or later)
PRECOMPILED_HEADERS_PATH= - Path to a file listing all headers to precompile (default points to src/precompiled_headers.txt)
USE_SDL2=TRUE - Build with SDL2; Enables IrrlichtMt device SDL2
USE_SDL2_STATIC=TRUE - Links with SDL2::SDL2-static instead of SDL2::SDL2
ENABLE_CURL=ON - Build with cURL; Enables use of online mod repo, public serverlist and remote media fetching via http
ENABLE_CURSES=ON - Build with (n)curses; Enables a server side terminal (command line option: --terminal)
@@ -48,9 +47,9 @@ General options and their default values:
Library specific options:
SDL2_DLL - Only if building with SDL2 on Windows; path to libSDL2.dll
SDL2_INCLUDE_DIRS - Only if building with SDL2; directory where SDL.h is located
SDL2_LIBRARIES - Only if building with SDL2; path to libSDL2.a/libSDL2.so/libSDL2.lib
SDL2_DLL - Only if building on Windows; path to libSDL2.dll
SDL2_INCLUDE_DIRS - directory where SDL.h is located
SDL2_LIBRARIES - path to libSDL2.a/libSDL2.so/libSDL2.lib
CURL_DLL - Only if building with cURL on Windows; path to libcurl.dll
CURL_INCLUDE_DIR - Only if building with cURL; directory where curl.h is located
CURL_LIBRARY - Only if building with cURL; path to libcurl.a/libcurl.so/libcurl.lib

View File

@@ -16,35 +16,46 @@ These are the current medium-term goals for Luanti development, in no
particular order.
These goals were created from the top points in a
[roadmap brainstorm](https://github.com/luanti-org/luanti/issues/10461).
This should be reviewed approximately yearly, or when goals are achieved.
[roadmap brainstorm](https://github.com/luanti-org/luanti/issues/16162).
This is reviewed approximately every two years.
Pull requests that address one of these goals will be labeled as "Roadmap".
PRs that are not on the roadmap will be closed unless they receive a concept
approval within a month, issues can be used for preapproval.
Bug fixes are exempt for this, and are always accepted and prioritized.
approval within a month. Issues can be used for preapproval.
Bug fixes are exempt from this, and are always accepted and prioritized.
See [CONTRIBUTING.md](../.github/CONTRIBUTING.md) for more info.
### 2.1 Rendering/Graphics improvements
### 2.1 SSCSM
The priority is fixing the issues, performance, and general correctness.
Once that is done, fancier features can be worked on, such as water shaders,
shadows, and improved lighting.
Server-sent client-side modding (SSCSM) is a long requested feature (both by
modders and core devs) where, as the name suggests, the server sends modding
scripts to the client for it to execute in a sandbox. This allows mods to run
code on the client, similar to how web pages can run javascript code in web
browsers.
Examples include
[transparency sorting](https://github.com/luanti-org/luanti/issues/95),
[particle performance](https://github.com/luanti-org/luanti/issues/1414),
[general view distance](https://github.com/luanti-org/luanti/issues/7222).
Due to the avoided network latency, the engine can provide APIs in this new
scripting environment for things that need to happen in a synchronous fashion,
allowing mods to overwrite various things that are currently hard-coded in the
client.
For some APIs, it also just makes more sense to have them exist on the client,
and not tunnel every call through the server, only leading to technical debt
once SSCSM arrives.
Lastly, parts of the computation of mods can be moved to the client, improving
server performance.
This includes work on maintaining
[our Irrlicht fork](https://github.com/luanti-org/luanti/tree/master/irr), and switching to
alternative libraries to replace Irrlicht functionality as needed
Instead of focusing on short-term solutions that will inevitably lead to more
technical debt to deal with, SSCSM paves the way for a cleaner architecture
designed to stay.
### 2.2 Internal code refactoring
### 2.2 Input Handling
To ensure sustainable development, Luanti's code needs to be
[refactored and improved](https://github.com/luanti-org/luanti/pulls?q=is%3Aopen+sort%3Aupdated-desc+label%3A%22Code+quality%22).
This will remove code rot and allow for more efficient development.
Luanti keys are currently limited to a small subset, not allowing game developers
to map the majority of the keys a device usually offers. This limits the possibilities
of game creators, forcing them to either implement a workaround or, worse, forget
about it.
Using a gamepad also represents a known issue in Luanti, as some devices might not
work at all or result in an uncomfortable user experience.
### 2.3 UI Improvements
@@ -55,15 +66,6 @@ be a replacement for HUDs, allowing for a unified API.
A [new mainmenu](https://github.com/luanti-org/luanti/issues/6733) is needed to
improve user experience. First impressions matter, and the current main menu
doesn't do a very good job at selling Luanti or explaining what it is.
A new main menu should promote games to users, allowing Minetest Game to no
longer be bundled by default.
The UI code is undergoing rapid changes, so it is especially important to make
an issue for any large changes before spending lots of time.
### 2.4 Object and entity improvements
There are still a significant number of issues with objects.
Collisions,
[performance](https://github.com/luanti-org/luanti/issues/6453),
API convenience, and discrepancies between players and entities.

View File

@@ -84,6 +84,9 @@ The game directory can contain the following files:
When both `allowed_mapgens` and `disallowed_mapgens` are
specified, `allowed_mapgens` is applied before
`disallowed_mapgens`.
* `default_mapgen`
e.g. `default_mapgen = valleys`
Set default mapgen for game, this will be the default selection when creating a new world.
* `disallowed_mapgen_settings= <comma-separated mapgen settings>`
e.g. `disallowed_mapgen_settings = mgv5_spflags`
These mapgen settings are hidden for this game in the world creation
@@ -2705,10 +2708,10 @@ Some of the values in the key-value store are handled specially:
See also: `get_description` in [`ItemStack`](#itemstack)
* `short_description`: Set the item stack's short description.
See also: `get_short_description` in [`ItemStack`](#itemstack)
* `inventory_image`: Override inventory_image
* `inventory_overlay`: Override inventory_overlay
* `wield_image`: Override wield_image
* `wield_overlay`: Override wield_overlay
* `inventory_image`: Override inventory_image.name
* `inventory_overlay`: Override inventory_overlay.name
* `wield_image`: Override wield_image.name
* `wield_overlay`: Override wield_overlay.name
* `wield_scale`: Override wield_scale, use vector.to_string
* `color`: A `ColorString`, which sets the stack's color.
* `palette_index`: If the item has a palette, this is used to get the
@@ -5849,6 +5852,11 @@ Utilities
particlespawner_exclude_player = true,
-- core.generate_decorations() supports `use_mapgen_biomes` parameter (5.14.0)
generate_decorations_biomes = true,
-- 'chunksize' mapgen setting can be a vector, instead of a single number (5.15.0)
chunksize_vector = true,
-- Item definition fields `inventory_image`, `inventory_overlay`, `wield_image`
-- and `wield_overlay` accept a table containing animation definitions. (5.15.0)
item_image_animation = true,
}
```
@@ -6704,7 +6712,7 @@ Environment access
in that order.
* `mapgen_limit` is an optional number. If it is absent, its value is that
of the *active* mapgen setting `"mapgen_limit"`.
* `chunksize` is an optional number. If it is absent, its value is that
* `chunksize` is an optional number or vector. If it is absent, its value is that
of the *active* mapgen setting `"chunksize"`.
* `core.get_mapgen_chunksize()`
* Returns the currently active chunksize of the mapgen, as a vector.
@@ -8523,7 +8531,7 @@ child will follow movement and rotation of that bone.
* Attaches object to `parent`
* See 'Attachments' section for details
* `parent`: `ObjectRef` to attach to
* `bone`: Bone to attach to. Default is `""` (the root bone)
* `bone`: Bone to attach to. Default is `""` which attaches to the parent object's origin.
* `position`: relative position, default `{x=0, y=0, z=0}`
* `rotation`: relative rotation in degrees, default `{x=0, y=0, z=0}`
* `forced_visible`: Boolean to control whether the attached entity
@@ -8651,7 +8659,9 @@ child will follow movement and rotation of that bone.
* Does not reset rotation incurred through `automatic_rotate`.
Remove & re-add your objects to force a certain rotation.
* `get_rotation()`: returns the rotation, a vector (radians)
* `set_yaw(yaw)`: sets the yaw in radians (heading).
* `set_yaw(yaw)`
* Sets the yaw in radians (heading).
* Also resets pitch and roll to 0.
* `get_yaw()`: returns number in radians
* `set_texture_mod(mod)`
* Set a texture modifier to the base texture, for sprites and meshes.
@@ -9511,6 +9521,7 @@ Player properties need to be saved manually.
-- `core.itemstring_with_palette()`), the entity will inherit the color.
-- Wielditems are scaled a bit. If you want a wielditem to appear
-- to be as large as a node, use `0.667` in `visual_size`
-- Currently, item image animations are not played. This may change in the future.
-- "item" is similar to "wielditem" but ignores the 'wield_image' parameter.
-- "node" looks exactly like a node in-world (supported since 5.12.0)
-- Note that visual effects like waving or liquid reflections will not work.
@@ -9851,6 +9862,13 @@ Tile animation definition
}
```
Item image definition
---------------------
* `"image.png"`
* `{name="image.png", animation={Tile Animation definition}}`
* Basically a tile definition but for items
Item definition
---------------
@@ -9877,18 +9895,18 @@ Used by `core.register_node`, `core.register_craftitem`, and
-- {bendy = 2, snappy = 1},
-- {hard = 1, metal = 1, spikes = 1}
inventory_image = "",
-- Texture shown in the inventory GUI
inventory_image = <Item image definition>,
-- Image shown in the inventory GUI
-- Defaults to a 3D rendering of the node if left empty.
inventory_overlay = "",
-- An overlay texture which is not affected by colorization
inventory_overlay = <Item image definition>,
-- An overlay image which is not affected by colorization
wield_image = "",
-- Texture shown when item is held in hand
wield_image = <Item image definition>,
-- Image shown when item is held in hand
-- Defaults to a 3D rendering of the node if left empty.
wield_overlay = "",
wield_overlay = <Item image definition>,
-- Like inventory_overlay but only used in the same situation as wield_image
wield_scale = {x = 1, y = 1, z = 1},

View File

@@ -1,4 +1,4 @@
.TH luanti 6 "2 February 2019" "" ""
.TH luanti 6 "2025-10-16" "" ""
.SH NAME
luanti, luantiserver \- voxel game engine
@@ -7,12 +7,10 @@ luanti, luantiserver \- voxel game engine
.B luanti
[\fB--server SERVER OPTIONS\fR | \fBCLIENT OPTIONS\fR]
[\fBCOMMON OPTIONS\fR]
[\fBWORLD PATH\fR]
.B luantiserver
[\fBSERVER OPTIONS\fR]
[\fBCOMMON OPTIONS\fR]
[\fBWORLD PATH\fR]
.SH DESCRIPTION
.B Luanti (formerly Minetest) is a voxel game engine with easy modding and game creation.
@@ -43,8 +41,11 @@ Print enormous amounts of information to console
.B \-\-quiet
Print only errors to console
.TP
.B \-\-color <value>
Colorize the logs ('always', 'never' or 'auto'), defaults to 'auto'
.B \-\-color always | never | auto
Coloured logs, default: 'auto'
.TP
.B \-\-log-timestamp wall | relative | none
Timestamped logs, default: 'wall'
.TP
.B \-\-gameid <value> | list
Set gameid or list available ones
@@ -66,14 +67,17 @@ Set network port (UDP) to use
.TP
.B \-\-run\-unittests
Run unit tests and exit
.TP
.B \-\-run\-benchmarks
Run benchmarks and exit
.SH CLIENT OPTIONS
.TP
.B \-\-address <value>
Address to connect to
Address to connect to ('' = local game)
.TP
.B \-\-go
Disable main menu
Skip main menu, go directly in-game
.TP
.B \-\-name <value>
Set player name
@@ -85,48 +89,47 @@ Set password
Set password from contents of file
.TP
.B \-\-random\-input
Enable random user input, for testing (client only)
.TP
.TP
.B \-\-speedtests
Run speed tests
Enable random user input (for testing)
.SH SERVER OPTIONS
.TP
.B \-\-migrate <value>
Migrate from current map backend to another. Possible values are sqlite3,
leveldb, redis, postgresql, and dummy.
Migrate from current map backend to another. See supported backends
with \-\-help.
.TP
.B \-\-migrate-auth <value>
Migrate from current auth backend to another. Possible values are sqlite3,
leveldb, and files.
Migrate from current auth backend to another. See supported backends
with \-\-help.
.TP
.B \-\-migrate-players <value>
Migrate from current players backend to another. Possible values are sqlite3,
leveldb, postgresql, dummy, and files.
Migrate from current players backend to another. See supported backends
with \-\-help.
.TP
.B \-\-migrate-mod-storage <value>
Migrate from current mod storage backend to another. Possible values are
sqlite3, dummy, and files.
Migrate from current mod storage backend to another. See supported backends
with \-\-help.
.TP
.B \-\-terminal
Display an interactive terminal over ncurses during execution.
.SH ENVIRONMENT
.SH ENVIRONMENT VARIABLES
.TP
.B MINETEST_GAME_PATH
Colon delimited list of directories to search for games.
Colon delimited list of directories to search for games
.TP
.B MINETEST_MOD_PATH
Colon delimited list of directories to search for mods.
Colon delimited list of directories to search for mods
.TP
.B MINETEST_USER_PATH
Path to Luanti user data directory.
Path to Luanti user data directory
.TP
.B LOG_TIMESTAMP
Equivalent to \-\-log-timestamp
.SH BUGS
Please report all bugs at https://github.com/luanti-org/luanti/issues.
.SH AUTHOR
.SH AUTHORS
.PP
Perttu Ahola <celeron55@gmail.com> and contributors.
.PP

View File

@@ -1,4 +1,4 @@
Luanti Lua Mainmenu API Reference 5.14.0
Luanti Lua Mainmenu API Reference 5.15.0
========================================
Introduction

View File

@@ -249,7 +249,7 @@ Example content:
# Map File Format
Luanti maps consist of `MapBlock`s, chunks of 16x16x16 nodes.
Luanti maps consist of `MapBlock`s, each holds 16x16x16 nodes.
In addition to the bulk node data, `MapBlock`s stored on disk also contain
other things.

View File

@@ -95,7 +95,7 @@ core.register_entity("testentities:sam", {
self.object:set_bone_override("Head", {
scale = {
vec = vector.new(s, s, s),
absolute = true,
absolute = false,
interpolation = self._head_anim_duration,
},
})

View File

@@ -53,6 +53,13 @@ core.register_craftitem("testitems:overlay_global", {
color = GLOBAL_COLOR_ARG,
})
core.register_craftitem("testitems:overlay_size", {
description = S("Texture Overlay Test Item, Big Base Small Overlay") .. "\n" ..
S("Wield overlay should not be blurry."),
inventory_image = "[fill:1000x1000:#FFFFFF",
inventory_overlay = "testitems_overlay_overlay.png",
})
core.register_craftitem("testitems:image_meta", {
description = S("Image Override Meta Test Item"),
inventory_image = "default_apple.png",
@@ -170,3 +177,59 @@ core.register_craftitem("testitems:tree_spawner_vmanip", {
core.register_on_leaveplayer(function(player, timed_out)
vmanip_for_trees[player:get_player_name()] = nil
end)
-- Animation test items
local animated_image = {
name = "testnodes_anim.png^[invert:rgb",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 4.0,
}
}
local animated_overlay = {
name = "testitems_animation_overlay.png",
animation = {
type = "sheet_2d",
frames_w = 1,
frames_h = 4,
frame_length = 1.0,
}
}
core.register_craftitem("testitems:inventory_image_animation", {
description = S("Animated Test Item").."\n"..
S("Image animate from A to D in 4s cycle"),
inventory_image = animated_image
})
core.register_craftitem("testitems:inventory_image_animation_overlay", {
description = S("Animated Test Item With Overlay").."\n"..
S("Should be colored red and have green stripes that move").."\n"..
S("Image animate from A to D in 4s cycle"),
inventory_image = animated_image,
inventory_overlay = animated_overlay,
color = "#ff0000",
})
core.register_craftitem("testitems:wield_image_animation", {
description = S("Wield Animated Test Item").."\n"..
S("Looks like the Animated Test Item, "..
"but only animated for the wield mesh."),
inventory_image = "testnodes_anim.png^[invert:rgb^[verticalframe:4:0",
wield_image = animated_image,
})
core.register_craftitem("testitems:wield_image_animation_overlay", {
description = S("Wield Animated Test Item With Overlay").."\n"..
S("Looks like the animated Test Item With Overlay, "..
"but only animated for the wield mesh."),
inventory_image = "testnodes_anim.png^[invert:rgb^[verticalframe:4:0",
inventory_overlay = "testitems_animation_overlay.png^[verticalframe:4:0",
wield_image = animated_image,
wield_overlay = animated_overlay,
color = "#ff0000",
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

View File

@@ -2,29 +2,22 @@
local S = core.get_translator("testnodes")
-- Complex mesh
core.register_node("testnodes:performance_mesh_clip", {
description = S("Performance Test Node") .. "\n" .. S("Marble with 'clip' transparency"),
drawtype = "mesh",
mesh = "testnodes_marble_glass.obj",
tiles = {"testnodes_marble_glass.png"},
paramtype = "light",
use_texture_alpha = "clip",
for use_texture_alpha, description in pairs({
opaque = S("Marble with 'opaque' transparency"),
clip = S("Marble with 'clip' transparency"),
blend = S("Marble with 'blend' transparency"),
}) do
core.register_node("testnodes:performance_mesh_" .. use_texture_alpha, {
description = S("Performance Test Node") .. "\n" .. description,
drawtype = "mesh",
mesh = "testnodes_marble_glass.obj",
tiles = {"testnodes_marble_glass.png"},
paramtype = "light",
use_texture_alpha = use_texture_alpha,
groups = {dig_immediate=3},
})
-- Complex mesh, alpha blending
core.register_node("testnodes:performance_mesh_blend", {
description = S("Performance Test Node") .. "\n" .. S("Marble with 'blend' transparency"),
drawtype = "mesh",
mesh = "testnodes_marble_glass.obj",
tiles = {"testnodes_marble_glass.png"},
paramtype = "light",
use_texture_alpha = "blend",
groups = {dig_immediate=3},
})
groups = {dig_immediate=3},
})
end
-- Overlay
core.register_node("testnodes:performance_overlay_clip", {

View File

@@ -128,3 +128,42 @@ local function test_node_metadata(player, pos)
test_metadata(core.get_meta(pos))
end
unittests.register("test_node_metadata", test_node_metadata, {map=true})
local function get_cracky_cap(item)
local value = item:get_tool_capabilities()
assert(type(value) == "table")
value = value.groupcaps
assert(type(value) == "table")
value = value.cracky
assert(type(value) == "table")
value = value.times
assert(type(value) == "table")
value = value[1]
assert(type(value) == "number")
return value
end
local function test_item_metadata_tool_capabilities()
local test_caps = {
groupcaps={
cracky={times={123}},
},
}
-- has no tool capabilities
local item = ItemStack("unittests:stick")
local item_meta = item:get_meta()
assert(dump(item:get_tool_capabilities()) == dump(ItemStack(""):get_tool_capabilities()))
item_meta:set_tool_capabilities(test_caps)
-- Can't directly compare the tables, because the pushback to Lua from get_tool_capabilities()
-- adds values to left out fields of the tool capabilities table.
assert(get_cracky_cap(item) == 123)
-- has preexisting tool capabilities in its definition table
item = ItemStack("unittests:unrepairable_tool")
item_meta = item:get_meta()
assert(get_cracky_cap(item) == 3)
item_meta:set_tool_capabilities(test_caps)
assert(get_cracky_cap(item) == 123)
end
unittests.register("test_item_metadata_tool_capabilities", test_item_metadata_tool_capabilities)

View File

@@ -319,7 +319,7 @@ local function test_mapgen_env(cb)
end
unittests.register("test_mapgen_env", test_mapgen_env, {async=true})
local function test_ipc_vector_preserve(cb)
local function test_ipc_vector_preserve()
-- the IPC also uses register_portable_metatable
core.ipc_set("unittests:v", vector.new(4, 0, 4))
local v = core.ipc_get("unittests:v")
@@ -328,7 +328,7 @@ local function test_ipc_vector_preserve(cb)
end
unittests.register("test_ipc_vector_preserve", test_ipc_vector_preserve)
local function test_ipc_poll(cb)
local function test_ipc_poll()
core.ipc_set("unittests:flag", nil)
assert(core.ipc_poll("unittests:flag", 1) == false)
@@ -342,3 +342,24 @@ local function test_ipc_poll(cb)
print("delta: " .. (core.get_us_time() - t0) .. "us")
end
unittests.register("test_ipc_poll", test_ipc_poll)
local function test_sandbox()
if not core.settings:get_bool("secure.enable_security") then
core.log("warning", "Lua sandbox disabled, skipping test")
return
end
-- this would point to _G but we have it unset
assert(package.loaded == nil)
-- string metatable must match global string table
assert(rawequal(getmetatable("").__index, string))
-- (some) entirely dangerous functions
assert(debug.getupvalue == nil)
assert(debug.setlocal == nil)
assert(debug.getmetatable == nil)
assert(os.execute == nil)
assert(io.popen == nil)
-- getinfo should not allow access to functions
assert(debug.getinfo(1).func == nil)
assert(debug.getinfo(function() end, "f").func ~= nil)
end
unittests.register("test_sandbox", test_sandbox)

View File

@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.12)
project(Irrlicht LANGUAGES CXX)
message(STATUS "*** Building IrrlichtMt ***")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

View File

@@ -1,5 +1,5 @@
IrrlichtMt version 1.9
======================
IrrlichtMt
==========
IrrlichtMt is the 3D engine of [Luanti](https://github.com/luanti-org).
It is based on the [Irrlicht Engine](https://irrlicht.sourceforge.io/) but is now developed independently.
@@ -14,16 +14,14 @@ The following libraries are required to be installed:
* zlib, libPNG, libJPEG
* OpenGL
* or on mobile: OpenGL ES (can be optionally enabled on desktop too)
* on Unix: X11
* SDL2 (see below)
* SDL2
Aside from standard search options (`ZLIB_INCLUDE_DIR`, `ZLIB_LIBRARY`, ...) the following options are available:
* `ENABLE_OPENGL` - Enable OpenGL driver
* `ENABLE_OPENGL3` (default: `OFF`) - Enable OpenGL 3+ driver
* `ENABLE_OPENGL3` - Enable OpenGL 3+ driver
* `ENABLE_GLES2` - Enable OpenGL ES 2+ driver
* `USE_SDL2` (default: platform-dependent, usually `ON`) - Use SDL2 instead of older native device code
However, IrrlichtMt cannot be built or installed separately.
**However, IrrlichtMt cannot be built or installed separately.**
Platforms
---------
@@ -36,27 +34,6 @@ We aim to support these platforms:
This doesn't mean other platforms don't work or won't be supported, if you find something that doesn't work contributions are welcome.
Compatibility matrix
--------------------
Driver (rows) vs Device (columns)
| | SDL [1] | Linux [2] | OSX [3] | Win32 [4] |
|---------------------------|----------|----------------|------------------|-----------------|
| OpenGL 1.2 (to 2.1) | Works | Works (GLX) | Works (NSOpenGL) | Works (WGL) |
| OpenGL 3.2+ | Works | Testing (GLX) | Not implemented | Testing (WGL) |
| OpenGL ES 2.x | Works | Untested (EGL) | Not implemented | Untested (EGL) |
| WebGL 1 | Untested | Untested (EGL) | Not implemented | Not implemented |
| Null (no graphics output) | Works | Works | Works | Works |
Notes:
* [1] `CIrrDeviceSDL`: supports Android, Linux, macOS, Windows
* [2] `CIrrDeviceLinux`: supports Linux
* [3] `CIrrDeviceOSX`: supports macOS
* [4] `CIrrDeviceWin32`: supports Windows
License
-------

View File

@@ -5,30 +5,28 @@
#pragma once
#include "CBoneSceneNode.h"
#include "IAnimatedMeshSceneNode.h"
#include "ISceneNode.h"
#include "IAnimatedMesh.h"
#include "SkinnedMesh.h"
#include "Transform.h"
#include "irr_ptr.h"
#include "matrix4.h"
namespace scene
{
class CAnimatedMeshSceneNode : public IAnimatedMeshSceneNode
class AnimatedMeshSceneNode : public ISceneNode
{
public:
//! constructor
CAnimatedMeshSceneNode(IAnimatedMesh *mesh, ISceneNode *parent, ISceneManager *mgr, s32 id,
AnimatedMeshSceneNode(IAnimatedMesh *mesh, ISceneNode *parent, ISceneManager *mgr, s32 id,
const core::vector3df &position = core::vector3df(0, 0, 0),
const core::vector3df &rotation = core::vector3df(0, 0, 0),
const core::vector3df &scale = core::vector3df(1.0f, 1.0f, 1.0f));
//! destructor
virtual ~CAnimatedMeshSceneNode();
//! sets the current frame. from now on the animation is played from this frame.
void setCurrentFrame(f32 frame) override;
virtual ~AnimatedMeshSceneNode();
//! frame
void OnRegisterSceneNode() override;
@@ -42,31 +40,6 @@ class CAnimatedMeshSceneNode : public IAnimatedMeshSceneNode
//! returns the axis aligned bounding box of this node
const core::aabbox3d<f32> &getBoundingBox() const override;
//! sets the frames between the animation is looped.
//! the default is 0 - MaximalFrameCount of the mesh.
//! NOTE: setMesh will also change this value and set it to the full range of animations of the mesh
bool setFrameLoop(f32 begin, f32 end) override;
//! Sets looping mode which is on by default. If set to false,
//! animations will not be looped.
void setLoopMode(bool playAnimationLooped) override;
//! returns the current loop mode
bool getLoopMode() const override;
void setOnAnimateCallback(
const std::function<void(f32 dtime)> &cb) override
{
OnAnimateCallback = cb;
}
//! sets the speed with which the animation is played
//! NOTE: setMesh will also change this value and set it to the default speed of the mesh
void setAnimationSpeed(f32 framesPerSecond) override;
//! gets the speed with which the animation is played
f32 getAnimationSpeed() const override;
//! returns the material based on the zero based index i. To get the amount
//! of materials used by this scene node, use getMaterialCount().
//! This function is needed for inserting the node into the scene hierarchy on a
@@ -77,68 +50,112 @@ class CAnimatedMeshSceneNode : public IAnimatedMeshSceneNode
//! returns amount of materials used by this scene node.
u32 getMaterialCount() const override;
//! Returns a pointer to a child node, which has the same transformation as
//! the corresponding joint, if the mesh in this scene node is a skinned mesh.
IBoneSceneNode *getJointNode(const c8 *jointName) override;
//! same as getJointNode(const c8* jointName), but based on id
IBoneSceneNode *getJointNode(u32 jointID) override;
//! Gets joint count.
u32 getJointCount() const override;
//! Removes a child from this scene node.
//! Implemented here, to be able to remove the shadow properly, if there is one,
//! or to remove attached child.
bool removeChild(ISceneNode *child) override;
//! Returns the current displayed frame number.
f32 getFrameNr() const override;
//! Returns the current start frame number.
f32 getStartFrame() const override;
//! Returns the current end frame number.
f32 getEndFrame() const override;
//! Sets if the scene node should not copy the materials of the mesh but use them in a read only style.
/* In this way it is possible to change the materials a mesh causing all mesh scene nodes
referencing this mesh to change too. */
void setReadOnlyMaterials(bool readonly) override;
//! Returns if the scene node should not copy the materials of the mesh but use them in a read only style
bool isReadOnlyMaterials() const override;
//! Sets a new mesh
void setMesh(IAnimatedMesh *mesh) override;
//! Returns the current mesh
IAnimatedMesh *getMesh(void) override { return Mesh; }
//! Returns type of the scene node
ESCENE_NODE_TYPE getType() const override { return ESNT_ANIMATED_MESH; }
//! updates the absolute position based on the relative and the parents position
void updateAbsolutePosition() override;
//! Sets the transition time in seconds (note: This needs to enable joints)
//! you must call animateJoints(), or the mesh will not animate
void setTransitionTime(f32 Time) override;
void updateJointSceneNodes(const std::vector<SkinnedMesh::SJoint::VariantTransform> &transforms);
//! updates the joint positions of this mesh
void animateJoints() override;
void addJoints();
//! render mesh ignoring its transformation. Used with ragdolls. (culling is unaffected)
void setRenderFromIdentity(bool On) override;
//! Creates a clone of this scene node and its children.
/** \param newParent An optional new parent.
\param newManager An optional new scene manager.
\return The newly created clone of this node. */
ISceneNode *clone(ISceneNode *newParent = 0, ISceneManager *newManager = 0) override;
//! Sets the current frame number.
/** From now on the animation is played from this frame.
\param frame: Number of the frame to let the animation be started from.
The frame number must be a valid frame number of the IMesh used by this
scene node. Set IAnimatedMesh::getMesh() for details. */
void setCurrentFrame(f32 frame);
//! Sets the frame numbers between the animation is looped.
/** The default is 0 to getMaxFrameNumber() of the mesh.
Number of played frames is end-start.
It interpolates toward the last frame but stops when it is reached.
It does not interpolate back to start even when looping.
Looping animations should ensure last and first frame-key are identical.
\param begin: Start frame number of the loop.
\param end: End frame number of the loop.
\return True if successful, false if not. */
//! NOTE: setMesh will also change this value and set it to the full range of animations of the mesh
bool setFrameLoop(f32 begin, f32 end);
//! Sets looping mode which is on by default. If set to false,
//! animations will not be looped.
void setLoopMode(bool playAnimationLooped);
//! returns the current loop mode
bool getLoopMode() const;
//! Will be called right after the joints have been animated,
//! but before the transforms have been propagated recursively to children.
void setOnAnimateCallback(
const std::function<void(f32 dtime)> &cb)
{
OnAnimateCallback = cb;
}
//! Sets the speed with which the animation is played.
/** \param framesPerSecond: Frames per second played. */
void setAnimationSpeed(f32 framesPerSecond);
//! Gets the speed with which the animation is played.
/** \return Frames per second played. */
f32 getAnimationSpeed() const;
//! Returns a pointer to a child node (nullptr if not found),
//! which has the same transformation as
//! the corresponding joint, if the mesh in this scene node is a skinned mesh.
//! This can be used to attach children.
IBoneSceneNode *getJointNode(const c8 *jointName);
//! same as getJointNode(const c8* jointName), but based on id
IBoneSceneNode *getJointNode(u32 jointID);
//! Gets joint count.
u32 getJointCount() const;
//! Returns the currently displayed frame number.
f32 getFrameNr() const;
//! Returns the current start frame number.
f32 getStartFrame() const;
//! Returns the current end frame number.
f32 getEndFrame() const;
//! Sets if the scene node should not copy the materials of the mesh but use them in a read only style.
/* In this way it is possible to change the materials a mesh causing all mesh scene nodes
referencing this mesh to change too. */
void setReadOnlyMaterials(bool readonly);
//! Returns if the scene node should not copy the materials of the mesh but use them in a read only style
bool isReadOnlyMaterials() const;
//! Sets a new mesh
void setMesh(IAnimatedMesh *mesh);
//! Returns the current mesh
IAnimatedMesh *getMesh(void) { return Mesh; }
//! updates the absolute position based on the relative and the parents position
void updateAbsolutePosition() override;
//! Sets the transition time in seconds (note: This needs to enable joints)
//! you must call animateJoints(), or the mesh will not animate
void setTransitionTime(f32 Time);
void updateJointSceneNodes(const std::vector<SkinnedMesh::SJoint::VariantTransform> &transforms);
//! Updates the joint positions of this mesh, taking into accoutn transitions
void animateJoints();
void addJoints();
//! render mesh ignoring its transformation. Used with ragdolls. (culling is unaffected)
void setRenderFromIdentity(bool On);
private:
//! Get a static mesh for the current frame of this animated mesh
IMesh *getMeshForCurrentFrame();
@@ -172,7 +189,7 @@ class CAnimatedMeshSceneNode : public IAnimatedMeshSceneNode
std::function<void(f32)> OnAnimateCallback;
struct PerJointData {
std::vector<CBoneSceneNode *> SceneNodes;
std::vector<irr_ptr<CBoneSceneNode>> SceneNodes;
std::vector<core::matrix4> GlobalMatrices;
std::vector<std::optional<core::Transform>> PreTransSaves;
void setN(u16 n) {

View File

@@ -185,6 +185,7 @@ class CGUIEditBox : public IGUIEditBox
bool Border;
bool Background;
bool OverrideColorEnabled;
bool InhibitLeftMouseUpOnce = false;
s32 MarkBegin;
s32 MarkEnd;
@@ -196,6 +197,7 @@ class CGUIEditBox : public IGUIEditBox
u32 BlinkStartTime;
u32 CursorBlinkTime;
core::stringw CursorChar; // IGUIFont::draw needs stringw instead of wchar_t
//! Text insertion position. Is `Text.size()` when appending (rightmost position).
s32 CursorPos;
s32 HScrollPos, VScrollPos; // scroll position in characters
u32 Max;

View File

@@ -7,23 +7,14 @@
//! An enum for the different device types supported by the Irrlicht Engine.
enum E_DEVICE_TYPE
{
//! A device native to Microsoft Windows
/** This device uses the Win32 API and works in all versions of Windows. */
EIDT_WIN32,
//! A device native to Unix style operating systems.
/** This device uses the X11 windowing system and works in Linux, Solaris, FreeBSD, OSX and
other operating systems which support X11. */
EIDT_X11,
//! A device native to Mac OSX
/** This device uses Apple's Cocoa API and works in Mac OSX 10.2 and above. */
EIDT_OSX,
//! A device which uses Simple DirectMedia Layer
/** The SDL device works under all platforms supported by SDL but first must be compiled
in by setting the USE_SDL2 CMake option to ON */
/** The SDL device works under all platforms supported by SDL. */
EIDT_SDL,
//! This selection allows Irrlicht to choose the best device from the ones available.
@@ -33,9 +24,5 @@ enum E_DEVICE_TYPE
although it may not be able to render anything. */
EIDT_BEST,
//! A device for Android platforms
/** Best used with embedded devices and mobile systems.
Does not need X11 or other graphical subsystems.
May support hw-acceleration via OpenGL-ES */
EIDT_ANDROID,
};

View File

@@ -9,6 +9,7 @@ enum E_VERTEX_ATTRIBUTES
EVA_POSITION = 0,
EVA_NORMAL,
EVA_COLOR,
EVA_AUX,
EVA_TCOORD0,
EVA_TCOORD1,
EVA_TANGENT,
@@ -21,6 +22,7 @@ const char *const sBuiltInVertexAttributeNames[] = {
"inVertexPosition",
"inVertexNormal",
"inVertexColor",
"inVertexAux",
"inTexCoord0",
"inTexCoord1",
"inVertexTangent",

View File

@@ -1,133 +0,0 @@
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#pragma once
#include "ISceneNode.h"
#include "IBoneSceneNode.h"
#include "IAnimatedMesh.h"
namespace scene
{
class IAnimatedMeshSceneNode;
//! Scene node capable of displaying an animated mesh.
class IAnimatedMeshSceneNode : public ISceneNode
{
public:
//! Constructor
IAnimatedMeshSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id,
const core::vector3df &position = core::vector3df(0, 0, 0),
const core::vector3df &rotation = core::vector3df(0, 0, 0),
const core::vector3df &scale = core::vector3df(1.0f, 1.0f, 1.0f)) :
ISceneNode(parent, mgr, id, position, rotation, scale) {}
//! Destructor
virtual ~IAnimatedMeshSceneNode() {}
//! Sets the current frame number.
/** From now on the animation is played from this frame.
\param frame: Number of the frame to let the animation be started from.
The frame number must be a valid frame number of the IMesh used by this
scene node. Set IAnimatedMesh::getMesh() for details. */
virtual void setCurrentFrame(f32 frame) = 0;
//! Sets the frame numbers between the animation is looped.
/** The default is 0 to getMaxFrameNumber() of the mesh.
Number of played frames is end-start.
It interpolates toward the last frame but stops when it is reached.
It does not interpolate back to start even when looping.
Looping animations should ensure last and first frame-key are identical.
\param begin: Start frame number of the loop.
\param end: End frame number of the loop.
\return True if successful, false if not. */
virtual bool setFrameLoop(f32 begin, f32 end) = 0;
//! Sets the speed with which the animation is played.
/** \param framesPerSecond: Frames per second played. */
virtual void setAnimationSpeed(f32 framesPerSecond) = 0;
//! Gets the speed with which the animation is played.
/** \return Frames per second played. */
virtual f32 getAnimationSpeed() const = 0;
//! Get a pointer to a joint in the mesh (if the mesh is a bone based mesh).
/** With this method it is possible to attach scene nodes to
joints for example possible to attach a weapon to the left hand
of an animated model. This example shows how:
\code
ISceneNode* hand =
yourAnimatedMeshSceneNode->getJointNode("LeftHand");
hand->addChild(weaponSceneNode);
\endcode
Please note that the joint returned by this method may not exist
before this call and the joints in the node were created by it.
\param jointName: Name of the joint.
\return Pointer to the scene node which represents the joint
with the specified name. Returns 0 if the contained mesh is not
an skinned mesh or the name of the joint could not be found. */
virtual IBoneSceneNode *getJointNode(const c8 *jointName) = 0;
//! same as getJointNode(const c8* jointName), but based on id
virtual IBoneSceneNode *getJointNode(u32 jointID) = 0;
//! Gets joint count.
/** \return Amount of joints in the mesh. */
virtual u32 getJointCount() const = 0;
//! Returns the currently displayed frame number.
virtual f32 getFrameNr() const = 0;
//! Returns the current start frame number.
virtual f32 getStartFrame() const = 0;
//! Returns the current end frame number.
virtual f32 getEndFrame() const = 0;
//! Sets looping mode which is on by default.
/** If set to false, animations will not be played looped. */
virtual void setLoopMode(bool playAnimationLooped) = 0;
//! returns the current loop mode
/** When true the animations are played looped */
virtual bool getLoopMode() const = 0;
//! Will be called right after the joints have been animated,
//! but before the transforms have been propagated recursively to children.
virtual void setOnAnimateCallback(
const std::function<void(f32 dtime)> &cb) = 0;
//! Sets if the scene node should not copy the materials of the mesh but use them in a read only style.
/** In this way it is possible to change the materials a mesh
causing all mesh scene nodes referencing this mesh to change
too. */
virtual void setReadOnlyMaterials(bool readonly) = 0;
//! Returns if the scene node should not copy the materials of the mesh but use them in a read only style
virtual bool isReadOnlyMaterials() const = 0;
//! Sets a new mesh
virtual void setMesh(IAnimatedMesh *mesh) = 0;
//! Returns the current mesh
virtual IAnimatedMesh *getMesh() = 0;
//! Sets the transition time in seconds
/** Note: You must call animateJoints(), or the mesh will not animate. */
virtual void setTransitionTime(f32 Time) = 0;
//! animates the joints in the mesh based on the current frame.
/** Also takes in to account transitions. */
virtual void animateJoints() = 0;
//! render mesh ignoring its transformation.
/** Culling is unaffected. */
virtual void setRenderFromIdentity(bool On) = 0;
//! Creates a clone of this scene node and its children.
/** \param newParent An optional new parent.
\param newManager An optional new scene manager.
\return The newly created clone of this node. */
virtual ISceneNode *clone(ISceneNode *newParent = 0, ISceneManager *newManager = 0) = 0;
};
} // end namespace scene

View File

@@ -10,7 +10,7 @@ namespace scene
{
//! Interface for bones used for skeletal animation.
/** Used with SkinnedMesh and IAnimatedMeshSceneNode. */
/** Used with SkinnedMesh and AnimatedMeshSceneNode. */
class IBoneSceneNode : public ISceneNode
{
public:

View File

@@ -14,7 +14,7 @@ namespace scene
set/getRotation and set/getScale. Its just a simple scene node that takes a
matrix as relative transformation, making it possible to insert any transformation
anywhere into the scene graph.
This scene node is for example used by the IAnimatedMeshSceneNode for emulating
This scene node is for example used by the AnimatedMeshSceneNode for emulating
joint scene nodes when playing skeletal animations.
*/
class IDummyTransformationSceneNode : public ISceneNode

View File

@@ -11,9 +11,6 @@
class IOSOperator : public virtual IReferenceCounted
{
public:
//! Get the current OS version as string.
virtual const core::stringc &getOperatingSystemVersion() const = 0;
//! Copies text to the clipboard
//! \param text: text in utf-8
virtual void copyToClipboard(const c8 *text) const = 0;
@@ -31,10 +28,4 @@ class IOSOperator : public virtual IReferenceCounted
//! This is a no-op on some platforms.
//! \return Returns 0 if no string is in there, otherwise an utf-8 string.
virtual const c8 *getTextFromPrimarySelection() const = 0;
//! Get the total and available system RAM
/** \param totalBytes: will contain the total system memory in Kilobytes (1024 B)
\param availableBytes: will contain the available memory in Kilobytes (1024 B)
\return True if successful, false if not */
virtual bool getSystemMemory(u32 *totalBytes, u32 *availableBytes) const = 0;
};

View File

@@ -71,7 +71,7 @@ enum E_SCENE_NODE_RENDER_PASS
};
class IAnimatedMesh;
class IAnimatedMeshSceneNode;
class AnimatedMeshSceneNode;
class IBillboardSceneNode;
class ICameraSceneNode;
class IDummyTransformationSceneNode;
@@ -133,7 +133,7 @@ class ISceneManager : public virtual IReferenceCounted
\param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
\return Pointer to the created scene node.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IAnimatedMeshSceneNode *addAnimatedMeshSceneNode(IAnimatedMesh *mesh,
virtual AnimatedMeshSceneNode *addAnimatedMeshSceneNode(IAnimatedMesh *mesh,
ISceneNode *parent = 0, s32 id = -1,
const core::vector3df &position = core::vector3df(0, 0, 0),
const core::vector3df &rotation = core::vector3df(0, 0, 0),

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