mirror of
https://gitlab.com/Oreolek/black_phone.git
synced 2024-05-02 00:59:42 +03:00
Box fixes
This commit is contained in:
parent
cfadea775a
commit
736418b2b0
|
@ -4,7 +4,6 @@
|
|||
|
||||
room = require("../../lib/room.coffee")
|
||||
obj = require('../../lib/obj.coffee')
|
||||
dialogue = require('../../lib/util/dialogue.coffee')
|
||||
oneOf = require('../../lib/oneOf.coffee')
|
||||
Salet = require('../../lib/salet.coffee')
|
||||
|
||||
|
@ -39,12 +38,14 @@ code_print = (salet) ->
|
|||
retval = salet.character.code
|
||||
if mask > 0
|
||||
for i in [1..mask]
|
||||
retval += "_"
|
||||
retval += 'x'
|
||||
retval = '<tt>'+retval+'</tt>'
|
||||
return retval
|
||||
|
||||
code_input = (salet, digit) ->
|
||||
if code_can_input(salet)
|
||||
salet.character.code = salet.character.code + digit
|
||||
return false
|
||||
|
||||
code_reset = (salet) ->
|
||||
salet.character.code = ""
|
||||
|
@ -85,8 +86,6 @@ code_check = (salet) ->
|
|||
salet.goTo("bedroom")
|
||||
else
|
||||
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)
|
||||
return output
|
||||
|
|
|
@ -129,6 +129,9 @@ room "living-room", salet,
|
|||
room "bedroom", salet,
|
||||
title: "Bedroom"
|
||||
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) ->
|
||||
return """
|
||||
The bedroom is spacious; its walls are lavender green, almost white in the moonlight.
|
||||
|
@ -141,7 +144,7 @@ room "bedroom", salet,
|
|||
"""
|
||||
objects: [
|
||||
obj "bed",
|
||||
dsc: ""
|
||||
dsc: false,
|
||||
order: 2
|
||||
act: """
|
||||
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?
|
||||
"""
|
||||
obj "mirror"
|
||||
obj "mirror",
|
||||
order: 3
|
||||
dsc: ""
|
||||
dsc: false
|
||||
act: """
|
||||
The mirror looks directly at the bed.
|
||||
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.
|
||||
It's a very *unusual* art.
|
||||
"""
|
||||
obj "frame"
|
||||
obj "frame",
|
||||
level: 1,
|
||||
act: """
|
||||
On a close examination, the frame isn't attached to the wall.
|
||||
There is #{objlink("a safe", "safe")} behind the mirror!
|
||||
"""
|
||||
obj "safe"
|
||||
obj "safe",
|
||||
level: 2
|
||||
act: (salet) ->
|
||||
if salet.character.seen_safe?
|
||||
|
@ -359,12 +362,10 @@ room "kitchen", salet,
|
|||
]
|
||||
|
||||
room "bathroom", salet,
|
||||
before: (salet) ->
|
||||
enter: (salet) ->
|
||||
bedroom = salet.getRoom("bedroom")
|
||||
index = bedroom.ways.indexOf("bathroom")
|
||||
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")
|
||||
title: "Bathroom"
|
||||
ways: ["bedroom"]
|
||||
|
@ -381,6 +382,7 @@ room "balcony", salet,
|
|||
"""
|
||||
objects: [
|
||||
obj "ashtray",
|
||||
dsc: false,
|
||||
act: (salet) ->
|
||||
salet.character.knows_the_code = 1
|
||||
return """
|
||||
|
@ -438,11 +440,11 @@ safe_button = (number, salet) ->
|
|||
code_input(salet, number)
|
||||
canChoose: (salet) ->
|
||||
code_can_input(salet)
|
||||
after: (salet) ->
|
||||
code_check(salet)
|
||||
dsc: (salet) -> """
|
||||
Ronald presses button #{number}. The display is #{code_print(salet)} now.
|
||||
"""
|
||||
after: (salet) ->
|
||||
code_check(salet)
|
||||
|
||||
safe_button(1, salet)
|
||||
safe_button(2, salet)
|
||||
|
|
|
@ -153,7 +153,7 @@ class Salet
|
|||
room = @rooms[roomId]
|
||||
assert(room, "unknown_situation".l({id:roomId}))
|
||||
|
||||
if (room.canView.fcall(this, currentRoom))
|
||||
if (room.canView.fcall(this, this, currentRoom))
|
||||
viewableRoomData.push({
|
||||
priority: room.priority
|
||||
id: roomId
|
||||
|
|
Loading…
Reference in a new issue