diff --git a/load-script.sh b/load-script.sh new file mode 100644 index 0000000..eea4f13 --- /dev/null +++ b/load-script.sh @@ -0,0 +1,22 @@ +#/usr/bin/env bash + +DIR=$(realpath $(dirname $0)) + +directory=$1 +shift +script_name=$1 +shift + +if [[ "${script_name}x" != "x" ]]; then + script_file="${directory}/${script_name}.png" +else + script_file="${DIR}/templates/map_background.png" +fi + +# Instantiate template +map_file="${DIR}/templates/texture-pack/assets/minecraft/textures/map/map_background.png" +rm ${map_file} +cp ${script_file} ${map_file} +# Package resource pack +rm ${SERVER_DIR}/botc-script-resource-pack.zip +zip -r ${SERVER_DIR}/botc-script-resource-pack.zip templates/texture-pack \ No newline at end of file diff --git a/startup.sh b/startup.sh new file mode 100644 index 0000000..cf98059 --- /dev/null +++ b/startup.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# TODO Check venv, create if it doesn't exist + +: "${ACTIVE_SCRIPT:=}" + +SCRIPT_DIR="${SERVER_DIR}/scripts" +TOOL_SCRIPT_DIR="${SERVER_DIR}/.scripts" + +"${TOOL_SCRIPT_DIR}"/load-script.sh "${SCRIPT_DIR}" "${ACTIVE_SCRIPT}" + +# Taken directly from the CurseForge Generic egg. No touchy. +java $([[ -f user_jvm_args.txt ]] && printf %s "@user_jvm_args.txt") -Xms128M -Xmx{{SERVER_MEMORY}}M -Dterminal.jline=false -Dterminal.ansi=true $([[ ! -f unix_args.txt ]] && printf %s "-jar `cat .serverjar`" || printf %s "@unix_args.txt") \ No newline at end of file diff --git a/templates/map_background.png b/templates/map_background.png new file mode 100644 index 0000000..e79a819 Binary files /dev/null and b/templates/map_background.png differ diff --git a/templates/texture-pack/assets/minecraft/textures/map/map_background.png b/templates/texture-pack/assets/minecraft/textures/map/map_background.png new file mode 100644 index 0000000..e79a819 Binary files /dev/null and b/templates/texture-pack/assets/minecraft/textures/map/map_background.png differ diff --git a/templates/texture-pack/pack.mcmeta b/templates/texture-pack/pack.mcmeta new file mode 100644 index 0000000..8ddbd3f --- /dev/null +++ b/templates/texture-pack/pack.mcmeta @@ -0,0 +1,10 @@ +{ + "pack": { + "pack_format": 48, + "description": "", + "supported_formats": { + "min_inclusive": 30, + "max_inclusive": 99 + } + } +} \ No newline at end of file diff --git a/templates/texture-pack/pack.png b/templates/texture-pack/pack.png new file mode 100644 index 0000000..d530530 Binary files /dev/null and b/templates/texture-pack/pack.png differ