diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll index 69266928..122dd57b 100644 Binary files a/1.6/1.6/Assemblies/WulaFallenEmpire.dll and b/1.6/1.6/Assemblies/WulaFallenEmpire.dll differ diff --git a/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml b/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml new file mode 100644 index 00000000..df640178 --- /dev/null +++ b/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml @@ -0,0 +1,24 @@ + + + + Wula_UI_Legion_1 + + Wula/Events/Portraits/WULA_Legion_1 + 「军团」 + +
  • 这里是P.I.A,通讯信号良好,等待输入。
  • +
    + +
  • + + +
  • + +
  • + +
  • + + +
    +
    +
    diff --git a/1.6/1.6/Defs/StoryTellers/WULA_Storytellers.xml b/1.6/1.6/Defs/StoryTellers/WULA_Storytellers.xml index 22df6641..8e71fdc3 100644 --- a/1.6/1.6/Defs/StoryTellers/WULA_Storytellers.xml +++ b/1.6/1.6/Defs/StoryTellers/WULA_Storytellers.xml @@ -1,11 +1,11 @@  - WULA_Anisia - - 一位诞生于乌拉帝国黄金时代的合成人,是黄金时代禁忌科技的守密者。她在边缘世界一带强制唤醒了大量的旧时代乌拉帝国合成人,无人知晓她真正的目的。\n\n艾妮西娅喜欢大场面,因此她不会安排任何小型袭击,而是安排比其他叙事者所安排的大型袭击更加强大的袭击。不过,在两次袭击间她将安排充足的时间让殖民地进行发展,并让殖民者得到放松以充分消化战利品和修补战线。 - Wula/Storyteller/WULA_Anisia - Wula/Storyteller/WULA_Anisia_TINY + WULA_Legion + + 一个超级AI,负责控制调度乌拉帝国行星封锁机关P.I.A的舰队,是帝国开发署扩张领地的先锋。当帝国需要对一个星球进行控制和介入时,她会指挥庞大的先锋舰队攻占轨道,以不容置疑的实力向星球宣示帝国的权威。\n\n作为讲述者,她不会为你留下任何保护措施,所有的袭击和恶性事件从落地开始就有可能生成,并且袭击的频率要比常规情况下更高——尽管它们还是有周期规律的。 + Wula/Storyteller/WULA_Legion + Wula/Storyteller/WULA_Legion_TINY 20 @@ -13,9 +13,9 @@
  • ThreatBig - 15.0 + 0 2 - 9 + 5 0.25 2~3 @@ -23,11 +23,11 @@
  • Map_RaidBeacon
  • - +
  • Map_RaidBeacon
  • @@ -55,17 +55,17 @@
  • Map_PlayerHome
  • - 5 + 0 4.8
  • DiseaseHuman - 9 + 0
  • DiseaseAnimal - 9 + 0
  • @@ -170,7 +170,7 @@
  • World
  • - 15 + 0 15 @@ -180,11 +180,6 @@ 8 1 - -
  • - StrangerInBlackJoin - 180 -
  • \ No newline at end of file diff --git a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Drop_Buildings.xml b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Drop_Buildings.xml index f8a3bb77..b7786d18 100644 --- a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Drop_Buildings.xml +++ b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Drop_Buildings.xml @@ -831,7 +831,7 @@ - + WULA_WeaponArmor_Productor_Cleanzone @@ -988,9 +988,9 @@ false
  • - Wula_UI_Main_1 - - 无法接触通讯站。 + Wula_UI_Legion_1 + + 无法接触。
  • diff --git a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Remake_Weapon.xml b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Remake_Weapon.xml index 90954fd9..3181ff15 100644 --- a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Remake_Weapon.xml +++ b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Remake_Weapon.xml @@ -5,8 +5,9 @@ 包含了射击经验的自律核心数据包,可以被乌拉帝国拥有自律核心的武器吸收以提升其品质。 - Wula/Item/WULA_Dark_Matter_Item + Wula/Item/WULA_ExperienceDataPack Graphic_Single + 0.8 Never false @@ -35,8 +36,9 @@ 包含了近战经验的自律核心数据包,可以被乌拉帝国拥有自律核心的武器吸收以提升其品质。 - Wula/Item/WULA_Dark_Matter_Item + Wula/Item/WULA_ExperienceDataPack Graphic_Single + 0.8 Never false @@ -62,7 +64,7 @@ - +
  • @@ -428,7 +430,7 @@ - +
  • diff --git a/1.6/1.6/Defs/WulaMiscSettingDefs/EventUIConfig.xml b/1.6/1.6/Defs/WulaMiscSettingDefs/EventUIConfig.xml index de3811f9..88d27abe 100644 --- a/1.6/1.6/Defs/WulaMiscSettingDefs/EventUIConfig.xml +++ b/1.6/1.6/Defs/WulaMiscSettingDefs/EventUIConfig.xml @@ -6,22 +6,22 @@ Small - false + true false true - (500, 800) - (650, 130) - (650, 350) + (1093, 687) + (593, 530) + (593, 330) 750 0 0 - (750, 600) + (693, 887) (200, 50) diff --git a/Content/Textures/Wula/Building/WULA_Cube_Productor_BIO_east.png b/Content/Textures/Wula/Building/WULA_Cube_Productor_BIO_east.png deleted file mode 100644 index 8f1068e5..00000000 Binary files a/Content/Textures/Wula/Building/WULA_Cube_Productor_BIO_east.png and /dev/null differ diff --git a/Content/Textures/Wula/Building/WULA_Cube_Productor_BIO_north.png b/Content/Textures/Wula/Building/WULA_Cube_Productor_BIO_north.png deleted file mode 100644 index 8f1068e5..00000000 Binary files a/Content/Textures/Wula/Building/WULA_Cube_Productor_BIO_north.png and /dev/null differ diff --git a/Content/Textures/Wula/Building/WULA_Cube_Productor_Energy_east.png b/Content/Textures/Wula/Building/WULA_Cube_Productor_Energy_east.png deleted file mode 100644 index b9872a89..00000000 Binary files a/Content/Textures/Wula/Building/WULA_Cube_Productor_Energy_east.png and /dev/null differ diff --git a/Content/Textures/Wula/Building/WULA_Cube_Productor_Energy_north.png b/Content/Textures/Wula/Building/WULA_Cube_Productor_Energy_north.png deleted file mode 100644 index b9872a89..00000000 Binary files a/Content/Textures/Wula/Building/WULA_Cube_Productor_Energy_north.png and /dev/null differ diff --git a/Content/Textures/Wula/Building/WULA_Cube_Productor_Energy_south.png b/Content/Textures/Wula/Building/WULA_Cube_Productor_Energy_south.png deleted file mode 100644 index b9872a89..00000000 Binary files a/Content/Textures/Wula/Building/WULA_Cube_Productor_Energy_south.png and /dev/null differ diff --git a/Content/Textures/Wula/Building/WULA_Cube_Productor_east.png b/Content/Textures/Wula/Building/WULA_Cube_Productor_east.png new file mode 100644 index 00000000..5d1eb9ad Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_Cube_Productor_east.png differ diff --git a/Content/Textures/Wula/Building/WULA_Cube_Productor_north.png b/Content/Textures/Wula/Building/WULA_Cube_Productor_north.png new file mode 100644 index 00000000..5d1eb9ad Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_Cube_Productor_north.png differ diff --git a/Content/Textures/Wula/Building/WULA_Cube_Productor_south.png b/Content/Textures/Wula/Building/WULA_Cube_Productor_south.png new file mode 100644 index 00000000..5d1eb9ad Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_Cube_Productor_south.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png new file mode 100644 index 00000000..4893933c Binary files /dev/null and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png differ diff --git a/Content/Textures/Wula/Item/WULA_ExperienceDataPack.png b/Content/Textures/Wula/Item/WULA_ExperienceDataPack.png new file mode 100644 index 00000000..49c6f345 Binary files /dev/null and b/Content/Textures/Wula/Item/WULA_ExperienceDataPack.png differ diff --git a/Content/Textures/Wula/Storyteller/WULA_Legion.png b/Content/Textures/Wula/Storyteller/WULA_Legion.png new file mode 100644 index 00000000..328fe49f Binary files /dev/null and b/Content/Textures/Wula/Storyteller/WULA_Legion.png differ diff --git a/Content/Textures/Wula/Storyteller/WULA_Legion_TINY.png b/Content/Textures/Wula/Storyteller/WULA_Legion_TINY.png new file mode 100644 index 00000000..6f3f30dc Binary files /dev/null and b/Content/Textures/Wula/Storyteller/WULA_Legion_TINY.png differ diff --git a/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs b/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs index c7f41f87..0a660a56 100644 --- a/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs +++ b/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs @@ -103,11 +103,13 @@ namespace WulaFallenEmpire public override void DoWindowContents(Rect inRect) { + // 绘制背景 if (background != null) { GUI.DrawTexture(inRect, background, ScaleMode.ScaleToFit); } + // 调试信息(def名称) if (Config.showDefName) { Text.Font = GameFont.Tiny; @@ -116,34 +118,31 @@ namespace WulaFallenEmpire GUI.color = Color.white; } - if (Config.showLabel) - { - Text.Font = Config.labelFont; - Widgets.Label(new Rect(5, 20f, inRect.width - 10, 30f), def.label); - Text.Font = GameFont.Small; - } + // 使用新的布局参数 + float scale = CalculateScale(inRect); + + // 使用新的布局尺寸 + float scaledLihuiWidth = Config.newLayoutLihuiSize.x * scale; + float scaledLihuiHeight = Config.newLayoutLihuiSize.y * scale; + float scaledTextWidth = Config.newLayoutTextSize.x * scale; + float scaledTextHeight = Config.newLayoutTextSize.y * scale; + float scaledOptionsWidth = Config.newLayoutOptionsWidth * scale; - float virtualWidth = Config.lihuiSize.x + Config.textSize.x; - float virtualHeight = Config.lihuiSize.y; + // 计算各元素高度 + float labelHeight = 30f * scale; + float characterNameHeight = 25f * scale; + float descriptionHeight = scaledTextHeight; + float optionsHeight = CalculateOptionsHeight(def.options, scaledOptionsWidth, scale); - float scaleX = inRect.width / virtualWidth; - float scaleY = inRect.height / virtualHeight; - float scale = Mathf.Min(scaleX, scaleY) * 0.95f; + // 使用新的间距参数 + float topMargin = Config.newLayoutPadding * scale; + float elementSpacing = Config.newLayoutTextNameOffset * scale; + float textOptionsSpacing = Config.newLayoutOptionsTextOffset * scale; - float scaledLihuiWidth = Config.lihuiSize.x * scale; - float scaledLihuiHeight = Config.lihuiSize.y * scale; - float scaledNameWidth = Config.nameSize.x * scale; - float scaledNameHeight = Config.nameSize.y * scale; - float scaledTextWidth = Config.textSize.x * scale; - float scaledTextHeight = Config.textSize.y * scale; - float scaledOptionsWidth = Config.optionsWidth * scale; + float currentY = topMargin; - float totalContentWidth = scaledLihuiWidth + scaledTextWidth; - float totalContentHeight = scaledLihuiHeight; - float startX = (inRect.width - totalContentWidth) / 2; - float startY = (inRect.height - totalContentHeight) / 2; - - Rect lihuiRect = new Rect(startX, startY, scaledLihuiWidth, scaledLihuiHeight); + // 1. 立绘(水平居中,顶着顶部) + Rect lihuiRect = new Rect((inRect.width - scaledLihuiWidth) / 2, currentY, scaledLihuiWidth, scaledLihuiHeight); if (portrait != null) { GUI.DrawTexture(lihuiRect, portrait, ScaleMode.ScaleToFit); @@ -152,59 +151,146 @@ namespace WulaFallenEmpire { Widgets.DrawBox(lihuiRect); } + currentY += scaledLihuiHeight + elementSpacing; - Rect nameRect = new Rect(lihuiRect.xMax, lihuiRect.y, scaledNameWidth, scaledNameHeight); - if (Config.drawBorders) + // 2. Label(水平居中) + if (Config.showLabel) { - Widgets.DrawBox(nameRect); + Rect labelRect = new Rect(0, currentY, inRect.width, labelHeight); + Text.Anchor = TextAnchor.MiddleCenter; + Text.Font = Config.labelFont; + Widgets.Label(labelRect, def.label); + Text.Font = GameFont.Small; + Text.Anchor = TextAnchor.UpperLeft; + + if (Config.drawBorders) + { + Widgets.DrawBox(labelRect); + } + currentY += labelHeight + elementSpacing; } + + // 3. CharacterName(水平居中) + Rect nameRect = new Rect(0, currentY, inRect.width, characterNameHeight); Text.Anchor = TextAnchor.MiddleCenter; Text.Font = GameFont.Medium; Widgets.Label(nameRect, def.characterName); Text.Font = GameFont.Small; Text.Anchor = TextAnchor.UpperLeft; + + if (Config.drawBorders) + { + Widgets.DrawBox(nameRect); + } + currentY += characterNameHeight + elementSpacing; - Rect textRect = new Rect(nameRect.x, nameRect.yMax + Config.textNameOffset * scale, scaledTextWidth, scaledTextHeight); + // 4. Descriptions(水平居中) + Rect textRect = new Rect((inRect.width - scaledTextWidth) / 2, currentY, scaledTextWidth, descriptionHeight); if (Config.drawBorders) { Widgets.DrawBox(textRect); } - Rect textInnerRect = textRect.ContractedBy(10f * scale); - Widgets.Label(textInnerRect, selectedDescription); - - Rect optionRect = new Rect(nameRect.x, textRect.yMax + Config.optionsTextOffset * scale, scaledOptionsWidth, lihuiRect.height - nameRect.height - textRect.height - (Config.textNameOffset + Config.optionsTextOffset) * scale); - Listing_Standard listing = new Listing_Standard(); - listing.Begin(optionRect.ContractedBy(10f * scale)); - if (def.options != null) - { - foreach (var option in def.options) - { - string reason; - bool conditionsMet = AreConditionsMet(option.conditions, out reason); + // 增加内边距 + float textInnerPadding = 15f * scale; + Rect textInnerRect = textRect.ContractedBy(textInnerPadding); + Widgets.LabelScrollable(textInnerRect, selectedDescription, ref scrollPosition); + + currentY += descriptionHeight + textOptionsSpacing; - if (conditionsMet) + // 5. Options(水平居中) + Rect optionRect = new Rect((inRect.width - scaledOptionsWidth) / 2, currentY, scaledOptionsWidth, optionsHeight); + if (Config.drawBorders) + { + Widgets.DrawBox(optionRect); + } + + // 增加内边距 + float optionsInnerPadding = 10f * scale; + DrawOptions(optionRect.ContractedBy(optionsInnerPadding), def.options, scale); + } + + // 计算缩放比例 - 使用新的布局参数 + private float CalculateScale(Rect inRect) + { + float virtualWidth = Mathf.Max( + Config.newLayoutLihuiSize.x, + Config.newLayoutTextSize.x, + Config.newLayoutOptionsWidth + ); + float scaleX = inRect.width / virtualWidth; + return Mathf.Min(scaleX, 1.0f) * 0.85f; // 稍微减少缩放以留出更多边距 + } + + // 计算选项区域高度 + private float CalculateOptionsHeight(List options, float optionsWidth, float scale) + { + if (options == null || options.Count == 0) + return 0f; + + float totalHeight = 0f; + var eventVarManager = Find.World.GetComponent(); + + foreach (var option in options) + { + string reason; + bool conditionsMet = AreConditionsMet(option.conditions, out reason); + + if (!conditionsMet && option.hideWhenDisabled) + { + continue; + } + + // 增加选项高度和间距 + totalHeight += 35f * scale; // 每个选项高度 + totalHeight += 8f * scale; // 选项间距 + } + + return totalHeight; + } + + // 绘制选项 + private void DrawOptions(Rect rect, List options, float scale) + { + if (options == null || options.Count == 0) + return; + + Listing_Standard listing = new Listing_Standard(); + listing.Begin(rect); + + // 增加选项之间的间距 + listing.verticalSpacing = 8f * scale; + + foreach (var option in options) + { + string reason; + bool conditionsMet = AreConditionsMet(option.conditions, out reason); + + if (conditionsMet) + { + if (listing.ButtonText(option.label)) { - if (listing.ButtonText(option.label)) - { - HandleAction(option.optionEffects); - } - } - else - { - if (option.hideWhenDisabled) - { - continue; - } - Rect rect = listing.GetRect(30f); - Widgets.ButtonText(rect, option.label, false, true, false); - TooltipHandler.TipRegion(rect, GetDisabledReason(option, reason)); + HandleAction(option.optionEffects); } } + else + { + if (option.hideWhenDisabled) + { + continue; + } + Rect buttonRect = listing.GetRect(35f * scale); // 增加按钮高度 + Widgets.ButtonText(buttonRect, option.label, false, true, false); + TooltipHandler.TipRegion(buttonRect, GetDisabledReason(option, reason)); + } } + listing.End(); } + // 滚动位置用于描述文本 + private Vector2 scrollPosition = Vector2.zero; + private void HandleAction(List conditionalEffects) { if (conditionalEffects.NullOrEmpty()) @@ -258,16 +344,14 @@ namespace WulaFallenEmpire private string FormatDescription(string description) { var eventVarManager = Find.World.GetComponent(); - // Use regex to find all placeholders like {variableName} return Regex.Replace(description, @"\{(.+?)\}", match => { string varName = match.Groups[1].Value; if (eventVarManager.HasVariable(varName)) { - // Important: GetVariable to get any type return eventVarManager.GetVariable(varName)?.ToString() ?? ""; } - return match.Value; // Keep placeholder if variable not found + return match.Value; }); } } diff --git a/美术与文本源文件/Wula/Building/WULA_Cube_Productor.sai2 b/美术与文本源文件/Wula/Building/WULA_Cube_Productor.sai2 new file mode 100644 index 00000000..b5db82c8 Binary files /dev/null and b/美术与文本源文件/Wula/Building/WULA_Cube_Productor.sai2 differ diff --git a/美术与文本源文件/Wula/Building/WULA_Cube_Productor_BIO.sai2 b/美术与文本源文件/Wula/Building/WULA_Cube_Productor_BIO.sai2 deleted file mode 100644 index ffcaacba..00000000 Binary files a/美术与文本源文件/Wula/Building/WULA_Cube_Productor_BIO.sai2 and /dev/null differ diff --git a/美术与文本源文件/Wula/Building/WULA_Cube_Productor_Component.sai2 b/美术与文本源文件/Wula/Building/WULA_Cube_Productor_Component.sai2 deleted file mode 100644 index 240a30c4..00000000 Binary files a/美术与文本源文件/Wula/Building/WULA_Cube_Productor_Component.sai2 and /dev/null differ diff --git a/美术与文本源文件/Wula/Building/WULA_Nourishment_Center_Unit.sai2 b/美术与文本源文件/Wula/Building/WULA_Nourishment_Center_Unit.sai2 deleted file mode 100644 index 2562834d..00000000 Binary files a/美术与文本源文件/Wula/Building/WULA_Nourishment_Center_Unit.sai2 and /dev/null differ diff --git a/美术与文本源文件/Wula/Item/WULA_ExperienceDataPack.sai2 b/美术与文本源文件/Wula/Item/WULA_ExperienceDataPack.sai2 new file mode 100644 index 00000000..3f81862b Binary files /dev/null and b/美术与文本源文件/Wula/Item/WULA_ExperienceDataPack.sai2 differ diff --git a/美术与文本源文件/Wula/Item/WULA_MechRepairKit.sai2 b/美术与文本源文件/Wula/Item/WULA_MechRepairKit.sai2 deleted file mode 100644 index 07f12cd8..00000000 Binary files a/美术与文本源文件/Wula/Item/WULA_MechRepairKit.sai2 and /dev/null differ diff --git a/美术与文本源文件/Wula/UI/EventUI/新建画布2.png b/美术与文本源文件/Wula/UI/EventUI/新建画布2.png new file mode 100644 index 00000000..60026fff Binary files /dev/null and b/美术与文本源文件/Wula/UI/EventUI/新建画布2.png differ diff --git a/美术与文本源文件/Wula/UI/EventUI/新建画布2.sai2 b/美术与文本源文件/Wula/UI/EventUI/新建画布2.sai2 index 0f5624fa..7a64aadd 100644 Binary files a/美术与文本源文件/Wula/UI/EventUI/新建画布2.sai2 and b/美术与文本源文件/Wula/UI/EventUI/新建画布2.sai2 differ diff --git a/美术与文本源文件/Wula/UI/EventUI/新建画布22.png b/美术与文本源文件/Wula/UI/EventUI/新建画布22.png new file mode 100644 index 00000000..f30b6a5d Binary files /dev/null and b/美术与文本源文件/Wula/UI/EventUI/新建画布22.png differ