tyrano_dsl 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +56 -5
- data/bin/tyrano_dsl.rb +21 -8
- data/lib/tyrano_dsl/elements/background.rb +1 -1
- data/lib/tyrano_dsl/elements/character.rb +1 -2
- data/lib/tyrano_dsl/elements/jump_target.rb +1 -1
- data/lib/tyrano_dsl/elements/label.rb +0 -1
- data/lib/tyrano_dsl/elements/scene.rb +1 -1
- data/lib/tyrano_dsl/elements/title_screen.rb +1 -1
- data/lib/tyrano_dsl/elements/variable.rb +1 -1
- data/lib/tyrano_dsl/{elements_writers → export_game/elements_writers}/background_writer.rb +5 -5
- data/lib/tyrano_dsl/{elements_writers → export_game/elements_writers}/character_writer.rb +5 -5
- data/lib/tyrano_dsl/{elements_writers → export_game/elements_writers}/characters_writer.rb +4 -4
- data/lib/tyrano_dsl/{elements_writers → export_game/elements_writers}/elements_writers_module.rb +1 -1
- data/lib/tyrano_dsl/{elements_writers → export_game/elements_writers}/scene_writer.rb +4 -4
- data/lib/tyrano_dsl/{elements_writers → export_game/elements_writers}/title_screen_writer.rb +4 -4
- data/lib/tyrano_dsl/{elements_writers → export_game/elements_writers}/variables_writer.rb +4 -4
- data/lib/tyrano_dsl/export_game/export_game.rb +4 -0
- data/lib/tyrano_dsl/{file_actions → export_game/file_actions}/clear_directory.rb +3 -2
- data/lib/tyrano_dsl/{file_actions → export_game/file_actions}/create_file.rb +3 -2
- data/lib/tyrano_dsl/{file_actions → export_game/file_actions}/file_copy.rb +5 -4
- data/lib/tyrano_dsl/{file_actions → export_game/file_actions}/files_actions_module.rb +3 -1
- data/lib/tyrano_dsl/{file_actions → export_game/file_actions}/json_patch.rb +8 -3
- data/lib/tyrano_dsl/export_game/main.rb +26 -0
- data/lib/tyrano_dsl/{writer.rb → export_game/writer.rb} +17 -17
- data/lib/tyrano_dsl/{writing_context.rb → export_game/writing_context.rb} +4 -4
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/ask_question.rb +2 -2
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/conditional_jump.rb +2 -2
- data/lib/tyrano_dsl/export_game/writing_words/declare_background.rb +5 -0
- data/lib/tyrano_dsl/export_game/writing_words/declare_character.rb +5 -0
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/declare_label.rb +1 -1
- data/lib/tyrano_dsl/export_game/writing_words/declare_variable.rb +5 -0
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/display_text.rb +1 -1
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/hide_character.rb +1 -1
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/hide_message_window.rb +1 -1
- data/lib/tyrano_dsl/export_game/writing_words/include_file.rb +5 -0
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/jump.rb +2 -2
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/nop.rb +1 -1
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/set_background.rb +2 -2
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/set_character_stance.rb +2 -2
- data/lib/tyrano_dsl/export_game/writing_words/set_title_screen_background.rb +4 -0
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/show_character.rb +1 -1
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/show_message_window.rb +1 -1
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/start_scene.rb +1 -1
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/update_variable.rb +2 -2
- data/lib/tyrano_dsl/{writing_words → export_game/writing_words}/writing_words_module.rb +2 -2
- data/lib/tyrano_dsl/export_text/export_text.rb +4 -0
- data/lib/tyrano_dsl/export_text/main.rb +27 -0
- data/lib/tyrano_dsl/export_text/writer.rb +40 -0
- data/lib/tyrano_dsl/parser.rb +14 -1
- data/lib/tyrano_dsl/parsing_words/ask_question.rb +0 -4
- data/lib/tyrano_dsl/parsing_words/conditional_jump.rb +0 -4
- data/lib/tyrano_dsl/parsing_words/declare_background.rb +0 -5
- data/lib/tyrano_dsl/parsing_words/declare_character.rb +0 -4
- data/lib/tyrano_dsl/parsing_words/declare_label.rb +0 -4
- data/lib/tyrano_dsl/parsing_words/declare_variable.rb +0 -4
- data/lib/tyrano_dsl/parsing_words/display_text.rb +0 -5
- data/lib/tyrano_dsl/parsing_words/hide_character.rb +0 -6
- data/lib/tyrano_dsl/parsing_words/hide_message_window.rb +0 -5
- data/lib/tyrano_dsl/parsing_words/include_file.rb +0 -6
- data/lib/tyrano_dsl/parsing_words/jump.rb +0 -5
- data/lib/tyrano_dsl/parsing_words/set_background.rb +0 -5
- data/lib/tyrano_dsl/parsing_words/set_character_stance.rb +0 -5
- data/lib/tyrano_dsl/parsing_words/set_title_screen_background.rb +0 -5
- data/lib/tyrano_dsl/parsing_words/show_character.rb +0 -5
- data/lib/tyrano_dsl/parsing_words/show_message_window.rb +0 -5
- data/lib/tyrano_dsl/parsing_words/start_scene.rb +0 -4
- data/lib/tyrano_dsl/parsing_words/update_variable.rb +0 -5
- data/lib/tyrano_dsl/tyrano_dsl.rb +1 -1
- metadata +41 -37
- data/lib/tyrano_dsl/main.rb +0 -18
- data/lib/tyrano_dsl/writing_words/declare_background.rb +0 -5
- data/lib/tyrano_dsl/writing_words/declare_character.rb +0 -5
- data/lib/tyrano_dsl/writing_words/declare_variable.rb +0 -5
- data/lib/tyrano_dsl/writing_words/include_file.rb +0 -5
- data/lib/tyrano_dsl/writing_words/set_title_screen_background.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46ba1fa3cb8f86ad6789542828c295000818759b
|
4
|
+
data.tar.gz: 7f9d780be122cb5e2580e5139a158ae43017fe71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee6a884dd5ceaa547a373c23fd0c61f21eaa48343b3963fd76b387d9c6383d97ea533790f4d13cb1a7160cee849c92b6cd5bf6420cee1628062cc6d22e6150f3
|
7
|
+
data.tar.gz: 4fe270f441606aa4bcde69a3935eb5228fafe2662d8ebe39d402c7e01f17b46593573ef6b3116a7a779a40c40db45a3cd988f81c6997bdfdb43f2c574b765535
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# TyranoDsl
|
2
2
|
|
3
3
|
[](https://travis-ci.org/archiloque/tyrano_dsl)
|
4
|
+
[](https://badge.fury.io/rb/tyrano_dsl)
|
4
5
|
|
5
6
|
A DSL to write visual novels games in Ruby using [TyranoBuilder](http://tyranobuilder.com).
|
6
7
|
|
@@ -55,7 +56,7 @@ start_scene 'Second scene'
|
|
55
56
|
- Install [TyranoBuilder](http://tyranobuilder.com)
|
56
57
|
- Create a project in it
|
57
58
|
- Install the gem
|
58
|
-
- Execute `tyrano-dsl PATH_TO_YOUR_TYRANO_PROJECT PATH_TO_YOUR_RUBY_CODE.rb` in your project directory.
|
59
|
+
- Execute `tyrano-dsl export-game PATH_TO_YOUR_TYRANO_PROJECT PATH_TO_YOUR_RUBY_CODE.rb` in your project directory.
|
59
60
|
|
60
61
|
`PATH_TO_YOUR_TYRANO_PROJECT` should look like `/Users/u/Library/Application\ Support/Steam/steamapps/common/TyranoBuilder/myproject/Test`
|
61
62
|
|
@@ -65,10 +66,40 @@ You can then reopen the project in TyranoBuilder and see the changes.
|
|
65
66
|
|
66
67
|
If there is an error it should be displayed and the message should help you to fix the problem.
|
67
68
|
|
69
|
+
## Actions
|
70
|
+
|
71
|
+
* `export-game` export the game to replace the current content of the Tyrano project
|
72
|
+
* `export-text` print the text content of the game
|
73
|
+
|
68
74
|
## Current vocabulary
|
69
75
|
|
76
|
+
* [Background](#background)
|
77
|
+
* [`declare_background` Declare a background](#declare_background)
|
78
|
+
* [`set_background` Set the background](#set_background)
|
79
|
+
* [Characters](#characters)
|
80
|
+
* [`declare_character` Declare a character](#declare_character)
|
81
|
+
* [`hide_character` Hide a character](#hide_character)
|
82
|
+
* [`set_character_stance` Change the stance of a character](#set_character_stance)
|
83
|
+
* [`show_character` Show a character](#show_character)
|
84
|
+
* [Content](#content)
|
85
|
+
* [`ask_question` Ask a question](#ask_question)
|
86
|
+
* [Jump & Labels](#jump-labels)
|
87
|
+
* [`declare_label` Declare a label](#declare_label)
|
88
|
+
* [`conditional_jump` Jump to somewhere if a condition is met](#conditional_jump)
|
89
|
+
* [`jump` Jump to somewhere](#jump)
|
90
|
+
* [Variables](#variables)
|
91
|
+
* [`declare_variable` Declare a variable](#declare_variable)
|
92
|
+
* [`update_variable` Update a variable](#update_variable)
|
93
|
+
* [Misc](#misc)
|
94
|
+
* [`hide_message_window` Hide the message window](#hide_message_window)
|
95
|
+
* [`include_file` Include a file](#include_file)
|
96
|
+
* [`show_message_window` Show the message window](#show_message_window)
|
97
|
+
* [`start_scene` Start a new scene](#start_scene)
|
98
|
+
|
99
|
+
<a id="background"></a>
|
70
100
|
### Background
|
71
101
|
|
102
|
+
<a id="declare_background"></a>
|
72
103
|
#### `declare_background` Declare a background
|
73
104
|
|
74
105
|
`declare_background(name, images_path)`
|
@@ -79,6 +110,7 @@ If there is an error it should be displayed and the message should help you to f
|
|
79
110
|
declare_background 'School', 'background/school.jpg'
|
80
111
|
```
|
81
112
|
|
113
|
+
<a id="set_background"></a>
|
82
114
|
#### `set_background` Set the background
|
83
115
|
|
84
116
|
`show_background(name)`
|
@@ -88,8 +120,10 @@ declare_background 'School', 'background/school.jpg'
|
|
88
120
|
set_background 'School'
|
89
121
|
```
|
90
122
|
|
123
|
+
<a id="characters"></a>
|
91
124
|
### Characters
|
92
125
|
|
126
|
+
<a id="declare_character"></a>
|
93
127
|
#### `declare_character` Declare a character
|
94
128
|
|
95
129
|
`declare_character(name, stances)`
|
@@ -102,6 +136,7 @@ declare_character 'Shinji',
|
|
102
136
|
'angry' => 'angry.jpg'
|
103
137
|
```
|
104
138
|
|
139
|
+
<a id="hide_character"></a>
|
105
140
|
#### `hide_character` Hide a character
|
106
141
|
|
107
142
|
`hide_character(name)`
|
@@ -111,7 +146,8 @@ declare_character 'Shinji',
|
|
111
146
|
hide_character 'Shinji'
|
112
147
|
```
|
113
148
|
|
114
|
-
|
149
|
+
<a id="set_character_stance"></a>
|
150
|
+
#### `set_character_stance` Change the stance of a character
|
115
151
|
|
116
152
|
`set_character_stance(name, stance)`
|
117
153
|
- `name` is a `String` representing the character's name
|
@@ -121,7 +157,8 @@ hide_character 'Shinji'
|
|
121
157
|
set_character_stance 'Shinji', 'angry'
|
122
158
|
```
|
123
159
|
|
124
|
-
|
160
|
+
<a id="show_character"></a>
|
161
|
+
#### `show_character` Show a character
|
125
162
|
|
126
163
|
`show_character(name, stance, left, top)`
|
127
164
|
- `name` is a `String` representing the character's name
|
@@ -133,8 +170,10 @@ set_character_stance 'Shinji', 'angry'
|
|
133
170
|
show_character 'Shinji', 'default', 434, 128
|
134
171
|
```
|
135
172
|
|
173
|
+
<a id="content"></a>
|
136
174
|
### Content
|
137
175
|
|
176
|
+
<a id="ask_question"></a>
|
138
177
|
#### `ask_question` Ask a question
|
139
178
|
|
140
179
|
`ask_question(possible_answers)`
|
@@ -164,8 +203,10 @@ ask_question [
|
|
164
203
|
]
|
165
204
|
```
|
166
205
|
|
206
|
+
<a id="jump-labels"></a>
|
167
207
|
### Jump & Labels
|
168
208
|
|
209
|
+
<a id="declare_label"></a>
|
169
210
|
#### `declare_label` Declare a label
|
170
211
|
|
171
212
|
`declare_label(name)`
|
@@ -175,6 +216,7 @@ ask_question [
|
|
175
216
|
declare_label 'my label'
|
176
217
|
```
|
177
218
|
|
219
|
+
<a id="conditional_jump"></a>
|
178
220
|
#### `conditional_jump` Jump to somewhere if a condition is met
|
179
221
|
|
180
222
|
`conditional_jump(variable, operator, value, scene, label)`
|
@@ -189,6 +231,7 @@ conditional_jump 'variable_1', '<', 10, 'Scene two'
|
|
189
231
|
conditional_jump 'variable_1', '=', 'variable_2', 'Scene two', 'Label three'
|
190
232
|
```
|
191
233
|
|
234
|
+
<a id="jump"></a>
|
192
235
|
#### `jump` Jump to somewhere
|
193
236
|
|
194
237
|
`jump(scene, label)`
|
@@ -200,8 +243,10 @@ jump 'Scene two'
|
|
200
243
|
jump 'Scene two', 'Label three'
|
201
244
|
```
|
202
245
|
|
246
|
+
<a id="variables"></a>
|
203
247
|
### Variables
|
204
248
|
|
249
|
+
<a id="declare_variable"></a>
|
205
250
|
#### `declare_variable` Declare a variable
|
206
251
|
|
207
252
|
`declare_variable(variable_name, initial_value)`
|
@@ -212,6 +257,7 @@ jump 'Scene two', 'Label three'
|
|
212
257
|
declare_variable 'happiness', 25
|
213
258
|
```
|
214
259
|
|
260
|
+
<a id="update_variable"></a>
|
215
261
|
#### `update_variable` Update a variable
|
216
262
|
|
217
263
|
`update_variable(variable_name, operation, value)`
|
@@ -230,8 +276,10 @@ update_variable 'happiness', '=', 25
|
|
230
276
|
update_variable 'happiness', '+', 'calmness'
|
231
277
|
```
|
232
278
|
|
279
|
+
<a id="misc"></a>
|
233
280
|
### Misc
|
234
281
|
|
282
|
+
<a id="hide_message_window"></a>
|
235
283
|
#### `hide_message_window` Hide the message window
|
236
284
|
|
237
285
|
`hide_message_window`
|
@@ -240,6 +288,7 @@ update_variable 'happiness', '+', 'calmness'
|
|
240
288
|
hide_message_window
|
241
289
|
```
|
242
290
|
|
291
|
+
<a id="include_file"></a>
|
243
292
|
#### `include_file` Include a file
|
244
293
|
|
245
294
|
`include_file(file_name)`
|
@@ -249,6 +298,7 @@ hide_message_window
|
|
249
298
|
include_file('other_scene.rb')
|
250
299
|
```
|
251
300
|
|
301
|
+
<a id="show_message_window"></a>
|
252
302
|
#### `show_message_window` Show the message window
|
253
303
|
|
254
304
|
`show_message_window`
|
@@ -257,6 +307,7 @@ include_file('other_scene.rb')
|
|
257
307
|
show_message_window
|
258
308
|
```
|
259
309
|
|
310
|
+
<a id="start_scene"></a>
|
260
311
|
#### `start_scene` Start a new scene
|
261
312
|
|
262
313
|
`start_scene(name)`
|
@@ -275,11 +326,11 @@ The tool works like a two passes compiler:
|
|
275
326
|
|
276
327
|
## Links
|
277
328
|
|
278
|
-
- http://tyranobuilder.com/tyranoscript-tags-reference/
|
329
|
+
- [the TyranoScript tags references](http://tyranobuilder.com/tyranoscript-tags-reference/)
|
279
330
|
|
280
331
|
## Contributing
|
281
332
|
|
282
|
-
Bug reports and pull requests are welcome on GitHub
|
333
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/archiloque/tyrano_dsl).
|
283
334
|
|
284
335
|
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
285
336
|
|
data/bin/tyrano_dsl.rb
CHANGED
@@ -2,20 +2,33 @@
|
|
2
2
|
|
3
3
|
require 'bundler/setup'
|
4
4
|
require 'json'
|
5
|
-
require 'tyrano_dsl/main'
|
6
5
|
require 'tyrano_dsl/tyrano_exception'
|
7
|
-
if ARGV.length !=
|
8
|
-
raise 'You need
|
6
|
+
if ARGV.length != 3
|
7
|
+
raise 'You need three arguments : the verb to execute, the path to the tyrano project and the path to your DSL file'
|
9
8
|
end
|
10
|
-
|
11
|
-
|
9
|
+
|
10
|
+
EXPORT_GAME_COMMAND = 'export-game'
|
11
|
+
EXPORT_TEXT_COMMAND = 'export-text'
|
12
|
+
|
13
|
+
verb = ARGV[0]
|
14
|
+
unless [EXPORT_GAME_COMMAND, EXPORT_TEXT_COMMAND].include? verb
|
15
|
+
raise "Unknown verb [#{verb}, should be [#{EXPORT_GAME_COMMAND}] or [#{EXPORT_TEXT_COMMAND}]"
|
16
|
+
end
|
17
|
+
tyrano_project_path = ARGV[1]
|
18
|
+
dsl_file_path = ARGV[2]
|
12
19
|
|
13
20
|
builder_configuration_file = File.join(tyrano_project_path, 'builder_config.json')
|
14
21
|
unless File.exists? builder_configuration_file
|
15
22
|
raise "File not found [#{builder_configuration_file}]"
|
16
23
|
end
|
17
24
|
|
18
|
-
|
19
|
-
|
20
|
-
|
25
|
+
if verb == EXPORT_GAME_COMMAND
|
26
|
+
require 'tyrano_dsl/export_game/main'
|
27
|
+
main = TyranoDsl::ExportGame::Main.new
|
28
|
+
else
|
29
|
+
require 'tyrano_dsl/export_text/main'
|
30
|
+
main = TyranoDsl::ExportText::Main.new
|
21
31
|
end
|
32
|
+
|
33
|
+
result = main.run(dsl_file_path)
|
34
|
+
main.apply(result, tyrano_project_path)
|
@@ -1,17 +1,17 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../../elements/background'
|
2
2
|
require_relative '../file_actions/clear_directory'
|
3
3
|
require_relative '../file_actions/file_copy'
|
4
4
|
require_relative 'elements_writers_module'
|
5
5
|
|
6
6
|
# Write a background
|
7
|
-
class TyranoDsl::ElementsWriters::BackgroundWriter
|
7
|
+
class TyranoDsl::ExportGame::ElementsWriters::BackgroundWriter
|
8
8
|
|
9
|
-
include TyranoDsl::ElementsWriters::ElementsWritersModule
|
9
|
+
include TyranoDsl::ExportGame::ElementsWriters::ElementsWritersModule
|
10
10
|
|
11
11
|
# @return [Array]
|
12
12
|
def init_actions
|
13
13
|
[
|
14
|
-
TyranoDsl::FileActions::ClearDirectory.new(TyranoDsl::Elements::Background::BACKGROUND_DIRECTORY)
|
14
|
+
TyranoDsl::ExportGame::FileActions::ClearDirectory.new(TyranoDsl::Elements::Background::BACKGROUND_DIRECTORY)
|
15
15
|
]
|
16
16
|
end
|
17
17
|
|
@@ -20,7 +20,7 @@ class TyranoDsl::ElementsWriters::BackgroundWriter
|
|
20
20
|
def write(background)
|
21
21
|
log {"Writing background [#{background.name}]"}
|
22
22
|
[
|
23
|
-
TyranoDsl::FileActions::FileCopy.new(
|
23
|
+
TyranoDsl::ExportGame::FileActions::FileCopy.new(
|
24
24
|
background.image_path,
|
25
25
|
background.target_long_file_name
|
26
26
|
)
|
@@ -1,17 +1,17 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../../elements/character'
|
2
2
|
require_relative '../file_actions/clear_directory'
|
3
3
|
require_relative '../file_actions/file_copy'
|
4
4
|
require_relative 'elements_writers_module'
|
5
5
|
|
6
6
|
# Write a character
|
7
|
-
class TyranoDsl::ElementsWriters::CharacterWriter
|
7
|
+
class TyranoDsl::ExportGame::ElementsWriters::CharacterWriter
|
8
8
|
|
9
|
-
include TyranoDsl::ElementsWriters::ElementsWritersModule
|
9
|
+
include TyranoDsl::ExportGame::ElementsWriters::ElementsWritersModule
|
10
10
|
|
11
11
|
# @return [Array]
|
12
12
|
def init_actions
|
13
13
|
[
|
14
|
-
TyranoDsl::FileActions::ClearDirectory.new(TyranoDsl::Elements::Character::CHARACTER_DIRECTORY)
|
14
|
+
TyranoDsl::ExportGame::FileActions::ClearDirectory.new(TyranoDsl::Elements::Character::CHARACTER_DIRECTORY)
|
15
15
|
]
|
16
16
|
end
|
17
17
|
|
@@ -21,7 +21,7 @@ class TyranoDsl::ElementsWriters::CharacterWriter
|
|
21
21
|
log {"Writing character [#{character.name}]"}
|
22
22
|
result = []
|
23
23
|
character.stances.each_value do |stance|
|
24
|
-
result << TyranoDsl::FileActions::FileCopy.new(
|
24
|
+
result << TyranoDsl::ExportGame::FileActions::FileCopy.new(
|
25
25
|
stance.original_file_name,
|
26
26
|
stance.long_target_file_name
|
27
27
|
)
|
@@ -3,9 +3,9 @@ require_relative '../file_actions/json_patch'
|
|
3
3
|
require_relative 'elements_writers_module'
|
4
4
|
|
5
5
|
# Write things where all characters are implied
|
6
|
-
class TyranoDsl::ElementsWriters::CharactersWriter
|
6
|
+
class TyranoDsl::ExportGame::ElementsWriters::CharactersWriter
|
7
7
|
|
8
|
-
include TyranoDsl::ElementsWriters::ElementsWritersModule
|
8
|
+
include TyranoDsl::ExportGame::ElementsWriters::ElementsWritersModule
|
9
9
|
|
10
10
|
# @param [TyranoDsl::Elements::World] world
|
11
11
|
# @return [Array]
|
@@ -28,11 +28,11 @@ class TyranoDsl::ElementsWriters::CharactersWriter
|
|
28
28
|
end
|
29
29
|
|
30
30
|
[
|
31
|
-
TyranoDsl::FileActions::CreateFile.new(
|
31
|
+
TyranoDsl::ExportGame::FileActions::CreateFile.new(
|
32
32
|
File.join('data', 'scenario', 'system', 'chara_define.ks'),
|
33
33
|
chara_define_content
|
34
34
|
),
|
35
|
-
TyranoDsl::FileActions::JsonPatch.new(
|
35
|
+
TyranoDsl::ExportGame::FileActions::JsonPatch.new(
|
36
36
|
'builder_config.json',
|
37
37
|
['map_chara'],
|
38
38
|
builder_config_content
|
@@ -2,9 +2,9 @@ require_relative '../file_actions/create_file'
|
|
2
2
|
require_relative 'elements_writers_module'
|
3
3
|
|
4
4
|
# Write a scene
|
5
|
-
class TyranoDsl::ElementsWriters::SceneWriter
|
5
|
+
class TyranoDsl::ExportGame::ElementsWriters::SceneWriter
|
6
6
|
|
7
|
-
include TyranoDsl::ElementsWriters::ElementsWritersModule
|
7
|
+
include TyranoDsl::ExportGame::ElementsWriters::ElementsWritersModule
|
8
8
|
|
9
9
|
# @param [TyranoDsl::Elements::Scene] scene
|
10
10
|
# @param [Array<String>] scene_content
|
@@ -15,11 +15,11 @@ class TyranoDsl::ElementsWriters::SceneWriter
|
|
15
15
|
content_text_content = "[_tb_system_call storage=system/_#{scene.target_name}.ks]\n[cm]\n#{scene_content.join("\n")}\n"
|
16
16
|
preload_text_content = preload_text(assets.to_a)
|
17
17
|
[
|
18
|
-
TyranoDsl::FileActions::CreateFile.new(
|
18
|
+
TyranoDsl::ExportGame::FileActions::CreateFile.new(
|
19
19
|
File.join('data', 'scenario', "#{scene.target_name}.ks"),
|
20
20
|
content_text_content
|
21
21
|
),
|
22
|
-
TyranoDsl::FileActions::CreateFile.new(
|
22
|
+
TyranoDsl::ExportGame::FileActions::CreateFile.new(
|
23
23
|
File.join('data', 'scenario', 'system', "_#{scene.target_name}.ks"),
|
24
24
|
preload_text_content
|
25
25
|
)
|
data/lib/tyrano_dsl/{elements_writers → export_game/elements_writers}/title_screen_writer.rb
RENAMED
@@ -2,9 +2,9 @@ require_relative '../file_actions/create_file'
|
|
2
2
|
require_relative 'elements_writers_module'
|
3
3
|
|
4
4
|
# Write the title screen
|
5
|
-
class TyranoDsl::ElementsWriters::TitleScreenWriter
|
5
|
+
class TyranoDsl::ExportGame::ElementsWriters::TitleScreenWriter
|
6
6
|
|
7
|
-
include TyranoDsl::ElementsWriters::ElementsWritersModule
|
7
|
+
include TyranoDsl::ExportGame::ElementsWriters::ElementsWritersModule
|
8
8
|
|
9
9
|
# @param [TyranoDsl::Elements::World] world
|
10
10
|
# @return [Array]
|
@@ -16,11 +16,11 @@ class TyranoDsl::ElementsWriters::TitleScreenWriter
|
|
16
16
|
content_text_content = title_screen_content(background, first_scene)
|
17
17
|
preload_text_content = preload_text([background.target_long_file_name])
|
18
18
|
[
|
19
|
-
TyranoDsl::FileActions::CreateFile.new(
|
19
|
+
TyranoDsl::ExportGame::FileActions::CreateFile.new(
|
20
20
|
File.join('data', 'scenario', "title_screen.ks"),
|
21
21
|
content_text_content
|
22
22
|
),
|
23
|
-
TyranoDsl::FileActions::CreateFile.new(
|
23
|
+
TyranoDsl::ExportGame::FileActions::CreateFile.new(
|
24
24
|
File.join('data', 'scenario', 'system', "_title_screen.ks"),
|
25
25
|
preload_text_content
|
26
26
|
)
|