蜜晶膏新特效

This commit is contained in:
2025-09-22 17:31:01 +08:00
parent 64bcb6adc7
commit 804a27f911
8 changed files with 109 additions and 59 deletions

Binary file not shown.

View File

@@ -33,11 +33,10 @@
<allowedArchonexusCount>150</allowedArchonexusCount>
</ThingDef>
<!-- The meal produced by the new dispenser -->
<ThingDef ParentName="MealBase">
<defName>ARA_NutrientPasteMeal</defName>
<label>阿拉克涅蜜晶糕</label>
<description>一种由虫蜜合成的黏糊糕点,能提供虫族生存所需,味道对于虫族来说不太可口,不过普通的人类也许会喜欢这种虫族合成的糕点</description>
<description>一种由虫蜜合成的黏糊糕点”,夹杂了能使得虫族活跃的信息素,不仅有益于虫巢抵御恶劣环境的影响,其独特风味也得到了人类的喜爱</description>
<graphicData>
<texPath>Things/Item/Meal/NutrientPaste</texPath>
<graphicClass>Graphic_StackCount</graphicClass>
@@ -55,6 +54,22 @@
<ingestSound>Meal_Eat</ingestSound>
<lowPriorityCaravanFood>true</lowPriorityCaravanFood>
<babiesCanIngest>true</babiesCanIngest>
<outcomeDoers>
<li Class="ArachnaeSwarm.IngestionOutcomeDoer_GiveHediffByRace">
<hediffDef>ARA_TemperatureRegulation</hediffDef>
<severity>1.0</severity>
<targetRaces> <!-- 可以享受蜜晶膏加成的虫族,确保不会让其他非虫族恰了多一个冷血 -->
<li>ArachnaeNode_Race_WeaponSmith</li>
<li>ArachnaeNode_Race_Facehugger</li>
<li>ArachnaeNode_Race_ShieldHead</li>
<li>ArachnaeNode_Race_Fighter</li>
<li>ArachnaeNode_Race_Smokepop</li>
<li>ArachnaeNode_Race_Skyraider</li>
<li>ArachnaeNode_Race_NeuroSwarm</li>
<li>ArachnaeQueen_Race</li>
</targetRaces>
</li>
</outcomeDoers>
</ingestible>
</ThingDef>

View File

@@ -58,19 +58,19 @@
<!-- This component acts as a perpetual power source with no consumption, ensuring powerComp.PowerOn is always true -->
<li Class="CompProperties_Power">
<compClass>CompPowerPlant</compClass>
<basePowerConsumption>-1</basePowerConsumption> <!-- Negative value makes it a generator -->
<transmitsPower>false</transmitsPower> <!-- This is CRITICAL. It prevents the building from powering the whole grid. -->
<basePowerConsumption>-1</basePowerConsumption> <!-- Negative value makes it a generator -->
<transmitsPower>false</transmitsPower> <!-- This is CRITICAL. It prevents the building from powering the whole grid. -->
</li>
</comps>
<modExtensions>
<li Class="ArachnaeSwarm.ARAFoodDispenserProperties">
<thingToDispense>ARA_NutrientPasteMeal</thingToDispense>
<nutritionCostPerDispense>0.5</nutritionCostPerDispense>
<nutritionCostPerDispense>1.25</nutritionCostPerDispense>
<soundDispense>DispensePaste</soundDispense>
</li>
</modExtensions>
<building>
<isMealSource>true</isMealSource>
<isMealSource>true</isMealSource>
</building>
<interactionCellOffset>(0,0,3)</interactionCellOffset>
<hasInteractionCell>true</hasInteractionCell>

View File

@@ -4,8 +4,8 @@
<!-- ==================== A端传送门 ==================== -->
<ThingDef ParentName="BuildingBase">
<defName>ARA_WormholePortal_A</defName>
<label>阿拉克涅坑道虫虫洞</label>
<description>阿拉克涅虫洞网络的主体组成部分。它可以向远方发射尾巴作为虫洞出口,它是阿拉克涅坑道虫头部的一部分,装入虫洞的物体会被坑道虫加压移动从而快速旅行,虫洞允许双向通行。</description>
<label>阿拉克涅坑道虫</label>
<description>一只巨大的阿拉克涅辅虫,是阿拉克涅虫洞网络的主体组成部分。它可以接受虫族的指令,向远方的目的地延展自己的尾部以形成一条地下通路,通过头部进入地下通路的物体和人员会被坑道虫加压移动从而向尾部快速移动,虫洞允许双向通行。</description>
<thingClass>ArachnaeSwarm.Building_WormholePortal_A</thingClass>
<graphicData>
<texPath>ArachnaeSwarm/Building/ARA_Wormhole_A</texPath>
@@ -78,8 +78,8 @@
<!-- ==================== B端传送门 ==================== -->
<ThingDef ParentName="BuildingBase">
<defName>ARA_WormholePortal_B</defName>
<label>阿拉克涅坑道虫虫洞出口</label>
<description>一个被远程部署的虫洞出口。它是阿拉克涅坑道虫尾巴的一部分,装入虫洞的物体会被坑道虫加压移动从而快速旅行,虫洞允许双向通行。</description>
<label>阿拉克涅坑道虫尾部出口</label>
<description>阿拉克涅坑道虫尾巴,是其狭长身躯形成的地下通路的出口。通过尾部进入地下通路的物体和人员会被坑道虫加压移动从而向头部快速移动,虫洞允许双向通行。</description>
<thingClass>ArachnaeSwarm.Building_WormholePortal_B</thingClass>
<graphicData>
<texPath>ArachnaeSwarm/Building/ARA_Wormhole_B</texPath>
@@ -116,8 +116,4 @@
<traverseSound>TraversePitGate</traverseSound>
</portal>
</ThingDef>
<!-- CompProperties for our custom launchable -->
<!-- This is referenced by the li Class above -->
</Defs>

View File

@@ -3,20 +3,16 @@
"WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\verbs\\multistrike\\compmultistrike.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:verbs\\multistrike\\compmultistrike.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\thing_comps\\ara_ingestionoutcomedoer_givehediff\\ingestionoutcomedoer_givehediffbyrace.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:thing_comps\\ara_ingestionoutcomedoer_givehediff\\ingestionoutcomedoer_givehediffbyrace.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\verbs\\multistrike\\verb_meleeattack_multistrike.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:verbs\\multistrike\\verb_meleeattack_multistrike.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\thing_comps\\ara_customuniqueweapon\\compcustomuniqueweapon.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:thing_comps\\ara_customuniqueweapon\\compcustomuniqueweapon.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\pawn_comps\\ara_fighter_invisible\\compfighterinvisible.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:pawn_comps\\ara_fighter_invisible\\compfighterinvisible.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\pawn_comps\\ara_fighter_invisible\\compproperties_fighterinvisible.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:pawn_comps\\ara_fighter_invisible\\compproperties_fighterinvisible.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\thing_comps\\optoxicgas.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:thing_comps\\optoxicgas.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
@@ -26,62 +22,50 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 1,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "CompMultiStrike.cs",
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verbs\\MultiStrike\\CompMultiStrike.cs",
"RelativeDocumentMoniker": "Verbs\\MultiStrike\\CompMultiStrike.cs",
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verbs\\MultiStrike\\CompMultiStrike.cs",
"RelativeToolTip": "Verbs\\MultiStrike\\CompMultiStrike.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Title": "IngestionOutcomeDoer_GiveHediffByRace.cs",
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Thing_Comps\\ARA_IngestionOutcomeDoer_GiveHediff\\IngestionOutcomeDoer_GiveHediffByRace.cs",
"RelativeDocumentMoniker": "Thing_Comps\\ARA_IngestionOutcomeDoer_GiveHediff\\IngestionOutcomeDoer_GiveHediffByRace.cs",
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Thing_Comps\\ARA_IngestionOutcomeDoer_GiveHediff\\IngestionOutcomeDoer_GiveHediffByRace.cs",
"RelativeToolTip": "Thing_Comps\\ARA_IngestionOutcomeDoer_GiveHediff\\IngestionOutcomeDoer_GiveHediffByRace.cs",
"ViewState": "AgIAAAcAAAAAAAAAAAAAABYAAAApAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-09-22T08:03:26.648Z",
"WhenOpened": "2025-09-22T09:03:36.873Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "Verb_MeleeAttack_MultiStrike.cs",
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verbs\\MultiStrike\\Verb_MeleeAttack_MultiStrike.cs",
"RelativeDocumentMoniker": "Verbs\\MultiStrike\\Verb_MeleeAttack_MultiStrike.cs",
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verbs\\MultiStrike\\Verb_MeleeAttack_MultiStrike.cs",
"RelativeToolTip": "Verbs\\MultiStrike\\Verb_MeleeAttack_MultiStrike.cs",
"Title": "CompCustomUniqueWeapon.cs",
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Thing_Comps\\ARA_CustomUniqueWeapon\\CompCustomUniqueWeapon.cs",
"RelativeDocumentMoniker": "Thing_Comps\\ARA_CustomUniqueWeapon\\CompCustomUniqueWeapon.cs",
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Thing_Comps\\ARA_CustomUniqueWeapon\\CompCustomUniqueWeapon.cs",
"RelativeToolTip": "Thing_Comps\\ARA_CustomUniqueWeapon\\CompCustomUniqueWeapon.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-09-22T08:03:24.736Z",
"WhenOpened": "2025-09-22T09:03:28.529Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "CompFighterInvisible.cs",
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs",
"RelativeDocumentMoniker": "Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs",
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs",
"RelativeToolTip": "Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs",
"ViewState": "AgIAAAIAAAAAAAAAAAD4vw4AAAA1AAAAAAAAAA==",
"Title": "OPToxicGas.cs",
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Thing_Comps\\OPToxicGas.cs",
"RelativeDocumentMoniker": "Thing_Comps\\OPToxicGas.cs",
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Thing_Comps\\OPToxicGas.cs",
"RelativeToolTip": "Thing_Comps\\OPToxicGas.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAALsAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-09-22T01:22:42.97Z",
"WhenOpened": "2025-09-22T09:02:29.07Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "CompProperties_FighterInvisible.cs",
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_Fighter_Invisible\\CompProperties_FighterInvisible.cs",
"RelativeDocumentMoniker": "Pawn_Comps\\ARA_Fighter_Invisible\\CompProperties_FighterInvisible.cs",
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_Fighter_Invisible\\CompProperties_FighterInvisible.cs",
"RelativeToolTip": "Pawn_Comps\\ARA_Fighter_Invisible\\CompProperties_FighterInvisible.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAyAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-09-22T01:22:42.218Z"
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
}
]
}

View File

@@ -181,6 +181,7 @@
<Compile Include="Pawn_Comps\ARA_TrainingWork\TrainingSystem_Patcher.cs" />
<Compile Include="Thing_Comps\ARA_CustomUniqueWeapon\CompCustomUniqueWeapon.cs" />
<Compile Include="Thing_Comps\ARA_CustomUniqueWeapon\CompProperties_CustomUniqueWeapon.cs" />
<Compile Include="Thing_Comps\ARA_IngestionOutcomeDoer_GiveHediff\IngestionOutcomeDoer_GiveHediffByRace.cs" />
<Compile Include="Thing_Comps\OPToxicGas.cs" />
<Compile Include="Verbs\Cleave\CompCleave.cs" />
<Compile Include="Verbs\Cleave\Verb_MeleeAttack_Cleave.cs" />

View File

@@ -0,0 +1,54 @@
using RimWorld;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using Verse;
using static HarmonyLib.Code;
namespace ArachnaeSwarm
{
public class IngestionOutcomeDoer_GiveHediffByRace : IngestionOutcomeDoer
{
public HediffDef hediffDef;
public float severity = -1f;
public ChemicalDef toleranceChemical;
public bool divideByBodySize = false;
public bool multiplyByGeneToleranceFactors;
public List<ThingDef> targetRaces; // 新增:可配置的目标种族列表
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested, int ingestedCount)
{
// 如果列表是空的或null则默认对所有的pawn进行操作
if (!targetRaces.Contains(pawn.def))
{
return;
}
else if (targetRaces.NullOrEmpty())
{
}
Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn);
float effect = ((!(severity > 0f)) ? hediffDef.initialSeverity : severity);
AddictionUtility.ModifyChemicalEffectForToleranceAndBodySize(pawn, toleranceChemical, ref effect, multiplyByGeneToleranceFactors, divideByBodySize);
hediff.Severity = effect;
pawn.health.AddHediff(hediff);
}
public override IEnumerable<StatDrawEntry> SpecialDisplayStats(ThingDef parentDef)
{
if (!parentDef.IsDrug || !(chance >= 1f))
{
yield break;
}
foreach (StatDrawEntry item in hediffDef.SpecialDisplayStats(StatRequest.ForEmpty()))
{
yield return item;
}
}
}
}