mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-11-27 01:43:52 +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:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
labels: |
|
||||
org.opencontainers.image.title=Minetest Mapper
|
||||
org.opencontainers.image.vendor=Minetest
|
||||
org.opencontainers.image.title=Minetestmapper
|
||||
org.opencontainers.image.vendor=Luanti
|
||||
org.opencontainers.image.licenses=BSD 2-Clause
|
||||
|
||||
# Build and push Docker image
|
||||
|
@ -19,7 +19,7 @@ if(WIN32)
|
||||
set(BINDIR ".")
|
||||
set(DOCDIR ".")
|
||||
else()
|
||||
set(SHAREDIR "share/minetest") # reuse Minetest share dir
|
||||
set(SHAREDIR "share/luanti") # reuse engine share dir
|
||||
set(BINDIR "bin")
|
||||
set(DOCDIR "share/doc/${PROJECT_NAME}")
|
||||
set(MANDIR "share/man")
|
||||
@ -209,7 +209,7 @@ if(UNIX)
|
||||
install(FILES "minetestmapper.6" DESTINATION "${MANDIR}/man6")
|
||||
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_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
|
||||
|
||||
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 \
|
||||
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 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
|
||||
: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.
|
||||
This version is both faster and provides more features than the now obsolete Python script.
|
||||
A port of minetestmapper.py to C++ from `the 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
|
||||
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
|
||||
<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
|
||||
@ -116,7 +117,7 @@ zoom:
|
||||
Apply zoom to drawn nodes by enlarging them to n*n squares, e.g. ``--zoom 4``
|
||||
|
||||
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:
|
||||
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
|
||||
#include "cmake_config.h"
|
||||
#else
|
||||
#define USE_POSTGRESQL 0
|
||||
#define USE_LEVELDB 0
|
||||
#define USE_REDIS 0
|
||||
|
||||
#define SHAREDIR "/usr/share/minetest"
|
||||
#error missing config
|
||||
#endif
|
||||
|
@ -39,7 +39,7 @@ static void usage()
|
||||
};
|
||||
const char *top_text =
|
||||
"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"
|
||||
"Options:\n";
|
||||
const char *bottom_text =
|
||||
|
@ -1,6 +1,6 @@
|
||||
.TH MINETESTMAPPER 6
|
||||
.SH NAME
|
||||
minetestmapper \- generate an overview image of a Minetest map
|
||||
minetestmapper \- generate an overview image of a Luanti map
|
||||
.SH SYNOPSIS
|
||||
.B minetestmapper
|
||||
\fB\-i\fR \fIworld_path\fR
|
||||
@ -9,9 +9,9 @@ minetestmapper \- generate an overview image of a Minetest map
|
||||
See additional optional parameters below.
|
||||
.SH DESCRIPTION
|
||||
.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
|
||||
provides more functionality than the deprecated Python script.
|
||||
provides more functionality than the obsolete Python script.
|
||||
.SH MANDATORY PARAMETERS
|
||||
.TP
|
||||
.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
|
||||
.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
|
||||
.BR \-\-scales " " \fIedges\fR
|
||||
|
@ -7,7 +7,7 @@ variant=win32
|
||||
[[ "$(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
|
||||
libgd_dir=
|
||||
zlib_dir=
|
||||
|
@ -15,7 +15,7 @@ local function pairs_s(dict)
|
||||
return ipairs(keys)
|
||||
end
|
||||
|
||||
minetest.register_chatcommand("dumpnodes", {
|
||||
core.register_chatcommand("dumpnodes", {
|
||||
description = "Dump node and texture list for use with minetestmapper",
|
||||
func = function()
|
||||
local ntbl = {}
|
||||
@ -30,7 +30,7 @@ minetest.register_chatcommand("dumpnodes", {
|
||||
ntbl[prefix][name] = true
|
||||
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
|
||||
return true, err
|
||||
end
|
||||
@ -39,7 +39,7 @@ minetest.register_chatcommand("dumpnodes", {
|
||||
out:write('# ' .. prefix .. '\n')
|
||||
for _, name in pairs_s(ntbl[prefix]) do
|
||||
local nn = prefix .. ":" .. name
|
||||
local nd = minetest.registered_nodes[nn]
|
||||
local nd = core.registered_nodes[nn]
|
||||
local tiles = nd.tiles or nd.tile_images
|
||||
if tiles == nil or nd.drawtype == 'airlike' then
|
||||
print("ignored(2): " .. nn)
|
||||
|
@ -13,14 +13,14 @@ except:
|
||||
############
|
||||
############
|
||||
# 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.
|
||||
# 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.
|
||||
# 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
|
||||
# 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.
|
||||
###########
|
||||
###########
|
||||
|
Loading…
Reference in New Issue
Block a user