1
0
Fork 0
mirror of https://gitlab.com/Oreolek/salet.git synced 2024-07-04 07:45:03 +03:00

Rewritten using more OOP

This commit is contained in:
Alexander Yakovlev 2016-01-18 18:29:34 +07:00
parent 0d7f566441
commit 407305a54c

View file

@ -7,11 +7,11 @@ room "world",
You're in a large room carved inside a giant milky rock mountain.
The floor and walls are littered with signs and signatures of the previous visitors.
A steep narrow #{textlink("well", "well")} proceeds upward.
"""
writers:
well: "There is only one passage out. See the „Other rooms“ block popped up? Click it."
objects:
well: obj "well",
dsc: "A steep narrow {{well}} proceeds upward."
act: "There is only one passage out. See the „Other rooms“ block popped up? Click it."
room "plaza",
title: (from) ->
@ -32,22 +32,22 @@ room "plaza",
"""
else
"You quickly find the central plaza."
dsc: (character, system) ->
retval = "There are #{textlink("people shouting", "people")} nearby."
unless character.sandbox.has_mark?
retval += "\n\nYou could ask a policeman #{textlink("for directions.", "mark")}"
return retval
writers:
cyclewriter: (character) -> cycle(this, character)
mark: (character) ->
if character.sandbox.has_mark?
return "You already talked to him, no need to bug the man twice."
character.sandbox.has_mark ?= true
get_room("lair").destination()
"""
Here, let me mark it on your map.
"""
people: 'Just some weirdos shouting "Viva la Cthulhu!". Typical.'
objects:
policeman: obj "policeman",
dsc: "There is a policeman nearby. You could ask him {{for directions.}}"
act: (character) ->
if character.sandbox.has_mark?
return "You already talked to him, no need to bug the man twice."
character.sandbox.has_mark ?= true
get_room("lair").destination()
"""
Here, let me mark it on your map.
"""
people: obj "people",
dsc: "There are {{people shouting}} nearby."
act: 'Just some weirdos shouting "Viva la Cthulhu!". Typical.'
room "shop",
title: "The Shop"