diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll index 6f03769a..dac2bf68 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/BodyAndPartDefs/Bodyparts_WULA.xml b/1.6/1.6/Defs/BodyAndPartDefs/Bodyparts_WULA.xml index 5bec28f3..f0873acb 100644 --- a/1.6/1.6/Defs/BodyAndPartDefs/Bodyparts_WULA.xml +++ b/1.6/1.6/Defs/BodyAndPartDefs/Bodyparts_WULA.xml @@ -100,14 +100,13 @@ WULA_Mobile_Bunker_Bodypart - + 250 0 false 1 0 - false WULA_Shield_Field_Maintainer_Bodypart 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 index a8153791..3afa2c7c 100644 --- a/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml +++ b/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml @@ -1078,6 +1078,7 @@ Wula/Events/Portraits/WULA_Legion_1 「军团」,P.I.A +
  • 要找活吗?
  • diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Attack_Robber_Camp.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Attack_Robber_Camp.xml index f97b9cdb..1dcee4f5 100644 --- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Attack_Robber_Camp.xml +++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Attack_Robber_Camp.xml @@ -38,7 +38,6 @@
  • siteFaction true - $asker true
  • diff --git a/1.6/1.6/Defs/ResearchProjectDefs/WULA_ResearchProjects_Remake.xml b/1.6/1.6/Defs/ResearchProjectDefs/WULA_ResearchProjects_Remake.xml index 2853448e..8e31c337 100644 --- a/1.6/1.6/Defs/ResearchProjectDefs/WULA_ResearchProjects_Remake.xml +++ b/1.6/1.6/Defs/ResearchProjectDefs/WULA_ResearchProjects_Remake.xml @@ -673,7 +673,7 @@ WULA_Building_Teleporter_Technology 10.00 - 2.70 + 3.80 允许通过传送将乌拉帝国的建筑直接传送到空投区,这使得建筑可以立刻部署到目标地点,且无视厚岩顶阻挡。 2000 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 ac5acc06..3a708dd6 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 @@ -73,7 +73,7 @@
  • WulaWall - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -258,7 +258,7 @@
  • WulaDoor - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -429,7 +429,7 @@
  • BuildingsMisc
  • - Wula/Building/Linked/WulaWall/WulaWall_Atlas + Wula/Building/Linked/WulaShelter/WulaShelter_Atlas Graphic_Multi (1,1) (73,185,254,155) @@ -485,7 +485,7 @@
  • WulaShelter - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -660,7 +660,7 @@
  • WULA_MaintenancePod - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -865,7 +865,7 @@
  • WULA_WeaponArmor_Productor - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -1468,7 +1468,7 @@
  • WULA_Machine_Recharger - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -1646,7 +1646,7 @@
  • WULA_Charging_Station_Synth - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -1819,7 +1819,7 @@
  • WULA_Cube_Productor - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -2014,7 +2014,7 @@
  • Wula_DarkEnergy_Generators - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -2224,7 +2224,7 @@
  • Wula_Fusion_Generators - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true diff --git a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Turret_Buildings.xml b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Turret_Buildings.xml index 6da19eac..65614cf2 100644 --- a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Turret_Buildings.xml +++ b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Turret_Buildings.xml @@ -75,7 +75,7 @@
  • Wula_Sonar_Mine - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -338,7 +338,7 @@
  • WULA_Cat_Bunker - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -606,7 +606,7 @@
  • Wula_Base_ATGun_Turret - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -907,7 +907,7 @@
  • Wula_Base_Laser_Turret - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true @@ -1210,7 +1210,7 @@
  • Wula_Base_Mortar_Turret - true + false WULA_Psi_Skip_Entry VoidStructure_Emerge true diff --git a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/Misc_Gameplay.xml b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/Misc_Gameplay.xml index d0f7de3e..9e03dd64 100644 --- a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/Misc_Gameplay.xml +++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/Misc_Gameplay.xml @@ -74,6 +74,30 @@ 需要拥有-建筑空投设施-的战舰部署在殖民地轨道上才能空投 没有拥有-建筑空投设施-的战舰部署在殖民地轨道上 + + + 从全局储存器中呼叫的建筑将在{0}后到达 + 呼叫的建筑将在{0}后到达 + 需要研究:{0} + 需要建筑投放飞行器在区域上空 + + + 厚重的屋顶阻挡了建筑投放 + 屋顶阻挡了建筑投放 + + + 取消建筑呼叫 + 取消正在呼叫的建筑投放 + 传送建筑 + 使用乌拉帝国的传送网络,将{0}传送到指定位置——这是空投建筑的替代品,可以在厚岩顶下完成建造,并且响应速度更快。 + 非玩家派系无法手动呼叫建筑 + 需要研究:{0} + 自动建筑将在{0}后到达 + 从全局储存器呼叫的建筑将在{0}后到达 + 建筑将在{0}后到达 + 自动建筑准备就绪 + 准备呼叫{0} + 准备召唤空投建筑 召唤空投建筑 @@ -418,5 +442,5 @@ 区域空投 标记一块区域,激活其中所有需要空投的乌拉帝国建筑和战争机械体。\n\n区域空投依然需要计算材料消耗,如果材料不足则不会进行空投。 区域空投已下达 - 区域内没有可接受空投质量的乌拉帝国空投区 + 区域内没有可接受空投指令的乌拉帝国空投区 \ No newline at end of file diff --git a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_northeast.png b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_northeast.png index 81d91b01..93dc1a3d 100644 Binary files a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_northeast.png and b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_northeast.png differ diff --git a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_northwest.png b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_northwest.png index c116c3c4..93dc1a3d 100644 Binary files a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_northwest.png and b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_northwest.png differ diff --git a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_southeast.png b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_southeast.png index 6cf513ec..93dc1a3d 100644 Binary files a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_southeast.png and b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_southeast.png differ diff --git a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_southwest.png b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_southwest.png index 5440d590..93dc1a3d 100644 Binary files a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_southwest.png and b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_Partial_southwest.png differ diff --git a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_northeast.png b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_northeast.png index 405a32c5..d06ff006 100644 Binary files a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_northeast.png and b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_northeast.png differ diff --git a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_northwest.png b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_northwest.png index a2f46c2b..92cd34e3 100644 Binary files a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_northwest.png and b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_northwest.png differ diff --git a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_southeast.png b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_southeast.png index f47b5f3c..573f9d96 100644 Binary files a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_southeast.png and b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_southeast.png differ diff --git a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_southwest.png b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_southwest.png index 48cdb8dc..74f4cf3b 100644 Binary files a/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_southwest.png and b/Content/Textures/Wula/Building/Linked/WulaWall/AngledWulaWall_southwest.png differ diff --git a/Content/Textures/Wula/Building/Linked/WulaWall/WulaWall_Atlas.png b/Content/Textures/Wula/Building/Linked/WulaWall/WulaWall_Atlas.png index edfe0f84..f1604478 100644 Binary files a/Content/Textures/Wula/Building/Linked/WulaWall/WulaWall_Atlas.png and b/Content/Textures/Wula/Building/Linked/WulaWall/WulaWall_Atlas.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png index 84d0fea6..5559f27d 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_2.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_2.png index 04773493..0539bc64 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_2.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_2.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_3.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_3.png index 52cd241f..971c8664 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_3.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_3.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_4.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_4.png index 64b83596..56fee43f 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_4.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_4.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_5.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_5.png index 8e70e6db..88ecc292 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_5.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_5.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_6.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_6.png index fa8510f4..626d6a10 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_6.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_6.png differ diff --git a/Content/Textures/Wula/UI/Commands/WULA_TeleportBuilding.png b/Content/Textures/Wula/UI/Commands/WULA_TeleportBuilding.png new file mode 100644 index 00000000..91da2aec Binary files /dev/null and b/Content/Textures/Wula/UI/Commands/WULA_TeleportBuilding.png differ diff --git a/Source/WulaFallenEmpire/BuildingComp/WULA_BuildingSpawner/CompBuildingSpawner.cs b/Source/WulaFallenEmpire/BuildingComp/WULA_BuildingSpawner/CompBuildingSpawner.cs index b10e7221..480ed182 100644 --- a/Source/WulaFallenEmpire/BuildingComp/WULA_BuildingSpawner/CompBuildingSpawner.cs +++ b/Source/WulaFallenEmpire/BuildingComp/WULA_BuildingSpawner/CompBuildingSpawner.cs @@ -79,8 +79,6 @@ namespace WulaFallenEmpire } } - Log.Message($"[BuildingSpawner] Found {allFlyOvers.Count} FlyOvers on map"); - foreach (var thing in allFlyOvers) { if (thing is FlyOver flyOver && !flyOver.Destroyed) @@ -94,13 +92,11 @@ namespace WulaFallenEmpire if (facilitiesComp.HasFacility("BuildingdropperFacility")) { - Log.Message($"[BuildingSpawner] Found valid FlyOver at {flyOver.Position} with BuildingdropperFacility"); return true; } } } - Log.Message("[BuildingSpawner] No FlyOver with BuildingdropperFacility found"); return false; } catch (System.Exception ex) @@ -146,8 +142,6 @@ namespace WulaFallenEmpire autoCallScheduled = true; callTick = Find.TickManager.TicksGame + Props.autoCallDelayTicks; calling = true; - - Log.Message($"[BuildingSpawner] Scheduled auto-call for non-player building {parent.Label} at tick {callTick}"); } } @@ -195,8 +189,6 @@ namespace WulaFallenEmpire { try { - Log.Message($"[BuildingSpawner] Executing auto building spawn for non-player building at {parent.Position}"); - if (Props.buildingToSpawn == null) { Log.Error("[BuildingSpawner] Building def is null!"); @@ -246,10 +238,6 @@ namespace WulaFallenEmpire // 重置状态 ResetCall(); autoCallScheduled = false; - - // 显示消息 - Messages.Message("WULA_AutoBuildingSpawned".Translate(Props.buildingToSpawn.label, parent.Faction.Name), - MessageTypeDefOf.NeutralEvent); } catch (System.Exception ex) { @@ -264,7 +252,6 @@ namespace WulaFallenEmpire // 非玩家派系不能手动呼叫 if (IsNonPlayerFaction && !isAutoCall) { - Messages.Message("WULA_NonPlayerCannotCall".Translate(), parent, MessageTypeDefOf.RejectInput); return; } @@ -274,8 +261,6 @@ namespace WulaFallenEmpire return; } - Log.Message($"[BuildingSpawner] Starting building spawn from {parent.Label} at {parent.Position}"); - calling = true; used = true; int delay = isAutoCall ? Props.autoCallDelayTicks : Props.delayTicks; @@ -329,8 +314,6 @@ namespace WulaFallenEmpire // 执行建筑生成 protected virtual void ExecuteBuildingSpawn() { - Log.Message($"[BuildingSpawner] Executing building spawn at {parent.Position}"); - if (Props.buildingToSpawn == null) { Log.Error("[BuildingSpawner] Building def is null!"); @@ -341,7 +324,6 @@ namespace WulaFallenEmpire var resourceCheck = CheckAndConsumeMaterials(); if (!resourceCheck.HasEnoughMaterials) { - Log.Message($"[BuildingSpawner] Aborting building spawn due to insufficient materials."); ResetCall(); return; } @@ -426,7 +408,6 @@ namespace WulaFallenEmpire if (roof != null && !roof.isThickRoof && Props.allowThinRoof) { - Log.Message($"[BuildingSpawner] Destroying thin roof at {targetPos}"); parent.Map.roofGrid.SetRoof(targetPos, null); // 生成屋顶破坏效果 @@ -510,9 +491,6 @@ namespace WulaFallenEmpire powerComp.PowerOn = true; } } - - // 记录日志 - Log.Message($"[BuildingSpawner] Successfully spawned {Props.buildingToSpawn.label} at {newBuilding.Position}"); } // 资源管理(与SkyfallerCaller类似) @@ -824,7 +802,6 @@ namespace WulaFallenEmpire callTick = -1; usedGlobalStorage = false; autoCallScheduled = false; - Messages.Message("WULA_BuildingCallCancelled".Translate(), parent, MessageTypeDefOf.NeutralEvent); } public override IEnumerable CompGetGizmosExtra() @@ -853,9 +830,9 @@ namespace WulaFallenEmpire string reason = GetDisabledReason(); Command_Action callCommand = new Command_Action { - defaultLabel = "WULA_CallBuilding".Translate(), + defaultLabel = "WULA_TeleportBuilding".Translate(), defaultDesc = GetCallDescription(), - icon = ContentFinder.Get("Wula/UI/Commands/WULA_SpawnBuilding"), + icon = ContentFinder.Get("Wula/UI/Commands/WULA_TeleportBuilding"), action = () => CallBuilding(false), disabledReason = reason }; @@ -904,7 +881,7 @@ namespace WulaFallenEmpire private string GetCallDescription() { var sb = new StringBuilder(); - sb.Append("WULA_CallBuildingDesc".Translate(Props.buildingToSpawn.label)); + sb.Append("WULA_TeleportBuildingDesc".Translate(Props.buildingToSpawn.label)); if (Props.requiredResearch != null) { @@ -932,117 +909,7 @@ namespace WulaFallenEmpire } } - string costString = GetCostString(); - if (!string.IsNullOrEmpty(costString)) - { - sb.AppendLine().AppendLine().Append("WULA_RequiredMaterials".Translate()); - sb.Append(costString); - } - return sb.ToString(); } - - // 获取成本字符串 - private string GetCostString() - { - var costList = CostList; - if (costList.NullOrEmpty()) - { - return ""; - } - - var sb = new StringBuilder(); - foreach (var cost in costList) - { - sb.AppendLine($" - {cost.thingDef.LabelCap}: {cost.count}"); - } - return sb.ToString(); - } - - // 检查字符串 - public override string CompInspectStringExtra() - { - if (parent?.Map == null) - { - return base.CompInspectStringExtra(); - } - - var sb = new StringBuilder(); - - // 显示自动呼叫状态 - if (autoCallScheduled && calling) - { - int ticksLeft = callTick - Find.TickManager.TicksGame; - sb.Append("WULA_AutoBuildingArrivingIn".Translate(ticksLeft.ToStringTicksToPeriod())); - } - else if (calling) - { - int ticksLeft = callTick - Find.TickManager.TicksGame; - if (ticksLeft > 0) - { - string messageKey = usedGlobalStorage ? - "WULA_BuildingArrivingInFromGlobal" : - "WULA_BuildingArrivingIn"; - sb.Append(messageKey.Translate(ticksLeft.ToStringTicksToPeriod())); - } - } - else if (!used) - { - if (IsNonPlayerFaction && Props.canAutoCall) - { - sb.Append("WULA_AutoBuildingReady".Translate()); - } - else - { - sb.Append("WULA_ReadyToCallBuilding".Translate(Props.buildingToSpawn.label)); - } - - // 显示科技需求 - if (Props.requiredResearch != null && !HasRequiredResearch) - { - sb.AppendLine().Append("WULA_MissingResearch".Translate(Props.requiredResearch.label)); - } - - // 显示FlyOver需求 - if (Props.requireFlyOver && !HasRequiredFlyOver) - { - sb.AppendLine().Append("WULA_MissingBuildingDropperFlyOver".Translate()); - } - - // 显示屋顶状态 - RoofDef roof = parent.Position.GetRoof(parent.Map); - if (roof != null) - { - if (roof.isThickRoof && !Props.allowThickRoof) - { - sb.AppendLine().Append("WULA_BlockedByThickRoof".Translate()); - } - else if (!roof.isThickRoof && !Props.allowThinRoof) - { - sb.AppendLine().Append("WULA_BlockedByRoof".Translate()); - } - } - - // 显示成本 - string costString = GetCostString(); - if (!string.IsNullOrEmpty(costString)) - { - sb.AppendLine().AppendLine("WULA_RequiredMaterials".Translate()); - sb.Append(costString); - } - } - - string baseInspectString = base.CompInspectStringExtra(); - if (!string.IsNullOrEmpty(baseInspectString)) - { - if (sb.Length > 0) - { - sb.AppendLine(); - } - sb.Append(baseInspectString); - } - - return sb.Length > 0 ? sb.ToString().TrimEnd() : null; - } } } diff --git a/Source/WulaFallenEmpire/Designator/Designator_CallSkyfallerInArea.cs b/Source/WulaFallenEmpire/Designator/Designator_CallSkyfallerInArea.cs index 0dd231e0..52da07b1 100644 --- a/Source/WulaFallenEmpire/Designator/Designator_CallSkyfallerInArea.cs +++ b/Source/WulaFallenEmpire/Designator/Designator_CallSkyfallerInArea.cs @@ -10,22 +10,18 @@ namespace WulaFallenEmpire { // 记录已经处理过的建筑(避免重复) private HashSet processedBuildings = new HashSet(); - - // 组件类型过滤 - public bool includeBuildingSpawner = true; - public bool includeSkyfallerCaller = true; - + public Designator_CallSkyfallerInArea() { - defaultLabel = "WULA_Designator_CallInArea".Translate(); - defaultDesc = "WULA_Designator_CallInAreaDesc".Translate(); - icon = ContentFinder.Get("Wula/UI/Designators/Designator_CallInArea"); + defaultLabel = "WULA_Designator_CallSkyfallerInArea".Translate(); + defaultDesc = "WULA_Designator_CallSkyfallerInAreaDesc".Translate(); + icon = ContentFinder.Get("Wula/UI/Designators/Designator_CallSkyfallerInArea"); soundDragSustain = SoundDefOf.Designate_DragStandard; soundDragChanged = SoundDefOf.Designate_DragStandard_Changed; useMouseIcon = true; soundSucceeded = SoundDefOf.Designate_Claim; hotKey = KeyBindingDefOf.Misc12; - tutorTag = "CallInArea"; + tutorTag = "CallSkyfallerInArea"; } public override DrawStyleCategoryDef DrawStyleCategory => DrawStyleCategoryDefOf.FilledRectangle; @@ -39,13 +35,13 @@ namespace WulaFallenEmpire if (c.Fogged(Map)) return false; - // 检查单元格内是否有符合条件的玩家建筑 + // 只要单元格内有玩家建筑,就允许选择 var things = Map.thingGrid.ThingsListAt(c); foreach (var thing in things) { if (thing.def.category == ThingCategory.Building && thing.Faction == Faction.OfPlayer && - HasValidComponent(thing)) + thing.TryGetComp() != null) { return true; } @@ -54,28 +50,6 @@ namespace WulaFallenEmpire // 即使单元格内没有符合条件的建筑,也允许选择(这样用户可以拖动区域) return true; } - - // 检查建筑是否有有效的组件 - private bool HasValidComponent(Thing thing) - { - // 检查 Building Spawner 组件 - if (includeBuildingSpawner) - { - var buildingSpawner = thing.TryGetComp(); - if (buildingSpawner != null && buildingSpawner.CanCallBuilding) - return true; - } - - // 检查 Skyfaller Caller 组件 - if (includeSkyfallerCaller) - { - var skyfallerCaller = thing.TryGetComp(); - if (skyfallerCaller != null && skyfallerCaller.CanCallSkyfaller) - return true; - } - - return false; - } public override void DesignateSingleCell(IntVec3 c) { @@ -89,53 +63,32 @@ namespace WulaFallenEmpire processedBuildings.Clear(); int totalBuildings = 0; - int buildingSpawnerCount = 0; - int skyfallerCallerCount = 0; + + // 处理所有选中的单元格 foreach (var cell in cells) { if (cell.InBounds(Map)) { + // 统计该单元格处理的建筑数量 int cellCount = processedBuildings.Count; ProcessCell(cell); int newBuildings = processedBuildings.Count - cellCount; - - // 统计每个组件类型的调用数量 - foreach (var building in processedBuildings) - { - if (building.Destroyed) continue; - - if (building.TryGetComp()?.calling == true) - buildingSpawnerCount++; - else if (building.TryGetComp()?.calling == true) - skyfallerCallerCount++; - } - totalBuildings += newBuildings; } } - // 显示结果消息 + // 计算成功和失败的数量 + // 这里需要跟踪每个建筑的调用结果 + // 由于我们直接调用CallSkyfaller,需要知道哪些失败了 + // 简化处理:在ProcessCell中统计 + + // 显示简单的结果消息 if (totalBuildings > 0) { - string message = "WULA_AreaCallInitiated".Translate(totalBuildings); - - if (buildingSpawnerCount > 0 && skyfallerCallerCount > 0) - { - message += "\n" + "WULA_BothComponentsCalled".Translate( - buildingSpawnerCount, skyfallerCallerCount); - } - else if (buildingSpawnerCount > 0) - { - message += "\n" + "WULA_BuildingSpawnerCalled".Translate(buildingSpawnerCount); - } - else if (skyfallerCallerCount > 0) - { - message += "\n" + "WULA_SkyfallerCallerCalled".Translate(skyfallerCallerCount); - } - - Messages.Message(message, MessageTypeDefOf.PositiveEvent); + Messages.Message("WULA_AreaCallInitiated".Translate(totalBuildings), + MessageTypeDefOf.PositiveEvent); } else { @@ -162,44 +115,21 @@ namespace WulaFallenEmpire if (processedBuildings.Contains(thing)) continue; - // 标记为已处理 - processedBuildings.Add(thing); + // 获取空投组件 + var comp = thing.TryGetComp(); + if (comp == null) + continue; - // 尝试调用两种组件(如果有且可以调用) - bool anyCalled = false; - - // 1. 先尝试 Building Spawner - if (includeBuildingSpawner) + // 尝试呼叫空投 + if (comp.CanCallSkyfaller) { - var buildingSpawner = thing.TryGetComp(); - if (buildingSpawner != null && buildingSpawner.CanCallBuilding) - { - buildingSpawner.CallBuilding(false); - anyCalled = true; - - // 如果建筑被销毁,记录日志 - if (thing.Destroyed) - { - Log.Message($"[Designator] Building destroyed after BuildingSpawner call at {cell}"); - } - } + comp.CallSkyfaller(false); + processedBuildings.Add(thing); } - - // 2. 尝试 Skyfaller Caller(如果建筑还存在) - if (!thing.Destroyed && includeSkyfallerCaller) + // 即使不能呼叫,也添加到已处理列表,避免重复尝试 + else { - var skyfallerCaller = thing.TryGetComp(); - if (skyfallerCaller != null && skyfallerCaller.CanCallSkyfaller) - { - skyfallerCaller.CallSkyfaller(false); - anyCalled = true; - } - } - - // 如果没有任何组件被调用,从处理列表中移除(防止重复尝试) - if (!anyCalled) - { - processedBuildings.Remove(thing); + processedBuildings.Add(thing); } } } @@ -213,43 +143,20 @@ namespace WulaFallenEmpire if (t.Faction != Faction.OfPlayer) return false; - return HasValidComponent(t); + var comp = t.TryGetComp(); + if (comp == null) + return false; + + return true; } public override void DesignateThing(Thing t) { // 用于反向设计器(右键菜单) - processedBuildings.Add(t); - - // 尝试调用两种组件 - bool anyCalled = false; - - // 1. 先尝试 Building Spawner - if (includeBuildingSpawner) + var comp = t.TryGetComp(); + if (comp != null && comp.CanCallSkyfaller) { - var buildingSpawner = t.TryGetComp(); - if (buildingSpawner != null && buildingSpawner.CanCallBuilding) - { - buildingSpawner.CallBuilding(false); - anyCalled = true; - } - } - - // 2. 尝试 Skyfaller Caller(如果建筑还存在) - if (!t.Destroyed && includeSkyfallerCaller) - { - var skyfallerCaller = t.TryGetComp(); - if (skyfallerCaller != null && skyfallerCaller.CanCallSkyfaller) - { - skyfallerCaller.CallSkyfaller(false); - anyCalled = true; - } - } - - if (!anyCalled) - { - Messages.Message("WULA_NoComponentCanCall".Translate(), - t, MessageTypeDefOf.RejectInput); + comp.CallSkyfaller(false); } } @@ -257,32 +164,6 @@ namespace WulaFallenEmpire { // 参考Designator_Deconstruct,只绘制鼠标悬停方框 GenUI.RenderMouseoverBracket(); - - // 可以添加额外的视觉效果来显示哪些建筑将被影响 - if (Find.DesignatorManager.SelectedDesignator == this) - { - DrawAffectedBuildings(); } } - - // 绘制受影响的建筑 - private void DrawAffectedBuildings() - { - if (Map == null) return; - - // 这里可以绘制高亮显示哪些建筑会被影响 - // 但由于性能考虑,只在特定条件下绘制 - if (DebugSettings.godMode) - { - foreach (var building in Map.listerBuildings.allBuildingsColonist) - { - if (HasValidComponent(building)) - { - GenDraw.DrawFieldEdges(new List { building.Position }, - building.Destroyed ? Color.red : Color.green); - } - } - } - } - } -} +} \ No newline at end of file diff --git a/Source/WulaFallenEmpire/SectionLayer_WulaHull.cs b/Source/WulaFallenEmpire/SectionLayer_WulaHull.cs index d927ad21..de0e7d30 100644 --- a/Source/WulaFallenEmpire/SectionLayer_WulaHull.cs +++ b/Source/WulaFallenEmpire/SectionLayer_WulaHull.cs @@ -164,12 +164,24 @@ namespace WulaFallenEmpire private static void AddQuad(LayerSubMesh sm, Vector3 c, float scale, float altitude, Color color) { int count = sm.verts.Count; + + // 添加微小的UV偏移来避免单像素黑边 + const float uvOffset = 0.001f; + Vector2[] adjustedUVs = new Vector2[] + { + new Vector2(uvOffset, uvOffset), + new Vector2(uvOffset, 1f - uvOffset), + new Vector2(1f - uvOffset, 1f - uvOffset), + new Vector2(1f - uvOffset, uvOffset) + }; + for (int i = 0; i < 4; i++) { sm.verts.Add(new Vector3(c.x + UVs[i].x * scale, altitude, c.z + UVs[i].y * scale)); - sm.uvs.Add(UVs[i % 4]); + sm.uvs.Add(adjustedUVs[i]); // 使用调整后的UV坐标 sm.colors.Add(color); } + sm.tris.Add(count); sm.tris.Add(count + 1); sm.tris.Add(count + 2); @@ -178,6 +190,7 @@ namespace WulaFallenEmpire sm.tris.Add(count + 3); } + private static bool IsCornerIndoorMasked(IntVec3 c, CornerType cornerType, Map map) { switch (cornerType) diff --git a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj index 6259969a..e9d336e7 100644 --- a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj +++ b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj @@ -269,6 +269,7 @@ + diff --git a/美术与文本源文件/Wula/Building/Linked/WulaWall/AngledWulaWall_northwest.sai2 b/美术与文本源文件/Wula/Building/Linked/WulaWall/AngledWulaWall_northwest.sai2 index 733f1900..f2c87e3b 100644 Binary files a/美术与文本源文件/Wula/Building/Linked/WulaWall/AngledWulaWall_northwest.sai2 and b/美术与文本源文件/Wula/Building/Linked/WulaWall/AngledWulaWall_northwest.sai2 differ diff --git a/美术与文本源文件/Wula/Building/Linked/WulaWall/WULA_Fortress_Wall_Smooth.sai2 b/美术与文本源文件/Wula/Building/Linked/WulaWall/WULA_Fortress_Wall_Smooth.sai2 index 04e00b11..68cb5c56 100644 Binary files a/美术与文本源文件/Wula/Building/Linked/WulaWall/WULA_Fortress_Wall_Smooth.sai2 and b/美术与文本源文件/Wula/Building/Linked/WulaWall/WULA_Fortress_Wall_Smooth.sai2 differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/1.png b/美术与文本源文件/Wula/Storyteller/军团/1.png index 997b05ac..5b9b7ed1 100644 Binary files a/美术与文本源文件/Wula/Storyteller/军团/1.png and b/美术与文本源文件/Wula/Storyteller/军团/1.png differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/11.png b/美术与文本源文件/Wula/Storyteller/军团/11.png deleted file mode 100644 index d4c83573..00000000 Binary files a/美术与文本源文件/Wula/Storyteller/军团/11.png and /dev/null differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/112.png b/美术与文本源文件/Wula/Storyteller/军团/112.png deleted file mode 100644 index 480e6c83..00000000 Binary files a/美术与文本源文件/Wula/Storyteller/军团/112.png and /dev/null differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/2.png b/美术与文本源文件/Wula/Storyteller/军团/2.png index d6720f7d..7120fa56 100644 Binary files a/美术与文本源文件/Wula/Storyteller/军团/2.png and b/美术与文本源文件/Wula/Storyteller/军团/2.png differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/22.png b/美术与文本源文件/Wula/Storyteller/军团/22.png deleted file mode 100644 index 66ffedb4..00000000 Binary files a/美术与文本源文件/Wula/Storyteller/军团/22.png and /dev/null differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/3.png b/美术与文本源文件/Wula/Storyteller/军团/3.png index 5c7e0d9e..a025492f 100644 Binary files a/美术与文本源文件/Wula/Storyteller/军团/3.png and b/美术与文本源文件/Wula/Storyteller/军团/3.png differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/33.png b/美术与文本源文件/Wula/Storyteller/军团/33.png deleted file mode 100644 index bc0e3d13..00000000 Binary files a/美术与文本源文件/Wula/Storyteller/军团/33.png and /dev/null differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/4.png b/美术与文本源文件/Wula/Storyteller/军团/4.png index 3f7b625e..aec23259 100644 Binary files a/美术与文本源文件/Wula/Storyteller/军团/4.png and b/美术与文本源文件/Wula/Storyteller/军团/4.png differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/44.png b/美术与文本源文件/Wula/Storyteller/军团/44.png deleted file mode 100644 index 7ee2b3ad..00000000 Binary files a/美术与文本源文件/Wula/Storyteller/军团/44.png and /dev/null differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/5.png b/美术与文本源文件/Wula/Storyteller/军团/5.png index 84ad896d..86d0a3ca 100644 Binary files a/美术与文本源文件/Wula/Storyteller/军团/5.png and b/美术与文本源文件/Wula/Storyteller/军团/5.png differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/55.png b/美术与文本源文件/Wula/Storyteller/军团/55.png deleted file mode 100644 index e8e5ae1c..00000000 Binary files a/美术与文本源文件/Wula/Storyteller/军团/55.png and /dev/null differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/6.png b/美术与文本源文件/Wula/Storyteller/军团/6.png index f7e1ac2f..8b4956ba 100644 Binary files a/美术与文本源文件/Wula/Storyteller/军团/6.png and b/美术与文本源文件/Wula/Storyteller/军团/6.png differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/66.png b/美术与文本源文件/Wula/Storyteller/军团/66.png deleted file mode 100644 index d2af2cd4..00000000 Binary files a/美术与文本源文件/Wula/Storyteller/军团/66.png and /dev/null differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_1.sai2 b/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_1.sai2 index cf0dc34c..c3bd563c 100644 Binary files a/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_1.sai2 and b/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_1.sai2 differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/泳装.sai2 b/美术与文本源文件/Wula/Storyteller/军团/泳装.sai2 index 6fa5d7d0..16c87e9d 100644 Binary files a/美术与文本源文件/Wula/Storyteller/军团/泳装.sai2 and b/美术与文本源文件/Wula/Storyteller/军团/泳装.sai2 differ diff --git a/美术与文本源文件/Wula/UI/Commands/WULA_BunkerCat.png b/美术与文本源文件/Wula/UI/Commands/WULA_BunkerCat.png deleted file mode 100644 index 63528ebc..00000000 Binary files a/美术与文本源文件/Wula/UI/Commands/WULA_BunkerCat.png and /dev/null differ diff --git a/美术与文本源文件/Wula/UI/Commands/WULA_TeleportBuilding.sai2 b/美术与文本源文件/Wula/UI/Commands/WULA_TeleportBuilding.sai2 new file mode 100644 index 00000000..7f132e66 Binary files /dev/null and b/美术与文本源文件/Wula/UI/Commands/WULA_TeleportBuilding.sai2 differ