Browse Source

python3 and other fixes

master
poikilos 7 years ago
committed by Jacob Gustafson
parent
commit
70c708f139
  1. 39
      README.md
  2. 37
      etc/change_hardcoded_world_name_first/game-install-ENLIVEN
  3. 25
      mtsenliven.py
  4. 6
      webapp/README.md

39
README.md

@ -124,6 +124,23 @@ Otherwise just install everything EXCEPT cme_to_spawners & tsm_pyramids_to_spawn
* The network folder contains some stuff for networks, which is usually only useful for using Minetest in a network cafe or school. * The network folder contains some stuff for networks, which is usually only useful for using Minetest in a network cafe or school.
(The purpose of minetest_userscript_localENLIVEN_server_only.vbs is to make sure the user only uses the hostname localENLIVEN, however this only changes the default, and cannot be enforced in any way as far as I know without recompiling the client.) (The purpose of minetest_userscript_localENLIVEN_server_only.vbs is to make sure the user only uses the hostname localENLIVEN, however this only changes the default, and cannot be enforced in any way as far as I know without recompiling the client.)
## Planned Features
* add NPCs (possibly mobs via https://github.com/Bremaweb/adventuretest/tree/master/mods/mobs )
* add https://github.com/minetest-mods/smartfs ?
* Do not allow teleporting to travelnet teleporters in an area protected from you by protection mod (even if the source teleporter is yours), but allow teleporting to areas where you cannot modify (such as advanced area protection areas where, by default, use is allowed and modify is not). Locked travelnet will not be used by this mod--instead, this less-cumbersome change is planned.
* Log where bones were placed to debug.txt, possibly by way of the following chat message:
after the existing line:
minetest.set_node(pos, {name = "bones:bones", param2 = param2})
add the new line (not sure if the format call is really ok--it was copied from compassgps:
minetest.chat_send_player(player:get_player_name(), S("Bones placed at %s."):format(pos))
### Potential mods to add
* weather: https://github.com/Jeija/minetest-mod-weather ( https://forum.minetest.net/viewtopic.php?t=5245 )
* Immersive Sounds [ambience]: https://forum.minetest.net/viewtopic.php?t=2807
OR technic_ambience: http://realbadangel.pl/technic_ambience.zip
* baked clay (Ethereal NG integrates with it, mobs redo, and farming redo)
* Updated pipeworks fork by HybridDog: https://github.com/HybridDog/pipeworks
## Known issues: ## Known issues:
* ENLIVEN Windows binary release installer should be signed via a code signing license to avoid browser warnings and possible issues with virus scanners (NOTE: Squirrel.Windows has signing available such as via: * ENLIVEN Windows binary release installer should be signed via a code signing license to avoid browser warnings and possible issues with virus scanners (NOTE: Squirrel.Windows has signing available such as via:
./src\.nuget\NuGet.exe pack .\ENLIVEN.<version>.nuspec ./src\.nuget\NuGet.exe pack .\ENLIVEN.<version>.nuspec
@ -143,23 +160,6 @@ squirrel --releasify .\ENLIVEN.<version>.nupkg <your code signing options here>
* minetest_game mods and modpacks are owned by root in the end, for some reason. This may cause serious problems on your server. Change the owner to your current user. * minetest_game mods and modpacks are owned by root in the end, for some reason. This may cause serious problems on your server. Change the owner to your current user.
* (minetestoffline.py) (status:closed reason:no solution) assumes name specified in file is same as id (filename) * (minetestoffline.py) (status:closed reason:no solution) assumes name specified in file is same as id (filename)
## Planned Features
* add NPCs (possibly mobs via https://github.com/Bremaweb/adventuretest/tree/master/mods/mobs )
* add https://github.com/minetest-mods/smartfs ?
* Do not allow teleporting to travelnet teleporters in an area protected from you by protection mod (even if the source teleporter is yours), but allow teleporting to areas where you cannot modify (such as advanced area protection areas where, by default, use is allowed and modify is not). Locked travelnet will not be used by this mod--instead, this less-cumbersome change is planned.
* Log where bones were placed to debug.txt, possibly by way of the following chat message:
after the existing line:
minetest.set_node(pos, {name = "bones:bones", param2 = param2})
add the new line (not sure if the format call is really ok--it was copied from compassgps:
minetest.chat_send_player(player:get_player_name(), S("Bones placed at %s."):format(pos))
### Potential mods to add
* weather: https://github.com/Jeija/minetest-mod-weather ( https://forum.minetest.net/viewtopic.php?t=5245 )
* Immersive Sounds [ambience]: https://forum.minetest.net/viewtopic.php?t=2807
OR technic_ambience: http://realbadangel.pl/technic_ambience.zip
* baked clay (Ethereal NG integrates with it, mobs redo, and farming redo)
* Updated pipeworks fork by HybridDog: https://github.com/HybridDog/pipeworks
### Known issues in mods: ### Known issues in mods:
* Mining Drill mk3 duplication bug * Mining Drill mk3 duplication bug
* Technic manual is not complete. Contribute info on drills and mining? See https://github.com/minetest-mods/technic/blob/master/manual.md * Technic manual is not complete. Contribute info on drills and mining? See https://github.com/minetest-mods/technic/blob/master/manual.md
@ -269,3 +269,8 @@ Qt5Core.dll
Qt5Gui.dll Qt5Gui.dll
Qt5Svg.dll Qt5Svg.dll
Qt5Widgets.dll Qt5Widgets.dll
## Developer Notes
### Regression Tests
* Use of input in python, where should never be used except in expertmm.py and minetestinfo.py for first-time setup or when interactive_enable is True

37
etc/change_hardcoded_world_name_first/game-install-ENLIVEN

@ -17,6 +17,7 @@
# sudo find -name 'worlds' (worlds folder is in $HOME/.minetest) # sudo find -name 'worlds' (worlds folder is in $HOME/.minetest)
# sudo find -name 'minimal' (stable build [such as 0.4.9 games folder is /usr/share/games/minetest/games, but git version games folder is /usr/local/share/minetest/games) # sudo find -name 'minimal' (stable build [such as 0.4.9 games folder is /usr/share/games/minetest/games, but git version games folder is /usr/local/share/minetest/games)
sudo echo "cached password."
# NOTE: minetest mods are ALWAYS ONLY installed on server # NOTE: minetest mods are ALWAYS ONLY installed on server
mtgame_name="minetest_game" mtgame_name="minetest_game"
USR_SHARE_MINETEST=/usr/share/games/minetest USR_SHARE_MINETEST=/usr/share/games/minetest
@ -458,11 +459,11 @@ fi
if [ -d "tsm_chests_example" ]; then if [ -d "tsm_chests_example" ]; then
rm -Rf "tsm_chests_example" rm -Rf "tsm_chests_example"
fi fi
if [ -f "trm_default_example" ]; then if [ -d "trm_default_example" ]; then
rm "trm_default_example" rm -Rf "trm_default_example"
fi fi
if [ -f "tsm_default_example" ]; then if [ -d "tsm_default_example" ]; then
rm "tsm_default_example" rm -Rf "tsm_default_example"
fi fi
#if [ -d "$MTMOD_UNZ_NAME" ]; then #if [ -d "$MTMOD_UNZ_NAME" ]; then
rm -Rf $MTMOD_UNZ_NAME rm -Rf $MTMOD_UNZ_NAME
@ -946,14 +947,15 @@ fi
cd "$HOME/Downloads" cd "$HOME/Downloads"
#does NOT have a zip extension when downloaded via wget: #does NOT have a zip extension when downloaded via wget:
MTMOD_DL_ZIP=master MTMOD_DL_ZIP=master.zip
MTMOD_SRC_ZIP=mesecons_modpack.zip MTMOD_SRC_ZIP=mesecons_modpack.zip
MTMOD_UNZ_NAME=Jeija-minetest-mod-mesecons-* MTMOD_UNZ_NAME=mesecons-master
MTMOD_DEST_NAME=mesecons MTMOD_DEST_NAME=mesecons
MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME
#if [ -d "$MTMOD_UNZ_NAME" ]; then #if [ -d "$MTMOD_UNZ_NAME" ]; then
rm -Rf $MTMOD_UNZ_NAME rm -Rf $MTMOD_UNZ_NAME
#fi #fi
rm -Rf minetest-mods-mesecons-*
rm -Rf "" rm -Rf ""
if [ -f "$MTMOD_DL_ZIP" ]; then if [ -f "$MTMOD_DL_ZIP" ]; then
rm -f "$MTMOD_DL_ZIP" rm -f "$MTMOD_DL_ZIP"
@ -961,16 +963,14 @@ fi
if [ -f "$MTMOD_SRC_ZIP" ]; then if [ -f "$MTMOD_SRC_ZIP" ]; then
rm -f "$MTMOD_SRC_ZIP" rm -f "$MTMOD_SRC_ZIP"
fi fi
wget https://github.com/Jeija/minetest-mod-mesecons/zipball/master wget https://github.com/minetest-mods/mesecons/archive/master.zip
mv master mesecons_modpack.zip mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP
unzip $MTMOD_SRC_ZIP unzip $MTMOD_SRC_ZIP
sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH"
if [ ! -d "$MTMOD_DEST_PATH" ]; then if [ ! -d "$MTMOD_DEST_PATH" ]; then
echo "ERROR: failed to create $MTMOD_DEST_PATH, so cannot continue." > $err_txt echo "ERROR: failed to create $MTMOD_DEST_PATH, so cannot continue." > $err_txt
exit 1 exit 1
fi fi
#cd Jeija-minetest-mod-mesecons-*
#sudo mv -f mesecons* "$MT_MYGAME_MODS_PATH/"
############ REQUIRES MESECONS ############ ############ REQUIRES MESECONS ############
##### NEEDED since carts in minetest_game added much of this functionality but not yet startstoprail or detectorrail ##### ##### NEEDED since carts in minetest_game added much of this functionality but not yet startstoprail or detectorrail #####
@ -1016,6 +1016,7 @@ cd "$HOME/Downloads"
MTMOD_DL_ZIP=master.zip MTMOD_DL_ZIP=master.zip
#MTMOD_SRC_ZIP=throwing_Echoes91.zip #MTMOD_SRC_ZIP=throwing_Echoes91.zip
MTMOD_SRC_ZIP=throwing_MinetestForFun.zip MTMOD_SRC_ZIP=throwing_MinetestForFun.zip
MTMODPACK_UNZ_NAME=server-minetestforfun-master
MTMOD_UNZ_NAME=server-minetestforfun-master/mods/throwing MTMOD_UNZ_NAME=server-minetestforfun-master/mods/throwing
MTMOD_DEST_NAME=throwing MTMOD_DEST_NAME=throwing
MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME
@ -1030,6 +1031,9 @@ fi
#if [ -d "$MTMOD_UNZ_NAME" ]; then #if [ -d "$MTMOD_UNZ_NAME" ]; then
rm -Rf $MTMOD_UNZ_NAME rm -Rf $MTMOD_UNZ_NAME
#fi #fi
if [ -d "$MTMODPACK_UNZ_NAME" ]; then
rm -Rf $MTMODPACK_UNZ_NAME
fi
if [ -f "$MTMOD_DL_ZIP" ]; then if [ -f "$MTMOD_DL_ZIP" ]; then
rm -f "$MTMOD_DL_ZIP" rm -f "$MTMOD_DL_ZIP"
fi fi
@ -1308,7 +1312,9 @@ rm -Rvf $MTMOD_UNZ_NAME
# NOTE: a skin database is at http://minetest.fensta.bplaced.net/ # NOTE: a skin database is at http://minetest.fensta.bplaced.net/
# bell07's 2016 (FORK of Krock's fork of dmonty's) u_skins (u_skins is a skin GUI that works with unified_inventory, whereas other skin GUIs often use inventory++) # bell07's 2016 (FORK of Krock's fork of dmonty's) u_skins (u_skins is a skin GUI that works with unified_inventory, whereas other skin GUIs often use inventory++)
# Krock's is outdated and has remaining bugs such as in updater: wget https://github.com/SmallJoker/minetest-u_skinsdb/archive/master.zip # Krock's is outdated and has remaining bugs such as in updater: wget https://github.com/SmallJoker/minetest-u_skinsdb/archive/master.zip
wget https://github.com/bell07/minetest-u_skinsdb/archive/master.zip # bell07's no longer exists
# wget https://github.com/bell07/minetest-u_skinsdb/archive/master.zip
wget https://github.com/dmonty2/minetest-u_skinsdb/archive/master.zip
mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP"
unzip "$MTMOD_SRC_ZIP" unzip "$MTMOD_SRC_ZIP"
sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH"
@ -1686,9 +1692,10 @@ if [ ! -d "$MTMOD_DEST_PATH" ]; then
fi fi
# https://forum.minetest.net/viewtopic.php?f=11&t=12440&p=310915#p310915
cd $HOME/Downloads cd $HOME/Downloads
MTMOD_DL_ZIP=file.php?id=6140 #MTMOD_DL_ZIP=file.php?id=6140
MTMOD_DL_ZIP=master.zip
MTMOD_SRC_ZIP=invhack.zip MTMOD_SRC_ZIP=invhack.zip
MTMOD_UNZ_NAME=invhack MTMOD_UNZ_NAME=invhack
MTMOD_DEST_NAME=invhack MTMOD_DEST_NAME=invhack
@ -1705,7 +1712,9 @@ fi
if [ -d "$MTMOD_DEST_PATH" ]; then if [ -d "$MTMOD_DEST_PATH" ]; then
sudo rm -Rf "$MTMOD_DEST_PATH" sudo rm -Rf "$MTMOD_DEST_PATH"
fi fi
wget https://forum.minetest.net/download/file.php?id=6140 # wget https://forum.minetest.net/download/file.php?id=6140
# forum link changed, so use salahzar's GitHub upload instead:
wget https://github.com/salahzar/minetest-invhack/archive/master.zip
mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP"
unzip "$MTMOD_SRC_ZIP" unzip "$MTMOD_SRC_ZIP"
sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH"

25
mtsenliven.py

@ -4,18 +4,37 @@ from mtanalyze.minetestinfo import *
import subprocess, signal import subprocess, signal
game_id = "ENLIVEN" game_id = "ENLIVEN"
#screen -S MinetestServer $mts --gameid ENLIVEN --worldname FCAGameAWorld #screen -S MinetestServer $mts --gameid ENLIVEN --worldname FCAGameAWorld
print()
print()
print()
if not minetestinfo.contains("minetestserver_path"): if not minetestinfo.contains("minetestserver_path"):
print("[ mtsenliven.py ] ERROR: minetestserver_path" print("[ mtsenliven.py ] ERROR: minetestserver_path"
" was not found in your version of minetestinfo.py") " was not found in your version of minetestinfo.py")
exit(1) exit(1)
mts = minetestinfo.get_var("system.minetestserver_path") mts = minetestinfo.get_var("minetestserver_path")
if not minetestinfo.contains("primary_world_path"): if not minetestinfo.contains("primary_world_path"):
print("[ mtsenliven.py ] ERROR: primary_world_path" print("[ mtsenliven.py ] ERROR: primary_world_path"
"was selected by minetestinfo.py") "was selected by minetestinfo.py")
exit(2) exit(2)
wp = minetestinfo.get_var("primary_world_path") wp = minetestinfo.get_var("primary_world_path")
wn = os.path.basename(wp) wn = os.path.basename(wp)
p = subprocess.Popen([mts, '--gameid '+game_id, '--worldname '+wn]) print("Using minetestserver: " + mts)
# stdout=subprocess.PIPE) print("Using primary_world_path: " + wp)
print("Using world_name: " + wn)
print()
process = subprocess.Popen(
[mts, '--gameid', game_id, '--worldname', wn],
stdout=subprocess.PIPE
)
# see https://www.endpoint.com/blog/2015/01/28/getting-realtime-output-
# using-python
while True:
output = process.stdout.readline()
if output == '' and process.poll() is not None:
break
if output:
print(output.strip())
rc = process.poll()

6
webapp/README.md

@ -27,9 +27,9 @@ if (!has_setting("owner.primary_world_path")):
var world_path = peek_setting("owner.primary_world_path"); var world_path = peek_setting("owner.primary_world_path");
var world_name = path.basename(wp); var world_name = path.basename(wp);
p = subprocess.Popen([mts, '--gameid ENLIVEN', '--worldname ' + world_name], //var mts_proc;
stdout=subprocess.PIPE); //mts_proc = /*TODO: finish this*/([mts, '--gameid ENLIVEN', '--worldname ' + world_name]);
p.write = mts_out; mts_proc.write = mts_out;
return results; return results;
``` ```

Loading…
Cancel
Save