Merge branch 'master' of git://parazyd.org/dotg - dotg - Day Of The GrParazyd | |
git clone git://bitreich.org/dotg git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d… | |
Log | |
Files | |
Refs | |
Tags | |
--- | |
commit 99241613f5d03b1aa2cf1c865612f9d9d2add1b7 | |
parent 5559026e6331a3090bbba326fed64cfa9cfa0f56 | |
Author: Christoph Lohmann <[email protected]> | |
Date: Sun, 9 Jun 2019 11:15:58 +0200 | |
Merge branch 'master' of git://parazyd.org/dotg | |
Diffstat: | |
A act-ii/Cafeteria.dcgi | 31 +++++++++++++++++++++++++++++… | |
A act-ii/Campus_Outside.dcgi | 27 +++++++++++++++++++++++++++ | |
M act-ii/config | 27 +++++++++++++++------------ | |
M act-ii/functions | 112 +----------------------------… | |
M act-ii/index.dcgi | 22 ++++++++-------------- | |
D act-ii/indexreal.dcgi | 27 --------------------------- | |
M act-ii/maps | 92 +++++++++++++++++++----------… | |
M act-ii/reset.dcgi | 2 +- | |
A act-ii/start.dcgi | 18 ++++++++++++++++++ | |
M index.gph | 2 +- | |
10 files changed, 161 insertions(+), 199 deletions(-) | |
--- | |
diff --git a/act-ii/Cafeteria.dcgi b/act-ii/Cafeteria.dcgi | |
@@ -0,0 +1,31 @@ | |
+#!/bin/sh | |
+ | |
+. config | |
+echo Cafeteria > "$savegame/room" | |
+. functions | |
+. maps | |
+ | |
+map_cafeteria | |
+ | |
+if [ -f "$inventory/.called20h" ]; then | |
+ | |
+echo | |
+ | |
+else | |
+cat <<EOM | |
+## CAFETERIA | |
+ | |
+You are in the campus cafeteria. You see a bunch of nerds and | |
+Rust developers. The alcohol queue is as long as always and you | |
+decide it isn't worth the wait. You'd rather find your friend | |
+first. | |
+ | |
+EOM | |
+fi | |
+ | |
+cat <<EOM | |
+ | |
+[1|Check inventory|$path/inventory.dcgi|server|port] | |
+EOM | |
+ | |
+navigation | |
diff --git a/act-ii/Campus_Outside.dcgi b/act-ii/Campus_Outside.dcgi | |
@@ -0,0 +1,27 @@ | |
+#!/bin/sh | |
+ | |
+. config | |
+echo Campus_Outside > "$savegame/room" | |
+. functions | |
+. maps | |
+ | |
+map_campus | |
+ | |
+cat <<EOM | |
+## THE CAMPUS | |
+ | |
+You are outside on the FOSDEM campus. It's relatively warm. | |
+There is plenty of people walking and eating junk food around. | |
+ | |
+EOM | |
+ | |
+if [ -f "$inventory/.called20h" ]; then | |
+echo | |
+fi | |
+ | |
+cat <<EOM | |
+ | |
+[1|Check inventory|$path/inventory.dcgi|server|port] | |
+EOM | |
+ | |
+navigation | |
diff --git a/act-ii/config b/act-ii/config | |
@@ -3,18 +3,21 @@ | |
export path="/dotg/act-ii" | |
export savegame="/home/parazyd/dotg/act-ii/$REMOTE_ADDR" | |
-export cables="$savegame/cables" | |
-export musicsystem="$savegame/musicsystem" | |
-export homebase="$savegame/homebase" | |
-export windows10="$savegame/windows10" | |
-export dancefloor="$savegame/dancefloor" | |
-export cheeserat="$savegame/cheeserat" | |
-export hipsters="$savegame/hipsters" | |
-export stairs="$savegame/stairs" | |
-export elevator="$savegame/elevator" | |
-export bar="$savegame/bar" | |
-export toilet="$savegame/toilet" | |
-export vendingmachine="$savegame/vendingmachine" | |
export inventory="$savegame/inventory" | |
+export cafeteria="$savegame/cafeteria" | |
[ -d "$savegame" ] && return | |
+ | |
+mkdir -p \ | |
+ "$inventory" \ | |
+ "$cafeteria" \ | |
+ | |
+printf 1 > "$inventory/New_Thinkpad" | |
+printf 1 > "$inventory/Plastic_bottle_of_rakia" | |
+printf 1 > "$inventory/Smartphone" | |
+printf 1 > "$inventory/Red_Lighter" | |
+printf 20 > "$inventory/Cigarettes" | |
+printf 200 > "$inventory/Euros" | |
+ | |
+printf 1000 > "$cafeteria/Beers" | |
+printf 1000 > "$cafeteria/Chocolate_Milks" | |
diff --git a/act-ii/functions b/act-ii/functions | |
@@ -2,19 +2,10 @@ | |
navigation() { | |
locations=" | |
- DJ | |
- Homebase | |
- Dance_Floor | |
- Hipsters | |
- Hipster_Couch | |
- Vending_Machine | |
- Stairs | |
- Elevator | |
- Bar | |
- Toilet | |
+ Campus_Outside | |
+ Cafeteria | |
" | |
- current="$(cat $savegame/room)" | |
- | |
+ current="$(cat "$savegame/room")" | |
echo | |
for i in $locations; do | |
if ! [ "$current" = "$i" ]; then | |
@@ -27,100 +18,3 @@ _msg() { | |
echo | |
echo "$*" | fmt --width=109 | sed 's/\t//g' | sed 's/^t/tt/' | |
} | |
- | |
-dropitem() { | |
- item="$1" | |
- [ -f "$inventory/$item" ] || return 1 | |
- oldcount="$(cat $inventory/$item)" | |
- newcount="$(( $oldcount - 1))" | |
- if [ "$newcount" -lt 1 ]; then | |
- rm -f "$inventory/$item" | |
- else | |
- printf "$newcount" > "$inventory/$item" | |
- fi | |
-} | |
- | |
-list_items_to() { | |
- what="$1" | |
- where="$2" | |
- cd "$where" | |
- for i in $(ls -1); do | |
- echo "[1|$i|$path/$what.dcgi?$where/$i|server|port]" | |
- done | |
- cd - >/dev/null | |
- | |
- cat <<EOM | |
- | |
-(note: select any item to $what it) | |
- | |
-EOM | |
-} | |
- | |
-take_item() { | |
- fullpath="$1" | |
- itemname="$(basename $fullpath)" | |
- mv "$fullpath" "$inventory/$itemname" | |
-} | |
- | |
-find_usecase() { | |
- item="$1" | |
- room="$2" | |
- | |
- line="$(grep "^$item" usecases.csv)" | |
- [ -z "$line" ] && { | |
- _msg "No use for $item here." | |
- return | |
- } | |
- | |
- uses="$(echo $line | tr ',' '\n' | tail -n+2)" | |
- if [ "$uses" = "anywhere" ]; then | |
- echo "use-generic" | |
- return | |
- fi | |
- | |
- for i in $uses; do | |
- if [ "$i" = "anywhere" ]; then | |
- echo "use-generic" | |
- return | |
- elif [ "$i" = "$room" ]; then | |
- echo "use-specific,$i" | |
- return | |
- fi | |
- done | |
- | |
- _msg "No use for $item here." | |
-} | |
- | |
-use_generic() { | |
- case "$1" in | |
- Euros) | |
- dropitem "$item" | |
- _msg "You throw a 1 Euro coint at a hipster." | |
- ;; | |
- | |
- Cigarettes) | |
- dropitem "$item" | |
- _msg "You smoke a cigarette." | |
- ;; | |
- | |
- Beers) | |
- dropitem "$item" | |
- _msg "You drink a beer." | |
- ;; | |
- | |
- Cheese) | |
- _msg "You eat a piece of cheese." | |
- ;; | |
- esac | |
-} | |
- | |
-use_specific() { | |
- call="$1" | |
- item="$2" | |
- | |
- case "$call" in | |
- *) | |
- _msg "Not implemented" | |
- ;; | |
- esac | |
-} | |
diff --git a/act-ii/index.dcgi b/act-ii/index.dcgi | |
@@ -1,7 +1,7 @@ | |
#!/bin/sh | |
-#. config | |
-#. functions | |
+. config | |
+. functions | |
cat <<EOM | |
@@ -10,7 +10,7 @@ cat <<EOM | |
▌ ▌▞▀▌▚▄▌ ▌ ▌▜▀ ▌ ▌ ▌▛▀ ▌ ▌▌ ▌ … | |
▀▀ ▝▀▘▗▄▘ ▝▀ ▐ ▘ ▘ ▘▝▀▘ ▝▀ ▘ ▘ … | |
-A Bitreich FOSDEM adventure... 03 Feb 2018 A.D. | |
+A Bitreich FOSDEM adventure... 02 Feb 2019 A.D. | |
⣎⣱ ⢀⣀ ⣰⡀ ⡇ ⡇ | |
@@ -18,16 +18,10 @@ A Bitreich FOSDEM adventure... 03 Feb 2018 A.D. | |
-- "Hackers" | |
EOM | |
-cat <<EOM | |
- | |
-Act II is undergoing development. Stay tuned :) | |
- | |
-EOM | |
- | |
-#if [ -f "$savegame/room" ]; then | |
-# _msg "[1|Continue adventure!|$path/$(cat ${savegame}/room).dcgi|serve… | |
-#else | |
-# _msg "[1|Start adventure!|$path/start.dcgi|server|port]" | |
-#fi | |
+if [ -f "$savegame/room" ]; then | |
+ _msg "[1|Continue adventure!|$path/$(cat ${savegame}/room).dcgi|server… | |
+else | |
+ _msg "[1|Start adventure!|$path/start.dcgi|server|port]" | |
+fi | |
echo "[1|Go back :(|/dotg/index.gph|server|port]" | |
diff --git a/act-ii/indexreal.dcgi b/act-ii/indexreal.dcgi | |
@@ -1,27 +0,0 @@ | |
-#!/bin/sh | |
- | |
-. config | |
-. functions | |
- | |
-cat <<EOM | |
- | |
- ▛▀▖ ▞▀▖▗▀▖ ▀▛▘▌ ▞▀▖ ▛▀▖ … | |
- ▌ ▌▝▀▖▌ ▌ ▌ ▌▐ ▌ ▛▀▖▞▀▖ ▌▄▖▙▀�… | |
- ▌ ▌▞▀▌▚▄▌ ▌ ▌▜▀ ▌ ▌ ▌▛▀ ▌ ▌▌ ▌ … | |
- ▀▀ ▝▀▘▗▄▘ ▝▀ ▐ ▘ ▘ ▘▝▀▘ ▝▀ ▘ ▘ … | |
- | |
-A Bitreich FOSDEM adventure... 03 Feb 2018 A.D. | |
- | |
- | |
- ⣎⣱ ⢀⣀ ⣰⡀ ⡇ ⡇ | |
- ⠇⠸ ⠣⠤ ⠘⠤ ⠇ ⠇ | |
- -- "Hackers" | |
-EOM | |
- | |
-if [ -f "$savegame/room" ]; then | |
- _msg "[1|Continue adventure!|$path/$(cat ${savegame}/room).dcgi|server… | |
-else | |
- _msg "[1|Start adventure!|$path/start.dcgi|server|port]" | |
-fi | |
- | |
-echo "[1|Go back :(|/dotg/index.gph|server|port]" | |
diff --git a/act-ii/maps b/act-ii/maps | |
@@ -6,41 +6,63 @@ cat <<EOM | |
EOM | |
-# C – Cables | |
-# DJ – Music System | |
-# WE – We | |
-# W10 – Windows 10 Guy | |
-# C+R – Cheese + Rat | |
-# H – Hipsters | |
-# DF – Dancefloor | |
-# S – Stairs | |
-# E – Elevator | |
-# T – Toilet | |
- | |
-map_start() { | |
- cat <<EOM | |
- +-----+ | |
- | (E) | | |
-+----------------------+--------------------------------------+----+_____+-+ | |
-|xxxxxxxxxxxxxxxxxxxxxx| +--------+ |xxxxxxxxxxxxxxxxxxxxxx| | | |
-| TTTTTTTTTTTTT | | | | (BAR) | | | |
-| TTTTTTTTTTTTT __| TTTT |xxxxxxxxxxxxxxx x| | | |
-| (C) / | +---------------+....+-+ | | |
-| / | | | | |
-| TTTTTT+----+ x|TTTTTTTT TTTTT | | | |
-| TTTTTTTTT \ __x|TTTTTTTT TTTTT | | | |
-| x| (C+R) TTTTT | | | |
-|-- (DJ) TTTTT TTTT | | |
-|bk (H)TTTT | | |
-|bk | | |
-|bk | | |
-|bk | | | | |
-|bk +-- --+ | | | | |
-|bk | (WE) TTTTT | |++++ TTTTT | (S) +-...-+ | |
-|bk | TTTTT | |vmvm TTTTT (DF) | | (T) | | |
-|bk | (W10) | |++++ | lll | | | |
-|-- +--------------- + | | llll | O | | |
-+---------+....+-------+-------------+....+-------------------+------+-----+ | |
+map_campus() { | |
+ cat <<EOM | |
+ | | | |
+ | | | |
+ | | | |
++-------+ | | | |
+| K | | | | |
++-------+ __ | | | |
+ | | | | | | |
+ \\__________|__|________| | | |
+ | | | | | |
+ | | | |_________ _________ | |
+ | | | | | | | | |
+ | | YOU | | U |___________| U | | |
+ | | ---->| ☃ |____________________________| | |
+ | |___ | ______________________________ | |
+ |_ | | | | |
+ | | | | ________ | |
+ | F1 | | | | | | |
+ |____| | | | AW | | |
+ | | |_ ___| | |
+ _______ +----+ | |______________/ / | |
+ / \ | | | _______________/ | |
+ | J | | | | | | |
+ \ / | H | | | | |
+ __| |__ | | | | | |
+ | ___ | | | | | | |
+ |___| |___| +----+ | | | |
+ | |
+EOM | |
+} | |
+ | |
+# ‾ - overline | |
+ | |
+map_cafeteria() { | |
+cat <<EOM | |
++--------DDDDDDDD----------------------------------------------+ | |
+| |o T ‾| |‾ T o| |o T o| |‾ T ‾| | | | |
+| |o T _| |_ T _| |o T _| |o T o| | | |
+| TT ‾ ‾ ‾ ‾ |x BAR | | |
+|oTTo ☃ <---- |x | | |
+|oTTo YOU oooooooooooooooooooooooo|x o | | |
+|oTTo |x o | | |
+|oTTo o oTTo oTTo oTTo oTTo |x | | |
+|oTT o oTTo oTTo oTTo oTTo |x | | |
+|oTT oTTo oTTo oTTo oTTo |x | | |
+| o +------+ | |
++------ --------------------------- |x | | |
+| oTTo oTT oTTo oTT |x o | | |
+| o o oTTo oTTo oTTo oTTo |x o | | |
+| oTTo oTTo TTo TTo |x | | |
+| o o o o +------| | |
+| o o o o | | |
+ oTTo oTTo TTo TTo oTT o oTTo | | |
+ oTTo oTTo oTTo TTo TT oTTo | | |
+| TTo oTTo oTTo TTo oTT oTTo | | |
++--------------------------------------------------------------+ | |
EOM | |
} | |
diff --git a/act-ii/reset.dcgi b/act-ii/reset.dcgi | |
@@ -8,5 +8,5 @@ cat <<EOM | |
Game state reset. | |
-[1|Go back|/dotg/act-ii/indexreal.dcgi|server|port] | |
+[1|Go back|/dotg/act-ii/index.dcgi|server|port] | |
EOM | |
diff --git a/act-ii/start.dcgi b/act-ii/start.dcgi | |
@@ -0,0 +1,18 @@ | |
+#!/bin/sh | |
+ | |
+. config | |
+. maps | |
+ | |
+map_campus | |
+ | |
+cat <<EOM | |
+It's FOSDEM 2019. You arrive to the underfunded Brussels campus | |
+one year after your last adventure. As each year, the road is | |
+full of junk food vans and sissies eating such food. You feel | |
+it's going to be rough ride this time. | |
+ | |
+You have to find your friend and work together... The "hackers" | |
+around here are not cooperative. | |
+ | |
+[1|Look around|$path/Campus_Outside.dcgi|server|port] | |
+EOM | |
diff --git a/index.gph b/index.gph | |
@@ -18,5 +18,5 @@ A Bitreich FOSDEM adventure... | |
⠇⠸ ⠣⠤ ⠘⠤ ⠇ ⠇ | |
-- "Hackers" | |
-[1|Enter... 03 Feb 2018 A.D.|/dotg/act-ii|server|port] | |
+[1|Enter... 02 Feb 2019 A.D.|/dotg/act-ii|server|port] | |
----------------------------------------------------------------- |