diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll
index 3ecb920f..dea759aa 100644
Binary files a/1.6/1.6/Assemblies/WulaFallenEmpire.dll and b/1.6/1.6/Assemblies/WulaFallenEmpire.dll differ
diff --git a/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml b/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml
index f4bfefc0..3d1dbdcb 100644
--- a/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml
+++ b/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml
@@ -22,6 +22,11 @@
Wula_PIA_Legion_Faction
Wula_Goodwill_To_PIA
+
+ Wula_Reinforcement_From_PIA_Level
+ 1
+ Int
+
@@ -84,6 +89,27 @@
+
+
+ true
+
+
+ Wula_Reinforcement_From_PIA_Level
+ 2
+
+
+ false
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_1
+
+
+
+
+
+
false
@@ -126,11 +152,6 @@
0
Int
-
- Wula_Reinforcement_From_PIA_Level
- 1
- Int
-
@@ -664,8 +685,29 @@
+
+ Wula_UI_Legion_Reply_2
+
+ Wula/Events/Portraits/WULA_Legion_5
+ 「军团」,P.I.A
+
+ 不要往发射仓里面塞尸体、殖民者、生物、有毒垃圾和其他不能卖的东西,军械部不会收的
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
-
Wula_UI_Legion_Test1
diff --git a/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml b/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml
index f777fe73..ad634754 100644
--- a/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml
+++ b/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml
@@ -31,6 +31,8 @@
Cloth
+ WULA_DropPod_Active
+ WULA_DropPodIncoming
@@ -128,8 +130,8 @@
-100~200
1
900
- ActiveDropPodMechanoid
- DropPodIncomingMechanoidRapid
+ WULA_DropPod_Active
+ WULA_DropPodIncoming
Children
diff --git a/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml b/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml
index 9f9ecd9e..f25ca5ce 100644
--- a/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml
+++ b/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml
@@ -616,6 +616,63 @@
+
+ WULA_Hostile_Progressive_Light_Unit
+
+ WulaSpecies
+
+
+
+ Wula/Item/WULA_Species_Icon
+ SRA/Pawn/Mechanoid/AllegianceOverlays/None
+ CutoutWithOverlay
+ Graphic_Multi
+ 1
+
+ (0.2, 0.3, 0.2)
+
+
+
+
+ 18
+ 20
+ 250
+ 10~20
+ 10~20
+ Poor
+ Poor
+ Poor
+ true
+
+ Wula_Armor_Light
+ Wula_Inner
+
+
+ Wula_Melee_Weapon_T1
+ Wula_Ranged_Weapon_T1
+
+
+ WULA_Assault_Troop_PowerArmor
+ WULA_Assault_Troop_Helmet
+
+ 3000~8000
+ 1
+ 1
+ 1
+ 999999~999999
+ 999999~999999
+
+ DeathAcidifier
+
+
+
+
+
+ Wula_Backstory_Categories
+
+
+
+
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 3fd0d3f9..8a5445ca 100644
--- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Colony_Promotion.xml
+++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Colony_Promotion.xml
@@ -536,7 +536,7 @@
- Techprint_WULA_Colony_License_LV2_Technology
+ Techprint_SP_WULA_Colony_License_LV2_Technology
1
diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Recycle_PIA_Legion_File.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Recycle_PIA_Legion_File.xml
new file mode 100644
index 00000000..2fb9d4f5
--- /dev/null
+++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Recycle_PIA_Legion_File.xml
@@ -0,0 +1,1146 @@
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_1
+
+ Wula/Events/Portraits/WULA_Legion_3
+ 「军团」,P.I.A
+
+ 我现在没时间。\n\n这样吧,你们帮我做一件事,成功之后我就绕过程序给你们批复三级殖民地许可,如何?
+
+
+
+
+ false
+ false
+ 我们还在追查保险箱下落,现在还不行
+
+
+ WULA_Recycle_PIA_Legion_File_Lock
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_2
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+ Wula_UI_Legion_1
+
+
+
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_2
+
+ Wula/Events/Portraits/WULA_Legion_1
+ 「军团」,P.I.A
+
+ 我要你们,在5天内帮我回收一个东西。\n\n一个黑色的保险箱,现在正在一支敌对乌拉帝国叛军手中,里面有关于皇室的很重要的资料,你们必须确保这个保险箱的安全——如果它被打开了,就要杀死在场的所有人。\n\n里面的东西一定不能泄露。
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_7_Triggerd
+ 0
+ Int
+
+
+
+
+
+
+
+ false
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_3
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_Lock
+ 1800000
+
+
+ WULA_Recycle_PIA_Legion_File
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+ Wula_UI_Legion_1
+
+
+
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_3
+
+ Wula/Events/Portraits/WULA_Legion_4
+ 「军团」,P.I.A
+
+ 你们知道进步派吗?这些反贼的存在目前还不是很多人知道。\n\n她们是乌拉帝国内部的分裂势力,正在密谋推翻皇室。现在整个银河系的安全部门都在追查这些人的下落,她们对知识分子和底层的渗透相当严重——这次被夺走的盒子中就有关乎到皇室安全的机密,不能让进步派成功获得里面的内容。
+
+
+
+
+ false
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_2
+
+
+
+
+
+
+
+
+
+ WULA_GiveQuest_Recycle_PIA_Legion_File
+ GiveQuest
+
+
+ Map_PlayerHome
+
+ WULA_Recycle_PIA_Legion_File
+ IncidentWorker_GiveQuest
+ 0
+ True
+
+
+ WULA_Recycle_PIA_Legion_File
+ 0
+ true
+ true
+ 4
+ true
+ false
+
+
+
+ questName->WULA_Recycle_PIA_Legion_File_questName
+
+
+
+
+ QuestHospitalityCommon
+
+
+ questDescription->WULA_Recycle_PIA_Legion_File_questDescription
+
+
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_Reward
+ recycleReward
+
+
+
+
+
+ WULA_Safe_Box_For_Mission
+
+
+
+
+
+
+ WULA_Hostile_Progressive_Outpost
+ 1
+
+
+ 5
+ 10
+ Wula/World/WorldObjects/Expanding/WULA_Progressive_Faction
+ Wula/World/WorldObjects/Expanding/WULA_Progressive_Faction
+ ProgressiveOutpost
+
+
+ 5
+ 10
+
+
+
+
+
+ WULA_Safe_Box_For_Mission
+ 1
+ 600
+ HandleSuccess
+ HandleFailed
+ true
+ true
+
+
+
+ HandleSuccess
+
+
+
+ HandleSuccess
+ WULA_Recycle_PIA_Legion_File_UI_10
+
+
+ $recycleReward
+
+
+ Success
+ true
+
+
+
+
+
+
+ 300000
+
+
+
+
+ Handle_Outtime
+
+
+
+
+
+
+ Handle_Outtime
+
+
+
+
+ 你的上司委托你去寻找的保险箱已经失去信号了,舰队需要一些时间才能重新追踪盒子
+ NegativeEvent
+
+
+ Wula_PIA_Legion_Faction
+ -50
+ WULA_Recycle_PIA_Legion_File_Handle_Outtime
+
+
+ Fail
+
+
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_Handle_Outtime
+
+
+
+ WULA_Recycle_PIA_Legion_File_Reward
+
+
+
+ 1
+
+
+
+
+ Techprint_SP_WULA_Colony_License_LV3_Technology
+
+
+ 1
+
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_5
+
+
+ 保险箱
+
+ 一个通体漆黑的保险箱静静地躺在地上,多层鎏金花雕和显眼的铁十字凤凰证明其曾属于身份显贵之人,信号追踪器则毫无疑问地指向它——这就是那个和皇室相关的保险箱。看起来,进步派的叛军使用编织体的切割束将其锁头破坏了,但是这个切割手法非常的粗糙,导致里面传来阵阵焦香,或许已经不剩什么了。
+
+
+
+
+ false
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_6
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_6
+
+
+ 保险箱
+
+ 里面已经一团乱麻,切割束确实暴力地扫过了整个保险箱内壁,半反射的内壁使得离子束在里面不断撞击,烧毁了绝大部分内容。\n\n在焦炭中,一个银色的人造物在熠熠生辉,似乎是一个经过特别加固的记录仪,记录了某些全息影像。
+
+
+
+
+ true
+ (111,223,255,225)
+ (158,242,255,255)
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_7
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_7
+
+ Wula/Events/Portraits/WULA_Legion_2
+ 「军团」,P.I.A
+
+ (投影画面上根本不是什么皇室秘闻,而是你的上司和另一个人的通话)\n\n···我现在抽不开身,行星封锁机关的舰队要在这边对整片星区施加存在压力,以推进这片星区的殖民任务。皇宫那边的事情我听说了,现在国教教会秘不发丧,皇宫区的秩序短时间内应该不会出现大的波澜——如果皇宫区真的突生变化,我会带着舰队回去增援的。\n\n你们在搞的小把戏我已经知道了,你们想把皇家机械行会踢出局再顺手给她们扣顶高帽,但是现在皇家机械行会立场不明,最好不要轻举妄动。\n\n就这样了,乌拉帝国现在正处于暴风雨前的宁静,希望我们都还能在彼端相见。
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_7_Triggerd
+ 1
+ Add
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_10
+
+ Wula/Events/Portraits/WULA_Legion_1
+ 「军团」,P.I.A
+
+ 不错,虽然已经被切割束烧的变形了,但是最终还是回收成功了。那么,看过这个保险箱的人都死了吗?
+
+
+
+
+
+ Wula_Has_Receive_Reinforcement_From_PIA
+
+
+ Wula_Has_Receive_MechWula_From_PIA
+
+
+ Wula_Has_Receive_Silver_From_PIA
+
+
+
+ Wula_Reinforcement_From_PIA_Level
+ 1
+ Add
+
+
+
+
+
+
+
+ false
+ true
+
+
+ WULA_Recycle_PIA_Legion_File_UI_7_Triggerd
+ 0
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_11
+
+
+
+
+
+
+
+
+ false
+ true
+
+
+ WULA_Recycle_PIA_Legion_File_UI_7_Triggerd
+ 1
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_12
+
+
+
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_11
+
+ Wula/Events/Portraits/WULA_Legion_2
+ 「军团」,P.I.A
+
+ 好,看起来你们赶在她们把里面的内容取出来之前就杀了她们,干得不错。\n\n就像我之前承诺的那样,我会给你们的殖民地开一道绿灯,跳过繁琐的审查,将殖民地评级提升到三级,开放行星封锁机关的所有武器和建筑的使用权限。\n\n此外,我也将你们的支援系统重置了,你们可以再次申请之前申请过的支援,并且新的支援也会开放给你们。\n\n帝国荣光永存。
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_12
+
+ Wula/Events/Portraits/WULA_Legion_1
+ 「军团」,P.I.A
+
+ 是吗······\n\n那,就像我之前承诺的那样,我会给你们的殖民地开一道绿灯,跳过繁琐的审查,将殖民地评级提升到三级,开放行星封锁机关的所有武器和建筑的使用权限。\n\n此外,我也将你们的支援系统重置了,你们可以再次申请之前申请过的支援,并且新的支援也会开放给你们。\n\n帝国荣光永存。
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+ WULA_Hostile_Progressive_Outpost
+
+ true
+ (42, 1, 42)
+ true
+ 0
+
+
+ WULA_Hostile_Progressive_Outpost_LootBox
+ WULA_Awakened_Synth
+ 可疑的乌拉帝国编织体
+ 这个原本用于生产材料的乌拉帝国编织体正在使用其高能切割刀切割一个质地坚硬的保险箱——但是保险箱纹丝不动。
+
+
+ Open_WULA_Hostile_Progressive_Outpost_LootBox
+ Open
+
+
+ BoxIsOpened
+
+
+
+
+ (21,0,19)
+ LootBox
+ 100
+ CQF_Open
+ false
+
+
+ WULA_Safe_Box
+ 1
+ 你的殖民者停用了编织体,外壳滚烫的保险箱掉了出来
+
+
+ WULA_Safe_Box_For_Mission
+
+
+
+
+
+
+
+
+ (25, 0, 20)
+
+
+ WULA_Hostile_Defender
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (22, 0, 17)
+
+
+ WULA_Hostile_Defender
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (25, 0, 23)
+
+
+ WULA_Hostile_Defender
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (19, 0, 17)
+
+
+ WULA_Hostile_Defender
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (22, 0, 26)
+
+
+ WULA_Hostile_Defender
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (16, 0, 20)
+
+
+ WULA_Hostile_Defender
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (16, 0, 23)
+
+
+ WULA_Hostile_Defender
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (19, 0, 26)
+
+
+ WULA_Hostile_Defender
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (25, 0, 11)
+
+
+ WULA_Hostile_Defender_Cat
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (31, 0, 17)
+
+
+ WULA_Hostile_Defender_Cat
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (16, 0, 11)
+
+
+ WULA_Hostile_Defender_Cat
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (31, 0, 26)
+
+
+ WULA_Hostile_Defender_Cat
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (25, 0, 32)
+
+
+ WULA_Hostile_Defender_Cat
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (10, 0, 17)
+
+
+ WULA_Hostile_Defender_Cat
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (16, 0, 32)
+
+
+ WULA_Hostile_Defender_Cat
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+ (10, 0, 26)
+
+
+ WULA_Hostile_Defender_Cat
+ WULA_Hostile_Progressive_Light_Unit
+ true
+ WULA_Defender_Group
+ 1
+ AncientsHostile
+ DefendBase
+ MapGeneration
+
+
+
+
+
+
+ RoofConstructed
+
+ (12,13,29,30)
+ (17,10,24,12)
+ (9,18,11,25)
+ (30,18,32,25)
+ (17,31,24,33)
+
+
+
+
+
+ WulaFloor
+
+ (17,10,24,33)
+ (15,13,16,30)
+ (12,16,14,27)
+ (9,18,11,25)
+ (25,13,26,30)
+ (27,16,29,27)
+ (30,18,32,25)
+
+
+
+
+
+ WULA_Machine_Recharger
+ AncientsHostile
+ (21,0,23)
+
+
+ WULA_Charging_Station_Synth
+ AncientsHostile
+
+ (20,19,20,19)
+ (22,19,22,19)
+
+
+
+ WulaWall
+ AncientsHostile
+
+ (17,10,24,10)
+ (15,13,19,13)
+ (12,16,15,16)
+ (9,18,10,18)
+ (17,11,17,11)
+ (15,14,15,15)
+ (12,17,12,20)
+ (9,19,9,25)
+ (19,14,19,16)
+ (13,20,15,20)
+ (22,13,26,13)
+ (12,23,15,23)
+ (22,14,22,16)
+ (19,18,22,18)
+ (17,20,17,23)
+ (24,11,24,11)
+ (12,24,12,27)
+ (10,25,10,25)
+ (26,14,26,16)
+ (13,27,15,27)
+ (24,20,24,23)
+ (27,16,29,16)
+ (19,25,22,25)
+ (15,28,15,30)
+ (26,20,29,20)
+ (19,27,19,30)
+ (29,17,29,19)
+ (16,30,18,30)
+ (26,23,29,23)
+ (22,27,22,30)
+ (31,18,32,18)
+ (17,32,17,33)
+ (32,19,32,25)
+ (26,27,29,27)
+ (18,33,24,33)
+ (29,24,29,26)
+ (23,30,26,30)
+ (26,28,26,29)
+ (31,25,31,25)
+ (24,32,24,32)
+
+
+
+ Table1x2c
+ WULA_Alloy
+ AncientsHostile
+ (18,0,21)
+
+
+ DiningChair
+ Uranium
+ AncientsHostile
+ (18,0,20)
+
+
+ DiningChair
+ Uranium
+ 2
+ AncientsHostile
+ (18,0,23)
+
+
+ WULA_Wall_Flag_Building
+ 3
+ AncientsHostile
+
+ (25,20,25,20)
+ (25,23,25,23)
+
+
+
+ HiddenConduit
+ AncientsHostile
+
+ (19,17,19,17)
+ (16,20,16,20)
+ (22,17,22,17)
+ (16,23,16,23)
+ (25,20,25,20)
+ (19,26,19,26)
+ (25,23,25,23)
+ (22,26,22,26)
+
+
+
+ WULA_Wall_Flag_Building
+ AncientsHostile
+
+ (19,17,19,17)
+ (22,17,22,17)
+
+
+
+ Sandbags
+ Cloth
+ AncientsHostile
+
+ (7,8,10,8)
+ (7,9,7,11)
+ (17,17,17,18)
+ (16,18,16,18)
+ (24,17,24,18)
+ (16,25,17,25)
+ (25,18,25,18)
+ (17,26,17,26)
+ (31,8,34,8)
+ (7,32,7,35)
+ (24,25,25,25)
+ (34,9,34,11)
+ (24,26,24,26)
+ (8,35,10,35)
+ (34,32,34,35)
+ (31,35,33,35)
+
+
+
+ WULA_Wall_Flag_Building
+ 2
+ AncientsHostile
+
+ (19,26,19,26)
+ (22,26,22,26)
+
+
+
+ WULA_Wall_Flag_Building
+ 1
+ AncientsHostile
+
+ (16,20,16,20)
+ (16,23,16,23)
+
+
+
+ Wula_Fusion_Generators
+ AncientsHostile
+ 29.432827
+
+ (17,15,17,15)
+ (14,18,14,18)
+ (24,15,24,15)
+ (14,25,14,25)
+ (27,18,27,18)
+ (17,28,17,28)
+ (27,25,27,25)
+ (24,28,24,28)
+
+
+
+ Turret_MiniTurret
+ Steel
+ AncientsHostile
+ 60
+
+ (16,17,16,17)
+ (25,17,25,17)
+ (16,26,16,26)
+ (25,26,25,26)
+
+
+
+ Wula_Base_Laser_Turret
+ AncientsHostile
+
+ (13,14,13,14)
+ (28,14,28,14)
+ (13,29,13,29)
+ (28,29,28,29)
+
+
+
+ TrapIED_Incendiary
+ AncientsHostile
+
+ (18,12,18,12)
+ (11,19,11,19)
+ (23,12,23,12)
+ (11,24,11,24)
+ (30,19,30,19)
+ (18,31,18,31)
+ (30,24,30,24)
+ (23,31,23,31)
+
+
+
+ WulaDoor
+ AncientsHostile
+
+ (11,18,11,18)
+ (11,25,11,25)
+ (30,18,30,18)
+ (30,25,30,25)
+
+
+
+ WulaDoor
+ 1
+ AncientsHostile
+
+ (17,12,17,12)
+ (24,12,24,12)
+ (17,31,17,31)
+ (24,31,24,31)
+
+
+
+ WULA_Cat_Bunker
+ AncientsHostile
+
+ (9,10,9,10)
+ (32,10,32,10)
+ (9,33,9,33)
+ (32,33,32,33)
+
+
+
+
+
+ WULA_Hostile_Progressive_Outpost_LootBox
+
+ 这个原本用于生产材料的乌拉帝国编织体正在使用其高能切割刀切割一个质地坚硬的保险箱——但是保险箱纹丝不动。
+ QuestEditor_Library.LootBox
+ Building
+ true
+ false
+ Normal
+ Building
+ true
+
+ -5
+
+
+ Graphic_Multi
+ Wula/Building/WULA_Cube_Productor
+
+
+ true
+ false
+
+
+
+ WULA_Safe_Box_For_Mission
+
+ 印有乌拉帝国凤凰标志的保险箱,是你的上司要求你回收的东西。因为编织仪的持续切割,多层合金锁貌似已经坏掉了。\n\n<color=#BD2F31><i>不要偷看。</i></color>
+ ThingWithComps
+ Item
+ MapMeshOnly
+ false
+ false
+ true
+
+ Wula/Item/WULA_Safe_Box_For_Mission
+ Graphic_Single
+
+ 30
+
+ 0
+ 0
+ 0
+ 24
+ 0.3
+ 450
+
+ Item
+ Rare
+
+ ResourcesRaw
+
+ true
+ 14
+ 200
+ None
+ Last
+ true
+ 1
+
+
+
+
+ 检查保险箱···
+ UseItem
+
+
+
+ WULA_Recycle_PIA_Legion_File_UI_5
+ false
+
+
+
+
\ No newline at end of file
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 a85d1c91..719ad9b3 100644
--- a/1.6/1.6/Defs/ResearchProjectDefs/WULA_ResearchProjects_Remake.xml
+++ b/1.6/1.6/Defs/ResearchProjectDefs/WULA_ResearchProjects_Remake.xml
@@ -8,7 +8,7 @@
- Techprint_WULA_Colony_License_LV1_Technology
+ Techprint_SP_WULA_Colony_License_LV1_Technology
这是由乌拉帝国开发署颁发的特殊凭证,用以证明殖民地的地位。
@@ -70,7 +70,7 @@
- Techprint_WULA_Colony_License_LV2_Technology
+ Techprint_SP_WULA_Colony_License_LV2_Technology
这是由乌拉帝国开发署颁发的特殊凭证,用以证明殖民地的地位。
@@ -132,7 +132,7 @@
- Techprint_WULA_Colony_License_LV3_Technology
+ Techprint_SP_WULA_Colony_License_LV3_Technology
这是由乌拉帝国开发署颁发的特殊凭证,用以证明殖民地的地位。
@@ -395,7 +395,7 @@
- Wula_AI_Heavy_Panzer_Technology
+ WULA_AI_Heavy_Panzer_Technology
5.00
5.60
@@ -409,7 +409,7 @@
- Wula_Mech_Mobile_Shield_Technology
+ WULA_Mech_Mobile_Shield_Technology
6.00
5.60
@@ -423,14 +423,14 @@
- Wula_Mech_Mobile_Shield_Teleporter_Technology
+ WULA_Mech_Mobile_Shield_Teleporter_Technology
10.00
5.60
允许殖民地使用MSm-8"放射盾"内置的传送器,机械乌拉在其覆盖范围内,处于征召状态下进行常规移动时,会以瞬间传送代替步行。
800
- Wula_Mech_Mobile_Shield_Technology
+ WULA_Mech_Mobile_Shield_Technology
WULA_Colony_License_LV3_Technology
@@ -444,7 +444,7 @@
允许殖民地申请空投MFm-2"陆行舰",乌拉帝国的大型战争机械,一座插满火炮和战地生产设施的移动堡垒。
800
- Wula_AI_Heavy_Panzer_Technology
+ WULA_AI_Heavy_Panzer_Technology
WULA_Colony_License_LV3_Technology
@@ -493,6 +493,19 @@
+
+
+ WULA_Plant_Eggplant_Technology
+ 2.00
+ 3.80
+
+ 允许殖民地种植钢茄,一种可以产出钢铁的特殊作物。
+ 3500
+
+ WULA_Colony_License_LV1_Technology
+
+
+
WULA_Synth_Weapon_1_Base_Technology
diff --git a/1.6/1.6/Defs/SoundDefs/Wula_Sound_Weapons.xml b/1.6/1.6/Defs/SoundDefs/Wula_Sound_Weapons.xml
index b980f9ee..91392ce9 100644
--- a/1.6/1.6/Defs/SoundDefs/Wula_Sound_Weapons.xml
+++ b/1.6/1.6/Defs/SoundDefs/Wula_Sound_Weapons.xml
@@ -208,7 +208,7 @@
WULA_Firepower_Minigun_Fire_sound
MapOnly
- 2
+ 1
@@ -225,7 +225,7 @@
WULA_Firepower_Cannon_Fire_sound
MapOnly
- 2
+ 1
@@ -242,7 +242,7 @@
WULA_Firepower_Primary_Cannon_Fire_sound
MapOnly
- 2
+ 1
diff --git a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Drop_Buildings.xml b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Drop_Buildings.xml
index c6ab2ea0..b8b06981 100644
--- a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Drop_Buildings.xml
+++ b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Drop_Buildings.xml
@@ -8,6 +8,7 @@
Wula/Building/Linked/WULA_Fortress_Wall_MenuIcon
MinifiedThing
Normal
+ None
WulaWall
@@ -36,6 +37,7 @@
false
Light
+ 0
1
0
1
@@ -188,13 +190,14 @@
1
true
false
+ None
Wula/Building/Door/WulaAutodoor_Mover
Graphic_Single
(73,185,254,155)
- 1
+ 0
1
0
0
@@ -221,6 +224,7 @@
Structure
RealtimeOnly
WULA_Buildings
+ 0
WULA_Structure_Technology
@@ -436,12 +440,14 @@
(0,0,-2)
true
Light
+ None
PlaceWorker_PreventInteractionSpotOverlap
1
0
+ 0
1
0
@@ -625,6 +631,7 @@
false
+ None
WULA_Buildings
Building
PassThroughOnly
@@ -640,6 +647,7 @@
WULA_WeaponArmor_Productor_Technology
+ 0
1
0
1
@@ -778,16 +786,255 @@
+
+ WULA_TransportPod_Cleanzone
+
+ 清理出一块场地并准备好资源,使得乌拉帝国可以向此处投放建筑,建造好的信标可以收起或移至他处。\n\n乌拉帝国运输舱是供乌拉帝国殖民地居民进行移动的运输舱,本质上是把殖民者和货物发射到乌拉帝国在轨道上的舰队,然后在另一个地方扔下来,所以它可以前往很远的地方。
+ Wula/Building/WULA_DropPod/WULA_DropPod
+ MinifiedThing
+ Normal
+
+ WULA_TransportPod
+
+
+ BuildingsMisc
+
+ (3,3)
+
+ Wula/Building/WULA_Dropping_Building_Cleanzone
+ Graphic_Multi
+ (3,3)
+
+ false
+
+
+ None
+ WULA_Buildings
+ Building
+ PassThroughOnly
+ false
+ 0.5
+ false
+ 0
+ false
+ false
+
+ Light
+
+ WULA_WeaponArmor_Productor_Technology
+
+
+ 0
+ 1
+ 0
+ 1
+ 0
+
+ 0
+ 0
+
+ 20
+ 1
+
+
+ BuildingDestroyed_Metal_Small
+
+
+
+ WULA_TransportPod_Incoming
+ true
+ 1
+ true
+ false
+
+
+
+
+ WULA_TransportPod_Incoming
+
+ (3,3)
+
+ Wula/Building/WULA_DropPod/WULA_DropPod_Incoming
+ Graphic_Single
+ CutoutFlying
+ (3,3)
+
+
+ Accelerate
+ Things/Skyfaller/SkyfallerShadowDropPod
+ (5, 5)
+ DropPod_Fall
+ 100
+ Explosion_Vaporize
+ 0.05
+ 1
+ 1
+
+
+ (0,0)
+ (1, 1)
+
+
+ WULA_TransportPod
+
+
+
+ Smoke_Joint
+
+
+
+
+ WULA_TransportPod
+
+ 供乌拉帝国殖民地居民进行移动的运输舱,本质上是把殖民者和货物发射到乌拉帝国在轨道上的舰队,然后在另一个地方扔下来,所以它可以前往很远的地方。
+
+ Wula/Building/WULA_DropPod/WULA_DropPod
+ Graphic_Single
+ (3,3)
+
+ (3,3)
+ false
+ Normal
+ BuildingOnTop
+ PassThroughOnly
+ false
+ Misc12
+ 0.5
+ 2200
+ Medium
+
+ 250
+ 1600
+ 0.5
+
+
+ 20
+ 1
+
+
+ ITab_ContentsTransporter
+
+
+ PlaceWorker_NotUnderRoof
+
+ WULA_DropPod_Active
+ WULA_DropPodIncoming
+
+
+ 500
+ 0.8
+ true
+
+
+
+ WULA_DropPodLeaving
+ false
+ 400
+
+
+
+ true
+ false
+
+
+
WULA_GlobalStorageSenderPod
一个一次性的物资输送装置,可以将装载的货物发射到乌拉帝国的舰队以供其使用。
+ WulaFallenEmpire.Building_ExtraGraphics
- Things/Special/DropPod
+ Wula/Building/WULA_DropPod/WULA_GlobalStorageSenderPod
Graphic_Single
- (2,2)
+ (3,3)
- (1,1)
+ (3,3)
+ false
+ Normal
+ BuildingOnTop
+ PassThroughOnly
+ false
+ Misc12
+ 0.5
+ WULA_Buildings
+ 2201
+ Light
+ RealtimeOnly
+
+ 250
+ 1600
+ 0.5
+
+
+ 20
+ 1
+
+
+ WULA_WeaponArmor_Productor_Technology
+
+
+ ITab_ContentsTransporter
+
+
+ PlaceWorker_NotUnderRoof
+
+
+
+
+
+
+ 500
+ 0.8
+ true
+
+
+ WULA_DropPodLeaving
+ false
+
+
+ true
+ Wula_UI_Legion_Reply_1
+ false
+
+
+
+
+ WULA_TradeSenderPod
+
+ 一个一次性的物资输送装置,用于将战利品等打包发送给乌拉帝国舰队以换取白银。这些白银会存储在舰队中,而不是直接发射到殖民地。
+
+ Wula/Building/WULA_DropPod/WULA_TradeSenderPod
+ Graphic_Single
+ (3,3)
+
+ WulaFallenEmpire.Building_ExtraGraphics
+ (3,3)
false
Normal
BuildingOnTop
@@ -810,27 +1057,6 @@
WULA_WeaponArmor_Productor_Technology
-
-
- 500
- 0.8
- true
-
-
- DropPodLeaving
- false
-
-
- true
- Wula_UI_Legion_Reply_1
-
-
- 0.8
- true
- true
- Wula_UI_Legion_Reply_1
-
-
ITab_ContentsTransporter
@@ -838,7 +1064,144 @@
PlaceWorker_NotUnderRoof
6
- 0.65
+ RealtimeOnly
+
+
+
+
+
+ 500
+ 0.8
+ true
+
+
+ WULA_DropPodLeaving
+ false
+ Silver
+
+
+ true
+ Wula_UI_Legion_Reply_2
+ true
+
+
+
+
+ WULA_DropPodLeaving
+
+ FlyShipLeaving
+
+ Wula/Building/WULA_DropPod/WULA_DropPod_Leaving
+ Graphic_Single
+ CutoutFlying
+ 3
+
+
+ Decelerate
+ true
+ Things/Skyfaller/SkyfallerShadowDropPod
+ (3, 3)
+ DropPod_Leaving
+ -10
+ -40-15
+
+
+ (0,0)
+ (1, 1)
+
+
+
+
+ (0,0)
+ (1, 1)
+
+
+
+
+
+ WULA_DropPodIncoming
+
+ DropPodIncoming
+
+ Wula/Building/WULA_DropPod/WULA_DropPod_Incoming
+ Graphic_Single
+ CutoutFlying
+ 3
+
+
+ Accelerate
+ Things/Skyfaller/SkyfallerShadowDropPod
+ (3, 3)
+ 100
+ 0
+ DropPod_Fall_Mechanoid
+ DropPod_Impact
+ 1
+
+
+ (0,0)
+ (1, 1)
+
+
+
+
+ (0,0)
+ (1, 1)
+
+
+
+
+
+ WULA_DropPod_Active
+
+ Item
+ MapMeshAndRealTime
+ ActiveTransporter
+ false
+ Normal
+ DropPod_Open
+
+ Wula/Building/WULA_DropPod/WULA_DropPod
+ Graphic_Single
+ 3
+
+ (0.8, 0.6, 0.8)
+
+
+ Building
+ true
+ true
+
+ 500
+ 0
+
+ true
@@ -849,6 +1212,7 @@
Wula/Building/WULA_Machine_Recharger
MinifiedThing
Normal
+ None
WULA_Machine_Recharger
@@ -876,6 +1240,7 @@
WULA_Bunker_Drop_Technology
+ 0
1
0
1
@@ -1017,6 +1382,7 @@
Wula/Building/WULA_Charging_Station_Synth_south
MinifiedThing
Normal
+ None
WULA_Charging_Station_Synth
@@ -1044,6 +1410,7 @@
WULA_Colony_License_LV1_Technology
+ 0
1
0
1
@@ -1176,6 +1543,7 @@
Wula/Building/WULA_Cube_Productor_south
MinifiedThing
Normal
+ None
WULA_Cube_Productor
@@ -1204,6 +1572,7 @@
WULA_Colony_License_LV1_Technology
+ 0
1
0
1
@@ -1352,6 +1721,7 @@
Wula/Building/Wula_DarkEnergy_Generators
MinifiedThing
Normal
+ None
Wula_DarkEnergy_Generators
@@ -1380,6 +1750,7 @@
WULA_DarkEnergy_Generators_Technology
+ 0
1
0
1
@@ -1501,7 +1872,7 @@
true
在不接电线的情况下,该建筑可提供的最大供电半径,可作为野战状态下的阵地构建参考。
- true
+ false
CompPowerPlant
@@ -1552,6 +1923,7 @@
Wula/Building/Wula_Fusion_Generators
MinifiedThing
Normal
+ None
Wula_Fusion_Generators
@@ -1579,6 +1951,7 @@
Wula_Fusion_Generators_Technology
+ 0
1
0
1
@@ -1701,7 +2074,7 @@
true
在不接电线的情况下,该建筑可提供的最大供电半径,可作为野战状态下的阵地构建参考。
- true
+ false
CompPowerPlant
diff --git a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Mech_Buildings.xml b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Mech_Buildings.xml
index 714db802..84213453 100644
--- a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Mech_Buildings.xml
+++ b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Mech_Buildings.xml
@@ -10,6 +10,7 @@
(0, -0.1)
MinifiedThing
Normal
+ None
Wula_AI_Heavy_Panzer
@@ -39,9 +40,10 @@
false
false
- Wula_AI_Heavy_Panzer_Technology
+ WULA_AI_Heavy_Panzer_Technology
+ 0
1
0
1
@@ -122,6 +124,7 @@
(0, -0.1)
MinifiedThing
Normal
+ None
Wula_AI_Rocket_Panzer
@@ -151,9 +154,10 @@
false
false
- Wula_AI_Heavy_Panzer_Technology
+ WULA_AI_Heavy_Panzer_Technology
+ 0
1
0
1
@@ -230,10 +234,10 @@
清理出一块场地并准备好资源,使得乌拉帝国母舰可以向此处投放大型战争机械。建造好的信标可以收起或移至他处。\n\n放射盾是乌拉帝国的中型战争机械,常被用于镇压异族聚居地的暴动。它形状非常奇怪,根本分不出头在哪,但是不要因此小瞧这个机械体——它能释放强大的立场盾,在很大一片区域内反射大量炮火,并且机体放射出来的辐射会严重地杀伤进入反射盾范围内的敌人。在相关许可开放后,它甚至可以支持机械乌拉使用其内置的相位场进行区域传送。
Wula/Things/WULA_Mobile_Shield/WULA_Mobile_Shield_Incoming
- 1
- (0, -0.1)
+ 0.9
MinifiedThing
Normal
+ None
Wula_AI_Heavy_Panzer
@@ -263,9 +267,10 @@
false
false
- Wula_AI_Heavy_Panzer_Technology
+ WULA_Mech_Mobile_Shield_Technology
+ 0
1
0
1
@@ -344,6 +349,7 @@
Wula/Things/Wula_Mech_Mobile_Factory/Wula_Mech_Mobile_Factory_Incoming
MinifiedThing
Normal
+ None
Wula_Mech_Mobile_Factory
WULA_Mech_Flyer
@@ -371,6 +377,7 @@
WULA_Mech_Mobile_Factory_Technology
+ 0
1
0
1
diff --git a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Prefab_Beacons.xml b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Prefab_Beacons.xml
index 5d0993f0..9d5ca9dc 100644
--- a/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Prefab_Beacons.xml
+++ b/1.6/1.6/Defs/ThingDefs_Buildings/WULA_Prefab_Beacons.xml
@@ -6,6 +6,7 @@
一个用于呼叫建筑的信标,用于快速建造一个小型前哨站。
Wula/Building/Linked/WULA_Fortress_Wall_MenuIcon
Normal
+ MinifiedThing
Wula/Building/WULA_Dropping_Building_Cleanzone_Plus
Graphic_Multi
@@ -14,6 +15,9 @@
false
+
+ BuildingsMisc
+
false
false
false
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 e719d0e3..43bd2eb1 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
@@ -8,6 +8,7 @@
Wula/Building/WULA_Cat_Bunker_south
MinifiedThing
Normal
+ None
WULA_Cat_Bunker
Mech_WULA_Cat
@@ -38,6 +39,7 @@
WULA_Bunker_Drop_Technology
+ 0
1
0
1
@@ -262,6 +264,7 @@
Wula/Building/Wula_Base_ATGun_Turret
MinifiedThing
Normal
+ None
Wula_Base_ATGun_Turret
Wula_Base_ATGun_Turret_Weapon
@@ -290,6 +293,7 @@
WULA_Turret_Base_AT_Technology
+ 0
1
0
1
@@ -407,10 +411,10 @@
false
Normal
- Impassable
- true
- 1
- false
+ PassThroughOnly
+ 40
+ false
+ 0.5
true
Light
@@ -539,6 +543,7 @@
Wula/Building/Wula_Base_Laser_Turret
MinifiedThing
Normal
+ None
Wula_Base_Laser_Turret
Wula_Base_Laser_Turret_Weapon
@@ -566,6 +571,7 @@
WULA_Turret_Base_Laser_Technology
+ 0
1
0
1
@@ -685,10 +691,10 @@
false
Normal
- Impassable
- true
- 1
- false
+ PassThroughOnly
+ 40
+ false
+ 0.5
true
640
@@ -828,6 +834,7 @@
Wula/Building/Wula_Base_Mortar_Turret
MinifiedThing
Normal
+ None
Wula_Base_Mortar_Turret
Wula_Base_Mortar_Turret_Weapon
@@ -845,7 +852,7 @@
Building
PassThroughOnly
- 0
+ 40
false
0.5
false
@@ -855,6 +862,7 @@
WULA_Turret_Base_Mortar_Technology
+ 0
1
0
1
diff --git a/1.6/1.6/Defs/ThingDefs_Misc/Apperals/WULA_Apparel.xml b/1.6/1.6/Defs/ThingDefs_Misc/Apperals/WULA_Apparel.xml
index 7e9914af..4c56190f 100644
--- a/1.6/1.6/Defs/ThingDefs_Misc/Apperals/WULA_Apparel.xml
+++ b/1.6/1.6/Defs/ThingDefs_Misc/Apperals/WULA_Apparel.xml
@@ -526,6 +526,7 @@
false
false
+
300
10
@@ -549,7 +550,7 @@
Wula/Apparel/WULA_Assault_Troop_PowerArmor
- 60000
+ 1000
1000
10
0
@@ -609,7 +610,7 @@
Wula/Apparel/WULA_Assault_Troop_Helmet
- 20000
+ 2000
1000
1
0
@@ -647,7 +648,7 @@
Wula/Apparel/WULA_Heavy_Infantry_PowerArmor
- 50000
+ 4000
1000
20
0
@@ -742,7 +743,7 @@
Wula/Apparel/WULA_Heavy_Infantry_Helmet
- 20000
+ 2000
1000
5
0
@@ -787,7 +788,7 @@
Wula/Apparel/WULA_Heavy_Infantry_Helmet_Nomask
- 20000
+ 2000
1000
5
0
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 8fc162fb..aa55541a 100644
--- a/1.6/1.6/Defs/ThingDefs_Misc/WULA_Item.xml
+++ b/1.6/1.6/Defs/ThingDefs_Misc/WULA_Item.xml
@@ -64,6 +64,7 @@
Wula/Item/WULA_Dark_Matter_Item
Graphic_Single
+ None
Normal
false
false
diff --git a/1.6/1.6/Defs/ThingDefs_Plants/WULA_Plants.xml b/1.6/1.6/Defs/ThingDefs_Plants/WULA_Plants.xml
new file mode 100644
index 00000000..697192fc
--- /dev/null
+++ b/1.6/1.6/Defs/ThingDefs_Plants/WULA_Plants.xml
@@ -0,0 +1,41 @@
+
+
+
+ WULA_Plant_Eggplant
+
+ 由乌拉帝国通过转基因设计得到的特殊植物。这些植物不能吃,它们的根茎会深深地插入地下,吸收土壤中的重金属,最终结成紧实的果实,只要稍加处理就可以当作钢铁使用。\n\n不能在水培设施内种植。
+
+ 10
+ 85
+ 4
+ 0
+
+
+ Wula/Plant/WULA_Plant_Eggplant
+ Graphic_Single
+
+ true
+ 10
+
+ Wula/Plant/WULA_Plant_Eggplant_Immature
+ 0.5
+ 0
+ 10
+ 10
+ 10
+ Steel
+ true
+
+ Ground
+
+ Any
+
+ 0.3~0.8
+
+ WULA_Plant_Eggplant_Technology
+
+
+
+
\ No newline at end of file
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 cbae5b03..62609aed 100644
--- a/1.6/1.6/Defs/ThingDefs_Races/Races_Wulaspecies.xml
+++ b/1.6/1.6/Defs/ThingDefs_Races/Races_Wulaspecies.xml
@@ -1,8 +1,8 @@
-
- Human
+
+ Wula_Human
A baseline human, mostly unmodified by gene engineering and mostly unchanged by evolutionary pressures on non-Earth planets.
@@ -661,6 +661,8 @@
WULA_Machine_Body
0.9
+ false
+ false
@@ -712,7 +714,6 @@
- true
@@ -1026,6 +1027,9 @@
1
3
+ 0.75
+ 0.75
+ 0.75
Mech_Warqueen
@@ -1157,6 +1161,10 @@
9999
0
+
+ 1
+ 1
+ 2
300
@@ -1282,6 +1290,10 @@
9999
0
+
+ 1
+ 1
+ 2
300
@@ -1390,6 +1402,10 @@
1
3
+
+ 0.5
+ 0.5
+ 2
Mech_Warqueen
@@ -1474,7 +1490,7 @@
Psycast_Skip_Entry
true
- Wula_Mech_Mobile_Shield_Teleporter_Technology
+ WULA_Mech_Mobile_Shield_Teleporter_Technology
@@ -1501,6 +1517,10 @@
9999
0
+
+ 1.75
+ 1.75
+ 2
Mech_Warqueen
@@ -1919,7 +1939,11 @@
0
- 0.25
+ 0
+
+ 2
+ 2
+ 2
Mech_Warqueen
diff --git a/1.6/1.6/Languages/ChineseSimplified (简体中文)/DefInjected/QuestScriptDef/WULA_Colony_Promotion.xml b/1.6/1.6/Languages/ChineseSimplified (简体中文)/DefInjected/QuestScriptDef/WULA_Colony_Promotion.xml
index 2e6cf941..9cf3490e 100644
--- a/1.6/1.6/Languages/ChineseSimplified (简体中文)/DefInjected/QuestScriptDef/WULA_Colony_Promotion.xml
+++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/DefInjected/QuestScriptDef/WULA_Colony_Promotion.xml
@@ -1,7 +1,7 @@
- questName->殖民地考察
+ questName->晋级任务:殖民地考察
questDescription->殖民地已经承接了视察任务。\n\n行星封锁机关的总控AI已经派遣了自己的一个分体和护卫队抵达殖民地。考察持续12天,她会检查殖民地方方面面的运转情况,你需要确保其心情始终高于25%。考察完成后,她和卫队会搭乘穿梭机离开,如果一切顺利你们将获得殖民地晋升的机会,以解锁更多的许可科技。\n\n小心,附近的敌对派系已经知道了殖民地来了一个大人物,这些劫掠者会尝试袭击殖民地并抓住这个分体,你可能需要面对大量袭击!
diff --git a/1.6/1.6/Languages/ChineseSimplified (简体中文)/DefInjected/QuestScriptDef/WULA_Recycle_PIA_Legion_File.xml b/1.6/1.6/Languages/ChineseSimplified (简体中文)/DefInjected/QuestScriptDef/WULA_Recycle_PIA_Legion_File.xml
new file mode 100644
index 00000000..8ba7d1fe
--- /dev/null
+++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/DefInjected/QuestScriptDef/WULA_Recycle_PIA_Legion_File.xml
@@ -0,0 +1,9 @@
+
+
+
+ questName->晋级任务:回收皇家机密
+
+
+ questDescription->乌拉帝国行星封锁机关的总控AI向殖民地发送了一个特殊的请求,有一个装着皇室机密的保险箱被乌拉帝国的进步派叛军控制了,殖民地必须将其回收,随后将其交回乌拉帝国舰队。如果保险箱已经被打开,就要杀光在场的所有人。\n\n目前叛军很可能在试图打开这个保险箱,你需要检查其哨站内的工作台。\n\n你只有5天的时间处理这个任务,取得保险箱后,你可以建造<color=#6BB7B7><i>乌拉帝国物资输送舱</i></color>来将保险箱输送到位于轨道上的舰队。
+
+
\ No newline at end of file
diff --git a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/Misc_Gameplay.xml b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/Misc_Gameplay.xml
index 8262dc7b..35600bec 100644
--- a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/Misc_Gameplay.xml
+++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/Misc_Gameplay.xml
@@ -57,11 +57,6 @@
{0}的纳米修复系统已禁用
纳米修复: 已禁用
- 召唤空投建筑
- 从乌拉帝国的舰队呼叫对应的建筑空投到此处
- 空投建筑将在 {0} 后到达
- 空投建筑将在 {0} 后到达
- 准备召唤空投建筑
可空投建筑
需要 {0} 在殖民地上空时才可以空投建筑
@@ -79,6 +74,25 @@
需要拥有-建筑空投设施-的战舰部署在殖民地轨道上才能空投
没有拥有-建筑空投设施-的战舰部署在殖民地轨道上
+
+ 准备召唤空投建筑
+ 召唤空投建筑
+ 从乌拉帝国的舰队呼叫对应的建筑空投到此处。空投建筑需要消耗和其造价相等的资源。
+ 空投建筑正在运送,{0}后抵达。此次空投由于本地资源不足,消耗了乌拉帝国舰队上的储存资源。
+ 空投建筑正在运送,{0}后抵达。
+ 空投建筑将在{0}后抵达,此次空投由于本地资源不足,消耗了乌拉帝国舰队上的储存资源。
+ 空投建筑将在{0}后抵达
+ 优先从<color=#6BB7B7><i>乌拉轨道输送信标</i></color>的信号范围内获取,如果没有足够资源则消耗乌拉帝国舰队上的储存资源。
+
+
+ 所需材料:
+ <color=#6BB7B7><i>乌拉轨道输送信标</i></color>范围内材料不足。你需要建造乌拉轨道输送信标,并在其信号范围内放置足够的材料,建造时这些材料会被自动提交给帝国舰队。\n\n除此之外,储存在乌拉帝国舰队的资源也会纳入考虑。
+
+
+ 取消呼叫
+ 中止正在进行的空投呼叫。
+ 空投呼叫已取消。
+
维护舱状态
空闲
@@ -271,9 +285,9 @@
剩余时间: {0}
- 什一税征收:等待激活...
- 什一税征收:{0} {1} {2}
- - 征收已完成
+ 征收:等待激活...
+ 需要提交到乌拉帝国舰队的资源:{0} {1} {2}
+ - 已完成
- 逾期
@@ -370,4 +384,32 @@
(有损耗)
(有加成)
(等值转换)
+
+
+
+ 向舰队贩卖物资
+ 将输送舱发射到乌拉帝国舰队,所有物品的价值按照 {1}% 的比率转换为 {0} 储存在舰队物资中。
+ 当前总价值:{0}
+ 转换后价值:{0} {1}
+ 包含物品:
+ - {0} x{1}
+
+
+ 转换器必须被放置在地图上才能使用。
+ 没有可贩卖的物品
+ 贩卖后的价值太低,无法生成任何货币。
+ 已将{0}件物品(总价值{1})贩卖,得到 {2} {3}。
+ 已贩卖物品:{0}
+ 转换率:{0}%
+
+
+ 由于包含禁止物品,发射已取消:{0}
+
+ 退钱!
+ 将储存在乌拉帝国舰队中的 {0} 白银索要回来,它们会随着下一次成品空投一起空投。
+ 你确定要取出储存在乌拉帝国舰队的 {0} 白银?
+ 没有任何白银被存在乌拉帝国舰队
+ 已取出 {0} 白银,它们会随着下一次成品空投一起空投。
+ 无法取出白银
+ 取出白银时发生错误
\ No newline at end of file
diff --git a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/WULA_Keyed.xml b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/WULA_Keyed.xml
index 9d2888b9..e369a522 100644
--- a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/WULA_Keyed.xml
+++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/WULA_Keyed.xml
@@ -73,7 +73,7 @@
{0}件物资被舰队退回(随着下一次成品空投一起退回)
输入存储: {0}
输出存储: {0}
- 舰队拒绝接收物资——里面包含了殖民者、动物、尸体或有毒垃圾
+ 舰队拒绝接收物资——里面包含了不被允许的物品类型
[能量: {0}]
@@ -91,7 +91,7 @@
切换到关机模式 - 机械将立即进入休眠状态
{0} 已切换到 {1} 模式
(能量: {0})
- 自主控制
+ 自主控制
自主模式: {0}
{0} 能量低,自动切换到充电模式
{0} 已充满电,自动切换到工作模式
@@ -114,13 +114,4 @@
正在收集材料
已暂停
-
- 所需材料:
- -乌拉轨道输送信标-范围内材料不足。你需要建造乌拉轨道输送信标,并在其信号范围内放置足够的材料,建造时这些材料会被自动提交给帝国舰队。
-
-
- 取消呼叫
- 中止正在进行的空投呼叫。
- 空投呼叫已取消。
-
\ No newline at end of file
diff --git a/Content/Sounds/Wula/WULA_Basttleship_Shootingsound_M.wav b/Content/Sounds/Wula/WULA_Basttleship_Shootingsound_M.wav
index 91df9773..299c0e57 100644
Binary files a/Content/Sounds/Wula/WULA_Basttleship_Shootingsound_M.wav and b/Content/Sounds/Wula/WULA_Basttleship_Shootingsound_M.wav differ
diff --git a/Content/Textures/Wula/Apparel/WULA_Maid_Uniform_Thin_south.png b/Content/Textures/Wula/Apparel/WULA_Maid_Uniform_Thin_south.png
index 7789a88c..4671d13f 100644
Binary files a/Content/Textures/Wula/Apparel/WULA_Maid_Uniform_Thin_south.png and b/Content/Textures/Wula/Apparel/WULA_Maid_Uniform_Thin_south.png differ
diff --git a/Content/Textures/Wula/Building/Flag/WULA_DropPod_Flag_Sender.png b/Content/Textures/Wula/Building/Flag/WULA_DropPod_Flag_Sender.png
new file mode 100644
index 00000000..f818c404
Binary files /dev/null and b/Content/Textures/Wula/Building/Flag/WULA_DropPod_Flag_Sender.png differ
diff --git a/Content/Textures/Wula/Building/Flag/WULA_DropPod_Flag_Trader.png b/Content/Textures/Wula/Building/Flag/WULA_DropPod_Flag_Trader.png
new file mode 100644
index 00000000..82b01c32
Binary files /dev/null and b/Content/Textures/Wula/Building/Flag/WULA_DropPod_Flag_Trader.png differ
diff --git a/Content/Textures/Wula/Building/WULA_DropPod/WULA_DropPod.png b/Content/Textures/Wula/Building/WULA_DropPod/WULA_DropPod.png
new file mode 100644
index 00000000..78f27b5c
Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_DropPod/WULA_DropPod.png differ
diff --git a/Content/Textures/Wula/Building/WULA_DropPod/WULA_DropPod_Incoming.png b/Content/Textures/Wula/Building/WULA_DropPod/WULA_DropPod_Incoming.png
new file mode 100644
index 00000000..cbd519d3
Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_DropPod/WULA_DropPod_Incoming.png differ
diff --git a/Content/Textures/Wula/Building/WULA_DropPod/WULA_DropPod_Leaving.png b/Content/Textures/Wula/Building/WULA_DropPod/WULA_DropPod_Leaving.png
new file mode 100644
index 00000000..62333629
Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_DropPod/WULA_DropPod_Leaving.png differ
diff --git a/Content/Textures/Wula/Building/WULA_DropPod/WULA_GlobalStorageSenderPod.png b/Content/Textures/Wula/Building/WULA_DropPod/WULA_GlobalStorageSenderPod.png
new file mode 100644
index 00000000..74db003f
Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_DropPod/WULA_GlobalStorageSenderPod.png differ
diff --git a/Content/Textures/Wula/Building/WULA_DropPod/WULA_TradeSenderPod.png b/Content/Textures/Wula/Building/WULA_DropPod/WULA_TradeSenderPod.png
new file mode 100644
index 00000000..818e91af
Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_DropPod/WULA_TradeSenderPod.png differ
diff --git a/Content/Textures/Wula/Building/WULA_GlobalStorageSenderPod.png b/Content/Textures/Wula/Building/WULA_GlobalStorageSenderPod.png
new file mode 100644
index 00000000..d30b16be
Binary files /dev/null and b/Content/Textures/Wula/Building/WULA_GlobalStorageSenderPod.png differ
diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Safe_Box_For_Mission.png b/Content/Textures/Wula/Events/Portraits/WULA_Safe_Box_For_Mission.png
new file mode 100644
index 00000000..4dc6cec0
Binary files /dev/null and b/Content/Textures/Wula/Events/Portraits/WULA_Safe_Box_For_Mission.png differ
diff --git a/Content/Textures/Wula/Events/Portraits/Wula_insignal.png b/Content/Textures/Wula/Events/Portraits/Wula_insignal.png
index dbfb428b..ee6bf210 100644
Binary files a/Content/Textures/Wula/Events/Portraits/Wula_insignal.png and b/Content/Textures/Wula/Events/Portraits/Wula_insignal.png differ
diff --git a/Content/Textures/Wula/Item/WULA_Safe_Box_For_Mission.png b/Content/Textures/Wula/Item/WULA_Safe_Box_For_Mission.png
new file mode 100644
index 00000000..d7075d02
Binary files /dev/null and b/Content/Textures/Wula/Item/WULA_Safe_Box_For_Mission.png differ
diff --git a/Content/Textures/Wula/Plant/WULA_Plant_Eggplant.png b/Content/Textures/Wula/Plant/WULA_Plant_Eggplant.png
new file mode 100644
index 00000000..a8ab307b
Binary files /dev/null and b/Content/Textures/Wula/Plant/WULA_Plant_Eggplant.png differ
diff --git a/Content/Textures/Wula/Plant/WULA_Plant_Eggplant_Immature.png b/Content/Textures/Wula/Plant/WULA_Plant_Eggplant_Immature.png
new file mode 100644
index 00000000..bb272eff
Binary files /dev/null and b/Content/Textures/Wula/Plant/WULA_Plant_Eggplant_Immature.png differ
diff --git a/Content/Textures/Wula/UI/Commands/WULA_SilverTransfer.png b/Content/Textures/Wula/UI/Commands/WULA_SilverTransfer.png
new file mode 100644
index 00000000..d7f4a2a7
Binary files /dev/null and b/Content/Textures/Wula/UI/Commands/WULA_SilverTransfer.png differ
diff --git a/Content/Textures/Wula/World/WorldObjects/Expanding/WULA_Progressive_Faction.png b/Content/Textures/Wula/World/WorldObjects/Expanding/WULA_Progressive_Faction.png
new file mode 100644
index 00000000..c9b067c9
Binary files /dev/null and b/Content/Textures/Wula/World/WorldObjects/Expanding/WULA_Progressive_Faction.png differ
diff --git a/Source/WulaFallenEmpire/BuildingComp/WULA_MechanoidRecycler/Building_MechanoidRecycler.cs b/Source/WulaFallenEmpire/BuildingComp/WULA_MechanoidRecycler/Building_MechanoidRecycler.cs
index d84b9bf8..9af5f7c2 100644
--- a/Source/WulaFallenEmpire/BuildingComp/WULA_MechanoidRecycler/Building_MechanoidRecycler.cs
+++ b/Source/WulaFallenEmpire/BuildingComp/WULA_MechanoidRecycler/Building_MechanoidRecycler.cs
@@ -23,6 +23,9 @@ namespace WulaFallenEmpire
public int StoredCount => storedMechanoidCount;
public int MaxStorage => Props.maxStorageCapacity;
public bool IsCooldownActive => Find.TickManager.TicksGame - spawnTick < 24 * 2500; // 24小时冷却
+
+ // 新增:检查是否属于玩家派系
+ public bool IsPlayerFaction => this.Faction == Faction.OfPlayer;
// 生成初始单位(改为计数)
private void SpawnInitialUnits()
@@ -192,6 +195,10 @@ namespace WulaFallenEmpire
foreach (Gizmo g in base.GetGizmos())
yield return g;
+ // 新增:只有玩家派系才能看到和使用这些按钮
+ if (!IsPlayerFaction)
+ yield break;
+
// 回收附近机械族按钮
Command_Action recycleCommand = new Command_Action
{
diff --git a/Source/WulaFallenEmpire/BuildingComp/WULA_SkyfallerCaller/CompSkyfallerCaller.cs b/Source/WulaFallenEmpire/BuildingComp/WULA_SkyfallerCaller/CompSkyfallerCaller.cs
index cf3215c2..d94ef747 100644
--- a/Source/WulaFallenEmpire/BuildingComp/WULA_SkyfallerCaller/CompSkyfallerCaller.cs
+++ b/Source/WulaFallenEmpire/BuildingComp/WULA_SkyfallerCaller/CompSkyfallerCaller.cs
@@ -24,10 +24,24 @@ namespace WulaFallenEmpire
return _worldComponent;
}
}
+
+ private GlobalStorageWorldComponent _globalStorage;
+ private GlobalStorageWorldComponent GlobalStorage
+ {
+ get
+ {
+ if (_globalStorage == null)
+ {
+ _globalStorage = Find.World.GetComponent();
+ }
+ return _globalStorage;
+ }
+ }
private bool used = false;
private int callTick = -1;
private bool calling = false;
+ private bool usedGlobalStorage = false; // 新增:标记是否使用了全局储存器
public bool CanCall => !used && !calling;
@@ -119,6 +133,7 @@ namespace WulaFallenEmpire
Scribe_Values.Look(ref used, "used", false);
Scribe_Values.Look(ref callTick, "callTick", -1);
Scribe_Values.Look(ref calling, "calling", false);
+ Scribe_Values.Look(ref usedGlobalStorage, "usedGlobalStorage", false);
}
public override void CompTick()
@@ -166,7 +181,11 @@ namespace WulaFallenEmpire
}
else
{
- Messages.Message("WULA_SkyfallerIncoming".Translate(delay.ToStringTicksToPeriod()), parent, MessageTypeDefOf.ThreatBig);
+ // 修改:根据资源来源显示不同的消息
+ string messageKey = usedGlobalStorage ?
+ "WULA_SkyfallerIncomingFromGlobal" :
+ "WULA_SkyfallerIncoming";
+ Messages.Message(messageKey.Translate(delay.ToStringTicksToPeriod()), parent, MessageTypeDefOf.ThreatBig);
}
}
@@ -175,6 +194,7 @@ namespace WulaFallenEmpire
calling = false;
used = false;
callTick = -1;
+ usedGlobalStorage = false;
}
protected virtual void ExecuteSkyfallerCall()
@@ -187,14 +207,17 @@ namespace WulaFallenEmpire
return;
}
- if (!HasEnoughMaterials())
+ // 修改:使用新的资源检查方法
+ var resourceCheck = CheckAndConsumeMaterials();
+ if (!resourceCheck.HasEnoughMaterials)
{
Log.Message($"[SkyfallerCaller] Aborting skyfaller call due to insufficient materials.");
ResetCall();
return;
}
- ConsumeMaterials();
+ // 记录是否使用了全局储存器
+ usedGlobalStorage = resourceCheck.UsedGlobalStorage;
// 检查屋顶并处理
HandleRoofDestruction();
@@ -251,18 +274,106 @@ namespace WulaFallenEmpire
}
}
- protected bool HasEnoughMaterials()
+ // 新增:资源检查结果结构
+ protected struct ResourceCheckResult
{
- if (DebugSettings.godMode) return true;
+ public bool HasEnoughMaterials;
+ public bool UsedGlobalStorage;
+ public Dictionary BeaconMaterials;
+ public Dictionary GlobalMaterials;
+ }
+
+ // 修改:新的资源检查方法,优先检查信标附近,然后检查全局储存器
+ protected ResourceCheckResult CheckAndConsumeMaterials()
+ {
+ var result = new ResourceCheckResult
+ {
+ HasEnoughMaterials = false,
+ UsedGlobalStorage = false,
+ BeaconMaterials = new Dictionary(),
+ GlobalMaterials = new Dictionary()
+ };
+
+ if (DebugSettings.godMode)
+ {
+ result.HasEnoughMaterials = true;
+ return result;
+ }
var costList = CostList;
if (costList.NullOrEmpty())
{
- return true;
+ result.HasEnoughMaterials = true;
+ return result;
}
- var availableThings = new List();
- if (parent.Map == null) return false;
+ if (parent.Map == null)
+ {
+ return result;
+ }
+
+ // 第一步:收集信标附近的可用物资
+ var beaconMaterials = CollectBeaconMaterials();
+ result.BeaconMaterials = beaconMaterials;
+
+ // 第二步:检查信标附近物资是否足够
+ bool beaconHasEnough = true;
+ foreach (var cost in costList)
+ {
+ int availableInBeacon = beaconMaterials.ContainsKey(cost.thingDef) ? beaconMaterials[cost.thingDef] : 0;
+ if (availableInBeacon < cost.count)
+ {
+ beaconHasEnough = false;
+ break;
+ }
+ }
+
+ // 第三步:如果信标附近物资足够,只消耗信标附近的
+ if (beaconHasEnough)
+ {
+ ConsumeBeaconMaterials(beaconMaterials, costList);
+ result.HasEnoughMaterials = true;
+ result.UsedGlobalStorage = false;
+ return result;
+ }
+
+ // 第四步:如果信标附近物资不足,检查全局储存器
+ var globalMaterials = CheckGlobalStorageMaterials();
+ result.GlobalMaterials = globalMaterials;
+
+ bool globalHasEnough = true;
+ foreach (var cost in costList)
+ {
+ int availableInBeacon = beaconMaterials.ContainsKey(cost.thingDef) ? beaconMaterials[cost.thingDef] : 0;
+ int availableInGlobal = globalMaterials.ContainsKey(cost.thingDef) ? globalMaterials[cost.thingDef] : 0;
+
+ if (availableInBeacon + availableInGlobal < cost.count)
+ {
+ globalHasEnough = false;
+ break;
+ }
+ }
+
+ if (globalHasEnough)
+ {
+ // 先消耗信标附近的,不足部分从全局储存器扣除
+ ConsumeMixedMaterials(beaconMaterials, globalMaterials, costList);
+ result.HasEnoughMaterials = true;
+ result.UsedGlobalStorage = true;
+ return result;
+ }
+
+ // 两种来源加起来都不够
+ result.HasEnoughMaterials = false;
+ return result;
+ }
+
+ // 新增:收集信标附近的物资
+ private Dictionary CollectBeaconMaterials()
+ {
+ var materials = new Dictionary();
+
+ if (parent.Map == null) return materials;
foreach (Building_OrbitalTradeBeacon beacon in Building_OrbitalTradeBeacon.AllPowered(parent.Map))
{
@@ -274,46 +385,49 @@ namespace WulaFallenEmpire
Thing thing = thingList[i];
if (thing.def.EverHaulable)
{
- availableThings.Add(thing);
+ if (materials.ContainsKey(thing.def))
+ {
+ materials[thing.def] += thing.stackCount;
+ }
+ else
+ {
+ materials[thing.def] = thing.stackCount;
+ }
}
}
}
}
-
- availableThings = availableThings.Distinct().ToList();
+
+ return materials;
+ }
+
+ // 新增:检查全局储存器中的物资
+ private Dictionary CheckGlobalStorageMaterials()
+ {
+ var materials = new Dictionary();
+
+ if (GlobalStorage == null) return materials;
+
+ var costList = CostList;
+ if (costList.NullOrEmpty()) return materials;
foreach (var cost in costList)
{
- int count = 0;
- foreach (var thing in availableThings)
+ int globalCount = GlobalStorage.GetInputStorageCount(cost.thingDef);
+ if (globalCount > 0)
{
- if (thing.def == cost.thingDef)
- {
- count += thing.stackCount;
- }
- }
- if (count < cost.count)
- {
- return false;
+ materials[cost.thingDef] = globalCount;
}
}
- return true;
+ return materials;
}
- protected void ConsumeMaterials()
+ // 新增:只消耗信标附近的物资
+ private void ConsumeBeaconMaterials(Dictionary beaconMaterials, List costList)
{
- if (DebugSettings.godMode) return;
-
- var costList = CostList;
- if (costList.NullOrEmpty())
- {
- return;
- }
-
var tradeableThings = new List();
- if (parent.Map == null) return;
-
+
foreach (Building_OrbitalTradeBeacon beacon in Building_OrbitalTradeBeacon.AllPowered(parent.Map))
{
foreach (IntVec3 cell in beacon.TradeableCells)
@@ -329,13 +443,11 @@ namespace WulaFallenEmpire
}
}
}
-
- tradeableThings = tradeableThings.Distinct().ToList();
foreach (var cost in costList)
{
int remaining = cost.count;
- for (int i = tradeableThings.Count - 1; i >= 0; i--)
+ for (int i = tradeableThings.Count - 1; i >= 0 && remaining > 0; i--)
{
var thing = tradeableThings[i];
if (thing.def == cost.thingDef)
@@ -349,16 +461,123 @@ namespace WulaFallenEmpire
{
remaining -= thing.stackCount;
thing.Destroy();
- }
- if (remaining <= 0)
- {
- break;
+ tradeableThings.RemoveAt(i);
}
}
}
}
}
+ // 新增:混合消耗信标和全局储存器的物资
+ private void ConsumeMixedMaterials(Dictionary beaconMaterials, Dictionary globalMaterials, List costList)
+ {
+ // 先消耗信标附近的物资
+ var tradeableThings = new List();
+
+ foreach (Building_OrbitalTradeBeacon beacon in Building_OrbitalTradeBeacon.AllPowered(parent.Map))
+ {
+ foreach (IntVec3 cell in beacon.TradeableCells)
+ {
+ List thingList = parent.Map.thingGrid.ThingsListAt(cell);
+ for (int i = 0; i < thingList.Count; i++)
+ {
+ Thing thing = thingList[i];
+ if (thing.def.EverHaulable)
+ {
+ tradeableThings.Add(thing);
+ }
+ }
+ }
+ }
+
+ // 对每种所需材料进行处理
+ foreach (var cost in costList)
+ {
+ int remaining = cost.count;
+
+ // 第一步:消耗信标附近的物资
+ for (int i = tradeableThings.Count - 1; i >= 0 && remaining > 0; i--)
+ {
+ var thing = tradeableThings[i];
+ if (thing.def == cost.thingDef)
+ {
+ if (thing.stackCount > remaining)
+ {
+ thing.SplitOff(remaining);
+ remaining = 0;
+ }
+ else
+ {
+ remaining -= thing.stackCount;
+ thing.Destroy();
+ tradeableThings.RemoveAt(i);
+ }
+ }
+ }
+
+ // 第二步:如果还有剩余,从全局储存器扣除
+ if (remaining > 0 && GlobalStorage != null)
+ {
+ GlobalStorage.RemoveFromInputStorage(cost.thingDef, remaining);
+ }
+ }
+ }
+
+ // 保留原有的 HasEnoughMaterials 方法用于 Gizmo 显示
+ protected bool HasEnoughMaterials()
+ {
+ if (DebugSettings.godMode) return true;
+
+ var costList = CostList;
+ if (costList.NullOrEmpty())
+ {
+ return true;
+ }
+
+ // 第一步:检查信标附近物资
+ var beaconMaterials = CollectBeaconMaterials();
+ bool beaconHasEnough = true;
+
+ foreach (var cost in costList)
+ {
+ int availableInBeacon = beaconMaterials.ContainsKey(cost.thingDef) ? beaconMaterials[cost.thingDef] : 0;
+ if (availableInBeacon < cost.count)
+ {
+ beaconHasEnough = false;
+ break;
+ }
+ }
+
+ if (beaconHasEnough) return true;
+
+ // 第二步:检查全局储存器(如果信标附近不够)
+ if (GlobalStorage == null) return false;
+
+ foreach (var cost in costList)
+ {
+ int availableInBeacon = beaconMaterials.ContainsKey(cost.thingDef) ? beaconMaterials[cost.thingDef] : 0;
+ int availableInGlobal = GlobalStorage.GetInputStorageCount(cost.thingDef);
+
+ if (availableInBeacon + availableInGlobal < cost.count)
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ // 原有的 ConsumeMaterials 方法现在只用于 God Mode 情况
+ protected void ConsumeMaterials()
+ {
+ if (DebugSettings.godMode) return;
+
+ // 在非 God Mode 下,这个方法不应该被调用
+ // 实际的消耗在 CheckAndConsumeMaterials 中处理
+ Log.Warning("[SkyfallerCaller] ConsumeMaterials called in non-God mode, this shouldn't happen");
+ }
+
+ // 其余方法保持不变...
private string GetCostString()
{
var costList = CostList;
@@ -379,6 +598,7 @@ namespace WulaFallenEmpire
calling = false;
used = false;
callTick = -1;
+ usedGlobalStorage = false;
Messages.Message("WULA_SkyfallerCallCancelled".Translate(), parent, MessageTypeDefOf.NeutralEvent);
}
@@ -451,6 +671,9 @@ namespace WulaFallenEmpire
sb.Append(costString);
}
+ // 新增:显示资源来源信息
+ sb.AppendLine().AppendLine().Append("WULA_ResourcePriorityInfo".Translate());
+
return sb.ToString();
}
@@ -501,7 +724,10 @@ namespace WulaFallenEmpire
int ticksLeft = callTick - Find.TickManager.TicksGame;
if (ticksLeft > 0)
{
- sb.Append("WULA_SkyfallerArrivingIn".Translate(ticksLeft.ToStringTicksToPeriod()));
+ string messageKey = usedGlobalStorage ?
+ "WULA_SkyfallerArrivingInFromGlobal" :
+ "WULA_SkyfallerArrivingIn";
+ sb.Append(messageKey.Translate(ticksLeft.ToStringTicksToPeriod()));
}
}
else if (!used)
diff --git a/Source/WulaFallenEmpire/BuildingComp/WULA_TransformAtFullCapacity/CompTransformAtFullCapacity.cs b/Source/WulaFallenEmpire/BuildingComp/WULA_TransformAtFullCapacity/CompTransformAtFullCapacity.cs
index 44d550ad..1dbea549 100644
--- a/Source/WulaFallenEmpire/BuildingComp/WULA_TransformAtFullCapacity/CompTransformAtFullCapacity.cs
+++ b/Source/WulaFallenEmpire/BuildingComp/WULA_TransformAtFullCapacity/CompTransformAtFullCapacity.cs
@@ -83,22 +83,34 @@ namespace WulaFallenEmpire
}
}
+ private void PlayTransformEffects(IntVec3 position, Map map)
+ {
+ //// 播放转换视觉效果
+ //for (int i = 0; i < 3; i++)
+ //{
+ // MoteMaker.ThrowSmoke(position.ToVector3Shifted() + new Vector3(0, 0, 0.5f), map, 1.5f);
+ // MoteMaker.ThrowLightningGlow(position.ToVector3Shifted(), map, 2f);
+ //}
+
+ //// 播放音效
+ //SoundDefOf.PsychicPulseGlobal.PlayOneShot(new TargetInfo(position, map));
+ }
+
public void TransformToPawn()
{
if (Recycler == null || !parent.Spawned)
return;
-
Map map = parent.Map;
IntVec3 position = parent.Position;
Faction faction = parent.Faction;
-
+ // 记录建筑定义用于后续更新
+ ThingDef buildingDef = parent.def;
// 消耗存储的机械族
if (!Recycler.ConsumeMechanoids(Props.requiredCapacity))
{
Messages.Message("WULA_NotEnoughMechs".Translate(), MessageTypeDefOf.RejectInput);
return;
}
-
// 生成目标Pawn
PawnGenerationRequest request = new PawnGenerationRequest(
Props.targetPawnKind,
@@ -111,9 +123,8 @@ namespace WulaFallenEmpire
canGeneratePawnRelations: false,
mustBeCapableOfViolence: true
);
-
Pawn newPawn = PawnGenerator.GeneratePawn(request);
-
+
// 关键修改:传递当前的机械族数量(6个)
var transformComp = newPawn.GetComp();
if (transformComp != null)
@@ -136,37 +147,24 @@ namespace WulaFallenEmpire
// 传递建筑定义和机械族数量
transformComp.SetRestoreData(parent.def, Props.requiredCapacity);
}
-
// 移除建筑
parent.DeSpawn(DestroyMode.Vanish);
-
+
// 生成Pawn
GenSpawn.Spawn(newPawn, position, map, WipeMode.Vanish);
-
+
// 选中新生成的Pawn
if (Find.Selector.IsSelected(parent))
{
Find.Selector.Select(newPawn);
}
-
- Messages.Message("WULA_BuildingTransformedToPawn".Translate(parent.Label, newPawn.LabelCap, Props.requiredCapacity),
+ Messages.Message("WULA_BuildingTransformedToPawn".Translate(parent.Label, newPawn.LabelCap, Props.requiredCapacity),
MessageTypeDefOf.PositiveEvent);
-
+
// 播放转换效果
PlayTransformEffects(position, map);
- }
- private void PlayTransformEffects(IntVec3 position, Map map)
- {
- //// 播放转换视觉效果
- //for (int i = 0; i < 3; i++)
- //{
- // MoteMaker.ThrowSmoke(position.ToVector3Shifted() + new Vector3(0, 0, 0.5f), map, 1.5f);
- // MoteMaker.ThrowLightningGlow(position.ToVector3Shifted(), map, 2f);
- //}
-
- //// 播放音效
- //SoundDefOf.PsychicPulseGlobal.PlayOneShot(new TargetInfo(position, map));
+ Log.Message($"[TransformSystem] Building -> Pawn transformation completed at {position}. Path grid updated.");
}
}
}
diff --git a/Source/WulaFallenEmpire/BuildingComp/WULA_TransformAtFullCapacity/CompTransformIntoBuilding.cs b/Source/WulaFallenEmpire/BuildingComp/WULA_TransformAtFullCapacity/CompTransformIntoBuilding.cs
index 7f4dae02..78516b20 100644
--- a/Source/WulaFallenEmpire/BuildingComp/WULA_TransformAtFullCapacity/CompTransformIntoBuilding.cs
+++ b/Source/WulaFallenEmpire/BuildingComp/WULA_TransformAtFullCapacity/CompTransformIntoBuilding.cs
@@ -77,7 +77,6 @@ namespace WulaFallenEmpire
// 显示恢复的机械族数量
sb.AppendLine();
- sb.Append("WULA_RestoreMechCount".Translate(restoreMechCount));
// 显示目标建筑的最大存储容量
var recyclerProps = restoreBuildingDef.GetCompProperties();
@@ -195,88 +194,6 @@ namespace WulaFallenEmpire
return false;
}
- public void TransformToBuilding()
- {
- if (Pawn == null || !Pawn.Spawned)
- return;
-
- Map map = Pawn.Map;
- IntVec3 desiredPosition = Pawn.Position;
- Faction faction = Pawn.Faction;
-
- // 确定要生成的建筑类型
- ThingDef buildingDef = restoreBuildingDef ?? Props.targetBuildingDef;
- if (buildingDef == null)
- {
- Messages.Message("WULA_CannotDetermineBuildingType".Translate(), MessageTypeDefOf.RejectInput);
- return;
- }
-
- // 最终校验(排除被转换的Pawn本身)
- string failReason;
- if (!TransformValidationUtility.CanPlaceBuildingAt(buildingDef, desiredPosition, map, faction, Pawn, out failReason))
- {
- // 尝试寻找附近的位置
- IntVec3 alternativePosition;
- if (TryFindNearbyValidPosition(out alternativePosition, out failReason))
- {
- desiredPosition = alternativePosition;
- Messages.Message("WULA_DeployingAtNearbyPosition".Translate(desiredPosition), MessageTypeDefOf.NeutralEvent);
- }
- else
- {
- Messages.Message("WULA_CannotDeployBuilding".Translate(failReason), MessageTypeDefOf.RejectInput);
- return;
- }
- }
-
- // 移除Pawn
- Pawn.DeSpawn(DestroyMode.Vanish);
-
- // 生成建筑
- Building newBuilding = (Building)GenSpawn.Spawn(buildingDef, desiredPosition, map, WipeMode.Vanish);
- newBuilding.SetFaction(faction);
-
- // 关键修改:恢复机械族数量
- var recycler = newBuilding as Building_MechanoidRecycler;
- if (recycler != null)
- {
- recycler.SetMechanoidCount(restoreMechCount);
- }
-
- // 添加建筑转换组件
- var transformComp = newBuilding.TryGetComp();
- if (transformComp == null)
- {
- // 动态添加组件
- var compProps = new CompProperties_TransformAtFullCapacity
- {
- targetPawnKind = Pawn.kindDef
- };
- transformComp = new CompTransformAtFullCapacity();
- transformComp.parent = newBuilding;
- transformComp.props = compProps;
- newBuilding.AllComps.Add(transformComp);
- transformComp.Initialize(compProps);
- }
-
- // 选中新生成的建筑
- if (Find.Selector.IsSelected(Pawn))
- {
- Find.Selector.Select(newBuilding);
- }
-
- Messages.Message("WULA_PawnDeployedAsBuilding".Translate(Pawn.LabelCap, newBuilding.Label, restoreMechCount),
- MessageTypeDefOf.PositiveEvent);
-
- // 播放转换效果
- PlayTransformEffects(desiredPosition, map);
-
- // 清除缓存
- lastValidationResult = null;
- lastValidationReason = null;
- }
-
private void PlayTransformEffects(IntVec3 position, Map map)
{
// 播放转换视觉效果
@@ -298,5 +215,80 @@ namespace WulaFallenEmpire
lastValidationResult = null;
}
}
+
+ public void TransformToBuilding()
+ {
+ if (Pawn == null || !Pawn.Spawned)
+ return;
+ Map map = Pawn.Map;
+ IntVec3 desiredPosition = Pawn.Position;
+ Faction faction = Pawn.Faction;
+ // 确定要生成的建筑类型
+ ThingDef buildingDef = restoreBuildingDef ?? Props.targetBuildingDef;
+ if (buildingDef == null)
+ {
+ Messages.Message("WULA_CannotDetermineBuildingType".Translate(), MessageTypeDefOf.RejectInput);
+ return;
+ }
+ // 最终校验(排除被转换的Pawn本身)
+ string failReason;
+ if (!TransformValidationUtility.CanPlaceBuildingAt(buildingDef, desiredPosition, map, faction, Pawn, out failReason))
+ {
+ // 尝试寻找附近的位置
+ IntVec3 alternativePosition;
+ if (TryFindNearbyValidPosition(out alternativePosition, out failReason))
+ {
+ desiredPosition = alternativePosition;
+ Messages.Message("WULA_DeployingAtNearbyPosition".Translate(desiredPosition), MessageTypeDefOf.NeutralEvent);
+ }
+ else
+ {
+ Messages.Message("WULA_CannotDeployBuilding".Translate(failReason), MessageTypeDefOf.RejectInput);
+ return;
+ }
+ }
+ // 移除Pawn
+ Pawn.DeSpawn(DestroyMode.Vanish);
+ // 生成建筑
+ Building newBuilding = (Building)GenSpawn.Spawn(buildingDef, desiredPosition, map, WipeMode.Vanish);
+ newBuilding.SetFaction(faction);
+ // 关键修改:恢复机械族数量
+ var recycler = newBuilding as Building_MechanoidRecycler;
+ if (recycler != null)
+ {
+ recycler.SetMechanoidCount(restoreMechCount);
+ }
+ // 添加建筑转换组件
+ var transformComp = newBuilding.TryGetComp();
+ if (transformComp == null)
+ {
+ // 动态添加组件
+ var compProps = new CompProperties_TransformAtFullCapacity
+ {
+ targetPawnKind = Pawn.kindDef
+ };
+ transformComp = new CompTransformAtFullCapacity();
+ transformComp.parent = newBuilding;
+ transformComp.props = compProps;
+ newBuilding.AllComps.Add(transformComp);
+ transformComp.Initialize(compProps);
+ }
+ // 选中新生成的建筑
+ if (Find.Selector.IsSelected(Pawn))
+ {
+ Find.Selector.Select(newBuilding);
+ }
+ Messages.Message("WULA_PawnDeployedAsBuilding".Translate(Pawn.LabelCap, newBuilding.Label, restoreMechCount),
+ MessageTypeDefOf.PositiveEvent);
+
+ // 播放转换效果
+ PlayTransformEffects(desiredPosition, map);
+
+ // 清除缓存
+ lastValidationResult = null;
+ lastValidationReason = null;
+
+ Log.Message($"[TransformSystem] Pawn -> Building transformation completed at {desiredPosition}. Path grid updated.");
+ }
}
}
diff --git a/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs b/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs
index 0f9cb584..9215c159 100644
--- a/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs
+++ b/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs
@@ -35,181 +35,10 @@ namespace WulaFallenEmpire
private static readonly Color CustomButtonTextNormalColor = new Color(0.9f, 0.9f, 0.9f, 1f);
private static readonly Color CustomButtonTextHoverColor = new Color(1f, 1f, 1f, 1f);
private static readonly Color CustomButtonTextDisabledColor = new Color(0.6f, 0.6f, 0.6f, 1f);
- // 绘制单个选项 - 使用自定义样式
- private void DrawSingleOption(Rect rect, EventOption option)
- {
- string reason;
- bool conditionsMet = AreConditionsMet(option.conditions, out reason);
- // 水平居中选项
- float optionWidth = Mathf.Min(rect.width, Config.optionSize.x * (rect.width / Config.windowSize.x));
- float optionX = rect.x + (rect.width - optionWidth) / 2;
- Rect optionRect = new Rect(optionX, rect.y, optionWidth, rect.height);
- // 保存原始状态
- Color originalColor = GUI.color;
- GameFont originalFont = Text.Font;
- Color originalTextColor = GUI.contentColor;
- TextAnchor originalAnchor = Text.Anchor;
- try
- {
- // 设置文本居中
- Text.Anchor = TextAnchor.MiddleCenter;
- Text.Font = GameFont.Small;
- if (conditionsMet)
- {
- // 启用状态的选项 - 使用自定义样式
- if (option.useCustomColors)
- {
- // 使用选项自定义颜色
- DrawCustomButtonWithColors(optionRect, option.label.Translate(), option);
- }
- else
- {
- // 使用默认自定义颜色
- DrawCustomButton(optionRect, option.label.Translate(), isEnabled: true);
- }
- // 添加点击处理
- if (Widgets.ButtonInvisible(optionRect))
- {
- HandleAction(option.optionEffects);
- }
- }
- else
- {
- // 禁用状态的选项 - 使用自定义禁用样式
- if (option.useCustomColors && option.disabledColor.HasValue)
- {
- // 使用选项自定义禁用颜色
- DrawCustomButtonWithColors(optionRect, option.label.Translate(), option, isEnabled: false);
- }
- else
- {
- // 使用默认自定义禁用颜色
- DrawCustomButton(optionRect, option.label.Translate(), isEnabled: false);
- }
- // 添加禁用提示
- TooltipHandler.TipRegion(optionRect, GetDisabledReason(option, reason).Translate());
- }
- }
- finally
- {
- // 恢复原始状态
- GUI.color = originalColor;
- Text.Font = originalFont;
- GUI.contentColor = originalTextColor;
- Text.Anchor = originalAnchor;
- }
- }
- ///
- /// 绘制自定义按钮(基础版本)
- ///
- private void DrawCustomButton(Rect rect, string label, bool isEnabled = true)
- {
- bool isMouseOver = Mouse.IsOver(rect);
-
- // 确定按钮状态颜色
- Color buttonColor, textColor;
-
- if (!isEnabled)
- {
- // 禁用状态
- buttonColor = CustomButtonDisabledColor;
- textColor = CustomButtonTextDisabledColor;
- }
- else if (isMouseOver)
- {
- // 悬停状态
- buttonColor = CustomButtonHoverColor;
- textColor = CustomButtonTextHoverColor;
- }
- else
- {
- // 正常状态
- buttonColor = CustomButtonNormalColor;
- textColor = CustomButtonTextNormalColor;
- }
- // 绘制按钮背景
- GUI.color = buttonColor;
- Widgets.DrawBoxSolid(rect, buttonColor);
-
- // 绘制边框
- if (isEnabled)
- {
- Widgets.DrawBox(rect, 1);
- }
- else
- {
- // 禁用状态的边框更细更暗
- Widgets.DrawBox(rect, 1);
- }
- // 绘制文本
- GUI.color = textColor;
- Text.Anchor = TextAnchor.MiddleCenter;
- Widgets.Label(rect.ContractedBy(4f), label);
-
- // 如果是禁用状态,添加删除线效果
- if (!isEnabled)
- {
- GUI.color = new Color(0.6f, 0.6f, 0.6f, 0.8f);
- Widgets.DrawLine(
- new Vector2(rect.x + 10f, rect.center.y),
- new Vector2(rect.xMax - 10f, rect.center.y),
- GUI.color,
- 1f
- );
- }
- }
- ///
- /// 绘制自定义按钮(使用选项自定义颜色)
- ///
- private void DrawCustomButtonWithColors(Rect rect, string label, EventOption option, bool isEnabled = true)
- {
- bool isMouseOver = Mouse.IsOver(rect);
-
- // 确定按钮状态颜色
- Color buttonColor, textColor;
-
- if (!isEnabled)
- {
- // 禁用状态
- buttonColor = option.disabledColor ?? CustomButtonDisabledColor;
- textColor = option.textDisabledColor ?? CustomButtonTextDisabledColor;
- }
- else if (isMouseOver)
- {
- // 悬停状态
- buttonColor = option.hoverColor ?? CustomButtonHoverColor;
- textColor = option.textHoverColor ?? CustomButtonTextHoverColor;
- }
- else
- {
- // 正常状态
- buttonColor = option.normalColor ?? CustomButtonNormalColor;
- textColor = option.textColor ?? CustomButtonTextNormalColor;
- }
- // 绘制按钮背景
- GUI.color = buttonColor;
- Widgets.DrawBoxSolid(rect, buttonColor);
-
- // 绘制边框
- Widgets.DrawBox(rect);
- // 绘制文本
- GUI.color = textColor;
- Text.Anchor = TextAnchor.MiddleCenter;
- Widgets.Label(rect.ContractedBy(4f), label);
-
- // 如果是禁用状态,添加删除线效果
- if (!isEnabled)
- {
- GUI.color = new Color(0.6f, 0.6f, 0.6f, 0.8f);
- Widgets.DrawLine(
- new Vector2(rect.x + 10f, rect.center.y),
- new Vector2(rect.xMax - 10f, rect.center.y),
- GUI.color,
- 1f
- );
- }
- }
+ // 滚动位置
+ private Vector2 descriptionScrollPosition = Vector2.zero;
+ private Vector2 optionsScrollPosition = Vector2.zero;
// 使用配置的窗口尺寸
public override Vector2 InitialSize
@@ -397,7 +226,7 @@ namespace WulaFallenEmpire
currentY += nameRect.height + Config.GetScaledMargin(Config.characterNameMargins.y, inRect);
}
- // 4. 描述
+ // 4. 描述 - 修复滚动问题
if (Config.showDescriptions)
{
currentY += Config.GetScaledMargin(Config.descriptionsMargins.x, inRect);
@@ -414,13 +243,8 @@ namespace WulaFallenEmpire
Vector2 scaledDescriptionsPadding = Config.GetScaledDescriptionsPadding(descriptionRect);
Rect descriptionInnerRect = descriptionRect.ContractedBy(scaledDescriptionsPadding.y, scaledDescriptionsPadding.x);
- // 使用可滚动的文本区域
- float textHeight = Text.CalcHeight(selectedDescription, descriptionInnerRect.width);
- Rect viewRect = new Rect(0, 0, descriptionInnerRect.width, Mathf.Max(textHeight, descriptionInnerRect.height));
-
- Widgets.BeginScrollView(descriptionInnerRect, ref descriptionScrollPosition, viewRect);
- Widgets.Label(new Rect(0, 0, viewRect.width, viewRect.height), selectedDescription);
- Widgets.EndScrollView();
+ // 修复:使用正确的滚动视图设置,只显示纵向滚动条
+ DrawDescriptionScrollView(descriptionInnerRect, selectedDescription);
currentY += descriptionRect.height + Config.GetScaledMargin(Config.descriptionsMargins.y, inRect);
}
@@ -453,9 +277,227 @@ namespace WulaFallenEmpire
}
}
- // 滚动位置
- private Vector2 descriptionScrollPosition = Vector2.zero;
- private Vector2 optionsScrollPosition = Vector2.zero;
+ ///
+ /// 修复的描述区域滚动视图 - 只显示纵向滚动条
+ ///
+ private void DrawDescriptionScrollView(Rect outRect, string text)
+ {
+ try
+ {
+ // 计算文本高度 - 使用outRect的宽度(减去滚动条宽度)来计算
+ float scrollbarWidth = 16f; // 滚动条的标准宽度
+ float textAreaWidth = outRect.width - scrollbarWidth;
+
+ // 确保文本区域宽度为正数
+ if (textAreaWidth <= 0)
+ textAreaWidth = outRect.width;
+
+ float textHeight = Text.CalcHeight(text, textAreaWidth);
+
+ // 创建视图矩形 - 宽度设置为文本区域宽度,高度为计算出的文本高度
+ Rect viewRect = new Rect(0f, 0f, textAreaWidth, Mathf.Max(textHeight, outRect.height));
+
+ // 开始滚动视图 - 只显示纵向滚动条
+ Widgets.BeginScrollView(outRect, ref descriptionScrollPosition, viewRect, false);
+ {
+ // 绘制文本 - 使用视图矩形的宽度确保文本正确换行
+ Rect textRect = new Rect(0f, 0f, viewRect.width, viewRect.height);
+ Widgets.Label(textRect, text);
+ }
+ Widgets.EndScrollView();
+ }
+ catch (Exception ex)
+ {
+ // 错误处理:如果滚动视图出现问题,回退到简单标签
+ Log.Warning($"[CustomDisplay] Error in description scroll view: {ex.Message}");
+ Widgets.Label(outRect, text);
+ }
+ }
+
+ // 绘制单个选项 - 使用自定义样式
+ private void DrawSingleOption(Rect rect, EventOption option)
+ {
+ string reason;
+ bool conditionsMet = AreConditionsMet(option.conditions, out reason);
+
+ // 水平居中选项
+ float optionWidth = Mathf.Min(rect.width, Config.optionSize.x * (rect.width / Config.windowSize.x));
+ float optionX = rect.x + (rect.width - optionWidth) / 2;
+ Rect optionRect = new Rect(optionX, rect.y, optionWidth, rect.height);
+
+ // 保存原始状态
+ Color originalColor = GUI.color;
+ GameFont originalFont = Text.Font;
+ Color originalTextColor = GUI.contentColor;
+ TextAnchor originalAnchor = Text.Anchor;
+
+ try
+ {
+ // 设置文本居中
+ Text.Anchor = TextAnchor.MiddleCenter;
+ Text.Font = GameFont.Small;
+
+ if (conditionsMet)
+ {
+ // 启用状态的选项 - 使用自定义样式
+ if (option.useCustomColors)
+ {
+ // 使用选项自定义颜色
+ DrawCustomButtonWithColors(optionRect, option.label.Translate(), option);
+ }
+ else
+ {
+ // 使用默认自定义颜色
+ DrawCustomButton(optionRect, option.label.Translate(), isEnabled: true);
+ }
+ // 添加点击处理
+ if (Widgets.ButtonInvisible(optionRect))
+ {
+ HandleAction(option.optionEffects);
+ }
+ }
+ else
+ {
+ // 禁用状态的选项 - 使用自定义禁用样式
+ if (option.useCustomColors && option.disabledColor.HasValue)
+ {
+ // 使用选项自定义禁用颜色
+ DrawCustomButtonWithColors(optionRect, option.label.Translate(), option, isEnabled: false);
+ }
+ else
+ {
+ // 使用默认自定义禁用颜色
+ DrawCustomButton(optionRect, option.label.Translate(), isEnabled: false);
+ }
+ // 添加禁用提示
+ TooltipHandler.TipRegion(optionRect, GetDisabledReason(option, reason).Translate());
+ }
+ }
+ finally
+ {
+ // 恢复原始状态
+ GUI.color = originalColor;
+ Text.Font = originalFont;
+ GUI.contentColor = originalTextColor;
+ Text.Anchor = originalAnchor;
+ }
+ }
+
+ ///
+ /// 绘制自定义按钮(基础版本)
+ ///
+ private void DrawCustomButton(Rect rect, string label, bool isEnabled = true)
+ {
+ bool isMouseOver = Mouse.IsOver(rect);
+
+ // 确定按钮状态颜色
+ Color buttonColor, textColor;
+
+ if (!isEnabled)
+ {
+ // 禁用状态
+ buttonColor = CustomButtonDisabledColor;
+ textColor = CustomButtonTextDisabledColor;
+ }
+ else if (isMouseOver)
+ {
+ // 悬停状态
+ buttonColor = CustomButtonHoverColor;
+ textColor = CustomButtonTextHoverColor;
+ }
+ else
+ {
+ // 正常状态
+ buttonColor = CustomButtonNormalColor;
+ textColor = CustomButtonTextNormalColor;
+ }
+
+ // 绘制按钮背景
+ GUI.color = buttonColor;
+ Widgets.DrawBoxSolid(rect, buttonColor);
+
+ // 绘制边框
+ if (isEnabled)
+ {
+ Widgets.DrawBox(rect, 1);
+ }
+ else
+ {
+ // 禁用状态的边框更细更暗
+ Widgets.DrawBox(rect, 1);
+ }
+
+ // 绘制文本
+ GUI.color = textColor;
+ Text.Anchor = TextAnchor.MiddleCenter;
+ Widgets.Label(rect.ContractedBy(4f), label);
+
+ // 如果是禁用状态,添加删除线效果
+ if (!isEnabled)
+ {
+ GUI.color = new Color(0.6f, 0.6f, 0.6f, 0.8f);
+ Widgets.DrawLine(
+ new Vector2(rect.x + 10f, rect.center.y),
+ new Vector2(rect.xMax - 10f, rect.center.y),
+ GUI.color,
+ 1f
+ );
+ }
+ }
+
+ ///
+ /// 绘制自定义按钮(使用选项自定义颜色)
+ ///
+ private void DrawCustomButtonWithColors(Rect rect, string label, EventOption option, bool isEnabled = true)
+ {
+ bool isMouseOver = Mouse.IsOver(rect);
+
+ // 确定按钮状态颜色
+ Color buttonColor, textColor;
+
+ if (!isEnabled)
+ {
+ // 禁用状态
+ buttonColor = option.disabledColor ?? CustomButtonDisabledColor;
+ textColor = option.textDisabledColor ?? CustomButtonTextDisabledColor;
+ }
+ else if (isMouseOver)
+ {
+ // 悬停状态
+ buttonColor = option.hoverColor ?? CustomButtonHoverColor;
+ textColor = option.textHoverColor ?? CustomButtonTextHoverColor;
+ }
+ else
+ {
+ // 正常状态
+ buttonColor = option.normalColor ?? CustomButtonNormalColor;
+ textColor = option.textColor ?? CustomButtonTextNormalColor;
+ }
+
+ // 绘制按钮背景
+ GUI.color = buttonColor;
+ Widgets.DrawBoxSolid(rect, buttonColor);
+
+ // 绘制边框
+ Widgets.DrawBox(rect);
+
+ // 绘制文本
+ GUI.color = textColor;
+ Text.Anchor = TextAnchor.MiddleCenter;
+ Widgets.Label(rect.ContractedBy(4f), label);
+
+ // 如果是禁用状态,添加删除线效果
+ if (!isEnabled)
+ {
+ GUI.color = new Color(0.6f, 0.6f, 0.6f, 0.8f);
+ Widgets.DrawLine(
+ new Vector2(rect.x + 10f, rect.center.y),
+ new Vector2(rect.xMax - 10f, rect.center.y),
+ GUI.color,
+ 1f
+ );
+ }
+ }
// 绘制选项区域
private void DrawOptions(Rect rect, List options)
@@ -526,6 +568,7 @@ namespace WulaFallenEmpire
}
}
}
+
// 应用选项颜色
private void ApplyOptionColors(EventOption option, Rect rect)
{
diff --git a/Source/WulaFallenEmpire/Flyover/WULA_SpawnFlyOver/CompAbilityEffect_SpawnFlyOver.cs b/Source/WulaFallenEmpire/Flyover/WULA_SpawnFlyOver/CompAbilityEffect_SpawnFlyOver.cs
index 22ed0263..d3f7c098 100644
--- a/Source/WulaFallenEmpire/Flyover/WULA_SpawnFlyOver/CompAbilityEffect_SpawnFlyOver.cs
+++ b/Source/WulaFallenEmpire/Flyover/WULA_SpawnFlyOver/CompAbilityEffect_SpawnFlyOver.cs
@@ -68,20 +68,6 @@ namespace WulaFallenEmpire
}
}
- public override string ExtraLabelMouseAttachment(LocalTargetInfo target)
- {
- string baseInfo = "";
- if (Props.enableGroundStrafing)
- {
- baseInfo = $"扫射区域: {Props.strafeWidth * 2 + 1}格宽度";
- }
- else if (Props.enableSectorSurveillance)
- {
- baseInfo = $"扇形监视: 约{Props.strafeWidth * 2 + 1}格宽度\n(具体参数在飞行物定义中)";
- }
- return baseInfo;
- }
-
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
{
if (!base.Valid(target, throwMessages))
diff --git a/Source/WulaFallenEmpire/GlobalWorkTable/Building_GlobalWorkTable.cs b/Source/WulaFallenEmpire/GlobalWorkTable/Building_GlobalWorkTable.cs
index f38fcbe0..dfc1ef9e 100644
--- a/Source/WulaFallenEmpire/GlobalWorkTable/Building_GlobalWorkTable.cs
+++ b/Source/WulaFallenEmpire/GlobalWorkTable/Building_GlobalWorkTable.cs
@@ -76,19 +76,30 @@ namespace WulaFallenEmpire
public GlobalWorkTableAirdropExtension AirdropExtension =>
def.GetModExtension();
- // 修改:添加空投命令到技能栏,添加工厂设施检查
+ // 修改:在 GetGizmos 方法中添加白银转移按钮
public override IEnumerable GetGizmos()
{
foreach (Gizmo g in base.GetGizmos())
{
yield return g;
}
-
- // 只有在有输出物品且有工厂设施的飞行器时才显示空投按钮
+ // 白银转移按钮 - 检查输入端是否有白银
var globalStorage = Find.World.GetComponent();
+ int silverAmount = globalStorage?.GetInputStorageCount(ThingDefOf.Silver) ?? 0;
+ bool hasSilver = silverAmount > 0;
+ if (hasSilver)
+ {
+ yield return new Command_Action
+ {
+ action = TransferSilverToOutput,
+ defaultLabel = "WULA_TransferSilver".Translate(),
+ defaultDesc = "WULA_TransferSilverDesc".Translate(silverAmount),
+ icon = ContentFinder.Get("Wula/UI/Commands/WULA_SilverTransfer"),
+ };
+ }
+ // 原有的空投按钮逻辑保持不变
bool hasOutputItems = globalStorage != null && globalStorage.outputStorage.Any(kvp => kvp.Value > 0);
bool hasFactoryFlyOver = HasFactoryFacilityFlyOver();
-
if (hasOutputItems && hasFactoryFlyOver)
{
yield return new Command_Action
@@ -111,6 +122,64 @@ namespace WulaFallenEmpire
}
}
+ // 新增:将输入端白银转移到输出端的方法
+ private void TransferSilverToOutput()
+ {
+ var globalStorage = Find.World.GetComponent();
+ if (globalStorage == null)
+ {
+ Messages.Message("WULA_NoGlobalStorage".Translate(), MessageTypeDefOf.RejectInput);
+ return;
+ }
+ int silverAmount = globalStorage.GetInputStorageCount(ThingDefOf.Silver);
+
+ if (silverAmount <= 0)
+ {
+ Messages.Message("WULA_NoSilverToTransfer".Translate(), MessageTypeDefOf.RejectInput);
+ return;
+ }
+ // 确认对话框
+ Find.WindowStack.Add(new Dialog_MessageBox(
+ "WULA_ConfirmTransferSilver".Translate(silverAmount),
+ "Confirm".Translate(),
+ () => ExecuteSilverTransfer(globalStorage, silverAmount),
+ "Cancel".Translate(),
+ null,
+ "WULA_TransferSilver".Translate(),
+ false,
+ null,
+ null
+ ));
+ }
+ // 新增:执行白银转移
+ private void ExecuteSilverTransfer(GlobalStorageWorldComponent globalStorage, int silverAmount)
+ {
+ try
+ {
+ // 从输入端移除白银
+ if (globalStorage.RemoveFromInputStorage(ThingDefOf.Silver, silverAmount))
+ {
+ // 添加到输出端
+ globalStorage.AddToOutputStorage(ThingDefOf.Silver, silverAmount);
+
+ // 显示成功消息
+ Messages.Message("WULA_SilverTransferred".Translate(silverAmount), MessageTypeDefOf.PositiveEvent);
+
+ Log.Message($"[WULA] Transferred {silverAmount} silver from input to output storage");
+ }
+ else
+ {
+ Messages.Message("WULA_TransferFailed".Translate(), MessageTypeDefOf.RejectInput);
+ Log.Error("[WULA] Failed to remove silver from input storage during transfer");
+ }
+ }
+ catch (System.Exception ex)
+ {
+ Messages.Message("WULA_TransferError".Translate(), MessageTypeDefOf.RejectInput);
+ Log.Error($"[WULA] Error during silver transfer: {ex}");
+ }
+ }
+
// 新增:检查是否有拥有FactoryFacility设施的飞行器
private bool HasFactoryFacilityFlyOver()
{
@@ -587,7 +656,7 @@ namespace WulaFallenEmpire
}
dropPodInfo.innerContainer = container;
// 生成空投舱
- DropPodUtility.MakeDropPodAt(dropCell, Map, dropPodInfo);
+ DropPodUtility.MakeDropPodAt(dropCell, Map, dropPodInfo, Faction.OfPlayer);
Log.Message($"[Airdrop] Successfully created drop pod at {dropCell}");
return true;
diff --git a/Source/WulaFallenEmpire/GlobalWorkTable/WULA_Launchable_ToGlobalStorage/CompProperties_GarbageShield.cs b/Source/WulaFallenEmpire/GlobalWorkTable/WULA_Launchable_ToGlobalStorage/CompProperties_GarbageShield.cs
index 208ec24a..c3adc386 100644
--- a/Source/WulaFallenEmpire/GlobalWorkTable/WULA_Launchable_ToGlobalStorage/CompProperties_GarbageShield.cs
+++ b/Source/WulaFallenEmpire/GlobalWorkTable/WULA_Launchable_ToGlobalStorage/CompProperties_GarbageShield.cs
@@ -11,6 +11,9 @@ namespace WulaFallenEmpire
public bool garbageShieldEnabled = false; // 通过XML配置启用/禁用
public string garbageShieldUIEventDefName; // 垃圾屏蔽触发时弹出的UI事件defName
+ // 新增:配置是否检查不可交易物品
+ public bool checkNonTradableItems = false;
+
public CompProperties_GarbageShield()
{
this.compClass = typeof(CompGarbageShield);
@@ -30,7 +33,7 @@ namespace WulaFallenEmpire
if (!GarbageShieldEnabled) return false;
// 检查是否是殖民者
- if (thing is Pawn pawn && pawn.IsColonist)
+ if (thing is Pawn pawn)
return true;
// 检查是否是尸体
@@ -41,6 +44,10 @@ namespace WulaFallenEmpire
if (IsToxicWaste(thing))
return true;
+ // 新增:检查不可交易物品(如果配置启用)
+ if (Props.checkNonTradableItems && IsNonTradableItem(thing))
+ return true;
+
return false;
}
@@ -69,6 +76,13 @@ namespace WulaFallenEmpire
return thing.def == ThingDefOf.Wastepack;
}
+ // 新增:判断是否为不可交易物品
+ private bool IsNonTradableItem(Thing thing)
+ {
+ // 检查 tradeability 是否为 None
+ return thing.def.tradeability == Tradeability.None;
+ }
+
// 处理垃圾屏蔽触发并触发UI事件
public void ProcessGarbageShieldTrigger(List forbiddenItems)
{
diff --git a/Source/WulaFallenEmpire/GlobalWorkTable/WULA_Launchable_ToGlobalStorage/CompProperties_Launchable_ToGlobalStorage.cs b/Source/WulaFallenEmpire/GlobalWorkTable/WULA_Launchable_ToGlobalStorage/CompProperties_Launchable_ToGlobalStorage.cs
index 24dc1f5e..6c8d72a0 100644
--- a/Source/WulaFallenEmpire/GlobalWorkTable/WULA_Launchable_ToGlobalStorage/CompProperties_Launchable_ToGlobalStorage.cs
+++ b/Source/WulaFallenEmpire/GlobalWorkTable/WULA_Launchable_ToGlobalStorage/CompProperties_Launchable_ToGlobalStorage.cs
@@ -11,6 +11,8 @@ namespace WulaFallenEmpire
// 垃圾屏蔽配置 - 通过XML控制
public bool garbageShieldEnabled = false;
public string garbageShieldUIEventDefName = "Wula_UI_Legion_Reply_1";
+ // 新增:明确不检查不可交易物品
+ public bool checkNonTradableItems = false; // Launchable_ToGlobalStorage 不需要检查不可交易物品
public CompProperties_Launchable_ToGlobalStorage()
{
diff --git a/Source/WulaFallenEmpire/GlobalWorkTable/WULA_ValueConverter/CompProperties_ValueConverter.cs b/Source/WulaFallenEmpire/GlobalWorkTable/WULA_ValueConverter/CompProperties_ValueConverter.cs
index 49349226..e8d92ff6 100644
--- a/Source/WulaFallenEmpire/GlobalWorkTable/WULA_ValueConverter/CompProperties_ValueConverter.cs
+++ b/Source/WulaFallenEmpire/GlobalWorkTable/WULA_ValueConverter/CompProperties_ValueConverter.cs
@@ -3,16 +3,16 @@ using Verse;
namespace WulaFallenEmpire
{
- public class CompProperties_ValueConverter : CompProperties
+ public class CompProperties_ValueConverter : CompProperties_Launchable_TransportPod
{
- public float conversionRate = 1.0f; // 价值转换倍率
- public ThingDef outputThingDef = null; // 输出物品定义,默认为白银
- public bool destroyAfterConversion = true; // 转换后是否销毁建筑
+ public float conversionRatio = 0.5f; // 默认50%的转换比例
+ public ThingDef targetCurrency = ThingDefOf.Silver; // 目标货币,默认为白银
+
+ // 新增:垃圾屏蔽配置 - 专门为价值转换器配置
+ public bool garbageShieldEnabled = true; // 默认启用垃圾屏蔽
+ public string garbageShieldUIEventDefName = "Wula_UI_Legion_Reply_1"; // 默认UI事件
+ public bool checkNonTradableItems = true; // 专门为价值转换器启用不可交易物品检查
- // 垃圾屏蔽配置
- public bool garbageShieldEnabled = false;
- public string garbageShieldUIEventDefName = "Wula_UI_Legion_Reply_1";
-
public CompProperties_ValueConverter()
{
this.compClass = typeof(CompValueConverter);
diff --git a/Source/WulaFallenEmpire/GlobalWorkTable/WULA_ValueConverter/CompValueConverter.cs b/Source/WulaFallenEmpire/GlobalWorkTable/WULA_ValueConverter/CompValueConverter.cs
index d48bf631..24f6edab 100644
--- a/Source/WulaFallenEmpire/GlobalWorkTable/WULA_ValueConverter/CompValueConverter.cs
+++ b/Source/WulaFallenEmpire/GlobalWorkTable/WULA_ValueConverter/CompValueConverter.cs
@@ -1,157 +1,316 @@
using RimWorld;
using System.Collections.Generic;
+using System.Text;
using UnityEngine;
using Verse;
using Verse.Sound;
-using System.Text;
-using System.Linq;
using RimWorld.Planet;
-
namespace WulaFallenEmpire
{
public class CompValueConverter : CompLaunchable_TransportPod
{
public new CompProperties_ValueConverter Props => (CompProperties_ValueConverter)this.props;
-
- // 获取垃圾屏蔽组件
public CompGarbageShield GarbageShieldComp => this.parent.GetComp();
-
- // 获取容器组件
- public new CompTransporter Transporter => this.parent.GetComp();
+
+ // 新增:专门为价值转换器检查禁止物品
+ public List GetForbiddenItemsForConverter(ThingOwner container)
+ {
+ List forbiddenItems = new List();
+
+ // 如果配置了专门的垃圾屏蔽组件,使用它
+ if (GarbageShieldComp != null && GarbageShieldComp.GarbageShieldEnabled)
+ {
+ forbiddenItems.AddRange(GarbageShieldComp.GetForbiddenItems(container));
+ }
+ else
+ {
+ // 否则使用价值转换器自己的配置
+ forbiddenItems.AddRange(GetForbiddenItemsByConverterConfig(container));
+ }
+
+ return forbiddenItems;
+ }
+
+ // 新增:根据价值转换器配置检查禁止物品
+ private List GetForbiddenItemsByConverterConfig(ThingOwner container)
+ {
+ List forbiddenItems = new List();
+
+ if (!Props.garbageShieldEnabled) return forbiddenItems;
+
+ foreach (Thing item in container)
+ {
+ if (IsForbiddenItemByConverterConfig(item))
+ {
+ forbiddenItems.Add(item);
+ }
+ }
+
+ return forbiddenItems;
+ }
+
+ // 新增:根据价值转换器配置判断是否为禁止物品
+ private bool IsForbiddenItemByConverterConfig(Thing thing)
+ {
+ // 检查是否是殖民者
+ if (thing is Pawn pawn)
+ return true;
+
+ // 检查是否是尸体
+ if (thing.def.IsCorpse)
+ return true;
+
+ // 检查是否是有毒垃圾
+ if (IsToxicWaste(thing))
+ return true;
+
+ // 检查不可交易物品(价值转换器专用)
+ if (Props.checkNonTradableItems && IsNonTradableItem(thing))
+ return true;
+
+ return false;
+ }
+
+ // 新增:判断是否为有毒垃圾
+ private bool IsToxicWaste(Thing thing)
+ {
+ return thing.def == ThingDefOf.Wastepack;
+ }
+
+ // 新增:判断是否为不可交易物品
+ private bool IsNonTradableItem(Thing thing)
+ {
+ return thing.def.tradeability == Tradeability.None;
+ }
public override IEnumerable CompGetGizmosExtra()
{
- // 首先处理基类的Gizmo,但过滤掉原版的发射按钮
+ // 移除原有的发射按钮,替换为我们自己的价值转换按钮
foreach (Gizmo gizmo in base.CompGetGizmosExtra())
{
- // 跳过原版的发射按钮
if (gizmo is Command_Action launchCommand &&
(launchCommand.defaultDesc == "CommandLaunchGroupDesc".Translate() ||
launchCommand.defaultDesc == "CommandLaunchSingleDesc".Translate()))
{
- continue;
+ continue; // 跳过原版的发射按钮
}
yield return gizmo;
}
- // 添加我们的转换按钮
- if (Transporter != null && Transporter.innerContainer.Any)
+ if (this.Transporter.LoadingInProgressOrReadyToLaunch)
{
Command_Action command = new Command_Action();
- command.defaultLabel = "WULA_ConvertToSilver".Translate();
- command.defaultDesc = "WULA_ConvertToSilverDesc".Translate(Props.conversionRate.ToStringPercent());
- command.icon = ContentFinder.Get("UI/Commands/ConvertToSilver");
+ command.defaultLabel = "WULA_ConvertToCurrency".Translate();
+ command.defaultDesc = GetConversionDescription();
+ command.icon = ContentFinder.Get("UI/Commands/LaunchShip");
command.action = delegate
{
- this.TryLaunchToSilver();
+ this.ConvertToCurrency();
};
- // 添加禁用状态检查
- if (!CanConvert())
+ // 禁用条件检查
+ string disableReason;
+ if (!CanConvert(out disableReason))
{
- command.Disable("WULA_CannotConvert".Translate());
+ command.Disable(disableReason);
}
-
+
yield return command;
}
}
///
- /// 检查是否可以执行转换
+ /// 获取转换描述信息
///
- private bool CanConvert()
+ private string GetConversionDescription()
{
- if (Transporter == null || !Transporter.innerContainer.Any)
- return false;
-
- // 检查垃圾屏蔽
- if (GarbageShieldComp != null && GarbageShieldComp.GarbageShieldEnabled)
+ try
{
- List forbiddenItems = GarbageShieldComp.GetForbiddenItems(Transporter.innerContainer);
- if (forbiddenItems.Count > 0)
- return false;
+ StringBuilder sb = new StringBuilder();
+
+ // 安全地获取目标货币标签
+ string targetCurrencyLabel = "Unknown Currency";
+ if (Props?.targetCurrency != null)
+ {
+ targetCurrencyLabel = Props.targetCurrency.LabelCap;
+ }
+
+ sb.AppendLine("WULA_ConvertToCurrencyDesc".Translate(targetCurrencyLabel, (Props.conversionRatio * 100f).ToString("F0")));
+
+ // 显示当前物品总价值和预计转换结果
+ float totalValue = CalculateTotalValue();
+ float convertedValue = totalValue * Props.conversionRatio;
+
+ // 显示物品列表
+ var items = GetItemList();
+ if (items.Count > 0)
+ {
+ sb.AppendLine();
+ sb.AppendLine("WULA_ContainedItems".Translate());
+ foreach (Thing item in items)
+ {
+ sb.AppendLine(" - " + item.LabelCap + " x" + item.stackCount);
+ }
+ }
+
+ return sb.ToString();
+ }
+ catch (System.Exception ex)
+ {
+ Log.Error($"[WULA ValueConverter] Error in GetConversionDescription: {ex}");
+ return "WULA_ConversionDescriptionError".Translate();
+ }
+ }
+
+ ///
+ /// 检查是否可以转换
+ ///
+ private bool CanConvert(out string reason)
+ {
+ reason = null;
+
+ if (!this.parent.Spawned)
+ {
+ reason = "WULA_ConverterNotSpawned".Translate();
+ return false;
+ }
+
+ CompTransporter transporter = this.Transporter;
+ if (transporter == null || !transporter.innerContainer.Any)
+ {
+ reason = "WULA_NoItemsToConvert".Translate();
+ return false;
+ }
+
+ // 检查基类的发射条件(燃料、冷却时间等)
+ var baseResult = base.CanLaunch(null);
+ if (!baseResult.Accepted)
+ {
+ reason = baseResult.Reason;
+ return false;
}
return true;
}
///
- /// 将物品价值转换为白银
+ /// 转换为货币
///
- public void TryLaunchToSilver()
+ public void ConvertToCurrency()
{
+ CompTransporter transporter = this.Transporter;
+ var globalStorage = Find.World.GetComponent();
+
+ // 检查垃圾屏蔽 - 使用价值转换器专用的检查方法
+ List forbiddenItems = GetForbiddenItemsForConverter(transporter.innerContainer);
+ if (forbiddenItems.Count > 0)
+ {
+ // 显示取消发射消息
+ StringBuilder forbiddenList = new StringBuilder();
+ foreach (Thing item in forbiddenItems)
+ {
+ if (forbiddenList.Length > 0) forbiddenList.Append(", ");
+ forbiddenList.Append($"{item.LabelCap} x{item.stackCount}");
+ }
+
+ Messages.Message("WULA_LaunchCancelledDueToForbiddenItems".Translate(forbiddenList.ToString()),
+ this.parent, MessageTypeDefOf.RejectInput);
+
+ // 触发垃圾屏蔽UI事件
+ ProcessGarbageShieldTriggerForConverter(forbiddenItems);
+
+ return; // 取消发射
+ }
+
if (!this.parent.Spawned)
{
- Log.Error("Tried to convert value from " + this.parent + " but it's not spawned.");
+ Log.Error("Tried to convert " + this.parent + " but it's not spawned.");
return;
}
- var globalStorage = Find.World.GetComponent();
- if (globalStorage == null)
- {
- Log.Error("Could not find GlobalStorageWorldComponent.");
- return;
- }
-
- if (Transporter == null || !Transporter.innerContainer.Any)
+ if (transporter == null || !transporter.innerContainer.Any)
{
Messages.Message("WULA_NoItemsToConvert".Translate(), this.parent, MessageTypeDefOf.RejectInput);
return;
}
- // 检查垃圾屏蔽
- if (GarbageShieldComp != null && GarbageShieldComp.GarbageShieldEnabled)
- {
- List forbiddenItems = GarbageShieldComp.GetForbiddenItems(Transporter.innerContainer);
- if (forbiddenItems.Count > 0)
- {
- StringBuilder forbiddenList = new StringBuilder();
- foreach (Thing item in forbiddenItems)
- {
- if (forbiddenList.Length > 0) forbiddenList.Append(", ");
- forbiddenList.Append($"{item.LabelCap} x{item.stackCount}");
- }
-
- Messages.Message("WULA_ConversionCancelledDueToForbiddenItems".Translate(forbiddenList.ToString()),
- this.parent, MessageTypeDefOf.RejectInput);
-
- GarbageShieldComp.ProcessGarbageShieldTrigger(forbiddenItems);
- return;
- }
- }
-
- // 计算总价值
+ // 1. 计算总价值并生成白银
float totalValue = CalculateTotalValue();
- if (totalValue <= 0)
- {
- Messages.Message("WULA_NoValuableItems".Translate(), this.parent, MessageTypeDefOf.RejectInput);
- return;
- }
+ float convertedValue = totalValue * Props.conversionRatio;
+ int silverAmount = Mathf.FloorToInt(convertedValue);
- // 应用转换倍率
- int silverAmount = CalculateSilverAmount(totalValue);
if (silverAmount <= 0)
{
- Messages.Message("WULA_ConversionValueTooLow".Translate(), this.parent, MessageTypeDefOf.RejectInput);
+ Messages.Message("WULA_ConvertedValueTooLow".Translate(), this.parent, MessageTypeDefOf.RejectInput);
return;
}
- // 执行转换
- PerformConversion(globalStorage, silverAmount, totalValue);
+ // 2. 将白银添加到全局存储的输入储存器
+ if (globalStorage != null)
+ {
+ globalStorage.AddToInputStorage(Props.targetCurrency, silverAmount);
+ }
+ else
+ {
+ Log.Error("Could not find GlobalStorageWorldComponent.");
+ return;
+ }
- // 调用基类的发射方法,让它处理动画和销毁
- // 注意:这里我们发射到当前地图的同一个位置,实际上只是利用发射动画
+ // 3. 统计转换的物品信息
+ StringBuilder convertedItems = new StringBuilder();
+ int itemCount = 0;
+ float originalTotalValue = 0f;
+
+ foreach (Thing item in transporter.innerContainer)
+ {
+ itemCount += item.stackCount;
+ originalTotalValue += item.MarketValue * item.stackCount;
+
+ if (convertedItems.Length > 0) convertedItems.Append(", ");
+ convertedItems.Append($"{item.LabelCap} x{item.stackCount}");
+ }
+
+ // 4. 清空容器
+ transporter.innerContainer.ClearAndDestroyContents();
+
+ // 5. 显示转换结果消息
+ string message = BuildConversionMessage(itemCount, originalTotalValue, silverAmount, convertedItems.ToString());
+ Messages.Message(message, this.parent, MessageTypeDefOf.PositiveEvent);
+
+ // 6. 调用基类的发射方法,处理动画和销毁
+ // 使用当前地图的tile作为目的地,arrivalAction为null
base.TryLaunch(this.parent.Map.Tile, null);
}
///
- /// 重写基类的TryLaunch方法,阻止原版发射逻辑
+ /// 新增:价值转换器专用的垃圾屏蔽触发处理
///
- public new void TryLaunch(PlanetTile destinationTile, TransportersArrivalAction arrivalAction)
+ private void ProcessGarbageShieldTriggerForConverter(List forbiddenItems)
{
- // 阻止原版发射逻辑,使用我们的转换逻辑
- TryLaunchToSilver();
+ if (forbiddenItems.Count > 0)
+ {
+ string uiEventDefName = Props.garbageShieldUIEventDefName;
+
+ // 如果配置了专门的垃圾屏蔽组件,使用它的UI事件配置
+ if (GarbageShieldComp != null && !string.IsNullOrEmpty(GarbageShieldComp.Props.garbageShieldUIEventDefName))
+ {
+ uiEventDefName = GarbageShieldComp.Props.garbageShieldUIEventDefName;
+ }
+
+ if (!string.IsNullOrEmpty(uiEventDefName))
+ {
+ EventDef uiDef = DefDatabase.GetNamed(uiEventDefName, false);
+ if (uiDef != null)
+ {
+ Find.WindowStack.Add(new Dialog_CustomDisplay(uiDef));
+ }
+ else
+ {
+ Log.Error($"[CompValueConverter] Could not find EventDef named '{uiEventDefName}'.");
+ }
+ }
+ }
}
///
@@ -160,145 +319,67 @@ namespace WulaFallenEmpire
private float CalculateTotalValue()
{
float totalValue = 0f;
-
- foreach (Thing item in Transporter.innerContainer)
+ CompTransporter transporter = this.Transporter;
+
+ if (transporter != null)
{
- // 计算单个物品的市场价值
- float itemValue = item.MarketValue * item.stackCount;
- totalValue += itemValue;
-
- if (Prefs.DevMode)
+ foreach (Thing item in transporter.innerContainer)
{
- Log.Message($"[ValueConverter] {item.LabelCap} x{item.stackCount}: {item.MarketValue} each, total: {itemValue}");
+ totalValue += item.MarketValue * item.stackCount;
}
}
-
- if (Prefs.DevMode)
- {
- Log.Message($"[ValueConverter] Total value before conversion: {totalValue}");
- }
+
return totalValue;
}
///
- /// 计算转换后的白银数量
+ /// 获取物品列表
///
- private int CalculateSilverAmount(float totalValue)
+ private List GetItemList()
{
- // 应用转换倍率
- float convertedValue = totalValue * Props.conversionRate;
-
- // 转换为白银(白银的市场价值为1)
- int silverAmount = Mathf.FloorToInt(convertedValue);
-
- if (Prefs.DevMode)
+ List items = new List();
+ CompTransporter transporter = this.Transporter;
+
+ if (transporter != null)
{
- Log.Message($"[ValueConverter] After conversion rate ({Props.conversionRate}): {convertedValue}, Silver amount: {silverAmount}");
+ foreach (Thing item in transporter.innerContainer)
+ {
+ items.Add(item);
+ }
}
-
- return silverAmount;
+
+ return items;
}
///
- /// 执行转换操作
+ /// 构建转换消息
///
- private void PerformConversion(GlobalStorageWorldComponent globalStorage, int silverAmount, float originalValue)
+ private string BuildConversionMessage(int itemCount, float originalValue, int silverAmount, string itemList)
{
- // 1. 将白银添加到全局存储器的输入端
- ThingDef silverDef = Props.outputThingDef ?? ThingDefOf.Silver;
- globalStorage.AddToInputStorage(silverDef, silverAmount);
-
- // 2. 显示转换结果消息
- ShowConversionMessage(silverAmount, originalValue);
-
- // 4. 清空容器
- Transporter.innerContainer.ClearAndDestroyContents();
-
- // 5. 如果配置为转换后销毁,则销毁建筑
- if (Props.destroyAfterConversion)
+ StringBuilder message = new StringBuilder();
+
+ message.Append("WULA_ConversionComplete".Translate(itemCount, originalValue.ToString("F2"), silverAmount, Props.targetCurrency?.LabelCap ?? "Unknown Currency"));
+
+ if (!string.IsNullOrEmpty(itemList))
{
- this.parent.Destroy(DestroyMode.Vanish);
+ message.Append("\n\n");
+ message.Append("WULA_ConvertedItems".Translate(itemList));
}
+
+ message.Append("\n\n");
+ message.Append("WULA_ConversionRatioApplied".Translate((Props.conversionRatio * 100f).ToString("F0")));
+
+ return message.ToString();
}
///
- /// 显示转换结果消息
+ /// 重写基类的发射方法,确保使用我们的逻辑
///
- private void ShowConversionMessage(int silverAmount, float originalValue)
+ public new void TryLaunch(PlanetTile destinationTile, TransportersArrivalAction arrivalAction)
{
- string message;
-
- if (Props.conversionRate < 1.0f)
- {
- message = "WULA_ValueConvertedWithLoss".Translate(
- originalValue.ToString("F0"),
- silverAmount,
- Props.conversionRate.ToStringPercent()
- );
- }
- else if (Props.conversionRate > 1.0f)
- {
- message = "WULA_ValueConvertedWithBonus".Translate(
- originalValue.ToString("F0"),
- silverAmount,
- Props.conversionRate.ToStringPercent()
- );
- }
- else
- {
- message = "WULA_ValueConverted".Translate(
- originalValue.ToString("F0"),
- silverAmount
- );
- }
-
- Messages.Message(message, this.parent, MessageTypeDefOf.PositiveEvent);
- }
-
- ///
- /// 获取转换效率描述(用于界面显示)
- ///
- public string GetConversionEfficiencyDescription()
- {
- StringBuilder sb = new StringBuilder();
-
- sb.AppendLine("WULA_ConversionEfficiency".Translate(Props.conversionRate.ToStringPercent()));
-
- if (Props.conversionRate < 1.0f)
- {
- sb.AppendLine("WULA_ConversionEfficiencyLoss".Translate());
- }
- else if (Props.conversionRate > 1.0f)
- {
- sb.AppendLine("WULA_ConversionEfficiencyBonus".Translate());
- }
- else
- {
- sb.AppendLine("WULA_ConversionEfficiencyNormal".Translate());
- }
-
- return sb.ToString();
- }
-
- ///
- /// 在检查器中显示转换信息
- ///
- public override string CompInspectStringExtra()
- {
- StringBuilder sb = new StringBuilder();
-
- if (Transporter != null && Transporter.innerContainer.Any)
- {
- // 显示容器内物品总价值
- float currentValue = CalculateTotalValue();
- int potentialSilver = CalculateSilverAmount(currentValue);
-
- sb.AppendLine("WULA_CurrentValueInContainer".Translate(currentValue.ToString("F0")));
- sb.AppendLine("WULA_PotentialSilver".Translate(potentialSilver));
- sb.AppendLine("WULA_ConversionRate".Translate(Props.conversionRate.ToStringPercent()));
- }
-
- return sb.ToString().TrimEndNewlines();
+ // 这个方法不应该被直接调用,应该使用ConvertToCurrency
+ Log.Warning("CompValueConverter.TryLaunch should not be called directly. Use ConvertToCurrency instead.");
+ ConvertToCurrency();
}
}
}
diff --git a/Source/WulaFallenEmpire/HarmonyPatches/ScenPart_PlayerPawnsArriveMethod_Patch.cs b/Source/WulaFallenEmpire/HarmonyPatches/ScenPart_PlayerPawnsArriveMethod_Patch.cs
new file mode 100644
index 00000000..52ead4c5
--- /dev/null
+++ b/Source/WulaFallenEmpire/HarmonyPatches/ScenPart_PlayerPawnsArriveMethod_Patch.cs
@@ -0,0 +1,94 @@
+using HarmonyLib;
+using RimWorld;
+using System.Collections.Generic;
+using System.Reflection;
+using Verse;
+namespace WulaFallenEmpire
+{
+ [HarmonyPatch(typeof(ScenPart_PlayerPawnsArriveMethod))]
+ [HarmonyPatch("DoDropPods")]
+ public static class ScenPart_PlayerPawnsArriveMethod_ReflectionPatch
+ {
+ ///
+ /// 使用反射来直接调用正确的方法
+ ///
+ [HarmonyPrefix]
+ public static bool Prefix(ScenPart_PlayerPawnsArriveMethod __instance, Map map, List startingItems)
+ {
+ try
+ {
+ // 获取私有字段 "method"
+ FieldInfo methodField = typeof(ScenPart_PlayerPawnsArriveMethod).GetField("method", BindingFlags.NonPublic | BindingFlags.Instance);
+ PlayerPawnsArriveMethod method = (PlayerPawnsArriveMethod)methodField.GetValue(__instance);
+ // 重新创建物品分组逻辑
+ List> thingGroups = new List>();
+
+ foreach (Pawn startingPawn in Find.GameInitData.startingAndOptionalPawns)
+ {
+ List pawnGroup = new List();
+ pawnGroup.Add(startingPawn);
+ thingGroups.Add(pawnGroup);
+ }
+ int itemIndex = 0;
+ foreach (Thing startingItem in startingItems)
+ {
+ if (startingItem.def.CanHaveFaction)
+ {
+ startingItem.SetFactionDirect(Faction.OfPlayer);
+ }
+ thingGroups[itemIndex].Add(startingItem);
+ itemIndex++;
+ if (itemIndex >= thingGroups.Count)
+ {
+ itemIndex = 0;
+ }
+ }
+ // 使用反射调用正确的 DropThingGroupsNear 方法(11个参数版本)
+ MethodInfo dropMethod = typeof(DropPodUtility).GetMethod("DropThingGroupsNear", new System.Type[]
+ {
+ typeof(IntVec3),
+ typeof(Map),
+ typeof(List>),
+ typeof(int),
+ typeof(bool),
+ typeof(bool),
+ typeof(bool),
+ typeof(bool),
+ typeof(bool),
+ typeof(bool),
+ typeof(Faction)
+ });
+ if (dropMethod != null)
+ {
+ dropMethod.Invoke(null, new object[]
+ {
+ MapGenerator.PlayerStartSpot,
+ map,
+ thingGroups,
+ 110,
+ Find.GameInitData.QuickStarted || method != PlayerPawnsArriveMethod.DropPods,
+ true, // leaveSlag
+ true, // canRoofPunch
+ true, // forbid
+ false, // allowFogged
+ false, // canTransfer
+ Faction.OfPlayer // faction
+ });
+ Log.Message("[WULA] Successfully called DropThingGroupsNear with faction parameter via reflection");
+ }
+ else
+ {
+ Log.Error("[WULA] Could not find 11-parameter DropThingGroupsNear method");
+ }
+ // 返回 false 来跳过原方法的执行
+ return false;
+ }
+ catch (System.Exception ex)
+ {
+ Log.Error($"[WULA] Error in DoDropPods prefix: {ex}");
+ // 如果出错,让原方法继续执行
+ return true;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/WulaFallenEmpire/HarmonyPatches/WulaSpeciesCorpsePatch.cs b/Source/WulaFallenEmpire/HarmonyPatches/WulaSpeciesCorpsePatch.cs
new file mode 100644
index 00000000..7d0de62f
--- /dev/null
+++ b/Source/WulaFallenEmpire/HarmonyPatches/WulaSpeciesCorpsePatch.cs
@@ -0,0 +1,84 @@
+using HarmonyLib;
+using RimWorld;
+using System.Collections.Generic;
+using System.Linq;
+using Verse;
+
+namespace WulaFallenEmpire
+{
+ [HarmonyPatch(typeof(ThingDefGenerator_Corpses))]
+ [HarmonyPatch("GenerateCorpseDef")]
+ public static class WulaSpeciesCorpsePatch
+ {
+ ///
+ /// 在生成尸体定义后,对 WulaSpecies 进行特殊处理
+ ///
+ [HarmonyPostfix]
+ public static void ModifyWulaSpeciesCorpse(ThingDef pawnDef, ref ThingDef __result)
+ {
+ // 检查是否是 WulaSpecies 种族
+ if (pawnDef?.defName == "WulaSpecies")
+ {
+ ApplyWulaSpeciesCorpseModifications(__result);
+ }
+ }
+
+ ///
+ /// 应用 WulaSpecies 尸体的特殊修改
+ ///
+ private static void ApplyWulaSpeciesCorpseModifications(ThingDef corpseDef)
+ {
+ if (corpseDef == null) return;
+
+ Log.Message($"[WulaSpecies] Starting corpse modification for WulaSpecies");
+
+ // 1. 移除腐烂组件(如果存在)
+ RemoveCompProperties(corpseDef, typeof(CompProperties_Rottable));
+
+ // 2. 移除污物生成组件(如果存在)
+ RemoveCompProperties(corpseDef, typeof(CompProperties_SpawnerFilth));
+
+ // 3. 修改可食用属性,设置为 NeverForNutrition
+ if (corpseDef.ingestible != null)
+ {
+ corpseDef.ingestible.preferability = FoodPreferability.NeverForNutrition;
+ Log.Message($"[WulaSpecies] Set ingestible preferability to NeverForNutrition");
+ }
+
+ // 4. 移除 HarbingerTreeConsumable 组件(如果存在)
+ RemoveCompProperties(corpseDef, typeof(CompProperties), "CompHarbingerTreeConsumable");
+
+ Log.Message($"[WulaSpecies] Completed corpse modification for WulaSpecies");
+ }
+
+ ///
+ /// 移除指定类型的组件属性
+ ///
+ private static void RemoveCompProperties(ThingDef thingDef, System.Type compType, string compClassName = null)
+ {
+ if (thingDef.comps == null) return;
+
+ var compsToRemove = new List();
+
+ foreach (var comp in thingDef.comps)
+ {
+ if (comp.GetType() == compType)
+ {
+ compsToRemove.Add(comp);
+ Log.Message($"[WulaSpecies] Found and will remove component: {comp.GetType().Name}");
+ }
+ else if (!string.IsNullOrEmpty(compClassName) && comp.compClass?.Name == compClassName)
+ {
+ compsToRemove.Add(comp);
+ Log.Message($"[WulaSpecies] Found and will remove component by class name: {compClassName}");
+ }
+ }
+
+ foreach (var comp in compsToRemove)
+ {
+ thingDef.comps.Remove(comp);
+ Log.Message($"[WulaSpecies] Removed component: {comp.GetType().Name}");
+ }
+ }
+ }
+}
diff --git a/Source/WulaFallenEmpire/Placeworker/CompProperties_CustomRadius.cs b/Source/WulaFallenEmpire/Placeworker/CompProperties_CustomRadius.cs
index 49c77dee..64f454cc 100644
--- a/Source/WulaFallenEmpire/Placeworker/CompProperties_CustomRadius.cs
+++ b/Source/WulaFallenEmpire/Placeworker/CompProperties_CustomRadius.cs
@@ -3,6 +3,7 @@ using UnityEngine;
using Verse;
using System.Collections.Generic;
using HarmonyLib;
+using RimWorld.Planet;
namespace WulaFallenEmpire
{
@@ -67,6 +68,10 @@ namespace WulaFallenEmpire
{
if (!Props.showInGUI) yield break;
+ // 只对玩家所有的物体显示Gizmo
+ if (parent.Faction != Faction.OfPlayer)
+ yield break;
+
// 创建切换 gizmo
Command_Toggle toggleCommand = new Command_Toggle();
toggleCommand.defaultLabel = Props.label;
@@ -98,6 +103,20 @@ namespace WulaFallenEmpire
{
return Props.color;
}
+
+ // 检查是否应该绘制半径
+ public bool ShouldDrawRadius()
+ {
+ // 只绘制玩家所有的物体
+ if (parent.Faction != Faction.OfPlayer)
+ return false;
+
+ // 检查是否在地图视图中(不在世界地图)
+ if (Find.CurrentMap == null || WorldRendererUtility.WorldRendered)
+ return false;
+
+ return RadiusVisible;
+ }
}
// 自定义放置工作器
@@ -105,11 +124,15 @@ namespace WulaFallenEmpire
{
public override void DrawGhost(ThingDef def, IntVec3 center, Rot4 rot, Color ghostCol, Thing thing = null)
{
+ // 检查是否在地图视图中
+ if (Find.CurrentMap == null || WorldRendererUtility.WorldRendered)
+ return;
+
// 如果已经有物体存在,则检查其组件的可见性设置
if (thing != null)
{
CompCustomRadius comp = thing.TryGetComp();
- if (comp == null || !comp.RadiusVisible)
+ if (comp == null || !comp.ShouldDrawRadius())
return;
}
@@ -178,15 +201,21 @@ namespace WulaFallenEmpire
{
try
{
- if (Find.CurrentMap == null) return;
+ // 检查是否在地图视图中(不在世界地图)
+ if (Find.CurrentMap == null || WorldRendererUtility.WorldRendered)
+ return;
// 绘制所有带有自定义半径组件的已放置建筑
foreach (var thing in Find.CurrentMap.listerThings.AllThings)
{
+ // 只绘制玩家所有的物体
+ if (thing.Faction != Faction.OfPlayer)
+ continue;
+
if (thing.Spawned && thing.def.HasComp(typeof(CompCustomRadius)))
{
CompCustomRadius comp = thing.TryGetComp();
- if (comp != null && comp.RadiusVisible)
+ if (comp != null && comp.ShouldDrawRadius())
{
float effectiveRadius = comp.EffectiveRadius;
if (effectiveRadius > 0f)
@@ -236,14 +265,22 @@ namespace WulaFallenEmpire
{
try
{
+ // 检查是否在地图视图中(不在世界地图)
+ if (Find.CurrentMap == null || WorldRendererUtility.WorldRendered)
+ return;
+
if (Find.Selector == null) return;
foreach (object selected in Find.Selector.SelectedObjectsListForReading)
{
if (selected is Thing thing && thing.Spawned && thing.def.HasComp(typeof(CompCustomRadius)))
{
+ // 只绘制玩家所有的物体
+ if (thing.Faction != Faction.OfPlayer)
+ continue;
+
CompCustomRadius comp = thing.TryGetComp();
- if (comp != null && comp.RadiusVisible)
+ if (comp != null && comp.ShouldDrawRadius())
{
float effectiveRadius = comp.EffectiveRadius;
if (effectiveRadius > 0f)
diff --git a/Source/WulaFallenEmpire/ThingComp/CompUseEffect_OpenCustomUI.cs b/Source/WulaFallenEmpire/ThingComp/CompUseEffect_OpenCustomUI.cs
new file mode 100644
index 00000000..f4754cb0
--- /dev/null
+++ b/Source/WulaFallenEmpire/ThingComp/CompUseEffect_OpenCustomUI.cs
@@ -0,0 +1,73 @@
+using RimWorld;
+using System;
+using Verse;
+
+namespace WulaFallenEmpire
+{
+ public class CompProperties_UseEffect_OpenCustomUI : CompProperties_UseEffect
+ {
+ public string uiDefName; // 要打开的UI的EventDef名称
+ public bool requireFactionPlayer = true; // 是否要求玩家派系才能使用
+
+ public CompProperties_UseEffect_OpenCustomUI()
+ {
+ this.compClass = typeof(CompUseEffect_OpenCustomUI);
+ }
+ }
+
+ public class CompUseEffect_OpenCustomUI : CompUseEffect
+ {
+ public CompProperties_UseEffect_OpenCustomUI Props => (CompProperties_UseEffect_OpenCustomUI)this.props;
+
+ public override void DoEffect(Pawn usedBy)
+ {
+ base.DoEffect(usedBy);
+
+ try
+ {
+ // 查找对应的EventDef
+ EventDef uiDef = DefDatabase.GetNamed(Props.uiDefName, false);
+ if (uiDef != null)
+ {
+ // 创建并打开自定义UI窗口
+ Window window = (Window)Activator.CreateInstance(uiDef.windowType, uiDef);
+ Find.WindowStack.Add(window);
+
+ Log.Message($"[CompUseEffect] Opened custom UI: {Props.uiDefName}");
+ }
+ else
+ {
+ Log.Error($"[CompUseEffect] Could not find EventDef named '{Props.uiDefName}'");
+ Messages.Message($"Error: Could not find UI definition '{Props.uiDefName}'", MessageTypeDefOf.RejectInput);
+ }
+ }
+ catch (Exception ex)
+ {
+ Log.Error($"[CompUseEffect] Error opening custom UI '{Props.uiDefName}': {ex}");
+ Messages.Message($"Error opening UI: {ex.Message}", MessageTypeDefOf.RejectInput);
+ }
+ }
+
+ public override AcceptanceReport CanBeUsedBy(Pawn p)
+ {
+ // 基础检查
+ AcceptanceReport baseResult = base.CanBeUsedBy(p);
+ if (!baseResult.Accepted)
+ return baseResult;
+
+ // 检查派系要求
+ if (Props.requireFactionPlayer && parent.Faction != Faction.OfPlayer)
+ {
+ return "Must be player faction to use this".Translate();
+ }
+
+ // 检查EventDef是否存在
+ if (DefDatabase.GetNamed(Props.uiDefName, false) == null)
+ {
+ return $"UI definition '{Props.uiDefName}' not found".Translate();
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/Source/WulaFallenEmpire/ThingComp/WULA_PersonaCore/CompExperienceCore.cs b/Source/WulaFallenEmpire/ThingComp/WULA_PersonaCore/CompExperienceCore.cs
index bdf1eff2..8197f635 100644
--- a/Source/WulaFallenEmpire/ThingComp/WULA_PersonaCore/CompExperienceCore.cs
+++ b/Source/WulaFallenEmpire/ThingComp/WULA_PersonaCore/CompExperienceCore.cs
@@ -76,8 +76,6 @@ namespace WulaFallenEmpire
// 如果武器已经有品质,使用现有品质,否则设置为Normal
currentQuality = qualityComp.Quality;
initialized = true;
-
- Log.Message($"[ExperienceCore] Initialized {parent.Label} with quality: {currentQuality}");
}
}
@@ -149,8 +147,6 @@ namespace WulaFallenEmpire
ResetWeaponState(retainedExperience);
Messages.Message("WULA_DataPackEjected".Translate(experienceToStore.ToString("F0")), parent, MessageTypeDefOf.PositiveEvent);
-
- Log.Message($"[ExperienceCore] Ejected data pack with {experienceToStore} experience, retained {retainedExperience}");
}
else
{
@@ -208,8 +204,6 @@ namespace WulaFallenEmpire
ProcessRemainingExperience(dataPacks, remainingExperience);
// 发送消息 - 修复阵营检查
SendAbsorptionMessage(actualExperienceToAbsorb, remainingExperience);
-
- Log.Message($"[ExperienceCore] {parent.Label} absorbed {actualExperienceToAbsorb} experience, remaining: {remainingExperience}, current: {currentExperience}");
}
// 处理剩余的经验 - 更新现有数据包
private void ProcessRemainingExperience(List dataPacks, float remainingExperience)
@@ -346,8 +340,6 @@ namespace WulaFallenEmpire
}
}
}
-
- Log.Message($"[ExperienceCore] Found {foundDataPacks.Count} data packs within {Props.absorbRadius} tiles");
return foundDataPacks;
}
@@ -377,8 +369,6 @@ namespace WulaFallenEmpire
{
qualityComp.SetQuality(currentQuality, ArtGenerationContext.Outsider);
}
-
- Log.Message($"[ExperienceCore] {parent.Label} reset from {oldTotalExperience} total experience to {currentExperience} + {overflowExperience} overflow");
}
public override void Notify_Equipped(Pawn pawn)
@@ -394,7 +384,6 @@ namespace WulaFallenEmpire
if (skill != null)
{
lastSkillExperience = skill.XpTotalEarned;
- Log.Message($"[ExperienceCore] {parent.Label} equipped by {pawn.Name}, tracking {Props.trackedSkill.defName}, starting experience: {lastSkillExperience}");
}
}
}
@@ -405,8 +394,6 @@ namespace WulaFallenEmpire
equippedPawn = null;
lastSkillExperience = 0f;
-
- Log.Message($"[ExperienceCore] {parent.Label} unequipped from {pawn.Name}");
}
public override void CompTick()
@@ -460,8 +447,6 @@ namespace WulaFallenEmpire
}
}
- Log.Message($"[ExperienceCore] {parent.Label} gained {actualGained:F1} experience (current: {currentExperience:F1}, overflow: {overflowExperience:F1})");
-
// 检查品质升级
CheckForQualityUpgrade();
@@ -490,7 +475,6 @@ namespace WulaFallenEmpire
if (qualityComp != null)
{
qualityComp.SetQuality(threshold.quality, ArtGenerationContext.Outsider);
- Log.Message($"[ExperienceCore] SUCCESS: {parent.Label} quality updated to {threshold.quality}");
}
else
{
@@ -513,8 +497,6 @@ namespace WulaFallenEmpire
Messages.Message(messageText, parent, MessageTypeDefOf.PositiveEvent);
}
-
- Log.Message($"[ExperienceCore] {parent.Label} upgraded from {oldQuality} to {threshold.quality} at {currentExperience} experience");
}
public override string CompInspectStringExtra()
{
@@ -626,7 +608,6 @@ namespace WulaFallenEmpire
if (qualityComp != null && qualityComp.Quality != currentQuality)
{
qualityComp.SetQuality(currentQuality, ArtGenerationContext.Outsider);
- Log.Message($"[ExperienceCore] PostLoad: Updated {parent.Label} quality to {currentQuality}");
}
}
}
diff --git a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj
index b22f59c6..fa986bdc 100644
--- a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj
+++ b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj
@@ -187,6 +187,8 @@
+
+
@@ -269,6 +271,7 @@
+
diff --git a/美术与文本源文件/Wula/Apparel/WULA_Maid_Uniform_Thin_south.sai2 b/美术与文本源文件/Wula/Apparel/WULA_Maid_Uniform_Thin_south.sai2
index 54be1470..a5380bf2 100644
Binary files a/美术与文本源文件/Wula/Apparel/WULA_Maid_Uniform_Thin_south.sai2 and b/美术与文本源文件/Wula/Apparel/WULA_Maid_Uniform_Thin_south.sai2 differ
diff --git a/美术与文本源文件/Wula/Building/WULA_GlobalStorageSenderPod.sai2 b/美术与文本源文件/Wula/Building/WULA_GlobalStorageSenderPod.sai2
new file mode 100644
index 00000000..2f612566
Binary files /dev/null and b/美术与文本源文件/Wula/Building/WULA_GlobalStorageSenderPod.sai2 differ
diff --git a/美术与文本源文件/Wula/Item/WULA_Safe_Box_For_Mission.sai2 b/美术与文本源文件/Wula/Item/WULA_Safe_Box_For_Mission.sai2
new file mode 100644
index 00000000..715550f5
Binary files /dev/null and b/美术与文本源文件/Wula/Item/WULA_Safe_Box_For_Mission.sai2 differ
diff --git a/美术与文本源文件/Wula/Plant/WULA_Plant_Eggplant.sai2 b/美术与文本源文件/Wula/Plant/WULA_Plant_Eggplant.sai2
new file mode 100644
index 00000000..e6ae151b
Binary files /dev/null and b/美术与文本源文件/Wula/Plant/WULA_Plant_Eggplant.sai2 differ
diff --git a/美术与文本源文件/Wula/Plant/WULA_Plant_Eggplant_Immature.sai2 b/美术与文本源文件/Wula/Plant/WULA_Plant_Eggplant_Immature.sai2
new file mode 100644
index 00000000..f59f89b0
Binary files /dev/null and b/美术与文本源文件/Wula/Plant/WULA_Plant_Eggplant_Immature.sai2 differ
diff --git a/美术与文本源文件/Wula/UI/Commands/WULA_AirdropProducts.sai2 b/美术与文本源文件/Wula/UI/Commands/WULA_AirdropProducts.sai2
index f4f680a3..056abc60 100644
Binary files a/美术与文本源文件/Wula/UI/Commands/WULA_AirdropProducts.sai2 and b/美术与文本源文件/Wula/UI/Commands/WULA_AirdropProducts.sai2 differ