Куча ненужных файлов

Которые я потом переведу.
This commit is contained in:
Alexander Yakovlev 2016-12-10 20:46:48 +07:00
parent 6f72453299
commit 80f30194d7
13 changed files with 190 additions and 71 deletions

View File

@ -19,7 +19,7 @@ reload = browserSync.reload
html = (target) ->
return () ->
return gulp.src(['html/index.html']).pipe(gulp.dest(target))
return gulp.src(['html/*.html']).pipe(gulp.dest(target))
# Images
img = (target) ->
@ -54,7 +54,8 @@ bundle = () ->
.pipe(gulp.dest('./build/game'))
gulp.task('concatCoffee', () ->
files = glob.sync('game/procgen/ru/*.cson')
for language in ['ru', 'en']
files = glob.sync('game/procgen/'+language+'/*.cson')
spec = {}
for file in files
data = CSON.parseCSONFile(file)
@ -67,11 +68,11 @@ gulp.task('concatCoffee', () ->
})
data.phrases = undefined
key = file.substr(0, file.lastIndexOf('.')) || file
key = key.replace('game/procgen/ru/', '')
key = key.replace('game/procgen/'+language+'/', '')
spec[key] = data
json = JSON.stringify(spec) + '\n'
fs.writeFileSync("./build/game/procgen/ru.json", json)
fs.writeFileSync("./build/game/procgen/"+language+".json", json)
return gulp.src([
'./game/begin.coffee',
@ -91,6 +92,7 @@ gulp.task('serve', ['build'], () ->
server: {
baseDir: 'build'
}
browser: []
})
sassListener = () ->

View File

@ -5,10 +5,13 @@ require('salet')
ImprovEngine = require('improv')
Improv = {}
i18n.push("ru", require('../../game/language/ru.coffee'))
i18n.push("en", require('../../game/language/en.coffee'))
salet.game_id = "0ee0825d-0c71-4a08-bfe5-730e575df26d"
salet.game_version = "1.0"
$.getJSON('game/procgen/ru.json', (data) ->
$.getJSON('game/procgen/'+i18n.lang+'.json', (data) ->
Improv = new ImprovEngine(data, {
filters: [
ImprovEngine.filters.mismatchFilter()

29
game/language/en.coffee Normal file
View File

@ -0,0 +1,29 @@
module.exports =
back: "Go back"
intro: """
-- Just got a call from the club. <..>
"""
dsc: (Improv) ->
"""
### In the car
Рядом с вами сидит [Лёша](alexey) и #{Improv.gen("alexey")}
На переднем сидении [Марго](margo) #{Improv.gen("margo")}
Вы сидите на заднем сидении, за спиной водителя. [Катя](katie) #{Improv.gen("katie")}
Вы положили в карман дверцы [мобильный телефон.](phone)
За [окном машины](./_writer_window) проносится трасса.
#{Improv.gen("you")}
"""
phone_dsc: "Вы открываете список контактов. Кому бы позвонить…"
director_prompt: "Директор музыкального клуба"
director_dsc: """
Hello? Alla Borisovna?
"""
bye: "Say bye"
cyalater: """
Thank you, I'll be in touch.
"""
end_phone: "Put down the phone"
end: "Nah, I'll think of something else."

30
game/language/ru.coffee Normal file
View File

@ -0,0 +1,30 @@
module.exports =
no_local_storage: "Локальное хранилище недоступно."
erase_message: "Это навсегда удалит вашего персонажа и немедленно вернёт вас на старт игры. Вы уверены?"
back: "Обратно"
intro: """
-- Только что звонили из клуба. <..>
"""
dsc: (Improv) -> """
### В машине
Рядом с вами сидит [Лёша](alexey) и #{Improv.gen("alexey")}
На переднем сидении [Марго](margo) #{Improv.gen("margo")}
Вы сидите на заднем сидении, за спиной водителя. [Катя](katie) #{Improv.gen("katie")}
Вы положили в карман дверцы [мобильный телефон.](phone)
За [окном машины](./_writer_window) проносится трасса.
#{Improv.gen("you")}
"""
phone_dsc: "Вы открываете список контактов. Кому бы позвонить…"
director_prompt: "Директор музыкального клуба"
director_dsc: """
Алло? Анна Борисовна?
"""
bye: "Попрощаться"
cyalater: """
Спасибо. Созвонимся.
"""
end_phone: "Отложить телефон"
end: "Передумать"

View File

@ -0,0 +1,5 @@
phrases: [
"обнимает гитару."
"насвистывает свою партию в песне про солнце."
"задумчиво смотрит в одну точку."
]

View File

@ -0,0 +1,3 @@
phrases: [
"выжимает из машины всё, что дозволено правилами."
]

View File

@ -0,0 +1,3 @@
phrases: [
"напевает про себя весёлый мотивчик."
]

View File

@ -0,0 +1,19 @@
groups: [
tags: []
phrases: [
"За окном проносится Россия."
]
,
tags: [
['weather', 'warm']
]
phrases: [
]
,
tags: [
['weather', 'cold']
]
phrases: [
"Вы ничего не видите в метели."
]
]

3
game/procgen/en/you.cson Normal file
View File

@ -0,0 +1,3 @@
phrases: [
"Вы сжимаете родную флейту. Только бы не опоздать."
]

View File

@ -1,51 +1,33 @@
room "start",
before: (from) ->
if (!from)
"""
-- Только что звонили из клуба.
Приехали какие-то чмыри из администрации, нас отменяют.
"""
dsc: () -> """
### В машине
Рядом с вами сидит [Лёша](alexey) и #{Improv.gen("alexey")}
На переднем сидении [Марго](margo) #{Improv.gen("margo")}
Вы сидите на заднем сидении, за спиной водителя. [Катя](katie) #{Improv.gen("katie")}
Вы положили в карман дверцы [мобильный телефон.](phone)
За [окном машины](./_writer_window) проносится трасса.
#{Improv.gen("you")}
"""
return "intro".l()
dsc: () -> "dsc".l(Improv)
writers:
window: () ->
# re-enter the room, reroll the description
salet.view.clearContent()
salet.here().entering()
salet.here().entering("start")
return "<em>"+Improv.gen("window")+"</em>"
room "phone",
choices: "#call",
dsc: "Вы открываете список контактов. Кому бы позвонить…"
dsc: "phone_dsc".l()
room "director",
tags: ["call"],
choices: "#director"
optionText: "Директор музыкального клуба"
dsc: """
Алло? Анна Борисовна?
"""
optionText: "director_prompt".l()
dsc: "director_dsc".l()
dialogue "Попрощаться", "director", "call", """
Спасибо. Созвонимся.
"""
dialogue "bye".l(), "director", "call", "cyalater".l()
# Virtual room to go around limitations
room "vstart",
tags: ["call"]
optionText: (from) ->
switch from
when "start" then "Осмотреться ещё раз"
when "phone" then "Отложить телефон"
else "Передумать"
when "phone" then "end_phone".l()
else "end".l()
enter: () ->
salet.goTo("start")

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Salet showcase</title>
<title>One room</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='https://fonts.googleapis.com/css?family=PT+Sans:400,400italic|PT+Sans+Caption' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
@ -11,11 +11,6 @@
<div id="page">
<div class="fixed container">
<div id="tools_wrapper" class="row">
<div class='ways'>
<small class="text-muted" id="ways_hint">Click these links to explore other rooms</small>
<ul class="nav nav-pills" id="ways">
</ul>
</div>
<div class="buttons">
<button id="night" class="btn btn-outline-primary">Night mode</button>
<button id="erase" class="btn btn-outline-danger">Restart</button>
@ -26,8 +21,7 @@
<div class="row">
<div id="title" class="title">
<div class="label">
<h1>One room</h1>
<h2>A Ludum Dare effort</h2>
<h1>&lt;Note: name the game&gt;</h1>
<noscript>
<p class="noscript_message">This game requires Javascript.</p>
</noscript>

55
html/ru.html Normal file
View File

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<title>И ТУТ НЕ ЗАБЫТЬ НАЗВАТЬ ИГРУ</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='https://fonts.googleapis.com/css?family=PT+Sans:400,400italic|PT+Sans+Caption' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div id="page">
<div class="fixed container">
<div id="tools_wrapper" class="row">
<div class="buttons">
<button id="night" class="btn btn-outline-primary">Night mode</button>
<button id="erase" class="btn btn-outline-danger">Restart</button>
</div>
</div> <!-- End of div.tools_wrapper -->
</div>
<div class="container">
<div class="row">
<div id="title" class="title">
<div class="label">
<h1>Не забыть назвать игру</h1>
<noscript>
<p class="noscript_message">This game requires Javascript.</p>
</noscript>
</div>
</div>
</div>
<div id="content_wrapper" class="row">
<div id="content" class="content">
<noscript>You need to turn on Javascript to play this game.</noscript>
</div>
<a name="end_of_content"></a>
</div>
<div id="legal" class="row">
<div id="footleft">
<p>
<a href="https://git.oreolek.ru/oreolek/ludumdare37" target="_blank">See the source code</a>
</p>
</div>
<div id="footright">
</div>
</div>
</div>
</div> <!-- End of div.page -->
<!-- CDN JS Libraries -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.5/marked.min.js" integrity="sha384-QXBtGc4014gU26HdCwzgy8TVO+FHSSE4+EvPPiSTpdE9w0KyJy1ocfiIbBl1HLq7" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="game/bundle.js"></script>
</body>
</html>

View File

@ -30,13 +30,7 @@ body {
}
.label {
margin: 1.5em auto;
@media (min-width: breakpoint-min(sm)) {
@include make-col-offset(2);
@include make-col(8);
}
@media (max-width: breakpoint-min(sm)) {
@include make-col(12);
}
text-align: center;
}
.subtitle {
@ -77,12 +71,9 @@ body {
}
#tools_wrapper {
background: $body-bg;
.ways {
padding: 0.5em;
@include make-col(6);
}
.buttons {
@include make-col(6);
@include make-col-offset(6);
text-align: right;
}
button {