mirror of
https://gitlab.com/Oreolek/cloak-salet.git
synced 2024-05-04 18:18:35 +03:00
Exiting through the north entrance properly
This commit is contained in:
parent
c72d6bad55
commit
7cd0b92811
|
@ -70,6 +70,7 @@ sysroom = (name, options) ->
|
|||
options.enter = () ->
|
||||
$("#inventory").hide()
|
||||
options.exit = () ->
|
||||
salet.view.clearContent('#current-room')
|
||||
$("#inventory").show()
|
||||
options.dsc = () ->
|
||||
return @text.fcall()+"\n\n"+"""
|
||||
|
|
|
@ -26,16 +26,22 @@ salet.init = () ->
|
|||
return "no_cloak".l()
|
||||
@character.take(cloak)
|
||||
|
||||
croom "start",
|
||||
foyer_options =
|
||||
before: () -> "start".l()
|
||||
dsc: () -> "foyer".l()
|
||||
ways: ["entrance", "cloakroom", "bar"]
|
||||
|
||||
croom "foyer",
|
||||
clear: false
|
||||
dsc: () -> "foyer".l()
|
||||
ways: ["entrance", "cloakroom", "bar"]
|
||||
title: () -> "foyer_title".l()
|
||||
dsc: () -> "foyer".l()
|
||||
ways: ["entrance", "cloakroom", "bar"]
|
||||
canExit: (to) -> # can't exit to north
|
||||
if (to == 'entrance')
|
||||
# print the effect after the room description, after the player enters the room
|
||||
setTimeout(() ->
|
||||
salet.view.write("<span class='effect'>"+"entrance".l()+"</span>")
|
||||
, 0)
|
||||
return false
|
||||
|
||||
croom "start", foyer_options
|
||||
foyer_options.before = null # no title splash after game begins
|
||||
croom "foyer", foyer_options
|
||||
|
||||
croom "cloakroom",
|
||||
dsc: () -> "cloakroom".l()
|
||||
|
@ -43,9 +49,6 @@ croom "cloakroom",
|
|||
ways: ["foyer"]
|
||||
|
||||
croom "entrance",
|
||||
dsc: () -> "entrance".l()
|
||||
after: () ->
|
||||
salet.goTo('foyer')
|
||||
title: () -> "entrance_title".l()
|
||||
|
||||
croom "bar",
|
||||
|
|
|
@ -12,8 +12,8 @@ start: """
|
|||
foyer: """
|
||||
You are standing in a spacious hall, splendidly decorated in red
|
||||
and gold, with glittering chandeliers overhead.
|
||||
The entrance from the street is to the [north,](north) and there are doorways
|
||||
[south](south) and [west.](west)
|
||||
The entrance from the street is to the [north,](entrance) and there are doorways
|
||||
[south](bar) and [west.](cloakroom)
|
||||
"""
|
||||
credits: """
|
||||
The game uses code licensed by MIT license.
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"salet": "^1.7.5"
|
||||
"salet": "^1.7.7"
|
||||
},
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"bootstrap": "^4.0.0-alpha.5",
|
||||
"browser-sync": "^2.18.8",
|
||||
"browser-sync": "^2.18.11",
|
||||
"coffee-script": "^1.12.6",
|
||||
"cson": "^4.1.0",
|
||||
"gulp": "^3.8.11",
|
||||
|
|
|
@ -155,6 +155,9 @@ hr {
|
|||
}
|
||||
text-align: center;
|
||||
}
|
||||
.effect {
|
||||
color: #4c20dd;
|
||||
}
|
||||
.tab {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
@ -174,3 +177,4 @@ hr {
|
|||
background: darken($body-bg, 15);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue