Add uncommitted files

These have been sitting here for six years.
master
Mike Gerwitz 2017-01-23 01:03:06 -05:00
parent d0f063f4e8
commit 6f19ed39b8
5 changed files with 55 additions and 1 deletions

19
items/water 100644
View File

@ -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

11
scenes/introname 100644
View File

@ -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.

10
scenes/testaction 100644
View File

@ -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!

View File

@ -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 |

View File

@ -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)