dotg

a bitreich fosdem adventure
git clone git://parazyd.org/dotg.git
Log | Files | Refs

commit 2e651423a3d572078acfd32b7f71c571a14f788a
parent fa377f5e40aded7ced6c7c383d34b502916ab2aa
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sat, 24 Feb 2018 01:55:51 +0100

Add better toilet logic.

Diffstat:
Mact-i/Toilet1.dcgi | 9++++++++-
Mact-i/Toilet1.sh | 7+++++--
Mact-i/Toilet2.sh | 8++++++--
Mact-i/talk-gentoo.sh | 9++++++++-
Mact-i/talk-nerds.sh | 6++++--
5 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/act-i/Toilet1.dcgi b/act-i/Toilet1.dcgi @@ -9,7 +9,13 @@ map_toilet1 _msg "## TOILET 1 (T1)" - +if [ -f "$hipsters/obese/.takingashit" ]; then + _msg "The toilet is blocked by the spaniard taking a shit." + if [ -f "$inventory/.toilet1hasdildo" ]; then + _msg "You hear the spaniard shouting: 'Who put the dildo in + here? Arrrrgh.'" + fi +else cat <<EOM You are in one of the toilets. @@ -20,5 +26,6 @@ You see a toilet, sink, and a shower. [1|Check inventory|$path/inventory.dcgi|server|port] EOM +fi navigation diff --git a/act-i/Toilet1.sh b/act-i/Toilet1.sh @@ -12,10 +12,13 @@ specific_toilet1() { Black_dildo) _msg "You stick the black dildo in the shower drain, rendering it shut." + echo 1 > "$inventory/.toilet1hasdildo" mv "$inventory/$item" "$toilet1/shower" if [ -f "$kitchen/sink/Cheese" ]; then - _msg "You hear a strange noise coming from the NeXT machine." - rm -f "$inventory/.notyet" + if [ -f "$inventory/.toilet2hasdildo" ]; then + _msg "You hear a strange noise coming from the NeXT machine." + rm -f "$inventory/.notyet" + fi fi ;; esac diff --git a/act-i/Toilet2.sh b/act-i/Toilet2.sh @@ -16,10 +16,14 @@ specific_toilet2() { Black_dildo) _msg "You stick the black dildo in the shower drain, rendering it shut." + echo 1 > "$inventory/.toilet2hasdildo" mv "$inventory/$item" "$toilet2/shower" if [ -f "$kitchen/sink/Cheese" ]; then - _msg "You hear a strange noise coming from the NeXT machine." - rm -f "$inventory/.notyet" + if [ -f "$inventory/.toilet1hasdildo" -o \ + "$hipsters/obese/.takingashit" ]; then + _msg "You hear a strange noise coming from the NeXT machine." + rm -f "$inventory/.notyet" + fi fi ;; esac diff --git a/act-i/talk-gentoo.sh b/act-i/talk-gentoo.sh @@ -2,7 +2,8 @@ specific_talk_gentoo() { item="$1" if [ -f "$hipsters/obese/.takingashit" ]; then - _msg "The yoghurt did not bode well for the spaniard. He's in the toilet." + _msg "The yoghurt did not bode well for the spaniard. He's in + the toilet 1." return fi @@ -51,6 +52,12 @@ specific_talk_gentoo() { rm -f "$toilet1/shower/.notyet" rm -f "$toilet2/shower/.notyet" cp -f "$hipsters/obese/Plate_of_Bolognese_Sauce" "$hipsters/coffeetable" + + if [ -f "$kitchen/sink/Cheese" -a \ + -f "$inventory/.toilet2hasdildo" ]; then + _msg "You hear a strange noise coming from the + NeXT machine." + fi ;; The_Birth_of_Tragedy) diff --git a/act-i/talk-nerds.sh b/act-i/talk-nerds.sh @@ -7,7 +7,7 @@ specific_talk_nerds() { case "$item" in The_C_Programming_Language) _msg "You use the power of C to flip bytes and bang bits..." - [ -f "$inventory/.notyet" ] || { + if [ -f "$inventory/.notyet" ]; then _msg "Accidentally, you activate a [h|time machine|URL:ssh://time-machine@bitreich.org|server|port] @@ -17,7 +17,9 @@ specific_talk_nerds() { rm -f "$nextbox/Terminal" "$nextbox/Keyboard" \ "$nextbox/Mouse" "$nextbox/The_C_Programming_Language" printf 1 > "$inventory/.timemachineactivated" - } + else + _msg "Something is missing." + fi ;; Terminal|Keyboard|Mouse)