mirror of
https://gitlab.com/Oreolek/cloak-salet.git
synced 2024-06-26 03:50:51 +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 = () ->
|
options.enter = () ->
|
||||||
$("#inventory").hide()
|
$("#inventory").hide()
|
||||||
options.exit = () ->
|
options.exit = () ->
|
||||||
|
salet.view.clearContent('#current-room')
|
||||||
$("#inventory").show()
|
$("#inventory").show()
|
||||||
options.dsc = () ->
|
options.dsc = () ->
|
||||||
return @text.fcall()+"\n\n"+"""
|
return @text.fcall()+"\n\n"+"""
|
||||||
|
|
|
@ -26,16 +26,22 @@ salet.init = () ->
|
||||||
return "no_cloak".l()
|
return "no_cloak".l()
|
||||||
@character.take(cloak)
|
@character.take(cloak)
|
||||||
|
|
||||||
croom "start",
|
foyer_options =
|
||||||
before: () -> "start".l()
|
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()
|
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",
|
croom "cloakroom",
|
||||||
dsc: () -> "cloakroom".l()
|
dsc: () -> "cloakroom".l()
|
||||||
|
@ -43,9 +49,6 @@ croom "cloakroom",
|
||||||
ways: ["foyer"]
|
ways: ["foyer"]
|
||||||
|
|
||||||
croom "entrance",
|
croom "entrance",
|
||||||
dsc: () -> "entrance".l()
|
|
||||||
after: () ->
|
|
||||||
salet.goTo('foyer')
|
|
||||||
title: () -> "entrance_title".l()
|
title: () -> "entrance_title".l()
|
||||||
|
|
||||||
croom "bar",
|
croom "bar",
|
||||||
|
|
|
@ -12,8 +12,8 @@ start: """
|
||||||
foyer: """
|
foyer: """
|
||||||
You are standing in a spacious hall, splendidly decorated in red
|
You are standing in a spacious hall, splendidly decorated in red
|
||||||
and gold, with glittering chandeliers overhead.
|
and gold, with glittering chandeliers overhead.
|
||||||
The entrance from the street is to the [north,](north) and there are doorways
|
The entrance from the street is to the [north,](entrance) and there are doorways
|
||||||
[south](south) and [west.](west)
|
[south](bar) and [west.](cloakroom)
|
||||||
"""
|
"""
|
||||||
credits: """
|
credits: """
|
||||||
The game uses code licensed by MIT license.
|
The game uses code licensed by MIT license.
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"salet": "^1.7.5"
|
"salet": "^1.7.7"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bootstrap": "^4.0.0-alpha.5",
|
"bootstrap": "^4.0.0-alpha.5",
|
||||||
"browser-sync": "^2.18.8",
|
"browser-sync": "^2.18.11",
|
||||||
"coffee-script": "^1.12.6",
|
"coffee-script": "^1.12.6",
|
||||||
"cson": "^4.1.0",
|
"cson": "^4.1.0",
|
||||||
"gulp": "^3.8.11",
|
"gulp": "^3.8.11",
|
||||||
|
|
|
@ -155,6 +155,9 @@ hr {
|
||||||
}
|
}
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.effect {
|
||||||
|
color: #4c20dd;
|
||||||
|
}
|
||||||
.tab {
|
.tab {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -174,3 +177,4 @@ hr {
|
||||||
background: darken($body-bg, 15);
|
background: darken($body-bg, 15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue