diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll
index 14a8dfcb..3cde5078 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
index 8180761b..85704ade 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
@@ -1269,7 +1269,7 @@
4000
Wula_PIA_Legion_Faction
ImmediateAttackFriendly
- EdgeDropGroups
+ WULA_EdgeTeleport
Combat
@@ -1295,7 +1295,7 @@
4000
Wula_PIA_Legion_Faction
ImmediateAttackFriendly
- EdgeDropGroups
+ WULA_EdgeTeleport
Combat
@@ -1321,7 +1321,7 @@
1000
Wula_PIA_Legion_Faction
ImmediateAttackFriendly
- EdgeDropGroups
+ WULA_EdgeTeleport
Combat
@@ -1345,9 +1345,9 @@
6000
- Empire
+ Wula_Progressive_Faction
ImmediateAttack
- EdgeDropGroups
+ WULA_EdgeTeleport
Combat
@@ -1371,9 +1371,9 @@
6000
- Empire
+ Wula_Progressive_Faction
ImmediateAttack
- EdgeDropGroups
+ WULA_EdgeTeleport
Combat
@@ -1397,9 +1397,9 @@
3000
- Empire
+ Wula_Progressive_Faction
ImmediateAttack
- EdgeDropGroups
+ WULA_EdgeTeleport
Combat
diff --git a/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml b/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml
index 9009a3bd..77949207 100644
--- a/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml
+++ b/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml
@@ -42,14 +42,16 @@
Wula_PawnKind
乌拉帝国合成人
乌拉帝国合成人
+ WulaPIALegion
true
总控
true
+ 乌拉帝国 行星封锁机关
WULA_Legion_PawnKind
+ true
1
- NamerFaction_Wula_PIA_Legion_Faction
Wula/World/WorldObjects/Expanding/Wula_PIA_Legion_Faction
0
1
@@ -139,4 +141,70 @@
Wula_Backstory_Categories
+
+ Wula_Progressive_Faction
+ 乌拉帝国 进步派
+ 乌拉帝国内部的分裂者,高举推翻皇室的旗帜,势力在各个乌拉帝国星域中快速蔓延。她们将异族和保皇派视为死敌,会毫不留情地攻击和其不属于同一个派系的乌拉帝国合成人。\n\n目前她们在边缘世界的活动较为隐秘,但是可以肯定的是,即使没有成建制的舰队,擅长游击战的她们依然有和行星封锁机关平起平坐的能力。
+ 乌拉帝国合成人
+ 乌拉帝国合成人
+ wulaProgressive
+ 1
+ 1
+ 2000
+ false
+ 乌拉帝国 进步派
+ false
+ Wula/World/WorldObjects/Expanding/WULA_Progressive_Faction
+ Spacer
+
+
+
+ Offworld
+
+
+
+ true
+ true
+ false
+
+
+ Hyperweave
+ Plasteel
+
+
+
+ Structure_Archist
+ Transhumanist
+ HumanPrimacy
+ Loyalist
+
+
+ Structure_Archist
+ Transhumanist
+ HumanPrimacy
+ Loyalist
+
+
+
+ (100,100)
+ (10000,10000)
+
+
+ true
+
+
+ (0, 0)
+
+
+
+
+ Combat
+ 100
+
+ 1
+
+
+
+ true
+
\ No newline at end of file
diff --git a/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml b/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml
index 2e2ffcc9..1c4366fe 100644
--- a/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml
+++ b/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml
@@ -659,7 +659,7 @@
18
20
- 250
+ 200
10~20
10~20
Poor
diff --git a/1.6/1.6/Defs/PawnsArrivalModeDefs/WULA_PawnsArrivalModes.xml b/1.6/1.6/Defs/PawnsArrivalModeDefs/WULA_PawnsArrivalModes.xml
new file mode 100644
index 00000000..d68fe435
--- /dev/null
+++ b/1.6/1.6/Defs/PawnsArrivalModeDefs/WULA_PawnsArrivalModes.xml
@@ -0,0 +1,22 @@
+
+
+
+ WULA_EdgeTeleport
+ WulaFallenEmpire.PawnsArrivalModeWorker_EdgeTeleport
+
+ Surface
+ Orbit
+
+ 0.1
+
+
+ (1, 0)
+ (999999, 0)
+
+
+ Ultra
+ 一群来自 {1} 的 {0} 通过传送进入了地图!
+ 一群来自 {1} 的 {0} 援军通过传送进入了地图!
+ {0_pawnsPluralDef} 将通过传送进入地图
+
+
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
deleted file mode 100644
index 5fa59234..00000000
--- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Attack_Robber_Camp.xml
+++ /dev/null
@@ -1,258 +0,0 @@
-
-
-
- WULA_Attack_Robber_Camp
- 0
- 1
- false
- true
- true
-
-
-
- questName->WULA_Attack_Robber_Camp_questName
-
-
-
-
- questDescription->WULA_Attack_Robber_Camp_questDescription
-
-
-
-
-
- Util_RandomizePointsChallengeRating
-
- 1.5
- 2
-
-
-
-
- Util_AdjustPointsForDistantFight
-
-
-
- false
-
-
-
- siteFaction
- true
- true
-
-
-
-
-
- WULA_Camp_Captured_By_Robber
- 1
-
-
- 5
- 10
- Things/Building/Natural/Hive/HiveC
- Things/Building/Natural/Hive/HiveC
- site
- $siteFaction
-
- 5
- 10
-
-
-
-
-
- Util_GetDefaultRewardValueFromPoints
-
-
- $points
-
-
-
-
-
- site.Destroyed
-
-
-
- Quest failed: [resolvedQuestName]
- After being discovered, the bandit camp has dispersed. The quest [resolvedQuestName] has ended.
-
-
- Fail
-
-
-
-
-
-
- site.AllEnemiesDefeated
-
-
-
- $site
-
-
-
- true
- true
- ChosenPawnForReward
-
- true
- Payment arrived
- You have defeated the bandit camp!\n\nThe payment from [asker_faction_name] has arrived.
-
- ChoosePawn
- [asker_faction_royalFavorLabel]
- These colonists participated in the victory for the quest [resolvedQuestName]. [asker_definite] wants to know who should receive the [royalFavorReward_amount] [asker_faction_royalFavorLabel] for this service.
- $site
- ChosenPawnForReward
-
-
-
-
-
-
- site.AllEnemiesDefeated
- Success
-
-
-
-
-
- WULA_Camp_Captured_By_Robber
- 被异族占据的哨站
- (44, 1, 44)
- true
- 0
- MapFaction
-
-
- (21, 0, 24)
-
-
- Robber
- true
- RobberGroup
- MapFaction
- DefendBase
- MapGeneration
- 1000~2000
-
-
-
-
-
-
- WULA_TransportPod
-
- (24,20,24,20)
- (24,23,24,23)
-
-
-
- Brazier
- Steel
- (16,0,22)
-
-
- Bedroll
- Cloth
- 3
-
- (23,14,23,16)
-
-
-
- Wula_Fusion_Generators
- 29.99023
- (30,0,27)
-
-
- WULA_Wall_Flag_Building
-
- (16,13,16,13)
- (25,30,25,30)
- (27,30,27,30)
-
-
-
- WULA_Machine_Recharger
- (14,0,16)
-
-
- WulaWall
-
- (12,14,16,14)
- (12,15,12,18)
- (11,18,11,18)
- (10,20,10,21)
- (9,21,9,27)
- (20,12,22,12)
- (22,13,23,13)
- (25,13,29,13)
- (10,27,11,27)
- (11,28,11,29)
- (12,29,12,29)
- (29,14,30,14)
- (30,15,31,16)
- (14,32,14,35)
- (31,17,31,21)
- (33,16,35,16)
- (15,35,21,35)
- (35,17,35,18)
- (21,33,24,33)
- (24,31,25,31)
- (21,34,21,34)
- (24,32,24,32)
- (36,18,37,18)
- (32,25,34,25)
- (27,31,27,32)
- (32,26,32,29)
- (37,19,37,22)
- (34,24,34,24)
- (31,29,31,32)
- (28,32,30,32)
-
-
-
- WulaDoor
-
- (32,16,32,16)
- (26,31,26,31)
-
-
-
- Wula_Sonar_Mine
-
- (10,22,10,22)
- (28,14,28,14)
- (30,31,30,31)
-
-
-
- Bedroll
- Cloth
- 1
-
- (10,24,10,26)
-
-
-
- WulaShelter
-
- (12,6,15,6)
- (9,10,12,10)
- (12,7,12,9)
- (7,32,7,36)
- (34,9,38,9)
- (8,36,10,36)
- (38,10,38,12)
- (35,35,38,35)
- (38,32,38,34)
-
-
-
-
-
\ No newline at end of file
diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Boss_Super_Fortress.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Boss_Super_Fortress.xml
index 592f585d..f9022e69 100644
--- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Boss_Super_Fortress.xml
+++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Boss_Super_Fortress.xml
@@ -97,10 +97,10 @@
5
10
- Things/Building/Natural/Hive/HiveC
- Things/Building/Natural/Hive/HiveC
+ Wula/World/WorldObjects/Expanding/WULA_Progressive_Faction
+ Wula/World/WorldObjects/Expanding/WULA_Progressive_Faction
site
- AncientsHostile
+ Wula_Progressive_Faction
true
5
@@ -177,7 +177,7 @@
true
WULA_Sniper_Cat_Group
2~3
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -192,7 +192,7 @@
true
WULA_Sniper_Cat_Group
2~3
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -207,7 +207,7 @@
true
WULA_Sniper_Cat_Group
2~3
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -222,7 +222,7 @@
true
WULA_Sniper_Cat_Group
2~3
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -237,7 +237,7 @@
true
WULA_Hostile_Group
3~4
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -252,7 +252,7 @@
true
WULA_Hostile_Group
3~4
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -267,7 +267,7 @@
true
WULA_Hostile_Group
3~4
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -282,7 +282,7 @@
true
WULA_Hostile_Group
3~4
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -336,7 +336,7 @@
WulaShelter
- AncientsHostile
+ Wula_Progressive_Faction
(10,10,14,10)
(10,11,10,14)
@@ -484,7 +484,7 @@
WulaWall
- AncientsHostile
+ Wula_Progressive_Faction
(17,17,26,17)
(17,18,17,26)
@@ -607,7 +607,7 @@
WulaDoor
- AncientsHostile
+ Wula_Progressive_Faction
(21,26,21,26)
(35,19,35,19)
@@ -630,7 +630,7 @@
WulaDoor
1
- AncientsHostile
+ Wula_Progressive_Faction
(26,21,26,21)
(19,35,19,35)
@@ -652,7 +652,7 @@
FloodLight
- AncientsHostile
+ Wula_Progressive_Faction
(14,14,14,14)
(16,35,16,35)
@@ -670,7 +670,7 @@
WULA_Cat_Bunker
- AncientsHostile
+ Wula_Progressive_Faction
(12,12,12,12)
(12,24,12,24)
@@ -696,7 +696,7 @@
Wula_Base_Laser_Turret
- AncientsHostile
+ Wula_Progressive_Faction
(18,14,18,14)
(14,18,14,18)
@@ -734,7 +734,7 @@
Wula_Base_ATGun_Turret
- AncientsHostile
+ Wula_Progressive_Faction
(32,13,32,13)
(13,32,13,32)
@@ -748,7 +748,7 @@
Wula_Base_Mortar_Turret
- AncientsHostile
+ Wula_Progressive_Faction
(20,20,20,20)
(20,23,20,23)
@@ -770,7 +770,7 @@
WULA_MechAssembler
- AncientsHostile
+ Wula_Progressive_Faction
(38,38,38,38)
(41,38,41,38)
@@ -780,7 +780,7 @@
WULA_MechAssembler_Huge
- AncientsHostile
+ Wula_Progressive_Faction
(39,34,39,34)
(34,39,34,39)
@@ -790,7 +790,7 @@
Wula_DarkEnergy_Generators
- AncientsHostile
+ Wula_Progressive_Faction
2
(25,32,25,32)
@@ -805,7 +805,7 @@
Wula_Disturber_Turret
- AncientsHostile
+ Wula_Progressive_Faction
(32,32,32,32)
(32,47,32,47)
diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Progressive_Ship_Attack_Quest.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Progressive_Ship_Attack_Quest.xml
index 89e520f1..98f4f475 100644
--- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Progressive_Ship_Attack_Quest.xml
+++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Progressive_Ship_Attack_Quest.xml
@@ -3,7 +3,7 @@
WULA_GiveQuest_Progressive_Ship_Attack_Quest
GiveQuest
- 突击舰队攻击
+ 进步派攻击
Map_PlayerHome
@@ -43,6 +43,34 @@
+
+
+
+
+
+
+ questName->叛军游击队
+
+
+
+
+
+
+ questDescription->一群乌拉帝国进步派的游击队攻击了你的殖民地!
+
+
+
+
+ Wula_Progressive_Faction
+ true
+ 2
+ WULA_EdgeTeleport
+ 乌拉帝国 进步派的游击队
+ 一群乌拉帝国进步派的游击队正在攻击你的殖民地!
+
+
+
+
@@ -66,7 +94,7 @@
WULA_Progressive_Ship_Mini_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
1
false
false
@@ -79,7 +107,7 @@
WULA_Progressive_Ship_Mini_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
4
false
false
@@ -95,7 +123,7 @@
WULA_Progressive_Ship_Small_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
2
false
false
@@ -107,12 +135,11 @@
$points
5999
-
WULA_Progressive_Ship_Mid_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
1
false
false
@@ -125,7 +152,7 @@
WULA_Progressive_Ship_Small_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
3
false
false
@@ -139,13 +166,12 @@
$points
7999
-
-
+
WULA_Progressive_Ship_Mid_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
1
false
false
@@ -158,7 +184,7 @@
WULA_Progressive_Ship_Small_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
3
false
false
@@ -172,13 +198,12 @@
$points
9999
-
-
+
WULA_Progressive_Ship_Mid_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
1
false
false
@@ -191,7 +216,7 @@
WULA_Progressive_Ship_Small_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
2
false
false
@@ -206,19 +231,18 @@
$points
12999
-
WULA_Progressive_Ship_Mini_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
4
false
false
WULA_Progressive_Ship_Mid_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
1
false
false
@@ -231,7 +255,7 @@
WULA_Progressive_Ship_Small_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
3
false
false
@@ -245,20 +269,19 @@
$points
15999
-
-
+
WULA_Progressive_Ship_Mini_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
4
false
false
WULA_Progressive_Ship_Mid_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
1
false
false
@@ -271,7 +294,7 @@
WULA_Progressive_Ship_Small_Beacon_Cleanzone
- Wula_PIA_Legion_Faction
+ Wula_Progressive_Faction
3
false
false
@@ -284,10 +307,90 @@
+
+
+
+
+
+
+ questName->微型空投舱
+
+
+
+
+
+
+ questDescription->几个可疑的黑点落到了殖民地附近···
+
+
+
+
+ Mech_WULA_Cat_Cloak_Sniper_Incoming
+ 1
+ false
+ false
+
+
+ $points
+ 2999
+
+
+
+
+ Mech_WULA_Cat_Cloak_Sniper_Incoming
+ 1
+ false
+ false
+
+
+
+
+
+ $points
+ 5999
+
+
+
+
+ Mech_WULA_Cat_Cloak_Sniper_Incoming
+ 1
+ false
+ false
+
+
+
+
+
+ $points
+ 9999
+
+
+
+
+ Mech_WULA_Cat_Cloak_Sniper_Incoming
+ 2
+ false
+ false
+
+
+
+
+
+
+
+
+ Wula_PIA_Legion_Faction
+ 10
+ WULA_Attack_Progressive
+
+
+ WULA_Attack_Progressive
+ 对抗乌拉帝国叛军
+
\ No newline at end of file
diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Recycle_PIA_Legion_File.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Recycle_PIA_Legion_File.xml
index 2cbcf9c0..4809bdb7 100644
--- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Recycle_PIA_Legion_File.xml
+++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Recycle_PIA_Legion_File.xml
@@ -578,7 +578,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -593,7 +593,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -608,7 +608,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -623,7 +623,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -638,7 +638,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -653,7 +653,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -668,7 +668,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -683,7 +683,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -698,7 +698,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -713,7 +713,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -728,7 +728,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -743,7 +743,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -758,7 +758,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -773,7 +773,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -788,7 +788,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -803,7 +803,7 @@
true
WULA_Defender_Group
1
- AncientsHostile
+ Wula_Progressive_Faction
DefendBase
MapGeneration
@@ -839,12 +839,12 @@
WULA_Machine_Recharger
- AncientsHostile
+ Wula_Progressive_Faction
(21,0,23)
WULA_Charging_Station_Synth
- AncientsHostile
+ Wula_Progressive_Faction
(20,19,20,19)
(22,19,22,19)
@@ -852,7 +852,7 @@
WulaWall
- AncientsHostile
+ Wula_Progressive_Faction
(17,10,24,10)
(15,13,19,13)
@@ -899,26 +899,26 @@
Table1x2c
WULA_Alloy
- AncientsHostile
+ Wula_Progressive_Faction
(18,0,21)
DiningChair
Uranium
- AncientsHostile
+ Wula_Progressive_Faction
(18,0,20)
DiningChair
Uranium
2
- AncientsHostile
+ Wula_Progressive_Faction
(18,0,23)
WULA_Wall_Flag_Building
3
- AncientsHostile
+ Wula_Progressive_Faction
(25,20,25,20)
(25,23,25,23)
@@ -926,7 +926,7 @@
HiddenConduit
- AncientsHostile
+ Wula_Progressive_Faction
(19,17,19,17)
(16,20,16,20)
@@ -940,7 +940,7 @@
WULA_Wall_Flag_Building
- AncientsHostile
+ Wula_Progressive_Faction
(19,17,19,17)
(22,17,22,17)
@@ -949,7 +949,7 @@
Sandbags
Cloth
- AncientsHostile
+ Wula_Progressive_Faction
(7,8,10,8)
(7,9,7,11)
@@ -972,7 +972,7 @@
WULA_Wall_Flag_Building
2
- AncientsHostile
+ Wula_Progressive_Faction
(19,26,19,26)
(22,26,22,26)
@@ -981,7 +981,7 @@
WULA_Wall_Flag_Building
1
- AncientsHostile
+ Wula_Progressive_Faction
(16,20,16,20)
(16,23,16,23)
@@ -989,7 +989,7 @@
Wula_Fusion_Generators
- AncientsHostile
+ Wula_Progressive_Faction
29.432827
(17,15,17,15)
@@ -1005,7 +1005,7 @@
Turret_MiniTurret
Steel
- AncientsHostile
+ Wula_Progressive_Faction
60
(16,17,16,17)
@@ -1016,7 +1016,7 @@
Wula_Base_Laser_Turret
- AncientsHostile
+ Wula_Progressive_Faction
(13,14,13,14)
(28,14,28,14)
@@ -1026,7 +1026,7 @@
TrapIED_Incendiary
- AncientsHostile
+ Wula_Progressive_Faction
(18,12,18,12)
(11,19,11,19)
@@ -1040,7 +1040,7 @@
WulaDoor
- AncientsHostile
+ Wula_Progressive_Faction
(11,18,11,18)
(11,25,11,25)
@@ -1051,7 +1051,7 @@
WulaDoor
1
- AncientsHostile
+ Wula_Progressive_Faction
(17,12,17,12)
(24,12,24,12)
@@ -1061,7 +1061,7 @@
WULA_Cat_Bunker
- AncientsHostile
+ Wula_Progressive_Faction
(9,10,9,10)
(32,10,32,10)
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 c2ff072e..b051bf82 100644
--- a/1.6/1.6/Defs/ResearchProjectDefs/WULA_ResearchProjects_Remake.xml
+++ b/1.6/1.6/Defs/ResearchProjectDefs/WULA_ResearchProjects_Remake.xml
@@ -63,7 +63,7 @@
0
0
- Wula_PIA_Legion_Faction
+ WulaPIALegion
Electricity
@@ -125,7 +125,7 @@
0
0
- Wula_PIA_Legion_Faction
+ WulaPIALegion
WULA_Colony_License_LV1_Technology
@@ -187,7 +187,7 @@
0
0
- Wula_PIA_Legion_Faction
+ WulaPIALegion
Fabrication
@@ -472,7 +472,7 @@
0
0
- Wula_PIA_Legion_Faction
+ WulaPIALegion
@@ -529,7 +529,7 @@
0
0
- Wula_PIA_Legion_Faction
+ WulaPIALegion
diff --git a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Mech_Buildings.xml b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Mech_Buildings.xml
index 5625d42d..c2f9e40b 100644
--- a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Mech_Buildings.xml
+++ b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Mech_Buildings.xml
@@ -571,4 +571,106 @@
+
+
+
+ Mech_WULA_Cat_Cloak_Sniper_Cleanzone
+ 奇怪的空投区
+ 奇怪的空投区
+ MinifiedThing
+ Normal
+ None
+
+ BuildingsMisc
+
+
+ Wula/Building/WULA_Dropping_Building_Cleanzone
+ Graphic_Multi
+ (1,1)
+
+ false
+
+
+
+ 4
+
+ Building
+ PassThroughOnly
+ false
+ 0.5
+ false
+ 0
+ false
+ false
+
+ 0
+ 1
+ 0
+ 1
+ 0
+
+ (1,1)
+ 0
+ 0
+
+ BuildingDestroyed_Metal_Small
+
+
+ WulaFallenEmpire.PlaceWorker_CustomRadius
+
+
+
+ Mech_WULA_Cat_Cloak_Sniper_Incoming
+ true
+ 1
+ true
+ false
+
+
+
+
+ Mech_WULA_Cat_Cloak_Sniper_Incoming
+ 奇怪的空投舱(空投中)
+ (1,1)
+ WulaFallenEmpire.Skyfaller_PawnSpawner
+
+ Wula/Building/WULA_DropPod/WULA_DropPod_Incoming
+ Graphic_Single
+ CutoutFlying
+ 1
+
+
+ Accelerate
+ Things/Skyfaller/SkyfallerShadowDropPod
+ (1, 1)
+ 100
+ 0
+ DropPod_Fall_Mechanoid
+ DropPod_Impact
+ 0.1
+
+
+ (0,0)
+ (1, 1)
+
+
+
+
+ (0,0)
+ (1, 1)
+
+
+
+
+
+ Smoke_Joint
+
+
+ Mech_WULA_Cat_Cloak_Sniper
+ Wula_Progressive_Faction
+ false
+ true
+
+
+
\ No newline at end of file
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 e4eb405d..481d01eb 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
@@ -674,7 +674,7 @@
Smoke_Joint
- AncientsHostile
+ Wula_Progressive_Faction
@@ -797,7 +797,7 @@
Smoke_Joint
- AncientsHostile
+ Wula_Progressive_Faction
@@ -920,7 +920,7 @@
Smoke_Joint
- AncientsHostile
+ Wula_Progressive_Faction
diff --git a/1.6/1.6/Defs/ThingDefs_Races/Races_Wulaspecies.xml b/1.6/1.6/Defs/ThingDefs_Races/Races_Wulaspecies.xml
index 75b0e42f..b6f91050 100644
--- a/1.6/1.6/Defs/ThingDefs_Races/Races_Wulaspecies.xml
+++ b/1.6/1.6/Defs/ThingDefs_Races/Races_Wulaspecies.xml
@@ -1031,11 +1031,28 @@
6
+
+
+
+ 猫爪刀
+
+ Cut
+
+ 30
+ 1.5
+ Torso
+ true
+
+
+
WULA_Cat_Invisibility
120
true
+ true
+ 狙!击!手!
+ 附近有狙击手,快寻找掩体!
@@ -1044,6 +1061,15 @@
1.0
false
+
+
+ Stun
+ EMP
+
+
+ EMP
+
+
diff --git a/1.6/1.6/Defs/ThinkTreeDefs/WULA_AutonomousMech.xml b/1.6/1.6/Defs/ThinkTreeDefs/WULA_AutonomousMech.xml
index c09c45e7..54ad2713 100644
--- a/1.6/1.6/Defs/ThinkTreeDefs/WULA_AutonomousMech.xml
+++ b/1.6/1.6/Defs/ThinkTreeDefs/WULA_AutonomousMech.xml
@@ -4,16 +4,6 @@
WULA_AutonomousMech
-
- Mech_WULA_Cat_Cloak_Sniper
-
-
- 500
- 500
-
-
-
-
Despawned
@@ -31,6 +21,21 @@
Downed
+
+
+ Mech_WULA_Cat_Cloak_Sniper
+
+
+ 500
+ 500
+
+
+ Deadly
+
+
+
+
+
0.05
diff --git a/1.6/1.6/Patches/WULA_BaseStoryteller_Patch.xml b/1.6/1.6/Patches/WULA_BaseStoryteller_Patch.xml
index 82075289..8523f4f2 100644
--- a/1.6/1.6/Patches/WULA_BaseStoryteller_Patch.xml
+++ b/1.6/1.6/Patches/WULA_BaseStoryteller_Patch.xml
@@ -43,4 +43,28 @@
+
+
+
+ Defs/StorytellerDef[@Name="BaseStoryteller"]/comps
+
+
+ WULA_Colony_License_LV3_Technology
+
+
+ 0
+ 20
+
+
+ false
+ false
+
+ true
+ Wula_PIA_Legion_Faction
+
+ WULA_GiveQuest_Progressive_Ship_Attack_Quest
+ WULA_GiveQuest_Progressive_Ship_Attack_Quest
+
+
+
\ No newline at end of file
diff --git a/Source/WulaFallenEmpire/BuildingComp/Building_ExtraGraphics.cs b/Source/WulaFallenEmpire/BuildingComp/Building_ExtraGraphics.cs
index 19c54fda..6f769b2c 100644
--- a/Source/WulaFallenEmpire/BuildingComp/Building_ExtraGraphics.cs
+++ b/Source/WulaFallenEmpire/BuildingComp/Building_ExtraGraphics.cs
@@ -15,9 +15,10 @@ namespace WulaFallenEmpire
// 图形缓存 - 现在包含Shader信息
private Dictionary graphicsCache = new Dictionary();
- // 动画状态 - 每个图层的独立浮动
+ // 动画状态 - 每个图层的独立状态
private Dictionary layerHoverOffsets = new Dictionary();
private Dictionary layerAnimationTimes = new Dictionary();
+ private Dictionary layerRotationAngles = new Dictionary();
private int lastTick = -1;
public ExtraGraphicsExtension ModExtension
@@ -122,8 +123,8 @@ namespace WulaFallenEmpire
{
// 不调用基类的 DrawAt,完全自定义渲染
- // 更新悬浮动画
- UpdateHoverAnimation();
+ // 更新动画状态
+ UpdateAnimations();
// 绘制所有配置的图形层
DrawGraphicLayers(drawLoc, flip);
// 新增:绘制护盾
@@ -152,7 +153,7 @@ namespace WulaFallenEmpire
}
}
- // 绘制单个图形层
+ // 绘制单个图形层 - 现在支持旋转动画
private void DrawGraphicLayer(Vector3 baseDrawPos, bool flip, GraphicLayerData layer)
{
if (string.IsNullOrEmpty(layer.texturePath))
@@ -167,27 +168,89 @@ namespace WulaFallenEmpire
// 获取图形(现在传入Shader)
Graphic graphic = GetCachedGraphic(layer.texturePath, layer.scale, layer.color, shader);
- // 计算图层浮动偏移
- float hoverOffset = 0f;
- if (layer.enableHover)
+ // 计算图层动画偏移
+ Vector3 animationOffset = Vector3.zero;
+ float rotationAngle = 0f;
+ int layerIndex = ModExtension.graphicLayers.IndexOf(layer);
+
+ // 根据动画类型应用不同的动画效果
+ switch (layer.animationType)
{
- int layerIndex = ModExtension.graphicLayers.IndexOf(layer);
- if (layerHoverOffsets.ContainsKey(layerIndex))
- {
- hoverOffset = layerHoverOffsets[layerIndex];
- }
+ case AnimationType.Hover:
+ if (layer.enableAnimation && layerHoverOffsets.ContainsKey(layerIndex))
+ {
+ animationOffset.z = layerHoverOffsets[layerIndex];
+ }
+ break;
+
+ case AnimationType.Rotate:
+ if (layer.enableAnimation && layerRotationAngles.ContainsKey(layerIndex))
+ {
+ rotationAngle = layerRotationAngles[layerIndex];
+ }
+ break;
}
- // 最终绘制位置 = 基础位置 + 图层偏移 + 浮动偏移
- Vector3 drawPos = baseDrawPos + layer.offset;
- drawPos.z += hoverOffset;
-
- // 绘制图形
- graphic.Draw(drawPos, flip ? base.Rotation.Opposite : base.Rotation, this, 0f);
+ // 最终绘制位置 = 基础位置 + 图层偏移 + 动画偏移
+ Vector3 drawPos = baseDrawPos + layer.offset + animationOffset;
+
+ // 如果启用了旋转动画,使用矩阵变换绘制
+ if (layer.animationType == AnimationType.Rotate && layer.enableAnimation && rotationAngle != 0f)
+ {
+ DrawWithRotation(graphic, drawPos, flip, rotationAngle, layer);
+ }
+ else
+ {
+ // 普通绘制
+ graphic.Draw(drawPos, flip ? base.Rotation.Opposite : base.Rotation, this, 0f);
+ }
}
- // 更新每个图层的独立悬浮动画
- private void UpdateHoverAnimation()
+ // 使用矩阵变换绘制旋转图形
+ private void DrawWithRotation(Graphic graphic, Vector3 drawPos, bool flip, float rotationAngle, GraphicLayerData layer)
+ {
+ try
+ {
+ // 获取网格和材质
+ Mesh mesh = graphic.MeshAt(flip ? base.Rotation.Opposite : base.Rotation);
+ Material mat = graphic.MatAt(flip ? base.Rotation.Opposite : base.Rotation);
+
+ if (mesh == null || mat == null)
+ {
+ Log.Warning($"Building_ExtraGraphics: Unable to get mesh or material for rotating layer");
+ return;
+ }
+
+ // 创建旋转矩阵
+ Quaternion rotation = Quaternion.Euler(0f, 0f, rotationAngle);
+
+ // 如果图层有旋转中心偏移,需要调整位置
+ Vector3 pivotOffset = new Vector3(layer.pivotOffset.x, layer.pivotOffset.y, 0f);
+
+ // 计算最终矩阵
+ Matrix4x4 matrix = Matrix4x4.TRS(
+ drawPos + pivotOffset, // 位置
+ rotation, // 旋转
+ new Vector3(layer.scale.x, layer.scale.y, 1f) // 缩放
+ );
+
+ // 绘制网格
+ Graphics.DrawMesh(mesh, matrix, mat, 0);
+
+ // 如果需要,绘制第二面(双面渲染)
+ if (layer.doubleSided)
+ {
+ Graphics.DrawMesh(mesh, matrix, mat, 0, null, 0, null, UnityEngine.Rendering.ShadowCastingMode.Off, true);
+ }
+ }
+ catch (Exception ex)
+ {
+ Log.Error($"Building_ExtraGraphics: Error drawing rotating layer: {ex}");
+ }
+ }
+
+ // 更新所有图层的动画状态
+ private void UpdateAnimations()
{
int currentTick = Find.TickManager.TicksGame;
@@ -198,23 +261,47 @@ namespace WulaFallenEmpire
{
var layer = ModExtension.graphicLayers[i];
- if (layer.enableHover)
+ if (!layer.enableAnimation)
+ continue;
+
+ // 初始化动画时间
+ if (!layerAnimationTimes.ContainsKey(i))
{
- // 初始化动画时间
- if (!layerAnimationTimes.ContainsKey(i))
- {
- layerAnimationTimes[i] = 0f;
- }
-
- // 更新动画时间
- layerAnimationTimes[i] += Time.deltaTime;
-
- // 计算该图层的悬浮偏移
- float hoverSpeed = layer.hoverSpeed > 0 ? layer.hoverSpeed : ModExtension.globalHoverSpeed;
- float hoverIntensity = layer.hoverIntensity > 0 ? layer.hoverIntensity : ModExtension.globalHoverIntensity;
-
- float hoverOffset = Mathf.Sin(layerAnimationTimes[i] * hoverSpeed + layer.hoverPhase) * hoverIntensity;
- layerHoverOffsets[i] = hoverOffset;
+ layerAnimationTimes[i] = layer.animationStartTime;
+ }
+
+ // 更新动画时间
+ layerAnimationTimes[i] += Time.deltaTime;
+
+ // 根据动画类型更新不同的状态
+ switch (layer.animationType)
+ {
+ case AnimationType.Hover:
+ // 计算该图层的悬浮偏移
+ float hoverSpeed = layer.animationSpeed > 0 ? layer.animationSpeed : ModExtension.globalAnimationSpeed;
+ float hoverIntensity = layer.animationIntensity > 0 ? layer.animationIntensity : ModExtension.globalAnimationIntensity;
+
+ float hoverOffset = Mathf.Sin(layerAnimationTimes[i] * hoverSpeed + layer.animationPhase) * hoverIntensity;
+ layerHoverOffsets[i] = hoverOffset;
+ break;
+
+ case AnimationType.Rotate:
+ // 计算该图层的旋转角度
+ float rotateSpeed = layer.animationSpeed > 0 ? layer.animationSpeed : ModExtension.globalAnimationSpeed;
+ float maxAngle = layer.animationIntensity > 0 ? layer.animationIntensity : ModExtension.globalAnimationIntensity;
+
+ // 旋转角度(循环)
+ float rotationAngle = (layerAnimationTimes[i] * rotateSpeed * 360f) % 360f;
+
+ // 限制旋转角度范围(如果设置了最大角度)
+ if (maxAngle > 0 && maxAngle < 360f)
+ {
+ // 使用正弦波限制旋转角度范围
+ rotationAngle = Mathf.Sin(layerAnimationTimes[i] * rotateSpeed) * maxAngle;
+ }
+
+ layerRotationAngles[i] = rotationAngle;
+ break;
}
}
@@ -230,12 +317,20 @@ namespace WulaFallenEmpire
}
}
+ // 动画类型枚举
+ public enum AnimationType
+ {
+ None, // 无动画
+ Hover, // 上下浮动
+ Rotate // 自旋转
+ }
+
// 主要的 ModExtension 定义
public class ExtraGraphicsExtension : DefModExtension
{
- // 全局悬浮参数(作为默认值)
- public float globalHoverSpeed = 2f; // 全局悬浮速度
- public float globalHoverIntensity = 0.1f; // 全局悬浮强度
+ // 全局动画参数(作为默认值)
+ public float globalAnimationSpeed = 2f; // 全局动画速度
+ public float globalAnimationIntensity = 0.1f; // 全局动画强度
// 图形层配置
public List graphicLayers = new List();
@@ -250,7 +345,7 @@ namespace WulaFallenEmpire
}
}
- // 单个图形层的配置数据 - 添加shaderName字段
+ // 单个图形层的配置数据 - 增强版
public class GraphicLayerData
{
// 基础配置
@@ -258,16 +353,56 @@ namespace WulaFallenEmpire
public Vector2 scale = Vector2.one; // 缩放比例
public Color color = Color.white; // 颜色
public int drawOrder = 0; // 绘制顺序(数字小的先绘制)
- public string shaderName = "TransparentPostLight"; // Shader名称(新增)
+ public string shaderName = "TransparentPostLight"; // Shader名称
// 位置配置 - 使用环世界坐标系
// X: 左右偏移, Y: 图层深度, Z: 上下偏移
public Vector3 offset = Vector3.zero;
- // 独立悬浮配置
- public bool enableHover = true; // 是否启用悬浮
- public float hoverSpeed = 0f; // 悬浮速度(0表示使用全局速度)
- public float hoverIntensity = 0f; // 悬浮强度(0表示使用全局强度)
- public float hoverPhase = 0f; // 悬浮相位(用于错开浮动)
+ // 动画配置
+ public AnimationType animationType = AnimationType.Hover; // 动画类型
+ public bool enableAnimation = true; // 是否启用动画
+ public float animationSpeed = 0f; // 动画速度(0表示使用全局速度)
+ public float animationIntensity = 0f; // 动画强度(0表示使用全局强度)
+ public float animationPhase = 0f; // 动画相位(用于错开动画)
+ public float animationStartTime = 0f; // 动画开始时间偏移
+
+ // 旋转动画专用配置
+ public Vector2 pivotOffset = Vector2.zero; // 旋转中心偏移(相对于图层的中心)
+ public bool doubleSided = false; // 是否双面渲染(对于旋转物体)
+
+ // 兼容旧字段(为了向后兼容)
+ [Obsolete("Use enableAnimation instead")]
+ public bool enableHover
+ {
+ get => enableAnimation && animationType == AnimationType.Hover;
+ set
+ {
+ enableAnimation = value;
+ if (value && animationType == AnimationType.None)
+ animationType = AnimationType.Hover;
+ }
+ }
+
+ [Obsolete("Use animationSpeed instead")]
+ public float hoverSpeed
+ {
+ get => animationSpeed;
+ set => animationSpeed = value;
+ }
+
+ [Obsolete("Use animationIntensity instead")]
+ public float hoverIntensity
+ {
+ get => animationIntensity;
+ set => animationIntensity = value;
+ }
+
+ [Obsolete("Use animationPhase instead")]
+ public float hoverPhase
+ {
+ get => animationPhase;
+ set => animationPhase = value;
+ }
}
}
diff --git a/Source/WulaFallenEmpire/Pawn/WULA_AutonomousMech/CompAutonomousMech.cs b/Source/WulaFallenEmpire/Pawn/WULA_AutonomousMech/CompAutonomousMech.cs
index 348fc874..fa958b1c 100644
--- a/Source/WulaFallenEmpire/Pawn/WULA_AutonomousMech/CompAutonomousMech.cs
+++ b/Source/WulaFallenEmpire/Pawn/WULA_AutonomousMech/CompAutonomousMech.cs
@@ -201,15 +201,22 @@ namespace WulaFallenEmpire
{
if (MechPawn == null || !CanBeAutonomous)
yield break;
-
+
// 工作模式切换按钮
if (CanWorkAutonomously)
{
- yield return new DroneGizmo(this);
+ DroneGizmo droneGizmo = new DroneGizmo(this);
+ if (droneGizmo != null)
+ {
+ yield return droneGizmo;
+ }
+ }
+ // 更换武器按钮 - 确保不返回null
+ Gizmo weaponSwitchGizmo = CreateWeaponSwitchGizmo();
+ if (weaponSwitchGizmo != null)
+ {
+ yield return weaponSwitchGizmo;
}
-
- // 更换武器按钮
- yield return CreateWeaponSwitchGizmo();
}
///
@@ -217,20 +224,43 @@ namespace WulaFallenEmpire
///
private Gizmo CreateWeaponSwitchGizmo()
{
- // 检查Pawn是否属于玩家派系
- if (MechPawn?.Faction != Faction.OfPlayer)
+ try
{
- return null; // 非玩家派系时不显示
+ // 检查Pawn是否属于玩家派系
+ if (MechPawn?.Faction != Faction.OfPlayer)
+ {
+ return null; // 非玩家派系时不显示
+ }
+ // 检查Pawn是否有效
+ if (MechPawn == null || MechPawn.Dead || MechPawn.Destroyed)
+ {
+ return null;
+ }
+ // 检查equipment是否有效
+ if (MechPawn.equipment == null)
+ {
+ return null;
+ }
+ Command_Action switchWeaponCommand = new Command_Action
+ {
+ defaultLabel = "WULA_SwitchWeapon".Translate(),
+ defaultDesc = "WULA_SwitchWeapon_Desc".Translate(),
+ icon = ContentFinder.Get("Wula/UI/Abilities/WULA_WeaponSwitchAbility", false) ?? BaseContent.BadTex,
+ action = SwitchWeapon,
+ };
+ // 确保Command不为null
+ if (switchWeaponCommand == null)
+ {
+ Log.Error($"Failed to create weapon switch gizmo for {MechPawn?.LabelCap}");
+ return null;
+ }
+ return switchWeaponCommand;
}
-
- Command_Action switchWeaponCommand = new Command_Action
+ catch (System.Exception ex)
{
- defaultLabel = "WULA_SwitchWeapon".Translate(),
- defaultDesc = "WULA_SwitchWeapon_Desc".Translate(),
- icon = ContentFinder.Get("Wula/UI/Abilities/WULA_WeaponSwitchAbility", false) ?? BaseContent.BadTex,
- action = SwitchWeapon
- };
- return switchWeaponCommand;
+ Log.Error($"Error creating weapon switch gizmo: {ex}");
+ return null;
+ }
}
///
diff --git a/Source/WulaFallenEmpire/Pawn/WULA_Cat_Invisible/CompFighterInvisible.cs b/Source/WulaFallenEmpire/Pawn/WULA_Cat_Invisible/CompFighterInvisible.cs
index ac35618a..52239782 100644
--- a/Source/WulaFallenEmpire/Pawn/WULA_Cat_Invisible/CompFighterInvisible.cs
+++ b/Source/WulaFallenEmpire/Pawn/WULA_Cat_Invisible/CompFighterInvisible.cs
@@ -20,6 +20,9 @@ namespace WulaFallenEmpire
// 新增:记录最后一次检查敌人的时间
private int lastEnemyCheckTick = -99999;
+ // 新增:记录最后一次发信的时间
+ private int lastLetterTick = -99999;
+
public HediffDef GetTargetInvisibilityDef()
{
return Props.InvisibilityDef;
@@ -49,6 +52,7 @@ namespace WulaFallenEmpire
Scribe_Values.Look(ref lastDetectedTick, "lastDetectedTick", 0);
Scribe_Values.Look(ref lastRevealedTick, "lastRevealedTick", 0);
Scribe_Values.Look(ref lastEnemyCheckTick, "lastEnemyCheckTick", 0);
+ Scribe_Values.Look(ref lastLetterTick, "lastLetterTick", 0);
}
public override void CompTick()
@@ -78,6 +82,9 @@ namespace WulaFallenEmpire
Invisibility.BecomeVisible();
lastDetectedTick = Find.TickManager.TicksGame;
+
+ // 触发显现事件
+ TrySendLetter("attack");
}
///
@@ -85,7 +92,6 @@ namespace WulaFallenEmpire
///
private void CheckForEnemiesInSight()
{
-
// 检查频率:每30 tick检查一次(约0.5秒)
if (!Sightstealer.IsHashIntervalTick(30) ||
Find.TickManager.TicksGame <= lastEnemyCheckTick + 30)
@@ -95,12 +101,6 @@ namespace WulaFallenEmpire
lastEnemyCheckTick = Find.TickManager.TicksGame;
- // 如果配置为只在战斗状态时检查,且当前不在战斗状态,则跳过
- if (Props.onlyCheckInCombat && !IsInCombatState())
- {
- return;
- }
-
// 检查视线内是否有敌人
bool enemyInSight = false;
List enemiesInSight = new List();
@@ -156,108 +156,110 @@ namespace WulaFallenEmpire
lastDetectedTick = Find.TickManager.TicksGame;
lastRevealedTick = Find.TickManager.TicksGame;
- // 可选:添加视觉或声音效果
- if (Props.showRevealEffect)
+ // 触发显现事件
+ TrySendLetter("detected", enemiesInSight);
+ }
+ }
+
+ ///
+ /// 尝试发送信件
+ ///
+ private void TrySendLetter(string cause, List enemies = null)
+ {
+ // 检查是否应该发送信件
+ if (!ShouldSendLetter())
+ return;
+
+ // 发送信件
+ SendLetter(cause, enemies);
+ }
+
+ ///
+ /// 检查是否应该发送信件
+ ///
+ private bool ShouldSendLetter()
+ {
+ // 如果配置为不发信,直接返回false
+ if (!Props.sendLetterOnReveal)
+ return false;
+
+ // 检查发送间隔
+ int currentTick = Find.TickManager.TicksGame;
+ if (currentTick < lastLetterTick + Props.letterIntervalTicks)
+ {
+ // 还没到发送间隔
+ return false;
+ }
+
+ // 检查Pawn是否非玩家控制
+ if (Sightstealer.Faction == Faction.OfPlayer)
+ {
+ // 玩家控制的Pawn,不发送信件
+ return false;
+ }
+
+ return true;
+ }
+
+ ///
+ /// 发送信件
+ ///
+ private void SendLetter(string cause, List enemies = null)
+ {
+ try
+ {
+ int currentTick = Find.TickManager.TicksGame;
+
+ // 获取信件标题和内容
+ string title = Props.letterTitle;
+ string text = Props.letterText;
+
+ // 如果标题或内容为空,使用默认值
+ if (string.IsNullOrEmpty(title))
+ title = "隐身单位现身";
+
+ if (string.IsNullOrEmpty(text))
{
- ShowRevealEffect(enemiesInSight);
+ string enemyInfo = "";
+ if (enemies != null && enemies.Count > 0)
+ {
+ if (enemies.Count == 1)
+ {
+ enemyInfo = $"被 {enemies[0].LabelCap} 发现";
+ }
+ else
+ {
+ enemyInfo = $"被 {enemies.Count} 个敌人发现";
+ }
+ }
+ else if (cause == "attack")
+ {
+ enemyInfo = "发动了攻击";
+ }
+
+ text = $"{Sightstealer.LabelCap}({Sightstealer.Faction?.Name ?? "未知派系"})在 {Sightstealer.Map?.Parent?.LabelCap ?? "未知位置"} 现身了。\n\n{enemyInfo}\n位置:{Sightstealer.Position}";
}
- // 可选:发送消息
- if (Props.sendRevealMessage && Sightstealer.Faction == Faction.OfPlayer)
- {
- SendRevealMessage(enemiesInSight);
- }
- }
- }
-
- ///
- /// 检查是否处于战斗状态
- ///
- private bool IsInCombatState()
- {
- // 如果有当前工作且是战斗相关工作
- if (Sightstealer.CurJob != null)
- {
- JobDef jobDef = Sightstealer.CurJob.def;
- if (jobDef == JobDefOf.AttackMelee ||
- jobDef == JobDefOf.AttackStatic ||
- jobDef == JobDefOf.Wait_Combat ||
- jobDef == JobDefOf.Flee ||
- jobDef == JobDefOf.FleeAndCower)
- {
- return true;
- }
- }
-
- // 如果有敌人目标
- if (Sightstealer.mindState.enemyTarget != null)
- {
- return true;
- }
-
- // 如果最近受到过伤害
- if (Find.TickManager.TicksGame - Sightstealer.mindState.lastHarmTick < 300) // 最近5秒内受到伤害
- {
- return true;
- }
-
- // 如果最近攻击过目标
- if (Find.TickManager.TicksGame - Sightstealer.mindState.lastAttackTargetTick < 300)
- {
- return true;
- }
-
- return false;
- }
-
- ///
- /// 显示解除隐身的效果
- ///
- private void ShowRevealEffect(List enemies)
- {
- if (Sightstealer.Map == null) return;
-
- // 创建一个闪光效果
- FleckMaker.ThrowLightningGlow(Sightstealer.Position.ToVector3Shifted(),
- Sightstealer.Map, 2f);
-
- // 可选:播放声音
- if (Props.revealSound != null)
- {
- Props.revealSound.PlayOneShot(new TargetInfo(Sightstealer.Position, Sightstealer.Map));
- }
- }
-
- ///
- /// 发送解除隐身消息
- ///
- private void SendRevealMessage(List enemies)
- {
- if (enemies.Count == 0) return;
-
- string message;
- if (enemies.Count == 1)
- {
- message = "WFE.RevealedBySingleEnemy".Translate(
- Sightstealer.LabelShort,
- enemies[0].LabelShort
+ // 发送信件
+ Letter letter = LetterMaker.MakeLetter(
+ title,
+ text,
+ LetterDefOf.NeutralEvent,
+ new LookTargets(Sightstealer)
);
+
+ Find.LetterStack.ReceiveLetter(letter);
+
+ // 更新最后发信时间
+ lastLetterTick = currentTick;
}
- else
+ catch (System.Exception ex)
{
- message = "WFE.RevealedByMultipleEnemies".Translate(
- Sightstealer.LabelShort,
- enemies.Count
- );
+ Log.Error($"CompFighterInvisible: Error sending letter for {Sightstealer?.LabelCap}: {ex}");
}
-
- Messages.Message(message, Sightstealer, MessageTypeDefOf.NeutralEvent);
}
- ///
- /// 获取下次可以隐身的时间
- ///
- public int NextInvisibilityTick => lastDetectedTick + Props.stealthCooldownTicks;
+ // ... 其他方法保持不变 ...
///
/// 手动触发解除隐身(供外部调用)
@@ -269,6 +271,11 @@ namespace WulaFallenEmpire
Invisibility.BecomeVisible();
lastDetectedTick = Find.TickManager.TicksGame;
lastRevealedTick = Find.TickManager.TicksGame;
+
+ // 尝试发送信件
+ TrySendLetter("manual");
}
+
+ // ... 其他方法保持不变 ...
}
}
diff --git a/Source/WulaFallenEmpire/Pawn/WULA_Cat_Invisible/CompProperties_FighterInvisible.cs b/Source/WulaFallenEmpire/Pawn/WULA_Cat_Invisible/CompProperties_FighterInvisible.cs
index f48456db..3c925ba3 100644
--- a/Source/WulaFallenEmpire/Pawn/WULA_Cat_Invisible/CompProperties_FighterInvisible.cs
+++ b/Source/WulaFallenEmpire/Pawn/WULA_Cat_Invisible/CompProperties_FighterInvisible.cs
@@ -46,24 +46,31 @@ namespace WulaFallenEmpire
// 新增:是否忽略某些状态的敌人(如倒地、死亡等)
public bool ignoreDownedEnemies = true;
public bool ignoreSleepingEnemies = false;
-
+
+
+ // 新增:简化发信配置
+ public bool sendLetterOnReveal = false;
+ public string letterTitle = "";
+ public string letterText = "";
+ public int letterIntervalTicks = 1200;
+
public CompProperties_FighterInvisible()
{
compClass = typeof(CompFighterInvisible);
}
-
+
public override IEnumerable ConfigErrors(ThingDef parentDef)
{
foreach (string error in base.ConfigErrors(parentDef))
{
yield return error;
}
-
+
if (InvisibilityDef == null)
{
yield return "InvisibilityDef is not defined for CompProperties_FighterInvisible";
}
-
+
if (revealDetectionRadius <= 0)
{
revealDetectionRadius = FirstDetectedRadius;
diff --git a/Source/WulaFallenEmpire/PawnsArrivalMode/PawnsArrivalModeWorker_EdgeTeleport.cs b/Source/WulaFallenEmpire/PawnsArrivalMode/PawnsArrivalModeWorker_EdgeTeleport.cs
new file mode 100644
index 00000000..3dcb17b6
--- /dev/null
+++ b/Source/WulaFallenEmpire/PawnsArrivalMode/PawnsArrivalModeWorker_EdgeTeleport.cs
@@ -0,0 +1,183 @@
+using System.Collections.Generic;
+using RimWorld;
+using Verse;
+using Verse.AI;
+using Verse.Sound;
+
+namespace WulaFallenEmpire
+{
+ public class PawnsArrivalModeWorker_EdgeTeleport : PawnsArrivalModeWorker
+ {
+ public override void Arrive(List pawns, IncidentParms parms)
+ {
+ Map map = (Map)parms.target;
+
+ // 如果没有指定生成中心,则使用EdgeDrop的查找方式
+ if (!parms.spawnCenter.IsValid)
+ {
+ parms.spawnCenter = DropCellFinder.FindRaidDropCenterDistant(map);
+ }
+
+ // 为每个Pawn分配一个传送位置(在生成中心附近)
+ foreach (Pawn pawn in pawns)
+ {
+ if (pawn == null || pawn.Dead || pawn.Destroyed)
+ continue;
+
+ // 找到可用的传送位置
+ IntVec3 teleportPos = FindTeleportPosition(map, parms.spawnCenter);
+
+ // 如果Pawn已经在其他地图,需要先将其移到当前地图
+ if (pawn.Map != map)
+ {
+ // 确保Pawn不在任何地图中
+ if (pawn.Spawned)
+ {
+ pawn.DeSpawn();
+ }
+
+ // 将Pawn放入当前地图
+ GenSpawn.Spawn(pawn, teleportPos, map, parms.spawnRotation);
+ }
+ else
+ {
+ // 如果已经在当前地图,直接移动位置
+ pawn.Position = teleportPos;
+ pawn.Notify_Teleported(true, false);
+ }
+
+ // 播放传送效果
+ PlayTeleportEffect(pawn, teleportPos, map);
+
+ // 确保Pawn有适当的状态
+ EnsurePawnStateAfterTeleport(pawn);
+ }
+ }
+
+ public override bool TryResolveRaidSpawnCenter(IncidentParms parms)
+ {
+ Map map = (Map)parms.target;
+
+ // 与EdgeDrop相同的方式解析生成中心
+ if (!parms.spawnCenter.IsValid)
+ {
+ parms.spawnCenter = DropCellFinder.FindRaidDropCenterDistant(map);
+ }
+
+ parms.spawnRotation = Rot4.Random;
+ return true;
+ }
+
+ ///
+ /// 找到可用的传送位置
+ ///
+ private IntVec3 FindTeleportPosition(Map map, IntVec3 center)
+ {
+ // 在中心点附近寻找可用的单元格
+ // 我们使用与EdgeWalkInGroups类似的逻辑,但立即传送
+ if (CellFinder.TryFindRandomCellNear(center, map, 10,
+ c => c.Standable(map) &&
+ !c.Fogged(map) &&
+ c.GetRoof(map) != RoofDefOf.RoofRockThick && // 排除厚岩顶
+ map.reachability.CanReachColony(c),
+ out IntVec3 result))
+ {
+ return result;
+ }
+
+ // 如果找不到合适的单元格,使用备选方案
+ if (RCellFinder.TryFindRandomPawnEntryCell(out result, map, CellFinder.EdgeRoadChance_Hostile))
+ {
+ return result;
+ }
+
+ // 最后的手段:使用中心点
+ return center;
+ }
+
+ ///
+ /// 播放传送效果
+ ///
+ private void PlayTeleportEffect(Pawn pawn, IntVec3 pos, Map map)
+ {
+ try
+ {
+ // 播放Skip_ExitNoDelay效果
+ EffecterDef teleportEffect = DefDatabase.GetNamed("Skip_ExitNoDelay");
+ if (teleportEffect != null)
+ {
+ Effecter effecter = teleportEffect.Spawn();
+ effecter.ticksLeft = 30; // 设置效果持续时间
+ effecter.Trigger(new TargetInfo(pos, map), new TargetInfo(pos, map));
+ effecter.Cleanup();
+ }
+ else
+ {
+ // 如果找不到指定的效果,使用跳跃效果
+ EffecterDef jumpEffect = EffecterDefOf.Skip_Exit;
+ if (jumpEffect != null)
+ {
+ Effecter effecter = jumpEffect.Spawn();
+ effecter.ticksLeft = 30;
+ effecter.Trigger(new TargetInfo(pos, map), new TargetInfo(pos, map));
+ effecter.Cleanup();
+ }
+ }
+
+ // 可选:播放声音效果
+ SoundDef sound = SoundDefOf.PsychicPulseGlobal;
+ if (sound != null)
+ {
+ sound.PlayOneShot(new TargetInfo(pos, map));
+ }
+ }
+ catch (System.Exception ex)
+ {
+ Log.Warning($"Failed to play teleport effect for {pawn?.LabelCap}: {ex}");
+ }
+ }
+
+ ///
+ /// 确保Pawn传送后的状态
+ ///
+ private void EnsurePawnStateAfterTeleport(Pawn pawn)
+ {
+ if (pawn == null)
+ return;
+
+ // 重置当前工作
+ if (pawn.CurJob != null)
+ {
+ pawn.jobs.StopAll();
+ }
+
+ // 如果是殖民者或友军,设置为等待战斗状态
+ if (pawn.Faction == Faction.OfPlayer || !pawn.HostileTo(Faction.OfPlayer))
+ {
+ pawn.jobs.StartJob(new Job(JobDefOf.Wait_Combat, 600, true),
+ JobCondition.InterruptForced, null, false, true, null, null, false);
+ }
+
+ // 重置心理状态
+ if (pawn.mindState != null)
+ {
+ pawn.mindState.enemyTarget = null;
+ pawn.mindState.mentalStateHandler?.Reset();
+ }
+
+ // 如果是机械族,可能需要特殊处理
+ if (pawn.RaceProps.IsMechanoid)
+ {
+ var comp = pawn.GetComp();
+ if (comp != null)
+ {
+ // 如果是自主机械,确保进入适当状态
+ if (!pawn.Drafted && pawn.Faction == Faction.OfPlayer)
+ {
+ pawn.drafter.Drafted = false;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Source/WulaFallenEmpire/ThingComp/WULA_SkyfallerPawnSpawner/CompProperties_SkyfallerPawnSpawner.cs b/Source/WulaFallenEmpire/ThingComp/WULA_SkyfallerPawnSpawner/CompProperties_SkyfallerPawnSpawner.cs
index 8dcccf31..5c367dae 100644
--- a/Source/WulaFallenEmpire/ThingComp/WULA_SkyfallerPawnSpawner/CompProperties_SkyfallerPawnSpawner.cs
+++ b/Source/WulaFallenEmpire/ThingComp/WULA_SkyfallerPawnSpawner/CompProperties_SkyfallerPawnSpawner.cs
@@ -53,9 +53,6 @@ namespace WulaFallenEmpire
{
pawn.drafter.Drafted = true;
}
-
- // 发送生成消息
- Messages.Message("SkyfallerPawnLanded".Translate(pawn.LabelShortCap), pawn, MessageTypeDefOf.NeutralEvent);
}
private Faction GetFaction()
diff --git a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj
index 1bf373b7..25862d8d 100644
--- a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj
+++ b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj
@@ -250,6 +250,7 @@
+