diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll
index e6e111c..ec0412d 100644
Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ
diff --git a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Incubator_Reward.xml b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Incubator_Reward.xml
new file mode 100644
index 0000000..2d723e9
--- /dev/null
+++ b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Incubator_Reward.xml
@@ -0,0 +1,140 @@
+
+
+
+ ARA_Incubator_1_Reward_Hediffs
+
+ 该阿拉克涅督虫的甲壳比起常规虫族更加紧密,这使得她的甲壳获得了额外的防御力。\n\n由于良好的孵化质量,阿拉克涅督虫获得了这个有利突变。
+ HediffWithComps
+ false
+ (0.3, 0.7, 0.2)
+ true
+
+
+
+ 0.25
+ 0.25
+
+
+
+
+
+ ARA_Incubator_2_Reward_Hediffs
+
+ 该阿拉克涅督虫的皮下脂肪由于有利突变,获得了阻燃效果。当虫族被火焰灼烧时,阻燃脂肪层会爆裂开以扑灭身上的火势。\n\n由于良好的孵化质量,阿拉克涅督虫获得了这个有利突变。
+ HediffWithComps
+ false
+ (0.3, 0.7, 0.2)
+ true
+
+
+
+ 0.5
+
+
+ 0
+
+
+
+
+
+ ARA_Incubator_3_Reward_Hediffs
+
+ 该阿拉克涅督虫腺体非常反常,会不断地分泌激素使得其处于亢奋状态,并且可以传导到与其链接的武装器官上。\n\n由于良好的孵化质量,阿拉克涅督虫获得了这个有利突变。
+ HediffWithComps
+ false
+ (0.3, 0.7, 0.2)
+ true
+
+
+
+ 0.25
+
+
+ 0.8
+
+
+
+
+
+ ARA_Incubator_4_Reward_Hediffs
+
+ 该阿拉克涅督虫的有利突变使其获得了异于其他虫族的高级静态视力,填补了其视力的短板,使其射击时更加得心应手。\n\n由于良好的孵化质量,阿拉克涅督虫获得了这个有利突变。
+ HediffWithComps
+ false
+ (0.3, 0.7, 0.2)
+ true
+
+
+
+ 0.75
+
+
+
+
+
+ ARA_Incubator_5_Reward_Hediffs
+
+ 该阿拉克涅督虫壮的惊人——属于是营养过剩了。\n\n由于良好的孵化质量,阿拉克涅督虫获得了这个有利突变。
+ HediffWithComps
+ false
+ (0.3, 0.7, 0.2)
+ true
+
+
+
+ 2
+
+
+
+
+
+ ARA_Incubator_6_Reward_Hediffs
+
+ 该阿拉克涅督虫神经反应远超其他虫族,得益于更强大的反射,其行动变得敏捷而致命。\n\n由于良好的孵化质量,阿拉克涅督虫获得了这个有利突变。
+ HediffWithComps
+ false
+ (0.3, 0.7, 0.2)
+ true
+
+
+
+
+ Consciousness
+ 0.15
+
+
+
+
+
+
+ ARA_Incubator_7_Reward_Hediffs
+
+ 该阿拉克涅督虫的记忆体结构更加复杂,且能快速吸纳新的知识和经验。\n\n由于良好的孵化质量,阿拉克涅督虫获得了这个有利突变。
+ HediffWithComps
+ false
+ (0.3, 0.7, 0.2)
+ true
+
+
+
+ 0.5
+
+
+
+
+
+ ARA_Incubator_8_Reward_Hediffs
+
+ 该阿拉克涅督虫的凝血系统更加高效,多种其他督虫身上不具备的特殊凝血因子使得其流血速度大为减缓。\n\n由于良好的孵化质量,阿拉克涅督虫获得了这个有利突变。
+ HediffWithComps
+ false
+ (0.3, 0.7, 0.2)
+ true
+
+
+
+ 0.1
+
+
+
+
\ No newline at end of file
diff --git a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml
index 5b5f5ec..600129a 100644
--- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml
+++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml
@@ -699,7 +699,7 @@
ArachnaeNode_Race_Myrmecocystus
- 阿拉克涅大型督虫之一,拥有广泛食谱的大型虫族,可以吞下许多未经处理的生物并将其分解为阿拉克涅虫蜜,以滋养虫群。\n\n她可以进行搬运、烹饪和种植工作,战斗技能非常差。
+ 阿拉克涅大型督虫之一,拥有广泛食谱的大型虫族,可以吞下许多未经处理的生物并将其分解为阿拉克涅虫蜜,以滋养虫群。当虫群中的其他虫族感到饥饿时,她们会通过嘴对嘴的方式进行喂食,如果蜜罐满溢,她们还会将虫蜜排出以形成可供巢穴进行建筑的资源。\n\n她可以进行搬运、烹饪和种植工作,战斗技能非常差。
@@ -775,6 +775,23 @@
+
+ true
+ ARA_RaceBaseSwarmProduceSwitchHediff
+ ARA_InsectJelly
+ 1
+ 1
+ 1
+ 9999
+
+
+ ArachnaeBase_Race_Scavenger
+ 2
+ 5000
+
+
+ CocoonDestroyed
+
ARA_Cycle_Suppression_Hediff
ARA_LifespanHediff
@@ -785,6 +802,7 @@
+ ARA_RaceBaseSwarmProduceSwitchHediff
ARA_Myrmecocystus_Production_InsectJelly
1.0
@@ -942,8 +960,8 @@
ArachnaeBase_Race_Scavenger
- 4
- 1000
+ 2
+ 5000
CocoonDestroyed
@@ -1050,6 +1068,23 @@
+
+ true
+ ARA_RaceBaseSwarmProduceSwitchHediff
+ ARA_InsectJelly
+ 1
+ 1
+ 1
+ 9999
+
+
+ ArachnaeBase_Race_Scavenger
+ 2
+ 5000
+
+
+ CocoonDestroyed
+
ARA_RaceBaseSwarmProduceSwitchHediff
diff --git a/1.6/1.6/Defs/Thing_Misc/Apparels/ARA_Apparel.xml b/1.6/1.6/Defs/Thing_Misc/Apparels/ARA_Apparel.xml
index 14efbed..6f853f2 100644
--- a/1.6/1.6/Defs/Thing_Misc/Apparels/ARA_Apparel.xml
+++ b/1.6/1.6/Defs/Thing_Misc/Apparels/ARA_Apparel.xml
@@ -61,9 +61,7 @@
@@ -94,9 +92,7 @@
@@ -127,9 +123,7 @@
@@ -160,9 +154,7 @@
@@ -193,9 +185,7 @@
@@ -325,9 +315,7 @@
@@ -376,9 +364,7 @@
@@ -427,9 +413,7 @@
@@ -479,9 +463,7 @@
@@ -531,9 +513,7 @@
@@ -583,9 +563,7 @@
@@ -633,9 +611,7 @@
@@ -713,9 +689,7 @@
@@ -765,9 +739,7 @@
diff --git a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml
index 0edae61..7307507 100644
--- a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml
+++ b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml
@@ -332,9 +332,7 @@
@@ -430,9 +428,7 @@
@@ -528,9 +524,7 @@
@@ -772,9 +766,7 @@
@@ -875,9 +867,7 @@
@@ -991,9 +981,7 @@
@@ -1141,9 +1129,7 @@
@@ -1260,9 +1246,7 @@
@@ -1394,9 +1378,7 @@
@@ -1530,9 +1512,7 @@
@@ -1688,9 +1668,7 @@
diff --git a/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml b/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml
index 7f16904..41426f3 100644
--- a/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml
+++ b/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml
@@ -47,71 +47,6 @@
-
- ARA_Proj_EggSac
-
-
- ARA_InteractiveEggSac
-
-
-
- ARA_InteractiveEggSac
-
- 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅女皇种所诞之卵,内含哺育一只新督虫所需的营养和遗传物质,可以通过阿拉克涅女皇种的交互完成激活进程——参阅虫卵的超链接,了解各个督虫的特点。\n\n卵囊对温度极度敏感(该类型的卵适温为-25~30°C),需要小心保护!
-
- 3000
-
-
- ArachnaeNode_Race_ShieldHead
- ArachnaeNode_Race_WeaponSmith
- ArachnaeNode_Race_Fighter
- ArachnaeNode_Race_Facehugger
-
-
- ARA_Base_Technology
- ARA_Technology_1KYC
- ARA_Technology_4KYC
-
-
-
- 6
- (113,141,117,0)
-
-
-
-
- ArachnaeNode_Race_ShieldHead
- 120000
-
-
- ArachnaeNode_Race_WeaponSmith
- 180000
-
-
- ArachnaeNode_Race_Fighter
- 120000
- ARA_Technology_1KYC
-
-
- ArachnaeNode_Race_Facehugger
- 120000
- ARA_Technology_4KYC
-
-
-
- ARA_ArachnaeQueen
-
- true
-
-
- -25
- 30
- 0.00005
- 0.005
- 0.001
-
-
-
ARA_InteractiveEggSac_Start
@@ -158,345 +93,6 @@
-
- ARA_Proj_EggSac_Huge
-
-
- ARA_InteractiveEggSac_Huge
-
-
-
- ARA_InteractiveEggSac_Huge
-
- 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅女皇种所诞之卵,内含哺育一只大型督虫所需的营养和遗传物质,可以通过阿拉克涅女皇种的交互完成激活进程——参阅虫卵的超链接,了解各个督虫的特点。\n\n卵囊对温度极度敏感(该类型的卵适温为-25~30°C),需要小心保护!
-
- ArachnaeNode_Race_Myrmecocystus
-
-
- ARA_Base_Technology
-
-
- (0.9, 0.9 ,0.5)
- (1.1,1.1)
-
-
- 5000
-
-
-
-
- 6
- (230, 230, 128, 0)
-
-
-
-
- ArachnaeNode_Race_Myrmecocystus
- 180000
-
-
-
- ARA_ArachnaeQueen
-
- true
-
-
- -25
- 30
- 0.00005
- 0.005
- 0.001
-
-
-
-
-
- ARA_Proj_EggSac_1Stage
-
-
- ARA_InteractiveEggSac_1Stage
-
-
-
- ARA_InteractiveEggSac_1Stage
-
- 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅女皇种所诞之卵,内含哺育一只新督虫所需的营养和遗传物质,可以通过阿拉克涅女皇种的交互完成激活进程——参阅虫卵的超链接,了解各个督虫的特点。\n\n卵囊对温度极度敏感(该类型的卵适温为-10~22°C),需要小心保护!
-
- ArachnaeNode_Race_ShieldHead
- ArachnaeNode_Race_WeaponSmith
- ArachnaeNode_Race_Fighter
- ArachnaeNode_Race_Facehugger
- ArachnaeNode_Race_MimicNematode
-
-
- (1.2,1.2)
-
-
- 8000
-
-
-
-
- 6
- (113,141,117,0)
-
-
-
-
- ArachnaeNode_Race_ShieldHead
- 120000
-
-
- ArachnaeNode_Race_WeaponSmith
- 180000
-
-
- ArachnaeNode_Race_Fighter
- 120000
- ARA_Technology_1KYC
-
-
- ArachnaeNode_Race_Facehugger
- 120000
- ARA_Technology_4KYC
-
-
- ARA_MimicNematodeShamblerSwarmer
- 600
- ARA_Technology_6MEN
-
-
-
- ARA_ArachnaeQueen
-
- true
-
-
- -10
- 22
- 0.00005
- 0.005
- 0.001
-
-
-
-
- ARA_Proj_EggSac_Huge_1Stage
-
-
- ARA_InteractiveEggSac_Huge_1Stage
-
-
-
- ARA_InteractiveEggSac_Huge_1Stage
-
- 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅女皇种所诞之卵,内含哺育一只大型督虫所需的营养和遗传物质,可以通过阿拉克涅女皇种的交互完成激活进程——参阅虫卵的超链接,了解各个督虫的特点。\n\n卵囊对温度极度敏感(该类型的卵适温为-10~22°C),需要小心保护!
-
- ArachnaeNode_Race_Myrmecocystus
- ArachnaeNode_Race_Smokepop
- ArachnaeNode_Race_NeuroSwarm
- ArachnaeNode_Race_Skyraider
-
-
- (0.9, 0.9 ,0.5)
- (1.4,1.4)
-
-
- ARA_Technology_5KYC
- ARA_Technology_6KYC
- ARA_Technology_2KYC
-
-
- 10000
-
-
-
-
- 6
- (230, 230, 128, 0)
-
-
-
-
- ArachnaeNode_Race_Myrmecocystus
- 180000
-
-
- ArachnaeNode_Race_Smokepop
- 360000
- ARA_Technology_5KYC
-
-
- ArachnaeNode_Race_NeuroSwarm
- 840000
- ARA_Technology_6KYC
-
-
- ArachnaeNode_Race_Skyraider
- 360000
- ARA_Technology_2KYC
-
-
-
- ARA_ArachnaeQueen
-
- true
-
-
- -10
- 22
- 0.00005
- 0.005
- 0.001
-
-
-
-
-
- ARA_Proj_EggSac_2Stage
-
-
- ARA_InteractiveEggSac_2Stage
-
-
-
- ARA_InteractiveEggSac_2Stage
-
- 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅女皇种所诞之卵,内含哺育一只新督虫所需的营养和遗传物质,可以通过阿拉克涅女皇种的交互完成激活进程——参阅虫卵的超链接,了解各个督虫的特点。\n\n卵囊对温度极度敏感(该类型的卵适温为0~18°C),需要小心保护!
-
- ArachnaeNode_Race_ShieldHead
- ArachnaeNode_Race_WeaponSmith
- ArachnaeNode_Race_Fighter
- ArachnaeNode_Race_Facehugger
- ArachnaeNode_Race_MimicNematode
-
-
- (1.2,1.2)
-
-
- 12000
-
-
-
-
- 6
- (113,141,117,0)
-
-
-
-
- ArachnaeNode_Race_ShieldHead
- 120000
-
-
- ArachnaeNode_Race_WeaponSmith
- 180000
-
-
- ArachnaeNode_Race_Fighter
- 120000
- ARA_Technology_1KYC
-
-
- ArachnaeNode_Race_Facehugger
- 120000
- ARA_Technology_4KYC
-
-
- ARA_MimicNematodeShamblerSwarmer
- 60000
- ARA_Technology_6MEN
-
-
-
- ARA_ArachnaeQueen
-
- true
-
-
- 0
- 18
- 0.00005
- 0.005
- 0.001
-
-
-
-
- ARA_Proj_EggSac_Huge_2Stage
-
-
- ARA_InteractiveEggSac_Huge_2Stage
-
-
-
- ARA_InteractiveEggSac_Huge_2Stage
-
- 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅女皇种所诞之卵,内含哺育一只大型督虫所需的营养和遗传物质,可以通过阿拉克涅女皇种的交互完成激活进程——参阅虫卵的超链接,了解各个督虫的特点。\n\n卵囊对温度极度敏感(该类型的卵适温为-10~22°C),需要小心保护!
-
- ArachnaeNode_Race_Myrmecocystus
- ArachnaeNode_Race_Smokepop
- ArachnaeNode_Race_NeuroSwarm
- ArachnaeNode_Race_Skyraider
- ArachnaeNode_Race_Praetorian
-
-
- (0.9, 0.9 ,0.5)
- (1.4,1.4)
-
-
- ARA_Technology_7KYC
-
-
- 15000
-
-
-
-
- 6
- (230, 230, 128, 0)
-
-
-
-
- ArachnaeNode_Race_Myrmecocystus
- 180000
-
-
- ArachnaeNode_Race_Smokepop
- 360000
- ARA_Technology_5KYC
-
-
- ArachnaeNode_Race_NeuroSwarm
- 840000
- ARA_Technology_6KYC
-
-
- ArachnaeNode_Race_Skyraider
- 360000
- ARA_Technology_2KYC
-
-
- ArachnaeNode_Race_Praetorian
- 520000
- ARA_Technology_7KYC
-
-
-
- ARA_ArachnaeQueen
-
- true
-
-
- 0
- 18
- 0.00005
- 0.005
- 0.001
-
-
-
ARA_InteractiveEggSac_Queen
@@ -544,751 +140,6 @@
-
-
- Building
-
- ArachnaeSwarm/Building/ARA_Cocoon
- Graphic_Single
- (1.1,1.1)
-
- (0.7, 0.4, 0.7)
- (0,0,-0.1)
-
-
- (1,1)
- Building
- PassThroughOnly
- 0.3
- false
- Normal
-
- 50
- 1
-
-
- false
- false
-
-
-
-
- CocoonDestroyed
-
-
- Filth_Slime
- 10
- 4
- 5
-
-
- ARA_InsectCreep
- 2.5
-
-
-
-
-
-
- ARA_Cocoon_Proj_Cloth
-
- ARA_Cocoon_Cloth
-
-
-
-
-
- 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一套基础织物装备的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为-30~55°C),需要小心保护!
-
- ARA_Bodystocking_White
- ARA_Bodystocking_Black
- ARA_Latex_Catsuit
- ARA_Pantyhose_Black
- ARA_Pantyhose_White
- ARA_Maid_Uniform
-
-
- 2000
-
-
-
-
-
-
- ArachnaeNode_Race_WeaponSmith
-
- 1
- True
- -30
- 55
- 0.00001
- 0.2
- 1.0
-
-
-
- Legendary
- 0.99
-
-
- Masterwork
- 0.90
-
-
- Excellent
- 0.70
-
-
- Good
- 0.50
-
-
- Normal
- 0.20
-
-
- Poor
- 0.10
-
-
-
-
- -30
- 55
- 0.00005
- 0.005
- 0.001
-
-
-
-
- ARA_Cocoon_Cloth
-
-
-
-
- 20
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 0.2
- 1
- 0
-
-
-
-
- ARA_Cocoon_Cloth_From_Death
-
-
-
-
- 20
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 1
- 1
- 0
-
-
-
-
- ARA_Cocoon_Proj_Weapon
-
- ARA_Cocoon_Weapon
-
-
-
-
-
- 一个布满尖刺的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为-20~35°C),需要小心保护!
-
- ARA_MW_Bone_Sword
- ARA_RW_Basic_Acid_Bladder_Gun
- ARA_RW_Basic_Fist_Needle_Gun
-
-
- 2000
-
-
-
-
-
-
- ArachnaeNode_Race_WeaponSmith
-
- 1
- True
- -20
- 35
- 0.00001
- 0.2
- 1.0
-
-
-
- Legendary
- 0.99
-
-
- Masterwork
- 0.90
-
-
- Excellent
- 0.70
-
-
- Good
- 0.50
-
-
- Normal
- 0.20
-
-
- Poor
- 0.10
-
-
-
-
- -20
- 35
- 0.00005
- 0.005
- 0.001
-
-
-
-
- ARA_Cocoon_Weapon
-
-
-
- 20
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 0.2
- 1
- 0
-
-
-
-
- ARA_Cocoon_Weapon_From_Death
-
-
-
-
- 20
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 1
- 1
- 0
-
-
-
-
-
- ARA_Cocoon_Proj_Cloth_1Stage
-
- ARA_Cocoon_Cloth_1Stage
-
-
-
-
-
- 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一套基础织物装备的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为-30~55°C),需要小心保护!
-
- ARA_Bodystocking_White
- ARA_Bodystocking_Black
- ARA_Latex_Catsuit
- ARA_Pantyhose_Black
- ARA_Pantyhose_White
- ARA_Maid_Uniform
-
-
- 5000
-
-
-
-
-
-
-
-
- ArachnaeNode_Race_WeaponSmith
-
- 1
- True
- -30
- 55
- 0.00001
- 0.2
- 1.0
-
-
-
- Legendary
- 0.99
-
-
- Masterwork
- 0.90
-
-
- Excellent
- 0.70
-
-
- Good
- 0.50
-
-
- Normal
- 0.20
-
-
- Poor
- 0.10
-
-
-
-
- -30
- 55
- 0.00005
- 0.005
- 0.001
-
-
-
-
- ARA_Cocoon_Cloth_1Stage
-
-
-
-
- 60
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 0.2
- 1
- 30
-
-
-
-
- ARA_Cocoon_Cloth_1Stage_From_Death
-
-
-
-
- 60
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 1
- 1
- 30
-
-
-
-
- ARA_Cocoon_Proj_Weapon_1Stage
-
- ARA_Cocoon_Weapon_1Stage
-
-
-
-
-
- 一个布满尖刺的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为-20~35°C),需要小心保护!
-
- ARA_MW_Cartilage_Whip
- ARA_RW_Basic_FireSpewer_Gun
- ARA_RW_Toxic_Needle_SG
- ARA_RW_Toxic_Needle_MG
- ARA_RW_Basic_SkyHive_Gun
-
-
- 5000
-
-
-
-
-
-
- ArachnaeNode_Race_WeaponSmith
-
- 1
- True
- -20
- 35
- 0.00001
- 0.2
- 1.0
-
-
-
- Legendary
- 0.99
-
-
- Masterwork
- 0.90
-
-
- Excellent
- 0.70
-
-
- Good
- 0.50
-
-
- Normal
- 0.20
-
-
- Poor
- 0.10
-
-
-
-
- -20
- 35
- 0.00005
- 0.005
- 0.001
-
-
-
-
- ARA_Cocoon_Weapon_1Stage
-
-
-
-
- 60
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 0.2
- 1
- 30
-
-
-
-
- ARA_Cocoon_Weapon_1Stage_From_Death
-
-
-
-
- 60
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 1
- 1
- 30
-
-
-
-
-
- ARA_Cocoon_Proj_Cloth_2Stage
-
- ARA_Cocoon_Cloth_2Stage
-
-
-
-
-
- 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一套基础织物装备的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为10~16°C),需要小心保护!
-
- 10000
-
-
-
-
-
-
-
-
- ArachnaeNode_Race_WeaponSmith
-
- 1
- True
- 10
- 16
- 0.00001
- 0.2
- 1.0
-
-
-
- Legendary
- 0.99
-
-
- Masterwork
- 0.90
-
-
- Excellent
- 0.70
-
-
- Good
- 0.50
-
-
- Normal
- 0.20
-
-
- Poor
- 0.10
-
-
-
-
- 10
- 16
- 0.00005
- 0.005
- 0.001
-
-
-
-
- ARA_Cocoon_Cloth_2Stage
-
-
-
-
- 110
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 0.2
- 1
- 110
-
-
-
-
- ARA_Cocoon_Cloth_2Stage_From_Death
-
-
-
-
- 110
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 1
- 1
- 110
-
-
-
-
- ARA_Cocoon_Proj_Weapon_2Stage
-
- ARA_Cocoon_Weapon_2Stage
-
-
-
-
-
- 一个布满尖刺的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为21~30°C),需要小心保护!
-
- ARA_RW_Basic_SniperCannon_Gun
- ARA_RW_Missile_HG_Gun
- ARA_RW_Missile_AR_Gun
- ARA_RW_Acid_Mortar
- ARA_MW_Scything_Talons
-
-
- 10000
-
-
-
-
-
-
-
-
- ArachnaeNode_Race_WeaponSmith
-
- 1
- True
- 21
- 30
- 0.00001
- 0.2
- 1.0
-
-
-
- Legendary
- 0.99
-
-
- Masterwork
- 0.90
-
-
- Excellent
- 0.70
-
-
- Good
- 0.50
-
-
- Normal
- 0.20
-
-
- Poor
- 0.10
-
-
-
-
- 21
- 30
- 0.00005
- 0.005
- 0.001
-
-
-
-
- ARA_Cocoon_Weapon_2Stage
-
-
-
-
- 110
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 0.2
- 1
- 110
-
-
-
-
- ARA_Cocoon_Weapon_2Stage_From_Death
-
-
-
-
- 110
- 虫蜜
-
-
- ARA_InsectJelly
-
-
- 0
- false
- 1
- 1
- 110
-
-
-
-
ARA_Cocoon_Proj_Medicine
@@ -1417,72 +268,4 @@
-
-
-
- ARA_Proj_EggSac_Techprint
-
- ArachnaeSwarm/Building/ARA_InteractiveEggSac_Techprint
- Graphic_Single
-
-
- ARA_InteractiveEggSac_Techprint
-
-
-
- ARA_InteractiveEggSac_Techprint
-
- 一个脆弱、易燃、黏滑的囊状物,它无法孵化任何督虫,而是可以孵化一些特定的科技蓝图,阿拉克涅女皇种可以通过与其交互将其激活。\n\n该虫卵需要使用大量精华素维持工作,并且能研究的项目以其落地时的研究完成度为准,那些尚未解锁的科技将无法孵化其蓝图。
-
- 2000
-
-
- ARA_Gene_Essence
-
-
- ArachnaeSwarm/Building/ARA_InteractiveEggSac_Techprint
- Graphic_Single
- (1.1,1.1)
-
- (0.7, 0.4, 0.7)
- (0,0,-0.1)
-
-
-
-
-
-
- 100
- 精华素
-
-
- ARA_Gene_Essence
-
-
- 0
- false
- 0.02
- 1
- 0
-
-
-
-
- ARA_ArachnaeQueen
-
- true
- 0.2
- 1.0
- 0.06
- 30
-
-
- -30
- 55
- 0.00005
- 0.005
- 0.001
-
-
-
\ No newline at end of file
diff --git a/1.6/1.6/Defs/Thing_building/ARA_Ootheca.xml b/1.6/1.6/Defs/Thing_building/ARA_Ootheca.xml
index b32c1c9..692c7ef 100644
--- a/1.6/1.6/Defs/Thing_building/ARA_Ootheca.xml
+++ b/1.6/1.6/Defs/Thing_building/ARA_Ootheca.xml
@@ -3,7 +3,7 @@
ARA_Incubator_Nutrient_Solution
- 阿拉克涅虫族孵化池的营养液。
+ 阿拉克涅虫族孵化池的营养液,卵和茧都需要这种富含多种营养成分的液体以维系孵化进度。茧在孵化过程中会消耗营养液,必须有虫族定时重新填充营养液。
395
Terrain/Surfaces/WaterShallowRamp
Terrain/Surfaces/WaterShallowRampPolluted
@@ -55,6 +55,9 @@
1.5
+
+ 1
+
@@ -126,6 +129,14 @@
+
+
+ true
+ 2
+ Burn
+ true
+
@@ -166,6 +177,45 @@
孵化菜单
UI/Commands/IncubatorSwitch
+
+
+ ARA_Incubator_1_Reward_Hediffs
+ ARA_Incubator_2_Reward_Hediffs
+ ARA_Incubator_3_Reward_Hediffs
+ ARA_Incubator_4_Reward_Hediffs
+ ARA_Incubator_5_Reward_Hediffs
+ ARA_Incubator_6_Reward_Hediffs
+ ARA_Incubator_7_Reward_Hediffs
+ ARA_Incubator_8_Reward_Hediffs
+
+
+
+
+ 0.30
+ 1
+ false
+ ARA_QualityReward_1Hediff
+
+
+ 0.50
+ 2
+ false
+ ARA_QualityReward_2Hediff
+
+
+ 0.85
+ 3
+ false
+ ARA_QualityReward_3Hediff
+
+
+ 0.99
+ 4
+ false
+ ARA_QualityReward_4Hediff
+
+
+
ArachnaeNode_Race_ShieldHead
diff --git a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ARA_Building_Ootheca.xml b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ARA_Building_Ootheca.xml
index 05fb611..7170153 100644
--- a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ARA_Building_Ootheca.xml
+++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ARA_Building_Ootheca.xml
@@ -143,30 +143,142 @@
较差
很差
质量
+
+
+ 额外状态效果
+ 孵化质量奖励 - 状态效果
+ 没有可用的状态效果奖励。
+ 质量阈值奖励
+ 获得所有状态效果
+ 获得{0}个随机状态效果
+ 全部效果
+ 个效果
+ 可用状态效果
+ 质量奖励:
- 正在孵化
- 进度
- 剩余时间
- 天
- 小时
- 速度
- 质量
- 幼虫正在操作
- 秒剩余
- 幼虫在途中
- 目标
- 速度乘数
- 质量乘数
+
+ {0}因高质量的孵化获得了1个额外状态效果!
+ {0}因高质量的孵化获得了2个额外状态效果!
+ {0}因高质量的孵化获得了3个额外状态效果!
+ {0}因高质量的孵化获得了4个额外状态效果!
+ {0}因卓越的孵化质量获得了所有额外状态效果!
+ {0}获得了{1}个额外状态效果!
+
+
+ 正在孵化
+ 进度
+ 剩余时间
+ 天
+ 小时
+ 速度
+ 品质
+ 目标
+ 速度倍率
+ 品质倍率
+
+ 速度因子
+ ✓ 在孵化室中
+ ✗ 不在孵化室中
+ 营养液:{0}个(+{1}%)
+ 附近没有营养液
+ 营养液检测半径:{0}格
+ 总速度倍率:{0}
+
+ 品质因子
+ 建筑血量:{0}
+ 房间因子:正常
+ 房间因子:{0}
+ 附近其他卵:{0}个(-{1}%)
+ 附近没有其他卵
+ 其他卵检测半径:{0}格
+ 总品质倍率:{0}
+
+ 呼叫幼虫
+ 幼虫将前来激活卵囊并孵化:
+ 幼虫搜索半径:{0}格
+ 已经在孵化中
+ 请先取消当前孵化
+ 幼虫已在路上
+ 未选择孵化目标
+ 需要研究:{1}才能孵化{0}
+ 研究未完成
+ 未找到幼虫
+ 幼虫必须是ArachnaeBase_Race_Larva种族
+ 已呼叫幼虫
+ 将很快到达
+ 幼虫已到达
+ 正在激活卵囊
+ 孵化开始:
+ 过程将在
+ 天内完成(基础时间)
+ 幼虫操作中
+ 秒剩余
+ 幼虫在路上
+
+ 孵化已取消
+ 内容物已丢失
+ 孵化完成:
+ 已生成,品质:
+ 极佳
+ 良好
+ 普通
+ 差
+ 极差
+
+ 呼叫幼虫
+ 取消孵化
+ 取消当前孵化,已消耗的资源将丢失
+ 孵化:{0}
+ 孵化:{0}
+ 孵化时间:{0}天
+ 研究已完成:{0}
+ 需要研究:{0}
+ 无需研究
+ 点击选择要孵化的物品
+ 选择孵化目标
+ 已切换目标:{0}
+
+ 开始消耗营养液...
+ 营养液需求已满足!
+ 营养液消耗
+ 无需营养液
+ 所需营养液地块:{0}
+ 已消耗:{0}
+ 进度:{0}
+ 正在消耗营养液...
+ 茧因缺乏营养液受到{0}点伤害!
+ {0}的孵化因缺乏营养液而暂停
+ 警告:孵化暂停 - 无可用营养液!
+ 警告:无可用营养液 - 正在受到伤害!
+ 建筑血量极低:{0}
+ 预计所需营养液:{0}
+
+ 营养液吸收半径:{0}格
+ 搜索半径:{0}格
+ 可用营养液地块:{0}
+ 范围内无可用营养液地块!
+
+ 孵化进度
- 呼叫幼虫
- 取消孵化
- 取消当前孵化过程,卵荚内容物将丢失
+
+ 这不是一个装备茧
- 孵化: {0}
- 选择要孵化的生物类型。幼虫将前来激活卵荚。
- 当前选择: {0}
- 孵化时间: {0}天
- 选择孵化目标
- 需要研究:
- 孵化目标已切换为: {0}
+
+ 孵化进度
+ 孵化进度
+ 品质进度
+
+
+ 幼虫正在激活茧
+ 秒剩余
+ 幼虫正在路上
+
+
+ 准备孵化
+ 需要
+ 未选择孵化目标
+
+
+ 等待营养液...
+ 已消耗
diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo
index d95e7e5..fc1af80 100644
Binary files a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo and b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo differ
diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json
index be0d5c2..51a6b11 100644
--- a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json
+++ b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json
@@ -1,21 +1,33 @@
{
"Version": 1,
- "WorkspaceRootPath": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
+ "WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
"Documents": [
{
- "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\buildings\\building_equipmentootheca\\building_equipmentootheca.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:buildings\\building_equipmentootheca\\building_equipmentootheca.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\buildings\\building_ootheca\\compproperties_incubatordata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:buildings\\building_ootheca\\compproperties_incubatordata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
- "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\buildings\\building_ootheca\\building_ootheca.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\buildings\\building_ootheca\\building_ootheca.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:buildings\\building_ootheca\\building_ootheca.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
- "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\buildings\\building_equipmentootheca\\compproperties_equipmentincubatordata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\buildings\\building_ootheca\\oothecaincubatorextension.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:buildings\\building_ootheca\\oothecaincubatorextension.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\buildings\\building_equipmentootheca\\itab_equipmentootheca_incubation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:buildings\\building_equipmentootheca\\itab_equipmentootheca_incubation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\buildings\\building_equipmentootheca\\building_equipmentootheca.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:buildings\\building_equipmentootheca\\building_equipmentootheca.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\buildings\\building_equipmentootheca\\compproperties_equipmentincubatordata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:buildings\\building_equipmentootheca\\compproperties_equipmentincubatordata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
- "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\ara_hediffdefof.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ara_hediffdefof.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:ara_hediffdefof.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
@@ -26,21 +38,60 @@
"DocumentGroups": [
{
"DockedWidth": 200,
- "SelectedChildIndex": 1,
+ "SelectedChildIndex": 0,
"Children": [
+ {
+ "$type": "Document",
+ "DocumentIndex": 0,
+ "Title": "CompProperties_IncubatorData.cs",
+ "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_Ootheca\\CompProperties_IncubatorData.cs",
+ "RelativeDocumentMoniker": "Buildings\\Building_Ootheca\\CompProperties_IncubatorData.cs",
+ "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_Ootheca\\CompProperties_IncubatorData.cs*",
+ "RelativeToolTip": "Buildings\\Building_Ootheca\\CompProperties_IncubatorData.cs*",
+ "ViewState": "AgIAAAIBAAAAAAAAAAAawC8BAABeAAAAAAAAAA==",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2025-12-16T02:36:56.126Z",
+ "EditorCaption": ""
+ },
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Document",
- "DocumentIndex": 0,
+ "DocumentIndex": 2,
+ "Title": "OothecaIncubatorExtension.cs",
+ "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_Ootheca\\OothecaIncubatorExtension.cs",
+ "RelativeDocumentMoniker": "Buildings\\Building_Ootheca\\OothecaIncubatorExtension.cs",
+ "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_Ootheca\\OothecaIncubatorExtension.cs",
+ "RelativeToolTip": "Buildings\\Building_Ootheca\\OothecaIncubatorExtension.cs",
+ "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAArAAAAAAAAAA==",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2025-12-16T00:38:04.247Z",
+ "EditorCaption": ""
+ },
+ {
+ "$type": "Document",
+ "DocumentIndex": 3,
+ "Title": "ITab_EquipmentOotheca_Incubation.cs",
+ "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_EquipmentOotheca\\ITab_EquipmentOotheca_Incubation.cs",
+ "RelativeDocumentMoniker": "Buildings\\Building_EquipmentOotheca\\ITab_EquipmentOotheca_Incubation.cs",
+ "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_EquipmentOotheca\\ITab_EquipmentOotheca_Incubation.cs",
+ "RelativeToolTip": "Buildings\\Building_EquipmentOotheca\\ITab_EquipmentOotheca_Incubation.cs",
+ "ViewState": "AgIAAIAAAAAAAAAAAADgv5AAAAAAAAAAAAAAAA==",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2025-12-16T00:29:36.407Z",
+ "EditorCaption": ""
+ },
+ {
+ "$type": "Document",
+ "DocumentIndex": 4,
"Title": "Building_EquipmentOotheca.cs",
- "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_EquipmentOotheca\\Building_EquipmentOotheca.cs",
+ "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_EquipmentOotheca\\Building_EquipmentOotheca.cs",
"RelativeDocumentMoniker": "Buildings\\Building_EquipmentOotheca\\Building_EquipmentOotheca.cs",
- "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_EquipmentOotheca\\Building_EquipmentOotheca.cs*",
- "RelativeToolTip": "Buildings\\Building_EquipmentOotheca\\Building_EquipmentOotheca.cs*",
- "ViewState": "AgIAANoBAAAAAAAAAAAAAAACAABSAAAAAAAAAA==",
+ "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_EquipmentOotheca\\Building_EquipmentOotheca.cs",
+ "RelativeToolTip": "Buildings\\Building_EquipmentOotheca\\Building_EquipmentOotheca.cs",
+ "ViewState": "AgIAAEgCAAAAAAAAAAAewF8CAABDAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-12-15T18:22:14.171Z",
"EditorCaption": ""
@@ -49,22 +100,22 @@
"$type": "Document",
"DocumentIndex": 1,
"Title": "Building_Ootheca.cs",
- "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_Ootheca\\Building_Ootheca.cs",
+ "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_Ootheca\\Building_Ootheca.cs",
"RelativeDocumentMoniker": "Buildings\\Building_Ootheca\\Building_Ootheca.cs",
- "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_Ootheca\\Building_Ootheca.cs",
+ "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_Ootheca\\Building_Ootheca.cs",
"RelativeToolTip": "Buildings\\Building_Ootheca\\Building_Ootheca.cs",
- "ViewState": "AgIAAAAAAAAAAAAAAADwvwAAAAAAAAAAAAAAAA==",
+ "ViewState": "AgIAACkBAAAAAAAAAAAhwC0BAAApAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-12-15T18:22:12.217Z",
"EditorCaption": ""
},
{
"$type": "Document",
- "DocumentIndex": 2,
+ "DocumentIndex": 5,
"Title": "CompProperties_EquipmentIncubatorData.cs",
- "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_EquipmentOotheca\\CompProperties_EquipmentIncubatorData.cs",
+ "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_EquipmentOotheca\\CompProperties_EquipmentIncubatorData.cs",
"RelativeDocumentMoniker": "Buildings\\Building_EquipmentOotheca\\CompProperties_EquipmentIncubatorData.cs",
- "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_EquipmentOotheca\\CompProperties_EquipmentIncubatorData.cs",
+ "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_EquipmentOotheca\\CompProperties_EquipmentIncubatorData.cs",
"RelativeToolTip": "Buildings\\Building_EquipmentOotheca\\CompProperties_EquipmentIncubatorData.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAACYAAAAaAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
@@ -73,16 +124,15 @@
},
{
"$type": "Document",
- "DocumentIndex": 3,
+ "DocumentIndex": 6,
"Title": "ARA_HediffDefOf.cs",
- "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_HediffDefOf.cs",
+ "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_HediffDefOf.cs",
"RelativeDocumentMoniker": "ARA_HediffDefOf.cs",
- "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_HediffDefOf.cs",
+ "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_HediffDefOf.cs",
"RelativeToolTip": "ARA_HediffDefOf.cs",
"ViewState": "AgIAAAAAAAAAAAAAAADwvxgAAAAdAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2025-12-15T17:32:18.493Z",
- "EditorCaption": ""
+ "WhenOpened": "2025-12-15T17:32:18.493Z"
}
]
}
diff --git a/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/Building_EquipmentOotheca.cs b/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/Building_EquipmentOotheca.cs
index c932663..2d6886c 100644
--- a/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/Building_EquipmentOotheca.cs
+++ b/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/Building_EquipmentOotheca.cs
@@ -33,12 +33,303 @@ namespace ArachnaeSwarm
private float qualityMultiplier = 1.0f;
private float qualityProgress = 0f;
private float qualityTotal = 0f;
-
+ // === 新增:营养液消耗相关字段 ===
+ private int totalNutrientCost = 0; // 总共需要的营养液地块数量
+ private int consumedNutrientCount = 0; // 已消耗的营养液地块数量
+ private int lastConsumeCheckTick = -1; // 上次检查消耗的时间
+ private const int ConsumeCheckInterval = 250; // 检查间隔(tick)
+ private const int ConsumeRadius = 5; // 搜索半径
+ private List consumedCells = new List(); // 已消耗的单元格记录
+ private bool hasStartedConsumption = false; // 是否已开始消耗
+ private float consumeProgress = 0f; // 消耗进度(0-1)
+
+ // === 新增属性 ===
+ public int TotalNutrientCost => totalNutrientCost;
+ public int ConsumedNutrientCount => consumedNutrientCount;
+ public float NutrientProgress => totalNutrientCost > 0 ? (float)consumedNutrientCount / totalNutrientCost : 0f;
+ public bool HasEnoughNutrients => consumedNutrientCount >= totalNutrientCost;
+ public bool IsConsuming => hasStartedConsumption && !HasEnoughNutrients && isIncubating;
+
+
+ // === 新增:营养液消耗方法 ===
+
+ // 初始化营养液消耗需求
+ private void InitializeNutrientConsumption()
+ {
+ if (incubatingThingDef == null)
+ return;
+
+ // 获取孵化成本统计值
+ var costStat = DefDatabase.GetNamedSilentFail("ARA_IncubationCost");
+ if (costStat != null)
+ {
+ totalNutrientCost = Mathf.RoundToInt(incubatingThingDef.GetStatValueAbstract(costStat, null));
+ }
+ else
+ {
+ totalNutrientCost = 0; // 如果统计不存在,则不需要消耗
+ }
+
+ consumedNutrientCount = 0;
+ consumedCells.Clear();
+ hasStartedConsumption = false;
+ consumeProgress = 0f;
+ }
+
+ // 检查并消耗营养液
+ private void CheckAndConsumeNutrients()
+ {
+ if (!isIncubating || incubatingThingDef == null || HasEnoughNutrients)
+ return;
+ // 第一次检查时标记开始消耗
+ if (!hasStartedConsumption)
+ {
+ hasStartedConsumption = true;
+ Messages.Message("ARA_EquipmentIncubator.StartedNutrientConsumption".Translate(),
+ this, MessageTypeDefOf.SilentInput);
+ }
+ // 计算本次应该消耗的数量
+ // 基于孵化进度来动态计算
+ float targetProgress = AdjustedProgressPercent;
+ int targetConsumed = Mathf.RoundToInt(targetProgress * totalNutrientCost);
+ int toConsume = targetConsumed - consumedNutrientCount;
+ if (toConsume <= 0)
+ return;
+ // 查找可消耗的营养液单元格
+ List availableCells = FindNutrientCells();
+ int consumedThisTick = 0;
+ for (int i = 0; i < Mathf.Min(toConsume, availableCells.Count); i++)
+ {
+ if (ConsumeNutrientCell(availableCells[i]))
+ {
+ consumedThisTick++;
+ consumedNutrientCount++;
+ // 添加到已消耗列表
+ consumedCells.Add(availableCells[i]);
+ if (HasEnoughNutrients)
+ break;
+ }
+ }
+ if (consumedThisTick > 0)
+ {
+ consumeProgress = NutrientProgress;
+ // 如果达到需求,显示消息
+ if (HasEnoughNutrients)
+ {
+ Messages.Message("ARA_EquipmentIncubator.NutrientRequirementsMet".Translate(),
+ this, MessageTypeDefOf.PositiveEvent);
+ }
+ }
+ else if (Ext.nutrientDeficiencyDamageEnabled && toConsume > 0)
+ {
+ // === 新增:没有找到营养液,造成伤害 ===
+ ApplyNutrientDeficiencyDamage();
+
+ // === 新增:如果设置停止孵化,则暂停进度 ===
+ if (Ext.stopIncubationWhenNutrientDeficient)
+ {
+ // 暂停孵化进度,直到找到营养液
+ // 我们通过不增加incubationProgress来实现
+ // 但这里需要特殊处理,我们在Tick方法中处理
+ }
+ }
+ }
+
+ // === 新增:应用营养液不足的伤害 ===
+ private void ApplyNutrientDeficiencyDamage()
+ {
+ if (Ext.nutrientDeficiencyDamageAmount <= 0f || Ext.nutrientDamageType == null)
+ return;
+
+ try
+ {
+ // 计算实际伤害量
+ float damageAmount = Ext.nutrientDeficiencyDamageAmount;
+
+ // 如果建筑血量已经很低,减少伤害以避免立即摧毁
+ float healthPercent = (float)HitPoints / MaxHitPoints;
+ if (healthPercent < 0.3f)
+ {
+ damageAmount *= 0.5f; // 血量低于30%时,伤害减半
+ }
+
+ if (healthPercent < 0.1f)
+ {
+ damageAmount *= 0.2f; // 血量低于10%时,伤害减为20%
+ }
+
+ // 应用伤害
+ DamageInfo damageInfo = new DamageInfo(
+ Ext.nutrientDamageType,
+ damageAmount,
+ armorPenetration: 0,
+ angle: -1f,
+ instigator: null,
+ hitPart: null,
+ weapon: null,
+ category: DamageInfo.SourceCategory.ThingOrUnknown,
+ intendedTarget: this
+ );
+
+ TakeDamage(damageInfo);
+
+ // 显示伤害消息(几率性)
+ if (Ext.showDamageMessages && Rand.Chance(Ext.damageMessageChance))
+ {
+ Messages.Message("ARA_EquipmentIncubator.NutrientDeficiencyDamage".Translate(damageAmount.ToString("F1")),
+ this, MessageTypeDefOf.NegativeEvent);
+ }
+
+ // 更新质量乘数(因为血量变化会影响质量)
+ UpdateQualityMultiplier();
+ }
+ catch (Exception ex)
+ {
+ Log.Error($"Failed to apply nutrient deficiency damage: {ex.Message}");
+ }
+ }
+
+ // 查找可消耗的营养液单元格
+ public List FindNutrientCells()
+ {
+ List availableCells = new List();
+ var map = Map;
+ if (map == null)
+ return availableCells;
+ // === 修改:使用ModExtension中定义的营养液检测半径 ===
+ int searchRadius = Ext.NutrientSolutionRadiusInt; // 使用ModExtension中的半径
+
+ TerrainDef nutrientDef = DefDatabase.GetNamedSilentFail("ARA_Incubator_Nutrient_Solution");
+ if (nutrientDef == null)
+ return availableCells;
+ // 搜索矩形区域
+ for (int x = -searchRadius; x <= searchRadius; x++)
+ {
+ for (int z = -searchRadius; z <= searchRadius; z++)
+ {
+ IntVec3 cell = Position + new IntVec3(x, 0, z);
+ // 排除自己的位置
+ if (cell == Position)
+ continue;
+ // 检查是否在边界内且未被消耗过
+ if (cell.InBounds(map) && !consumedCells.Contains(cell))
+ {
+ TerrainDef terrain = map.terrainGrid.TerrainAt(cell);
+ if (terrain == nutrientDef)
+ {
+ availableCells.Add(cell);
+ }
+ }
+ }
+ }
+ // 随机排序,避免总是从固定位置开始消耗
+ availableCells.Shuffle();
+ return availableCells;
+ }
+
+ // 消耗单个营养液单元格
+ private bool ConsumeNutrientCell(IntVec3 cell)
+ {
+ var map = Map;
+ if (map == null)
+ return false;
+
+ // 获取目标地貌定义
+ TerrainDef insectCreepDef = DefDatabase.GetNamedSilentFail("ARA_InsectCreep");
+ TerrainDef nutrientDef = DefDatabase.GetNamedSilentFail("ARA_Incubator_Nutrient_Solution");
+
+ if (insectCreepDef == null || nutrientDef == null)
+ return false;
+
+ // 记录原来的地貌
+ TerrainDef originalTerrain = map.terrainGrid.TerrainAt(cell);
+
+ // 转换为昆虫爬行地貌
+ map.terrainGrid.SetTerrain(cell, insectCreepDef);
+
+ // 检查是否有物品需要移除(如果有的话)
+ List thingsAtCell = map.thingGrid.ThingsListAt(cell);
+ foreach (Thing thing in thingsAtCell)
+ {
+ // 如果物品阻碍了地貌转换,可能需要处理
+ if (thing.def.passability == Traversability.Impassable)
+ {
+ // 可以根据需要处理阻碍物
+ continue;
+ }
+ }
+
+ // 创建营养液蓝图
+ try
+ {
+ // 使用PlaceBlueprintForBuild方法创建蓝图
+ Blueprint_Build blueprint = GenConstruct.PlaceBlueprintForBuild(
+ nutrientDef,
+ cell,
+ map,
+ Rot4.North, // 地貌没有旋转,使用默认
+ Faction.OfPlayer,
+ null // 地貌没有stuff
+ );
+
+ if (blueprint != null)
+ {
+ // 显示转换效果
+ if (Find.TickManager.TicksGame % 10 == 0) // 每10次消耗显示一次效果
+ {
+ MoteMaker.ThrowText(cell.ToVector3Shifted(), map,
+ "ARA_Consumed".Translate(), Color.yellow);
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Log.Error($"Failed to place nutrient solution blueprint at {cell}: {ex.Message}");
+ // 如果蓝图放置失败,恢复原貌
+ map.terrainGrid.SetTerrain(cell, originalTerrain);
+ return false;
+ }
+
+ return true;
+ }
+
+ // 获取营养液消耗描述
+ public string GetNutrientConsumptionDescription()
+ {
+ var builder = new StringBuilder();
+
+ builder.AppendLine("ARA_EquipmentIncubator.NutrientConsumption".Translate());
+ builder.AppendLine();
+
+ if (totalNutrientCost == 0)
+ {
+ builder.AppendLine("ARA_EquipmentIncubator.NoNutrientCost".Translate());
+ return builder.ToString().TrimEndNewlines();
+ }
+
+ builder.AppendLine("ARA_EquipmentIncubator.NutrientRequirement".Translate(totalNutrientCost));
+ builder.AppendLine("ARA_EquipmentIncubator.NutrientConsumed".Translate(consumedNutrientCount));
+ builder.AppendLine("ARA_EquipmentIncubator.NutrientProgress".Translate(NutrientProgress.ToStringPercent()));
+
+ if (HasEnoughNutrients)
+ {
+ builder.AppendLine();
+ builder.AppendLine("ARA_EquipmentIncubator.NutrientRequirementsMet".Translate());
+ }
+ else if (IsConsuming)
+ {
+ builder.AppendLine();
+ builder.AppendLine("ARA_EquipmentIncubator.ConsumingNutrients".Translate());
+ }
+
+ return builder.ToString().TrimEndNewlines();
+ }
+
// 缓存的ModExtension
private OothecaIncubatorExtension cachedExtension;
// 获取ModExtension的辅助属性
- private OothecaIncubatorExtension Ext
+ public OothecaIncubatorExtension Ext
{
get
{
@@ -254,7 +545,7 @@ namespace ArachnaeSwarm
Messages.Message("ARA_EquipmentIncubator.LarvaArrived".Translate() + " " + "ARA_EquipmentIncubator.ActivatingOotheca".Translate(),
MessageTypeDefOf.SilentInput);
}
-
+
// 幼虫完成操作
public void NotifyLarvaOperationComplete(Pawn larva)
{
@@ -263,38 +554,34 @@ namespace ArachnaeSwarm
ArachnaeLog.Debug("Larva operation complete called with wrong larva.");
return;
}
-
var config = EquipmentIncubatorData?.SelectedConfig;
if (config == null)
{
ArachnaeLog.Debug("No incubation config selected when larva completed operation.");
return;
}
-
incubatingThingDef = config.thingDef;
incubationDuration = config.DaysRequired * 60000f;
incubationProgress = 0f;
isIncubating = true;
-
qualityTotal = incubationDuration;
qualityProgress = 0f;
UpdateQualityMultiplier();
-
UpdateSpeedMultiplier();
+ // === 新增:初始化营养液消耗 ===
+ InitializeNutrientConsumption();
assignedLarva = null;
larvaOperateTicksRemaining = 0;
-
Messages.Message("ARA_EquipmentIncubator.IncubationStarted".Translate() + " " + incubatingThingDef.LabelCap + ". " +
"ARA_EquipmentIncubator.ProcessWillComplete".Translate() + " " + config.DaysRequired + " " + "ARA_EquipmentIncubator.DaysBaseTime".Translate(),
MessageTypeDefOf.PositiveEvent);
}
-
+
// 取消孵化
private void CancelIncubation()
{
if (!isIncubating) return;
-
isIncubating = false;
incubationProgress = 0f;
incubationDuration = 0f;
@@ -302,27 +589,29 @@ namespace ArachnaeSwarm
qualityProgress = 0f;
qualityTotal = 0f;
+ // === 新增:重置营养液消耗 ===
+ totalNutrientCost = 0;
+ consumedNutrientCount = 0;
+ hasStartedConsumption = false;
+ consumeProgress = 0f;
+ consumedCells.Clear();
Messages.Message("ARA_EquipmentIncubator.IncubationCancelled".Translate() + " " + "ARA_EquipmentIncubator.ContentsLost".Translate(),
MessageTypeDefOf.NeutralEvent);
}
-
+
// 完成孵化
private void CompleteIncubation()
{
if (incubatingThingDef == null) return;
-
float finalQualityPercent = QualityPercent;
-
// 生成物品
Thing thing = ThingMaker.MakeThing(incubatingThingDef);
-
+
// 应用质量影响
ApplyQualityEffects(thing, finalQualityPercent);
-
// 放置物品
var spawnPos = Position;
GenPlace.TryPlaceThing(thing, spawnPos, Map, ThingPlaceMode.Near);
-
// 重置状态
isIncubating = false;
incubationProgress = 0f;
@@ -331,20 +620,25 @@ namespace ArachnaeSwarm
qualityProgress = 0f;
qualityTotal = 0f;
+ // === 新增:清理营养液消耗状态 ===
+ totalNutrientCost = 0;
+ consumedNutrientCount = 0;
+ hasStartedConsumption = false;
+ consumeProgress = 0f;
+ consumedCells.Clear();
// 显示消息
string qualityText = finalQualityPercent >= 0.9f ? "ARA_EquipmentIncubator.QualityExcellent".Translate() :
finalQualityPercent >= 0.7f ? "ARA_EquipmentIncubator.QualityGood".Translate() :
finalQualityPercent >= 0.5f ? "ARA_EquipmentIncubator.QualityAverage".Translate() :
finalQualityPercent >= 0.3f ? "ARA_EquipmentIncubator.QualityPoor".Translate() : "ARA_EquipmentIncubator.QualityVeryPoor".Translate();
-
Messages.Message("ARA_EquipmentIncubator.IncubationComplete".Translate() + " " + thing.LabelCap + " " +
"ARA_EquipmentIncubator.HasEmergedWith".Translate() + " " + qualityText + " " +
"ARA_EquipmentIncubator.Quality".Translate() + " (" + finalQualityPercent.ToStringPercent() + ").",
MessageTypeDefOf.PositiveEvent);
-
Destroy();
}
-
+
+
// 应用质量效果
private void ApplyQualityEffects(Thing thing, float qualityPercent)
{
@@ -392,40 +686,50 @@ namespace ArachnaeSwarm
float remainingTicks = GetRemainingTicks();
return (remainingTicks % 60000f) / 2500f;
}
-
+
// 检查字符串
public override string GetInspectString()
{
var baseString = base.GetInspectString();
var builder = new StringBuilder();
-
if (!string.IsNullOrEmpty(baseString))
{
builder.Append(baseString);
}
-
if (isIncubating && incubatingThingDef != null)
{
float progressPercent = AdjustedProgressPercent;
float daysRemaining = GetRemainingDays();
float hoursRemaining = GetRemainingHours();
-
if (builder.Length > 0) builder.AppendLine();
builder.Append("ARA_EquipmentIncubator.Incubating".Translate() + ": " + incubatingThingDef.LabelCap);
builder.AppendLine();
builder.Append("ARA_EquipmentIncubator.Progress".Translate() + ": " + progressPercent.ToStringPercent());
builder.AppendLine();
-
string timeText = "ARA_EquipmentIncubator.TimeRemaining".Translate() + ": " + daysRemaining.ToString("F1") + " " + "ARA_EquipmentIncubator.Days".Translate();
if (hoursRemaining > 0.1f && daysRemaining < 1f)
{
timeText += " (" + hoursRemaining.ToString("F1") + " " + "ARA_EquipmentIncubator.Hours".Translate() + ")";
}
builder.Append(timeText);
-
builder.AppendLine();
builder.Append("ARA_EquipmentIncubator.Speed".Translate() + ": " + SpeedMultiplier.ToStringPercent() + ", " +
"ARA_EquipmentIncubator.Quality".Translate() + ": " + QualityMultiplier.ToStringPercent());
+
+ // === 新增:显示营养液消耗信息 ===
+ if (totalNutrientCost > 0)
+ {
+ builder.AppendLine();
+ builder.Append("ARA_EquipmentIncubator.NutrientConsumption".Translate() + ": " +
+ consumedNutrientCount + " / " + totalNutrientCost +
+ " (" + NutrientProgress.ToStringPercent() + ")");
+
+ if (!HasEnoughNutrients && IsConsuming)
+ {
+ builder.AppendLine();
+ builder.Append("ARA_EquipmentIncubator.ConsumingNutrients".Translate());
+ }
+ }
}
else if (assignedLarva != null)
{
@@ -447,16 +751,26 @@ namespace ArachnaeSwarm
{
if (builder.Length > 0) builder.AppendLine();
builder.Append("ARA_EquipmentIncubator.Target".Translate() + ": " + config.thingDef.LabelCap);
-
builder.AppendLine();
builder.Append("ARA_EquipmentIncubator.SpeedMultiplier".Translate() + ": " + SpeedMultiplier.ToStringPercent() + ", " +
"ARA_EquipmentIncubator.QualityMultiplier".Translate() + ": " + QualityMultiplier.ToStringPercent());
+
+ // === 新增:显示预计的营养液需求 ===
+ var costStat = DefDatabase.GetNamedSilentFail("ARA_IncubationCost");
+ if (costStat != null)
+ {
+ int estimatedCost = Mathf.RoundToInt(config.thingDef.GetStatValueAbstract(costStat, null));
+ if (estimatedCost > 0)
+ {
+ builder.AppendLine();
+ builder.Append("ARA_EquipmentIncubator.EstimatedNutrientCost".Translate() + ": " + estimatedCost);
+ }
+ }
}
}
-
return builder.ToString().TrimEndNewlines();
}
-
+
// Gizmos
public override IEnumerable GetGizmos()
{
@@ -718,17 +1032,18 @@ namespace ArachnaeSwarm
return null;
}
-
+
// 每tick更新
+ // 修改Tick方法,处理营养液不足时停止孵化的逻辑
protected override void Tick()
{
base.Tick();
-
+
if (larvaOperateTicksRemaining > 0)
{
larvaOperateTicksRemaining--;
}
-
+
if (isIncubating)
{
if (lastMultiplierUpdateTick < 0 || Find.TickManager.TicksGame - lastMultiplierUpdateTick >= MultiplierUpdateInterval)
@@ -736,19 +1051,57 @@ namespace ArachnaeSwarm
UpdateSpeedMultiplier();
UpdateQualityMultiplier();
}
-
+
float currentSpeed = SpeedMultiplier;
- incubationProgress += currentSpeed;
-
- qualityProgress += currentSpeed * QualityMultiplier;
-
+
+ // === 新增:检查是否因营养液不足而停止孵化 ===
+ bool shouldProgress = true;
+
+ if (Ext.stopIncubationWhenNutrientDeficient &&
+ !HasEnoughNutrients &&
+ isIncubating &&
+ hasStartedConsumption)
+ {
+ // 检查是否有可用的营养液
+ var availableCells = FindNutrientCells();
+ if (availableCells.Count == 0 && totalNutrientCost > 0 && consumedNutrientCount < totalNutrientCost)
+ {
+ shouldProgress = false;
+
+ // 显示停止消息(第一次或偶尔显示)
+ if (Find.TickManager.TicksGame % 1000 == 0 && Rand.Chance(0.1f))
+ {
+ Messages.Message("ARA_EquipmentIncubator.IncubationPausedNoNutrients".Translate(incubatingThingDef?.LabelCap ?? "Unknown"),
+ this, MessageTypeDefOf.NeutralEvent);
+ }
+ }
+ }
+
+ if (shouldProgress)
+ {
+ incubationProgress += currentSpeed;
+ qualityProgress += currentSpeed * QualityMultiplier;
+ }
+ else
+ {
+ // 孵化暂停,但仍然需要检查营养液消耗(可能营养液又出现了)
+ // 并且仍然应用伤害
+ }
+
+ // === 新增:检查营养液消耗 ===
+ if (lastConsumeCheckTick < 0 || Find.TickManager.TicksGame - lastConsumeCheckTick >= ConsumeCheckInterval)
+ {
+ lastConsumeCheckTick = Find.TickManager.TicksGame;
+ CheckAndConsumeNutrients();
+ }
+
if (incubationProgress >= incubationDuration)
{
CompleteIncubation();
}
}
}
-
+
// 检查是否在孵化间中
private bool IsInIncubatorRoom()
{
@@ -895,12 +1248,12 @@ namespace ArachnaeSwarm
qualityMultiplier = Mathf.Clamp(multiplier, 0f, 1.0f);
}
-
+
// 保存/加载
public override void ExposeData()
{
base.ExposeData();
-
+
Scribe_Values.Look(ref isIncubating, "isIncubating", false);
Scribe_Values.Look(ref incubationProgress, "incubationProgress", 0f);
Scribe_Values.Look(ref incubationDuration, "incubationDuration", 0f);
@@ -912,6 +1265,21 @@ namespace ArachnaeSwarm
Scribe_Values.Look(ref qualityMultiplier, "qualityMultiplier", 1.0f);
Scribe_Values.Look(ref qualityProgress, "qualityProgress", 0f);
Scribe_Values.Look(ref qualityTotal, "qualityTotal", 0f);
+
+ // === 新增:保存营养液消耗状态 ===
+ Scribe_Values.Look(ref totalNutrientCost, "totalNutrientCost", 0);
+ Scribe_Values.Look(ref consumedNutrientCount, "consumedNutrientCount", 0);
+ Scribe_Values.Look(ref lastConsumeCheckTick, "lastConsumeCheckTick", -1);
+ Scribe_Values.Look(ref hasStartedConsumption, "hasStartedConsumption", false);
+ Scribe_Values.Look(ref consumeProgress, "consumeProgress", 0f);
+ Scribe_Collections.Look(ref consumedCells, "consumedCells", LookMode.Value);
+
+ if (Scribe.mode == LoadSaveMode.PostLoadInit)
+ {
+ // 确保列表不为null
+ if (consumedCells == null)
+ consumedCells = new List();
+ }
}
}
}
diff --git a/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/ITab_EquipmentOotheca_Incubation.cs b/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/ITab_EquipmentOotheca_Incubation.cs
index 2c6573a..59ee537 100644
--- a/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/ITab_EquipmentOotheca_Incubation.cs
+++ b/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/ITab_EquipmentOotheca_Incubation.cs
@@ -15,10 +15,10 @@ namespace ArachnaeSwarm
private const float SmallLabelHeight = 20f;
private const float ButtonHeight = 25f;
private const float TabWidth = 320f;
- private const float TabHeight = 420f;
-
+ private const float TabHeight = 450f; // 增加高度以容纳更多信息
+
private Vector2 scrollPosition = Vector2.zero;
- private const float ViewHeight = 450f;
+ private const float ViewHeight = 480f; // 增加视图高度
public override bool IsVisible
{
@@ -46,12 +46,9 @@ namespace ArachnaeSwarm
return;
}
rect = rect.ContractedBy(5f);
-
Rect viewRect = new Rect(0f, 0f, rect.width - 16f, ViewHeight);
Rect scrollRect = new Rect(rect.x, rect.y, rect.width, rect.height);
-
Widgets.BeginScrollView(scrollRect, ref scrollPosition, viewRect);
-
float curY = 0f;
Rect titleRect = new Rect(0f, curY, viewRect.width, LabelHeight);
@@ -144,8 +141,98 @@ namespace ArachnaeSwarm
Text.Anchor = TextAnchor.UpperLeft;
GUI.color = Color.white;
- Widgets.FillableBar(qualityBarRect, qualityPercent, SolidColorMaterials.NewSolidColorTexture(new Color(0.1f, 0.4f, 0.8f, 0.5f)));
-
+ Widgets.FillableBar(qualityBarRect, qualityPercent, SolidColorMaterials.NewSolidColorTexture(new Color(0.1f, 0.4f, 0.8f, 0.5f))); curY += BarHeight + 25f;
+
+ // === 新增:营养液消耗显示 ===
+ if (ootheca.TotalNutrientCost > 0)
+ {
+ // 标题
+ Rect nutrientTitleRect = new Rect(0f, curY, viewRect.width, SmallLabelHeight);
+ Widgets.Label(nutrientTitleRect, "ARA_EquipmentIncubator.NutrientConsumption".Translate());
+ curY += SmallLabelHeight + 5f;
+
+ // 进度条
+ Rect nutrientBarRect = new Rect(0f, curY, viewRect.width, BarHeight);
+ float nutrientProgress = ootheca.NutrientProgress;
+
+ Widgets.FillableBar(nutrientBarRect, nutrientProgress,
+ SolidColorMaterials.NewSolidColorTexture(new Color(0.8f, 0.6f, 0.1f, 0.5f)));
+
+ // 进度文本
+ string nutrientText = $"{ootheca.ConsumedNutrientCount} / {ootheca.TotalNutrientCost} ({nutrientProgress:P0})";
+ Text.Anchor = TextAnchor.MiddleCenter;
+ Widgets.Label(nutrientBarRect, nutrientText);
+ Text.Anchor = TextAnchor.UpperLeft;
+
+ curY += BarHeight + 10f;
+
+ // 状态描述
+ Rect nutrientStatusRect = new Rect(0f, curY, viewRect.width, SmallLabelHeight);
+ string statusText;
+ if (ootheca.HasEnoughNutrients)
+ {
+ statusText = "ARA_EquipmentIncubator.NutrientRequirementsMet".Translate();
+ GUI.color = Color.green;
+ }
+ else if (ootheca.IsConsuming)
+ {
+ statusText = "ARA_EquipmentIncubator.ConsumingNutrients".Translate();
+ GUI.color = Color.yellow;
+ }
+ else
+ {
+ statusText = "ARA_EquipmentIncubator.WaitingForNutrients".Translate();
+ GUI.color = Color.gray;
+ }
+
+ Widgets.Label(nutrientStatusRect, statusText);
+ GUI.color = Color.white;
+
+ curY += SmallLabelHeight + 15f;
+ }
+ // === 新增:营养液不足状态显示 ===
+ if (ootheca.TotalNutrientCost > 0 && ootheca.IsConsuming)
+ {
+ curY += BarHeight + 15f;
+
+ // 检查是否有营养液不足的警告
+ var availableCells = ootheca.FindNutrientCells();
+ if (availableCells.Count == 0 && !ootheca.HasEnoughNutrients)
+ {
+ Rect warningRect = new Rect(0f, curY, viewRect.width, SmallLabelHeight * 2);
+
+ if (ootheca.Ext.stopIncubationWhenNutrientDeficient)
+ {
+ Widgets.Label(warningRect, "ARA_EquipmentIncubator.IncubationPausedWarning".Translate());
+ GUI.color = Color.yellow;
+ }
+ else
+ {
+ Widgets.Label(warningRect, "ARA_EquipmentIncubator.NutrientDeficiencyWarning".Translate());
+ GUI.color = Color.red;
+ }
+
+ // 绘制警告背景
+ Widgets.DrawHighlight(warningRect);
+ GUI.color = Color.white;
+
+ curY += SmallLabelHeight * 2 + 10f;
+
+ // 显示血量警告
+ float healthPercent = (float)ootheca.HitPoints / ootheca.MaxHitPoints;
+ if (healthPercent < 0.5f)
+ {
+ Rect healthWarningRect = new Rect(0f, curY, viewRect.width, SmallLabelHeight);
+ Widgets.Label(healthWarningRect, "ARA_EquipmentIncubator.LowHealthWarning".Translate(healthPercent.ToStringPercent()));
+ GUI.color = new Color(1f, 0.5f, 0.5f);
+ Widgets.DrawHighlight(healthWarningRect);
+ GUI.color = Color.white;
+
+ curY += SmallLabelHeight + 5f;
+ }
+ }
+ }
+
string qualityProgressText = $"{qualityPercent:P0}";
Text.Anchor = TextAnchor.MiddleCenter;
Widgets.Label(qualityBarRect, qualityProgressText);
diff --git a/Source/ArachnaeSwarm/Buildings/Building_Ootheca/Building_Ootheca.cs b/Source/ArachnaeSwarm/Buildings/Building_Ootheca/Building_Ootheca.cs
index 4324a4d..2acbaa6 100644
--- a/Source/ArachnaeSwarm/Buildings/Building_Ootheca/Building_Ootheca.cs
+++ b/Source/ArachnaeSwarm/Buildings/Building_Ootheca/Building_Ootheca.cs
@@ -297,28 +297,23 @@ namespace ArachnaeSwarm
Messages.Message("ARA_OothecaIncubator.IncubationCancelled".Translate() + " " + "ARA_OothecaIncubator.ContentsLost".Translate(),
MessageTypeDefOf.NeutralEvent);
}
-
+
// 完成孵化
private void CompleteIncubation()
{
if (incubatingPawnKind == null) return;
-
// 计算最终质量百分比
float finalQualityPercent = QualityPercent;
-
// 生成新的pawn
var pawn = PawnGenerator.GeneratePawn(incubatingPawnKind, Faction);
-
- // 应用质量影响
+ // 应用质量影响(包括Hediff奖励)
ApplyQualityEffects(pawn, finalQualityPercent);
-
// 尝试将pawn放置在地图上
var spawnPos = Position;
if (!pawn.Spawned)
{
GenSpawn.Spawn(pawn, spawnPos, Map);
}
-
// 重置孵化状态
isIncubating = false;
incubationProgress = 0f;
@@ -326,21 +321,18 @@ namespace ArachnaeSwarm
incubatingPawnKind = null;
qualityProgress = 0f;
qualityTotal = 0f;
-
// 显示消息
string qualityText = finalQualityPercent >= 0.9f ? "ARA_OothecaIncubator.QualityExcellent".Translate() :
finalQualityPercent >= 0.7f ? "ARA_OothecaIncubator.QualityGood".Translate() :
finalQualityPercent >= 0.5f ? "ARA_OothecaIncubator.QualityAverage".Translate() :
finalQualityPercent >= 0.3f ? "ARA_OothecaIncubator.QualityPoor".Translate() : "ARA_OothecaIncubator.QualityVeryPoor".Translate();
-
Messages.Message("ARA_OothecaIncubator.IncubationComplete".Translate() + " " + pawn.LabelCap + " " +
"ARA_OothecaIncubator.HasEmergedWith".Translate() + " " + qualityText + " " +
"ARA_OothecaIncubator.Quality".Translate() + " (" + finalQualityPercent.ToStringPercent() + ").",
MessageTypeDefOf.PositiveEvent);
-
Destroy();
}
-
+
// 显示额外信息(简化版本,只显示速率,不显示因子)
public override string GetInspectString()
{
@@ -712,10 +704,54 @@ namespace ArachnaeSwarm
// 应用质量效果到生成的pawn
private void ApplyQualityEffects(Pawn pawn, float qualityPercent)
{
- // 质量影响:根据质量百分比调整pawn的属性
- // 这里可以添加具体的质量效果逻辑
+ ApplyHediffRewards(pawn, qualityPercent);
}
-
+ // === 新增:应用Hediff奖励方法 ===
+ private void ApplyHediffRewards(Pawn pawn, float qualityPercent)
+ {
+ var config = IncubatorData?.SelectedConfig;
+ if (config == null) return;
+
+ // 获取应奖励的Hediff列表
+ List rewardHediffs = config.GetRewardHediffs(qualityPercent);
+ if (rewardHediffs == null || rewardHediffs.Count == 0) return;
+
+ // 应用Hediff
+ int appliedCount = 0;
+ foreach (var hediffDef in rewardHediffs)
+ {
+ if (hediffDef == null) continue;
+
+ try
+ {
+ // 检查pawn是否已经有这个Hediff(避免重复)
+ if (!pawn.health.hediffSet.HasHediff(hediffDef))
+ {
+ // 创建并添加Hediff
+ Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn);
+ pawn.health.AddHediff(hediff);
+ appliedCount++;
+ }
+ }
+ catch (System.Exception ex)
+ {
+ Log.Error($"Failed to apply hediff {hediffDef?.defName} to pawn {pawn.Label}: {ex.Message}");
+ }
+ }
+
+ // 显示奖励消息
+ if (appliedCount > 0)
+ {
+ string message = config.GetRewardMessage(qualityPercent);
+ if (string.IsNullOrEmpty(message))
+ {
+ message = "ARA_QualityReward_Default".Translate(pawn.LabelShortCap, appliedCount);
+ }
+
+ Messages.Message(message, pawn, MessageTypeDefOf.PositiveEvent);
+ }
+ }
+
// 检查是否在孵化间中
private bool IsInIncubatorRoom()
{
diff --git a/Source/ArachnaeSwarm/Buildings/Building_Ootheca/CompProperties_IncubatorData.cs b/Source/ArachnaeSwarm/Buildings/Building_Ootheca/CompProperties_IncubatorData.cs
index c4608bb..1f35f9c 100644
--- a/Source/ArachnaeSwarm/Buildings/Building_Ootheca/CompProperties_IncubatorData.cs
+++ b/Source/ArachnaeSwarm/Buildings/Building_Ootheca/CompProperties_IncubatorData.cs
@@ -1,3 +1,4 @@
+// File: Comps/CompProperties_IncubatorData.cs
using System.Collections.Generic;
using System.Text;
using RimWorld;
@@ -6,6 +7,40 @@ using Verse;
namespace ArachnaeSwarm
{
+ // 质量阈值和Hediff奖励配置
+ public class QualityHediffReward : IExposable
+ {
+ // 质量阈值(0-1)
+ public float qualityThreshold = 0f;
+
+ // 达到该阈值时给予的Hediff数量
+ public int hediffCount = 0;
+
+ // 是否给予全部Hediff(true=给予列表中所有Hediff,false=随机选择指定数量的Hediff)
+ public bool giveAllHediffs = false;
+
+ // 消息文本(可选)
+ public string messageKey = null;
+
+ public QualityHediffReward() { }
+
+ public QualityHediffReward(float threshold, int count, bool giveAll = false, string message = null)
+ {
+ qualityThreshold = threshold;
+ hediffCount = count;
+ giveAllHediffs = giveAll;
+ messageKey = message;
+ }
+
+ public void ExposeData()
+ {
+ Scribe_Values.Look(ref qualityThreshold, "qualityThreshold", 0f);
+ Scribe_Values.Look(ref hediffCount, "hediffCount", 0);
+ Scribe_Values.Look(ref giveAllHediffs, "giveAllHediffs", false);
+ Scribe_Values.Look(ref messageKey, "messageKey");
+ }
+ }
+
// IncubationConfig 保持不变
public class IncubationConfig : IExposable
{
@@ -13,6 +48,10 @@ namespace ArachnaeSwarm
public ResearchProjectDef requiredResearch;
public float daysRequired;
public string buttonIconPath;
+
+ // === 新增:每个配置可以有自己的Hediff奖励列表 ===
+ public List extraHediffs = new List();
+ public List hediffRewards = new List();
public IncubationConfig() { }
@@ -23,6 +62,20 @@ namespace ArachnaeSwarm
this.requiredResearch = requiredResearch;
this.daysRequired = daysRequired;
this.buttonIconPath = buttonIconPath;
+ extraHediffs = new List();
+ hediffRewards = CreateDefaultRewards(); // 创建默认奖励配置
+ }
+
+ // 创建默认奖励配置(30%、50%、85%、99%阈值)
+ private List CreateDefaultRewards()
+ {
+ return new List
+ {
+ new QualityHediffReward(0.30f, 1, false, "ARA_QualityReward_1Hediff"),
+ new QualityHediffReward(0.50f, 2, false, "ARA_QualityReward_2Hediff"),
+ new QualityHediffReward(0.85f, 3, false, "ARA_QualityReward_3Hediff"),
+ new QualityHediffReward(0.99f, 4, true, "ARA_QualityReward_AllHediff")
+ };
}
public void ExposeData()
@@ -31,12 +84,24 @@ namespace ArachnaeSwarm
Scribe_Defs.Look(ref requiredResearch, "requiredResearch");
Scribe_Values.Look(ref daysRequired, "daysRequired", 1f);
Scribe_Values.Look(ref buttonIconPath, "buttonIconPath");
+
+ // === 新增:保存Hediff相关数据 ===
+ Scribe_Collections.Look(ref extraHediffs, "extraHediffs", LookMode.Def);
+ Scribe_Collections.Look(ref hediffRewards, "hediffRewards", LookMode.Deep);
+
+ if (Scribe.mode == LoadSaveMode.PostLoadInit)
+ {
+ if (extraHediffs == null)
+ extraHediffs = new List();
+ if (hediffRewards == null)
+ hediffRewards = CreateDefaultRewards();
+ }
}
// 检查是否满足研究要求
public bool IsResearchComplete => requiredResearch == null || requiredResearch.IsFinished;
- // 在配置描述中使用翻译
+ // 获取描述 - 添加Hediff奖励信息
public string GetDescription()
{
var builder = new StringBuilder();
@@ -51,9 +116,128 @@ namespace ArachnaeSwarm
else
builder.AppendLine("Research".Translate() + ": " + requiredResearch.LabelCap + " (" + "Required".Translate() + ")");
}
+
+ // === 新增:显示Hediff奖励信息 ===
+ if (extraHediffs != null && extraHediffs.Count > 0)
+ {
+ builder.AppendLine();
+ builder.AppendLine("HediffRewards".Translate() + ":");
+
+ foreach (var hediff in extraHediffs)
+ {
+ if (hediff != null)
+ {
+ builder.AppendLine(" - " + hediff.LabelCap);
+ }
+ }
+
+ // 显示质量阈值信息
+ if (hediffRewards != null && hediffRewards.Count > 0)
+ {
+ builder.AppendLine();
+ builder.AppendLine("QualityThresholds".Translate() + ":");
+ foreach (var reward in hediffRewards)
+ {
+ if (reward.qualityThreshold > 0 && reward.hediffCount > 0)
+ {
+ string rewardText = $" {reward.qualityThreshold:P0}: ";
+ if (reward.giveAllHediffs)
+ {
+ rewardText += "AllHediffsReward".Translate();
+ }
+ else
+ {
+ rewardText += "HediffCountReward".Translate(reward.hediffCount);
+ }
+ builder.AppendLine(rewardText);
+ }
+ }
+ }
+ }
return builder.ToString().TrimEndNewlines();
}
+
+ // === 新增:获取应给予的Hediff数量 ===
+ public int GetHediffCountForQuality(float qualityPercent)
+ {
+ if (hediffRewards == null || hediffRewards.Count == 0)
+ return 0;
+
+ // 按阈值降序排序,找到第一个满足条件的奖励
+ var sortedRewards = new List(hediffRewards);
+ sortedRewards.Sort((a, b) => b.qualityThreshold.CompareTo(a.qualityThreshold));
+
+ foreach (var reward in sortedRewards)
+ {
+ if (qualityPercent >= reward.qualityThreshold)
+ {
+ if (reward.giveAllHediffs)
+ {
+ return extraHediffs != null ? extraHediffs.Count : 0;
+ }
+ return reward.hediffCount;
+ }
+ }
+
+ return 0;
+ }
+
+ // === 新增:获取奖励的Hediff列表 ===
+ public List GetRewardHediffs(float qualityPercent)
+ {
+ int count = GetHediffCountForQuality(qualityPercent);
+ if (count <= 0 || extraHediffs == null || extraHediffs.Count == 0)
+ return new List();
+
+ // 如果要求给予所有Hediff,返回全部
+ var sortedRewards = new List(hediffRewards);
+ sortedRewards.Sort((a, b) => b.qualityThreshold.CompareTo(a.qualityThreshold));
+
+ foreach (var reward in sortedRewards)
+ {
+ if (qualityPercent >= reward.qualityThreshold && reward.giveAllHediffs)
+ {
+ return new List(extraHediffs);
+ }
+ }
+
+ // 否则随机选择指定数量的Hediff(不重复)
+ List result = new List();
+ List available = new List(extraHediffs);
+
+ count = Mathf.Min(count, available.Count);
+ for (int i = 0; i < count; i++)
+ {
+ if (available.Count == 0) break;
+
+ int index = Rand.Range(0, available.Count);
+ result.Add(available[index]);
+ available.RemoveAt(index);
+ }
+
+ return result;
+ }
+
+ // === 新增:获取奖励消息 ===
+ public string GetRewardMessage(float qualityPercent)
+ {
+ if (hediffRewards == null || hediffRewards.Count == 0)
+ return null;
+
+ var sortedRewards = new List(hediffRewards);
+ sortedRewards.Sort((a, b) => b.qualityThreshold.CompareTo(a.qualityThreshold));
+
+ foreach (var reward in sortedRewards)
+ {
+ if (qualityPercent >= reward.qualityThreshold && !string.IsNullOrEmpty(reward.messageKey))
+ {
+ return reward.messageKey.Translate();
+ }
+ }
+
+ return null;
+ }
}
// 组件属性定义
@@ -69,6 +253,10 @@ namespace ArachnaeSwarm
public string buttonDesc = "IncubatorButtonDesc"; // 按钮描述翻译键
public string menuTitle = "IncubatorMenuTitle"; // 菜单标题翻译键
public string defaultIconPath = "UI/Commands/Default";
+
+ // === 新增:全局Hediff奖励(所有配置共享)===
+ public List globalExtraHediffs = new List();
+ public List globalHediffRewards = new List();
public CompProperties_IncubatorData()
{
@@ -80,6 +268,67 @@ namespace ArachnaeSwarm
base.ResolveReferences(parentDef);
if (incubationConfigs == null)
incubationConfigs = new List();
+ if (globalExtraHediffs == null)
+ globalExtraHediffs = new List();
+ if (globalHediffRewards == null)
+ globalHediffRewards = CreateDefaultGlobalRewards();
+ }
+
+ // 创建默认的全局奖励配置
+ private List CreateDefaultGlobalRewards()
+ {
+ return new List
+ {
+ new QualityHediffReward(0.30f, 1, false, "ARA_QualityReward_1Hediff"),
+ new QualityHediffReward(0.50f, 2, false, "ARA_QualityReward_2Hediff"),
+ new QualityHediffReward(0.85f, 3, false, "ARA_QualityReward_3Hediff"),
+ new QualityHediffReward(0.99f, 4, true, "ARA_QualityReward_AllHediff")
+ };
+ }
+
+ // === 新增:配置后处理,确保每个配置都有Hediff奖励 ===
+ public override void PostLoadSpecial(ThingDef parent)
+ {
+ base.PostLoadSpecial(parent);
+
+ // 确保每个配置都有默认的奖励配置
+ foreach (var config in incubationConfigs)
+ {
+ if (config.hediffRewards == null || config.hediffRewards.Count == 0)
+ {
+ config.hediffRewards = new List
+ {
+ new QualityHediffReward(0.30f, 1, false, "ARA_QualityReward_1Hediff"),
+ new QualityHediffReward(0.50f, 2, false, "ARA_QualityReward_2Hediff"),
+ new QualityHediffReward(0.85f, 3, false, "ARA_QualityReward_3Hediff"),
+ new QualityHediffReward(0.99f, 4, true, "ARA_QualityReward_AllHediff")
+ };
+ }
+
+ // 合并全局Hediff列表
+ if (globalExtraHediffs != null && globalExtraHediffs.Count > 0)
+ {
+ if (config.extraHediffs == null)
+ config.extraHediffs = new List();
+
+ foreach (var hediff in globalExtraHediffs)
+ {
+ if (!config.extraHediffs.Contains(hediff))
+ {
+ config.extraHediffs.Add(hediff);
+ }
+ }
+ }
+
+ // 如果配置没有自己的奖励规则,使用全局规则
+ if (globalHediffRewards != null && globalHediffRewards.Count > 0)
+ {
+ if (config.hediffRewards == null || config.hediffRewards.Count == 0)
+ {
+ config.hediffRewards = new List(globalHediffRewards);
+ }
+ }
+ }
}
}
@@ -174,5 +423,48 @@ namespace ArachnaeSwarm
}
return base.CompInspectStringExtra();
}
+
+ // === 新增:获取当前配置的Hediff奖励信息 ===
+ public string GetHediffRewardDescription()
+ {
+ var config = SelectedConfig;
+ if (config == null || config.extraHediffs == null || config.extraHediffs.Count == 0)
+ return null;
+
+ var builder = new StringBuilder();
+ builder.AppendLine("HediffRewards".Translate() + ":");
+
+ foreach (var hediff in config.extraHediffs)
+ {
+ if (hediff != null)
+ {
+ builder.AppendLine(" - " + hediff.LabelCap);
+ }
+ }
+
+ if (config.hediffRewards != null && config.hediffRewards.Count > 0)
+ {
+ builder.AppendLine();
+ builder.AppendLine("QualityThresholds".Translate() + ":");
+ foreach (var reward in config.hediffRewards)
+ {
+ if (reward.qualityThreshold > 0 && reward.hediffCount > 0)
+ {
+ string rewardText = $" {reward.qualityThreshold:P0}: ";
+ if (reward.giveAllHediffs)
+ {
+ rewardText += "AllHediffsReward".Translate();
+ }
+ else
+ {
+ rewardText += "HediffCountReward".Translate(reward.hediffCount);
+ }
+ builder.AppendLine(rewardText);
+ }
+ }
+ }
+
+ return builder.ToString().TrimEndNewlines();
+ }
}
}
diff --git a/Source/ArachnaeSwarm/Buildings/Building_Ootheca/OothecaIncubatorExtension.cs b/Source/ArachnaeSwarm/Buildings/Building_Ootheca/OothecaIncubatorExtension.cs
index b90dba3..58cce3c 100644
--- a/Source/ArachnaeSwarm/Buildings/Building_Ootheca/OothecaIncubatorExtension.cs
+++ b/Source/ArachnaeSwarm/Buildings/Building_Ootheca/OothecaIncubatorExtension.cs
@@ -38,10 +38,29 @@ namespace ArachnaeSwarm
// 获取营养液检测半径的整数形式(用于循环)
public int NutrientSolutionRadiusInt => (int)nutrientSolutionRadius;
-
+
// 获取其他卵距离检测半径的整数形式
public int NearbyOothecaRadiusInt => (int)nearbyOothecaRadius;
-
+
+ // 是否启用营养液不足时的伤害
+ public bool nutrientDeficiencyDamageEnabled = false;
+
+ // 每次检查间隔造成的伤害量
+ public float nutrientDeficiencyDamageAmount = 1f;
+
+ // 伤害类型
+ public DamageDef nutrientDamageType = DamageDefOf.Burn;
+
+ // 是否显示伤害消息
+ public bool showDamageMessages = true;
+
+ // 伤害消息显示几率(避免刷屏)
+ public float damageMessageChance = 0.1f;
+
+ // 是否在营养液不足时停止孵化(如果设置为true,则缺少营养液时停止孵化进度)
+ public bool stopIncubationWhenNutrientDeficient = false;
+
+
public static OothecaIncubatorExtension Get(Thing thing)
{
if (thing?.def?.GetModExtension() is OothecaIncubatorExtension ext)
@@ -57,8 +76,7 @@ namespace ArachnaeSwarm
nutrientSolutionBonusPerTile >= 0f &&
nearbyOothecaPenaltyPerUnit >= 0f;
}
-
- // 获取默认扩展(用于兼容性)
- public static OothecaIncubatorExtension Default => new OothecaIncubatorExtension();
+ // 默认实例
+ public static readonly OothecaIncubatorExtension Default = new OothecaIncubatorExtension();
}
}