mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-11-23 07:53:47 +01:00
Apply Luanti rename
This commit is contained in:
parent
dd5c4e509d
commit
1c16c40ccc
4
.github/workflows/docker_image.yml
vendored
4
.github/workflows/docker_image.yml
vendored
@ -61,8 +61,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.title=Minetest Mapper
|
org.opencontainers.image.title=Minetestmapper
|
||||||
org.opencontainers.image.vendor=Minetest
|
org.opencontainers.image.vendor=Luanti
|
||||||
org.opencontainers.image.licenses=BSD 2-Clause
|
org.opencontainers.image.licenses=BSD 2-Clause
|
||||||
|
|
||||||
# Build and push Docker image
|
# Build and push Docker image
|
||||||
|
@ -19,7 +19,7 @@ if(WIN32)
|
|||||||
set(BINDIR ".")
|
set(BINDIR ".")
|
||||||
set(DOCDIR ".")
|
set(DOCDIR ".")
|
||||||
else()
|
else()
|
||||||
set(SHAREDIR "share/minetest") # reuse Minetest share dir
|
set(SHAREDIR "share/luanti") # reuse engine share dir
|
||||||
set(BINDIR "bin")
|
set(BINDIR "bin")
|
||||||
set(DOCDIR "share/doc/${PROJECT_NAME}")
|
set(DOCDIR "share/doc/${PROJECT_NAME}")
|
||||||
set(MANDIR "share/man")
|
set(MANDIR "share/man")
|
||||||
@ -209,7 +209,7 @@ if(UNIX)
|
|||||||
install(FILES "minetestmapper.6" DESTINATION "${MANDIR}/man6")
|
install(FILES "minetestmapper.6" DESTINATION "${MANDIR}/man6")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Overview mapper for Minetest")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Overview mapper for Luanti")
|
||||||
set(CPACK_PACKAGE_VENDOR "celeron55")
|
set(CPACK_PACKAGE_VENDOR "celeron55")
|
||||||
set(CPACK_PACKAGE_CONTACT "Perttu Ahola <celeron55@gmail.com>")
|
set(CPACK_PACKAGE_CONTACT "Perttu Ahola <celeron55@gmail.com>")
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
ARG DOCKER_IMAGE=alpine:3.19
|
ARG DOCKER_IMAGE=alpine:3.20
|
||||||
FROM $DOCKER_IMAGE AS builder
|
FROM $DOCKER_IMAGE AS builder
|
||||||
|
|
||||||
RUN apk add --no-cache build-base cmake \
|
RUN apk add --no-cache build-base cmake \
|
||||||
@ -17,7 +17,7 @@ FROM $DOCKER_IMAGE AS runtime
|
|||||||
RUN apk add --no-cache libstdc++ libgcc libpq \
|
RUN apk add --no-cache libstdc++ libgcc libpq \
|
||||||
gd sqlite-libs postgresql hiredis leveldb
|
gd sqlite-libs postgresql hiredis leveldb
|
||||||
|
|
||||||
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/minetestmapper /usr/local/bin/minetestmapper
|
COPY --from=builder /usr/local/bin/minetestmapper /usr/local/bin/minetestmapper
|
||||||
COPY COPYING /usr/local/share/minetest/minetestmapper.COPYING
|
COPY COPYING /usr/local/share/minetest/minetestmapper.COPYING
|
||||||
|
|
||||||
|
11
README.rst
11
README.rst
@ -4,10 +4,11 @@ Minetest Mapper C++
|
|||||||
.. image:: https://github.com/minetest/minetestmapper/workflows/build/badge.svg
|
.. image:: https://github.com/minetest/minetestmapper/workflows/build/badge.svg
|
||||||
:target: https://github.com/minetest/minetestmapper/actions/workflows/build.yml
|
:target: https://github.com/minetest/minetestmapper/actions/workflows/build.yml
|
||||||
|
|
||||||
Minetestmapper generates an overview image from a Minetest map.
|
Minetestmapper generates an overview image from a Luanti map.
|
||||||
|
|
||||||
A port of minetestmapper.py to C++ from https://github.com/minetest/minetest/tree/0.4.17/util.
|
A port of minetestmapper.py to C++ from `the obsolete Python script
|
||||||
This version is both faster and provides more features than the now obsolete Python script.
|
<https://github.com/minetest/minetest/tree/0.4.17/util>`_.
|
||||||
|
This version is both faster and provides more features.
|
||||||
|
|
||||||
Minetestmapper ships with a colors.txt file for Minetest Game, if you use a different game or have
|
Minetestmapper ships with a colors.txt file for Minetest Game, if you use a different game or have
|
||||||
many mods installed you should generate a matching colors.txt for better results.
|
many mods installed you should generate a matching colors.txt for better results.
|
||||||
@ -39,7 +40,7 @@ for Windows:
|
|||||||
Minetestmapper for Windows can be downloaded `from the Releases section
|
Minetestmapper for Windows can be downloaded `from the Releases section
|
||||||
<https://github.com/minetest/minetestmapper/releases>`_.
|
<https://github.com/minetest/minetestmapper/releases>`_.
|
||||||
|
|
||||||
After extracting the archive, it can be invoked from cmd.exe:
|
After extracting the archive, it can be invoked from cmd.exe or PowerShell:
|
||||||
::
|
::
|
||||||
|
|
||||||
cd C:\Users\yourname\Desktop\example\path
|
cd C:\Users\yourname\Desktop\example\path
|
||||||
@ -116,7 +117,7 @@ zoom:
|
|||||||
Apply zoom to drawn nodes by enlarging them to n*n squares, e.g. ``--zoom 4``
|
Apply zoom to drawn nodes by enlarging them to n*n squares, e.g. ``--zoom 4``
|
||||||
|
|
||||||
colors:
|
colors:
|
||||||
Override auto-detected path to colors.txt, e.g. ``--colors ../minetest/mycolors.txt``
|
Override auto-detected path to colors.txt, e.g. ``--colors ../world/mycolors.txt``
|
||||||
|
|
||||||
scales:
|
scales:
|
||||||
Draw scales on specified image edges (letters *t b l r* meaning top, bottom, left and right), e.g. ``--scales tbr``
|
Draw scales on specified image edges (letters *t b l r* meaning top, bottom, left and right), e.g. ``--scales tbr``
|
||||||
|
@ -7,9 +7,5 @@
|
|||||||
#ifdef USE_CMAKE_CONFIG_H
|
#ifdef USE_CMAKE_CONFIG_H
|
||||||
#include "cmake_config.h"
|
#include "cmake_config.h"
|
||||||
#else
|
#else
|
||||||
#define USE_POSTGRESQL 0
|
#error missing config
|
||||||
#define USE_LEVELDB 0
|
|
||||||
#define USE_REDIS 0
|
|
||||||
|
|
||||||
#define SHAREDIR "/usr/share/minetest"
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,7 +39,7 @@ static void usage()
|
|||||||
};
|
};
|
||||||
const char *top_text =
|
const char *top_text =
|
||||||
"minetestmapper -i <world_path> -o <output_image.png> [options]\n"
|
"minetestmapper -i <world_path> -o <output_image.png> [options]\n"
|
||||||
"Generate an overview image of a Minetest map.\n"
|
"Generate an overview image of a Luanti map.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Options:\n";
|
"Options:\n";
|
||||||
const char *bottom_text =
|
const char *bottom_text =
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.TH MINETESTMAPPER 6
|
.TH MINETESTMAPPER 6
|
||||||
.SH NAME
|
.SH NAME
|
||||||
minetestmapper \- generate an overview image of a Minetest map
|
minetestmapper \- generate an overview image of a Luanti map
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B minetestmapper
|
.B minetestmapper
|
||||||
\fB\-i\fR \fIworld_path\fR
|
\fB\-i\fR \fIworld_path\fR
|
||||||
@ -9,9 +9,9 @@ minetestmapper \- generate an overview image of a Minetest map
|
|||||||
See additional optional parameters below.
|
See additional optional parameters below.
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B minetestmapper
|
.B minetestmapper
|
||||||
generates an overview image of a minetest map. This is a port of
|
generates an overview image of a Luanti map. This is a port of
|
||||||
the original minetestmapper.py to C++, that is both faster and
|
the original minetestmapper.py to C++, that is both faster and
|
||||||
provides more functionality than the deprecated Python script.
|
provides more functionality than the obsolete Python script.
|
||||||
.SH MANDATORY PARAMETERS
|
.SH MANDATORY PARAMETERS
|
||||||
.TP
|
.TP
|
||||||
.BR \-i " " \fIworld_path\fR
|
.BR \-i " " \fIworld_path\fR
|
||||||
@ -86,7 +86,7 @@ Zoom the image by using more than one pixel per node, e.g. "--zoom 4"
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR \-\-colors " " \fIpath\fR
|
.BR \-\-colors " " \fIpath\fR
|
||||||
Forcefully set path to colors.txt file (it's autodetected otherwise), e.g. "--colors ../minetest/mycolors.txt"
|
Forcefully set path to colors.txt file (autodetected otherwise), e.g. "--colors ../world/mycolors.txt"
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR \-\-scales " " \fIedges\fR
|
.BR \-\-scales " " \fIedges\fR
|
||||||
|
@ -7,7 +7,7 @@ variant=win32
|
|||||||
[[ "$(basename "$CXX")" == "x86_64-"* ]] && variant=win64
|
[[ "$(basename "$CXX")" == "x86_64-"* ]] && variant=win64
|
||||||
|
|
||||||
#######
|
#######
|
||||||
# this expects unpacked libraries similar to what Minetest's buildbot uses
|
# this expects unpacked libraries similar to what Luanti's buildbot uses
|
||||||
# $extradlls will typically point to the DLLs for libgcc, libstdc++ and libpng
|
# $extradlls will typically point to the DLLs for libgcc, libstdc++ and libpng
|
||||||
libgd_dir=
|
libgd_dir=
|
||||||
zlib_dir=
|
zlib_dir=
|
||||||
|
@ -15,7 +15,7 @@ local function pairs_s(dict)
|
|||||||
return ipairs(keys)
|
return ipairs(keys)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_chatcommand("dumpnodes", {
|
core.register_chatcommand("dumpnodes", {
|
||||||
description = "Dump node and texture list for use with minetestmapper",
|
description = "Dump node and texture list for use with minetestmapper",
|
||||||
func = function()
|
func = function()
|
||||||
local ntbl = {}
|
local ntbl = {}
|
||||||
@ -30,7 +30,7 @@ minetest.register_chatcommand("dumpnodes", {
|
|||||||
ntbl[prefix][name] = true
|
ntbl[prefix][name] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local out, err = io.open(minetest.get_worldpath() .. "/nodes.txt", 'wb')
|
local out, err = io.open(core.get_worldpath() .. "/nodes.txt", 'wb')
|
||||||
if not out then
|
if not out then
|
||||||
return true, err
|
return true, err
|
||||||
end
|
end
|
||||||
@ -39,7 +39,7 @@ minetest.register_chatcommand("dumpnodes", {
|
|||||||
out:write('# ' .. prefix .. '\n')
|
out:write('# ' .. prefix .. '\n')
|
||||||
for _, name in pairs_s(ntbl[prefix]) do
|
for _, name in pairs_s(ntbl[prefix]) do
|
||||||
local nn = prefix .. ":" .. name
|
local nn = prefix .. ":" .. name
|
||||||
local nd = minetest.registered_nodes[nn]
|
local nd = core.registered_nodes[nn]
|
||||||
local tiles = nd.tiles or nd.tile_images
|
local tiles = nd.tiles or nd.tile_images
|
||||||
if tiles == nil or nd.drawtype == 'airlike' then
|
if tiles == nil or nd.drawtype == 'airlike' then
|
||||||
print("ignored(2): " .. nn)
|
print("ignored(2): " .. nn)
|
||||||
|
@ -13,14 +13,14 @@ except:
|
|||||||
############
|
############
|
||||||
############
|
############
|
||||||
# Instructions for generating a colors.txt file for custom games and/or mods:
|
# Instructions for generating a colors.txt file for custom games and/or mods:
|
||||||
# 1) Add the dumpnodes mod to a Minetest world with the chosen game and mods enabled.
|
# 1) Add the dumpnodes mod to a Luanti world with the chosen game and mods enabled.
|
||||||
# 2) Join ingame and run the /dumpnodes chat command.
|
# 2) Join ingame and run the /dumpnodes chat command.
|
||||||
# 3) Run this script and poin it to the installation path of the game using -g,
|
# 3) Run this script and poin it to the installation path of the game using -g,
|
||||||
# the path(s) where mods are stored using -m and the nodes.txt in your world folder.
|
# the path(s) where mods are stored using -m and the nodes.txt in your world folder.
|
||||||
# Example command line:
|
# Example command line:
|
||||||
# ./util/generate_colorstxt.py --game /usr/share/minetest/games/minetest_game \
|
# ./util/generate_colorstxt.py --game /usr/share/luanti/games/minetest_game \
|
||||||
# -m ~/.minetest/mods ~/.minetest/worlds/my_world/nodes.txt
|
# -m ~/.minetest/mods ~/.minetest/worlds/my_world/nodes.txt
|
||||||
# 4) Copy the resulting colors.txt file to your world folder or to any other places
|
# 4) Copy the resulting colors.txt file to your world folder or to any other place
|
||||||
# and use it with minetestmapper's --colors option.
|
# and use it with minetestmapper's --colors option.
|
||||||
###########
|
###########
|
||||||
###########
|
###########
|
||||||
|
Loading…
Reference in New Issue
Block a user