From 1106aa9580717a159e8c69af9a11066fb3dda7bb Mon Sep 17 00:00:00 2001 From: way-zer Date: Mon, 19 Feb 2024 13:09:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96row=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cf/wayzer/contentsTweaker/resolvers/UIExtResolver.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/cf/wayzer/contentsTweaker/resolvers/UIExtResolver.kt b/src/main/kotlin/cf/wayzer/contentsTweaker/resolvers/UIExtResolver.kt index 5219cf8..4a4c385 100644 --- a/src/main/kotlin/cf/wayzer/contentsTweaker/resolvers/UIExtResolver.kt +++ b/src/main/kotlin/cf/wayzer/contentsTweaker/resolvers/UIExtResolver.kt @@ -118,7 +118,10 @@ object UIExtResolver : ContentsTweaker.NodeCollector { private fun CTNodeTypeChecked.extendTable() { val obj = objInfo.obj node.getOrCreate("cellDefaults") += CTNode.ObjInfo(obj.defaults()) - node.getOrCreate("row") += CTNode.Modifier { obj.row() } + node.getOrCreate("row") += CTNode.Modifier { + if (obj.cells.peek()?.isEndRow == false) + obj.row() + } node.getOrCreate("align") += CTNode.Modifier { val v = if (it.isNumber) it.asInt() else alignMap[it.asString()] ?: error("invalid align: $it") obj.align(v) From 39bfedd8bad4bf652ee241b6b5536ff3cef1e962 Mon Sep 17 00:00:00 2001 From: way-zer Date: Mon, 19 Feb 2024 13:30:45 +0800 Subject: [PATCH 2/2] fix UnlockableContent.Stats --- .../contentsTweaker/resolvers/MindustryContentsResolver.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/cf/wayzer/contentsTweaker/resolvers/MindustryContentsResolver.kt b/src/main/kotlin/cf/wayzer/contentsTweaker/resolvers/MindustryContentsResolver.kt index 33410f9..50dcce5 100644 --- a/src/main/kotlin/cf/wayzer/contentsTweaker/resolvers/MindustryContentsResolver.kt +++ b/src/main/kotlin/cf/wayzer/contentsTweaker/resolvers/MindustryContentsResolver.kt @@ -54,8 +54,9 @@ object MindustryContentsResolver : ContentsTweaker.NodeCollector { +CTNode.ObjInfo(it) +CTNode.AfterHandler { if (it is UnlockableContent) { - it.stats = Stats() - it.setStats() + it.stats = Stats().apply { + useCategories = it.stats.useCategories + } } if (it is Block) { it.barMap.clear()