parent
d0f063f4e8
commit
6f19ed39b8
|
@ -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
|
|
@ -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.
|
|
@ -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!
|
6
screenrc
6
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 |
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue