普通的修理包
This commit is contained in:
Binary file not shown.
71
1.6/Defs/ThingDefs/WULA_Items_Exotic.xml
Normal file
71
1.6/Defs/ThingDefs/WULA_Items_Exotic.xml
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<Defs>
|
||||||
|
|
||||||
|
<ThingDef ParentName="MechSerumBase">
|
||||||
|
<defName>WULA_MechRepairKit</defName>
|
||||||
|
<label>机械乌拉修理套件</label>
|
||||||
|
<description>一种一次性使用的堕落乌拉帝国修理套件,专门用来完全修复机械乌拉。</description>
|
||||||
|
<graphicData>
|
||||||
|
<texPath>Things/Item/Special/MechSerumHealer</texPath> <!-- Using original texture for now -->
|
||||||
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
|
</graphicData>
|
||||||
|
<stackLimit>10</stackLimit>
|
||||||
|
<statBases>
|
||||||
|
<MarketValue>1500</MarketValue> <!-- Slightly higher value -->
|
||||||
|
</statBases>
|
||||||
|
<thingCategories>
|
||||||
|
<li>Drugs</li>
|
||||||
|
</thingCategories>
|
||||||
|
<tradeability>Sellable</tradeability>
|
||||||
|
<comps>
|
||||||
|
<li Class="CompProperties_UseEffect">
|
||||||
|
<compClass>WulaFallenEmpire.CompUseEffect_FixAllHealthConditions</compClass>
|
||||||
|
</li>
|
||||||
|
<li Class="CompProperties_UseEffectPlaySound">
|
||||||
|
<soundOnUsed>MechSerumUsed</soundOnUsed>
|
||||||
|
</li>
|
||||||
|
<li Class="CompProperties_UseEffectDestroySelf" />
|
||||||
|
</comps>
|
||||||
|
<thingSetMakerTags>
|
||||||
|
<li>RewardStandardCore</li>
|
||||||
|
</thingSetMakerTags>
|
||||||
|
</ThingDef>
|
||||||
|
|
||||||
|
<RecipeDef>
|
||||||
|
<defName>AdministerWULA_MechRepairKit</defName>
|
||||||
|
<label>施用机械乌拉修理套件</label>
|
||||||
|
<description>施用一个机械乌拉修理套件,修复乌拉族目标的所有健康状况。</description>
|
||||||
|
<workerClass>WulaFallenEmpire.Recipe_AdministerWulaMechRepairKit</workerClass> <!-- 更改为自定义的 RecipeWorker -->
|
||||||
|
<jobString>正在施用机械乌拉修理套件。</jobString>
|
||||||
|
<workAmount>2500</workAmount> <!-- 增加工作量以适应手术 -->
|
||||||
|
<workSkill>Medicine</workSkill> <!-- 需要医疗技能 -->
|
||||||
|
<skillRequirements>
|
||||||
|
<Medicine>6</Medicine> <!-- 示例:需要医疗技能等级 6 -->
|
||||||
|
</skillRequirements>
|
||||||
|
<recipeUsers>
|
||||||
|
<li>WulaSpecies</li> <!-- 只能在乌拉族上执行 -->
|
||||||
|
</recipeUsers>
|
||||||
|
<targetsBodyPart>false</targetsBodyPart> <!-- 仍然作用于整个小人 -->
|
||||||
|
<anesthetize>false</anesthetize> <!-- 不需要麻醉 -->
|
||||||
|
<dontShowIfAnyIngredientMissing>true</dontShowIfAnyIngredientMissing>
|
||||||
|
<!-- 此处无需特定的 surgeryOutcomeEffect,因为物品的 CompUseEffect 处理实际治疗 -->
|
||||||
|
<ingredients>
|
||||||
|
<li>
|
||||||
|
<filter>
|
||||||
|
<thingDefs>
|
||||||
|
<li>WULA_MechRepairKit</li>
|
||||||
|
</thingDefs>
|
||||||
|
</filter>
|
||||||
|
<count>1</count>
|
||||||
|
</li>
|
||||||
|
</ingredients>
|
||||||
|
<fixedIngredientFilter>
|
||||||
|
<thingDefs>
|
||||||
|
<li>WULA_MechRepairKit</li>
|
||||||
|
</thingDefs>
|
||||||
|
</fixedIngredientFilter>
|
||||||
|
<!-- 可选:添加研究前置 -->
|
||||||
|
<!-- <researchPrerequisite>ComplexMedicines</researchPrerequisite> -->
|
||||||
|
</RecipeDef>
|
||||||
|
|
||||||
|
</Defs>
|
||||||
@@ -486,29 +486,29 @@
|
|||||||
<li>EMP</li>
|
<li>EMP</li>
|
||||||
</adaptableDamageDefs>
|
</adaptableDamageDefs>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li MayRequire="Nals.FacialAnimation">
|
||||||
<compClass MayRequire="Nals.FacialAnimation">FacialAnimation.DrawFaceGraphicsComp</compClass>
|
<compClass>FacialAnimation.DrawFaceGraphicsComp</compClass>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li MayRequire="Nals.FacialAnimation">
|
||||||
<compClass MayRequire="Nals.FacialAnimation">FacialAnimation.HeadControllerComp</compClass>
|
<compClass>FacialAnimation.HeadControllerComp</compClass>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li MayRequire="Nals.FacialAnimation">
|
||||||
<compClass MayRequire="Nals.FacialAnimation">FacialAnimation.EyeballControllerComp</compClass>
|
<compClass>FacialAnimation.EyeballControllerComp</compClass>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li MayRequire="Nals.FacialAnimation">
|
||||||
<compClass MayRequire="Nals.FacialAnimation">FacialAnimation.LidControllerComp</compClass>
|
<compClass>FacialAnimation.LidControllerComp</compClass>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li MayRequire="Nals.FacialAnimation">
|
||||||
<compClass MayRequire="Nals.FacialAnimation">FacialAnimation.BrowControllerComp</compClass>
|
<compClass>FacialAnimation.BrowControllerComp</compClass>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li MayRequire="Nals.FacialAnimation">
|
||||||
<compClass MayRequire="Nals.FacialAnimation">FacialAnimation.MouthControllerComp</compClass>
|
<compClass>FacialAnimation.MouthControllerComp</compClass>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li MayRequire="Nals.FacialAnimation">
|
||||||
<compClass MayRequire="Nals.FacialAnimation">FacialAnimation.SkinControllerComp</compClass>
|
<compClass>FacialAnimation.SkinControllerComp</compClass>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li MayRequire="Nals.FacialAnimation">
|
||||||
<compClass MayRequire="Nals.FacialAnimation">FacialAnimation.FacialAnimationControllerComp</compClass>
|
<compClass>FacialAnimation.FacialAnimationControllerComp</compClass>
|
||||||
</li>
|
</li>
|
||||||
<!--<li>
|
<!--<li>
|
||||||
<compClass>FacialAnimation.EmotionControllerComp</compClass>
|
<compClass>FacialAnimation.EmotionControllerComp</compClass>
|
||||||
|
|||||||
@@ -3,5 +3,9 @@
|
|||||||
|
|
||||||
<WULA_SkillTrainer_TargetSkillGained>{0}的{1}技能获得了经验。</WULA_SkillTrainer_TargetSkillGained>
|
<WULA_SkillTrainer_TargetSkillGained>{0}的{1}技能获得了经验。</WULA_SkillTrainer_TargetSkillGained>
|
||||||
<WULA_SkillTrainer_SkillLoss>{0}的{1}技能经验减少了。</WULA_SkillTrainer_SkillLoss>
|
<WULA_SkillTrainer_SkillLoss>{0}的{1}技能经验减少了。</WULA_SkillTrainer_SkillLoss>
|
||||||
|
<WULA_MechSerumHealerAllFixed>{0}的健康状况已全部修复。</WULA_MechSerumHealerAllFixed>
|
||||||
|
<WULA_MechSerumHealerNoConditionsFixed>{0}没有可修复的健康状况。</WULA_MechSerumHealerNoConditionsFixed>
|
||||||
|
<WULA_MechSerumHealerNotWula>{0}不是机械乌拉,无法使用此修理套件。</WULA_MechSerumHealerNotWula>
|
||||||
|
<WULA_WulaMechRepairKit>机械乌拉修理套件</WULA_WulaMechRepairKit>
|
||||||
|
|
||||||
</LanguageData>
|
</LanguageData>
|
||||||
|
|||||||
Binary file not shown.
@@ -3,15 +3,19 @@
|
|||||||
"WorkspaceRootPath": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\",
|
"WorkspaceRootPath": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\",
|
||||||
"Documents": [
|
"Documents": [
|
||||||
{
|
{
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|c:\\steam\\steamapps\\common\\rimworld\\mods\\3516260226\\source\\wulafallenempire\\workgiver_warden_deliverenergy.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|c:\\steam\\steamapps\\common\\rimworld\\mods\\3516260226\\source\\wulafallenempire\\recipe_administerwulamechrepairkit.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||||
|
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:recipe_administerwulamechrepairkit.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\workgiver_warden_deliverenergy.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:workgiver_warden_deliverenergy.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:workgiver_warden_deliverenergy.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|c:\\steam\\steamapps\\common\\rimworld\\mods\\3516260226\\source\\wulafallenempire\\workgiverdefextension_feedwula.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\workgiverdefextension_feedwula.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:workgiverdefextension_feedwula.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:workgiverdefextension_feedwula.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|c:\\steam\\steamapps\\common\\rimworld\\mods\\3516260226\\source\\wulafallenempire\\compapparelinterceptor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\compapparelinterceptor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:compapparelinterceptor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:compapparelinterceptor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -50,24 +54,40 @@
|
|||||||
"DocumentGroups": [
|
"DocumentGroups": [
|
||||||
{
|
{
|
||||||
"DockedWidth": 200,
|
"DockedWidth": 200,
|
||||||
"SelectedChildIndex": 0,
|
"SelectedChildIndex": 1,
|
||||||
"Children": [
|
"Children": [
|
||||||
|
{
|
||||||
|
"$type": "Bookmark",
|
||||||
|
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 0,
|
"DocumentIndex": 0,
|
||||||
"Title": "WorkGiver_Warden_DeliverEnergy.cs",
|
"Title": "Recipe_AdministerWulaMechRepairKit.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\WorkGiver_Warden_DeliverEnergy.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Recipe_AdministerWulaMechRepairKit.cs",
|
||||||
"RelativeDocumentMoniker": "WorkGiver_Warden_DeliverEnergy.cs",
|
"RelativeDocumentMoniker": "Recipe_AdministerWulaMechRepairKit.cs",
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\WorkGiver_Warden_DeliverEnergy.cs",
|
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Recipe_AdministerWulaMechRepairKit.cs",
|
||||||
"RelativeToolTip": "WorkGiver_Warden_DeliverEnergy.cs",
|
"RelativeToolTip": "Recipe_AdministerWulaMechRepairKit.cs",
|
||||||
"ViewState": "AQIAAAoAAAAAAAAAAAAxwCsAAAALAAAA",
|
"ViewState": "AQIAAC8AAAAAAAAAAAAAAC8AAAAAAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
"WhenOpened": "2025-07-24T03:34:56.772Z",
|
"WhenOpened": "2025-07-24T05:09:33.389Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 1,
|
"DocumentIndex": 1,
|
||||||
|
"Title": "WorkGiver_Warden_DeliverEnergy.cs",
|
||||||
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\WorkGiver_Warden_DeliverEnergy.cs",
|
||||||
|
"RelativeDocumentMoniker": "WorkGiver_Warden_DeliverEnergy.cs",
|
||||||
|
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\WorkGiver_Warden_DeliverEnergy.cs",
|
||||||
|
"RelativeToolTip": "WorkGiver_Warden_DeliverEnergy.cs",
|
||||||
|
"ViewState": "AQIAAIYAAAAAAAAAAAAAACsAAABCAAAA",
|
||||||
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
|
"WhenOpened": "2025-07-24T03:34:56.772Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$type": "Document",
|
||||||
|
"DocumentIndex": 2,
|
||||||
"Title": "WorkGiverDefExtension_FeedWula.cs",
|
"Title": "WorkGiverDefExtension_FeedWula.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\WorkGiverDefExtension_FeedWula.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\WorkGiverDefExtension_FeedWula.cs",
|
||||||
"RelativeDocumentMoniker": "WorkGiverDefExtension_FeedWula.cs",
|
"RelativeDocumentMoniker": "WorkGiverDefExtension_FeedWula.cs",
|
||||||
@@ -75,16 +95,11 @@
|
|||||||
"RelativeToolTip": "WorkGiverDefExtension_FeedWula.cs",
|
"RelativeToolTip": "WorkGiverDefExtension_FeedWula.cs",
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAAAoAAAA",
|
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAAAoAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
"WhenOpened": "2025-07-24T03:32:18.303Z",
|
"WhenOpened": "2025-07-24T03:32:18.303Z"
|
||||||
"EditorCaption": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$type": "Bookmark",
|
|
||||||
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 2,
|
"DocumentIndex": 3,
|
||||||
"Title": "CompApparelInterceptor.cs",
|
"Title": "CompApparelInterceptor.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\CompApparelInterceptor.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\CompApparelInterceptor.cs",
|
||||||
"RelativeDocumentMoniker": "CompApparelInterceptor.cs",
|
"RelativeDocumentMoniker": "CompApparelInterceptor.cs",
|
||||||
@@ -92,12 +107,11 @@
|
|||||||
"RelativeToolTip": "CompApparelInterceptor.cs",
|
"RelativeToolTip": "CompApparelInterceptor.cs",
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAFQBAAAMAAAA",
|
"ViewState": "AQIAAAAAAAAAAAAAAAAAAFQBAAAMAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
"WhenOpened": "2025-07-23T10:03:31.989Z",
|
"WhenOpened": "2025-07-23T10:03:31.989Z"
|
||||||
"EditorCaption": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 3,
|
"DocumentIndex": 4,
|
||||||
"Title": "Projectile_Launch_Patch.cs",
|
"Title": "Projectile_Launch_Patch.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\HarmonyPatches\\Projectile_Launch_Patch.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\HarmonyPatches\\Projectile_Launch_Patch.cs",
|
||||||
"RelativeDocumentMoniker": "HarmonyPatches\\Projectile_Launch_Patch.cs",
|
"RelativeDocumentMoniker": "HarmonyPatches\\Projectile_Launch_Patch.cs",
|
||||||
@@ -109,7 +123,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 5,
|
"DocumentIndex": 6,
|
||||||
"Title": "IngestPatch.cs",
|
"Title": "IngestPatch.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\IngestPatch.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\IngestPatch.cs",
|
||||||
"RelativeDocumentMoniker": "IngestPatch.cs",
|
"RelativeDocumentMoniker": "IngestPatch.cs",
|
||||||
@@ -121,7 +135,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 4,
|
"DocumentIndex": 5,
|
||||||
"Title": "CompUseEffect_WulaSkillTrainer.cs",
|
"Title": "CompUseEffect_WulaSkillTrainer.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\CompUseEffect_WulaSkillTrainer.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\CompUseEffect_WulaSkillTrainer.cs",
|
||||||
"RelativeDocumentMoniker": "CompUseEffect_WulaSkillTrainer.cs",
|
"RelativeDocumentMoniker": "CompUseEffect_WulaSkillTrainer.cs",
|
||||||
@@ -133,7 +147,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 6,
|
"DocumentIndex": 7,
|
||||||
"Title": "Building_Wula_DarkEnergy_Engine.cs",
|
"Title": "Building_Wula_DarkEnergy_Engine.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Building_Wula_DarkEnergy_Engine.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Building_Wula_DarkEnergy_Engine.cs",
|
||||||
"RelativeDocumentMoniker": "Building_Wula_DarkEnergy_Engine.cs",
|
"RelativeDocumentMoniker": "Building_Wula_DarkEnergy_Engine.cs",
|
||||||
@@ -145,7 +159,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 7,
|
"DocumentIndex": 8,
|
||||||
"Title": "HediffComp_RegenerateBackstory.cs",
|
"Title": "HediffComp_RegenerateBackstory.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\HediffComp_RegenerateBackstory.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\HediffComp_RegenerateBackstory.cs",
|
||||||
"RelativeDocumentMoniker": "HediffComp_RegenerateBackstory.cs",
|
"RelativeDocumentMoniker": "HediffComp_RegenerateBackstory.cs",
|
||||||
@@ -157,7 +171,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 8,
|
"DocumentIndex": 9,
|
||||||
"Title": "WulaFallenEmpireMod.cs",
|
"Title": "WulaFallenEmpireMod.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\WulaFallenEmpireMod.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\WulaFallenEmpireMod.cs",
|
||||||
"RelativeDocumentMoniker": "WulaFallenEmpireMod.cs",
|
"RelativeDocumentMoniker": "WulaFallenEmpireMod.cs",
|
||||||
@@ -169,7 +183,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 9,
|
"DocumentIndex": 10,
|
||||||
"Title": "MechanitorPatch.cs",
|
"Title": "MechanitorPatch.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\MechanitorPatch.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\MechanitorPatch.cs",
|
||||||
"RelativeDocumentMoniker": "MechanitorPatch.cs",
|
"RelativeDocumentMoniker": "MechanitorPatch.cs",
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
using Verse;
|
||||||
|
using RimWorld;
|
||||||
|
using System.Collections.Generic; // Added for List
|
||||||
|
|
||||||
|
namespace WulaFallenEmpire
|
||||||
|
{
|
||||||
|
public class CompUseEffect_FixAllHealthConditions : CompUseEffect
|
||||||
|
{
|
||||||
|
public override AcceptanceReport CanBeUsedBy(Pawn p)
|
||||||
|
{
|
||||||
|
// 检查是否有可修复的健康状况。
|
||||||
|
// 注意:这里的 'p' 是尝试使用物品的小人(如果直接使用)或被施用物品的小人(如果通过配方施用)。
|
||||||
|
// 种族检查将在 DoEffect 中进行,以允许任何种族的小人尝试使用(但只有乌拉族会生效)。
|
||||||
|
if (!HealthUtility.TryGetWorstHealthCondition(p, out var _, out var _))
|
||||||
|
{
|
||||||
|
return "AbilityCannotCastNoHealableInjury".Translate(p.Named("PAWN")).Resolve().StripTags() ?? "";
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DoEffect(Pawn usedBy)
|
||||||
|
{
|
||||||
|
base.DoEffect(usedBy);
|
||||||
|
|
||||||
|
// 检查被施用物品的小人是否是乌拉族。
|
||||||
|
if (usedBy.def.defName != "WulaSpecies")
|
||||||
|
{
|
||||||
|
if (PawnUtility.ShouldSendNotificationAbout(usedBy))
|
||||||
|
{
|
||||||
|
Messages.Message("WULA_MechSerumHealerNotWula".Translate(usedBy.Named("PAWN")).Resolve().StripTags() ?? "", usedBy, MessageTypeDefOf.NegativeEvent);
|
||||||
|
}
|
||||||
|
return; // 如果不是乌拉族,则不执行修复。
|
||||||
|
}
|
||||||
|
|
||||||
|
int fixedCount = 0;
|
||||||
|
// List<Hediff> fixedHediffs = new List<Hediff>(); // 此行不再需要,因为我们只计数
|
||||||
|
|
||||||
|
// 持续修复最严重的健康状况,直到没有更多可修复的状况。
|
||||||
|
// HealthUtility.FixWorstHealthCondition 如果没有修复任何状况,会返回 null。
|
||||||
|
while (HealthUtility.TryGetWorstHealthCondition(usedBy, out var hediffToFix, out var partToFix))
|
||||||
|
{
|
||||||
|
int initialHediffCount = usedBy.health.hediffSet.hediffs.Count;
|
||||||
|
|
||||||
|
TaggedString currentFixedMessage = HealthUtility.FixWorstHealthCondition(usedBy);
|
||||||
|
|
||||||
|
// 如果返回了消息,或者 Hediff 数量减少,或者特定的 Hediff 不再存在,则表示已修复。
|
||||||
|
if (currentFixedMessage != null || usedBy.health.hediffSet.hediffs.Count < initialHediffCount || !usedBy.health.hediffSet.hediffs.Contains(hediffToFix))
|
||||||
|
{
|
||||||
|
fixedCount++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 如果 FixWorstHealthCondition 返回 null 且未检测到变化,
|
||||||
|
// 则表示此方法无法再修复更多状况。跳出循环。
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fixedCount > 0 && PawnUtility.ShouldSendNotificationAbout(usedBy))
|
||||||
|
{
|
||||||
|
Messages.Message("WULA_MechSerumHealerAllFixed".Translate(usedBy.Named("PAWN")), usedBy, MessageTypeDefOf.PositiveEvent);
|
||||||
|
}
|
||||||
|
else if (fixedCount == 0 && PawnUtility.ShouldSendNotificationAbout(usedBy))
|
||||||
|
{
|
||||||
|
Messages.Message("WULA_MechSerumHealerNoConditionsFixed".Translate(usedBy.Named("PAWN")), usedBy, MessageTypeDefOf.NegativeEvent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
using RimWorld;
|
||||||
|
using Verse;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace WulaFallenEmpire
|
||||||
|
{
|
||||||
|
public class Recipe_AdministerWulaMechRepairKit : Recipe_Surgery
|
||||||
|
{
|
||||||
|
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
|
||||||
|
{
|
||||||
|
// 调用基类的 ApplyOnPawn 方法,处理手术的通用逻辑
|
||||||
|
base.ApplyOnPawn(pawn, part, billDoer, ingredients, bill);
|
||||||
|
|
||||||
|
// 查找作为成分的 WULA_MechRepairKit
|
||||||
|
Thing mechRepairKit = null;
|
||||||
|
foreach (Thing ingredient in ingredients)
|
||||||
|
{
|
||||||
|
if (ingredient.def.defName == "WULA_MechRepairKit")
|
||||||
|
{
|
||||||
|
mechRepairKit = ingredient;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mechRepairKit != null)
|
||||||
|
{
|
||||||
|
// 获取物品上的 CompUseEffect_FixAllHealthConditions 组件
|
||||||
|
CompUseEffect_FixAllHealthConditions compUseEffect = mechRepairKit.TryGetComp<CompUseEffect_FixAllHealthConditions>();
|
||||||
|
if (compUseEffect != null)
|
||||||
|
{
|
||||||
|
// 手动调用 DoEffect 方法,将病人作为 usedBy 传入
|
||||||
|
compUseEffect.DoEffect(pawn);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.Error($"WULA_MechRepairKit is missing CompUseEffect_FixAllHealthConditions. This should not happen.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 物品将由 CompProperties_UseEffectDestroySelf 销毁,因此此处无需手动销毁。
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.Error($"Recipe_AdministerWulaMechRepairKit could not find WULA_MechRepairKit in ingredients for pawn {pawn.LabelShort}.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -94,6 +94,24 @@ namespace WulaFallenEmpire
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if there's already an energy source in the eater's room that the eater can reach and use.
|
||||||
|
Thing existingEnergyInRoom = GenClosest.ClosestThingReachable(
|
||||||
|
eater.Position, // Start search from eater's position
|
||||||
|
eater.Map,
|
||||||
|
ThingRequest.ForDef(Ext.energySourceDef),
|
||||||
|
PathEndMode.OnCell,
|
||||||
|
TraverseParms.For(eater, Danger.Deadly, TraverseMode.ByPawn, false), // Use eater's traverse parms
|
||||||
|
9999f,
|
||||||
|
(Thing x) => !x.IsForbidden(eater) && eater.CanReserve(x) && x.GetRoom() == eater.GetRoom()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (existingEnergyInRoom != null)
|
||||||
|
{
|
||||||
|
// If there's already an energy source in the room, no need for the warden to bring another.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Search for an energy source anywhere, now that we've confirmed none are in the room.
|
||||||
foodSource = GenClosest.ClosestThingReachable(
|
foodSource = GenClosest.ClosestThingReachable(
|
||||||
getter.Position,
|
getter.Position,
|
||||||
getter.Map,
|
getter.Map,
|
||||||
@@ -101,7 +119,7 @@ namespace WulaFallenEmpire
|
|||||||
PathEndMode.OnCell,
|
PathEndMode.OnCell,
|
||||||
TraverseParms.For(getter),
|
TraverseParms.For(getter),
|
||||||
9999f,
|
9999f,
|
||||||
(Thing x) => !x.IsForbidden(getter) && getter.CanReserve(x) && x.GetRoom() != eater.GetRoom()
|
(Thing x) => !x.IsForbidden(getter) && getter.CanReserve(x)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (foodSource != null)
|
if (foodSource != null)
|
||||||
|
|||||||
@@ -86,6 +86,8 @@
|
|||||||
<Compile Include="JobDriver_FeedWulaPatient.cs" />
|
<Compile Include="JobDriver_FeedWulaPatient.cs" />
|
||||||
<Compile Include="WulaStatDefOf.cs" />
|
<Compile Include="WulaStatDefOf.cs" />
|
||||||
<Compile Include="CompUseEffect_WulaSkillTrainer.cs" />
|
<Compile Include="CompUseEffect_WulaSkillTrainer.cs" />
|
||||||
|
<Compile Include="CompUseEffect_FixAllHealthConditions.cs" />
|
||||||
|
<Compile Include="Recipe_AdministerWulaMechRepairKit.cs" />
|
||||||
<Compile Include="Verb_ShootBeamExplosive.cs" />
|
<Compile Include="Verb_ShootBeamExplosive.cs" />
|
||||||
<Compile Include="VerbPropertiesExplosiveBeam.cs" />
|
<Compile Include="VerbPropertiesExplosiveBeam.cs" />
|
||||||
<Compile Include="HediffComp_WulaCharging.cs" />
|
<Compile Include="HediffComp_WulaCharging.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user