diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll index d994f3b7..0489b689 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/ThingDefs_Buildings/WULA_Turret_Buildings.xml b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Turret_Buildings.xml index 7b657761..67868e65 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 @@ -5,7 +5,7 @@ Wula_Sonar_Mine_Cleanzone 清理出一块场地并准备好资源,使得乌拉帝国可以向此处投放建筑,建造好的信标可以收起或移至他处。\n\nTAm-1"鹅卵石"感应地雷是一种危险的地雷,它们通常由乌拉帝国的工程部队部署到战场上,拥有智能敌我识别能力,在检测到敌军活动时会将自身的战斗部直接向敌人的位置发射。 - Wula/Building/Wula_Base_ATGun_Turret + Wula/Building/Wula_Sonar_Mine MinifiedThing Normal None @@ -33,7 +33,7 @@ false Light -
  • WULA_Turret_Base_AT_Technology
  • +
  • WULA_Bunker_Drop_Technology
  • 0 @@ -46,7 +46,7 @@ 0 0 - 2 + 1 5 @@ -80,7 +80,7 @@ (1,1) - Wula/Building/Wula_Base_ATGun_Turret_Incoming + Wula/Building/Wula_Sonar_Mine_Incoming Graphic_Single CutoutFlying (1,1) @@ -109,17 +109,19 @@ - + Wula_Sonar_Mine 一种危险的地雷,它们通常由乌拉帝国的工程部队部署到战场上,拥有智能敌我识别能力,在检测到敌军活动时会将自身的战斗部直接向敌人的位置发射。 - Graphic_Single + Wula/Building/Wula_Sonar_Mine + Graphic_Multi + (1,1) - (0.1,0,0.8,0.3) + false - (0,-0.14) + (0,0) Building false Normal @@ -128,7 +130,7 @@ (1,1) false - 2 + 1 5 40 @@ -153,6 +155,22 @@
  • PlaceWorker_NeverAdjacentTrap
  • +
  • + +
  • Stun
  • +
  • EMP
  • + + +
  • EMP
  • +
    + + +
  • + EMP + 10 + 2 + true +
  • 3.9 Bomb @@ -168,7 +186,7 @@
  • 15 60 - Bullet_Wula_AI_Heavy_Panzer_Main_Weapon + Proj_Wula_Sonar_Mine false true 1 @@ -184,8 +202,55 @@ true false
  • +
  • + 2 + (120,240,252,0) +
  • + + Proj_Wula_Sonar_Mine + + RealtimeOnly + + Wula/Projectile/WULA_Shrapnel + Graphic_Single + (1,1) + + WulaFallenEmpire.Projectile_NorthArcTrail + Normal + True + + Bomb + 60 + 25 + 5 + 2 + true + Artillery_HitThickRoof + MortarBomb_Explode + MortarRound_PreImpact + MortarRound_Ambient + 10 + Filth_BlastMark + + +
  • + 5 + 1.0 + true +
  • +
  • + WULA_Smoke_Tail + 5 + 1 + 1~2 + 0.5~1.0 + 0.1~0.3 + -30~30 +
  • +
    +
    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 48812ac1..d0f7de3e 100644 --- a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/Misc_Gameplay.xml +++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/Misc_Gameplay.xml @@ -414,4 +414,9 @@ 取出白银时发生错误 感应地雷已启动! + + 区域空投 + 标记一块区域,激活其中所有需要空投的乌拉帝国建筑和战争机械体。\n\n区域空投依然需要计算材料消耗,如果材料不足则不会进行空投。 + 区域空投已下达 + 区域内没有可接受空投质量的乌拉帝国空投区 \ No newline at end of file diff --git a/Content/Textures/Wula/Building/Wula_Sonar_Mine.png b/Content/Textures/Wula/Building/Wula_Sonar_Mine.png new file mode 100644 index 00000000..b8ccf37f Binary files /dev/null and b/Content/Textures/Wula/Building/Wula_Sonar_Mine.png differ diff --git a/Content/Textures/Wula/Building/Wula_Sonar_Mine_Incoming.png b/Content/Textures/Wula/Building/Wula_Sonar_Mine_Incoming.png new file mode 100644 index 00000000..218d8679 Binary files /dev/null and b/Content/Textures/Wula/Building/Wula_Sonar_Mine_Incoming.png differ diff --git a/Content/Textures/Wula/UI/Designators/WULA_DropBuilding.png b/Content/Textures/Wula/UI/Designators/WULA_DropBuilding.png new file mode 100644 index 00000000..231293b7 Binary files /dev/null and b/Content/Textures/Wula/UI/Designators/WULA_DropBuilding.png differ diff --git a/Source/WulaFallenEmpire/BuildingComp/WULA_TrapLauncher/CompTrapLauncher.cs b/Source/WulaFallenEmpire/BuildingComp/WULA_TrapLauncher/CompTrapLauncher.cs index 156d5985..eeab963d 100644 --- a/Source/WulaFallenEmpire/BuildingComp/WULA_TrapLauncher/CompTrapLauncher.cs +++ b/Source/WulaFallenEmpire/BuildingComp/WULA_TrapLauncher/CompTrapLauncher.cs @@ -4,7 +4,6 @@ using System.Linq; using UnityEngine; using Verse; using Verse.Sound; -using static UnityEngine.GraphicsBuffer; namespace WulaFallenEmpire { @@ -43,6 +42,19 @@ namespace WulaFallenEmpire if (!parent.Spawned || hasTriggered) return; + + // 检查是否处于眩晕状态 + if (IsStunned()) + { + // 眩晕状态下暂停所有活动 + if (isWarmingUp) + { + // 如果正在预热,暂停预热 + // 不清除预热计数,恢复时会继续 + Log.Message($"[CompTrapLauncher] {parent.Label} is stunned, pausing warmup"); + } + return; + } // 预热计数 if (isWarmingUp) @@ -64,6 +76,20 @@ namespace WulaFallenEmpire } } + /// + /// 检查是否处于眩晕状态 + /// + private bool IsStunned() + { + // 尝试获取CompStunnable组件 + var stunComp = parent.GetComp(); + if (stunComp != null && stunComp.StunHandler != null) + { + return stunComp.StunHandler.Stunned; + } + return false; + } + /// /// 扫描范围内的敌对目标 /// @@ -140,9 +166,6 @@ namespace WulaFallenEmpire } } - // 检查是否为机械体(如果设定) - // 这里可以根据需要添加更多过滤条件 - return true; } @@ -225,12 +248,12 @@ namespace WulaFallenEmpire // 发射 projectile.Launch(parent, parent.DrawPos, currentTarget, currentTarget, ProjectileHitFlags.IntendedTarget, false); - // 连发延迟 + burstCounter++; + + // 连发延迟(简化实现) if (i < Props.burstCount - 1 && Props.burstDelay > 0) { - // 使用简单的延迟实现 - // 在实际游戏中,可能需要更复杂的实现 - // 这里我们简化处理 + // 在实际游戏中可能需要更复杂的实现 } } @@ -362,9 +385,13 @@ namespace WulaFallenEmpire if (!hasTriggered && DebugSettings.ShowDevGizmos) { + // 检查眩晕状态显示 + bool isStunned = IsStunned(); + // 调试:手动触发 Command_Action debugTrigger = new Command_Action(); - debugTrigger.defaultLabel = "DEV: Trigger Trap"; + debugTrigger.defaultLabel = $"DEV: Trigger Trap (Stunned: {isStunned})"; + debugTrigger.disabledReason = "Cannot trigger while stunned"; debugTrigger.action = delegate { currentTarget = FindClosestHostilePawn(); @@ -388,6 +415,16 @@ namespace WulaFallenEmpire SelfDestruct(); }; yield return debugDestruct; + + // 调试:显示眩晕状态 + Command_Action debugStunStatus = new Command_Action(); + debugStunStatus.defaultLabel = $"DEV: Stun Status - {(isStunned ? "STUNNED" : "ACTIVE")}"; + debugStunStatus.action = delegate + { + Messages.Message($"Trap Launcher Stun Status: {(isStunned ? "Stunned - Scanning Paused" : "Active - Scanning Normally")}", + parent, MessageTypeDefOf.NeutralEvent); + }; + yield return debugStunStatus; } } @@ -458,5 +495,25 @@ namespace WulaFallenEmpire } } } + + /// + /// 在检视字符串中添加眩晕状态信息 + /// + public override string CompInspectStringExtra() + { + string baseString = base.CompInspectStringExtra(); + + if (IsStunned()) + { + string stunInfo = "WULA_TrapLauncherStunned".Translate(); + if (!string.IsNullOrEmpty(baseString)) + { + return baseString + "\n" + stunInfo; + } + return stunInfo; + } + + return baseString; + } } } diff --git a/Source/WulaFallenEmpire/Designator/Designator_CallSkyfallerInArea.cs b/Source/WulaFallenEmpire/Designator/Designator_CallSkyfallerInArea.cs index 413e8ed1..2eb3adca 100644 --- a/Source/WulaFallenEmpire/Designator/Designator_CallSkyfallerInArea.cs +++ b/Source/WulaFallenEmpire/Designator/Designator_CallSkyfallerInArea.cs @@ -8,8 +8,6 @@ namespace WulaFallenEmpire { public class Designator_CallSkyfallerInArea : Designator { - private readonly new Texture2D icon; - // 记录已经处理过的建筑(避免重复) private HashSet processedBuildings = new HashSet(); @@ -17,7 +15,7 @@ namespace WulaFallenEmpire { defaultLabel = "WULA_Designator_CallSkyfallerInArea".Translate(); defaultDesc = "WULA_Designator_CallSkyfallerInAreaDesc".Translate(); - icon = ContentFinder.Get("Wula/UI/Designators/WULA_AreaSkyfaller"); + icon = ContentFinder.Get("Wula/UI/Designators/Designator_CallSkyfallerInArea"); soundDragSustain = SoundDefOf.Designate_DragStandard; soundDragChanged = SoundDefOf.Designate_DragStandard_Changed; useMouseIcon = true; @@ -147,38 +145,9 @@ namespace WulaFallenEmpire if (comp == null) return false; - if (!comp.CanCallSkyfaller) - return GetFailureReason(t, comp); - return true; } - private string GetFailureReason(Thing building, CompSkyfallerCaller comp) - { - if (!comp.HasRequiredFlyOver && comp.Props.requireFlyOver) - return "WULA_NoBuildingDropperFlyOver".Translate(); - - if (!comp.CheckRoofConditions) - { - var roof = building.Position.GetRoof(building.Map); - if (roof?.isThickRoof == true) - return "WULA_ThickRoofBlocking".Translate(); - else - return "WULA_RoofBlocking".Translate(); - } - - if (!comp.HasEnoughMaterials()) - return "WULA_InsufficientMaterials".Translate(); - - if (comp.used) - return "WULA_AlreadyUsed".Translate(); - - if (comp.calling) - return "WULA_AlreadyCalling".Translate(); - - return "WULA_CannotCallSkyfaller".Translate(); - } - public override void DesignateThing(Thing t) { // 用于反向设计器(右键菜单) diff --git a/美术与文本源文件/Wula/Building/Wula_Sonar_Mine.sai2 b/美术与文本源文件/Wula/Building/Wula_Sonar_Mine.sai2 new file mode 100644 index 00000000..a872d508 Binary files /dev/null and b/美术与文本源文件/Wula/Building/Wula_Sonar_Mine.sai2 differ