1
0
Fork 0
mirror of https://gitlab.com/Oreolek/black_phone.git synced 2024-06-26 03:50:56 +03:00

Issue #3: less text on screen

This commit is contained in:
Alexander Yakovlev 2016-01-04 09:02:34 +07:00
parent 57a86d9802
commit bb7b377eb3
2 changed files with 248 additions and 137 deletions

View file

@ -33,7 +33,20 @@ textcycle = (content, ref) -> a(content).replacer(ref).class("cycle").id(ref).to
writemd = (system, text) -> writemd = (system, text) ->
if typeof text is Function if typeof text is Function
text = text() text = text()
system.write(markdown.render(text)) text = markdown.render(text)
system.write(text)
preparemd = (text, mark) ->
if typeof text is Function
text = text()
text = markdown.render(text)
if mark?
text = """
<div class="#{mark}">
#{text}
</div>
"""
return text
money = (character, system, amount) -> money = (character, system, amount) ->
system.setQuality("money", character.qualities.money + amount) system.setQuality("money", character.qualities.money + amount)
@ -136,3 +149,26 @@ is_visited = (situation) ->
if situations if situations
return Boolean situations.visited return Boolean situations.visited
return 0 return 0
# N-th level examine function
level = (text, mark) ->
$("#content .#{mark}").fadeOut()
return preparemd(text, mark)
lvl1 = (text) ->
$("#content .lvl2").fadeOut()
$("#content .lvl3").fadeOut()
$("#content .lvl4").fadeOut()
level(text, "lvl1")
lvl2 = (text) ->
$("#content .lvl3").fadeOut()
$("#content .lvl4").fadeOut()
level(text, "lvl2")
lvl3 = (text) ->
$("#content .lvl4").fadeOut()
level(text, "lvl3")
lvl4 = (text) ->
level(text, "lvl4")

View file

@ -17,58 +17,75 @@ situation "living-room",
actions: actions:
door: (character, system) -> door: (character, system) ->
if character.sandbox.box_opened == 0 if character.sandbox.box_opened == 0
writemd(system, "Ronald has a job here. It's still on.") writemd(system, lvl1("Ronald has a job here. It's still on."))
else else
system.doLink("exitdoor") system.doLink("exitdoor")
writers: writers:
walls: """ walls: (character, system) ->
There are colorful photographs on the walls. lvl1("""
A wooden house in a forest. There are colorful photographs on the walls.
A village on a mountaintop. A wooden house in a forest.
A family sitting around a fire. A village on a mountaintop.
A sunset burning in a vast ocean. A family sitting around a fire.
A black monolith standing on sand dunes. A sunset burning in a vast ocean.
""" A black monolith standing on sand dunes.
window: "The moon is full today. It illuminates the apartment, makes the things stand out in some weird angles." """)
bookcase: """ window: (character, system) ->
Either Anastacia has a very conflicting taste in books, or she has no taste at all. Let's see... lvl1("""
#{textlink("“Soviet Black Magic: a Lost Art”,", "magic")} The moon is full today.
#{textlink("”My Dinner with Zane”,", "zane")} It illuminates the apartment, makes the things stand out in some weird angles.
#{textlink("The Scientific Dictionary of Everything,", "dictionary")} """)
#{textlink("“Silent Things”,", "silent")} bookcase: (character, system) ->
#{textlink("”Also sprach Zarathustra”,", "zaratustra")} lvl1("""
#{textlink("”Pepperoni poker”,", "pepper")} Either Anastacia has a very conflicting taste in books, or she has no taste at all. Let's see...
#{textlink("”Jazz sauce. Culinary collection”", "culinary")} #{textlink("“Soviet Black Magic: a Lost Art”,", "magic")}
and #{textlink("Classico.", "classico")} #{textlink("”My Dinner with Zane”,", "zane")}
""" #{textlink("The Scientific Dictionary of Everything,", "dictionary")}
magic: """ #{textlink("“Silent Things”,", "silent")}
Soviet Black Magic: a Lost Art #{textlink("”Also sprach Zarathustra”,", "zaratustra")}
#{textlink("”Pepperoni poker”,", "pepper")}
#{textlink("”Jazz sauce. Culinary collection”", "culinary")}
and #{textlink("Classico.", "classico")}
""")
magic: (character, system) ->
lvl2("""
Soviet Black Magic: a Lost Art
The author, who calls himself The Master, describes the lost art of Soviet Union *magija.* The author, who calls himself The Master, describes the lost art of Soviet Union *magija.*
It's mostly about illusions. It's mostly about illusions.
This is a cheap paperback edition, but she read this at least a couple of times. This is a cheap paperback edition, but she read this at least a couple of times.
The pages have dogged ears, and coffee stains too. The pages have dogged ears, and coffee stains too.
Ronald can even see a hint of lipstick smearing the variety show retelling. Ronald can even see a hint of lipstick smearing the variety show retelling.
""" """)
zane: """ zane: (character, system) ->
A three-part romantic urban fantasy detective about a girl who solves murders while dining lvl2("""
with her best werewolf friend in an Orient café. A three-part romantic urban fantasy detective about a girl who solves murders while dining
with her best werewolf friend in an Orient café.
It looks rather new, the pages are still white and straight. It looks rather new, the pages are still white and straight.
Maybe she didn't catch the right moment to read this.. or maybe just forgot about it. Maybe she didn't catch the right moment to read this.. or maybe just forgot about it.
""" """)
dictionary: "A big fat Dictionary of Everything, issued in 1989. Nobody reads every page of these. Ronald doubts Anastacia got to read at least one page." dictionary: (character, system) ->
silent: "Silent Things, a story where nothing speaks and nothing happens. *And she actually read that.*" lvl2("""
A big fat Dictionary of Everything, issued in 1989.
Nobody reads every page of these.
Ronald doubts Anastacia got to read at least one page.
""")
silent: (character, system) ->
lvl2("""
Silent Things, a story where nothing speaks and nothing happens.
*And she actually read that.*
""")
zaratustra: (character, system) -> zaratustra: (character, system) ->
if character.sandbox.seen_zaratustra? if character.sandbox.seen_zaratustra?
""" lvl2("""
This book already gave Ronald everything he wanted. This book already gave Ronald everything he wanted.
No need to read it, not a bit. No need to read it, not a bit.
""" """)
else else
money(character, system, 20000) money(character, system, 20000)
""" lvl2("""
Nietsche's four-part novel about The Man, The Superman and everything in-between. Nietsche's four-part novel about The Man, The Superman and everything in-between.
It's surprisingly worn down. It's surprisingly worn down.
She took this book out a lot. She took this book out a lot.
@ -78,14 +95,23 @@ situation "living-room",
No, of course not. No, of course not.
Ronald opens the book and finds a stash of money inside. Ronald opens the book and finds a stash of money inside.
""" """)
pepper: """ pepper: (character, system) ->
An "ironic woman detective" who plays harp and solves murders! lvl2("""
It's a trash book filled with blatant product placement. Looks untouched. An "ironic woman detective" who plays harp and solves murders!
""" It's a trash book filled with blatant product placement. Looks untouched.
culinary: "An old culinary book. Nothing about it." """)
classico: "A history of classical music, from the prehistoric times to the 1970s, a brand new edition with passages about psychedelic rock. The Bach section is bookmarked." culinary: (character, system) ->
tv: "An expensive 40-something inch TV standing on a stylish black stand. The room looks kinda small for that monster." lvl2("An old culinary book. Nothing about it.")
classico: (character, system) ->
lvl2("""
A history of classical music, from the prehistoric times to the 1970s, a brand new edition with passages about psychedelic rock.
The Bach section is bookmarked.
""")
tv: (character, system) ->
lvl1("""
An expensive 40-something inch TV standing on a stylish black stand. The room looks kinda small for that monster.
""")
situation "bedroom", situation "bedroom",
before: () -> before: () ->
@ -105,101 +131,148 @@ situation "bedroom",
else ""} else ""}
""" """
writers: writers:
bed: """ bed: () -> lvl1("""
A double bed with flower-embroidered sheets. A double bed with flower-embroidered sheets.
She left several days ago. She left several days ago.
The sheets are still fresh. The sheets are still fresh.
""" """)
wardrobe: """ wardrobe: () -> lvl1("""
Anastacia's wardrobe is very high-maintenance. Anastacia's wardrobe is very high-maintenance.
It has a built-in ironing board (with an iron hanged nearby), with 5 drawer rows for #{textlink("lingerie,", "lingerie")} #{textlink("accessories", "accessories")}, #{textlink("shoes.", "shoes")}, #{textlink("hats", "hats")} and.. #{textlink("audio players.", "mp3")} It has a built-in ironing board (with an iron hanged nearby), with 5 drawer rows for #{textlink("lingerie,", "lingerie")} #{textlink("accessories", "accessories")}, #{textlink("shoes.", "shoes")}, #{textlink("hats", "hats")} and.. #{textlink("audio players.", "mp3")}
On the hangers are #{textlink("cashmere coat,", "coat")} #{textlink("sport jacket,","jacket")} #{textlink("jeans,", "jeans")} #{textlink("green shirt,", "gshirt")} #{textlink("a red sleeveless shirt", "rshirt")}, #{textlink("an orange vest,", "vest")} #{textlink("knee-length flower dress,", "dress")} #{textlink("another flower dress,", "adress")} #{textlink("alpaca coat,","coat")} #{textlink("a short skirt", "skirt")} and #{textlink("a big collection of dancing costumes.", "costumes")} On the hangers are #{textlink("cashmere coat,", "coat")} #{textlink("sport jacket,","jacket")} #{textlink("jeans,", "jeans")} #{textlink("green shirt,", "gshirt")} #{textlink("a red sleeveless shirt", "rshirt")}, #{textlink("an orange vest,", "vest")} #{textlink("knee-length flower dress,", "dress")} #{textlink("another flower dress,", "adress")} #{textlink("alpaca coat,","coat")} #{textlink("a short skirt", "skirt")} and #{textlink("a big collection of dancing costumes.", "costumes")}
""" """)
coat: "A warm coat for the cold winter." coat: () ->
jacket: "A light expensive jacket. An unusual material, must be something high-tech. It's slightly used." lvl2("A warm coat for the cold winter.")
jeans: "Just a pair of women jeans, nothing special." jacket: () ->
gshirt: "A green shirt, looks very worn. It's not remarkable in any way but maybe she just loves it very much." lvl2("""
rshirt: "A red women-cut shirt. She didn't wear it much." A light expensive jacket.
vest: "It looks like a life vest but actually it's a fashionable piece of warm clothing. It was trendy last year. *Why do I know this, is something wrong with me?*" An unusual material, must be something high-tech.
dress: "Just a dress. Lots of flower embroidery, no pockets. Impractical." It's slightly used.
adress: "These flowers are not like that flowers." """)
coat: (character, system) -> """ jeans: () ->
#{ lvl2("Just a pair of women jeans, nothing special.")
gshirt: () ->
lvl2("""
A green shirt, looks very worn.
It's not remarkable in any way but maybe she just loves it very much.
""")
rshirt: () ->
lvl2("""
A red women-cut shirt.
She didn't wear it much.
""")
vest: () ->
lvl2("""
It looks like a life vest but actually it's a fashionable piece of warm clothing.
It was trendy last year.
*Why do I know this, is something wrong with me?*
""")
dress: () ->
lvl2("""
Just a dress.
Lots of flower embroidery, no pockets.
*Impractical.*
""")
adress: () ->
lvl2("These flowers are not like that flowers.")
coat: (character, system) ->
if character.sandbox.seen_coat? if character.sandbox.seen_coat?
"A warm grey alpaca coat for the bleak autumn times. It's one of her favorites." return lvl2("""
A warm grey alpaca coat for the bleak autumn times.
It's one of her favorites.
""")
else else
character.sandbox.seen_coat = 1 character.sandbox.seen_coat = 1
money(character, system, 4000) money(character, system, 4000)
"A warm coat.. hey, what's this? One of the pockets is loaded with cash!" return lvl2("""
} A warm coat.. hey, what's this?
""" One of the pockets is loaded with cash!
skirt: "This hanger has only a short skirt. Maybe there was something else on it? Who knows." """)
costumes: "Ana is an exotic dancer. She has her own dance style, and these exquisite costumes are made just for her moves and motions." skirt: () ->
mp3: """ lvl2("""
Wow, this woman LOVES her players! This hanger has only a short skirt.
Maybe there was something else on it?
Who knows.
""")
costumes: () ->
lvl2("""
Ana is an exotic dancer.
She has her own dance style, and these exquisite costumes are made just for her moves and motions.
""")
mp3: () ->
lvl2("""
Wow, this woman LOVES her players!
There are MP3 players, CD players, portable DVD, walk-on clips, sport hands-free players, underwater ones. There are MP3 players, CD players, portable DVD, walk-on clips, sport hands-free players, underwater ones.
These are all rather cheap, though, compared to *something else* in this room. These are all rather cheap, though, compared to *something else* in this room.
""" """)
hats: "These look very old-style, very Mary Poppins-like.Maybe that's just a trend or whatever.", hats: () ->
lingerie: "Ronald won't be digging in that." lvl2("""
accessories: """ These look very old-style, very Mary Poppins-like.
A cross necklace, three metal bracelets and lots of uncomplicated earrings and hair pins. Maybe that's just a trend or whatever.
A dozen of scarfs or so. """
No diamonds, no rings, no *jewelry.* lingerie: () ->
lvl2("Ronald won't be digging in that.")
accessories: () ->
lvl2("""
A cross necklace, three metal bracelets and lots of uncomplicated earrings and hair pins.
A dozen of scarfs or so.
No diamonds, no rings, no *jewelry.*
On the other hand, her Instagram nickname is *bareboned mane shaker.* On the other hand, her Instagram nickname is *bareboned mane shaker.*
""" """)
shoes: """ shoes: () ->
Anastacia doesn't care for the footwear fashion. lvl2("""
These 4 pairs of combat boots and 13 pairs of ballet flats can attest that. Anastacia doesn't care for the footwear fashion.
These 4 pairs of combat boots and 13 pairs of ballet flats can attest that.
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?
""" """)
mirror: """ mirror: () ->
The mirror looks directly at the bed. lvl1("""
Kinky, though not very much *Feng Shui* in it. The mirror looks directly at the bed.
Kinky, though not very much *Feng Shui* in it.
#{textlink("The frame","frame")} depicts various artists (all women) making sculptures of men. #{textlink("The frame","frame")} depicts various artists (all women) making sculptures of men.
It's a very *unusual* art. It's a very *unusual* art.
""" """)
frame: """ frame: () ->
On a close examination, the frame isn't attached to the wall. lvl2("""
There is #{textlink("a safe", "safe")} behind the mirror! On a close examination, the frame isn't attached to the wall.
""" There is #{textlink("a safe", "safe")} behind the mirror!
safe: (character) -> """ """)
#{if character.sandbox.seen_safe? safe: (character) ->
""" if character.sandbox.seen_safe?
return lvl3("""
The safe is locked with a regular lock. The safe is locked with a regular lock.
Ronald tries two keys. Ronald tries two keys.
The first of them opens the door. The first of them opens the door.
There are #{textlink("money", "money")} inside, and #{textlink("a rough sketch.", "sketch")} There are #{textlink("money", "money")} inside, and #{textlink("a rough sketch.", "sketch")}
""" """)
else else
""" return lvl3("""
The safe is open now. The safe is open now.
There is #{textlink("a rough sketch", "sketch")} inside. There is #{textlink("a rough sketch", "sketch")} inside.
""" """)
}
"""
money: (character, system) -> money: (character, system) ->
character.sandbox.seen_safe = 1 character.sandbox.seen_safe = 1
money(character, system, 50000) money(character, system, 50000)
""" lvl4("""
It's a big cash. It's a big cash.
Odd that she didn't take this when she left. Odd that she didn't take this when she left.
But someone's fault just makes Ronald's payday now. But someone's fault just makes Ronald's payday now.
""" """)
sketch: """ sketch: () ->
It's a portrait of Anastacia. lvl4("""
She bites her lower lip slightly. It's a portrait of Anastacia.
Her eyes are sad, or maybe concerned with something. She bites her lower lip slightly.
The sketch is signed: *"L. Y. - 2017"* Her eyes are sad, or maybe concerned with something.
""" The sketch is signed: *"L. Y. - 2017"*
""")
situation "kitchen", situation "kitchen",
before: () -> before: () ->
@ -210,35 +283,36 @@ situation "kitchen",
The white, perfectly clean kitchen could be called spartan: #{textlink("a fridge,", "fridge")} a microwave and #{textlink("a big table", "table")} where one can eat whatever she "cooked" that way. The white, perfectly clean kitchen could be called spartan: #{textlink("a fridge,", "fridge")} a microwave and #{textlink("a big table", "table")} where one can eat whatever she "cooked" that way.
""" """
writers: writers:
fridge: """ fridge: () ->
No magnets or stickers on the outside. lvl1("""
The door opens easily. No magnets or stickers on the outside.
*If only the hinges on the apartment doors were as good as refrigerator ones.* The door opens easily.
*If only the hinges on the apartment doors were as good as refrigerator ones.*
A hearty bunch of salad. A hearty bunch of salad.
Some fruits, carrots, two beets. Some fruits, carrots, two beets.
Three eggs, one cracked. Three eggs, one cracked.
A bottle of ketchup, bottle of whiskey, valerian vial. A bottle of ketchup, bottle of whiskey, valerian vial.
A jar of raspberry preserve, half-finished. A jar of raspberry preserve, half-finished.
And enough frozen pizzas to last a month. And enough frozen pizzas to last a month.
""" """)
table: (character, system) -> table: (character, system) ->
if character.sandbox.seen_table? if character.sandbox.seen_table?
"A letter's still there. Nothing new about it." return lvl1("A letter's still there. Nothing new about it.")
else else
character.sandbox.seen_table = 1 character.sandbox.seen_table = 1
""" return lvl1("""
There's something on the table. There's something on the table.
It looks like a formal letter. It looks like a formal letter.
It's in French, though, so Ronald won't be able to read it. It's in French, though, so Ronald won't be able to read it.
He's sure it's recent (`24.03.2018`) and it's about something-something QUANTUM AUDIO.. armement? He's sure it's recent (`24.03.2018`) and it's about something-something QUANTUM AUDIO.. armement?
""" """)
situation "bathroom", situation "bathroom",
before: (character,system) -> before: (character,system) ->
@ -265,20 +339,21 @@ situation "balcony",
writers: writers:
ashtray: (character) -> ashtray: (character) ->
character.sandbox.knows_the_code = 1 character.sandbox.knows_the_code = 1
return """ return lvl1("""
She completely smoked out two cigarettes here. She completely smoked out two cigarettes here.
There's also a #{textlink("piece of paper nearby,", "paper")} half-burnt. There's also a #{textlink("piece of paper nearby,", "paper")} half-burnt.
""" """)
paper: """ paper: () ->
It's a letter, written by hand on a thick sheet of what must be an A4 paper. lvl2("""
The handwriting is wobbly and the first three quarters of the sheet is gone, but the ending is legible. It's a letter, written by hand on a thick sheet of what must be an A4 paper.
The handwriting is wobbly and the first three quarters of the sheet is gone, but the ending is legible.
*...ok at them, celebrating the New Year, think of our anniversary. *...ok at them, celebrating the New Year, think of our anniversary.
The day of White. The day of White.
I will fly to you no matter what.* I will fly to you no matter what.*
&nbsp;&nbsp;&nbsp; *L. Y.* &nbsp;&nbsp;&nbsp; *L. Y.*
""" """)
situation "box", situation "box",
before: () -> before: () ->