Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mtg@gnu.org>2017-01-23 01:03:06 -0500
committerMike Gerwitz <mtg@gnu.org>2017-01-23 01:03:06 -0500
commit6f19ed39b8478a90f8665c313e43eea817d2e634 (patch)
treec57ebf95b5d766de833708cbbb4796a181316d92
parentd0f063f4e898cfbc1eb86c7e4fede74ab162cf6e (diff)
downloadgsgp-6f19ed39b8478a90f8665c313e43eea817d2e634.tar.gz
gsgp-6f19ed39b8478a90f8665c313e43eea817d2e634.tar.bz2
gsgp-6f19ed39b8478a90f8665c313e43eea817d2e634.zip
Add uncommitted files
These have been sitting here for six years.
-rw-r--r--items/water19
-rw-r--r--scenes/introname11
-rw-r--r--scenes/testaction10
-rw-r--r--screenrc6
-rwxr-xr-xutil/showscene10
5 files changed, 55 insertions, 1 deletions
diff --git a/items/water b/items/water
new file mode 100644
index 0000000..ec59375
--- /dev/null
+++ b/items/water
@@ -0,0 +1,19 @@
+NAME plastic water bottle
+DURIBILITY 100
+
+ACTION throw
+ SAY *thump* *crinkle*
+ PAUSE 2
+ DURIBILITY -1
+ SAY Ah. You damaged it.
+
+ACTION drink
+ THIRST -50
+ SAY Ahh. That was refreshing.
+
+BREAK
+ SAY The water slowly seeps onto the floor.
+ GIVE water/battered
+
+DESC
+Quench your thirst
diff --git a/scenes/introname b/scenes/introname
new file mode 100644
index 0000000..666a7d8
--- /dev/null
+++ b/scenes/introname
@@ -0,0 +1,11 @@
+TYPE input
+NEXT testaction
+
+BRANCH start %name% == "foo"
+BRANCH introname %name% == "foo"
+
+INPUT name
+So, what may we call you, fellow hacker?
+
+STORY
+TBD.
diff --git a/scenes/testaction b/scenes/testaction
new file mode 100644
index 0000000..fa5388a
--- /dev/null
+++ b/scenes/testaction
@@ -0,0 +1,10 @@
+TYPE action
+
+OBJECT door
+ ACTION knock on
+ MSG Who's there?
+
+STORY
+You're in a room with a door.
+
+...how exhilarating!
diff --git a/screenrc b/screenrc
index 8ab0b5e..ba895c3 100644
--- a/screenrc
+++ b/screenrc
@@ -2,3 +2,9 @@
backtick 1 0 0 util/watchval name
caption always "%{= kw}%{+b}%1`%{-} %= %{-}"
+
+# disable common window commands
+bind c
+bind ^c
+bind x
+bind |
diff --git a/util/showscene b/util/showscene
index f04e215..005837e 100755
--- a/util/showscene
+++ b/util/showscene
@@ -13,6 +13,8 @@ scene="$( < "$scenepath" )"
spacecont="[Press Space to continue]"
setval="$mypath/setval"
getval="$mypath/getval"
+pinput="$mypath/process-input"
+cmd="$mypath/cmd"
getconf()
{
@@ -117,7 +119,13 @@ done
# input handling is defined by the scene type
case "$type" in
action)
- read -p '> ' input
+ cont=1
+
+ while [ $cont ]; do
+ read -p '> ' input
+ result=$( $pinput "$input" <<< "$scene" ) && cont=0
+ $cmd "$result"
+ done
;;
trans|transition)