Skip to content

Commit c50291c

Browse files
committed
Document splicing table patterns
1 parent e56c02e commit c50291c

File tree

7 files changed

+146
-22
lines changed

7 files changed

+146
-22
lines changed

Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/splicing_table.json5

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,25 @@
1818
},
1919
{
2020
type: "patchouli:text",
21-
text: "hexdebug.category.items.entry.splicing_table.page.4",
21+
text: "hexdebug.category.items.entry.splicing_table.page.actions",
2222
},
2323
{
2424
type: "patchouli:text",
25-
text: "hexdebug.category.items.entry.splicing_table.page.5",
25+
text: "hexdebug.category.items.entry.splicing_table.page.secondary",
2626
},
2727
{
2828
type: "patchouli:text",
29-
text: "hexdebug.category.items.entry.splicing_table.page.6",
29+
text: "hexdebug.category.items.entry.splicing_table.page.staff",
3030
},
3131
{
3232
type: "patchouli:text",
3333
anchor: "cost",
3434
text: "hexdebug.category.items.entry.splicing_table.page.cost",
3535
},
36+
{
37+
type: "patchouli:text",
38+
text: "hexdebug.category.items.entry.splicing_table.page.patterns",
39+
},
3640
{
3741
type: "patchouli:crafting",
3842
recipe: "hexdebug:splicing_table",
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
name: "hexdebug.category.patterns.entry.splicing_table",
3+
category: "hexcasting:patterns",
4+
icon: "hexdebug:splicing_table",
5+
advancement: "hexcasting:root",
6+
pages: [
7+
{
8+
type: "hexcasting:pattern",
9+
op_id: "hexdebug:splicing/view_index/read",
10+
anchor: "hexdebug:splicing/view_index/read",
11+
input: "vec",
12+
output: "num",
13+
text: "hexdebug.category.patterns.entry.splicing_table.page.view_index/read",
14+
},
15+
{
16+
type: "hexcasting:pattern",
17+
op_id: "hexdebug:splicing/view_index/write",
18+
anchor: "hexdebug:splicing/view_index/write",
19+
input: "vec, num",
20+
output: "",
21+
text: "hexdebug.category.patterns.entry.splicing_table.page.view_index/write",
22+
},
23+
{
24+
type: "hexcasting:pattern",
25+
op_id: "hexdebug:splicing/selection/read",
26+
anchor: "hexdebug:splicing/selection/read",
27+
input: "vec",
28+
output: "num | null, num | null",
29+
text: "hexdebug.category.patterns.entry.splicing_table.page.selection/read.1",
30+
},
31+
{
32+
type: "patchouli:text",
33+
text: "hexdebug.category.patterns.entry.splicing_table.page.selection/read.2"
34+
},
35+
{
36+
type: "hexcasting:pattern",
37+
op_id: "hexdebug:splicing/selection/write",
38+
anchor: "hexdebug:splicing/selection/write",
39+
input: "vec, num | null, num | null",
40+
output: "",
41+
text: "hexdebug.category.patterns.entry.splicing_table.page.selection/write",
42+
},
43+
{
44+
type: "hexcasting:pattern",
45+
op_id: "hexdebug:splicing/clipboard/read",
46+
anchor: "hexdebug:splicing/clipboard/read",
47+
input: "vec",
48+
output: "any",
49+
text: "hexdebug.category.patterns.entry.splicing_table.page.clipboard/read",
50+
},
51+
{
52+
type: "hexcasting:pattern",
53+
op_id: "hexdebug:splicing/clipboard/write",
54+
anchor: "hexdebug:splicing/clipboard/write",
55+
input: "vec, any",
56+
output: "",
57+
text: "hexdebug.category.patterns.entry.splicing_table.page.clipboard/write",
58+
},
59+
{
60+
type: "hexcasting:pattern",
61+
op_id: "hexdebug:splicing/clipboard/readable",
62+
anchor: "hexdebug:splicing/clipboard/readable",
63+
input: "vec",
64+
output: "bool",
65+
text: "hexdebug.category.patterns.entry.splicing_table.page.clipboard/readable",
66+
},
67+
{
68+
type: "hexcasting:pattern",
69+
op_id: "hexdebug:splicing/clipboard/writable",
70+
anchor: "hexdebug:splicing/clipboard/writable",
71+
input: "vec",
72+
output: "bool",
73+
text: "hexdebug.category.patterns.entry.splicing_table.page.clipboard/writable",
74+
},
75+
],
76+
}

Common/src/main/resources/assets/hexdebug/lang/en_us.flatten.json5

Lines changed: 55 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
server: {
9191
maxUndoStackSize: {
9292
"": "Undo History Size Limit",
93-
"@Tooltip": "Maximum allowed size of the Splicing Table's undo history. To disable the limit, set the value to 0.",
93+
"@Tooltip": "Maximum allowed size of the splicing table's undo history. To disable the limit, set the value to 0.",
9494
}
9595
}
9696
},
@@ -108,11 +108,28 @@
108108
after: "Set Breakpoint After"
109109
},
110110
"craft/debugger": "Craft Debugger",
111+
"splicing/": {
112+
"view_index/": {
113+
read: "Sprocket's Purification",
114+
write: "Sprocket's Gambit",
115+
},
116+
"selection/": {
117+
read: "Splicer's Decomposition",
118+
write: "Splicer's Gambit",
119+
},
120+
"clipboard/": {
121+
read: "Compositor's Purification",
122+
write: "Compositor's Gambit",
123+
readable: "Producer's Purification",
124+
writable: "Director's Purification",
125+
}
126+
},
111127
},
112128
"book.hexdebug:": {
113129
"next_eval_index": "Debug Locator's Rfln.",
114-
"const/cognitohazard": "Cognitohazard Rfln."
115-
}
130+
"const/cognitohazard": "Cognitohazard Rfln.",
131+
"splicing/clipboard/read": "Compositor's Prfn.",
132+
},
116133
},
117134

118135
mishap: {
@@ -179,21 +196,23 @@
179196
"3": "I can select iotas (or the space between them) by clicking on them. Holding $(k:sneak) and clicking again allows me to select a range of iotas.$(br2)\
180197
Additionally, there are dedicated buttons to select the entire list ($(thing)Select All/$) and to clear my selection ($(thing)Select None/$).$(br2)\
181198
Selecting iotas allows me to unlock the true power of the $(l:items/splicing_table)$(item)Splicing Table/$: editing _Hexes.",
182-
"4": "With $(l:items/splicing_table#cost)sufficient media/$, I can perform the following actions:\
199+
actions: "With $(l:items/splicing_table#cost)sufficient media/$, I can perform the following actions:\
183200
$(li)$(thing)Nudge Left/$: Move the selected iota(s) one space to the left.\
184201
$(li)$(thing)Nudge Right/$: Move the selected iota(s) one space to the right.\
185202
$(li)$(thing)Delete/$: Remove the selected iota(s) from the list.\
186203
$(li)$(thing)Duplicate/$: Create a copy of the selected iota(s).\
187204
$(li)$(thing)Undo/$: Revert the last action performed.\
188205
$(li)$(thing)Redo/$: Re-perform actions previously reverted with $(thing)Undo/$.",
189-
"5": "For more advanced operations, some extra storage is required. I can place an iota-holding item in the slot to the left to unlock the following actions:\
206+
secondary: "For more advanced operations, some extra storage is required. I can place an iota-holding item in the slot to the left to unlock the following actions:\
190207
$(li)$(thing)Copy/$: Write the selected iota(s) to a new list in the secondary item.\
191208
$(li)$(thing)Cut/$: Same as $(thing)Copy/$, but also delete the selected iota(s).\
192209
$(li)$(thing)Paste/$: Replace the selected iota(s) with the iota in the secondary item. If the iota is a list, its contents are pasted instead; I can override this by holding $(k:sneak).",
193-
"6": "Finally, I can insert a $(l:items/staff)$(item)Staff/$ into the lower left slot to reveal a miniature casting grid. Patterns drawn on this grid are inserted directly into the list, overwriting any selected iotas.$(br2)\
210+
staff: "Finally, I can insert a $(l:items/staff)$(item)Staff/$ into the lower left slot to reveal a miniature casting grid. Patterns drawn on this grid are inserted directly into the list, overwriting any selected iotas.$(br2)\
194211
There are also six general-purpose inventory slots on the right side. These have no special functionality; they're just a convenient place to store a few extra items.",
195212
cost: "Unfortunately, all of this incredible versatility comes at a cost. In order to modify the contents of items, _media is required - about a tenth of one $(l:items/amethyst)$(item)Amethyst Dust/$ per action performed.$(br2)\
196213
I can supply _media to the $(l:items/splicing_table)$(item)Splicing Table/$ by putting it in the lower right slot. The table will consume up to ten $(l:items/amethyst)$(item)Amethyst Dust/$ at once; any surplus is ignored until it can be consumed without wasting _media.",
214+
patterns: "If this small cost is prohibitive, or if I wish to perform more complicated actions than those previously described, there is another option. I can use patterns such as $(l:patterns/readwrite_blocks#hexcasting:read/entity)$(action)Chronicler's Purification/$ to manipulate the contents of the item in the main slot, and I've devised some $(l:patterns/splicing_table)specialized patterns/$ to control other aspects of the splicing table.$(br2)\
215+
Now, if only I could make the table think for itself...",
197216
recipe: "$(italic)She plugged in strings one after the other, the tiny metal cubes flying in and out as her fingers danced over the tray with blinding speed./$",
198217
},
199218
},
@@ -203,23 +222,46 @@
203222
patterns: {
204223
entry: {
205224
debugging: {
206-
"": "Debugging",
225+
"": "Debugging Patterns",
207226
page: {
208-
"const/debugging": "Adds $(thing)True/$ to the top of the stack if executed by a $(l:items/debugging#debugger)$(item)Debugger/$ or $(l:items/debugging#evaluator)$(item)Evaluator/$, or $(thing)False/$ otherwise.",
209-
"next_eval_index": "Adds the index of the next iota to be evaluated if executed by a $(l:items/debugging#debugger)$(item)Debugger/$ or $(l:items/debugging#evaluator)$(item)Evaluator/$, or $(l:casting/influences)$(thing)Null/$ otherwise.",
227+
"const/debugging": "Add $(thing)True/$ to the top of the stack if executed by a $(l:items/debugging#debugger)$(item)Debugger/$ or $(l:items/debugging#evaluator)$(item)Evaluator/$, or $(thing)False/$ otherwise.",
228+
"next_eval_index": "Add the index of the next iota to be evaluated if executed by a $(l:items/debugging#debugger)$(item)Debugger/$ or $(l:items/debugging#evaluator)$(item)Evaluator/$, or $(l:casting/influences)$(thing)Null/$ otherwise.",
210229
"const/cognitohazard": {
211-
"1": "Adds a $(thing)Cognitohazard/$ to the top of the stack.",
230+
"1": "Add a $(thing)Cognitohazard/$ to the top of the stack.",
212231
"2": "It seems certain $(l:items/debugging#evaluator)debugging tools/$ may pose a security risk for some $(l:patterns/meta#hexcasting:eval/cc)high-level techniques/$. To help combat this, I have created this pattern.$(br2)\
213232
When a $(thing)Cognitohazard/$ iota is executed normally, nothing happens. However, if one is present in a _Hex executed by a $(l:items/debugging#debugger)$(item)Debugger/$, it will cause the _Hex to terminate $(italic)immediately/$ - even before the $(thing)Cognitohazard/$ is actually executed.",
214233
},
215234
"breakpoint/": {
216-
before: "Pauses the $(l:items/debugging#debugger)$(item)Debugger/$ before executing this pattern.",
217-
after: "Pauses the $(l:items/debugging#debugger)$(item)Debugger/$ after executing this pattern (ie. before executing the next pattern).",
235+
before: "Pause the $(l:items/debugging#debugger)$(item)Debugger/$ before executing this pattern.",
236+
after: "Pause the $(l:items/debugging#debugger)$(item)Debugger/$ after executing this pattern (ie. before executing the next pattern).",
218237
},
219-
"craft/debugger": "Creates a $(l:items/debugging#debugger)$(item)Debugger/$ that casts a _Hex, similar to $(l:patterns/spells/hexcasting)certain other patterns/$ I've used in the past.$(br2)\
238+
"craft/debugger": "Create a $(l:items/debugging#debugger)$(item)Debugger/$ that casts a _Hex, similar to $(l:patterns/spells/hexcasting)certain other patterns/$ I've used in the past.$(br2)\
220239
Costs about ten $(l:items/amethyst)$(item)Charged Amethyst/$.",
221240
},
222241
},
242+
splicing_table: {
243+
"": "Splicing Table Patterns",
244+
page: {
245+
"view_index/": {
246+
read: "Remove a vector from the stack, then push the index of the leftmost iota currently visible in the $(l:items/splicing_table)$(item)Splicing Table/$ at that position.",
247+
write: "Remove a vector and number from the stack, then move the view of the $(l:items/splicing_table)$(item)Splicing Table/$ at that position so that the given index is the leftmost one visible.",
248+
},
249+
"selection/": {
250+
read: {
251+
"1": "Remove a vector from the stack, then push two values representing the current selection in the $(l:items/splicing_table)$(item)Splicing Table/$ at that position.",
252+
"2": "If a range of iotas is selected, two numbers are pushed, representing the start (inclusive) and end (exclusive) of the selected range. If the edge between two iotas is selected, the index of the iota to the right of the selected edge is pushed, followed by $(l:casting/influences)$(thing)Null/$. And if nothing is selected, $(l:casting/influences)$(thing)Null/$ is pushed twice.",
253+
},
254+
write: "Remove a vector and two values from the stack, then set the selection of the $(l:items/splicing_table)$(item)Splicing Table/$ at that position as previously described.",
255+
},
256+
"clipboard/": {
257+
read: "Remove a vector from the stack, then copy the contents of the secondary item in the $(l:items/splicing_table)$(item)Splicing Table/$ at that position and push it to the stack.",
258+
write: "Remove a vector and iota from the stack, then save the iota into the secondary item in the $(l:items/splicing_table)$(item)Splicing Table/$ at that position.$(br)\
259+
As with $(l:patterns/readwrite_blocks#hexcasting:write/entity)$(action)Chronicler's Gambit/$, I cannot write my own Name using this spell.",
260+
readable: "Replace the vector at the top of the stack with True if there is a $(l:items/splicing_table)$(item)Splicing Table/$ at that position containing a secondary item that I could read, or False otherwise.",
261+
writable: "Replace the vector at the top of the stack with True if there is a $(l:items/splicing_table)$(item)Splicing Table/$ at that position containing a secondary item that I could save an iota into, or False otherwise.",
262+
},
263+
},
264+
},
223265
},
224266
},
225267
},

Common/src/main/resources/assets/hexdebug/lang/ru_ru.flatten.json5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,18 @@
152152
"3": "Я могу выделить йоты (или пространство между ними) простым нажатием мыши. Зажав $(k:sneak) и кликнув ещё раз я смогу выделить целый набор йот за раз.$(br2)\
153153
В дополнение к этому, есть специальные кнопки для выделения всего списка ($(thing)Выбрать Всё/$) и очищения выделения ($(thing)Убрать Выбор/$).$(br2)\
154154
Выделение йот позволяет мне раскрыть истинный потенциал $(l:items/splicing_table)$(item)Стола склейки/$: редактирование $(#b38ef3)Заговоров/$.",
155-
"4": "При $(l:items/splicing_table#cost)достатке мысли/$, я смогу исполнить следующие действия:\
155+
actions: "При $(l:items/splicing_table#cost)достатке мысли/$, я смогу исполнить следующие действия:\
156156
$(li)$(thing)Сдвинуть Влево/$: Переместить выделенные йоты на одну позицию влево.\
157157
$(li)$(thing)Сдвинуть Вправо/$: Переместить выделенные йоты на одну позицию вправо.\
158158
$(li)$(thing)Удалить/$: Удалить выделенные йоты из списка.\
159159
$(li)$(thing)Дублировать/$: Продублировать выделенные йоты.\
160160
$(li)$(thing)Отменить/$: Обратить последнее предпринятое действие.\
161161
$(li)$(thing)Вернуть/$: Вновь исполнить действие, обращённое $(thing)Отменой/$.",
162-
"5": "Для более продвинутых операций потребуется дополнительное пространство. Если я положу второстепенный предмет для хранения йот в ячейку слева, то смогу делать следующее:\
162+
secondary: "Для более продвинутых операций потребуется дополнительное пространство. Если я положу второстепенный предмет для хранения йот в ячейку слева, то смогу делать следующее:\
163163
$(li)$(thing)Копировать/$: Записать выделенные йоты в новый список в второстепенном предмете.\
164164
$(li)$(thing)Вырезать/$: То же, что и $(thing)Копировать/$, но при этом выделенные йоты исчезнут из оригинального списка.\
165165
$(li)$(thing)Вставить/$: Заменить выделенные йоты йотой второстепенного предмета. Если йотой был список, то вставится его содержимое; это поведение можно предотвратить, зажав $(k:sneak).",
166-
"6": "И наконец, я могу вставить $(l:items/staff)$(item)Посох/$ в левую нижнюю ячейку, чтобы проявить маленькую сетку заклятья. Руны, начерченные на этой сетке, попадают прямо в список, перезаписывая любые выделенные йоты.$(br2)\
166+
staff: "И наконец, я могу вставить $(l:items/staff)$(item)Посох/$ в левую нижнюю ячейку, чтобы проявить маленькую сетку заклятья. Руны, начерченные на этой сетке, попадают прямо в список, перезаписывая любые выделенные йоты.$(br2)\
167167
Есть ещё 6 ячеек справа для всего подряд. У них нет никакого специального функционала, кроме как хранилища; удобное место, чтобы сбросить лишние вещички.",
168168
cost: "К сожалению, всё это невероятное удобство имеет цену. Чтобы изменять содержимое предметов, мне требуется $(#74b3f2)мысль/$ - около одной десятой $(l:items/amethyst)$(item)Аметистовой пыли/$ на каждое действие.$(br2)\
169169
Я могу подавать $(#74b3f2)мысли/$ в $(l:items/splicing_table)$(item)Стол склейки/$, положив материалы в нижнюю правую ячейку. Стол за раз поглотит до десяти единиц $(l:items/amethyst)$(item)Аметистовой пыли/$; любые избытки будут игнорироваться, пока не смогут быть поглощены без лишней траты $(#74b3f2)мысли/$.",

0 commit comments

Comments
 (0)