repo for my hex addons :3
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

move docs

+69 -58
+51 -48
build.gradle.kts
··· 84 84 85 85 mixin.useLegacyMixinAp = false 86 86 } 87 + 88 + tasks.processResources { 89 + val bookRoot = destinationDir.resolve("assets/hexcasting/patchouli_books/thehexbook") 90 + val langRoot = destinationDir.resolve("assets/$modid/lang") 91 + 92 + doLast { 93 + for (lang in bookRoot.list()) { 94 + val langFile = langRoot.resolve("$lang.json") 95 + if (langFile.exists()) { 96 + val entries = JsonSlurper().parseText(langFile.readText()) as MutableMap<String, String> 97 + var n = 0 98 + for (bookFile in bookRoot.resolve(lang).walkTopDown()) { 99 + if (bookFile.isFile) { 100 + val json = JsonSlurper().parseText(bookFile.readText()) 101 + if (json !is Map<*, *>) continue 102 + json as MutableMap<Any, Any> 103 + val name = json["name"] 104 + if (name is String) { 105 + entries["text.$modid.book.${n}"] = name 106 + json["name"] = "text.$modid.book.${n}" 107 + n++ 108 + } 109 + val pages = json["pages"] 110 + if (pages !is MutableList<*>) continue 111 + pages as MutableList<Any> 112 + for (i in pages.indices) { 113 + val page = pages[i] 114 + if (page is String) { 115 + entries["text.$modid.book.${n}"] = page 116 + pages[i] = "text.$modid.book.${n}" 117 + n++ 118 + } else if (page is MutableMap<*, *>) { 119 + page as MutableMap<Any, Any> 120 + for (key in listOf("text", "title", "header")) { 121 + val text = page[key] 122 + if (text != null && text is String) { 123 + entries["text.$modid.book.${n}"] = text 124 + page[key] = "text.$modid.book.${n}" 125 + n++ 126 + } 127 + } 128 + } 129 + } 130 + bookFile.writeText(JsonOutput.toJson(json)) 131 + } 132 + } 133 + langFile.writeText(JsonOutput.toJson(entries)) 134 + } 135 + } 136 + } 137 + } 87 138 } 88 139 println("configured $project: release=$release, configured version: $version ($group)") 89 140 } ··· 381 432 dependsOn(cloth) 382 433 dependsOn(*downloadedBags.values.toTypedArray()) 383 434 val itemsRoot = destinationDir.resolve("assets/hexic/textures/item") 384 - val langRoot = destinationDir.resolve("assets/hexic/lang") 385 - val bookRoot = destinationDir.resolve("assets/hexcasting/patchouli_books/thehexbook") 386 435 doLast { 387 436 for ((name, color) in colors) { 388 437 exec { ··· 444 493 //file("$itemsRoot/stringworm.miff").delete() 445 494 exec { 446 495 commandLine("env", "magick", "https://www.masterbuilt.com/cdn/shop/articles/162_20-_20Voodoo_20Baked_20Beans.jpg", "-sample", "256x256", itemsRoot.resolve("beans.png")) 447 - } 448 - } 449 - 450 - doLast { 451 - for (lang in bookRoot.list()) { 452 - val langFile = langRoot.resolve("$lang.json") 453 - if (langFile.exists()) { 454 - val entries = JsonSlurper().parseText(langFile.readText()) as MutableMap<String, String> 455 - var n = 0 456 - for (bookFile in bookRoot.resolve(lang).walkTopDown()) { 457 - if (bookFile.isFile) { 458 - val json = JsonSlurper().parseText(bookFile.readText()) 459 - if (json !is Map<*, *>) continue 460 - json as MutableMap<Any, Any> 461 - val name = json["name"] 462 - if (name is String) { 463 - entries["text.hexic.book.${n}"] = name 464 - json["name"] = "text.hexic.book.${n}" 465 - n++ 466 - } 467 - val pages = json["pages"] 468 - if (pages !is MutableList<*>) continue 469 - pages as MutableList<Any> 470 - for (i in pages.indices) { 471 - val page = pages[i] 472 - if (page is String) { 473 - entries["text.hexic.book.${n}"] = page 474 - pages[i] = "text.hexic.book.${n}" 475 - n++ 476 - } else if (page is MutableMap<*, *>) { 477 - page as MutableMap<Any, Any> 478 - for (key in listOf("text", "title", "header")) { 479 - val text = page[key] 480 - if (text != null && text is String) { 481 - entries["text.hexic.book.${n}"] = text 482 - page[key] = "text.hexic.book.${n}" 483 - n++ 484 - } 485 - } 486 - } 487 - } 488 - bookFile.writeText(JsonOutput.toJson(json)) 489 - } 490 - } 491 - langFile.writeText(JsonOutput.toJson(entries)) 492 - } 493 496 } 494 497 } 495 498
+3
project/iotaworks/src/main/resources/assets/iotaworks/lang/en_us.json
··· 1 + { 2 + "hexcasting.action.iotaworks:metatable": "Patchwork Exaltation" 3 + }
+3
project/iotaworks/src/main/resources/assets/iotaworks/lang/zh_cn.json
··· 1 + { 2 + "hexcasting.action.iotaworks:metatable": "修补之提整" 3 + }
-2
src/client/scala/org/eu/net/pool/hexic/client/main.scala
··· 328 328 "deleteworld" -> "Shatter Demiplane", 329 329 "drop" -> "Rejection Distillation", 330 330 "dye_offhand" -> "Apply Pigment", 331 - "empty_map" -> "Vacant Reflection: Map", 332 331 "erase" -> "Erase Block", 333 332 "extract" -> "Excisor's Gambit", 334 333 "fox" -> "Vulpine Gambit", ··· 342 341 "make_cme" -> "Thoth's Pseudogambit", 343 342 "makeworld" -> "Conjure Demiplane", 344 343 "malloc" -> "Allocator's Purification", 345 - "metatable" -> "Patchwork Exaltation", 346 344 "modulo" -> "Modulus Distillation II", 347 345 "murmur" -> "Murmur Reflection", 348 346 "nbt/deserialize" -> "Importer's Purification",
+2 -2
src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/addon/hexic/maps.json util/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/addon/phlib/maps.json
··· 7 7 "Maps are an efficient structure holding pairings of some iota to some other iota. While this is perfectly possible using merely list operations, dedicated map iotas use some arcane substance called a '$(thing)Hash/$'. While this doesn't reduce the $(o)operations/$ required to access a map, it desperately reduces the load on Nature, nearing O(1) for most access.", 8 8 { 9 9 "type": "hexcasting:pattern", 10 - "op_id": "hexic:empty_map", 11 - "anchor": "hexic:empty_map", 10 + "op_id": "phlib:empty_map", 11 + "anchor": "phlib:empty_map", 12 12 "input": "", 13 13 "output": "map<⊥, ⊥>", 14 14 "text": "Creates a new empty map for my usage."
+4 -4
src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/addon/hexic/metatables.json project/iotaworks/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/addon/iotaworks/metatables.json
··· 6 6 "pages": [ 7 7 "I've discovered a way to create a new type of iota — an abhorrence against Nature of my own doing. This pattern weaves a 'sheath' of _media out of some iota, letting me customize several attributes of the new iota. Though this can make my spells more expressive, this ability is not to be taken lightly — I cannot imagine the mischief others would do with these 'patchwork' iotas.", 8 8 "To assemble a patchwork iota, I must provide four source iotas:$(br)$(li)The 'userdata' iota, passed to my overload _Hexes.$(li)The 'display' iota, visible to my eyes.$(li)A color for the iota, as an RGB vector in the 0-1 range.$(li)A pointer to an $(thing)overload map./$", 9 - "Such an 'overload map' is merely a regular $(l:addon/hexic/maps)$(thing)Map/$ iota (mapping patterns to the _Hexes they should be replaced with), but stored within a $(l:properties)$(thing)Property/$. I assume that Nature's reason for boxing like this is to save space: it's likely I'll have many patched iotas all using the same overloads. This also gives me the convenience of updating every instance with merely $(l:properties#hexcellular:set_property)$(action)Schrödinger's Gambit/$, rather than finding and updating them all by hand.", 9 + "Such an 'overload map' is merely a regular $(l:addon/phlib/maps)$(thing)Map/$ iota (mapping patterns to the _Hexes they should be replaced with), but stored within a $(l:properties)$(thing)Property/$. I assume that Nature's reason for boxing like this is to save space: it's likely I'll have many patched iotas all using the same overloads. This also gives me the convenience of updating every instance with merely $(l:properties#hexcellular:set_property)$(action)Schrödinger's Gambit/$, rather than finding and updating them all by hand.", 10 10 { 11 11 "type": "hexcasting:pattern", 12 - "anchor": "hexic:metatable", 13 - "op_id": "hexic:metatable", 12 + "anchor": "iotaworks:metatable", 13 + "op_id": "iotaworks:metatable", 14 14 "input": "iota, iota, vec, property", 15 15 "output": "patchwork", 16 16 "text": "$(br)Constructs a Patchwork iota from the userdata (iota stored inside), display iota (visible to my eyes), color, and an overload map." ··· 28 28 { 29 29 "type": "patchouli:text", 30 30 "flag": "mod:hexdoc", 31 - "text": "These $(thing)overload maps/$ resemble a technique I've seen before — the concept of redefining patterns on a fundamental level resembles the moon cultists' (little time to explain) $(l:https://www.lua.org/pil/13.html)metatables/$, which allow associating a table with another table to redefine its operations. When my 'metamethods' are invoked, the userdata iota is pushed to the top of the stack. All other information about the patchwork disintegrates: I'll need to recreate it from scratch (maybe I should use a 'constructor' macro?) if I want to return a new iota of the same type." 31 + "text": "These $(thing)overload maps/$ resemble a technique I've heard of before — the concept of redefining patterns on a fundamental level resembles the moon cultists' (little time to explain) $(l:https://www.lua.org/pil/13.html)metatables/$, which allow associating a table with another table to redefine its operations. When my 'metamethods' are invoked, the userdata iota is pushed to the top of the stack. All other information about the patchwork disintegrates: I'll need to recreate it from scratch (maybe I should use a 'constructor' macro?) if I want to return a new iota of the same type." 32 32 }, 33 33 { 34 34 "type": "patchouli:text",
src/main/resources/assets/hexcasting/patchouli_books/thehexbook/zh_cn/entries/addon/hexic/maps.json util/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/zh_cn/entries/addon/phlib/maps.json
src/main/resources/assets/hexcasting/patchouli_books/thehexbook/zh_cn/entries/addon/hexic/metatables.json project/iotawokrssrc/main/resources/assets/hexcasting/patchouli_books/thehexbook/zh_cn/entries/addon/iotaworks/metatables.json
-2
src/main/resources/assets/hexic/lang/zh_cn.json
··· 6 6 "book.hexic.page.murmur": "将$(o)在我嘴边/$的话语压入栈中,后续是否要说出不影响结果。", 7 7 "hexcasting.action.hexic:drop": "拒斥之馏化", 8 8 "hexcasting.action.hexic:dye_offhand": "应用染色剂", 9 - "hexcasting.action.hexic:empty_map": "空无之精思:映射", 10 9 "hexcasting.action.hexic:erase": "清除方块", 11 10 "hexcasting.action.hexic:extract": "切除器之策略", 12 11 "hexcasting.action.hexic:fox": "狐狸之策略", ··· 18 17 "hexcasting.action.hexic:jvm/newinstance_boxed": "构造器之纯化,第一型", 19 18 "hexcasting.action.hexic:jvm/newinstance_unboxed": "构造器之纯化,第二型", 20 19 "hexcasting.action.hexic:malloc": "分配器之纯化", 21 - "hexcasting.action.hexic:metatable": "修补之提整", 22 20 "hexcasting.action.hexic:modulo": "余数之馏化,第二型", 23 21 "hexcasting.action.hexic:murmur": "私语之精思", 24 22 "hexcasting.action.hexic:nbt/deserialize": "导入器之纯化",
+3
util/src/main/resources/assets/phlib/lang/en_us.json
··· 1 + { 2 + "hexcasting.action.phlib:empty_map": "Vacant Reflection: Map" 3 + }
+3
util/src/main/resources/assets/phlib/lang/zh_cn.json
··· 1 + { 2 + "hexcasting.action.phlib:empty_map": "空无之精思:映射" 3 + }