Poikilos / EnlivenMinetest

Minetest engine server management tools and ENLIVEN game installer/updater
Other
3 stars 0 forks source link

bucket_game won't load show old worlds because when lowercase, the engine removes "_game" from the gameid. #498

Open Poikilos opened 2 years ago

Poikilos commented 2 years ago

To reproduce issue:

"bucket" isn't a bad gameid, and neither is the client visually removing the "_game" part. However, maybe do something to remedy this.

Solution 1: Automatically change world.mt files with gameid ending in "_Game" by removing that string so they appear in the list like new "gameid = bucket" worlds (case-insensitively, since the old ones would become "Bucket" if this solution is done).

Solution 2: Have players manually make the change (automated with the script below).

#!/bin/bash
# requires python3
if [ ! -d "$1/worlds" ]; then
    echo "You must specify a minetest data directory containing a worlds directory."
    exit 1
fi
sudo wget -O /usr/local/bin/changeworldmt.py https://raw.githubusercontent.com/poikilos/mtanalyze/master/changeworldmt.py
sudo chmod +x /usr/local/bin/changeworldmt.py
cd $1/worlds
changeworldmt.py gameid Bucket_Game bucket
Poikilos commented 2 years ago

Tested in snapshot 220509. IRC 2022-05-17 from Poikilos to OldCoder:

<Poikilos> The default_game in src/defaultsettings.cpp and in builtin/mainmenu/init.lua still specify Bucket_Game with uppercase though snapshots have been including it in lowercase. The lowercase is kindof nice because mainmenu removes the "_game" part from the caption, but if you keep it that way, those 2 files should change and existing worlds will have to change gameid = Bucket_Game to gameid = bucket in world.mt