Skip to content

Commit

Permalink
Merged colored pb branch
Browse files Browse the repository at this point in the history
  • Loading branch information
misprit7 committed Jul 11, 2024
2 parents 77721aa + 8b74ba8 commit 613fabe
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
. !text !filter !merge !diff
* !text !filter !merge !diff
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Terraria world backups
*.twld
*.twld.bak
*.wld.bak
*.wld.bak2
Expand Down
Binary file added computerraria.twld
Binary file not shown.
Binary file added computerraria.wld
Binary file not shown.
50 changes: 39 additions & 11 deletions copy-world.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,42 @@
# Copies world to/from game files
#################################################

case $1 in
-t|--to)
cp $(dirname "$0")/computer.wld ~/.local/share/Terraria/tModLoader/Worlds/computer.wld
;;
-f|--from)
cp ~/.local/share/Terraria/tModLoader/Worlds/computer.wld $(dirname "$0")
;;
*)
"Supply either --to or --from to copy either from or to the Terraria world files"
;;
esac
TARGET_DIR="~/.local/share/Terraria/tModLoader/Worlds"
TO_FLAG=0
FROM_FLAG=0
MNT_FLAG=0

for arg in "$@"
do
case $arg in
-t|--to)
TO_FLAG=1
;;
-f|--from)
FROM_FLAG=1
;;
--mnt)
MNT_FLAG=1
;;
*)
echo "Invalid option: $arg"
echo "Supply either --to or --from and optionally --mnt to specify directory"
exit 1
;;
esac
done

if [ "$MNT_FLAG" -eq 1 ]; then
TARGET_DIR="/mnt/d/computerraria"
fi

if [ "$TO_FLAG" -eq 1 ]; then
cp $(dirname "$0")/computer.wld "$TARGET_DIR"
cp $(dirname "$0")/computer.twld "$TARGET_DIR"
elif [ "$FROM_FLAG" -eq 1 ]; then
cp "$TARGET_DIR/computer.wld" $(dirname "$0")
cp "$TARGET_DIR/computer.twld" $(dirname "$0")
else
echo "Supply either --to or --from to copy either to or from the Terraria world files"
exit 1
fi
1 change: 1 addition & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUN apt-get update && apt-get install -y \
libsdl2-2.0-0 \
python3 \
python3-pip \
python3-tqdm \
make \
vim \
wget
Expand Down

0 comments on commit 613fabe

Please sign in to comment.