diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll
index e4d77621..bc21300f 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 f0873acb..b093cf03 100644
--- a/1.6/1.6/Defs/BodyAndPartDefs/Bodyparts_WULA.xml
+++ b/1.6/1.6/Defs/BodyAndPartDefs/Bodyparts_WULA.xml
@@ -656,92 +656,6 @@
-
- WULA_Mobile_Bunker_Body
- 猫猫地堡
-
- Torso
- Middle
- Outside
-
- Torso
-
-
-
- WULA_Mobile_Bunker_Bodypart
- 0.025
- Outside
-
- Torso
-
-
-
- SightSensor
- 0.13
-
- Torso
-
-
-
- WULA_AI_Core_Bodypart
- 0.025
- Inside
-
- Torso
-
-
-
-
-
- Leg
- 抬碉堡的猫猫(其一)
- 0.13
- Bottom
-
- Legs
-
-
-
- Leg
- 抬碉堡的猫猫(其二)
- 0.13
- Bottom
-
- Legs
-
-
-
- Leg
- 抬碉堡的猫猫(其三)
- 0.13
- Bottom
-
- Legs
-
-
-
- Leg
- 抬碉堡的猫猫(其四)
- 0.13
- Bottom
-
- Legs
-
-
-
-
-
- WULA_Outer_Armor_Bodypart
- 0.99
- Top
-
- Torso
-
-
-
-
-
-
WULA_AI_Heavy_Panzer_Body
智能战车
diff --git a/1.6/1.6/Defs/DamageDefs/Damages_Wula.xml b/1.6/1.6/Defs/DamageDefs/Damages_Wula.xml
index 5c041dab..2b18f66a 100644
--- a/1.6/1.6/Defs/DamageDefs/Damages_Wula.xml
+++ b/1.6/1.6/Defs/DamageDefs/Damages_Wula.xml
@@ -287,7 +287,7 @@
Blast_WULA_Plasma_Explosive
(0.2, 0.8, 0.3)
(0.1, 0.9, 0.5)
- ElectricalSpark_WULA_Plasma_Explosive
+
Explosion_EMP
Damage_Bomb
@@ -431,6 +431,8 @@
WULA_Disturber_Turret_Bomb_Shockwave
+ 10
+ 10
@@ -462,6 +464,8 @@
WULA_Disturber_Turret_Bomb_Shockwave
+ 10
+ 10
@@ -482,6 +486,39 @@
-->
+
+ WULA_Sow_Excavator_Shoke_Damage
+ 高能震波
+
+ WulaFallenEmpire.DamageWorker_ExplosionWithTerrain
+ 1
+ 10
+ 2
+
+ WULA_Disturber_Turret_Bomb_Shockwave
+ 10
+ 10
+
+
+
+ SoilRich
+
+
+
+
WULA_DarkMatterBomb
diff --git a/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml b/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml
index 1c4366fe..91bef6b1 100644
--- a/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml
+++ b/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml
@@ -144,6 +144,31 @@
9999~9999
+
+ Mech_WULA_Fire_Cat
+ CAt-55"突击猫猫"
+ Mech_WULA_Fire_Cat
+ 500
+ AncientsHostile
+ true
+ true
+ true
+
+
+
+ Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin
+ Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None
+ CutoutWithOverlay
+ Graphic_Multi
+ 1.2
+
+
+
+
+ Wula_Assault_Cat_Weapon
+
+ 9999~9999
+
Wula_AI_Heavy_Panzer
diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Colony_Promotion.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Colony_Promotion.xml
index 8a5445ca..7d0cd0b5 100644
--- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Colony_Promotion.xml
+++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Colony_Promotion.xml
@@ -331,14 +331,38 @@
Raids
1.0
- 0.25
+ 1.25
0.04
1~2
- 1.1
+ 2.5
500
+
+
+ 300000
+
+
+
+ 挖掘机袭击
+ NegativeEvent
+ 几个高速移动的黑点正在拖着浓浓的黑烟尾迹飞向殖民地······那是什么?
+
+
+ wulaCombatExcavatorComing
+
+
+ wulaCombatExcavatorComing
+ WULA_Combat_Excavator_Hostile_Incoming
+ 4
+ true
+ false
+ false
+
+
+
+
@@ -552,7 +576,7 @@
Wula/Events/Portraits/WULA_Legion_2
「军团」,P.I.A
- 看起来你们的殖民地还不错,井井有条并且符合帝国法典和章程——你们值得一个更高位的许可,稍后我会通过运输舱把晋升许可寄给你们。\n\n此外,我也将你们的支援系统重置了,你们可以再次申请之前申请过的支援,并且新的支援也会开放给你们。继续发展你们的殖民地,我就能帮你们申请更高级的权限。\n\n帝国荣光永存。
+ 哎呀,看起来好像出了一些小意外,不过你们的殖民地很好地解决了问题,井井有条并且符合帝国法典和章程——你们值得一个更高位的许可,稍后我会通过运输舱把晋升许可寄给你们。\n\n此外,我也将你们的支援系统重置了,你们可以再次申请之前申请过的支援,并且新的支援也会开放给你们。继续发展你们的殖民地,我就能帮你们申请更高级的权限。\n\n帝国荣光永存。
diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_NewColony.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_NewColony.xml
index e84785d0..876bba98 100644
--- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_NewColony.xml
+++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_NewColony.xml
@@ -1,12 +1,22 @@
+
+ WULA_GiveQuest_Intro_NewColony
+ GiveQuest
+ 乌拉帝国的新殖民地介绍
+
+ Map_PlayerHome
+
+ WULA_Intro_NewColony
+ IncidentWorker_GiveQuest
+ 0
+
WULA_Intro_NewColony
0
false
true
1
- true
false
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 98f4f475..5df23af7 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
@@ -43,6 +43,90 @@
+
+
+
+
+
+
+ questName->挖掘机空袭
+
+
+
+
+
+
+ questDescription->乌拉帝国进步派叛军向殖民地发射了挖掘机集群!
+
+
+
+
+ 挖掘机空袭
+ NegativeEvent
+ 乌拉帝国进步派叛军向殖民地发射了挖掘机集群!
+
+
+ WULA_Combat_Excavator_Hostile_Incoming
+ 1
+ true
+ false
+ false
+
+
+ $points
+ 2999
+
+
+
+
+ WULA_Combat_Excavator_Hostile_Incoming
+ 1
+ true
+ false
+ false
+
+
+
+
+
+ $points
+ 5999
+
+
+
+
+ WULA_Combat_Excavator_Hostile_Incoming
+ 1
+ true
+ false
+ false
+
+
+
+
+
+ $points
+ 9999
+
+
+
+
+ WULA_Combat_Excavator_Hostile_Incoming
+ 2
+ true
+ false
+ false
+
+
+
+
+
+ Wula_PIA_Legion_Faction
+ 10
+ WULA_Attack_Progressive
+
+
+
@@ -60,6 +144,11 @@
+
+ 游击队攻击
+ NegativeEvent
+ 乌拉帝国进步派叛军的派出了一支游击队攻击殖民地!
+
Wula_Progressive_Faction
true
@@ -68,6 +157,11 @@
乌拉帝国 进步派的游击队
一群乌拉帝国进步派的游击队正在攻击你的殖民地!
+
+ Wula_PIA_Legion_Faction
+ 10
+ WULA_Attack_Progressive
+
@@ -305,6 +399,11 @@
+
+ Wula_PIA_Legion_Faction
+ 10
+ WULA_Attack_Progressive
+
@@ -326,6 +425,7 @@
Mech_WULA_Cat_Cloak_Sniper_Incoming
+ true
1
false
false
@@ -339,6 +439,7 @@
Mech_WULA_Cat_Cloak_Sniper_Incoming
1
+ true
false
false
@@ -353,6 +454,7 @@
Mech_WULA_Cat_Cloak_Sniper_Incoming
+ true
1
false
false
@@ -368,6 +470,7 @@
Mech_WULA_Cat_Cloak_Sniper_Incoming
+ true
2
false
false
@@ -380,11 +483,6 @@
-
- Wula_PIA_Legion_Faction
- 10
- WULA_Attack_Progressive
-
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 b051bf82..afd0b9fb 100644
--- a/1.6/1.6/Defs/ResearchProjectDefs/WULA_ResearchProjects_Remake.xml
+++ b/1.6/1.6/Defs/ResearchProjectDefs/WULA_ResearchProjects_Remake.xml
@@ -506,6 +506,20 @@
WULA_Colony_License_LV2_Technology
+
+ WULA_Sow_Excavator_Technology
+ 7.00
+ 1.50
+ 挖掘机许可
+ 允许殖民地申请空投挖掘机,一种一次性的工业设备,可以将附近的土壤变得适宜播种——当然也能杀人。
+ 1500
+
+ WULA_Bunker_Drop_Technology
+
+
+ WULA_Colony_License_LV2_Technology
+
+
WULA_Turret_Base_Mortar_Technology
10.00
@@ -518,6 +532,17 @@
WULA_Synth_Armor_2_Technology
+
+ WULA_Combat_Excavator_Technology
+ 9.00
+ 1.50
+ 战斗挖掘机许可
+ 允许殖民地申请空投战斗挖掘机,一种一次性的工业设备,可以引发毁灭性的熔岩崩塌,攻击结束后会同步部署烟雾弹和机械体辅助进攻。
+ 3500
+
+ WULA_Colony_License_LV3_Technology
+
+
Wula_Disturber_Turret_Technology
11.00
diff --git a/1.6/1.6/Defs/Scenarios/Scenarios_WULA.xml b/1.6/1.6/Defs/Scenarios/Scenarios_WULA.xml
index 98daa034..500c7d29 100644
--- a/1.6/1.6/Defs/Scenarios/Scenarios_WULA.xml
+++ b/1.6/1.6/Defs/Scenarios/Scenarios_WULA.xml
@@ -153,9 +153,9 @@
-
- CreateQuest
- WULA_Intro_NewColony
+
+ CreateIncident
+ WULA_GiveQuest_Intro_NewColony
@@ -259,9 +259,9 @@
-
- CreateQuest
- WULA_Intro_NewColony
+
+ CreateIncident
+ WULA_GiveQuest_Intro_NewColony
diff --git a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Misc_Buildings.xml b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Misc_Buildings.xml
index dafccd7a..3d60d825 100644
--- a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Misc_Buildings.xml
+++ b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Misc_Buildings.xml
@@ -1068,138 +1068,4 @@
-
-
-
- WULA_Combat_Excavator
- 战斗挖掘机
- 乌拉帝国用于发起游击战的隧道挖掘机,在指定地点部署后,钻机将通过高速旋转的刀片引发若干次地震冲击波,随后将单位一股脑放出。
- WulaFallenEmpire.Building_ExtraGraphics
- true
- Building
- 50
- true
- PassThroughOnly
- 1
- (1,1)
- true
- None
- (0.56, 0.62, 0.9)
- Wula/Building/Flag/WULA_Flag_Building_A
- WULA_Buildings
- false
-
- Wula/Building/Flag/WULA_Flag_Building_Mount
- Graphic_Single
- (1,1)
-
-
- 4
-
-
- 99999
- 0
- 1000
- 5
-
- Normal
- true
- false
- North
- true
- Light
- BulletImpact_Metal
- true
- RealtimeOnly
- ConstructMetal
- true
-
-
- false
- BuildingDestroyed_Metal_Big
- true
- true
-
-
-
-
-
-
- Wula_Progressive_Faction
- true
- false
-
-
- 3
- (120,240,252,0)
-
-
- 240
- 180
-
-
-
- WULA_Combat_Excavator_Shoke_S_Damage
- 6
- 2
- 5
-
-
- WULA_Combat_Excavator_Shoke_S_Damage
- 9
- 2
- 5
-
-
- WULA_Combat_Excavator_Shoke_Damage
- 9
- 2
- 5
-
-
- Smoke
- 12
- BlindSmoke
- 2
- 0
-
-
-
-
- Mech_WULA_Cat_Constructor
- Mech_WULA_Cat_Assault
-
-
- 3
- 180
-
-
-
\ No newline at end of file
diff --git a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Shuttle_Building.xml b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Shuttle_Building.xml
index ce337829..965b8960 100644
--- a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Shuttle_Building.xml
+++ b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Shuttle_Building.xml
@@ -253,9 +253,6 @@
ITab_ContentsTransporter
ITab_Shells
-
- Shuttles
-
Ship_ArmedShuttle
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 773f90c7..3bc05b5f 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
@@ -1756,6 +1756,727 @@
+
+
+ WULA_Combat_Excavator_Cleanzone
+ DBm-6"战斗挖掘机"
+ 清理出一块场地并准备好资源,使得乌拉帝国可以向此处投放建筑。\n\nDBm-6"战斗挖掘机"是乌拉帝国用于破坏阵地的挖掘机,从天而降部署在指定地点后,钻机将通过高速旋转的刀片引发若干次地震冲击波,随后将舱内单位一股脑放出。
+ Wula/Building/WULA_Combat_Excavator_Icon
+ MinifiedThing
+ Normal
+ None
+
+ WULA_Combat_Excavator
+
+
+ BuildingsMisc
+
+
+ Wula/Building/WULA_Dropping_Building_Cleanzone
+ Graphic_Multi
+ (1,1)
+
+ false
+
+
+ Building
+ PassThroughOnly
+ 40
+ false
+ 0.5
+ false
+ false
+ false
+
+ WULA_Combat_Excavator_Technology
+
+
+ 0
+ 1
+ 0
+ 1
+ 0
+
+ (1,1)
+ 0
+ 0
+
+ 20
+ 1
+ 1
+
+
+ false
+ BuildingDestroyed_Metal_Small
+
+
+ WulaFallenEmpire.PlaceWorker_CustomRadius
+
+ WULA_Buildings
+
+
+ 9
+ (0.5, 0.25, 0.25)
+ 0
+ true
+ 冲击半径
+ 钻机降落后,地震波影响的最大范围
+ true
+
+
+ WULA_Combat_Excavator_Incoming
+ true
+ 1
+ true
+ false
+
+
+
+
+ WULA_Combat_Excavator_Incoming
+ DBm-6"战斗挖掘机"(空投中)
+ (1,1)
+
+ Wula/Building/WULA_Combat_Excavator_Incoming
+ Graphic_Single
+ CutoutFlying
+ (4,4)
+
+
+ Accelerate
+ Things/Skyfaller/SkyfallerShadowDropPod
+ (2, 2)
+ DropPod_Fall
+ 100
+ Explosion_Vaporize
+ 0.05
+ 1
+ 1
+
+
+ (0,0)
+ (1, 1)
+
+
+ WULA_Combat_Excavator
+
+
+
+ Smoke_Joint
+
+
+
+
+ WULA_Combat_Excavator
+ DBm-6"战斗挖掘机"
+ 乌拉帝国用于破坏阵地的挖掘机,从天而降部署在指定地点后,钻机将通过高速旋转的刀片引发若干次地震冲击波,随后将舱内单位一股脑放出。
+
+ true
+ Building
+ 50
+ true
+ PassThroughOnly
+ 1
+ (1,1)
+ true
+ None
+ (0.56, 0.62, 0.9)
+ Wula/Building/WULA_Combat_Excavator_Icon
+ WULA_Buildings
+ false
+
+ Wula/Building/WULA_Combat_Excavator
+ Graphic_Single
+ (4,4)
+
+
+ 20
+ 1
+ 1
+
+
+ 5000
+ 0
+ 1000
+ 5
+
+ Normal
+ true
+ false
+ North
+ true
+ Light
+ BulletImpact_Metal
+ true
+ RealtimeOnly
+ ConstructMetal
+ true
+
+ true
+ false
+ BuildingDestroyed_Metal_Big
+ true
+ true
+ false
+
+ WULA_Excavator_Blade
+
+
+
+
+ WULA_Combat_Excavator_Shoke_Damage
+ 0.01
+
+
+ WULA_Combat_Excavator_Shoke_S_Damage
+ 0.01
+
+
+ WULA_Sow_Excavator_Shoke_Damage
+ 0.01
+
+
+
+
+
+
+ true
+ false
+
+
+ 3
+ (120,240,252,0)
+
+
+ 120
+ 90
+
+
+
+ WULA_Combat_Excavator_Shoke_S_Damage
+ 6
+ 2
+ 50
+ Wula_Disturber_Turret_Weapon_Explosive
+
+
+ WULA_Combat_Excavator_Shoke_S_Damage
+ 9
+ 2
+ 50
+ 0.9
+ Wula_Disturber_Turret_Weapon_Explosive
+
+
+ WULA_Combat_Excavator_Shoke_Damage
+ 9
+ 2
+ 500
+ 0.9
+ Wula_Disturber_Turret_Weapon_Explosive
+
+
+ Smoke
+ 12
+ BlindSmoke
+ 2
+ 0
+ Explosion_Smoke
+
+
+
+
+ Mech_WULA_Fire_Cat
+
+
+ 12
+ 30
+
+
+ 9000
+
+
+
+
+ WULA_Sow_Excavator_Cleanzone
+ DSm-6"挖掘机"
+ 清理出一块场地并准备好资源,使得乌拉帝国可以向此处投放建筑。\n\nDSm-6"挖掘机"是一种通过空投部署的挖掘机,钻机可以通过高速震动将附近的土壤翻出,使得整片区域变得松软易于种植。这种设备的震波杀伤力极大,工作期间切勿靠近!
+ Wula/Building/WULA_Sow_Excavator_Icon
+ MinifiedThing
+ Normal
+ None
+
+ WULA_Combat_Excavator
+
+
+ BuildingsMisc
+
+
+ Wula/Building/WULA_Dropping_Building_Cleanzone
+ Graphic_Multi
+ (1,1)
+
+ false
+
+
+ Building
+ PassThroughOnly
+ 40
+ false
+ 0.5
+ false
+ false
+ false
+
+ WULA_Sow_Excavator_Technology
+
+
+ 0
+ 1
+ 0
+ 1
+ 0
+
+ (1,1)
+ 0
+ 0
+
+ 50
+ 2
+ 1
+
+
+ false
+ BuildingDestroyed_Metal_Small
+
+
+ WulaFallenEmpire.PlaceWorker_CustomRadius
+
+ WULA_Buildings
+
+
+ 13
+ (0.5, 0.6, 0.25)
+ 0
+ true
+ 冲击半径
+ 钻机降落后,地震波影响的最大范围
+ true
+
+
+ WULA_Sow_Excavator_Incoming
+ true
+ 1
+ true
+ false
+
+
+
+
+ WULA_Sow_Excavator_Incoming
+ DSm-6"挖掘机"(空投中)
+ (1,1)
+
+ Wula/Building/WULA_Combat_Excavator_Incoming
+ Graphic_Single
+ CutoutFlying
+ (4,4)
+
+
+ Accelerate
+ Things/Skyfaller/SkyfallerShadowDropPod
+ (2, 2)
+ DropPod_Fall
+ 100
+ Explosion_Vaporize
+ 0.05
+ 1
+ 1
+
+
+ (0,0)
+ (1, 1)
+
+
+ WULA_Sow_Excavator
+
+
+
+ Smoke_Joint
+
+
+
+
+ WULA_Sow_Excavator
+ DSm-6"挖掘机"
+ 一种通过空投部署的挖掘机,钻机可以通过高速震动将附近的土壤翻出,使得整片区域变得松软易于种植。这种设备的震波杀伤力极大,工作期间切勿靠近!
+
+ true
+ Building
+ 50
+ true
+ PassThroughOnly
+ 1
+ (1,1)
+ true
+ None
+ (0.56, 0.62, 0.9)
+ Wula/Building/WULA_Sow_Excavator_Icon
+ false
+
+ Wula/Building/WULA_Combat_Excavator
+ Graphic_Single
+ (4,4)
+
+
+ 50
+ 2
+ 1
+
+
+ 5000
+ 0
+ 1000
+ 5
+
+ Normal
+ true
+ false
+ North
+ true
+ Light
+ BulletImpact_Metal
+ true
+ RealtimeOnly
+ ConstructMetal
+ true
+
+
+ true
+ false
+ BuildingDestroyed_Metal_Big
+ true
+ true
+ false
+
+ WULA_Excavator_Blade
+
+
+
+
+
+ WULA_Combat_Excavator_Shoke_Damage
+ 0.01
+
+
+ WULA_Combat_Excavator_Shoke_S_Damage
+ 0.01
+
+
+ WULA_Sow_Excavator_Shoke_Damage
+ 0.01
+
+
+
+
+
+ true
+ false
+
+
+ 3
+ (120,240,252,0)
+
+
+ 120
+ 90
+
+
+
+ WULA_Sow_Excavator_Shoke_Damage
+ 6
+ 2
+ 1
+ Wula_Disturber_Turret_Weapon_Explosive
+
+
+ WULA_Sow_Excavator_Shoke_Damage
+ 9
+ 2
+ 1
+ Wula_Disturber_Turret_Weapon_Explosive
+
+
+ WULA_Sow_Excavator_Shoke_Damage
+ 13
+ 2
+ 20
+ Wula_Disturber_Turret_Weapon_Explosive
+
+
+
+ 0
+ 30
+
+
+ 9000
+
+
+
+
+
+ WULA_Combat_Excavator_Hostile_Incoming
+ DBm-6"战斗挖掘机"(空投中)
+ (1,1)
+
+ Wula/Building/WULA_Combat_Excavator_Incoming
+ Graphic_Single
+ CutoutFlying
+ (4,4)
+
+
+ Accelerate
+ Things/Skyfaller/SkyfallerShadowDropPod
+ (2, 2)
+ DropPod_Fall
+ 100
+ Explosion_Vaporize
+ 0.05
+ 1
+ 1
+
+
+ (0,0)
+ (1, 1)
+
+
+ WULA_Combat_Excavator_Hostile
+
+
+
+ Smoke_Joint
+
+
+
+
+ WULA_Combat_Excavator_Hostile
+ DBm-6"战斗挖掘机"
+ 乌拉帝国用于破坏阵地的挖掘机,从天而降部署在指定地点后,钻机将通过高速旋转的刀片引发若干次地震冲击波,随后将舱内单位一股脑放出。
+
+ true
+ Building
+ 50
+ true
+ PassThroughOnly
+ 1
+ (1,1)
+ true
+ None
+ (0.56, 0.62, 0.9)
+ Wula/Building/WULA_Combat_Excavator_Icon
+ WULA_Buildings
+ false
+
+ Wula/Building/WULA_Combat_Excavator
+ Graphic_Single
+ (4,4)
+
+
+ 20
+ 1
+ 1
+
+
+ 5000
+ 0
+ 1000
+ 5
+
+ Normal
+ true
+ false
+ North
+ true
+ Light
+ BulletImpact_Metal
+ true
+ RealtimeOnly
+ ConstructMetal
+ true
+
+ true
+ false
+ BuildingDestroyed_Metal_Big
+ true
+ true
+ false
+
+ WULA_Excavator_Blade
+
+
+
+
+ WULA_Combat_Excavator_Shoke_Damage
+ 0.01
+
+
+ WULA_Combat_Excavator_Shoke_S_Damage
+ 0.01
+
+
+ WULA_Sow_Excavator_Shoke_Damage
+ 0.01
+
+
+
+
+
+ Wula_Progressive_Faction
+ true
+ false
+
+
+ 3
+ (120,240,252,0)
+
+
+ 120
+ 90
+
+
+
+ WULA_Combat_Excavator_Shoke_S_Damage
+ 5
+ 2
+ 10
+ Wula_Disturber_Turret_Weapon_Explosive
+
+
+ WULA_Combat_Excavator_Shoke_S_Damage
+ 7
+ 2
+ 10
+ 0.9
+ Wula_Disturber_Turret_Weapon_Explosive
+
+
+ WULA_Combat_Excavator_Shoke_Damage
+ 7
+ 2
+ 20
+ 0.9
+ Wula_Disturber_Turret_Weapon_Explosive
+
+
+ Smoke
+ 12
+ BlindSmoke
+ 2
+ 0
+ Explosion_Smoke
+
+
+
+
+ Mech_WULA_Fire_Cat
+
+
+ 16
+ 30
+
+
+ 9000
+
+
+
+
WULA_Wall_Flag_Building
diff --git a/1.6/1.6/Defs/ThingDefs_Misc/WULA_Item.xml b/1.6/1.6/Defs/ThingDefs_Misc/WULA_Item.xml
index 36e5ef42..6fbf3b4a 100644
--- a/1.6/1.6/Defs/ThingDefs_Misc/WULA_Item.xml
+++ b/1.6/1.6/Defs/ThingDefs_Misc/WULA_Item.xml
@@ -293,7 +293,7 @@
50
- ResourcesRaw
+ Items
false
false
@@ -317,7 +317,31 @@
0.01
- ResourcesRaw
+ Items
+
+ false
+ false
+
+
+ WULA_Excavator_Blade
+ 挖掘机刀片
+ DSm-6"挖掘机"和DBm-6"战斗挖掘机"所使用的刀片,质地超乎想象地坚硬,即使是使用乌拉帝国舰队的设施也无法加工这种刀片,只能从其他工业星域运输过来。\n\n乌拉帝国的进步派叛军似乎往边缘世界运了不少这个玩意,难怪她们可以像不要钱一样扔钻机。
+
+ Wula/Item/WULA_Excavator_Blade
+ Graphic_Single
+
+ None
+ false
+ Metal_Drop
+ Metal_Drop
+ false
+ false
+
+ 1
+ 0.01
+
+
+ Items
false
false
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 b6f91050..3a6733ab 100644
--- a/1.6/1.6/Defs/ThingDefs_Races/Races_Wulaspecies.xml
+++ b/1.6/1.6/Defs/ThingDefs_Races/Races_Wulaspecies.xml
@@ -1072,6 +1072,35 @@
+
+ Mech_WULA_Fire_Cat
+ CAt-55"突击猫猫"
+ 乌拉帝国的一种小型自律机械体,无需监管者。它们寿命有限,只会跟随某些自杀式袭击而出现。
+ Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin_south
+
+
+ WULA_Mech_Flyer_Constant
+
+
+
+ true
+
+
+ false
+
+
+
+ 0.5
+ 0.5
+
+ 4
+
+
+
+ 10000
+
+
+
@@ -1095,7 +1124,7 @@
0.75
- WULA_Mobile_Bunker_Body
+
5
diff --git a/Content/Textures/Wula/Building/WULA_Combat_Excavator.png b/Content/Textures/Wula/Building/WULA_Combat_Excavator.png
new file mode 100644
index 00000000..2696b0ae
Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_Combat_Excavator.png differ
diff --git a/Content/Textures/Wula/Building/WULA_Combat_Excavator_Icon.png b/Content/Textures/Wula/Building/WULA_Combat_Excavator_Icon.png
new file mode 100644
index 00000000..0bfd5ec0
Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_Combat_Excavator_Icon.png differ
diff --git a/Content/Textures/Wula/Building/WULA_Combat_Excavator_Incoming.png b/Content/Textures/Wula/Building/WULA_Combat_Excavator_Incoming.png
new file mode 100644
index 00000000..dea9c231
Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_Combat_Excavator_Incoming.png differ
diff --git a/Content/Textures/Wula/Building/WULA_Sow_Excavator_Icon.png b/Content/Textures/Wula/Building/WULA_Sow_Excavator_Icon.png
new file mode 100644
index 00000000..5a5bbd36
Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_Sow_Excavator_Icon.png differ
diff --git a/Content/Textures/Wula/Item/WULA_Excavator_Blade.png b/Content/Textures/Wula/Item/WULA_Excavator_Blade.png
new file mode 100644
index 00000000..66a7b9c0
Binary files /dev/null and b/Content/Textures/Wula/Item/WULA_Excavator_Blade.png differ
diff --git a/Content/Textures/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_east.png b/Content/Textures/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_east.png
deleted file mode 100644
index c12e0aed..00000000
Binary files a/Content/Textures/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_east.png and /dev/null differ
diff --git a/Content/Textures/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_north.png b/Content/Textures/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_north.png
deleted file mode 100644
index da83a87e..00000000
Binary files a/Content/Textures/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_north.png and /dev/null differ
diff --git a/Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_east.dds b/Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_east.dds
similarity index 100%
rename from Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_east.dds
rename to Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_east.dds
diff --git a/Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_east.png b/Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_east.png
similarity index 100%
rename from Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_east.png
rename to Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_east.png
diff --git a/Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_north.dds b/Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_north.dds
similarity index 100%
rename from Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_north.dds
rename to Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_north.dds
diff --git a/Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_north.png b/Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_north.png
similarity index 100%
rename from Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_north.png
rename to Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_north.png
diff --git a/Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_south.dds b/Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_south.dds
similarity index 100%
rename from Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_south.dds
rename to Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_south.dds
diff --git a/Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_south.png b/Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_south.png
similarity index 100%
rename from Content/Textures/Wula/Things/WULA_Attack_Cat/AllegianceOverlays/None_south.png
rename to Content/Textures/Wula/Things/WULA_Fire_Cat/AllegianceOverlays/None_south.png
diff --git a/Content/Textures/Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin_east.png b/Content/Textures/Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin_east.png
new file mode 100644
index 00000000..1889511f
Binary files /dev/null and b/Content/Textures/Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin_east.png differ
diff --git a/Content/Textures/Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin_north.png b/Content/Textures/Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin_north.png
new file mode 100644
index 00000000..74b079bb
Binary files /dev/null and b/Content/Textures/Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin_north.png differ
diff --git a/Content/Textures/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.png b/Content/Textures/Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin_south.png
similarity index 52%
rename from Content/Textures/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.png
rename to Content/Textures/Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin_south.png
index 64b9703a..62a3dca4 100644
Binary files a/Content/Textures/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.png and b/Content/Textures/Wula/Things/WULA_Fire_Cat/WULA_Cat_Thin_south.png differ
diff --git a/Source/WulaFallenEmpire/QuestNodes/QuestNode_SpawnPrefabSkyfallerCaller.cs b/Source/WulaFallenEmpire/QuestNodes/QuestNode_SpawnPrefabSkyfallerCaller.cs
index cad7a444..c46a2cb4 100644
--- a/Source/WulaFallenEmpire/QuestNodes/QuestNode_SpawnPrefabSkyfallerCaller.cs
+++ b/Source/WulaFallenEmpire/QuestNodes/QuestNode_SpawnPrefabSkyfallerCaller.cs
@@ -20,6 +20,18 @@ namespace WulaFallenEmpire
public SlateRef sendMessageOnFailure = true;
public SlateRef allowThickRoof = false;
public SlateRef allowThinRoof = true;
+
+ // 新增:是否启用分散算法
+ public SlateRef spreadOut = false;
+
+ // 新增:最小间隔距离(以单元格为单位)
+ public SlateRef minSpacing = 5;
+
+ // 新增:是否只对小型目标使用分散算法
+ public SlateRef onlyForSmallTargets = true;
+
+ // 新增:小型目标的定义(最大尺寸)
+ public SlateRef smallTargetMaxSize = 3;
protected override bool TestRunInt(Slate slate)
{
@@ -53,6 +65,10 @@ namespace WulaFallenEmpire
bool doSendMessageOnFailure = sendMessageOnFailure.GetValue(slate);
bool targetAllowThickRoof = allowThickRoof.GetValue(slate);
bool targetAllowThinRoof = allowThinRoof.GetValue(slate);
+ bool doSpreadOut = spreadOut.GetValue(slate);
+ int targetMinSpacing = minSpacing.GetValue(slate);
+ bool targetOnlyForSmallTargets = onlyForSmallTargets.GetValue(slate);
+ int targetSmallTargetMaxSize = smallTargetMaxSize.GetValue(slate);
if (targetThingDef == null)
{
@@ -66,36 +82,369 @@ namespace WulaFallenEmpire
return;
}
- Log.Message($"[QuestNode] Attempting to spawn {targetSpawnCount} {targetThingDef.defName} on map {targetMap}");
+ // 创建QuestPart来延迟执行,等待信号
+ QuestPart_SpawnPrefabSkyfallerCaller questPart = new QuestPart_SpawnPrefabSkyfallerCaller
+ {
+ thingDef = targetThingDef,
+ faction = targetFaction,
+ spawnCount = targetSpawnCount,
+ map = targetMap,
+ sendMessageOnSuccess = doSendMessageOnSuccess,
+ sendMessageOnFailure = doSendMessageOnFailure,
+ allowThickRoof = targetAllowThickRoof,
+ allowThinRoof = targetAllowThinRoof,
+ spreadOut = doSpreadOut,
+ minSpacing = targetMinSpacing,
+ onlyForSmallTargets = targetOnlyForSmallTargets,
+ smallTargetMaxSize = targetSmallTargetMaxSize,
+ inSignal = QuestGenUtility.HardcodedSignalWithQuestID(inSignal.GetValue(slate))
+ };
- // 执行生成
- int successCount = SpawnThingsAtValidLocations(targetThingDef, targetFaction, targetSpawnCount, targetMap, targetAllowThickRoof, targetAllowThinRoof);
+ // 将QuestPart添加到Quest中
+ QuestGen.quest.AddPart(questPart);
+
+ // 设置输出变量
+ QuestGen.slate.Set("prefabSpawnSuccessCount", questPart.successCount);
+ QuestGen.slate.Set("prefabSpawnRequestedCount", targetSpawnCount);
+ }
+ }
+ // 新增:QuestPart来管理延迟执行
+ public class QuestPart_SpawnPrefabSkyfallerCaller : QuestPart
+ {
+ public string inSignal;
+ public ThingDef thingDef;
+ public Faction faction;
+ public int spawnCount = 1;
+ public Map map;
+ public bool sendMessageOnSuccess = true;
+ public bool sendMessageOnFailure = true;
+ public bool allowThickRoof = false;
+ public bool allowThinRoof = true;
+
+ // 新增:分散算法相关
+ public bool spreadOut = false;
+ public int minSpacing = 5;
+ public bool onlyForSmallTargets = true;
+ public int smallTargetMaxSize = 3;
+
+ // 输出变量
+ public int successCount = 0;
+
+ public override void ExposeData()
+ {
+ base.ExposeData();
+ Scribe_Values.Look(ref inSignal, "inSignal");
+ Scribe_Defs.Look(ref thingDef, "thingDef");
+ Scribe_References.Look(ref faction, "faction");
+ Scribe_Values.Look(ref spawnCount, "spawnCount", 1);
+ Scribe_References.Look(ref map, "map");
+ Scribe_Values.Look(ref sendMessageOnSuccess, "sendMessageOnSuccess", true);
+ Scribe_Values.Look(ref sendMessageOnFailure, "sendMessageOnFailure", true);
+ Scribe_Values.Look(ref allowThickRoof, "allowThickRoof", false);
+ Scribe_Values.Look(ref allowThinRoof, "allowThinRoof", true);
+ Scribe_Values.Look(ref spreadOut, "spreadOut", false);
+ Scribe_Values.Look(ref minSpacing, "minSpacing", 5);
+ Scribe_Values.Look(ref onlyForSmallTargets, "onlyForSmallTargets", true);
+ Scribe_Values.Look(ref smallTargetMaxSize, "smallTargetMaxSize", 3);
+ Scribe_Values.Look(ref successCount, "successCount", 0);
+ }
+
+ public override void Notify_QuestSignalReceived(Signal signal)
+ {
+ base.Notify_QuestSignalReceived(signal);
+
+ // 检查是否是我们等待的信号
+ if (!(signal.tag == inSignal))
+ {
+ return;
+ }
+
+ if (thingDef == null)
+ {
+ Log.Error("[QuestPart] ThingDef is null");
+ return;
+ }
+
+ if (map == null)
+ {
+ Log.Error("[QuestPart] Map is null");
+ return;
+ }
+
+ Log.Message($"[QuestPart] Received signal {inSignal}, spawning {spawnCount} {thingDef.defName} on map {map}");
+
+ // 执行生成逻辑
+ successCount = ExecuteSpawnLogic();
+
// 发送结果消息
if (successCount > 0)
{
- if (doSendMessageOnSuccess)
+ if (sendMessageOnSuccess)
{
- Messages.Message($"[Quest] Successfully spawned {successCount} {targetThingDef.label}", MessageTypeDefOf.PositiveEvent);
+ Messages.Message($"[Quest] Successfully spawned {successCount} {thingDef.label}", MessageTypeDefOf.PositiveEvent);
}
- Log.Message($"[QuestNode] Successfully spawned {successCount}/{targetSpawnCount} {targetThingDef.defName}");
+ Log.Message($"[QuestPart] Successfully spawned {successCount}/{spawnCount} {thingDef.defName}");
}
else
{
- if (doSendMessageOnFailure)
+ if (sendMessageOnFailure)
{
- Messages.Message($"[Quest] Failed to spawn any {targetThingDef.label}", MessageTypeDefOf.NegativeEvent);
+ Messages.Message($"[Quest] Failed to spawn any {thingDef.label}", MessageTypeDefOf.NegativeEvent);
+ }
+ Log.Warning($"[QuestPart] Failed to spawn any {thingDef.defName}");
+ }
+ }
+
+ private int ExecuteSpawnLogic()
+ {
+ // 检查是否应该使用分散算法
+ bool useSpreadOutAlgorithm = spreadOut;
+ if (onlyForSmallTargets)
+ {
+ // 检查目标是否为小型目标
+ bool isSmallTarget = thingDef.Size.x <= smallTargetMaxSize &&
+ thingDef.Size.z <= smallTargetMaxSize;
+ useSpreadOutAlgorithm = useSpreadOutAlgorithm && isSmallTarget;
+
+ if (spreadOut && !isSmallTarget)
+ {
+ Log.Message($"[QuestPart] Target {thingDef.defName} is not considered small (size {thingDef.Size.x}x{thingDef.Size.z}), not using spread-out algorithm");
}
- Log.Warning($"[QuestNode] Failed to spawn any {targetThingDef.defName}");
}
- // 将结果存储到Slate中,供后续节点使用
- QuestGen.slate.Set("prefabSpawnSuccessCount", successCount);
- QuestGen.slate.Set("prefabSpawnRequestedCount", targetSpawnCount);
+ // 执行生成
+ if (useSpreadOutAlgorithm)
+ {
+ return SpawnThingsWithSpacing(thingDef, faction, spawnCount, map, allowThickRoof, allowThinRoof, minSpacing);
+ }
+ else
+ {
+ return SpawnThingsAtValidLocations(thingDef, faction, spawnCount, map, allowThickRoof, allowThinRoof);
+ }
}
///
- /// 在有效位置生成多个建筑
+ /// 使用分散算法生成多个建筑
+ ///
+ private int SpawnThingsWithSpacing(ThingDef thingDef, Faction faction, int spawnCount, Map targetMap, bool allowThickRoof, bool allowThinRoof, int minSpacing)
+ {
+ Log.Message($"[QuestPart] Using spread-out algorithm with min spacing {minSpacing} cells");
+
+ List spawnedPositions = new List();
+ int successCount = 0;
+ int attempts = 0;
+ const int maxTotalAttempts = 500; // 总的最大尝试次数
+ const int maxAttemptsPerThing = 100; // 每个建筑的最大尝试次数
+
+ // 生成一个所有可能位置的列表
+ List allPossibleCells = GeneratePossibleCells(targetMap, thingDef, allowThickRoof, allowThinRoof, 1000);
+
+ Log.Message($"[QuestPart] Found {allPossibleCells.Count} possible cells for {thingDef.defName}");
+
+ // 如果没有足够的可能位置,直接使用原算法
+ if (allPossibleCells.Count < spawnCount)
+ {
+ Log.Warning($"[QuestPart] Not enough possible cells ({allPossibleCells.Count}) for {spawnCount} spawns, falling back to normal algorithm");
+ return SpawnThingsAtValidLocations(thingDef, faction, spawnCount, targetMap, allowThickRoof, allowThinRoof);
+ }
+
+ for (int i = 0; i < spawnCount && attempts < maxTotalAttempts; i++)
+ {
+ bool foundPosition = false;
+ int attemptsForThisThing = 0;
+
+ // 尝试找到一个满足间距条件的位置
+ while (!foundPosition && attemptsForThisThing < maxAttemptsPerThing && attempts < maxTotalAttempts)
+ {
+ attempts++;
+ attemptsForThisThing++;
+
+ // 从可能位置中随机选择一个
+ IntVec3 candidatePos = allPossibleCells.RandomElement();
+
+ // 检查是否满足间距条件
+ bool meetsSpacing = true;
+ foreach (var existingPos in spawnedPositions)
+ {
+ float distance = candidatePos.DistanceTo(existingPos);
+ if (distance < minSpacing)
+ {
+ meetsSpacing = false;
+ break;
+ }
+ }
+
+ if (meetsSpacing)
+ {
+ // 创建并生成建筑
+ Thing thing = ThingMaker.MakeThing(thingDef);
+
+ if (faction != null)
+ {
+ thing.SetFaction(faction);
+ }
+
+ GenSpawn.Spawn(thing, candidatePos, targetMap);
+ spawnedPositions.Add(candidatePos);
+ successCount++;
+ foundPosition = true;
+
+ // 从可能位置列表中移除这个位置及其周围的位置(避免重复选择)
+ allPossibleCells.RemoveAll(cell => cell.DistanceTo(candidatePos) < minSpacing / 2);
+
+ Log.Message($"[QuestPart] Successfully spawned {thingDef.defName} at {candidatePos} (distance to nearest: {GetMinDistanceToOthers(candidatePos, spawnedPositions)})");
+ break;
+ }
+ }
+
+ // 如果找不到满足间距条件的位置,放宽条件
+ if (!foundPosition)
+ {
+ Log.Warning($"[QuestPart] Could not find position with required spacing for {thingDef.defName}, trying with reduced spacing");
+
+ // 尝试使用减半的间距
+ bool foundWithReducedSpacing = TrySpawnWithReducedSpacing(thingDef, faction, targetMap, spawnedPositions, allPossibleCells, minSpacing / 2, ref successCount, ref attempts);
+
+ if (!foundWithReducedSpacing)
+ {
+ // 如果还找不到,尝试不使用间距条件
+ Log.Warning($"[QuestPart] Still couldn't find position, falling back to no spacing requirement");
+ foundWithReducedSpacing = TrySpawnWithReducedSpacing(thingDef, faction, targetMap, spawnedPositions, allPossibleCells, 0, ref successCount, ref attempts);
+ }
+
+ if (!foundWithReducedSpacing)
+ {
+ Log.Warning($"[QuestPart] Failed to spawn {thingDef.defName} after multiple attempts");
+ }
+ }
+ }
+
+ Log.Message($"[QuestPart] Spread-out algorithm completed: {successCount}/{spawnCount} spawned");
+ return successCount;
+ }
+
+ ///
+ /// 尝试使用减小的间距生成建筑
+ ///
+ private bool TrySpawnWithReducedSpacing(ThingDef thingDef, Faction faction, Map targetMap, List spawnedPositions, List allPossibleCells, int reducedSpacing, ref int successCount, ref int attempts)
+ {
+ const int maxReducedAttempts = 50;
+ int attemptsForReduced = 0;
+
+ while (attemptsForReduced < maxReducedAttempts && attempts < 500)
+ {
+ attempts++;
+ attemptsForReduced++;
+
+ IntVec3 candidatePos = allPossibleCells.RandomElement();
+
+ // 检查是否满足减小的间距条件
+ bool meetsSpacing = true;
+ foreach (var existingPos in spawnedPositions)
+ {
+ float distance = candidatePos.DistanceTo(existingPos);
+ if (distance < reducedSpacing)
+ {
+ meetsSpacing = false;
+ break;
+ }
+ }
+
+ if (meetsSpacing)
+ {
+ Thing thing = ThingMaker.MakeThing(thingDef);
+
+ if (faction != null)
+ {
+ thing.SetFaction(faction);
+ }
+
+ GenSpawn.Spawn(thing, candidatePos, targetMap);
+ spawnedPositions.Add(candidatePos);
+ successCount++;
+
+ // 从可能位置列表中移除这个位置及其周围的位置
+ allPossibleCells.RemoveAll(cell => cell.DistanceTo(candidatePos) < reducedSpacing / 2);
+
+ Log.Message($"[QuestPart] Successfully spawned {thingDef.defName} at {candidatePos} with reduced spacing {reducedSpacing}");
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ ///
+ /// 获取到其他位置的最小距离
+ ///
+ private float GetMinDistanceToOthers(IntVec3 position, List otherPositions)
+ {
+ if (otherPositions.Count == 0) return float.MaxValue;
+
+ float minDistance = float.MaxValue;
+ foreach (var otherPos in otherPositions)
+ {
+ if (otherPos == position) continue;
+ float distance = position.DistanceTo(otherPos);
+ if (distance < minDistance)
+ {
+ minDistance = distance;
+ }
+ }
+ return minDistance;
+ }
+
+ ///
+ /// 生成所有可能的位置列表
+ ///
+ private List GeneratePossibleCells(Map map, ThingDef thingDef, bool allowThickRoof, bool allowThinRoof, int maxCellsToCheck)
+ {
+ List possibleCells = new List();
+ int cellsChecked = 0;
+
+ // 方法1:随机采样
+ for (int i = 0; i < maxCellsToCheck && possibleCells.Count < maxCellsToCheck / 2; i++)
+ {
+ IntVec3 randomCell = new IntVec3(
+ Rand.Range(thingDef.Size.x, map.Size.x - thingDef.Size.x),
+ 0,
+ Rand.Range(thingDef.Size.z, map.Size.z - thingDef.Size.z)
+ );
+
+ if (randomCell.InBounds(map) && IsValidForSkyfallerDrop(map, randomCell, thingDef, allowThickRoof, allowThinRoof))
+ {
+ possibleCells.Add(randomCell);
+ }
+ cellsChecked++;
+ }
+
+ // 方法2:如果随机采样得到的数量不足,尝试使用网格采样
+ if (possibleCells.Count < maxCellsToCheck / 4)
+ {
+ int gridStep = Mathf.Max(3, Mathf.CeilToInt(Mathf.Sqrt(map.Size.x * map.Size.z / maxCellsToCheck)));
+
+ for (int x = thingDef.Size.x; x < map.Size.x - thingDef.Size.x && possibleCells.Count < maxCellsToCheck; x += gridStep)
+ {
+ for (int z = thingDef.Size.z; z < map.Size.z - thingDef.Size.z && possibleCells.Count < maxCellsToCheck; z += gridStep)
+ {
+ IntVec3 gridCell = new IntVec3(x, 0, z);
+
+ if (gridCell.InBounds(map) && IsValidForSkyfallerDrop(map, gridCell, thingDef, allowThickRoof, allowThinRoof))
+ {
+ possibleCells.Add(gridCell);
+ }
+ cellsChecked++;
+ }
+ }
+ }
+
+ Log.Message($"[QuestPart] Generated {possibleCells.Count} possible cells after checking {cellsChecked} cells");
+ return possibleCells;
+ }
+
+ ///
+ /// 在有效位置生成多个建筑(原算法)
///
private int SpawnThingsAtValidLocations(ThingDef thingDef, Faction faction, int spawnCount, Map targetMap, bool allowThickRoof, bool allowThinRoof)
{
@@ -120,11 +469,11 @@ namespace WulaFallenEmpire
GenSpawn.Spawn(thing, spawnPos, targetMap);
successCount++;
- Log.Message($"[QuestNode] Successfully spawned {thingDef.defName} at {spawnPos} for faction {faction?.Name ?? "None"}");
+ Log.Message($"[QuestPart] Successfully spawned {thingDef.defName} at {spawnPos} for faction {faction?.Name ?? "None"}");
}
else
{
- Log.Warning($"[QuestNode] Failed to find valid spawn position for {thingDef.defName} (attempt {attempts})");
+ Log.Warning($"[QuestPart] Failed to find valid spawn position for {thingDef.defName} (attempt {attempts})");
}
}
@@ -191,7 +540,7 @@ namespace WulaFallenEmpire
return potentialCells.RandomElement();
}
- Log.Warning($"[QuestNode] No valid positions found for {thingDef.defName} after exhaustive search");
+ Log.Warning($"[QuestPart] No valid positions found for {thingDef.defName} after exhaustive search");
return IntVec3.Invalid;
}
diff --git a/美术与文本源文件/Wula/Building/WULA_Combat_Excavator.png b/美术与文本源文件/Wula/Building/WULA_Combat_Excavator.png
new file mode 100644
index 00000000..45ce0eaf
Binary files /dev/null and b/美术与文本源文件/Wula/Building/WULA_Combat_Excavator.png differ
diff --git a/美术与文本源文件/Wula/Building/WULA_Combat_Excavator.sai2 b/美术与文本源文件/Wula/Building/WULA_Combat_Excavator.sai2
new file mode 100644
index 00000000..fd248236
Binary files /dev/null and b/美术与文本源文件/Wula/Building/WULA_Combat_Excavator.sai2 differ
diff --git a/美术与文本源文件/Wula/Item/WULA_Excavator_Blade.sai2 b/美术与文本源文件/Wula/Item/WULA_Excavator_Blade.sai2
new file mode 100644
index 00000000..f4ddfc2a
Binary files /dev/null and b/美术与文本源文件/Wula/Item/WULA_Excavator_Blade.sai2 differ
diff --git a/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_east.png b/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_east.png
index c12e0aed..1889511f 100644
Binary files a/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_east.png and b/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_east.png differ
diff --git a/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_north.png b/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_north.png
index da83a87e..74b079bb 100644
Binary files a/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_north.png and b/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_north.png differ
diff --git a/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.png b/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.png
index 64b9703a..62a3dca4 100644
Binary files a/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.png and b/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.png differ
diff --git a/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.sai2 b/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.sai2
index 444a47b4..7ca73a12 100644
Binary files a/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.sai2 and b/美术与文本源文件/Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south.sai2 differ