mirror of
https://gitlab.com/Oreolek/black_phone.git
synced 2024-05-17 08:28:32 +03:00
Box fixes
This commit is contained in:
parent
cfadea775a
commit
736418b2b0
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
room = require("../../lib/room.coffee")
|
room = require("../../lib/room.coffee")
|
||||||
obj = require('../../lib/obj.coffee')
|
obj = require('../../lib/obj.coffee')
|
||||||
dialogue = require('../../lib/util/dialogue.coffee')
|
|
||||||
oneOf = require('../../lib/oneOf.coffee')
|
oneOf = require('../../lib/oneOf.coffee')
|
||||||
Salet = require('../../lib/salet.coffee')
|
Salet = require('../../lib/salet.coffee')
|
||||||
|
|
||||||
|
@ -39,12 +38,14 @@ code_print = (salet) ->
|
||||||
retval = salet.character.code
|
retval = salet.character.code
|
||||||
if mask > 0
|
if mask > 0
|
||||||
for i in [1..mask]
|
for i in [1..mask]
|
||||||
retval += "_"
|
retval += 'x'
|
||||||
|
retval = '<tt>'+retval+'</tt>'
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
code_input = (salet, digit) ->
|
code_input = (salet, digit) ->
|
||||||
if code_can_input(salet)
|
if code_can_input(salet)
|
||||||
salet.character.code = salet.character.code + digit
|
salet.character.code = salet.character.code + digit
|
||||||
|
return false
|
||||||
|
|
||||||
code_reset = (salet) ->
|
code_reset = (salet) ->
|
||||||
salet.character.code = ""
|
salet.character.code = ""
|
||||||
|
@ -85,8 +86,6 @@ code_check = (salet) ->
|
||||||
salet.goTo("bedroom")
|
salet.goTo("bedroom")
|
||||||
else
|
else
|
||||||
output += "Something clicks and the display resets, but the box stays locked."
|
output += "Something clicks and the display resets, but the box stays locked."
|
||||||
if character.sandbox.code == "000000"
|
|
||||||
output += "\n\nOf course, Ronald didn't hope it would be that easy."
|
|
||||||
|
|
||||||
code_reset(salet)
|
code_reset(salet)
|
||||||
return output
|
return output
|
||||||
|
|
|
@ -129,6 +129,9 @@ room "living-room", salet,
|
||||||
room "bedroom", salet,
|
room "bedroom", salet,
|
||||||
title: "Bedroom"
|
title: "Bedroom"
|
||||||
ways: ["living-room", "kitchen", "bathroom"]
|
ways: ["living-room", "kitchen", "bathroom"]
|
||||||
|
after: (salet, from) ->
|
||||||
|
if from == "bathroom"
|
||||||
|
return "Ronald doesn't want to search the bathroom. It's too private a room to enter."
|
||||||
dsc: (salet) ->
|
dsc: (salet) ->
|
||||||
return """
|
return """
|
||||||
The bedroom is spacious; its walls are lavender green, almost white in the moonlight.
|
The bedroom is spacious; its walls are lavender green, almost white in the moonlight.
|
||||||
|
@ -141,7 +144,7 @@ room "bedroom", salet,
|
||||||
"""
|
"""
|
||||||
objects: [
|
objects: [
|
||||||
obj "bed",
|
obj "bed",
|
||||||
dsc: ""
|
dsc: false,
|
||||||
order: 2
|
order: 2
|
||||||
act: """
|
act: """
|
||||||
A double bed with flower-embroidered sheets.
|
A double bed with flower-embroidered sheets.
|
||||||
|
@ -262,9 +265,9 @@ room "bedroom", salet,
|
||||||
|
|
||||||
Of course, there are sandals, loafers, flat dress shoes.. That's a strong dislike for heels... or maybe it's a medical problem?
|
Of course, there are sandals, loafers, flat dress shoes.. That's a strong dislike for heels... or maybe it's a medical problem?
|
||||||
"""
|
"""
|
||||||
obj "mirror"
|
obj "mirror",
|
||||||
order: 3
|
order: 3
|
||||||
dsc: ""
|
dsc: false
|
||||||
act: """
|
act: """
|
||||||
The mirror looks directly at the bed.
|
The mirror looks directly at the bed.
|
||||||
Kinky, though not very much *Feng Shui* in it.
|
Kinky, though not very much *Feng Shui* in it.
|
||||||
|
@ -272,13 +275,13 @@ room "bedroom", salet,
|
||||||
#{objlink("The frame","frame")} depicts various artists (all women) making sculptures of men.
|
#{objlink("The frame","frame")} depicts various artists (all women) making sculptures of men.
|
||||||
It's a very *unusual* art.
|
It's a very *unusual* art.
|
||||||
"""
|
"""
|
||||||
obj "frame"
|
obj "frame",
|
||||||
level: 1,
|
level: 1,
|
||||||
act: """
|
act: """
|
||||||
On a close examination, the frame isn't attached to the wall.
|
On a close examination, the frame isn't attached to the wall.
|
||||||
There is #{objlink("a safe", "safe")} behind the mirror!
|
There is #{objlink("a safe", "safe")} behind the mirror!
|
||||||
"""
|
"""
|
||||||
obj "safe"
|
obj "safe",
|
||||||
level: 2
|
level: 2
|
||||||
act: (salet) ->
|
act: (salet) ->
|
||||||
if salet.character.seen_safe?
|
if salet.character.seen_safe?
|
||||||
|
@ -359,12 +362,10 @@ room "kitchen", salet,
|
||||||
]
|
]
|
||||||
|
|
||||||
room "bathroom", salet,
|
room "bathroom", salet,
|
||||||
before: (salet) ->
|
enter: (salet) ->
|
||||||
bedroom = salet.getRoom("bedroom")
|
bedroom = salet.getRoom("bedroom")
|
||||||
index = bedroom.ways.indexOf("bathroom")
|
index = bedroom.ways.indexOf("bathroom")
|
||||||
bedroom.ways.splice(index, 1)
|
bedroom.ways.splice(index, 1)
|
||||||
return "Ronald doesn't want to search the bathroom. It's too private a room to enter."
|
|
||||||
enter: (salet) ->
|
|
||||||
return salet.goTo("bedroom")
|
return salet.goTo("bedroom")
|
||||||
title: "Bathroom"
|
title: "Bathroom"
|
||||||
ways: ["bedroom"]
|
ways: ["bedroom"]
|
||||||
|
@ -381,6 +382,7 @@ room "balcony", salet,
|
||||||
"""
|
"""
|
||||||
objects: [
|
objects: [
|
||||||
obj "ashtray",
|
obj "ashtray",
|
||||||
|
dsc: false,
|
||||||
act: (salet) ->
|
act: (salet) ->
|
||||||
salet.character.knows_the_code = 1
|
salet.character.knows_the_code = 1
|
||||||
return """
|
return """
|
||||||
|
@ -438,11 +440,11 @@ safe_button = (number, salet) ->
|
||||||
code_input(salet, number)
|
code_input(salet, number)
|
||||||
canChoose: (salet) ->
|
canChoose: (salet) ->
|
||||||
code_can_input(salet)
|
code_can_input(salet)
|
||||||
after: (salet) ->
|
|
||||||
code_check(salet)
|
|
||||||
dsc: (salet) -> """
|
dsc: (salet) -> """
|
||||||
Ronald presses button #{number}. The display is #{code_print(salet)} now.
|
Ronald presses button #{number}. The display is #{code_print(salet)} now.
|
||||||
"""
|
"""
|
||||||
|
after: (salet) ->
|
||||||
|
code_check(salet)
|
||||||
|
|
||||||
safe_button(1, salet)
|
safe_button(1, salet)
|
||||||
safe_button(2, salet)
|
safe_button(2, salet)
|
||||||
|
|
|
@ -153,7 +153,7 @@ class Salet
|
||||||
room = @rooms[roomId]
|
room = @rooms[roomId]
|
||||||
assert(room, "unknown_situation".l({id:roomId}))
|
assert(room, "unknown_situation".l({id:roomId}))
|
||||||
|
|
||||||
if (room.canView.fcall(this, currentRoom))
|
if (room.canView.fcall(this, this, currentRoom))
|
||||||
viewableRoomData.push({
|
viewableRoomData.push({
|
||||||
priority: room.priority
|
priority: room.priority
|
||||||
id: roomId
|
id: roomId
|
||||||
|
|
Loading…
Reference in a new issue