diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll
index 0489b689..b7f1f347 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/PrefabDefs/WULA_Prefabs.xml b/1.6/1.6/Defs/PrefabDefs/WULA_Prefabs.xml
index ddc8d1fd..1f8ded06 100644
--- a/1.6/1.6/Defs/PrefabDefs/WULA_Prefabs.xml
+++ b/1.6/1.6/Defs/PrefabDefs/WULA_Prefabs.xml
@@ -196,14 +196,6 @@
(7,11,7,11)
-
-
- (5,5,9,5)
- (5,6,5,9)
- (9,6,9,9)
- (6,9,8,9)
-
-
(1,1,5,1)
@@ -224,6 +216,22 @@
(10,13,12,13)
+
+
+ (5,5,9,5)
+ (5,6,5,9)
+ (9,6,9,9)
+ (6,9,8,9)
+
+
+
+
+ (0,0,0,0)
+ (14,0,14,0)
+ (0,14,0,14)
+ (14,14,14,14)
+
+
@@ -333,6 +341,34 @@
(14,19,14,19)
+
+
+ (7,1,11,1)
+ (13,1,17,1)
+ (7,2,7,2)
+ (11,2,11,2)
+ (13,2,13,2)
+ (17,2,17,2)
+ (1,7,2,7)
+ (22,7,23,7)
+ (1,8,1,11)
+ (23,8,23,11)
+ (2,11,2,11)
+ (22,11,22,11)
+ (1,13,2,13)
+ (22,13,23,13)
+ (1,14,1,17)
+ (23,14,23,17)
+ (2,17,2,17)
+ (22,17,22,17)
+ (7,22,7,23)
+ (11,22,11,23)
+ (13,22,13,23)
+ (17,22,17,23)
+ (8,23,10,23)
+ (14,23,16,23)
+
+
(3,3,7,3)
@@ -376,34 +412,22 @@
(12, 0, 12)
-
+
- (7,1,11,1)
- (13,1,17,1)
- (7,2,7,2)
- (11,2,11,2)
- (13,2,13,2)
- (17,2,17,2)
- (1,7,2,7)
- (22,7,23,7)
- (1,8,1,11)
- (23,8,23,11)
- (2,11,2,11)
- (22,11,22,11)
- (1,13,2,13)
- (22,13,23,13)
- (1,14,1,17)
- (23,14,23,17)
- (2,17,2,17)
- (22,17,22,17)
- (7,22,7,23)
- (11,22,11,23)
- (13,22,13,23)
- (17,22,17,23)
- (8,23,10,23)
- (14,23,16,23)
+ (2,2,2,2)
+ (22,2,22,2)
+ (11,3,11,3)
+ (13,3,13,3)
+ (3,11,3,11)
+ (21,11,21,11)
+ (3,13,3,13)
+ (21,13,21,13)
+ (11,21,11,21)
+ (13,21,13,21)
+ (2,22,2,22)
+ (22,22,22,22)
-
+
@@ -605,6 +629,66 @@
(35, 0, 40)
+
+
+ (0,0,3,0)
+ (40,0,43,0)
+ (0,1,0,3)
+ (6,1,14,1)
+ (29,1,37,1)
+ (43,1,43,3)
+ (6,2,6,3)
+ (14,2,14,3)
+ (29,2,29,3)
+ (37,2,37,3)
+ (17,3,20,3)
+ (23,3,26,3)
+ (17,4,17,6)
+ (26,4,26,6)
+ (1,6,3,6)
+ (15,6,16,6)
+ (27,6,28,6)
+ (40,6,42,6)
+ (1,7,1,14)
+ (42,7,42,14)
+ (2,14,3,14)
+ (40,14,41,14)
+ (6,15,6,18)
+ (37,15,37,17)
+ (38,17,40,17)
+ (3,18,5,18)
+ (40,18,40,20)
+ (3,19,3,21)
+ (3,23,3,26)
+ (40,23,40,26)
+ (4,26,6,26)
+ (37,26,39,26)
+ (6,27,6,28)
+ (37,27,37,28)
+ (1,29,3,29)
+ (40,29,42,29)
+ (1,30,1,37)
+ (42,30,42,37)
+ (2,37,3,37)
+ (15,37,17,37)
+ (26,37,28,37)
+ (40,37,41,37)
+ (17,38,17,40)
+ (26,38,26,40)
+ (0,40,0,43)
+ (6,40,6,42)
+ (14,40,14,42)
+ (18,40,20,40)
+ (23,40,25,40)
+ (29,40,29,42)
+ (37,40,37,42)
+ (43,40,43,43)
+ (7,42,13,42)
+ (30,42,36,42)
+ (1,43,3,43)
+ (40,43,42,43)
+
+
(6,6,14,6)
@@ -693,66 +777,26 @@
(26, 0, 26)
-
+
- (0,0,3,0)
- (40,0,43,0)
- (0,1,0,3)
- (6,1,14,1)
- (29,1,37,1)
- (43,1,43,3)
- (6,2,6,3)
- (14,2,14,3)
- (29,2,29,3)
- (37,2,37,3)
- (17,3,20,3)
- (23,3,26,3)
- (17,4,17,6)
- (26,4,26,6)
- (1,6,3,6)
- (15,6,16,6)
- (27,6,28,6)
- (40,6,42,6)
- (1,7,1,14)
- (42,7,42,14)
- (2,14,3,14)
- (40,14,41,14)
- (6,15,6,18)
- (37,15,37,17)
- (38,17,40,17)
- (3,18,5,18)
- (40,18,40,20)
- (3,19,3,21)
- (3,23,3,26)
- (40,23,40,26)
- (4,26,6,26)
- (37,26,39,26)
- (6,27,6,28)
- (37,27,37,28)
- (1,29,3,29)
- (40,29,42,29)
- (1,30,1,37)
- (42,30,42,37)
- (2,37,3,37)
- (15,37,17,37)
- (26,37,28,37)
- (40,37,41,37)
- (17,38,17,40)
- (26,38,26,40)
- (0,40,0,43)
- (6,40,6,42)
- (14,40,14,42)
- (18,40,20,40)
- (23,40,25,40)
- (29,40,29,42)
- (37,40,37,42)
- (43,40,43,43)
- (7,42,13,42)
- (30,42,36,42)
- (1,43,3,43)
- (40,43,42,43)
+ (10,2,10,2)
+ (33,2,33,2)
+ (16,5,16,5)
+ (27,5,27,5)
+ (2,10,2,10)
+ (41,10,41,10)
+ (38,16,38,16)
+ (5,17,5,17)
+ (5,27,5,27)
+ (38,27,38,27)
+ (2,33,2,33)
+ (41,33,41,33)
+ (16,38,16,38)
+ (27,38,27,38)
+ (10,41,10,41)
+ (33,41,33,41)
-
+
@@ -1235,75 +1279,102 @@
WULA_Progressive_Ship_Mini_Prefeb
- (13,11)
+ (13,13)
-
- (7, 0, 1)
- (7, 0, 9)
-
+ (8, 0, 6)
- (11, 0, 5)
- Clockwise
-
-
- (12,4,12,4)
- (12,6,12,6)
+ (8,3,8,3)
+ (8,9,8,9)
- Counterclockwise
-
+
- (10, 0, 1)
- (1, 0, 2)
- (1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(1,7,1,11)
+ (11,7,11,11)
+ (0,8,0,10)
+ (12,8,12,11)
+ (4,9,4,12)
+ (5,10,5,12)
diff --git a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Prefab_Beacons.xml b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Prefab_Beacons.xml
index e53e3246..84b81cea 100644
--- a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Prefab_Beacons.xml
+++ b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Prefab_Beacons.xml
@@ -790,7 +790,7 @@
Wula/Building/WULA_Dropping_Building_Cleanzone_Plus
Graphic_Multi
- (13,11)
+ (13,13)
false
@@ -819,7 +819,7 @@
1
0
- (13,11)
+ (13,13)
0
1
@@ -852,18 +852,18 @@
WULA_Progressive_Ship_Mini_Prefeb_Incoming
WulaFallenEmpire.Skyfaller_PrefabSpawner
- (13,11)
+ (13,13)
Wula/Building/WULA_Progressive_Ship_Mini_Prefeb_Incoming
Graphic_Single
CutoutFlying
- (14.75,11)
+ (14.85,13.35)
(-1,0,0)
Decelerate
Things/Skyfaller/SkyfallerShadowDropPod
- (13,11)
+ (13,13)
DropPod_Fall
100
Explosion_Vaporize
diff --git a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Machine_Weapon.xml b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Machine_Weapon.xml
index f8f71bb9..b3eddfe2 100644
--- a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Machine_Weapon.xml
+++ b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Machine_Weapon.xml
@@ -572,7 +572,7 @@
(2,2.5)
- Flame
+ Bomb
35
60
3.9
diff --git a/About/preview.png b/About/preview.png
index b901f17f..f1976179 100644
Binary files a/About/preview.png and b/About/preview.png differ
diff --git a/Content/Textures/Wula/Building/WULA_Progressive_Ship_Mini_Prefeb_Incoming.png b/Content/Textures/Wula/Building/WULA_Progressive_Ship_Mini_Prefeb_Incoming.png
index eff53ea7..9ccf753a 100644
Binary files a/Content/Textures/Wula/Building/WULA_Progressive_Ship_Mini_Prefeb_Incoming.png and b/Content/Textures/Wula/Building/WULA_Progressive_Ship_Mini_Prefeb_Incoming.png differ
diff --git a/Content/Textures/Wula/Building/Wula_Sonar_Mine.png b/Content/Textures/Wula/Building/Wula_Sonar_Mine.png
index b8ccf37f..90822dec 100644
Binary files a/Content/Textures/Wula/Building/Wula_Sonar_Mine.png and b/Content/Textures/Wula/Building/Wula_Sonar_Mine.png differ
diff --git a/Content/Textures/Wula/UI/Designators/WULA_DropBuilding.png b/Content/Textures/Wula/UI/Designators/Designator_CallSkyfallerInArea.png
similarity index 100%
rename from Content/Textures/Wula/UI/Designators/WULA_DropBuilding.png
rename to Content/Textures/Wula/UI/Designators/Designator_CallSkyfallerInArea.png
diff --git a/Source/WulaFallenEmpire/BuildingComp/WULA_StorageTurret/CompStorageTurret.cs b/Source/WulaFallenEmpire/BuildingComp/WULA_StorageTurret/CompStorageTurret.cs
index 6280eba1..51cfffb5 100644
--- a/Source/WulaFallenEmpire/BuildingComp/WULA_StorageTurret/CompStorageTurret.cs
+++ b/Source/WulaFallenEmpire/BuildingComp/WULA_StorageTurret/CompStorageTurret.cs
@@ -91,19 +91,44 @@ namespace WulaFallenEmpire
public override void PostExposeData()
{
base.PostExposeData();
- Scribe_Collections.Look(ref turrets, "turrets", LookMode.Deep);
- if (Scribe.mode == LoadSaveMode.PostLoadInit && turrets == null)
+ // 在保存和加载时重新建立 parent 引用
+ if (Scribe.mode == LoadSaveMode.Saving)
{
- turrets = new List();
+ Scribe_Collections.Look(ref turrets, "turrets", LookMode.Deep);
+ }
+ else if (Scribe.mode == LoadSaveMode.LoadingVars)
+ {
+ Scribe_Collections.Look(ref turrets, "turrets", LookMode.Deep);
+ }
+
+ if (Scribe.mode == LoadSaveMode.PostLoadInit)
+ {
+ if (turrets == null)
+ {
+ turrets = new List();
+ }
+ else
+ {
+ // 重新建立 parent 引用
+ for (int i = 0; i < turrets.Count; i++)
+ {
+ if (turrets[i] != null)
+ {
+ turrets[i].SetParent(this);
+ turrets[i].SetIndex(i);
+ }
+ }
+ }
+ UpdateTurrets();
}
}
// 单个炮塔实例类,实现 IAttackTargetSearcher 接口
public class TurretInstance : IExposable, IAttackTargetSearcher
{
- private CompStorageTurret parent;
- private int index;
+ private CompStorageTurret _parent;
+ private int _index;
// 炮塔状态
public Thing gun;
@@ -113,8 +138,12 @@ namespace WulaFallenEmpire
public float curRotation;
public Material turretMat;
+ // 安全访问器
+ public CompStorageTurret Parent => _parent;
+ public int Index => _index;
+
// IAttackTargetSearcher 接口实现
- public Thing Thing => parent.parent;
+ public Thing Thing => _parent?.parent;
public Verb CurrentEffectiveVerb => AttackVerb;
public LocalTargetInfo LastAttackedTarget => LocalTargetInfo.Invalid;
public int LastAttackTargetTick => -1;
@@ -126,7 +155,8 @@ namespace WulaFallenEmpire
{
get
{
- var compEq = gun?.TryGetComp();
+ if (gun == null) return null;
+ var compEq = gun.TryGetComp();
return compEq?.PrimaryVerb;
}
}
@@ -135,7 +165,10 @@ namespace WulaFallenEmpire
{
get
{
- if (!parent.parent.Spawned || parent.parent.Destroyed)
+ if (_parent == null || _parent.parent == null)
+ return false;
+
+ if (!_parent.parent.Spawned || _parent.parent.Destroyed)
return false;
if (AttackVerb == null)
@@ -161,32 +194,48 @@ namespace WulaFallenEmpire
}
}
+ // 无参构造函数用于序列化
public TurretInstance() { }
public TurretInstance(CompStorageTurret parent, int index)
{
- this.parent = parent;
- this.index = index;
+ SetParent(parent);
+ SetIndex(index);
MakeGun();
}
+ public void SetParent(CompStorageTurret parent)
+ {
+ _parent = parent;
+ }
+
+ public void SetIndex(int index)
+ {
+ _index = index;
+ }
+
private void MakeGun()
{
- gun = ThingMaker.MakeThing(parent.Props.turretDef, null);
+ if (_parent == null || _parent.Props == null || _parent.Props.turretDef == null)
+ return;
+
+ gun = ThingMaker.MakeThing(_parent.Props.turretDef, null);
UpdateGunVerbs();
}
private void UpdateGunVerbs()
{
+ if (gun == null) return;
+
var compEq = gun.TryGetComp();
if (compEq == null) return;
foreach (var verb in compEq.AllVerbs)
{
- verb.caster = parent.parent;
+ verb.caster = _parent?.parent;
verb.castCompleteCallback = () =>
{
- burstCooldownTicksLeft = AttackVerb.verbProps.defaultCooldownTime.SecondsToTicks();
+ burstCooldownTicksLeft = AttackVerb?.verbProps?.defaultCooldownTime.SecondsToTicks() ?? 0;
};
}
}
@@ -200,7 +249,7 @@ namespace WulaFallenEmpire
{
Vector3 targetPos = currentTarget.Cell.ToVector3Shifted();
Vector3 turretPos = GetTurretDrawPos();
- curRotation = (targetPos - turretPos).AngleFlat() + parent.Props.angleOffset;
+ curRotation = (targetPos - turretPos).AngleFlat() + _parent.Props.angleOffset;
}
AttackVerb.VerbTick();
@@ -222,7 +271,7 @@ namespace WulaFallenEmpire
burstCooldownTicksLeft--;
}
- if (burstCooldownTicksLeft <= 0 && parent.parent.IsHashIntervalTick(10))
+ if (burstCooldownTicksLeft <= 0 && _parent.parent.IsHashIntervalTick(10))
{
// 修复:将 this 作为 IAttackTargetSearcher 传递
currentTarget = (Thing)AttackTargetFinder.BestShootTargetFromCurrentPosition(
@@ -250,14 +299,19 @@ namespace WulaFallenEmpire
public void DrawTurret()
{
+ if (_parent == null || _parent.parent == null || !_parent.parent.Spawned)
+ return;
+
Vector3 drawPos = GetTurretDrawPos();
float angle = curRotation;
- if (turretMat == null)
+ if (turretMat == null && _parent.Props?.turretDef?.graphicData?.texPath != null)
{
- turretMat = MaterialPool.MatFrom(parent.Props.turretDef.graphicData.texPath);
+ turretMat = MaterialPool.MatFrom(_parent.Props.turretDef.graphicData.texPath);
}
+ if (turretMat == null) return;
+
Matrix4x4 matrix = default(Matrix4x4);
matrix.SetTRS(drawPos, Quaternion.AngleAxis(angle, Vector3.up), Vector3.one);
Graphics.DrawMesh(MeshPool.plane10, matrix, turretMat, 0);
@@ -265,9 +319,12 @@ namespace WulaFallenEmpire
private Vector3 GetTurretDrawPos()
{
+ if (_parent == null || _parent.parent == null)
+ return Vector3.zero;
+
// 计算炮塔位置(围绕建筑排列)
- float angle = 360f * index / parent.Props.maxTurrets;
- float radius = parent.Props.turretSpacing;
+ float angle = 360f * _index / _parent.Props.maxTurrets;
+ float radius = _parent.Props.turretSpacing;
Vector3 offset = new Vector3(
Mathf.Cos(angle * Mathf.Deg2Rad) * radius,
@@ -275,7 +332,7 @@ namespace WulaFallenEmpire
Mathf.Sin(angle * Mathf.Deg2Rad) * radius
);
- return parent.parent.DrawPos + offset + new Vector3(0, 0.5f, 0);
+ return _parent.parent.DrawPos + offset + new Vector3(0, 0.5f, 0);
}
public void ExposeData()
diff --git a/Source/WulaFallenEmpire/BuildingComp/WULA_TrapLauncher/CompTrapLauncher.cs b/Source/WulaFallenEmpire/BuildingComp/WULA_TrapLauncher/CompTrapLauncher.cs
index eeab963d..c730e29d 100644
--- a/Source/WulaFallenEmpire/BuildingComp/WULA_TrapLauncher/CompTrapLauncher.cs
+++ b/Source/WulaFallenEmpire/BuildingComp/WULA_TrapLauncher/CompTrapLauncher.cs
@@ -46,13 +46,6 @@ namespace WulaFallenEmpire
// 检查是否处于眩晕状态
if (IsStunned())
{
- // 眩晕状态下暂停所有活动
- if (isWarmingUp)
- {
- // 如果正在预热,暂停预热
- // 不清除预热计数,恢复时会继续
- Log.Message($"[CompTrapLauncher] {parent.Label} is stunned, pausing warmup");
- }
return;
}
@@ -495,25 +488,5 @@ 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/美术与文本源文件/Wula/Building/Wula_Sonar_Mine.sai2 b/美术与文本源文件/Wula/Building/Wula_Sonar_Mine.sai2
index a872d508..fe3fb8c2 100644
Binary files a/美术与文本源文件/Wula/Building/Wula_Sonar_Mine.sai2 and b/美术与文本源文件/Wula/Building/Wula_Sonar_Mine.sai2 differ
diff --git a/美术与文本源文件/Wula/Storyteller/军团/11.png b/美术与文本源文件/Wula/Storyteller/军团/11.png
new file mode 100644
index 00000000..78af1b7a
Binary files /dev/null and b/美术与文本源文件/Wula/Storyteller/军团/11.png differ
diff --git a/美术与文本源文件/Wula/Storyteller/军团/11bg.png b/美术与文本源文件/Wula/Storyteller/军团/11bg.png
new file mode 100644
index 00000000..e1193f69
Binary files /dev/null and b/美术与文本源文件/Wula/Storyteller/军团/11bg.png differ
diff --git a/美术与文本源文件/thumbnail.sai2 b/美术与文本源文件/thumbnail.sai2
index 09532b77..309bcdaa 100644
Binary files a/美术与文本源文件/thumbnail.sai2 and b/美术与文本源文件/thumbnail.sai2 differ