1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Merge remote-tracking branch 'upstream/master' into Visuals-Vol-2

This commit is contained in:
Gefüllte Taubenbrust 2024-11-17 12:02:30 +01:00
commit 00ef9b14d0
1043 changed files with 44800 additions and 28934 deletions

View file

@ -37,7 +37,7 @@ Contributions are welcome! Here's how you can help:
[Lua](http://dev.minetest.net/Lua_code_style_guidelines) code style guidelines. [Lua](http://dev.minetest.net/Lua_code_style_guidelines) code style guidelines.
- Check your code works as expected and document any changes to the Lua API. - Check your code works as expected and document any changes to the Lua API.
- To avoid conflicting changes between contributions, do not do the following manually. They will be done before each release. - To avoid conflicting changes between contributions, do not do the following manually. They will be done before each release.
- Run `updatepo.sh` or update `minetest.po{,t}` even if your code adds new translatable strings. - Run `updatepo.sh` or update `luanti.po{,t}` even if your code adds new translatable strings.
- Update `minetest.conf.example` and `settings_translation_file.cpp` even if your code adds new core settings. - Update `minetest.conf.example` and `settings_translation_file.cpp` even if your code adds new core settings.
4. Commit & [push](https://help.github.com/articles/pushing-to-a-remote/) your changes to a new branch (not `master`, one change per branch) 4. Commit & [push](https://help.github.com/articles/pushing-to-a-remote/) your changes to a new branch (not `master`, one change per branch)
@ -83,7 +83,7 @@ a stable release is on the way.
- Error logs (check the bottom of the `debug.txt` file). - Error logs (check the bottom of the `debug.txt` file).
- Screenshots. - Screenshots.
- Ways you have tried to solve the issue, and whether they worked or not. - Ways you have tried to solve the issue, and whether they worked or not.
- Your Minetest version and the content (games, mods or texture packs) you have installed. - Your Luanti version and the content (games, mods or texture packs) you have installed.
- Your platform (e.g. Windows 10 or Ubuntu 15.04 x64). - Your platform (e.g. Windows 10 or Ubuntu 15.04 x64).
After reporting you should aim to answer questions or clarifications as this After reporting you should aim to answer questions or clarifications as this
@ -99,7 +99,7 @@ possible.
## Translations ## Translations
The core translations of Minetest are performed using Weblate. You can access The core translations of Luanti are performed using Weblate. You can access
the project page with a list of current languages the project page with a list of current languages
[here](https://hosted.weblate.org/projects/minetest/minetest/). [here](https://hosted.weblate.org/projects/minetest/minetest/).
@ -110,7 +110,7 @@ translated by editing a `.tr` text file. See
## Donations ## Donations
If you'd like to monetarily support Minetest development, you can find donation If you'd like to monetarily support Luanti development, you can find donation
methods on [our website](http://www.minetest.net/development/#donate). methods on [our website](http://www.minetest.net/development/#donate).
# Maintaining # Maintaining
@ -118,7 +118,7 @@ methods on [our website](http://www.minetest.net/development/#donate).
* This is a concise version of the * This is a concise version of the
[Rules & Guidelines](http://dev.minetest.net/Category:Rules_and_Guidelines) on the developer wiki.* [Rules & Guidelines](http://dev.minetest.net/Category:Rules_and_Guidelines) on the developer wiki.*
These notes are for those who have push access Minetest (core developers / maintainers). These notes are for those who have push access Luanti (core developers / maintainers).
- See the [project organisation](http://dev.minetest.net/Organisation) for the people involved. - See the [project organisation](http://dev.minetest.net/Organisation) for the people involved.
@ -169,4 +169,4 @@ Submit a :+1: (+1) or "Looks good" comment to show you believe the pull-request
## Releasing a new version ## Releasing a new version
*Refer to [dev.minetest.net/Releasing_Minetest](http://dev.minetest.net/Releasing_Minetest)* *Refer to [dev.minetest.net/Releasing_Luanti](https://dev.minetest.net/Releasing_Luanti)*

View file

@ -6,22 +6,24 @@ body:
attributes: attributes:
value: | value: |
Please note the following: Please note the following:
1. **Please update your Minetest Engine to the latest stable or dev version** before submitting bug reports. Make sure the bug is still reproducible on the latest version.
2. This page is for reporting the bugs of **the engine itself**. For bugs in a particular game, please [search for the game in the ContentDB](https://content.minetest.net/packages/?type=game) and submit a bug report in their issue trackers. 1. **Please update Luanti to the latest stable or dev version** before submitting bug reports. Make sure the bug is still reproducible on the latest version.
* For example, you can submit issues about the Minetest Game (the official game of Minetest) [in its own repository](https://github.com/minetest/minetest_game/issues). 2. This page is for reporting the bugs of **the engine itself**. For bugs in a particular game, please [search for the game in the ContentDB](https://content.luanti.org/packages/?type=game) and submit a bug report in their issue trackers.
* For example, you can submit issues about the Minetest Game [in its own repository](https://github.com/minetest/minetest_game/issues).
3. Please provide as many details as possible for us to spot the problem quicker. 3. Please provide as many details as possible for us to spot the problem quicker.
- type: textarea - type: textarea
attributes: attributes:
label: Minetest version label: Luanti version
description: | description: |
Paste the Minetest version below. Paste the Luanti version below.
If you are on a dev version, please also indicate the git commit hash. If you are on a dev version, please also indicate the git commit hash.
Refer to the "About" tab of the menu or run `minetest --version` on the command line. Refer to the "About" tab of the menu or run `luanti --version` on the command line.
placeholder: | placeholder: |
Example: Example:
Minetest 5.7.0-dev-ca13c51 (Linux) Luanti 5.10.0-3ad6aee9b (Linux)
Using Irrlicht 1.9.0mt9 Using LuaJIT 2.1.1727870382
Using LuaJIT 2.1.0-beta3 Built by GCC 14.2
Running on Linux/6.11.5 x86_64
BUILD_TYPE=Release BUILD_TYPE=Release
RUN_IN_PLACE=1 RUN_IN_PLACE=1
USE_CURL=1 USE_CURL=1

View file

@ -4,5 +4,5 @@ contact_links:
url: https://github.com/minetest/minetest_game/issues/new/choose url: https://github.com/minetest/minetest_game/issues/new/choose
about: Only submit issues of the engine in this repository's issue tracker. Submit those of Minetest Game in its own issue tracker. about: Only submit issues of the engine in this repository's issue tracker. Submit those of Minetest Game in its own issue tracker.
- name: Search for issue trackers of third-party games - name: Search for issue trackers of third-party games
url: https://content.minetest.net/packages/?type=game url: https://content.luanti.org/packages/?type=game
about: For issues of third-party games, search for the game in the ContentDB and then submit an issue in their issue tracker. about: For issues of third-party games, search for the game in the ContentDB and then submit an issue in their issue tracker.

View file

@ -7,7 +7,7 @@ body:
value: | value: |
Please note the following: Please note the following:
1. Only submit a feature request if the feature does not exist on the latest dev version. 1. Only submit a feature request if the feature does not exist on the latest dev version.
2. This page is for suggesting changes to **the engine itself**. To suggest changes to games, please [search for the game in the ContentDB](https://content.minetest.net/packages/?type=game) and submit a feature request in their issue trackers. 2. This page is for suggesting changes to **the engine itself**. To suggest changes to games, please [search for the game in the ContentDB](https://content.luanti.org/packages/?type=game) and submit a feature request in their issue trackers.
- type: textarea - type: textarea
attributes: attributes:
label: Problem label: Problem

2
.github/SECURITY.md vendored
View file

@ -14,7 +14,7 @@ to give us time to fix them. You can do that by emailing one of the following ad
* rubenwardy@minetest.net * rubenwardy@minetest.net
Depending on severity, we will either create a private issue for the vulnerability Depending on severity, we will either create a private issue for the vulnerability
and release a patch version of Minetest, or give you permission to file the issue publicly. and release a patch version of Luanti, or give you permission to file the issue publicly.
For more information on the justification of this policy, see For more information on the justification of this policy, see
[Responsible Disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure). [Responsible Disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure).

View file

@ -12,6 +12,7 @@ on:
- 'irr/**.cpp' - 'irr/**.cpp'
- '**/CMakeLists.txt' - '**/CMakeLists.txt'
- 'cmake/Modules/**' - 'cmake/Modules/**'
- 'po/**.po'
- 'android/**' - 'android/**'
- '.github/workflows/android.yml' - '.github/workflows/android.yml'
pull_request: pull_request:
@ -24,6 +25,7 @@ on:
- 'irr/**.cpp' - 'irr/**.cpp'
- '**/CMakeLists.txt' - '**/CMakeLists.txt'
- 'cmake/Modules/**' - 'cmake/Modules/**'
- 'po/**.po'
- 'android/**' - 'android/**'
- '.github/workflows/android.yml' - '.github/workflows/android.yml'
@ -50,25 +52,25 @@ jobs:
- name: Save AAB artifact - name: Save AAB artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Minetest-release.aab name: Luanti-release.aab
path: android/app/build/outputs/bundle/release/app-release.aab path: android/app/build/outputs/bundle/release/app-release.aab
- name: Save armeabi artifact - name: Save armeabi artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Minetest-armeabi-v7a.apk name: Luanti-armeabi-v7a.apk
path: android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk path: android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk
- name: Save arm64 artifact - name: Save arm64 artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Minetest-arm64-v8a.apk name: Luanti-arm64-v8a.apk
path: android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk path: android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk
- name: Save x86 artifact - name: Save x86 artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Minetest-x86.apk name: Luanti-x86.apk
path: android/app/build/outputs/apk/release/app-x86-release-unsigned.apk path: android/app/build/outputs/apk/release/app-x86-release-unsigned.apk
- name: Save x86_64 artifact - name: Save x86_64 artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Minetest-x86_64.apk name: Luanti-x86_64.apk
path: android/app/build/outputs/apk/release/app-x86_64-release-unsigned.apk path: android/app/build/outputs/apk/release/app-x86_64-release-unsigned.apk

View file

@ -72,8 +72,8 @@ jobs:
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: | labels: |
org.opencontainers.image.title=Minetest org.opencontainers.image.title=Luanti
org.opencontainers.image.vendor=Minetest org.opencontainers.image.vendor=Luanti
org.opencontainers.image.licenses=LGPL-2.1-only org.opencontainers.image.licenses=LGPL-2.1-only
# Build and push Docker image # Build and push Docker image
@ -94,5 +94,5 @@ jobs:
- name: Test Docker Image - name: Test Docker Image
run: | run: |
docker run --rm $(cut -d, -f1 <<<"$DOCKER_METADATA_OUTPUT_TAGS") minetestserver --version docker run --rm $(cut -d, -f1 <<<"$DOCKER_METADATA_OUTPUT_TAGS") luantiserver --version
shell: bash shell: bash

View file

@ -12,9 +12,8 @@ on:
- 'irr/**.cpp' - 'irr/**.cpp'
- '**/CMakeLists.txt' - '**/CMakeLists.txt'
- 'cmake/Modules/**' - 'cmake/Modules/**'
- 'po/**.po'
- 'util/ci/**' - 'util/ci/**'
- 'Dockerfile'
- '.dockerignore'
- '.github/workflows/linux.yml' - '.github/workflows/linux.yml'
pull_request: pull_request:
paths: paths:
@ -26,9 +25,8 @@ on:
- 'irr/**.cpp' - 'irr/**.cpp'
- '**/CMakeLists.txt' - '**/CMakeLists.txt'
- 'cmake/Modules/**' - 'cmake/Modules/**'
- 'po/**.po'
- 'util/ci/**' - 'util/ci/**'
- 'Dockerfile'
- '.dockerignore'
- '.github/workflows/linux.yml' - '.github/workflows/linux.yml'
env: env:
@ -54,7 +52,7 @@ jobs:
- name: Test - name: Test
run: | run: |
./bin/minetest --run-unittests ./bin/luanti --run-unittests
# Current gcc version # Current gcc version
gcc_14: gcc_14:
@ -78,7 +76,7 @@ jobs:
mkdir nowrite mkdir nowrite
chmod a-w nowrite chmod a-w nowrite
cd nowrite cd nowrite
../bin/minetest --run-unittests ../bin/luanti --run-unittests
# Older clang version (should be close to our minimum supported version) # Older clang version (should be close to our minimum supported version)
clang_7: clang_7:
@ -100,7 +98,7 @@ jobs:
- name: Unittest - name: Unittest
run: | run: |
./bin/minetest --run-unittests ./bin/luanti --run-unittests
# Do this here because we have ASan and error paths are sensitive to dangling pointers # Do this here because we have ASan and error paths are sensitive to dangling pointers
- name: Test error cases - name: Test error cases
@ -126,7 +124,7 @@ jobs:
- name: Test - name: Test
run: | run: |
./bin/minetest --run-unittests ./bin/luanti --run-unittests
- name: Integration test + devtest - name: Integration test + devtest
run: | run: |
@ -156,4 +154,4 @@ jobs:
- name: Test - name: Test
run: | run: |
./bin/minetestserver --run-unittests ./bin/luantiserver --run-unittests

View file

@ -13,6 +13,7 @@ on:
- 'irr/**.mm' # Objective-C(++) - 'irr/**.mm' # Objective-C(++)
- '**/CMakeLists.txt' - '**/CMakeLists.txt'
- 'cmake/Modules/**' - 'cmake/Modules/**'
- 'po/**.po'
- '.github/workflows/macos.yml' - '.github/workflows/macos.yml'
pull_request: pull_request:
paths: paths:
@ -25,10 +26,11 @@ on:
- 'irr/**.mm' # Objective-C(++) - 'irr/**.mm' # Objective-C(++)
- '**/CMakeLists.txt' - '**/CMakeLists.txt'
- 'cmake/Modules/**' - 'cmake/Modules/**'
- 'po/**.po'
- '.github/workflows/macos.yml' - '.github/workflows/macos.yml'
jobs: jobs:
build: build-intel-macos:
# use lowest possible macOS running on x86_64 supported by brew to support more users # use lowest possible macOS running on x86_64 supported by brew to support more users
runs-on: macos-13 runs-on: macos-13
steps: steps:
@ -53,7 +55,7 @@ jobs:
- name: Test - name: Test
run: | run: |
./build/macos/minetest.app/Contents/MacOS/minetest --run-unittests ./build/macos/luanti.app/Contents/MacOS/luanti --run-unittests
# Zipping the built .app preserves permissions on the contained files, # Zipping the built .app preserves permissions on the contained files,
# which the GitHub artifact pipeline would otherwise strip away. # which the GitHub artifact pipeline would otherwise strip away.
@ -66,5 +68,46 @@ jobs:
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: minetest-macos name: luanti-macos
path: ./build/macos/*.zip path: ./build/macos/*.zip
build-arm-macos-xcode:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
source ./util/ci/common.sh
install_macos_deps
# brew jsoncpp do not include libjsoncpp.a, and if installed header conflict caused build failure
brew uninstall jsoncpp
- name: Build with Cmake
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_OSX_DEPLOYMENT_TARGET=14 \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DCMAKE_INSTALL_PREFIX=../build/macos/ \
-DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE \
-DENABLE_SYSTEM_JSONCPP=OFF
cmake --build . -j$(sysctl -n hw.logicalcpu)
make install
- name: Build and Archive with Xcode
run: |
mkdir build_xcode
cd build_xcode
../util/ci/build_xcode.sh
- name: Tests
run: |
mkdir -p "${HOME}/Library/Application Support/minetest/games/"
ln -s "${PWD}/games/devtest" "${HOME}/Library/Application Support/minetest/games/"
./build/macos/luanti.app/Contents/MacOS/luanti --run-unittests
./build_xcode/luanti.xcarchive/Products/Applications/luanti.app/Contents/MacOS/luanti --run-unittests
- name: Diff Resources
run: |
diff -rd ./build/macos/luanti.app/Contents/Resources ./build_xcode/build/Release/luanti.app/Contents/Resources || exit 1
diff -rd ./build/macos/luanti.app/Contents/Resources ./build_xcode/luanti.xcarchive/Products/Applications/luanti.app/Contents/Resources || exit 1

View file

@ -12,6 +12,7 @@ on:
- 'irr/**.cpp' - 'irr/**.cpp'
- '**/CMakeLists.txt' - '**/CMakeLists.txt'
- 'cmake/Modules/**' - 'cmake/Modules/**'
- 'po/**.po'
- 'util/buildbot/**' - 'util/buildbot/**'
- 'misc/*.manifest' - 'misc/*.manifest'
- '.github/workflows/windows.yml' - '.github/workflows/windows.yml'
@ -25,6 +26,7 @@ on:
- 'irr/**.cpp' - 'irr/**.cpp'
- '**/CMakeLists.txt' - '**/CMakeLists.txt'
- 'cmake/Modules/**' - 'cmake/Modules/**'
- 'po/**.po'
- 'util/buildbot/**' - 'util/buildbot/**'
- 'misc/*.manifest' - 'misc/*.manifest'
- '.github/workflows/windows.yml' - '.github/workflows/windows.yml'
@ -56,8 +58,8 @@ jobs:
run: | run: |
dest=$(mktemp -d) dest=$(mktemp -d)
unzip -q -d "$dest" B/build/*.zip unzip -q -d "$dest" B/build/*.zip
cd "$dest"/minetest-*-win* cd "$dest"/luanti-*-win*
wine bin/minetest.exe --version wine bin/luanti.exe --version
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
@ -103,7 +105,7 @@ jobs:
vcpkgGitCommitId: ${{ env.VCPKG_VERSION }} vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }} vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
- name: Minetest CMake - name: CMake
run: | run: |
cmake ${{matrix.config.generator}} ` cmake ${{matrix.config.generator}} `
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" ` -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
@ -113,13 +115,13 @@ jobs:
-DREQUIRE_LUAJIT=TRUE ` -DREQUIRE_LUAJIT=TRUE `
-DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }} . -DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }} .
- name: Build Minetest - name: Build
run: cmake --build . --config Release run: cmake --build . --config Release
- name: Unittests - name: Unittests
# need this workaround for stdout to work # need this workaround for stdout to work
run: | run: |
$proc = start .\bin\Release\minetest.exe --run-unittests -NoNewWindow -Wait -PassThru $proc = start .\bin\Release\luanti.exe --run-unittests -NoNewWindow -Wait -PassThru
exit $proc.ExitCode exit $proc.ExitCode
continue-on-error: true # FIXME!! continue-on-error: true # FIXME!!

View file

@ -15,6 +15,7 @@ read_globals = {
"fgettext", "fgettext_ne", "fgettext", "fgettext_ne",
"vector", "vector",
"VoxelArea", "VoxelArea",
"VoxelManip",
"profiler", "profiler",
"Settings", "Settings",
"PerlinNoise", "PerlinNoiseMap", "PerlinNoise", "PerlinNoiseMap",

View file

@ -72,3 +72,4 @@ Lars Müller <appgurulars@gmx.de>
Lars Müller <appgurulars@gmx.de> <34514239+appgurueu@users.noreply.github.com> Lars Müller <appgurulars@gmx.de> <34514239+appgurueu@users.noreply.github.com>
ROllerozxa <rollerozxa@voxelmanip.se> ROllerozxa <rollerozxa@voxelmanip.se>
ROllerozxa <rollerozxa@voxelmanip.se> <temporaryemail4meh+github@gmail.com> ROllerozxa <rollerozxa@voxelmanip.se> <temporaryemail4meh+github@gmail.com>
Ælla Chiana Moskopp <erle@dieweltistgarnichtso.net> <nils@dieweltistgarnichtso.net>

View file

@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.12) cmake_minimum_required(VERSION 3.12)
# This can be read from ${PROJECT_NAME} after project() is called # This can be read from ${PROJECT_NAME} after project() is called
project(minetest) project(luanti)
set(PROJECT_NAME_CAPITALIZED "Minetest") set(PROJECT_NAME_CAPITALIZED "Luanti")
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
@ -11,7 +11,7 @@ set(CLANG_MINIMUM_VERSION "7.0.1")
# You should not need to edit these manually, use util/bump_version.sh # You should not need to edit these manually, use util/bump_version.sh
set(VERSION_MAJOR 5) set(VERSION_MAJOR 5)
set(VERSION_MINOR 10) set(VERSION_MINOR 11)
set(VERSION_PATCH 0) set(VERSION_PATCH 0)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string") set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
@ -92,7 +92,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
# Load default options for Android # Load default options for Android
if(ANDROID) if(ANDROID)
cmake_minimum_required(VERSION 3.20) cmake_minimum_required(VERSION 3.20)
include(MinetestAndroidLibs) include(AndroidLibs)
endif() endif()
@ -261,23 +261,27 @@ install(FILES "doc/world_format.md" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}") install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
install(FILES "doc/minetest.6" "doc/minetestserver.6" DESTINATION "${MANDIR}/man6") install(FILES "doc/luanti.6" "doc/luantiserver.6" DESTINATION "${MANDIR}/man6")
install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}") install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}")
install(FILES "misc/net.minetest.minetest.metainfo.xml" DESTINATION "${METAINFODIR}") install(FILES "misc/net.minetest.minetest.metainfo.xml" DESTINATION "${METAINFODIR}")
install(FILES "misc/minetest.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps") install(FILES "misc/luanti.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
install(FILES "misc/minetest-xorg-icon-128.png" install(FILES "misc/luanti-xorg-icon-128.png"
DESTINATION "${ICONDIR}/hicolor/128x128/apps" DESTINATION "${ICONDIR}/hicolor/128x128/apps"
RENAME "minetest.png") RENAME "luanti.png")
endif() endif()
if(APPLE) if(APPLE)
install(FILES "misc/minetest-icon.icns" DESTINATION "${SHAREDIR}") install(FILES "misc/luanti-icon.icns" DESTINATION "${SHAREDIR}")
install(FILES "misc/Info.plist" DESTINATION "${BUNDLE_PATH}/Contents") install(FILES "${CMAKE_BINARY_DIR}/Info.plist" DESTINATION "${BUNDLE_PATH}/Contents")
endif()
if(CMAKE_GENERATOR STREQUAL "Xcode")
set(client_RESOURCES "${CMAKE_SOURCE_DIR}/misc/luanti-icon.icns")
endif() endif()
# Library pack # Library pack
find_package(GMP REQUIRED) find_package(GMP REQUIRED)
find_package(Json REQUIRED) find_package(Json 1.0.0 REQUIRED)
find_package(Lua REQUIRED) find_package(Lua REQUIRED)
if(NOT USE_LUAJIT) if(NOT USE_LUAJIT)
add_subdirectory(lib/bitop) add_subdirectory(lib/bitop)
@ -307,7 +311,7 @@ include(CPackComponent)
cpack_add_component(Docs cpack_add_component(Docs
DISPLAY_NAME "Documentation" DISPLAY_NAME "Documentation"
DESCRIPTION "Documentation about Minetest and Minetest modding" DESCRIPTION "Documentation about ${PROJECT_NAME_CAPITALIZED} and ${PROJECT_NAME_CAPITALIZED} modding"
) )
if(WIN32) if(WIN32)
@ -331,7 +335,7 @@ if(WIN32)
set(CPACK_CREATE_DESKTOP_LINKS ${PROJECT_NAME}) set(CPACK_CREATE_DESKTOP_LINKS ${PROJECT_NAME})
set(CPACK_PACKAGING_INSTALL_PREFIX "/${PROJECT_NAME_CAPITALIZED}") set(CPACK_PACKAGING_INSTALL_PREFIX "/${PROJECT_NAME_CAPITALIZED}")
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/misc/minetest-icon.ico") set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/misc/luanti-icon.ico")
# Supported languages can be found at # Supported languages can be found at
# http://wixtoolset.org/documentation/manual/v3/wixui/wixui_localization.html # http://wixtoolset.org/documentation/manual/v3/wixui/wixui_localization.html
#set(CPACK_WIX_CULTURES "ar-SA,bg-BG,ca-ES,hr-HR,cs-CZ,da-DK,nl-NL,en-US,et-EE,fi-FI,fr-FR,de-DE") #set(CPACK_WIX_CULTURES "ar-SA,bg-BG,ca-ES,hr-HR,cs-CZ,da-DK,nl-NL,en-US,et-EE,fi-FI,fr-FR,de-DE")

View file

@ -32,22 +32,22 @@ RUN git clone --recursive https://github.com/jupp0r/prometheus-cpp && \
FROM dev as builder FROM dev as builder
COPY .git /usr/src/minetest/.git COPY .git /usr/src/luanti/.git
COPY CMakeLists.txt /usr/src/minetest/CMakeLists.txt COPY CMakeLists.txt /usr/src/luanti/CMakeLists.txt
COPY README.md /usr/src/minetest/README.md COPY README.md /usr/src/luanti/README.md
COPY minetest.conf.example /usr/src/minetest/minetest.conf.example COPY minetest.conf.example /usr/src/luanti/minetest.conf.example
COPY builtin /usr/src/minetest/builtin COPY builtin /usr/src/luanti/builtin
COPY cmake /usr/src/minetest/cmake COPY cmake /usr/src/luanti/cmake
COPY doc /usr/src/minetest/doc COPY doc /usr/src/luanti/doc
COPY fonts /usr/src/minetest/fonts COPY fonts /usr/src/luanti/fonts
COPY lib /usr/src/minetest/lib COPY lib /usr/src/luanti/lib
COPY misc /usr/src/minetest/misc COPY misc /usr/src/luanti/misc
COPY po /usr/src/minetest/po COPY po /usr/src/luanti/po
COPY src /usr/src/minetest/src COPY src /usr/src/luanti/src
COPY irr /usr/src/minetest/irr COPY irr /usr/src/luanti/irr
COPY textures /usr/src/minetest/textures COPY textures /usr/src/luanti/textures
WORKDIR /usr/src/minetest WORKDIR /usr/src/luanti
RUN cmake -B build \ RUN cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr/local \ -DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
@ -68,9 +68,9 @@ RUN apk add --no-cache curl gmp libstdc++ libgcc libpq jsoncpp zstd-libs \
WORKDIR /var/lib/minetest WORKDIR /var/lib/minetest
COPY --from=builder /usr/local/share/minetest /usr/local/share/minetest COPY --from=builder /usr/local/share/luanti /usr/local/share/luanti
COPY --from=builder /usr/local/bin/minetestserver /usr/local/bin/minetestserver COPY --from=builder /usr/local/bin/luantiserver /usr/local/bin/luantiserver
COPY --from=builder /usr/local/share/doc/minetest/minetest.conf.example /etc/minetest/minetest.conf COPY --from=builder /usr/local/share/doc/luanti/minetest.conf.example /etc/minetest/minetest.conf
COPY --from=builder /usr/local/lib/libspatialindex* /usr/local/lib/ COPY --from=builder /usr/local/lib/libspatialindex* /usr/local/lib/
COPY --from=builder /usr/local/lib/libluajit* /usr/local/lib/ COPY --from=builder /usr/local/lib/libluajit* /usr/local/lib/
USER minetest:minetest USER minetest:minetest
@ -78,5 +78,5 @@ USER minetest:minetest
EXPOSE 30000/udp 30000/tcp EXPOSE 30000/udp 30000/tcp
VOLUME /var/lib/minetest/ /etc/minetest/ VOLUME /var/lib/minetest/ /etc/minetest/
ENTRYPOINT ["/usr/local/bin/minetestserver"] ENTRYPOINT ["/usr/local/bin/luantiserver"]
CMD ["--config", "/etc/minetest/minetest.conf"] CMD ["--config", "/etc/minetest/minetest.conf"]

View file

@ -1,8 +1,8 @@
License of Minetest textures and sounds License of Luanti textures and sounds
--------------------------------------- ---------------------------------------
This applies to textures and sounds contained in the main Minetest This applies to textures and sounds contained in the main Luanti
distribution. distribution.
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
@ -29,7 +29,6 @@ ShadowNinja:
textures/base/pack/smoke_puff.png textures/base/pack/smoke_puff.png
paramat: paramat:
textures/base/pack/menu_header.png
textures/base/pack/next_icon.png textures/base/pack/next_icon.png
textures/base/pack/prev_icon.png textures/base/pack/prev_icon.png
textures/base/pack/clear.png textures/base/pack/clear.png
@ -39,10 +38,10 @@ rubenwardy, paramat:
textures/base/pack/start_icon.png textures/base/pack/start_icon.png
textures/base/pack/end_icon.png textures/base/pack/end_icon.png
erlehmann: erle:
misc/minetest-icon-24x24.png misc/luanti-icon-24x24.png
misc/minetest-icon.ico misc/luanti-icon.ico
misc/minetest.svg misc/luanti.svg
textures/base/pack/logo.png textures/base/pack/logo.png
JRottm: JRottm:
@ -68,7 +67,7 @@ Zughy:
appgurueu: appgurueu:
textures/base/pack/server_incompatible.png textures/base/pack/server_incompatible.png
erlehmann, Warr1024, rollerozxa: erle, Warr1024, rollerozxa:
textures/base/pack/no_screenshot.png textures/base/pack/no_screenshot.png
kilbith: kilbith:
@ -88,12 +87,17 @@ DS:
grorp: grorp:
textures/base/pack/exit_btn.png textures/base/pack/exit_btn.png
textures/base/pack/menu_header.png
using the font "undefined medium" (https://undefined-medium.com/),
which is licensed under the SIL Open Font License, Version 1.1
modified by DS
License of Minetest source code License of Luanti source code
------------------------------- -------------------------------
Minetest Luanti
Copyright (C) 2010-2018 celeron55, Perttu Ahola <celeron55@gmail.com> Copyright (C) 2010-2024 celeron55, Perttu Ahola <celeron55@gmail.com>
and contributors (see source file comments and the version control log)
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
@ -112,7 +116,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Irrlicht Irrlicht
--------------- ---------------
This program uses IrrlichtMt, Minetest's fork of This program uses IrrlichtMt, Luanti's fork of
the Irrlicht Engine. http://irrlicht.sourceforge.net/ the Irrlicht Engine. http://irrlicht.sourceforge.net/
The Irrlicht Engine License The Irrlicht Engine License

View file

@ -1,13 +1,13 @@
Minetest Luanti (formerly Minetest)
======== ==========================
![Build Status](https://github.com/minetest/minetest/workflows/build/badge.svg) ![Build Status](https://github.com/minetest/minetest/workflows/build/badge.svg)
[![Translation status](https://hosted.weblate.org/widgets/minetest/-/svg-badge.svg)](https://hosted.weblate.org/engage/minetest/?utm_source=widget) [![Translation status](https://hosted.weblate.org/widgets/minetest/-/svg-badge.svg)](https://hosted.weblate.org/engage/minetest/?utm_source=widget)
[![License](https://img.shields.io/badge/license-LGPLv2.1%2B-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) [![License](https://img.shields.io/badge/license-LGPLv2.1%2B-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
Minetest is a free open-source voxel game engine with easy modding and game creation. Luanti is a free open-source voxel game engine with easy modding and game creation.
Copyright (C) 2010-2022 Perttu Ahola <celeron55@gmail.com> Copyright (C) 2010-2024 Perttu Ahola <celeron55@gmail.com>
and contributors (see source file comments and the version control log) and contributors (see source file comments and the version control log)
Table of Contents Table of Contents
@ -25,9 +25,9 @@ Table of Contents
Further documentation Further documentation
---------------------- ----------------------
- Website: https://www.minetest.net/ - Website: https://www.luanti.org/
- Wiki: https://wiki.minetest.net/ - Wiki: https://wiki.minetest.net/
- Forum: https://forum.minetest.net/ - Forum: https://forum.luanti.org/
- GitHub: https://github.com/minetest/minetest/ - GitHub: https://github.com/minetest/minetest/
- [Developer documentation](doc/developing/) - [Developer documentation](doc/developing/)
- [doc/](doc/) directory of source distribution - [doc/](doc/) directory of source distribution
@ -106,7 +106,7 @@ Configuration file
------------------ ------------------
- Default location: - Default location:
`user/minetest.conf` `user/minetest.conf`
- This file is created by closing Minetest for the first time. - This file is created by closing Luanti for the first time.
- A specific file can be specified on the command line: - A specific file can be specified on the command line:
`--config <path-to-file>` `--config <path-to-file>`
- A run-in-place build will look for the configuration file in - A run-in-place build will look for the configuration file in

View file

@ -95,7 +95,7 @@ task prepareAssets() {
def moPath = "${assetsFolder}/locale/${poFile.parentFile.name}/LC_MESSAGES/" def moPath = "${assetsFolder}/locale/${poFile.parentFile.name}/LC_MESSAGES/"
file(moPath).mkdirs() file(moPath).mkdirs()
exec { exec {
commandLine 'msgfmt', '-o', "${moPath}/minetest.mo", poFile commandLine 'msgfmt', '-o', "${moPath}/luanti.mo", poFile
} }
} }
@ -103,7 +103,7 @@ task prepareAssets() {
} }
task zipAssets(dependsOn: prepareAssets, type: Zip) { task zipAssets(dependsOn: prepareAssets, type: Zip) {
archiveFileName = "Minetest.zip" archiveFileName = "assets.zip"
from assetsFolder from assetsFolder
destinationDirectory = file("src/main/assets") destinationDirectory = file("src/main/assets")
} }
@ -113,7 +113,7 @@ preBuild.dependsOn zipAssets
prepareAssets.dependsOn ':native:getDeps' prepareAssets.dependsOn ':native:getDeps'
clean { clean {
delete new File("src/main/assets", "Minetest.zip") delete new File("src/main/assets", "assets.zip")
} }
dependencies { dependencies {

View file

@ -43,9 +43,6 @@
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
</intent-filter> </intent-filter>
<meta-data
android:name="android.app.lib_name"
android:value="minetest" />
</activity> </activity>
<service <service

View file

@ -52,7 +52,7 @@ import java.util.Objects;
public class GameActivity extends SDLActivity { public class GameActivity extends SDLActivity {
@Override @Override
protected String getMainSharedObject() { protected String getMainSharedObject() {
return getContext().getApplicationInfo().nativeLibraryDir + "/libminetest.so"; return getContext().getApplicationInfo().nativeLibraryDir + "/libluanti.so";
} }
@Override @Override
@ -63,7 +63,7 @@ public class GameActivity extends SDLActivity {
@Override @Override
protected String[] getLibraries() { protected String[] getLibraries() {
return new String[] { return new String[] {
"minetest" "luanti"
}; };
} }

View file

@ -73,7 +73,7 @@ public class UnzipService extends IntentService {
@Override @Override
protected void onHandleIntent(Intent intent) { protected void onHandleIntent(Intent intent) {
Notification.Builder notificationBuilder = createNotification(); Notification.Builder notificationBuilder = createNotification();
final File zipFile = new File(getCacheDir(), "Minetest.zip"); final File zipFile = new File(getCacheDir(), "assets.zip");
try { try {
setIsRunning(true); setIsRunning(true);
File userDataDirectory = Utils.getUserDataDirectory(this); File userDataDirectory = Utils.getUserDataDirectory(this);

View file

@ -277,6 +277,7 @@ public class HIDDeviceManager {
0x044f, // Thrustmaster 0x044f, // Thrustmaster
0x045e, // Microsoft 0x045e, // Microsoft
0x0738, // Mad Catz 0x0738, // Mad Catz
0x0b05, // ASUS
0x0e6f, // PDP 0x0e6f, // PDP
0x0f0d, // Hori 0x0f0d, // Hori
0x10f5, // Turtle Beach 0x10f5, // Turtle Beach
@ -590,7 +591,13 @@ public class HIDDeviceManager {
} else { } else {
flags = 0; flags = 0;
} }
if (Build.VERSION.SDK_INT >= 33 /* Android 14.0 (U) */) {
Intent intent = new Intent(HIDDeviceManager.ACTION_USB_PERMISSION);
intent.setPackage(mContext.getPackageName());
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, intent, flags));
} else {
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags)); mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
}
} catch (Exception e) { } catch (Exception e) {
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice); Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
HIDDeviceOpenResult(deviceID, false); HIDDeviceOpenResult(deviceID, false);

View file

@ -38,6 +38,10 @@ public class SDL {
} }
public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError, SecurityException, NullPointerException { public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
loadLibrary(libraryName, mContext);
}
public static void loadLibrary(String libraryName, Context context) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
if (libraryName == null) { if (libraryName == null) {
throw new NullPointerException("No library name provided."); throw new NullPointerException("No library name provided.");
@ -53,10 +57,10 @@ public class SDL {
// To use ReLinker, just add it as a dependency. For more information, see // To use ReLinker, just add it as a dependency. For more information, see
// https://github.com/KeepSafe/ReLinker for ReLinker's repository. // https://github.com/KeepSafe/ReLinker for ReLinker's repository.
// //
Class<?> relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker"); Class<?> relinkClass = context.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
Class<?> relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener"); Class<?> relinkListenerClass = context.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
Class<?> contextClass = mContext.getClassLoader().loadClass("android.content.Context"); Class<?> contextClass = context.getClassLoader().loadClass("android.content.Context");
Class<?> stringClass = mContext.getClassLoader().loadClass("java.lang.String"); Class<?> stringClass = context.getClassLoader().loadClass("java.lang.String");
// Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if // Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if
// they've changed during updates. // they've changed during updates.
@ -66,7 +70,7 @@ public class SDL {
// Actually load the library! // Actually load the library!
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass); Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
loadMethod.invoke(relinkInstance, mContext, libraryName, null, null); loadMethod.invoke(relinkInstance, context, libraryName, null, null);
} }
catch (final Throwable e) { catch (final Throwable e) {
// Fall back // Fall back

View file

@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
private static final String TAG = "SDL"; private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 2; private static final int SDL_MAJOR_VERSION = 2;
private static final int SDL_MINOR_VERSION = 30; private static final int SDL_MINOR_VERSION = 30;
private static final int SDL_MICRO_VERSION = 1; private static final int SDL_MICRO_VERSION = 8;
/* /*
// Display InputType.SOURCE/CLASS of events and devices // Display InputType.SOURCE/CLASS of events and devices
// //
@ -89,7 +89,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
| InputDevice.SOURCE_CLASS_POSITION | InputDevice.SOURCE_CLASS_POSITION
| InputDevice.SOURCE_CLASS_TRACKBALL); | InputDevice.SOURCE_CLASS_TRACKBALL);
if (s2 != 0) cls += "Some_Unkown"; if (s2 != 0) cls += "Some_Unknown";
s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class; s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
@ -163,7 +163,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
if (s == FLAG_TAINTED) src += " FLAG_TAINTED"; if (s == FLAG_TAINTED) src += " FLAG_TAINTED";
s2 &= ~FLAG_TAINTED; s2 &= ~FLAG_TAINTED;
if (s2 != 0) src += " Some_Unkown"; if (s2 != 0) src += " Some_Unknown";
Log.v(TAG, prefix + "int=" + s_copy + " CLASS={" + cls + " } source(s):" + src); Log.v(TAG, prefix + "int=" + s_copy + " CLASS={" + cls + " } source(s):" + src);
} }
@ -281,7 +281,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
// Load the .so // Load the .so
public void loadLibraries() { public void loadLibraries() {
for (String lib : getLibraries()) { for (String lib : getLibraries()) {
SDL.loadLibrary(lib); SDL.loadLibrary(lib, this);
} }
} }
@ -995,8 +995,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
/* No valid hint, nothing is explicitly allowed */ /* No valid hint, nothing is explicitly allowed */
if (!is_portrait_allowed && !is_landscape_allowed) { if (!is_portrait_allowed && !is_landscape_allowed) {
if (resizable) { if (resizable) {
/* All orientations are allowed */ /* All orientations are allowed, respecting user orientation lock setting */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR; req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
} else { } else {
/* Fixed window and nothing specified. Get orientation from w/h of created window */ /* Fixed window and nothing specified. Get orientation from w/h of created window */
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT); req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
@ -1005,8 +1005,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
/* At least one orientation is allowed */ /* At least one orientation is allowed */
if (resizable) { if (resizable) {
if (is_portrait_allowed && is_landscape_allowed) { if (is_portrait_allowed && is_landscape_allowed) {
/* hint allows both landscape and portrait, promote to full sensor */ /* hint allows both landscape and portrait, promote to full user */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR; req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
} else { } else {
/* Use the only one allowed "orientation" */ /* Use the only one allowed "orientation" */
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait); req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);

View file

@ -546,6 +546,7 @@ class SDLHapticHandler {
if (haptic == null) { if (haptic == null) {
InputDevice device = InputDevice.getDevice(deviceIds[i]); InputDevice device = InputDevice.getDevice(deviceIds[i]);
Vibrator vib = device.getVibrator(); Vibrator vib = device.getVibrator();
if (vib != null) {
if (vib.hasVibrator()) { if (vib.hasVibrator()) {
haptic = new SDLHaptic(); haptic = new SDLHaptic();
haptic.device_id = deviceIds[i]; haptic.device_id = deviceIds[i];
@ -556,6 +557,7 @@ class SDLHapticHandler {
} }
} }
} }
}
/* Check VIBRATOR_SERVICE */ /* Check VIBRATOR_SERVICE */
Vibrator vib = (Vibrator) SDL.getContext().getSystemService(Context.VIBRATOR_SERVICE); Vibrator vib = (Vibrator) SDL.getContext().getSystemService(Context.VIBRATOR_SERVICE);

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="loading">Lädt…</string>
<string name="unzip_notification_title">Luanti lädt</string>
<string name="unzip_notification_description">Weniger als 1 Minute…</string>
<string name="ime_dialog_done">Fertig</string>
<string name="no_web_browser">Kein Web-Browser gefunden</string>
<string name="notification_channel_name">Allgemeine Benachrichtigung</string>
<string name="notification_channel_description">Benachrichtigungen von Luanti</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="unzip_notification_description">Menos de 1 minuto…</string>
<string name="ime_dialog_done">Hecho</string>
<string name="no_web_browser">No se encontró ningún navegador web</string>
<string name="loading">Cargando…</string>
<string name="notification_channel_name">Notificación General</string>
<string name="label">Luanti</string>
<string name="notification_channel_description">Notificaciones de Luanti</string>
<string name="unzip_notification_title">Cargando Luanti</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="no_web_browser">No se encontró ningún navegador web</string>
<string name="loading">Cargando…</string>
<string name="notification_channel_description">Notificaciones de Luanti</string>
<string name="unzip_notification_description">Menos de 1 minuto…</string>
<string name="ime_dialog_done">Hecho</string>
<string name="label">Luanti</string>
<string name="unzip_notification_title">Cargando Luanti</string>
<string name="notification_channel_name">Notificación General</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="loading">Betöltés…</string>
<string name="notification_channel_name">Általános értesítés</string>
<string name="notification_channel_description">Értesítések a Luanti-től</string>
<string name="unzip_notification_title">Luanti betöltése…</string>
<string name="ime_dialog_done">Kész</string>
<string name="no_web_browser">Nem található webböngésző</string>
<string name="label">Luanti</string>
<string name="unzip_notification_description">Kevesebb, mint 1 perc…</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="no_web_browser">Tidak ditemukan peramban web</string>
<string name="ime_dialog_done">Selesai</string>
<string name="label">Luanti</string>
<string name="loading">Memuat…</string>
<string name="notification_channel_name">Pemberitahuan umum</string>
<string name="unzip_notification_description">Kurang dari 1 menit…</string>
<string name="notification_channel_description">Pemberitahuan dari Luanti</string>
<string name="unzip_notification_title">Memuat Luanti…</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="notification_channel_description">Pemberitahuan dari Luanti</string>
<string name="unzip_notification_title">Memuatkan Luanti…</string>
<string name="unzip_notification_description">Kurang dari 1 minit…</string>
<string name="no_web_browser">Tiada pelayar sesawang dijumpai</string>
<string name="loading">Memuatkan…</string>
<string name="notification_channel_name">Pemberitahuan umum</string>
<string name="ime_dialog_done">Selesai</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="loading">Laster inn …</string>
<string name="notification_channel_name">Generell merknad</string>
<string name="notification_channel_description">Merknader fra Luanti</string>
<string name="unzip_notification_description">Mindre enn ett minutt …</string>
<string name="ime_dialog_done">Ferdig</string>
<string name="no_web_browser">Fant ingen nettleser</string>
<string name="unzip_notification_title">Laster inn Luanti …</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="unzip_notification_title">Загрузка Luanti</string>
<string name="unzip_notification_description">Меньше чам за 1 минуту…</string>
<string name="ime_dialog_done">Готово</string>
<string name="label">Luаnti</string>
<string name="notification_channel_description">Уведомления от Luanti</string>
<string name="notification_channel_name">Основные уведомления</string>
<string name="loading">Загрузка…</string>
<string name="no_web_browser">Не найдено веб-браузера</string>
</resources>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="label">Minetest</string> <string name="label">Luanti</string>
<string name="loading">Loading&#8230;</string> <string name="loading">Loading&#8230;</string>
<string name="notification_channel_name">General notification</string> <string name="notification_channel_name">General notification</string>
<string name="notification_channel_description">Notifications from Minetest</string> <string name="notification_channel_description">Notifications from Luanti</string>
<string name="unzip_notification_title">Loading Minetest</string> <string name="unzip_notification_title">Loading Luanti</string>
<string name="unzip_notification_description">Less than 1 minute&#8230;</string> <string name="unzip_notification_description">Less than 1 minute&#8230;</string>
<string name="ime_dialog_done">Done</string> <string name="ime_dialog_done">Done</string>
<string name="no_web_browser">No web browser found</string> <string name="no_web_browser">No web browser found</string>

View file

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // 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("versionMajor", 5) // Version Major
project.ext.set("versionMinor", 10) // Version Minor project.ext.set("versionMinor", 11) // Version Minor
project.ext.set("versionPatch", 0) // Version Patch project.ext.set("versionPatch", 0) // Version Patch
// ^ keep in sync with cmake // ^ keep in sync with cmake
@ -9,7 +9,7 @@ project.ext.set("versionBuild", 0) // Version Build
// ^ fourth version number to allow releasing Android-only fixes and beta versions // ^ fourth version number to allow releasing Android-only fixes and beta versions
buildscript { buildscript {
ext.ndk_version = '26.2.11394342' ext.ndk_version = '27.2.12479018'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()

View file

@ -1,2 +1,2 @@
rootProject.name = "Minetest" rootProject.name = "Luanti"
include ':app', ':native' include ':app', ':native'

View file

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

View file

@ -1,4 +1,3 @@
-- Minetest: builtin/client/init.lua
local scriptpath = core.get_builtin_path() local scriptpath = core.get_builtin_path()
local clientpath = scriptpath.."client"..DIR_DELIM local clientpath = scriptpath.."client"..DIR_DELIM
local commonpath = scriptpath.."common"..DIR_DELIM local commonpath = scriptpath.."common"..DIR_DELIM

View file

@ -155,7 +155,7 @@ end
function core.after(after, func, ...) function core.after(after, func, ...)
assert(tonumber(after) and not core.is_nan(after) and type(func) == "function", assert(tonumber(after) and not core.is_nan(after) and type(func) == "function",
"Invalid minetest.after invocation") "Invalid core.after invocation")
local new_job = { local new_job = {
mod_origin = core.get_last_run_mod(), mod_origin = core.get_last_run_mod(),

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/common/chatcommands.lua
-- For server-side translations (if INIT == "game") -- For server-side translations (if INIT == "game")
-- Otherwise, use core.gettext -- Otherwise, use core.gettext
local S = core.get_translator("__builtin") local S = core.get_translator("__builtin")

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2013 sapier --Copyright (C) 2013 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,3 @@
-- Minetest: builtin/item_s.lua
-- The distinction of what goes here is a bit tricky, basically it's everything -- The distinction of what goes here is a bit tricky, basically it's everything
-- that does not (directly or indirectly) need access to ServerEnvironment, -- that does not (directly or indirectly) need access to ServerEnvironment,
-- Server or writable access to IGameDef on the engine side. -- Server or writable access to IGameDef on the engine side.

View file

@ -11,8 +11,8 @@ end
core.known_metatables = known_metatables core.known_metatables = known_metatables
function core.register_async_metatable(...) function core.register_async_metatable(...)
core.log("deprecated", "minetest.register_async_metatable is deprecated. " .. core.log("deprecated", "core.register_async_metatable is deprecated. " ..
"Use minetest.register_portable_metatable instead.") "Use core.register_portable_metatable instead.")
return core.register_portable_metatable(...) return core.register_portable_metatable(...)
end end

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/misc_helpers.lua
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Localize functions to avoid table lookups (better performance). -- Localize functions to avoid table lookups (better performance).
local string_sub, string_find = string.sub, string.find local string_sub, string_find = string.sub, string.find
@ -574,12 +572,14 @@ function core.strip_colors(str)
return (str:gsub(ESCAPE_CHAR .. "%([bc]@[^)]+%)", "")) return (str:gsub(ESCAPE_CHAR .. "%([bc]@[^)]+%)", ""))
end end
function core.translate(textdomain, str, ...) local function translate(textdomain, str, num, ...)
local start_seq local start_seq
if textdomain == "" then if textdomain == "" and num == "" then
start_seq = ESCAPE_CHAR .. "T" start_seq = ESCAPE_CHAR .. "T"
else elseif num == "" then
start_seq = ESCAPE_CHAR .. "(T@" .. textdomain .. ")" start_seq = ESCAPE_CHAR .. "(T@" .. textdomain .. ")"
else
start_seq = ESCAPE_CHAR .. "(T@" .. textdomain .. "@" .. num .. ")"
end end
local arg = {n=select('#', ...), ...} local arg = {n=select('#', ...), ...}
local end_seq = ESCAPE_CHAR .. "E" local end_seq = ESCAPE_CHAR .. "E"
@ -610,8 +610,31 @@ function core.translate(textdomain, str, ...)
return start_seq .. translated .. end_seq return start_seq .. translated .. end_seq
end end
function core.translate(textdomain, str, ...)
return translate(textdomain, str, "", ...)
end
function core.translate_n(textdomain, str, str_plural, n, ...)
assert (type(n) == "number")
assert (n >= 0)
assert (math.floor(n) == n)
-- Truncate n if too large
local max = 1000000
if n >= 2 * max then
n = n % max + max
end
if n == 1 then
return translate(textdomain, str, "1", ...)
else
return translate(textdomain, str_plural, tostring(n), ...)
end
end
function core.get_translator(textdomain) function core.get_translator(textdomain)
return function(str, ...) return core.translate(textdomain or "", str, ...) end return
(function(str, ...) return core.translate(textdomain or "", str, ...) end),
(function(str, str_plural, n, ...) return core.translate_n(textdomain or "", str, str_plural, n, ...) end)
end end
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View file

@ -204,18 +204,18 @@ local function dummy_func() end
function core.deserialize(str, safe) function core.deserialize(str, safe)
-- Backwards compatibility -- Backwards compatibility
if str == nil then if str == nil then
core.log("deprecated", "minetest.deserialize called with nil (expected string).") core.log("deprecated", "core.deserialize called with nil (expected string).")
return nil, "Invalid type: Expected a string, got nil" return nil, "Invalid type: Expected a string, got nil"
end end
local t = type(str) local t = type(str)
if t ~= "string" then if t ~= "string" then
error(("minetest.deserialize called with %s (expected string)."):format(t)) error(("core.deserialize called with %s (expected string)."):format(t))
end end
local func, err = loadstring(str) local func, err = loadstring(str)
if not func then return nil, err end if not func then return nil, err end
-- math.huge was serialized to inf and NaNs to nan by Lua in Minetest 5.6, so we have to support this here -- math.huge was serialized to inf and NaNs to nan by Lua in engine version 5.6, so we have to support this here
local env = {inf = math_huge, nan = 0/0} local env = {inf = math_huge, nan = 0/0}
if safe then if safe then
env.loadstring = dummy_func env.loadstring = dummy_func

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
--Copyright (C) 2023 Gregor Parzefall --Copyright (C) 2023 Gregor Parzefall
-- --

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -10,7 +10,7 @@ end
function core.handle_async(func, callback, ...) function core.handle_async(func, callback, ...)
assert(type(func) == "function" and type(callback) == "function", assert(type(func) == "function" and type(callback) == "function",
"Invalid minetest.handle_async invocation") "Invalid core.handle_async invocation")
local args = {n = select("#", ...), ...} local args = {n = select("#", ...), ...}
local mod_origin = core.get_last_run_mod() local mod_origin = core.get_last_run_mod()

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/auth.lua
-- --
-- Builtin authentication handler -- Builtin authentication handler
-- --
@ -95,11 +93,11 @@ core.builtin_auth_handler = {
for priv, value in pairs(privileges) do for priv, value in pairs(privileges) do
-- Warnings for improper API usage -- Warnings for improper API usage
if value == false then if value == false then
core.log('deprecated', "`false` value given to `minetest.set_player_privs`, ".. core.log('deprecated', "`false` value given to `core.set_player_privs`, "..
"this is almost certainly a bug, ".. "this is almost certainly a bug, "..
"granting a privilege rather than revoking it") "granting a privilege rather than revoking it")
elseif value ~= true then elseif value ~= true then
core.log('deprecated', "non-`true` value given to `minetest.set_player_privs`") core.log('deprecated', "non-`true` value given to `core.set_player_privs`")
end end
-- Run grant callbacks -- Run grant callbacks
if prev_privs[priv] == nil then if prev_privs[priv] == nil then
@ -196,7 +194,7 @@ function core.change_player_privs(name, changes)
elseif change == false then elseif change == false then
privs[priv] = nil privs[priv] = nil
else else
error("non-bool value given to `minetest.change_player_privs`") error("non-bool value given to `core.change_player_privs`")
end end
end end
core.set_player_privs(name, privs) core.set_player_privs(name, privs)

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/game/chat.lua
local S = core.get_translator("__builtin") local S = core.get_translator("__builtin")
-- Helper function that implements search and replace without pattern matching -- Helper function that implements search and replace without pattern matching

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/constants.lua
-- --
-- Constants values for use with the Lua API -- Constants values for use with the Lua API
-- --

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/deprecated.lua
-- --
-- EnvRef -- EnvRef
-- --
@ -35,9 +33,9 @@ local settings = core.settings
local function setting_proxy(name) local function setting_proxy(name)
return function(...) return function(...)
core.log("deprecated", "WARNING: minetest.setting_* ".. core.log("deprecated", "WARNING: core.setting_* "..
"functions are deprecated. ".. "functions are deprecated. "..
"Use methods on the minetest.settings object.") "Use methods on the core.settings object.")
return settings[name](settings, ...) return settings[name](settings, ...)
end end
end end

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/detached_inventory.lua
core.detached_inventories = {} core.detached_inventories = {}
local create_detached_inventory_raw = core.create_detached_inventory_raw local create_detached_inventory_raw = core.create_detached_inventory_raw

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/item.lua
local builtin_shared = ... local builtin_shared = ...
local SCALE = 0.667 local SCALE = 0.667

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/features.lua
core.features = { core.features = {
glasslike_framed = true, glasslike_framed = true,
nodebox_as_selectionbox = true, nodebox_as_selectionbox = true,
@ -45,6 +43,7 @@ core.features = {
hotbar_hud_element = true, hotbar_hud_element = true,
bulk_lbms = true, bulk_lbms = true,
abm_without_neighbors = true, abm_without_neighbors = true,
biome_weights = true,
} }
function core.has_feature(arg) function core.has_feature(arg)

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/item.lua
local builtin_shared = ... local builtin_shared = ...
local function copy_pointed_thing(pointed_thing) local function copy_pointed_thing(pointed_thing)

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/item_entity.lua
function core.spawn_item(pos, item) function core.spawn_item(pos, item)
-- Take item in any format -- Take item in any format
local stack = ItemStack(item) local stack = ItemStack(item)

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/misc.lua
local S = core.get_translator("__builtin") local S = core.get_translator("__builtin")
-- --

View file

@ -1,4 +1,3 @@
-- Minetest: builtin/misc_s.lua
-- The distinction of what goes here is a bit tricky, basically it's everything -- The distinction of what goes here is a bit tricky, basically it's everything
-- that does not (directly or indirectly) need access to ServerEnvironment, -- that does not (directly or indirectly) need access to ServerEnvironment,
-- Server or writable access to IGameDef on the engine side. -- Server or writable access to IGameDef on the engine side.
@ -25,11 +24,8 @@ end
function core.get_item_group(name, group) function core.get_item_group(name, group)
if not core.registered_items[name] or not local def = core.registered_items[name]
core.registered_items[name].groups[group] then return def and def.groups[group] or 0
return 0
end
return core.registered_items[name].groups[group]
end end

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/privileges.lua
local S = core.get_translator("__builtin") local S = core.get_translator("__builtin")
-- --

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/register.lua
local builtin_shared = ... local builtin_shared = ...
local S = core.get_translator("__builtin") local S = core.get_translator("__builtin")

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/static_spawn.lua
local static_spawnpoint_string = core.settings:get("static_spawnpoint") local static_spawnpoint_string = core.settings:get("static_spawnpoint")
if static_spawnpoint_string and if static_spawnpoint_string and
static_spawnpoint_string ~= "" and static_spawnpoint_string ~= "" and

View file

@ -35,7 +35,7 @@ end
local log = function(...) end local log = function(...) end
--local log = print --local log = print
minetest.register_allow_player_inventory_action(function(_, action, inv, info) core.register_allow_player_inventory_action(function(_, action, inv, info)
log("\tallow " .. action, info.count or info.stack:to_string()) log("\tallow " .. action, info.count or info.stack:to_string())
if action == "move" then if action == "move" then
@ -69,7 +69,7 @@ minetest.register_allow_player_inventory_action(function(_, action, inv, info)
return -- Unlimited return -- Unlimited
end) end)
minetest.register_on_player_inventory_action(function(_, action, inv, info) core.register_on_player_inventory_action(function(_, action, inv, info)
log("\ton " .. action, info.count or info.stack:to_string()) log("\ton " .. action, info.count or info.stack:to_string())
if action == "take" or action == "put" then if action == "take" or action == "put" then

View file

@ -1,5 +1,5 @@
-- --
-- This file contains built-in stuff in Minetest implemented in Lua. -- This file contains built-in stuff in Luanti implemented in Lua.
-- --
-- It is always loaded and executed after registration of the C API, -- It is always loaded and executed after registration of the C API,
-- before loading and running any mods. -- before loading and running any mods.

View file

@ -11,11 +11,6 @@ end
core.async_event_handler = handle_job core.async_event_handler = handle_job
function core.handle_async(func, parameter, callback) function core.handle_async(func, parameter, callback)
-- Serialize function
local serialized_func = string.dump(func)
assert(serialized_func ~= nil)
-- Serialize parameters -- Serialize parameters
local serialized_param = core.serialize(parameter) local serialized_param = core.serialize(parameter)
@ -23,7 +18,7 @@ function core.handle_async(func, parameter, callback)
return false return false
end end
local jobid = core.do_async_callback(serialized_func, serialized_param) local jobid = core.do_async_callback(func, serialized_param)
core.async_jobs[jobid] = callback core.async_jobs[jobid] = callback

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2018-24 rubenwardy --Copyright (C) 2018-24 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -392,7 +392,7 @@ function contentdb.resolve_dependencies(package, game, callback)
end end
local function fetch_pkgs(params) local function fetch_pkgs()
local version = core.get_version() local version = core.get_version()
local base_url = core.settings:get("contentdb_url") local base_url = core.settings:get("contentdb_url")
local url = base_url .. local url = base_url ..
@ -429,41 +429,43 @@ local function fetch_pkgs(params)
if not packages or #packages == 0 then if not packages or #packages == 0 then
return return
end end
local aliases = {} return packages
end
function contentdb.set_packages_from_api(packages)
contentdb.package_by_id = {}
contentdb.aliases = {}
for _, package in pairs(packages) do for _, package in pairs(packages) do
package.id = params.calculate_package_id(package.type, package.author, package.name) package.id = contentdb.calculate_package_id(package.type, package.author, package.name)
package.url_part = core.urlencode(package.author) .. "/" .. core.urlencode(package.name) package.url_part = core.urlencode(package.author) .. "/" .. core.urlencode(package.name)
contentdb.package_by_id[package.id] = package
if package.aliases then if package.aliases then
for _, alias in ipairs(package.aliases) do for _, alias in ipairs(package.aliases) do
-- We currently don't support name changing -- We currently don't support name changing
local suffix = "/" .. package.name local suffix = "/" .. package.name
if alias:sub(-#suffix) == suffix then if alias:sub(-#suffix) == suffix then
aliases[alias:lower()] = package.id contentdb.aliases[alias:lower()] = package.id
end end
end end
end end
end end
return { packages = packages, aliases = aliases } contentdb.load_ok = true
contentdb.load_error = false
contentdb.packages = packages
contentdb.packages_full = packages
contentdb.packages_full_unordered = packages
end end
function contentdb.fetch_pkgs(callback) function contentdb.fetch_pkgs(callback)
contentdb.loading = true contentdb.loading = true
core.handle_async(fetch_pkgs, { calculate_package_id = contentdb.calculate_package_id }, function(result) core.handle_async(fetch_pkgs, nil, function(result)
if result then if result then
contentdb.load_ok = true contentdb.set_packages_from_api(result)
contentdb.load_error = false
contentdb.packages = result.packages
contentdb.packages_full = result.packages
contentdb.packages_full_unordered = result.packages
contentdb.aliases = result.aliases
for _, package in ipairs(result.packages) do
contentdb.package_by_id[package.id] = package
end
else else
contentdb.load_error = true contentdb.load_error = true
end end
@ -563,30 +565,32 @@ function contentdb.filter_packages(query, by_type)
end end
local keywords = {} local keywords = {}
for word in query:lower():gmatch("%S+") do for word in query:gmatch("%S+") do
table.insert(keywords, word) table.insert(keywords, word:lower())
end
local function contains_all_keywords(str)
str = str:lower()
for _, keyword in ipairs(keywords) do
if not str:find(keyword, 1, true) then
return false
end
end
return true
end end
local function matches_keywords(package) local function matches_keywords(package)
for k = 1, #keywords do return contains_all_keywords(package.name) or
local keyword = keywords[k] contains_all_keywords(package.title) or
contains_all_keywords(package.author) or
if string.find(package.name:lower(), keyword, 1, true) or contains_all_keywords(package.short_description)
string.find(package.title:lower(), keyword, 1, true) or
string.find(package.author:lower(), keyword, 1, true) or
string.find(package.short_description:lower(), keyword, 1, true) then
return true
end
end
return false
end end
contentdb.packages = {} contentdb.packages = {}
for _, package in pairs(contentdb.packages_full) do for _, package in pairs(contentdb.packages_full) do
if (query == "" or matches_keywords(package)) and if (query == "" or matches_keywords(package)) and
(by_type == nil or package.type == by_type) then (by_type == nil or package.type == by_type) then
contentdb.packages[#contentdb.packages + 1] = package table.insert(contentdb.packages, package)
end end
end end
end end

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2018-20 rubenwardy --Copyright (C) 2018-20 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -18,7 +18,7 @@
if not core.get_http_api then if not core.get_http_api then
function create_contentdb_dlg() function create_contentdb_dlg()
return messagebox("contentdb", return messagebox("contentdb",
fgettext("ContentDB is not available when Minetest was compiled without cURL")) fgettext("ContentDB is not available when Luanti was compiled without cURL"))
end end
return return
end end
@ -357,7 +357,7 @@ local function get_formspec(dlgdata)
if package.featured then if package.featured then
table.insert_all(formspec, { table.insert_all(formspec, {
"tooltip[0,0;0.8,0.8;", fgettext("Featured"), "]", "tooltip[0,0;0.8,0.8;", fgettext("Featured"), "]",
"image[0.2,0.2;0.4,0.4;", defaulttexturedir, "server_favorite.png]", "image[0.2,0.2;0.4,0.4;", core.formspec_escape(defaulttexturedir .. "server_favorite.png"), "]",
}) })
end end
@ -367,20 +367,21 @@ local function get_formspec(dlgdata)
if package.downloading then if package.downloading then
table.insert_all(formspec, { table.insert_all(formspec, {
"animated_image[0,0;0.5,0.5;downloading;", defaulttexturedir, "cdb_downloading.png;3;400;;]", "animated_image[0,0;0.5,0.5;downloading;", core.formspec_escape(defaulttexturedir .. "cdb_downloading.png"),
";3;400;;]",
}) })
elseif package.queued then elseif package.queued then
table.insert_all(formspec, { table.insert_all(formspec, {
"image[0,0;0.5,0.5;", defaulttexturedir, "cdb_queued.png]", "image[0,0;0.5,0.5;", core.formspec_escape(defaulttexturedir .. "cdb_queued.png"), "]",
}) })
elseif package.path then elseif package.path then
if package.installed_release < package.release then if package.installed_release < package.release then
table.insert_all(formspec, { table.insert_all(formspec, {
"image[0,0;0.5,0.5;", defaulttexturedir, "cdb_update.png]", "image[0,0;0.5,0.5;", core.formspec_escape(defaulttexturedir .. "cdb_update.png"), "]",
}) })
else else
table.insert_all(formspec, { table.insert_all(formspec, {
"image[0.1,0.1;0.3,0.3;", defaulttexturedir, "checkbox_64.png]", "image[0.1,0.1;0.3,0.3;", core.formspec_escape(defaulttexturedir .. "checkbox_64.png"), "]",
}) })
end end
end end
@ -487,7 +488,7 @@ end
local function handle_events(event) local function handle_events(event)
if event == "DialogShow" then if event == "DialogShow" then
-- Don't show the "MINETEST" header behind the dialog. -- Don't show the header image behind the dialog.
mm_game_theme.set_engine(true) mm_game_theme.set_engine(true)
-- If ContentDB is already loaded, auto-install packages here. -- If ContentDB is already loaded, auto-install packages here.

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2018-24 rubenwardy --Copyright (C) 2018-24 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2018-24 rubenwardy --Copyright (C) 2018-24 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2018-24 rubenwardy --Copyright (C) 2018-24 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -51,10 +51,6 @@ local function get_formspec(data)
return return
end end
if info.forums then
info.forums = "https://forum.minetest.net/viewtopic.php?t=" .. info.forums
end
assert(data.package.name == info.name) assert(data.package.name == info.name)
data.info = info data.info = info
ui.update() ui.update()
@ -194,7 +190,7 @@ local function get_formspec(data)
add_link_button(fgettext("Source"), "repo") add_link_button(fgettext("Source"), "repo")
add_link_button(fgettext("Issue Tracker"), "issue_tracker") add_link_button(fgettext("Issue Tracker"), "issue_tracker")
add_link_button(fgettext("Translate"), "translation_url") add_link_button(fgettext("Translate"), "translation_url")
add_link_button(fgettext("Forum Topic"), "forums") add_link_button(fgettext("Forum Topic"), "forum_url")
hypertext = hypertext .. "\n\n" .. info.long_description.body hypertext = hypertext .. "\n\n" .. info.long_description.body

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2023 rubenwardy --Copyright (C) 2023 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2013 sapier --Copyright (C) 2013 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -840,7 +840,7 @@ function pkgmgr.get_contentdb_id(content)
return content.author:lower() .. "/" .. content.name return content.author:lower() .. "/" .. content.name
end end
-- Until Minetest 5.8.0, Minetest Game was bundled with Minetest. -- Until version 5.8.0, Minetest Game was bundled with the engine.
-- Unfortunately, the bundled MTG was not versioned (missing "release" -- Unfortunately, the bundled MTG was not versioned (missing "release"
-- field in game.conf). -- field in game.conf).
-- Therefore, we consider any installation of MTG that is not versioned, -- Therefore, we consider any installation of MTG that is not versioned,

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2023-24 rubenwardy --Copyright (C) 2023-24 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -40,7 +40,7 @@ function get_screenshot(package, screenshot_url, level)
return defaulttexturedir .. "no_screenshot.png" return defaulttexturedir .. "no_screenshot.png"
end end
-- Minetest only supports png and jpg -- Luanti only supports png and jpg
local ext = get_file_extension(screenshot_url) local ext = get_file_extension(screenshot_url)
if ext ~= "png" and ext ~= "jpg" then if ext ~= "png" and ext ~= "jpg" then
screenshot_url = screenshot_url:sub(0, -#ext - 1) .. "png" screenshot_url = screenshot_url:sub(0, -#ext - 1) .. "png"

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2022 rubenwardy --Copyright (C) 2022 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2023 rubenwardy --Copyright (C) 2023 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -13,7 +13,9 @@
"Desour/DS", "Desour/DS",
"srifqi", "srifqi",
"Gregor Parzefall (grorp)", "Gregor Parzefall (grorp)",
"Lars Müller (luatic)" "Lars Müller (luatic)",
"cx384",
"sfence"
], ],
"previous_core_developers": [ "previous_core_developers": [
"BlockMen", "BlockMen",
@ -44,30 +46,25 @@
], ],
"#": "For updating active/previous contributors, see the script in ./util/gather_git_credits.py", "#": "For updating active/previous contributors, see the script in ./util/gather_git_credits.py",
"contributors": [ "contributors": [
"cx384",
"numzero",
"AFCMS",
"sfence",
"Wuzzy",
"ROllerozxa",
"JosiahWI", "JosiahWI",
"OgelGames",
"David Heidelberg",
"1F616EMO", "1F616EMO",
"HybridDog",
"Bradley Pierce (Thresher)",
"savilli",
"Stvk imension",
"y5nw", "y5nw",
"Erich Schubert",
"numzero",
"red-001 <red-001@outlook.ie>",
"David Heidelberg",
"Wuzzy",
"paradust7",
"HybridDog",
"Zemtzov7",
"kromka-chleba",
"AFCMS",
"chmodsayshello", "chmodsayshello",
"jordan4ibanez", "OgelGames"
"superfloh247"
], ],
"previous_contributors": [ "previous_contributors": [
"Nils Dagsson Moskopp (erlehmann) <nils@dieweltistgarnichtso.net> [Minetest logo]", "Ælla Chiana Moskopp (erle) <erle@dieweltistgarnichtso.net> [Logo]",
"red-001 <red-001@outlook.ie>",
"Giuseppe Bilotta", "Giuseppe Bilotta",
"HybridDog",
"ClobberXD", "ClobberXD",
"Dániel Juhász (juhdanad) <juhdanad@gmail.com>", "Dániel Juhász (juhdanad) <juhdanad@gmail.com>",
"MirceaKitsune <mirceakitsune@gmail.com>", "MirceaKitsune <mirceakitsune@gmail.com>",
@ -75,6 +72,7 @@
"MoNTE48", "MoNTE48",
"Constantin Wenger (SpeedProg)", "Constantin Wenger (SpeedProg)",
"Ciaran Gultnieks (CiaranG)", "Ciaran Gultnieks (CiaranG)",
"ROllerozxa",
"Paul Ouellette (pauloue)", "Paul Ouellette (pauloue)",
"stujones11", "stujones11",
"Rogier <rogier777@gmail.com>", "Rogier <rogier777@gmail.com>",

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2013 sapier --Copyright (C) 2013 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2022 rubenwardy --Copyright (C) 2022 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2023 Gregor Parzefall --Copyright (C) 2023 Gregor Parzefall
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -68,15 +68,15 @@ end
local function get_formspec(dialogdata) local function get_formspec(dialogdata)
local markup = table.concat({ local markup = table.concat({
"<big>", fgettext("Minetest Game is no longer installed by default"), "</big>\n", "<big>", fgettext("Minetest Game is no longer installed by default"), "</big>\n",
fgettext("For a long time, the Minetest engine shipped with a default game called \"Minetest Game\". " .. fgettext("For a long time, Luanti shipped with a default game called \"Minetest Game\". " ..
"Since Minetest 5.8.0, Minetest ships without a default game."), "\n", "Since version 5.8.0, Luanti ships without a default game."), "\n",
fgettext("If you want to continue playing in your Minetest Game worlds, you need to reinstall Minetest Game."), fgettext("If you want to continue playing in your Minetest Game worlds, you need to reinstall Minetest Game."),
}) })
return table.concat({ return table.concat({
"formspec_version[6]", "formspec_version[6]",
"size[12.8,7]", "size[12.8,7]",
"hypertext[0.375,0.375;12.05,5.2;text;", minetest.formspec_escape(markup), "]", "hypertext[0.375,0.375;12.05,5.2;text;", core.formspec_escape(markup), "]",
"container[0.375,5.825]", "container[0.375,5.825]",
"style[dismiss;bgcolor=red]", "style[dismiss;bgcolor=red]",
"button[0,0;4,0.8;dismiss;", fgettext("Dismiss"), "]", "button[0,0;4,0.8;dismiss;", fgettext("Dismiss"), "]",
@ -114,7 +114,7 @@ local function eventhandler(event)
return true return true
elseif event == "MenuQuit" then elseif event == "MenuQuit" then
-- Don't allow closing the dialog with ESC, but still allow exiting -- Don't allow closing the dialog with ESC, but still allow exiting
-- Minetest. -- Luanti
core.close() core.close()
return true return true
end end

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
--[[ --[[
Minetest Luanti
Copyright (C) 2018-2020 SmallJoker, 2022 rubenwardy Copyright (C) 2018-2020 SmallJoker, 2022 rubenwardy
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2013 sapier --Copyright (C) 2013 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -133,4 +133,5 @@ local function init_globals()
check_new_version() check_new_version()
end end
assert(os.execute == nil)
init_globals() init_globals()

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2020 rubenwardy --Copyright (C) 2020 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2022 rubenwardy --Copyright (C) 2022 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2015 PilzAdam --Copyright (C) 2015 PilzAdam
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2022 rubenwardy --Copyright (C) 2022 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -341,18 +341,17 @@ local function check_requirements(name, requires)
end end
local video_driver = core.get_active_driver() local video_driver = core.get_active_driver()
local shaders_support = video_driver == "opengl" or video_driver == "opengl3" or video_driver == "ogles2" local touch_support = core.irrlicht_device_supports_touch()
local touch_controls = core.settings:get("touch_controls") local touch_controls = core.settings:get("touch_controls")
local special = { local special = {
android = PLATFORM == "Android", android = PLATFORM == "Android",
desktop = PLATFORM ~= "Android", desktop = PLATFORM ~= "Android",
-- When touch_controls is "auto", we don't which input method will be used, touch_support = touch_support,
-- so we show settings for both. -- When touch_controls is "auto", we don't know which input method will
touchscreen = touch_controls == "auto" or core.is_yes(touch_controls), -- be used, so we show settings for both.
keyboard_mouse = touch_controls == "auto" or not core.is_yes(touch_controls), touchscreen = touch_support and (touch_controls == "auto" or core.is_yes(touch_controls)),
shaders_support = shaders_support, keyboard_mouse = not touch_support or (touch_controls == "auto" or not core.is_yes(touch_controls)),
shaders = core.settings:get_bool("enable_shaders") and shaders_support, opengl = (video_driver == "opengl" or video_driver == "opengl3"),
opengl = video_driver == "opengl",
gles = video_driver:sub(1, 5) == "ogles", gles = video_driver:sub(1, 5) == "ogles",
} }
@ -360,7 +359,7 @@ local function check_requirements(name, requires)
if special[req_key] == nil then if special[req_key] == nil then
local required_setting = get_setting_info(req_key) local required_setting = get_setting_info(req_key)
if required_setting == nil then if required_setting == nil then
core.log("warning", "Unknown setting " .. req_key .. " required by " .. name) core.log("warning", "Unknown setting " .. req_key .. " required by " .. (name or "???"))
end end
local actual_value = core.settings:get_bool(req_key, local actual_value = core.settings:get_bool(req_key,
required_setting and core.is_yes(required_setting.default)) required_setting and core.is_yes(required_setting.default))
@ -706,7 +705,7 @@ local function buttonhandler(this, fields)
local function after_setting_change(comp) local function after_setting_change(comp)
write_settings_early() write_settings_early()
if comp.setting.name == "touch_controls" then if comp.setting and comp.setting.name == "touch_controls" then
-- Changing the "touch_controls" setting may result in a different -- Changing the "touch_controls" setting may result in a different
-- page list. -- page list.
regenerate_page_list(dialogdata) regenerate_page_list(dialogdata)
@ -734,7 +733,7 @@ end
local function eventhandler(event) local function eventhandler(event)
if event == "DialogShow" then if event == "DialogShow" then
-- Don't show the "MINETEST" header behind the dialog. -- Don't show the header image behind the dialog.
mm_game_theme.set_engine(true) mm_game_theme.set_engine(true)
return true return true
end end

View file

@ -13,7 +13,7 @@ local minetest_example_header = [[
# ../minetest.conf # ../minetest.conf
# ../../minetest.conf # ../../minetest.conf
# Any other path can be chosen by passing the path as a parameter # Any other path can be chosen by passing the path as a parameter
# to the program, eg. "minetest.exe --config ../minetest.conf.example". # to the program, eg. "luanti.exe --config ../minetest.conf.example".
# Further documentation: # Further documentation:
# https://wiki.minetest.net/ # https://wiki.minetest.net/

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2022 rubenwardy --Copyright (C) 2022 rubenwardy
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2015 PilzAdam --Copyright (C) 2015 PilzAdam
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2021-2 x2048 --Copyright (C) 2021-2 x2048
--Copyright (C) 2022-3 rubenwardy --Copyright (C) 2022-3 rubenwardy
-- --
@ -82,7 +82,6 @@ end
return { return {
query_text = "Shadows", query_text = "Shadows",
requires = { requires = {
shaders = true,
opengl = true, opengl = true,
}, },
get_formspec = function(self, avail_w) get_formspec = function(self, avail_w)

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2013 sapier --Copyright (C) 2013 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -78,8 +78,8 @@ return {
"style[label_button;border=false]" .. "style[label_button;border=false]" ..
"button[0.1,3.4;5.3,0.5;label_button;" .. "button[0.1,3.4;5.3,0.5;label_button;" ..
core.formspec_escape(version.project .. " " .. version.string) .. "]" .. core.formspec_escape(version.project .. " " .. version.string) .. "]" ..
"button_url[1.5,4.1;2.5,0.8;homepage;minetest.net;https://www.minetest.net/]" .. "button_url[1.5,4.1;2.5,0.8;homepage;luanti.org;https://www.luanti.org/]" ..
"hypertext[5.5,0.25;9.75,6.6;credits;" .. minetest.formspec_escape(hypertext) .. "]" "hypertext[5.5,0.25;9.75,6.6;credits;" .. core.formspec_escape(hypertext) .. "]"
-- Render information -- Render information
local active_renderer_info = fgettext("Active renderer:") .. " " .. local active_renderer_info = fgettext("Active renderer:") .. " " ..

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
--Copyright (C) 2018 rubenwardy <rw@rubenwardy.com> --Copyright (C) 2018 rubenwardy <rw@rubenwardy.com>
-- --
@ -118,7 +118,7 @@ local function get_formspec(tabview, name, tabdata)
local title_and_name local title_and_name
if selected_pkg.type == "game" then if selected_pkg.type == "game" then
title_and_name = selected_pkg.name title_and_name = selected_pkg.title or selected_pkg.name
else else
title_and_name = (selected_pkg.title or selected_pkg.name) .. "\n" .. title_and_name = (selected_pkg.title or selected_pkg.name) .. "\n" ..
core.colorize("#BFBFBF", selected_pkg.name) core.colorize("#BFBFBF", selected_pkg.name)

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -166,8 +166,8 @@ local function get_formspec(tabview, name, tabdata)
local H = tabview.height local H = tabview.height
local hypertext = "<global valign=middle halign=center size=18>" .. local hypertext = "<global valign=middle halign=center size=18>" ..
fgettext_ne("Minetest is a game-creation platform that allows you to play many different games.") .. "\n" .. fgettext_ne("Luanti is a game-creation platform that allows you to play many different games.") .. "\n" ..
fgettext_ne("Minetest doesn't come with a game by default.") .. " " .. fgettext_ne("Luanti doesn't come with a game by default.") .. " " ..
fgettext_ne("You need to install a game before you can create a world.") fgettext_ne("You need to install a game before you can create a world.")
local button_y = H * 2/3 - 0.6 local button_y = H * 2/3 - 0.6

View file

@ -1,4 +1,4 @@
--Minetest --Luanti
--Copyright (C) 2014 sapier --Copyright (C) 2014 sapier
-- --
--This program is free software; you can redistribute it and/or modify --This program is free software; you can redistribute it and/or modify
@ -195,8 +195,7 @@ local function search_server_list(input)
-- setup the keyword list -- setup the keyword list
local keywords = {} local keywords = {}
for word in input:gmatch("%S+") do for word in input:gmatch("%S+") do
word = word:gsub("(%W)", "%%%1") table.insert(keywords, word:lower())
table.insert(keywords, word)
end end
if #keywords == 0 then if #keywords == 0 then
@ -207,26 +206,17 @@ local function search_server_list(input)
-- Search the serverlist -- Search the serverlist
local search_result = {} local search_result = {}
for i = 1, #serverlistmgr.servers do for i, server in ipairs(serverlistmgr.servers) do
local server = serverlistmgr.servers[i] local name_matches, description_matches = true, true
local found = 0 for _, keyword in ipairs(keywords) do
for k = 1, #keywords do name_matches = name_matches and not not
local keyword = keywords[k] (server.name or ""):lower():find(keyword, 1, true)
if server.name then description_matches = description_matches and not not
local sername = server.name:lower() (server.description or ""):lower():find(keyword, 1, true)
local _, count = sername:gsub(keyword, keyword)
found = found + count * 4
end end
if name_matches or description_matches then
if server.description then server.points = #serverlistmgr.servers - i
local desc = server.description:lower() + (name_matches and 50 or 0)
local _, count = desc:gsub(keyword, keyword)
found = found + count * 2
end
end
if found > 0 then
local points = (#serverlistmgr.servers - i) / 5 + found
server.points = points
table.insert(search_result, server) table.insert(search_result, server)
end end
end end

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