Compare commits
No commits in common. "fd43c15bcdbd0b2d4d2285373410634a96f6d978" and "cb02d969bf510a4a1fce6d40842544eebac3ae8c" have entirely different histories.
fd43c15bcd
...
cb02d969bf
26
Discworld
26
Discworld
@ -1,9 +1,6 @@
|
|||||||
# Change to the 'discworld-tintin' directory and remove the input history file
|
# Change to the 'discworld-tintin' directory and remove the input history file
|
||||||
export DISCWORLD_DIRECTORY="PACKAGE_DIRECTORY"
|
cd "$( dirname -- "$( readlink -f -- "$0"; )"; )"
|
||||||
cd $DISCWORLD_DIRECTORY
|
rm logs/history.log
|
||||||
if [ -e logs/history.log ]; then
|
|
||||||
rm logs/history.log
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set hotkeys to switch in/out of "mobile" mode
|
# Set hotkeys to switch in/out of "mobile" mode
|
||||||
tmux bind C-f resize-pane -x 80%
|
tmux bind C-f resize-pane -x 80%
|
||||||
@ -18,14 +15,13 @@ if [[ ! $(tmux ls -F '#S') =~ discworld ]]; then
|
|||||||
rm logs/chat.log && touch logs/chat.log
|
rm logs/chat.log && touch logs/chat.log
|
||||||
|
|
||||||
# Start a new tmux session named "discworld" with our tmuxp setup
|
# Start a new tmux session named "discworld" with our tmuxp setup
|
||||||
echo "No existing discworld session, create a new one"
|
tmuxp load -s discworld ./discworld2.yaml
|
||||||
tmuxp load -s discworld ./discworld.yaml
|
fi
|
||||||
else
|
|
||||||
# If there is already a session, just attach
|
# If there is already a session, just attach
|
||||||
if [ -z "$TMUX" ]; then
|
if [ -z "$TMUX" ]; then
|
||||||
#tmux send-keys 'clear && tt++ -G config.tin' 'C-m'
|
#tmux send-keys 'clear && tt++ -G config.tin' 'C-m'
|
||||||
echo "Not already in TMUX, so let's attach"
|
echo "Not already in TMUX, so let's attach"
|
||||||
# If we aren't already inside of TMUX, then attach to our session
|
# If we aren't already inside of TMUX, then attach to our session
|
||||||
tmux -2 attach-session -t discworld -d
|
tmux -2 attach-session -t discworld -d
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -144,11 +144,10 @@ A short guide to getting the client installed, this package put in place and MUD
|
|||||||
- tmux and [tmuxp](https://github.com/tmux-python/tmuxp) (sudo apt install tmux tmuxp)
|
- tmux and [tmuxp](https://github.com/tmux-python/tmuxp) (sudo apt install tmux tmuxp)
|
||||||
- python 3
|
- python 3
|
||||||
- sqlite 3
|
- sqlite 3
|
||||||
* Run "install.sh" to configure your directories and create a global alias
|
* With package downloaded and requirements installed then `tt++ -G config.tin` will launch
|
||||||
- Will request sudo password to create link in /usr/local/bin
|
* "Discworld" shell-file exists to setup tmux layout or connect to existing
|
||||||
* Now you can type "disc" from your terminal to create a new session or connect to an existing one
|
- Recommend symlinking e.g. (`sudo ln -s /home/myuser/discworld-tintin/Discworld /usr/local/bin/disc)
|
||||||
- To run just the client without any tmux panes use `tt++ -G config.tin`
|
- Now you can type "disc" from anywhere to launch or connect to the setup
|
||||||
- The `disc` command runs the `Discworld` script which handles tmux session creation or re-attachment
|
|
||||||
|
|
||||||
### Configuring the MUD
|
### Configuring the MUD
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
session_name: discworld
|
session_name: discworld
|
||||||
start_directory: "$DISCWORLD_DIRECTORY"
|
|
||||||
windows:
|
windows:
|
||||||
- focus: 'true'
|
- focus: 'true'
|
||||||
layout: 459d,144x79,0,0[144x8,0,0,289,144x10,0,9,290,144x59,0,20{116x59,0,20,291,27x59,117,20[27x38,117,20,292,27x10,117,59,293,27x9,117,70,294]}]
|
layout: 459d,144x79,0,0[144x8,0,0,289,144x10,0,9,290,144x59,0,20{116x59,0,20,291,27x59,117,20[27x38,117,20,292,27x10,117,59,293,27x9,117,70,294]}]
|
||||||
options: {}
|
options: {}
|
||||||
panes:
|
panes:
|
||||||
- clear && tail -fs .5 logs/chat.log
|
- tail
|
||||||
- ./bin/mdt
|
- sh
|
||||||
- focus: 'true'
|
- focus: 'true'
|
||||||
shell_command: tt++ -G config.tin
|
shell_command: tt++
|
||||||
- ./bin/dt
|
- bash
|
||||||
- ./bin/grp
|
- sh
|
||||||
- ./bin/map
|
- bash
|
||||||
|
start_directory: "$(dirname '$0')"
|
||||||
window_name: DiscworldMUD
|
window_name: DiscworldMUD
|
||||||
|
|||||||
24
install.sh
24
install.sh
@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Directory where this script lives
|
|
||||||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
|
||||||
|
|
||||||
discworld_file="$script_dir/Discworld"
|
|
||||||
|
|
||||||
# Ensure the Discworld file exists
|
|
||||||
if [ ! -f "$discworld_file" ]; then
|
|
||||||
echo "Error: '$discworld_file' not found."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Escape characters that might confuse sed (& and |)
|
|
||||||
escaped_dir=$(printf '%s\n' "$script_dir" | sed 's/[&|]/\\&/g')
|
|
||||||
|
|
||||||
# Replace "PACKAGE_DIRECTORY" on the second line with the full path
|
|
||||||
sed -i "2s|PACKAGE_DIRECTORY|$escaped_dir|" "$discworld_file"
|
|
||||||
|
|
||||||
# Create (or overwrite) the symlink in /usr/local/bin
|
|
||||||
sudo ln -sf "$discworld_file" /usr/local/bin/disc
|
|
||||||
|
|
||||||
echo "The discworld-tintin package is installed, you can now type 'disc' from anywhere to connect"
|
|
||||||
@ -19,7 +19,7 @@
|
|||||||
#ACTION {^There is a doorway in the %1 wall leading into a curious shop.$} { #showme {\a}; };
|
#ACTION {^There is a doorway in the %1 wall leading into a curious shop.$} { #showme {\a}; };
|
||||||
|
|
||||||
#NOP ==[Incident Highlighting]==
|
#NOP ==[Incident Highlighting]==
|
||||||
#SUB {^The%1grabs your%2. You struggle briefly but {she|he|it} wrests it from your grip and makes for a hasty retreat.} {<488><119>The<088><fca>%1<488><119>grabs your<088><afc>%2<488><119>. You struggle briefly but %3 wrests it from your grip and makes for a hasty retreat.};
|
#SUB {^The%1grabs your%2. You struggle briefly but {she|he|it} wrests it from your grip and makes for a hasty retreat.} {<488><119>The<088><fca>%1<488><119>grabs your<088><afc>%2<488><119>. You struggle briefly but {she|he|it} wrests it from your grip and makes for a hasty retreat.};
|
||||||
#SUB {^The%1and%2struggle briefly over%3before%4wrests it free%5$} {<488><119>The<088><fca>%1<488><119>and<088><fca>%2<488><119>struggle briefly over<088><afc>%3<488><119>before%4wrests it free%5};
|
#SUB {^The%1and%2struggle briefly over%3before%4wrests it free%5$} {<488><119>The<088><fca>%1<488><119>and<088><fca>%2<488><119>struggle briefly over<088><afc>%3<488><119>before%4wrests it free%5};
|
||||||
#SUB {^The%1{suddenly snatches|snatches}%2from%3and makes a run for it.$} {<488><119>The<088><188><fca>%1<488><119>suddenly snatches<088><188><afc>%2<488><119>from<088><188><fca>%3<488><119>and makes a run for it.};
|
#SUB {^The%1{suddenly snatches|snatches}%2from%3and makes a run for it.$} {<488><119>The<088><188><fca>%1<488><119>suddenly snatches<088><188><afc>%2<488><119>from<088><188><fca>%3<488><119>and makes a run for it.};
|
||||||
#HIGHLIGHT {^As %1 dies %2 drops %3 in shock.$} {green underscore};
|
#HIGHLIGHT {^As %1 dies %2 drops %3 in shock.$} {green underscore};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user