Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43d7e3fb78 | ||
|
|
4d41be964d | ||
|
|
40be0d2faf | ||
|
|
0c118ca8a6 | ||
|
|
ee9ada0edb | ||
|
|
684a46df6c | ||
|
|
c77def63c2 | ||
|
|
9e992fc08b | ||
|
|
9d8129ad0e | ||
|
|
40cd353955 | ||
|
|
a8621f1564 | ||
|
|
a9ecd1e0fa | ||
|
|
bfc20d53a1 | ||
|
|
26f66d2ca4 | ||
|
|
a7c96c6aed | ||
|
|
c336450e87 | ||
|
|
040bb17f94 | ||
|
|
35ed2c01d5 | ||
|
|
14a61b46e9 | ||
|
|
fda9a18124 | ||
|
|
629345e2f8 | ||
|
|
ba622f1e89 | ||
|
|
ba9c515b3f | ||
|
|
5c32da8634 | ||
|
|
1b3c01d8bc | ||
|
|
6c2527e695 |
@@ -3,7 +3,7 @@
|
||||
<AbilityDef ParentName="AbilityTouchBase">
|
||||
<defName>ARA_BindDrone</defName>
|
||||
<label>信息素标记</label>
|
||||
<description>使用信息素标记一只阿拉克涅督虫,受到标记的督虫和其麾下的辅虫将誓死效忠于女皇种,并与其建立心灵链接。</description>
|
||||
<description>使用信息素标记一只阿拉克涅督虫,受到标记的督虫和其麾下的辅虫将誓死效忠于女皇种,并与其建立心灵链接。\n\n除了手动链接外,女皇种也会每60秒尝试自动链接所有未链接的阿拉克涅督虫,此类链接和手动链接不一样,不需要目视。</description>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_BindDrone</iconPath> <!-- Placeholder: You'll need to create this icon -->
|
||||
|
||||
<hotKey>Misc1</hotKey>
|
||||
@@ -31,6 +31,46 @@
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef>
|
||||
<defName>ARA_TrapSpew</defName>
|
||||
<label>酸爆茧投射</label>
|
||||
<description>发射一排阿拉克涅休眠茧,其中装有阿拉克涅酸爆种,这些危险的虫族被唤醒后就会开始寻仇,匆匆了结自己的生命.</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath>
|
||||
<cooldownTicksRange>5000</cooldownTicksRange> <!-- 2 hours -->
|
||||
<aiCanUse>true</aiCanUse>
|
||||
<displayOrder>300</displayOrder>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||
<warmupStartSound>AcidSpray_Warmup</warmupStartSound>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<range>14.9</range>
|
||||
<warmupTime>0.25</warmupTime>
|
||||
<soundCast>AcidSpray_Resolve</soundCast>
|
||||
<targetParams>
|
||||
<canTargetLocations>true</canTargetLocations>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="CompProperties_AbilitySprayLiquid">
|
||||
<projectileDef>ARA_Proj_StrongSludgeSpray</projectileDef>
|
||||
<numCellsToHit>8</numCellsToHit>
|
||||
<sprayEffecter>AcidSpray_Directional</sprayEffecter>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityLaunchMultiProjectile">
|
||||
<projectileDef>ARA_Proj_Trap</projectileDef>
|
||||
<numProjectiles>3</numProjectiles>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
|
||||
<ThingDef ParentName="ARA_EggSpew_Base_Proj">
|
||||
<defName>ARA_Proj_Trap</defName>
|
||||
<label>阿拉克涅酸爆茧</label>
|
||||
<projectile>
|
||||
<spawnsThingDef>Arachnae_AcidlingTrap</spawnsThingDef>
|
||||
</projectile>
|
||||
</ThingDef>
|
||||
<AbilityDef>
|
||||
<defName>ARA_TumorSpew</defName>
|
||||
<label>菌瘤释放</label>
|
||||
@@ -127,7 +167,7 @@
|
||||
<defName>ARA_AcidSprayBurst_Queen</defName>
|
||||
<label>女皇种酸液轰炸</label>
|
||||
<description>阿拉克涅女皇种向目标地点喷射大量腐蚀性酸液,喷射将持续数秒以完全覆盖一片区域。</description>
|
||||
<iconPath>UI/Abilities/AcidSpray</iconPath>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_AcidSprayBurst</iconPath>
|
||||
<cooldownTicksRange>5000</cooldownTicksRange> <!-- 2 hours -->
|
||||
<aiCanUse>true</aiCanUse>
|
||||
<displayOrder>300</displayOrder>
|
||||
@@ -201,7 +241,7 @@
|
||||
<defName>ARA_AcidSprayBurst</defName>
|
||||
<label>酸液轰炸</label>
|
||||
<description>阿拉克涅督虫向目标地点喷射大量腐蚀性酸液,虽然不如女皇种所喷射的酸雨那样强劲,但是虫酸的伤害依然是实打实的。</description>
|
||||
<iconPath>UI/Abilities/AcidSpray</iconPath>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_AcidSprayBurst</iconPath>
|
||||
<cooldownTicksRange>12000</cooldownTicksRange> <!-- 2 hours -->
|
||||
<aiCanUse>true</aiCanUse>
|
||||
<displayOrder>300</displayOrder>
|
||||
@@ -287,7 +327,7 @@
|
||||
<defName>ARA_BaseRace_Acid_Launcher</defName>
|
||||
<label>酸噬种投射</label>
|
||||
<description>将一只阿拉克涅酸噬种辅虫发射到指定地点,落地后这只寿命有限的辅虫将立刻对敌人展开攻击。</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_BaseRace_Launcher</iconPath>
|
||||
<cooldownTicksRange>5000</cooldownTicksRange>
|
||||
<aiCanUse>true</aiCanUse>
|
||||
<displayOrder>300</displayOrder>
|
||||
@@ -339,7 +379,7 @@
|
||||
<defName>ARA_BaseRace_Skyhive_Launcher</defName>
|
||||
<label>天巢种喷射巢</label>
|
||||
<description>将三只阿拉克涅天巢种辅虫发射到目标身上,天巢种将附着到敌人身上撕咬,脱落后仍然能继续对敌人展开攻击。</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_BaseRace_Launcher</iconPath>
|
||||
<cooldownTicksRange>5000</cooldownTicksRange>
|
||||
<aiCanUse>true</aiCanUse>
|
||||
<displayOrder>300</displayOrder>
|
||||
@@ -450,7 +490,7 @@
|
||||
<defName>ARA_Ability_Smokepop</defName>
|
||||
<label>信息素浓雾释放</label>
|
||||
<description>浓雾种将其腹部的大量释放阿拉克涅信息素烟雾,形成一大片足以遮蔽虫族身形的烟雾,并防止敌方使用火焰武器点燃虫族集群。这些信息素会吸引附近的阿拉克涅辅虫破土而出支援虫群,沾染信息素的目标越多(无论敌我),前来支援的虫族就越多。</description>
|
||||
<iconPath>UI/Abilities/MechSmokepop</iconPath>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Ability_Smokepop</iconPath>
|
||||
<cooldownTicksRange>6000</cooldownTicksRange>
|
||||
<targetRequired>false</targetRequired>
|
||||
<hostile>false</hostile>
|
||||
@@ -498,7 +538,7 @@
|
||||
<defName>ARA_Ability_TrackingCharge</defName>
|
||||
<label>蛮力冲撞</label>
|
||||
<description>阿拉克涅盾头种对目标发起蓄势冲撞,对路径上的一切造成伤害。在冲击中途经的距离越远,伤害越高。</description>
|
||||
<iconPath>UI/Commands/WarTrumpet</iconPath> <!-- Placeholder Icon -->
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Ability_TrackingCharge</iconPath> <!-- Placeholder Icon -->
|
||||
<cooldownTicksRange>6000</cooldownTicksRange>
|
||||
<charges>3</charges>
|
||||
<cooldownPerCharge>true</cooldownPerCharge>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<defName>ARA_EggSpew</defName>
|
||||
<label>生育虫卵</label>
|
||||
<description>从卵巢中排出一颗休眠的虫卵,阿拉克涅女皇种可以通过与其交互将其激活,并选择孵化的督虫虫族类型——参阅虫卵的具体信息,了解各个督虫的特点。\n\n该虫卵只能孵化小型虫族。</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_EggSpew</iconPath>
|
||||
<comps>
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_EggSac</projectileDef>
|
||||
@@ -100,7 +100,7 @@
|
||||
<defName>ARA_EggSpew_Huge</defName>
|
||||
<label>生育大型虫卵</label>
|
||||
<description>从卵巢中排出一颗休眠的大型虫卵,阿拉克涅女皇种可以通过与其交互将其激活,并选择孵化的督虫虫族类型——参阅虫卵的具体信息,了解各个督虫的特点。\n\n该虫卵只能孵化大型虫族。</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_EggSpew_Huge</iconPath>
|
||||
<comps>
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_EggSac_Huge</projectileDef>
|
||||
@@ -112,7 +112,7 @@
|
||||
<defName>ARA_EggSpew_1Stage</defName>
|
||||
<label>生育虫卵——等级1</label>
|
||||
<description>从卵巢中排出一颗休眠的虫卵,阿拉克涅女皇种可以通过与其交互将其激活,并选择孵化的督虫虫族类型——参阅虫卵的具体信息,了解各个督虫的特点。\n\n该虫卵只能孵化小型虫族。</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_EggSpew_1Stage</iconPath>
|
||||
<comps>
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_EggSac_1Stage</projectileDef>
|
||||
@@ -123,7 +123,7 @@
|
||||
<defName>ARA_EggSpew_Huge_1Stage</defName>
|
||||
<label>生育大型虫卵——等级1</label>
|
||||
<description>从卵巢中排出一颗休眠的大型虫卵,阿拉克涅女皇种可以通过与其交互将其激活,并选择孵化的督虫虫族类型——参阅虫卵的具体信息,了解各个督虫的特点。\n\n该虫卵只能孵化大型虫族。</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_EggSpew_Huge_1Stage</iconPath>
|
||||
<comps>
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_EggSac_Huge_1Stage</projectileDef>
|
||||
|
||||
43
1.6/1.6/Defs/AbilityDefs/AbilityDef_PsychicBrainburn.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<AbilityDef>
|
||||
<defName>ARA_PsychicBrainburn</defName>
|
||||
<label>心灵烧灼</label>
|
||||
<description>通过一次强力的心灵冲击,直接摧毁目标生物的意识核心,使其永久失去知觉。</description>
|
||||
<iconPath>UI/Abilities/Slaughter</iconPath>
|
||||
<cooldownTicksRange>5000</cooldownTicksRange>
|
||||
<aiCanUse>false</aiCanUse>
|
||||
<displayOrder>300</displayOrder>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||
<showPsycastEffects>false</showPsycastEffects>
|
||||
<sendMessageOnCooldownComplete>true</sendMessageOnCooldownComplete>
|
||||
<stunTargetWhileCasting>true</stunTargetWhileCasting>
|
||||
<moteOffsetAmountTowardsTarget>0.5</moteOffsetAmountTowardsTarget>
|
||||
<warmupMote>Mote_HoraxSmallSpellWarmup</warmupMote>
|
||||
<warmupEffecter>HoraxianAbilityCasting</warmupEffecter>
|
||||
<warmupSound>AnomalyAbilityWarmup</warmupSound>
|
||||
<writeCombatLog>true</writeCombatLog>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<warmupTime>1.5</warmupTime>
|
||||
<range>25</range>
|
||||
<targetParams>
|
||||
<canTargetPawns>true</canTargetPawns>
|
||||
<canTargetBuildings>false</canTargetBuildings>
|
||||
<canTargetSelf>false</canTargetSelf>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_PsychicBrainburn">
|
||||
<!-- 视觉效果 -->
|
||||
<effecterDef>Skip_Entry</effecterDef>
|
||||
|
||||
<!-- 设为 true 则只能对血肉生物使用。设为 false 则也可以对机械体使用。 -->
|
||||
<requiresFlesh>false</requiresFlesh>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
|
||||
</Defs>
|
||||
@@ -70,7 +70,22 @@
|
||||
<workSpeedStat>ResearchSpeedFactor</workSpeedStat>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_Morphable">
|
||||
<!-- 休息速度增益,例如1.0代表200%的速度 -->
|
||||
<restGainMultiplier>1.0</restGainMultiplier>
|
||||
|
||||
<!-- 操作按钮的自定义标签 -->
|
||||
<gizmoLabel>离开织座</gizmoLabel>
|
||||
|
||||
<!-- 操作按钮的自定义描述 -->
|
||||
<gizmoDesc>使织域种离开织座。</gizmoDesc>
|
||||
|
||||
<!--
|
||||
操作按钮的自定义图标路径。
|
||||
路径相对于"Textures"文件夹。
|
||||
例如,如果你的图标在 "YourMod/Textures/UI/Icons/Revert.png",路径就是 "UI/Icons/Revert"。
|
||||
游戏会自动处理.png扩展名。
|
||||
-->
|
||||
<gizmoIconPath>UI/Commands/EggSpew</gizmoIconPath>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
|
||||
<fuelFilter>
|
||||
@@ -78,11 +93,17 @@
|
||||
<li>Foods</li>
|
||||
</categories>
|
||||
</fuelFilter>
|
||||
<fuelCapacity>10.0</fuelCapacity>
|
||||
<fuelCapacity>2.0</fuelCapacity>
|
||||
<targetFuelLevelConfigurable>false</targetFuelLevelConfigurable>
|
||||
<fuelGizmoLabel>营养</fuelGizmoLabel>
|
||||
<outOfFuelMessage>没有营养</outOfFuelMessage>
|
||||
</li>
|
||||
|
||||
<li Class="CompProperties_AffectedByFacilities">
|
||||
<linkableFacilities>
|
||||
<li>ARA_NutrientNetworkTower</li>
|
||||
</linkableFacilities>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
|
||||
61
1.6/1.6/Defs/HediffDefs/ARA_HediffDef_TerrainExample.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<HediffDef>
|
||||
<defName>ARA_TerrainBasedHediff</defName>
|
||||
<label>菌毯刺激</label>
|
||||
<description>根据所处地形而强化自身。</description>
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<maxSeverity>1.0</maxSeverity>
|
||||
<minSeverity>-0.01</minSeverity>
|
||||
<isBad>false</isBad>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.HediffCompProperties_TerrainBasedSeverity">
|
||||
<!-- 每60 ticks(1秒)检查一次 -->
|
||||
<interval>60</interval>
|
||||
|
||||
<!-- 目标地形列表 -->
|
||||
<terrainDefs>
|
||||
<!--<li>SterileTile</li> 无菌地砖 -->
|
||||
<!-- 您可以在这里添加更多地形, 比如: -->
|
||||
<li>ARA_InsectCreep</li>
|
||||
</terrainDefs>
|
||||
|
||||
<!-- 站在目标地形上时,每次检查的严重性变化量 -->
|
||||
<severityOnTerrain>0.0167</severityOnTerrain>
|
||||
|
||||
<!-- 不在目标地形上时,每次检查的严重性变化量 (负数表示减少) -->
|
||||
<severityOffTerrain>-0.0083</severityOffTerrain>
|
||||
</li>
|
||||
<li Class="HediffCompProperties_RemoveIfApparelDropped" />
|
||||
</comps>
|
||||
<stages>
|
||||
<li>
|
||||
<becomeVisible>false</becomeVisible>
|
||||
<minSeverity>0</minSeverity>
|
||||
<label>无</label>
|
||||
</li>
|
||||
<li>
|
||||
<minSeverity>0.4</minSeverity>
|
||||
<label>适应</label>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<offset>0.1</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
</li>
|
||||
<li>
|
||||
<minSeverity>0.8</minSeverity>
|
||||
<label>舒适</label>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<offset>0.25</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
</li>
|
||||
</stages>
|
||||
</HediffDef>
|
||||
|
||||
</Defs>
|
||||
@@ -360,6 +360,28 @@
|
||||
</li>
|
||||
</lifeStages>
|
||||
</PawnKindDef>
|
||||
<PawnKindDef ParentName="ARA_InsectKindBase">
|
||||
<defName>ArachnaeBase_Race_Acidling</defName>
|
||||
<label>阿拉克涅酸爆种</label>
|
||||
<race>ArachnaeBase_Race_Acidling</race>
|
||||
<lifeStages>
|
||||
<li>
|
||||
<bodyGraphicData>
|
||||
<texPath>Things/Pawn/Animal/Spelopede/Spelopede</texPath>
|
||||
<drawSize>1</drawSize>
|
||||
<color>(156,148,125)</color>
|
||||
<shadowData>
|
||||
<volume>(0.4, 0.5, 0.37)</volume>
|
||||
<offset>(0,0,-0.15)</offset>
|
||||
</shadowData>
|
||||
</bodyGraphicData>
|
||||
<dessicatedBodyGraphicData>
|
||||
<texPath>Things/Pawn/Animal/Spelopede/Dessicated_Spelopede</texPath>
|
||||
<drawSize>1</drawSize>
|
||||
</dessicatedBodyGraphicData>
|
||||
</li>
|
||||
</lifeStages>
|
||||
</PawnKindDef>
|
||||
<PawnKindDef ParentName="ARA_InsectKindBase">
|
||||
<defName>ArachnaeBase_Race_Maid</defName>
|
||||
<label>阿拉克涅家政种</label>
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
</descriptionHyperlinks>
|
||||
<jobString>安装暗物质能源炉中</jobString>
|
||||
<anesthetize>false</anesthetize>
|
||||
<ingredients Inherit="False">
|
||||
<!-- <ingredients Inherit="False">
|
||||
<li>
|
||||
<filter>
|
||||
<thingDefs>
|
||||
@@ -269,17 +269,17 @@
|
||||
</filter>
|
||||
<count>1</count>
|
||||
</li>
|
||||
</ingredients>
|
||||
</ingredients> -->
|
||||
|
||||
<fixedIngredientFilter>
|
||||
<!-- <fixedIngredientFilter>
|
||||
<thingDefs>
|
||||
<li>WULA_Energy_Furnace_DM_Engine</li>
|
||||
</thingDefs>
|
||||
</fixedIngredientFilter>
|
||||
<appliedOnFixedBodyParts>
|
||||
</fixedIngredientFilter> -->
|
||||
<!-- <appliedOnFixedBodyParts>
|
||||
<li>WULA_Energy_Furnace_Bodypart</li>
|
||||
</appliedOnFixedBodyParts>
|
||||
<addsHediff>WULA_Energy_Furnace_Hediff_DM_Engine</addsHediff>
|
||||
</appliedOnFixedBodyParts> -->
|
||||
<addsHediff>ARA_WeaponSmith_1_Stage_Transition_Period</addsHediff>
|
||||
<recipeUsers Inherit="False">
|
||||
<li>ArachnaeNode_Race_WeaponSmith</li>
|
||||
</recipeUsers>
|
||||
|
||||
@@ -12,4 +12,15 @@
|
||||
<showIfUndefined>false</showIfUndefined>
|
||||
</StatDef>
|
||||
|
||||
<StatDef>
|
||||
<defName>NutrientTransmissionEfficiency</defName>
|
||||
<label>生物质传输效率</label>
|
||||
<description>减少无线传输生物质时的燃料消耗。最终消耗量将乘以 (1 - 效率)。</description>
|
||||
<category>Building</category>
|
||||
<defaultBaseValue>0</defaultBaseValue>
|
||||
<minValue>0</minValue>
|
||||
<toStringStyle>PercentZero</toStringStyle>
|
||||
<displayPriorityInCategory>8000</displayPriorityInCategory>
|
||||
</StatDef>
|
||||
|
||||
</Defs>
|
||||
@@ -131,6 +131,60 @@
|
||||
</tools>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="ARA_BaseDroneSwarm">
|
||||
<defName>ArachnaeBase_Race_Acidling</defName>
|
||||
<label>阿拉克涅酸爆种</label>
|
||||
<description>阿拉克涅辅虫之一,智力低下,一般被作为自杀式无人机打出,靠近敌人后就会引爆酸囊产生危险的酸性雾气。</description>
|
||||
<race>
|
||||
<thinkTreeConstant>HunterDroneConstant</thinkTreeConstant>
|
||||
<baseBodySize>0.5</baseBodySize>
|
||||
<!-- <hasCorpse>false</hasCorpse> -->
|
||||
<body>BeetleLikeWithClaw</body>
|
||||
<lifeStageAges>
|
||||
<li>
|
||||
<def>EusocialInsectAdult</def>
|
||||
<minAge>0</minAge>
|
||||
<soundWounded>Pawn_Spelopede_Pain</soundWounded>
|
||||
<soundDeath>Pawn_Spelopede_Death</soundDeath>
|
||||
<soundCall>Pawn_Spelopede_Call</soundCall>
|
||||
<soundAngry>Pawn_Spelopede_Angry</soundAngry>
|
||||
</li>
|
||||
</lifeStageAges>
|
||||
</race>
|
||||
<statBases>
|
||||
<MoveSpeed>6</MoveSpeed>
|
||||
</statBases>
|
||||
<comps>
|
||||
<li Class="CompProperties_MechPowerCell">
|
||||
<totalPowerTicks>4400</totalPowerTicks> <!-- 2 hours -->
|
||||
<labelOverride>寿命</labelOverride>
|
||||
<tooltipOverride>这种特殊的阿拉克涅辅虫从出生起就走在死亡的道路上了——它们的寿命就是如此短暂。</tooltipOverride>
|
||||
<showGizmoOnNonPlayerControlled>true</showGizmoOnNonPlayerControlled>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_HunterExplosion">
|
||||
<explosionRadius>3.9</explosionRadius> <!-- Mapped from smokeRadius -->
|
||||
<explosionDamageType>ARA_AcidBurn</explosionDamageType>
|
||||
<explosionDamageAmount>40</explosionDamageAmount>
|
||||
<armorPenetration>0.5</armorPenetration>
|
||||
<explosionSound>Explosion_Smoke</explosionSound>
|
||||
<postExplosionSpawnThingDef>ARA_AcidGasCloud</postExplosionSpawnThingDef>
|
||||
<postExplosionSpawnChance>1</postExplosionSpawnChance>
|
||||
<postExplosionSpawnThingCount>1</postExplosionSpawnThingCount>
|
||||
</li>
|
||||
</comps>
|
||||
<tools Inherit="False">
|
||||
<li>
|
||||
<label>酸性巨颚</label>
|
||||
<capacities>
|
||||
<li>ARA_AcidCut</li>
|
||||
</capacities>
|
||||
<power>6</power>
|
||||
<cooldownTime>2.6</cooldownTime>
|
||||
<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
|
||||
<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
|
||||
</li>
|
||||
</tools>
|
||||
</ThingDef>
|
||||
<ToolCapacityDef>
|
||||
<defName>ARA_AcidCut</defName>
|
||||
<label>酸性撕咬</label>
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
<onlyUseRaceRestrictedWeapons>true</onlyUseRaceRestrictedWeapons>
|
||||
<!-- 可以穿戴的衣服 -->
|
||||
<apparelList>
|
||||
<li>ARA_Maid_Uniform</li>
|
||||
<li>ARA_Bodystocking_White</li>
|
||||
<li>ARA_Bodystocking_Black</li>
|
||||
</apparelList>
|
||||
<blackApparelList>
|
||||
<li>Apparel_AdvancedHelmet</li>
|
||||
@@ -373,6 +376,7 @@
|
||||
<li>Apparel_Tailcap</li>
|
||||
<li>Apparel_VisageMask</li>
|
||||
</blackApparelList>
|
||||
<onlyUseRaceRestrictedApparel>true</onlyUseRaceRestrictedApparel>
|
||||
<!-- 生育能力 -->
|
||||
<onlyReproduceWithRestrictedRaces>true</onlyReproduceWithRestrictedRaces>
|
||||
<canReproduce>false</canReproduce>
|
||||
@@ -533,8 +537,6 @@
|
||||
<leatherDef>ARA_Carapace</leatherDef>
|
||||
<!-- 身体类型 -->
|
||||
<body>Human</body>
|
||||
<!-- 年龄阶段,较短 -->
|
||||
<lifeExpectancy>12</lifeExpectancy>
|
||||
<lifeStageWorkSettings MayRequire="Ludeon.RimWorld.Biotech">
|
||||
<Firefighter>0</Firefighter>
|
||||
<Patient>0</Patient>
|
||||
@@ -662,7 +664,6 @@
|
||||
<race>
|
||||
<baseBodySize>3</baseBodySize>
|
||||
<baseHealthScale>4</baseHealthScale>
|
||||
<lifeExpectancy>10</lifeExpectancy>
|
||||
</race>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
|
||||
@@ -696,30 +697,6 @@
|
||||
<onlyEatRaceRestrictedFood>false</onlyEatRaceRestrictedFood>
|
||||
</raceRestriction>
|
||||
</alienRace>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_MilkableArachnae">
|
||||
<milkDef>ARA_InsectJelly</milkDef>
|
||||
<milkIntervalDays>1</milkIntervalDays>
|
||||
<milkAmount>10</milkAmount>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AutoMechCarrier">
|
||||
<freeProduction>true</freeProduction>
|
||||
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
|
||||
<fixedIngredient>ARA_InsectJelly</fixedIngredient>
|
||||
<maxIngredientCount>500</maxIngredientCount>
|
||||
<startingIngredientCount>500</startingIngredientCount>
|
||||
<costPerPawn>999</costPerPawn>
|
||||
<cooldownTicks>9999</cooldownTicks>
|
||||
<productionQueue>
|
||||
<li>
|
||||
<pawnKind>ArachnaeBase_Race_Scavenger</pawnKind>
|
||||
<count>2</count>
|
||||
<cooldownTicks>1000</cooldownTicks>
|
||||
</li>
|
||||
</productionQueue>
|
||||
<spawnEffecter>CocoonDestroyed</spawnEffecter>
|
||||
</li>
|
||||
</comps>
|
||||
|
||||
<!-- 基础属性设置 -->
|
||||
<statBases>
|
||||
@@ -755,9 +732,38 @@
|
||||
<body>ArachnaeMyrmecocystus_Body</body>
|
||||
<!-- 血量上限 -->
|
||||
<baseHealthScale>3</baseHealthScale>
|
||||
<!-- 蜜罐虫的寿命很低 -->
|
||||
<lifeExpectancy>1.5</lifeExpectancy>
|
||||
</race>
|
||||
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_MilkableArachnae">
|
||||
<milkDef>ARA_InsectJelly</milkDef>
|
||||
<milkIntervalDays>1</milkIntervalDays>
|
||||
<milkAmount>10</milkAmount>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AutoMechCarrier">
|
||||
<freeProduction>true</freeProduction>
|
||||
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
|
||||
<fixedIngredient>ARA_InsectJelly</fixedIngredient>
|
||||
<maxIngredientCount>500</maxIngredientCount>
|
||||
<startingIngredientCount>500</startingIngredientCount>
|
||||
<costPerPawn>999</costPerPawn>
|
||||
<cooldownTicks>9999</cooldownTicks>
|
||||
<productionQueue>
|
||||
<li>
|
||||
<pawnKind>ArachnaeBase_Race_Scavenger</pawnKind>
|
||||
<count>2</count>
|
||||
<cooldownTicks>1000</cooldownTicks>
|
||||
</li>
|
||||
</productionQueue>
|
||||
<spawnEffecter>CocoonDestroyed</spawnEffecter>
|
||||
</li>
|
||||
<li Class="CompProperties_MechPowerCell">
|
||||
<totalPowerTicks>14400000</totalPowerTicks>
|
||||
<labelOverride>寿命</labelOverride>
|
||||
<tooltipOverride>阿拉克涅的督虫们生命如精密的发条般运转着。</tooltipOverride>
|
||||
<showGizmoOnNonPlayerControlled>true</showGizmoOnNonPlayerControlled>
|
||||
</li>
|
||||
</comps>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
|
||||
<defName>ArachnaeNode_Race_ShieldHead</defName>
|
||||
@@ -815,30 +821,6 @@
|
||||
<onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood>
|
||||
</raceRestriction>
|
||||
</alienRace>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_MilkableArachnae">
|
||||
<milkDef>ARA_Carapace</milkDef>
|
||||
<milkIntervalDays>1</milkIntervalDays>
|
||||
<milkAmount>15</milkAmount>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AutoMechCarrier">
|
||||
<freeProduction>true</freeProduction>
|
||||
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
|
||||
<fixedIngredient>ARA_InsectJelly</fixedIngredient>
|
||||
<maxIngredientCount>500</maxIngredientCount>
|
||||
<startingIngredientCount>500</startingIngredientCount>
|
||||
<costPerPawn>999</costPerPawn>
|
||||
<cooldownTicks>9999</cooldownTicks>
|
||||
<productionQueue>
|
||||
<li>
|
||||
<pawnKind>ArachnaeBase_Race_HardJaw</pawnKind>
|
||||
<count>2</count>
|
||||
<cooldownTicks>1000</cooldownTicks>
|
||||
</li>
|
||||
</productionQueue>
|
||||
<spawnEffecter>CocoonDestroyed</spawnEffecter>
|
||||
</li>
|
||||
</comps>
|
||||
|
||||
<!-- 基础属性设置 -->
|
||||
<statBases>
|
||||
@@ -877,9 +859,38 @@
|
||||
<baseBodySize>2</baseBodySize>
|
||||
<!-- 血量上限 -->
|
||||
<baseHealthScale>5</baseHealthScale>
|
||||
<!-- 蜜罐虫的寿命很低 -->
|
||||
<lifeExpectancy>1</lifeExpectancy>
|
||||
</race>
|
||||
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_MilkableArachnae">
|
||||
<milkDef>ARA_Carapace</milkDef>
|
||||
<milkIntervalDays>1</milkIntervalDays>
|
||||
<milkAmount>15</milkAmount>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AutoMechCarrier">
|
||||
<freeProduction>true</freeProduction>
|
||||
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
|
||||
<fixedIngredient>ARA_InsectJelly</fixedIngredient>
|
||||
<maxIngredientCount>500</maxIngredientCount>
|
||||
<startingIngredientCount>500</startingIngredientCount>
|
||||
<costPerPawn>999</costPerPawn>
|
||||
<cooldownTicks>9999</cooldownTicks>
|
||||
<productionQueue>
|
||||
<li>
|
||||
<pawnKind>ArachnaeBase_Race_HardJaw</pawnKind>
|
||||
<count>2</count>
|
||||
<cooldownTicks>1000</cooldownTicks>
|
||||
</li>
|
||||
</productionQueue>
|
||||
<spawnEffecter>CocoonDestroyed</spawnEffecter>
|
||||
</li>
|
||||
<li Class="CompProperties_MechPowerCell">
|
||||
<totalPowerTicks>7200000</totalPowerTicks>
|
||||
<labelOverride>寿命</labelOverride>
|
||||
<tooltipOverride>阿拉克涅的督虫们生命如精密的发条般运转着。</tooltipOverride>
|
||||
<showGizmoOnNonPlayerControlled>true</showGizmoOnNonPlayerControlled>
|
||||
</li>
|
||||
</comps>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
|
||||
<defName>ArachnaeNode_Race_WeaponSmith</defName>
|
||||
@@ -908,26 +919,6 @@
|
||||
<onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood>
|
||||
</raceRestriction>
|
||||
</alienRace>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AutoMechCarrier">
|
||||
<freeProduction>true</freeProduction>
|
||||
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
|
||||
<fixedIngredient>ARA_InsectJelly</fixedIngredient>
|
||||
<maxIngredientCount>500</maxIngredientCount>
|
||||
<startingIngredientCount>500</startingIngredientCount>
|
||||
<costPerPawn>999</costPerPawn>
|
||||
<cooldownTicks>9999</cooldownTicks>
|
||||
<productionQueue>
|
||||
<li>
|
||||
<!-- <pawnKind>ArachnaeBase_Race_Slavey</pawnKind> -->
|
||||
<pawnKind>ArachnaeBase_Race_Maid</pawnKind>
|
||||
<count>3</count>
|
||||
<cooldownTicks>1000</cooldownTicks>
|
||||
</li>
|
||||
</productionQueue>
|
||||
<spawnEffecter>CocoonDestroyed</spawnEffecter>
|
||||
</li>
|
||||
</comps>
|
||||
|
||||
<!-- 基础属性设置 -->
|
||||
<statBases>
|
||||
@@ -964,8 +955,46 @@
|
||||
<body>ArachnaeWeaponSmith_Body</body>
|
||||
<baseBodySize>0.8</baseBodySize>
|
||||
<baseHealthScale>0.75</baseHealthScale>
|
||||
<lifeExpectancy>5</lifeExpectancy>
|
||||
</race>
|
||||
|
||||
|
||||
<recipes Inherit="False">
|
||||
<li>ARA_WeaponSmith_Upgrade_1_Stage</li>
|
||||
</recipes>
|
||||
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_HediffGiver">
|
||||
<hediffs>
|
||||
<li>ARA_WeaponSmith_0_Stage</li>
|
||||
</hediffs>
|
||||
<addChance>1.0</addChance>
|
||||
<allowDuplicates>false</allowDuplicates>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AutoMechCarrier">
|
||||
<freeProduction>true</freeProduction>
|
||||
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
|
||||
<fixedIngredient>ARA_InsectJelly</fixedIngredient>
|
||||
<maxIngredientCount>500</maxIngredientCount>
|
||||
<startingIngredientCount>500</startingIngredientCount>
|
||||
<costPerPawn>999</costPerPawn>
|
||||
<cooldownTicks>9999</cooldownTicks>
|
||||
<productionQueue>
|
||||
<li>
|
||||
<!-- <pawnKind>ArachnaeBase_Race_Slavey</pawnKind> -->
|
||||
<pawnKind>ArachnaeBase_Race_Maid</pawnKind>
|
||||
<count>3</count>
|
||||
<cooldownTicks>1000</cooldownTicks>
|
||||
</li>
|
||||
</productionQueue>
|
||||
<spawnEffecter>CocoonDestroyed</spawnEffecter>
|
||||
</li>
|
||||
<li Class="CompProperties_MechPowerCell">
|
||||
<totalPowerTicks>7200000</totalPowerTicks>
|
||||
<labelOverride>寿命</labelOverride>
|
||||
<tooltipOverride>阿拉克涅的督虫们生命如精密的发条般运转着。</tooltipOverride>
|
||||
<showGizmoOnNonPlayerControlled>true</showGizmoOnNonPlayerControlled>
|
||||
</li>
|
||||
</comps>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
|
||||
<defName>ArachnaeNode_Race_Fighter</defName>
|
||||
@@ -999,8 +1028,6 @@
|
||||
<onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood>
|
||||
</raceRestriction>
|
||||
</alienRace>
|
||||
<comps>
|
||||
</comps>
|
||||
|
||||
<!-- 基础属性设置 -->
|
||||
<statBases>
|
||||
@@ -1051,8 +1078,16 @@
|
||||
<body>ArachnaeFighter_Body</body>
|
||||
<baseBodySize>0.8</baseBodySize>
|
||||
<baseHealthScale>2</baseHealthScale>
|
||||
<lifeExpectancy>2</lifeExpectancy>
|
||||
</race>
|
||||
|
||||
<comps>
|
||||
<li Class="CompProperties_MechPowerCell">
|
||||
<totalPowerTicks>7200000</totalPowerTicks>
|
||||
<labelOverride>寿命</labelOverride>
|
||||
<tooltipOverride>阿拉克涅的督虫们生命如精密的发条般运转着。</tooltipOverride>
|
||||
<showGizmoOnNonPlayerControlled>true</showGizmoOnNonPlayerControlled>
|
||||
</li>
|
||||
</comps>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
|
||||
<defName>ArachnaeNode_Race_Facehugger</defName>
|
||||
@@ -1102,7 +1137,6 @@
|
||||
<body>ArachnaeMyrmecocystus_Body</body>
|
||||
<baseBodySize>0.5</baseBodySize>
|
||||
<baseHealthScale>0.25</baseHealthScale>
|
||||
<lifeExpectancy>30</lifeExpectancy>
|
||||
</race>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_HediffGiver">
|
||||
@@ -1202,8 +1236,16 @@
|
||||
<!-- 身体类型 -->
|
||||
<body>ArachnaeFighter_Body</body>
|
||||
<baseHealthScale>4</baseHealthScale>
|
||||
<lifeExpectancy>5</lifeExpectancy>
|
||||
</race>
|
||||
|
||||
<comps>
|
||||
<li Class="CompProperties_MechPowerCell">
|
||||
<totalPowerTicks>14400000</totalPowerTicks>
|
||||
<labelOverride>寿命</labelOverride>
|
||||
<tooltipOverride>阿拉克涅的督虫们生命如精密的发条般运转着。</tooltipOverride>
|
||||
<showGizmoOnNonPlayerControlled>true</showGizmoOnNonPlayerControlled>
|
||||
</li>
|
||||
</comps>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
|
||||
<defName>ArachnaeNode_Race_Skyraider</defName>
|
||||
@@ -1286,8 +1328,16 @@
|
||||
<flightStartChanceOnJobStart>1.0</flightStartChanceOnJobStart>
|
||||
<baseBodySize>0.8</baseBodySize>
|
||||
<baseHealthScale>1.5</baseHealthScale>
|
||||
<lifeExpectancy>5</lifeExpectancy>
|
||||
</race>
|
||||
|
||||
<comps>
|
||||
<li Class="CompProperties_MechPowerCell">
|
||||
<totalPowerTicks>7200000</totalPowerTicks>
|
||||
<labelOverride>寿命</labelOverride>
|
||||
<tooltipOverride>阿拉克涅的督虫们生命如精密的发条般运转着。</tooltipOverride>
|
||||
<showGizmoOnNonPlayerControlled>true</showGizmoOnNonPlayerControlled>
|
||||
</li>
|
||||
</comps>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
|
||||
@@ -1355,7 +1405,6 @@
|
||||
<body>ArachnaeWeaponSmith_Body</body>
|
||||
<baseBodySize>0.8</baseBodySize>
|
||||
<baseHealthScale>0.75</baseHealthScale>
|
||||
<lifeExpectancy>5</lifeExpectancy>
|
||||
</race>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
</Defs>
|
||||
@@ -40,4 +40,32 @@
|
||||
</modExtensions>
|
||||
</ThingDef>
|
||||
|
||||
<!-- Gas : Thing -->
|
||||
<ThingDef ParentName="ARA_BaseGas">
|
||||
<defName>ARA_AcidGasCloud</defName>
|
||||
<label>阿拉克涅酸雾</label>
|
||||
<graphicData>
|
||||
<texPath>Things/Gas/Puff</texPath>
|
||||
<drawSize>2.6</drawSize>
|
||||
<color>(0.56, 1, 0.03,0.5)</color>
|
||||
</graphicData>
|
||||
<gas>
|
||||
<expireSeconds>
|
||||
<min>30</min>
|
||||
<max>50</max>
|
||||
</expireSeconds>
|
||||
<!--<blockTurretTracking>true</blockTurretTracking>
|
||||
<accuracyPenalty>0.3</accuracyPenalty>-->
|
||||
<rotationSpeed>20</rotationSpeed>
|
||||
</gas>
|
||||
<thingClass>ArachnaeSwarm.OPToxicGas</thingClass>
|
||||
<modExtensions>
|
||||
<li Class="ArachnaeSwarm.OPToxicDefs">
|
||||
<OPToxicHediff>ARA_AcidCoverd</OPToxicHediff> <!-- Name of HediffDef to apply, change to own HediffDef -->
|
||||
<OPToxicSeverity>0.1</OPToxicSeverity> <!-- Severity build up per Tick period -->
|
||||
<OPSevUpTickPeriod>240</OPSevUpTickPeriod> <!-- No of game ticks per each build up, recommend >= 120 -->
|
||||
</li>
|
||||
</modExtensions>
|
||||
</ThingDef>
|
||||
|
||||
</Defs>
|
||||
@@ -28,7 +28,6 @@
|
||||
<canBeGeneratedToSatisfyToxicEnvironmentResistance>false</canBeGeneratedToSatisfyToxicEnvironmentResistance>
|
||||
<useWornGraphicMask>true</useWornGraphicMask>
|
||||
</apparel>
|
||||
<recipeMaker Inherit="False" IsNull="True"/>
|
||||
<possessionCount>1</possessionCount>
|
||||
<statBases>
|
||||
<Mass>0.1</Mass>
|
||||
@@ -42,6 +41,12 @@
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_White</texPath>
|
||||
</graphicData>
|
||||
<recipeMaker Inherit="False">
|
||||
<researchPrerequisite>ARA_Technology_4DIL</researchPrerequisite>
|
||||
</recipeMaker>
|
||||
<costList Inherit="False">
|
||||
<ARA_Carapace>25</ARA_Carapace>
|
||||
</costList>
|
||||
<apparel>
|
||||
<wornGraphicPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_White</wornGraphicPath>
|
||||
</apparel>
|
||||
@@ -56,6 +61,12 @@
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_Black</texPath>
|
||||
</graphicData>
|
||||
<recipeMaker Inherit="False">
|
||||
<researchPrerequisite>ARA_Technology_4DIL</researchPrerequisite>
|
||||
</recipeMaker>
|
||||
<costList Inherit="False">
|
||||
<ARA_Carapace>25</ARA_Carapace>
|
||||
</costList>
|
||||
<apparel>
|
||||
<wornGraphicPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_Black</wornGraphicPath>
|
||||
</apparel>
|
||||
@@ -64,6 +75,120 @@
|
||||
</statBases>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef Name="ARA_ClothBase" ParentName="ApparelMakeableBase" Abstract="True">
|
||||
<thingCategories>
|
||||
<li>ApparelMisc</li>
|
||||
</thingCategories>
|
||||
<graphicData>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
</graphicData>
|
||||
<apparel>
|
||||
<tags>
|
||||
<li>ARA_Apparel</li>
|
||||
<li>ARA_Clothes</li>
|
||||
</tags>
|
||||
<canBeDesiredForIdeo>false</canBeDesiredForIdeo>
|
||||
<canBeGeneratedToSatisfyWarmth>false</canBeGeneratedToSatisfyWarmth>
|
||||
<canBeGeneratedToSatisfyToxicEnvironmentResistance>false</canBeGeneratedToSatisfyToxicEnvironmentResistance>
|
||||
<useWornGraphicMask>true</useWornGraphicMask>
|
||||
</apparel>
|
||||
<colorGenerator Class="ColorGenerator_Options">
|
||||
<options>
|
||||
<li>
|
||||
<weight>10</weight>
|
||||
<only>(1,1,1,1)</only>
|
||||
</li>
|
||||
</options>
|
||||
</colorGenerator>
|
||||
<smeltable>false</smeltable>
|
||||
<stuffCategories Inherit="False" />
|
||||
<recipeMaker Inherit="False" IsNull="True"/>
|
||||
<possessionCount>1</possessionCount>
|
||||
<statBases>
|
||||
<Mass>1</Mass>
|
||||
<WorkToMake>7000</WorkToMake>
|
||||
</statBases>
|
||||
</ThingDef>
|
||||
<ThingDef Name="ARA_HatBase" ParentName="HatMakeableBase" Abstract="True">
|
||||
<thingCategories>
|
||||
<li>ApparelMisc</li>
|
||||
</thingCategories>
|
||||
<graphicData>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
</graphicData>
|
||||
<apparel>
|
||||
<tags>
|
||||
<li>Wula_Apparel</li>
|
||||
<li>Wula_Clothes</li>
|
||||
</tags>
|
||||
<renderSkipFlags>
|
||||
<li>None</li>
|
||||
</renderSkipFlags>
|
||||
<canBeDesiredForIdeo>false</canBeDesiredForIdeo>
|
||||
<canBeGeneratedToSatisfyWarmth>false</canBeGeneratedToSatisfyWarmth>
|
||||
<canBeGeneratedToSatisfyToxicEnvironmentResistance>false</canBeGeneratedToSatisfyToxicEnvironmentResistance>
|
||||
<useWornGraphicMask>true</useWornGraphicMask>
|
||||
</apparel>
|
||||
<colorGenerator Class="ColorGenerator_Options">
|
||||
<options>
|
||||
<li>
|
||||
<weight>10</weight>
|
||||
<only>(1,1,1,1)</only>
|
||||
</li>
|
||||
</options>
|
||||
</colorGenerator>
|
||||
<possessionCount>1</possessionCount>
|
||||
<recipeMaker>
|
||||
<unfinishedThingDef>UnfinishedApparel</unfinishedThingDef>
|
||||
<useIngredientsForColor>false</useIngredientsForColor>
|
||||
</recipeMaker>
|
||||
<statBases>
|
||||
<Mass>0.2</Mass>
|
||||
<WorkToMake>3000</WorkToMake>
|
||||
<StuffEffectMultiplierArmor>0.35</StuffEffectMultiplierArmor>
|
||||
<StuffEffectMultiplierInsulation_Cold>1</StuffEffectMultiplierInsulation_Cold>
|
||||
<StuffEffectMultiplierInsulation_Heat>1</StuffEffectMultiplierInsulation_Heat>
|
||||
</statBases>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="ARA_ClothBase">
|
||||
<defName>ARA_Maid_Uniform</defName>
|
||||
<label>阿拉克涅女仆装</label>
|
||||
<description>阿拉克涅督虫们所着织物中的一种,是她们永远服侍虫巢形象的完美具现化。</description>
|
||||
<recipeMaker Inherit="False">
|
||||
<researchPrerequisite>ARA_Technology_4DIL</researchPrerequisite>
|
||||
</recipeMaker>
|
||||
<costList Inherit="False">
|
||||
<ARA_Carapace>25</ARA_Carapace>
|
||||
</costList>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Apparel/ARA_Maid_Uniform</texPath>
|
||||
</graphicData>
|
||||
<apparel>
|
||||
<bodyPartGroups>
|
||||
<li>Torso</li>
|
||||
<li>Shoulders</li>
|
||||
<li>Arms</li>
|
||||
<li>Legs</li>
|
||||
</bodyPartGroups>
|
||||
<layers>
|
||||
<!-- <li>OnSkin</li> -->
|
||||
<li>Middle</li>
|
||||
</layers>
|
||||
<wornGraphicPath>ArachnaeSwarm/Apparel/ARA_Maid_Uniform</wornGraphicPath>
|
||||
</apparel>
|
||||
<equippedStatOffsets>
|
||||
<MoveSpeed>0.25</MoveSpeed>
|
||||
</equippedStatOffsets>
|
||||
<costStuffCount>0</costStuffCount>
|
||||
<comps>
|
||||
<li Class="CompProperties_CauseHediff_Apparel">
|
||||
<hediff>ARA_TerrainBasedHediff</hediff>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
<ApparelLayerDef>
|
||||
<defName>Shield</defName>
|
||||
<label>盾牌</label>
|
||||
|
||||
64
1.6/1.6/Defs/Thing_building/ARA_AcidlingTrap.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
<ThingDef>
|
||||
<defName>Arachnae_AcidlingTrap</defName>
|
||||
<label>阿拉克涅酸爆茧</label>
|
||||
<description>一种阿拉克涅休眠茧,内藏有休眠中的阿拉克涅虫族。如果靠太近则会唤醒其中的虫族。</description>
|
||||
<thingClass>ArachnaeSwarm.Building_TrapReleaseRandom</thingClass>
|
||||
<category>Building</category>
|
||||
<!-- 基础外观和物理属性 -->
|
||||
<size>(1,1)</size>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<selectable>true</selectable>
|
||||
<fillPercent>0.20</fillPercent>
|
||||
<leaveResourcesWhenKilled>false</leaveResourcesWhenKilled>
|
||||
<rotatable>false</rotatable>
|
||||
<tickerType>Normal</tickerType>
|
||||
<building>
|
||||
<isTrap>true</isTrap>
|
||||
<trapDestroyOnSpring>true</trapDestroyOnSpring>
|
||||
<expandHomeArea>false</expandHomeArea>
|
||||
<ai_chillDestination>false</ai_chillDestination>
|
||||
<claimable>false</claimable>
|
||||
</building>
|
||||
<repairEffect>EatVegetarian</repairEffect>
|
||||
<filthLeaving>Filth_Slime</filthLeaving>
|
||||
<costList>
|
||||
<Steel>20</Steel>
|
||||
</costList>
|
||||
<statBases>
|
||||
<MaxHitPoints>10</MaxHitPoints>
|
||||
<Mass>4</Mass>
|
||||
<Flammability>1.0</Flammability>
|
||||
<MarketValue>50</MarketValue>
|
||||
</statBases>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_Tumor</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<drawSize>1.2</drawSize>
|
||||
<shadowData>
|
||||
<volume>(0.3, 0.6, 0.3)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<!-- 正确的配置方式 -->
|
||||
<modExtensions>
|
||||
<li Class="ArachnaeSwarm.TrapReleaseRandomExtension">
|
||||
<detectionRadius>25</detectionRadius>
|
||||
<countToSpawn>3</countToSpawn>
|
||||
<pawnKinds>
|
||||
<li>ArachnaeBase_Race_Acidling</li>
|
||||
<li>ArachnaeBase_Race_Acid</li>
|
||||
</pawnKinds>
|
||||
</li>
|
||||
</modExtensions>
|
||||
<!-- 组件:发光、生命周期、延迟地面生成(与风格示例对应) -->
|
||||
<comps>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>3</glowRadius>
|
||||
<glowColor>(220,210,171,0)</glowColor>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
</Defs>
|
||||
@@ -1,239 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<!-- 1. 加成建筑 "孵化加速器" -->
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_IncubationAccelerator</defName>
|
||||
<label>孵化加速器</label>
|
||||
<description>一个辅助性的生物机械装置,当放置在大型孵化池旁边时,可以加速其内部的孵化过程。</description>
|
||||
<graphicData>
|
||||
<texPath>Things/Building/Misc/ToolCabinet</texPath>
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
</graphicData>
|
||||
<size>(1,1)</size>
|
||||
<comps>
|
||||
<!-- 使用原版的 CompFacility -->
|
||||
<li Class="CompProperties_Facility">
|
||||
<statOffsets>
|
||||
<!-- 提供我们自定义的孵化速度加成 -->
|
||||
<ARA_IncubationSpeedFactor>0.60</ARA_IncubationSpeedFactor>
|
||||
</statOffsets>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
<!-- 3. 主建筑 "生物孵化池" -->
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_BioforgeIncubator_Thing</defName>
|
||||
<label>生物质物品孵化池</label>
|
||||
<description>一个大型的、需要消耗大量营养物质的孵化设施,可以同时孵化多个单位,并能通过链接外部设备来提高效率。</description>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_BioforgeIncubator</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<drawSize>(5,6)</drawSize>
|
||||
</graphicData>
|
||||
<size>(5,5)</size>
|
||||
<tickerType>Normal</tickerType>
|
||||
<stuffCategories Inherit="False" />
|
||||
<costStuffCount>0</costStuffCount>
|
||||
<costList>
|
||||
<ARA_Carapace>50</ARA_Carapace>
|
||||
</costList>
|
||||
<castEdgeShadows>false</castEdgeShadows>
|
||||
<staticSunShadowHeight>0</staticSunShadowHeight>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<terrainAffordanceNeeded>ARA_Creep</terrainAffordanceNeeded>
|
||||
<pathCost>50</pathCost>
|
||||
<statBases>
|
||||
<MaxHitPoints>250</MaxHitPoints>
|
||||
<WorkToBuild>2800</WorkToBuild>
|
||||
<Flammability>1.0</Flammability>
|
||||
</statBases>
|
||||
<placeWorkers>
|
||||
<li>PlaceWorker_PreventInteractionSpotOverlap</li>
|
||||
</placeWorkers>
|
||||
<fillPercent>0.8</fillPercent>
|
||||
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
|
||||
<hasInteractionCell>true</hasInteractionCell>
|
||||
<designationCategory>ARA_Buildings</designationCategory>
|
||||
<uiOrder>2600</uiOrder>
|
||||
<surfaceType>Item</surfaceType>
|
||||
<building>
|
||||
<workTableRoomRole>Laboratory</workTableRoomRole>
|
||||
<workTableNotInRoomRoleFactor>0.8</workTableNotInRoomRoleFactor>
|
||||
</building>
|
||||
<comps>
|
||||
<!-- a. 我们新的队列物品生产组件 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_QueuedInteractiveProducer">
|
||||
<!-- 队列和交互设置 -->
|
||||
<productionQueueLimit>3</productionQueueLimit>
|
||||
<minNutritionToStart>1.0</minNutritionToStart>
|
||||
<whitelist>
|
||||
<li>ArachnaeNode_Race_WeaponSmith</li> <!-- 示例:允许普通殖民者操作 -->
|
||||
</whitelist>
|
||||
|
||||
<!-- 质量系统设置 -->
|
||||
<minSafeTemperature>10</minSafeTemperature>
|
||||
<maxSafeTemperature>30</maxSafeTemperature>
|
||||
<penaltyPerDegreePerTick>0.00001</penaltyPerDegreePerTick>
|
||||
<qualityThresholds>
|
||||
<li>
|
||||
<quality>Legendary</quality>
|
||||
<threshold>0.99</threshold>
|
||||
</li>
|
||||
<li>
|
||||
<quality>Masterwork</quality>
|
||||
<threshold>0.90</threshold>
|
||||
</li>
|
||||
<li>
|
||||
<quality>Excellent</quality>
|
||||
<threshold>0.70</threshold>
|
||||
</li>
|
||||
<li>
|
||||
<quality>Good</quality>
|
||||
<threshold>0.50</threshold>
|
||||
</li>
|
||||
<li>
|
||||
<quality>Normal</quality>
|
||||
<threshold>0.20</threshold>
|
||||
</li>
|
||||
<li>
|
||||
<quality>Poor</quality>
|
||||
<threshold>0.10</threshold>
|
||||
</li>
|
||||
</qualityThresholds>
|
||||
|
||||
<!-- 生产列表 -->
|
||||
<processes>
|
||||
<li>
|
||||
<thingDef>ARA_RW_Basic_Acid_Bladder_Gun</thingDef>
|
||||
<productionTicks>80000</productionTicks>
|
||||
<totalNutritionNeeded>30</totalNutritionNeeded>
|
||||
<requiredResearch>ARA_Technology_7VXI</requiredResearch>
|
||||
</li>
|
||||
<li>
|
||||
<thingDef>ARA_RW_Basic_Fist_Needle_Gun</thingDef>
|
||||
<productionTicks>40000</productionTicks>
|
||||
<totalNutritionNeeded>10</totalNutritionNeeded>
|
||||
<requiredResearch>ARA_Technology_5PAV</requiredResearch>
|
||||
</li>
|
||||
</processes>
|
||||
</li>
|
||||
|
||||
<!-- b. 我们的营养燃料组件 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
|
||||
<fuelCapacity>100.0</fuelCapacity>
|
||||
<fuelFilter>
|
||||
<categories>
|
||||
<li>Foods</li>
|
||||
</categories>
|
||||
</fuelFilter>
|
||||
<fuelGizmoLabel>生物质</fuelGizmoLabel>
|
||||
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
|
||||
<targetFuelLevelConfigurable>true</targetFuelLevelConfigurable>
|
||||
</li>
|
||||
|
||||
<!-- c. 原版的设施链接接收组件 -->
|
||||
<li Class="CompProperties_AffectedByFacilities">
|
||||
<linkableFacilities>
|
||||
<li>ARA_IncubationAccelerator</li>
|
||||
</linkableFacilities>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_BioforgeIncubator</defName>
|
||||
<label>生物质孵化池</label>
|
||||
<description>一个大型的、需要消耗大量营养物质的孵化设施,可以同时孵化多个单位,并能通过链接外部设备来提高效率。</description>
|
||||
<graphicData>
|
||||
<texPath>Things/Building/AncientHeatVent</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<drawSize>(7,7)</drawSize>
|
||||
</graphicData>
|
||||
<size>(7,7)</size>
|
||||
<tickerType>Normal</tickerType>
|
||||
<stuffCategories Inherit="False" />
|
||||
<costStuffCount>0</costStuffCount>
|
||||
<costList>
|
||||
<ARA_Carapace>50</ARA_Carapace>
|
||||
</costList>
|
||||
<castEdgeShadows>false</castEdgeShadows>
|
||||
<staticSunShadowHeight>0</staticSunShadowHeight>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<terrainAffordanceNeeded>ARA_Creep</terrainAffordanceNeeded>
|
||||
<pathCost>50</pathCost>
|
||||
<statBases>
|
||||
<MaxHitPoints>250</MaxHitPoints>
|
||||
<WorkToBuild>2800</WorkToBuild>
|
||||
<Flammability>1.0</Flammability>
|
||||
</statBases>
|
||||
<placeWorkers>
|
||||
<li>PlaceWorker_PreventInteractionSpotOverlap</li>
|
||||
</placeWorkers>
|
||||
<fillPercent>0.8</fillPercent>
|
||||
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
|
||||
<hasInteractionCell>true</hasInteractionCell>
|
||||
<designationCategory>ARA_Buildings</designationCategory>
|
||||
<uiOrder>2600</uiOrder>
|
||||
<surfaceType>Item</surfaceType>
|
||||
<building>
|
||||
<workTableRoomRole>Laboratory</workTableRoomRole>
|
||||
<workTableNotInRoomRoleFactor>0.8</workTableNotInRoomRoleFactor>
|
||||
</building>
|
||||
<comps>
|
||||
|
||||
<!-- a. 我们自己的队列生产组件 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_QueuedPawnSpawner">
|
||||
<productionQueueLimit>5</productionQueueLimit>
|
||||
<minNutritionToStart>0.5</minNutritionToStart>
|
||||
<whitelist>
|
||||
<li>ARA_ArachnaeQueen</li>
|
||||
</whitelist>
|
||||
<spawnablePawns>
|
||||
<li>
|
||||
<pawnKind>ArachnaeNode_Race_Myrmecocystus</pawnKind>
|
||||
<delayTicks>180000</delayTicks>
|
||||
<totalNutritionNeeded>5.0</totalNutritionNeeded>
|
||||
</li>
|
||||
<li>
|
||||
<pawnKind>ArachnaeNode_Race_ShieldHead</pawnKind>
|
||||
<delayTicks>180000</delayTicks>
|
||||
<totalNutritionNeeded>5.0</totalNutritionNeeded>
|
||||
</li>
|
||||
<li>
|
||||
<pawnKind>ArachnaeNode_Race_WeaponSmith</pawnKind>
|
||||
<delayTicks>180000</delayTicks>
|
||||
<totalNutritionNeeded>5.0</totalNutritionNeeded>
|
||||
<!--<requiredResearch>ARA_AdvancedBiology</requiredResearch>-->
|
||||
</li>
|
||||
</spawnablePawns>
|
||||
</li>
|
||||
|
||||
<!-- b. 我们的营养燃料组件 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
|
||||
<fuelCapacity>100.0</fuelCapacity>
|
||||
<fuelFilter>
|
||||
<categories>
|
||||
<li>Foods</li>
|
||||
</categories>
|
||||
</fuelFilter>
|
||||
<fuelGizmoLabel>生物质</fuelGizmoLabel>
|
||||
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
|
||||
<targetFuelLevelConfigurable>true</targetFuelLevelConfigurable>
|
||||
</li>
|
||||
|
||||
<!-- c. 原版的设施链接接收组件 -->
|
||||
<li Class="CompProperties_AffectedByFacilities">
|
||||
<linkableFacilities>
|
||||
<li>ARA_IncubationAccelerator</li>
|
||||
</linkableFacilities>
|
||||
</li>
|
||||
|
||||
</comps>
|
||||
</ThingDef>
|
||||
</Defs>
|
||||
@@ -58,10 +58,15 @@
|
||||
<texPath>ArachnaeSwarm/Building/Linked/ARA_InsectWall</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<shadowData>
|
||||
<volume>(0.7, 0.4, 0.2)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<designationCategory>ARA_Buildings</designationCategory>
|
||||
<!-- <mineable>true</mineable> -->
|
||||
<blockLight>true</blockLight>
|
||||
<staticSunShadowHeight>0</staticSunShadowHeight>
|
||||
<statBases>
|
||||
<MarketValue>0</MarketValue>
|
||||
<Beauty>-6</Beauty>
|
||||
@@ -119,6 +124,10 @@
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/Door/ARA_InsectDoor</texPath>
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
<shadowData>
|
||||
<volume>(0.7, 0.6, 0.7)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
<damageData>
|
||||
<!-- no damage marks because they don't move with the door
|
||||
<rect>(0,0.12,1,0.76)</rect>-->
|
||||
@@ -151,7 +160,7 @@
|
||||
<!-- <terrainAffordanceNeeded>ARA_Creep</terrainAffordanceNeeded> -->
|
||||
<designationCategory>ARA_Buildings</designationCategory>
|
||||
<holdsRoof>true</holdsRoof>
|
||||
<staticSunShadowHeight>1.0</staticSunShadowHeight>
|
||||
<staticSunShadowHeight>0</staticSunShadowHeight>
|
||||
<blockLight>true</blockLight>
|
||||
<drawerType>RealtimeOnly</drawerType>
|
||||
<repairEffect>EatVegetarian</repairEffect>
|
||||
@@ -342,6 +351,10 @@
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<drawSize>(3,4.5)</drawSize>
|
||||
<shadowData>
|
||||
<volume>(2.5, 0.5, 2.5)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<castEdgeShadows>false</castEdgeShadows>
|
||||
<staticSunShadowHeight>0</staticSunShadowHeight>
|
||||
@@ -388,6 +401,10 @@
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<drawSize>(2,2)</drawSize>
|
||||
<shadowData>
|
||||
<volume>(0.8, 0.4, 1.7)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<staticSunShadowHeight Inherit="False" IsNull="True" />
|
||||
<castEdgeShadows>False</castEdgeShadows>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_EggSac</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<drawSize>(1.2,1.2)</drawSize>
|
||||
<shadowData>
|
||||
<volume>(0.8, 0.8, 0.3)</volume>
|
||||
</shadowData>
|
||||
@@ -38,10 +37,6 @@
|
||||
</building>
|
||||
|
||||
<comps>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>6</glowRadius>
|
||||
<glowColor>(113,141,117,0)</glowColor>
|
||||
</li>
|
||||
<li Class="CompProperties_SpawnEffecterOnDestroy">
|
||||
<effect>CocoonDestroyed</effect>
|
||||
</li>
|
||||
@@ -74,6 +69,10 @@
|
||||
</researchPrerequisites>
|
||||
|
||||
<comps>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>6</glowRadius>
|
||||
<glowColor>(113,141,117,0)</glowColor>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_SpawnPawnFromList">
|
||||
<spawnablePawns>
|
||||
<li>
|
||||
@@ -117,6 +116,10 @@
|
||||
</descriptionHyperlinks>
|
||||
|
||||
<comps>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>6</glowRadius>
|
||||
<glowColor>(113,141,117,0)</glowColor>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_SpawnPawnFromList">
|
||||
<spawnablePawns>
|
||||
<li>
|
||||
@@ -163,8 +166,16 @@
|
||||
<researchPrerequisites>
|
||||
<li>ARA_Base_Technology</li>
|
||||
</researchPrerequisites>
|
||||
<graphicData>
|
||||
<color>(0.9, 0.9 ,0.5)</color>
|
||||
<drawSize>(1.1,1.1)</drawSize>
|
||||
</graphicData>
|
||||
|
||||
<comps>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>6</glowRadius>
|
||||
<glowColor>(230, 230, 128, 0)</glowColor>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_SpawnPawnFromList">
|
||||
<spawnablePawns>
|
||||
<li>
|
||||
@@ -205,8 +216,15 @@
|
||||
<ThingDef>ArachnaeNode_Race_Skyraider</ThingDef>
|
||||
<ThingDef>ArachnaeNode_Race_Facehugger</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<graphicData>
|
||||
<drawSize>(1.2,1.2)</drawSize>
|
||||
</graphicData>
|
||||
|
||||
<comps>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>6</glowRadius>
|
||||
<glowColor>(113,141,117,0)</glowColor>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_SpawnPawnFromList">
|
||||
<spawnablePawns>
|
||||
<li>
|
||||
@@ -262,8 +280,16 @@
|
||||
<ThingDef>ArachnaeNode_Race_Myrmecocystus</ThingDef>
|
||||
<ThingDef>ArachnaeNode_Race_Smokepop</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<graphicData>
|
||||
<color>(0.9, 0.9 ,0.5)</color>
|
||||
<drawSize>(1.4,1.4)</drawSize>
|
||||
</graphicData>
|
||||
|
||||
<comps>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>6</glowRadius>
|
||||
<glowColor>(230, 230, 128, 0)</glowColor>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_SpawnPawnFromList">
|
||||
<spawnablePawns>
|
||||
<li>
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
<texPath>ArachnaeSwarm/Building/ARA_Cocoon</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<drawSize>(1.1,1.1)</drawSize>
|
||||
<shadowData>
|
||||
<volume>(0.7, 0.4, 0.7)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<size>(1,1)</size>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
@@ -151,24 +155,24 @@
|
||||
</comps>
|
||||
</ThingDef>
|
||||
<AbilityDef ParentName="ARA_CocoonSpew_Base">
|
||||
<defName>ARA_Cocoon_Wepaon</defName>
|
||||
<defName>ARA_Cocoon_Weapon</defName>
|
||||
<label>投放武装器官孵化茧</label>
|
||||
<description>投放一枚武装器官茧,内含可以孵化一套基础武装器官的营养和遗传物质——参阅茧的超链接,了解其能生产的所有装备的特点。</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath>
|
||||
<comps>
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Cocoon_Wepaon_Proj</projectileDef>
|
||||
<projectileDef>ARA_Cocoon_Weapon_Proj</projectileDef>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<ThingDef ParentName="ARA_CocoonSpew_Base_Proj">
|
||||
<defName>ARA_Cocoon_Wepaon_Proj</defName>
|
||||
<defName>ARA_Cocoon_Weapon_Proj</defName>
|
||||
<projectile>
|
||||
<spawnsThingDef>ARA_Cocoon_Wepaon</spawnsThingDef>
|
||||
<spawnsThingDef>ARA_Cocoon_Weapon</spawnsThingDef>
|
||||
</projectile>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="ARA_Cocoon_Base">
|
||||
<defName>ARA_Cocoon_Wepaon</defName>
|
||||
<defName>ARA_Cocoon_Weapon</defName>
|
||||
<label>阿拉克涅孵化茧 武装器官</label>
|
||||
<description>一个布满尖刺的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为-20~35°C),需要小心保护!</description>
|
||||
<descriptionHyperlinks>
|
||||
@@ -176,9 +180,6 @@
|
||||
<ThingDef>ARA_RW_Basic_Acid_Bladder_Gun</ThingDef>
|
||||
<ThingDef>ARA_RW_Basic_Fist_Needle_Gun</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<researchPrerequisites>
|
||||
<li>ARA_Technology_5DIL</li>
|
||||
</researchPrerequisites>
|
||||
|
||||
<comps>
|
||||
<!-- The new, GrowthVat-style fuel component -->
|
||||
@@ -264,4 +265,5 @@
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
</Defs>
|
||||
509
1.6/1.6/Defs/Thing_building/ARA_NutrientNetworkBuilding.xml
Normal file
@@ -0,0 +1,509 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_NutrientNetworkTower</defName>
|
||||
<label>阿拉克涅营养供给塔</label>
|
||||
<description>一个中央营养供给设施。它可以自动为链接到的、需要营养的建筑补充燃料。它本身需要被手动填充大量的生物质。</description>
|
||||
<size>(5,5)</size>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_ResearchBench</texPath>
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<drawSize>(5,6.7)</drawSize>
|
||||
</graphicData>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<pathCost>70</pathCost>
|
||||
<tickerType>Normal</tickerType> <!-- 改为 Normal 以匹配 CompRefuelable 的要求 -->
|
||||
<fillPercent>0.5</fillPercent>
|
||||
<statBases>
|
||||
<MaxHitPoints>300</MaxHitPoints>
|
||||
<WorkToBuild>3000</WorkToBuild>
|
||||
<Mass>20</Mass>
|
||||
<Flammability>0.5</Flammability>
|
||||
</statBases>
|
||||
<costList>
|
||||
<ARA_Carapace>50</ARA_Carapace>
|
||||
</costList>
|
||||
<comps>
|
||||
<!-- 供能核心组件 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_NutrientProvider">
|
||||
<linkableBuildings>
|
||||
<!-- 这里列出所有可以被供能的建筑的 defName -->
|
||||
<!-- 您之后可以手动添加,例如: -->
|
||||
<li>ARA_BioforgeIncubator</li>
|
||||
<li>ARA_BioforgeIncubator_Thing</li>
|
||||
<li>ARA_JellyVat</li>
|
||||
<li>ARA_GrowthVat</li>
|
||||
<li>ARA_MorphableResearchBench</li>
|
||||
</linkableBuildings>
|
||||
<maxDistance>80</maxDistance> <!-- 供能范围 -->
|
||||
<maxSimultaneous>10</maxSimultaneous>
|
||||
<maxEfficiency>0.9</maxEfficiency>
|
||||
</li>
|
||||
|
||||
<!-- 全新的、只负责画线的组件 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_LineDrawer">
|
||||
<linkableBuildings>
|
||||
<li>ARA_BioforgeIncubator</li>
|
||||
<li>ARA_BioforgeIncubator_Thing</li>
|
||||
<li>ARA_JellyVat</li>
|
||||
<li>ARA_GrowthVat</li>
|
||||
<li>ARA_MorphableResearchBench</li>
|
||||
</linkableBuildings>
|
||||
<maxDistance>80</maxDistance>
|
||||
</li>
|
||||
|
||||
<!-- 自身的燃料库 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
|
||||
<fuelCapacity>10000.0</fuelCapacity>
|
||||
<fuelFilter>
|
||||
<categories>
|
||||
<li>Foods</li>
|
||||
<li>Corpses</li>
|
||||
</categories>
|
||||
</fuelFilter>
|
||||
<fuelGizmoLabel>生物质</fuelGizmoLabel>
|
||||
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
|
||||
<targetFuelLevelConfigurable>true</targetFuelLevelConfigurable>
|
||||
</li>
|
||||
|
||||
<!-- 开关 -->
|
||||
<li Class="CompProperties_Flickable"/>
|
||||
<li Class="CompProperties_AffectedByFacilities">
|
||||
<linkableFacilities>
|
||||
<li>ARA_GrowthVat</li>
|
||||
</linkableFacilities>
|
||||
</li>
|
||||
|
||||
</comps>
|
||||
<designationCategory>ARA_Buildings</designationCategory>
|
||||
</ThingDef>
|
||||
|
||||
<!-- 3. 主建筑 "生物孵化池" -->
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_BioforgeIncubator_Thing</defName>
|
||||
<label>生物质物品孵化池</label>
|
||||
<description>一个大型的、需要消耗大量营养物质的孵化设施,可以同时孵化多个单位,并能通过链接外部设备来提高效率。</description>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_BioforgeIncubator</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<drawSize>(5,6)</drawSize>
|
||||
<shadowData>
|
||||
<volume>(4.0, 0.5, 4.0)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<size>(5,5)</size>
|
||||
<tickerType>Normal</tickerType>
|
||||
<stuffCategories Inherit="False" />
|
||||
<costStuffCount>0</costStuffCount>
|
||||
<costList>
|
||||
<ARA_Carapace>50</ARA_Carapace>
|
||||
</costList>
|
||||
<castEdgeShadows>false</castEdgeShadows>
|
||||
<staticSunShadowHeight>0</staticSunShadowHeight>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<terrainAffordanceNeeded>ARA_Creep</terrainAffordanceNeeded>
|
||||
<pathCost>50</pathCost>
|
||||
<statBases>
|
||||
<MaxHitPoints>250</MaxHitPoints>
|
||||
<WorkToBuild>2800</WorkToBuild>
|
||||
<Flammability>1.0</Flammability>
|
||||
</statBases>
|
||||
<placeWorkers>
|
||||
<li>PlaceWorker_PreventInteractionSpotOverlap</li>
|
||||
</placeWorkers>
|
||||
<fillPercent>0.8</fillPercent>
|
||||
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
|
||||
<hasInteractionCell>true</hasInteractionCell>
|
||||
<designationCategory>ARA_Buildings</designationCategory>
|
||||
<uiOrder>2600</uiOrder>
|
||||
<surfaceType>Item</surfaceType>
|
||||
<building>
|
||||
<workTableRoomRole>Laboratory</workTableRoomRole>
|
||||
<workTableNotInRoomRoleFactor>0.8</workTableNotInRoomRoleFactor>
|
||||
</building>
|
||||
<comps>
|
||||
<!-- a. 我们新的队列物品生产组件 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_QueuedInteractiveProducer">
|
||||
<!-- 队列和交互设置 -->
|
||||
<productionQueueLimit>3</productionQueueLimit>
|
||||
<minNutritionToStart>1.0</minNutritionToStart>
|
||||
<whitelist>
|
||||
<li>ArachnaeNode_Race_WeaponSmith</li> <!-- 示例:允许普通殖民者操作 -->
|
||||
</whitelist>
|
||||
|
||||
<!-- 质量系统设置 -->
|
||||
<minSafeTemperature>10</minSafeTemperature>
|
||||
<maxSafeTemperature>30</maxSafeTemperature>
|
||||
<penaltyPerDegreePerTick>0.00001</penaltyPerDegreePerTick>
|
||||
<qualityThresholds>
|
||||
<li>
|
||||
<quality>Legendary</quality>
|
||||
<threshold>0.99</threshold>
|
||||
</li>
|
||||
<li>
|
||||
<quality>Masterwork</quality>
|
||||
<threshold>0.90</threshold>
|
||||
</li>
|
||||
<li>
|
||||
<quality>Excellent</quality>
|
||||
<threshold>0.70</threshold>
|
||||
</li>
|
||||
<li>
|
||||
<quality>Good</quality>
|
||||
<threshold>0.50</threshold>
|
||||
</li>
|
||||
<li>
|
||||
<quality>Normal</quality>
|
||||
<threshold>0.20</threshold>
|
||||
</li>
|
||||
<li>
|
||||
<quality>Poor</quality>
|
||||
<threshold>0.10</threshold>
|
||||
</li>
|
||||
</qualityThresholds>
|
||||
|
||||
<!-- 生产列表 -->
|
||||
<processes>
|
||||
<li>
|
||||
<thingDef>ARA_RW_Basic_Acid_Bladder_Gun</thingDef>
|
||||
<productionTicks>80000</productionTicks>
|
||||
<totalNutritionNeeded>30</totalNutritionNeeded>
|
||||
<requiredResearch>ARA_Technology_7VXI</requiredResearch>
|
||||
</li>
|
||||
<li>
|
||||
<thingDef>ARA_RW_Basic_Fist_Needle_Gun</thingDef>
|
||||
<productionTicks>40000</productionTicks>
|
||||
<totalNutritionNeeded>10</totalNutritionNeeded>
|
||||
<requiredResearch>ARA_Technology_5PAV</requiredResearch>
|
||||
</li>
|
||||
</processes>
|
||||
</li>
|
||||
|
||||
<!-- b. 我们的营养燃料组件 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
|
||||
<fuelCapacity>100.0</fuelCapacity>
|
||||
<fuelFilter>
|
||||
<categories>
|
||||
<li>Foods</li>
|
||||
</categories>
|
||||
</fuelFilter>
|
||||
<fuelGizmoLabel>生物质</fuelGizmoLabel>
|
||||
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
|
||||
<targetFuelLevelConfigurable>true</targetFuelLevelConfigurable>
|
||||
</li>
|
||||
|
||||
<!-- c. 原版的设施链接接收组件 -->
|
||||
<li Class="CompProperties_AffectedByFacilities">
|
||||
<linkableFacilities>
|
||||
<li>ARA_NutrientNetworkTower</li>
|
||||
<li>ARA_GrowthVat</li>
|
||||
</linkableFacilities>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_BioforgeIncubator</defName>
|
||||
<label>生物质孵化池</label>
|
||||
<description>一个大型的、需要消耗大量营养物质的孵化设施,可以同时孵化多个单位,并能通过链接外部设备来提高效率。</description>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_BioforgeIncubatorPawn</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<drawSize>(8,8)</drawSize>
|
||||
<shadowData>
|
||||
<volume>(6.0, 0.6, 4.0)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<size>(7,5)</size>
|
||||
<tickerType>Normal</tickerType>
|
||||
<stuffCategories Inherit="False" />
|
||||
<costStuffCount>0</costStuffCount>
|
||||
<costList>
|
||||
<ARA_Carapace>50</ARA_Carapace>
|
||||
</costList>
|
||||
<castEdgeShadows>false</castEdgeShadows>
|
||||
<staticSunShadowHeight>0</staticSunShadowHeight>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<terrainAffordanceNeeded>ARA_Creep</terrainAffordanceNeeded>
|
||||
<pathCost>50</pathCost>
|
||||
<statBases>
|
||||
<MaxHitPoints>250</MaxHitPoints>
|
||||
<WorkToBuild>2800</WorkToBuild>
|
||||
<Flammability>1.0</Flammability>
|
||||
</statBases>
|
||||
<placeWorkers>
|
||||
<li>PlaceWorker_PreventInteractionSpotOverlap</li>
|
||||
</placeWorkers>
|
||||
<fillPercent>0.8</fillPercent>
|
||||
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
|
||||
<hasInteractionCell>true</hasInteractionCell>
|
||||
<designationCategory>ARA_Buildings</designationCategory>
|
||||
<uiOrder>2600</uiOrder>
|
||||
<surfaceType>Item</surfaceType>
|
||||
<building>
|
||||
<workTableRoomRole>Laboratory</workTableRoomRole>
|
||||
<workTableNotInRoomRoleFactor>0.8</workTableNotInRoomRoleFactor>
|
||||
</building>
|
||||
<comps>
|
||||
|
||||
<!-- a. 我们自己的队列生产组件 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_QueuedPawnSpawner">
|
||||
<productionQueueLimit>5</productionQueueLimit>
|
||||
<minNutritionToStart>0.5</minNutritionToStart>
|
||||
<whitelist>
|
||||
<li>ARA_ArachnaeQueen</li>
|
||||
</whitelist>
|
||||
<spawnablePawns>
|
||||
<li>
|
||||
<pawnKind>ArachnaeNode_Race_Myrmecocystus</pawnKind>
|
||||
<delayTicks>180000</delayTicks>
|
||||
<totalNutritionNeeded>5.0</totalNutritionNeeded>
|
||||
</li>
|
||||
<li>
|
||||
<pawnKind>ArachnaeNode_Race_ShieldHead</pawnKind>
|
||||
<delayTicks>180000</delayTicks>
|
||||
<totalNutritionNeeded>5.0</totalNutritionNeeded>
|
||||
</li>
|
||||
<li>
|
||||
<pawnKind>ArachnaeNode_Race_WeaponSmith</pawnKind>
|
||||
<delayTicks>180000</delayTicks>
|
||||
<totalNutritionNeeded>5.0</totalNutritionNeeded>
|
||||
<!--<requiredResearch>ARA_AdvancedBiology</requiredResearch>-->
|
||||
</li>
|
||||
</spawnablePawns>
|
||||
</li>
|
||||
|
||||
<!-- b. 我们的营养燃料组件 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
|
||||
<fuelCapacity>100.0</fuelCapacity>
|
||||
<fuelFilter>
|
||||
<categories>
|
||||
<li>Foods</li>
|
||||
</categories>
|
||||
</fuelFilter>
|
||||
<fuelGizmoLabel>生物质</fuelGizmoLabel>
|
||||
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
|
||||
<targetFuelLevelConfigurable>true</targetFuelLevelConfigurable>
|
||||
</li>
|
||||
|
||||
<!-- c. 原版的设施链接接收组件 -->
|
||||
<li Class="CompProperties_AffectedByFacilities">
|
||||
<linkableFacilities>
|
||||
<li>ARA_NutrientNetworkTower</li>
|
||||
<li>ARA_GrowthVat</li>
|
||||
</linkableFacilities>
|
||||
</li>
|
||||
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_JellyVat</defName> <!-- defName is changed to reflect its purpose -->
|
||||
<label>生物质酿造池</label>
|
||||
<description>一个活体虫族器官,通过分别消化植物和肉类物质,来缓慢培育出营养丰富的阿拉克涅虫蜜。需要同时填充素食和肉类才能工作。</description>
|
||||
<thingClass>Building</thingClass>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_JellyVat</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<drawSize>(2.2,2.2)</drawSize>
|
||||
<shadowData>
|
||||
<volume>(1.6, 0.5, 1.6)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<size>(2,2)</size>
|
||||
<tickerType>Normal</tickerType>
|
||||
<stuffCategories Inherit="False" />
|
||||
<costStuffCount>0</costStuffCount>
|
||||
<costList>
|
||||
<ARA_Carapace>50</ARA_Carapace>
|
||||
</costList>
|
||||
<castEdgeShadows>false</castEdgeShadows>
|
||||
<staticSunShadowHeight>0</staticSunShadowHeight>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<terrainAffordanceNeeded>ARA_Creep</terrainAffordanceNeeded>
|
||||
<pathCost>50</pathCost>
|
||||
<statBases>
|
||||
<MaxHitPoints>250</MaxHitPoints>
|
||||
<WorkToBuild>2800</WorkToBuild>
|
||||
<Flammability>1.0</Flammability>
|
||||
</statBases>
|
||||
<placeWorkers>
|
||||
<li>PlaceWorker_PreventInteractionSpotOverlap</li>
|
||||
</placeWorkers>
|
||||
<fillPercent>0.8</fillPercent>
|
||||
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
|
||||
<hasInteractionCell>true</hasInteractionCell>
|
||||
<designationCategory>ARA_Buildings</designationCategory>
|
||||
<uiOrder>2600</uiOrder>
|
||||
<surfaceType>Item</surfaceType>
|
||||
<building>
|
||||
<workTableRoomRole>Laboratory</workTableRoomRole>
|
||||
<workTableNotInRoomRoleFactor>0.8</workTableNotInRoomRoleFactor>
|
||||
</building>
|
||||
<comps>
|
||||
<li Class="CompProperties_Flickable"/>
|
||||
|
||||
<li Class="ArachnaeSwarm.CompProperties_MultiFuelSpawner">
|
||||
<spawnIntervalRange>
|
||||
<min>120000</min> <!-- 2天 -->
|
||||
<max>120000</max>
|
||||
</spawnIntervalRange>
|
||||
<products>
|
||||
<li>
|
||||
<thingDef>ARA_InsectJelly</thingDef>
|
||||
<count>150</count>
|
||||
</li>
|
||||
</products>
|
||||
<showMessageIfOwned>true</showMessageIfOwned>
|
||||
</li>
|
||||
|
||||
<!-- 燃料槽 1: 素食 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition_WithKey">
|
||||
<saveKeysPrefix>veg_vat</saveKeysPrefix>
|
||||
<fuelLabel>素食</fuelLabel>
|
||||
<fuelFilter>
|
||||
<categories>
|
||||
<li>PlantFoodRaw</li>
|
||||
</categories>
|
||||
</fuelFilter>
|
||||
<fuelCapacity>50</fuelCapacity>
|
||||
<fuelConsumptionRate>12.5</fuelConsumptionRate>
|
||||
<consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
|
||||
</li>
|
||||
|
||||
<!-- 燃料槽 2: 肉类 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition_WithKey">
|
||||
<saveKeysPrefix>meat_vat</saveKeysPrefix>
|
||||
<fuelLabel>肉食</fuelLabel>
|
||||
<fuelFilter>
|
||||
<categories>
|
||||
<li>MeatRaw</li>
|
||||
<li>AnimalProductRaw</li>
|
||||
</categories>
|
||||
</fuelFilter>
|
||||
<fuelCapacity>50</fuelCapacity>
|
||||
<fuelConsumptionRate>12.5</fuelConsumptionRate>
|
||||
<consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
|
||||
</li>
|
||||
|
||||
<li Class="CompProperties_AffectedByFacilities">
|
||||
<linkableFacilities>
|
||||
<li>ARA_NutrientNetworkTower</li>
|
||||
</linkableFacilities>
|
||||
</li>
|
||||
</comps>
|
||||
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_GrowthVat</defName>
|
||||
<label>阿拉克涅捕获茧</label>
|
||||
<description>用来存放猎物的茧。</description>
|
||||
<thingClass>ArachnaeSwarm.Building_NutrientVat</thingClass>
|
||||
<containedPawnsSelectable>true</containedPawnsSelectable>
|
||||
<tickerType>Normal</tickerType>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_GrowthVat</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<drawSize>(2.5,2.5)</drawSize>
|
||||
<shadowData>
|
||||
<volume>(0.85, 0.3, 1.7)</volume>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<castEdgeShadows>true</castEdgeShadows>
|
||||
<defaultPlacingRot>North</defaultPlacingRot>
|
||||
<size>(1,2)</size>
|
||||
<statBases>
|
||||
<MaxHitPoints>500</MaxHitPoints>
|
||||
<WorkToBuild>8000</WorkToBuild>
|
||||
<Mass>30</Mass>
|
||||
<Flammability>0.5</Flammability>
|
||||
</statBases>
|
||||
<costList>
|
||||
<ARA_Carapace>50</ARA_Carapace>
|
||||
</costList>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<pathCost>42</pathCost>
|
||||
<blockWind>true</blockWind>
|
||||
<drawerType>MapMeshAndRealTime</drawerType>
|
||||
<fillPercent>0.5</fillPercent>
|
||||
<canOverlapZones>false</canOverlapZones>
|
||||
<designationCategory>ARA_Buildings</designationCategory>
|
||||
<uiOrder>2200</uiOrder>
|
||||
<hasInteractionCell>true</hasInteractionCell>
|
||||
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
|
||||
<rotatable>false</rotatable>
|
||||
<inspectorTabs>
|
||||
<li>ITab_BiosculpterNutritionStorage</li>
|
||||
<li>ITab_Genes</li>
|
||||
</inspectorTabs>
|
||||
<researchPrerequisites>
|
||||
<li>GrowthVats</li>
|
||||
</researchPrerequisites>
|
||||
<building>
|
||||
<ai_chillDestination>false</ai_chillDestination>
|
||||
<haulToContainerDuration>120</haulToContainerDuration>
|
||||
<workTableRoomRole>Laboratory</workTableRoomRole>
|
||||
</building>
|
||||
<constructionSkillPrerequisite>4</constructionSkillPrerequisite>
|
||||
<comps>
|
||||
<!-- 1. 作为消费者,自己也需要燃料 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
|
||||
<fuelCapacity>100.0</fuelCapacity>
|
||||
<fuelFilter>
|
||||
<categories>
|
||||
<li>Foods</li>
|
||||
</categories>
|
||||
</fuelFilter>
|
||||
<fuelGizmoLabel>生物质</fuelGizmoLabel>
|
||||
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
|
||||
<targetFuelLevelConfigurable>true</targetFuelLevelConfigurable>
|
||||
</li>
|
||||
|
||||
<!-- 2. 作为动态增效器,为其他建筑提供加成 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_GrowthVatBooster">
|
||||
<linkableBuildings>
|
||||
<li>ARA_NutrientNetworkTower</li>
|
||||
<li>ARA_BioforgeIncubator</li>
|
||||
<li>ARA_BioforgeIncubator_Thing</li>
|
||||
</linkableBuildings>
|
||||
<maxSimultaneous>10</maxSimultaneous>
|
||||
<maxDistance>20</maxDistance>
|
||||
<statOffsets>
|
||||
<NutrientTransmissionEfficiency>0.05</NutrientTransmissionEfficiency>
|
||||
<ARA_IncubationSpeedFactor>0.1</ARA_IncubationSpeedFactor>
|
||||
</statOffsets>
|
||||
</li>
|
||||
|
||||
<!-- 3. 作为消费者,接收来自供能塔的燃料 -->
|
||||
<li Class="CompProperties_AffectedByFacilities">
|
||||
<linkableFacilities>
|
||||
<li>ARA_NutrientNetworkTower</li>
|
||||
</linkableFacilities>
|
||||
</li>
|
||||
</comps>
|
||||
<modExtensions>
|
||||
<li Class="ArachnaeSwarm.DefModExtension_NutrientVat">
|
||||
<!-- 在这里配置您的顶部贴图 -->
|
||||
<topGraphicPath>ArachnaeSwarm/Building/ARA_GrowthVatTop</topGraphicPath>
|
||||
<!-- 如果是单张贴图,使用 Graphic_Single -->
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
</li>
|
||||
</modExtensions>
|
||||
</ThingDef>
|
||||
|
||||
</Defs>
|
||||
68
1.6/1.6/Defs/Thing_building/Building_SmartThermostat.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_SmartThermostat</defName>
|
||||
<label>阿拉克涅纤管虫</label>
|
||||
<description>一个不耗电的温控虫虫。它是一个可逆的热泵,能自动制热或制冷以维持设定的目标温度。必须像制冷器一样安装在墙上。</description>
|
||||
<thingClass>ArachnaeSwarm.Building_SmartThermostat</thingClass> <!-- 使用我们新的建筑类 -->
|
||||
<graphicData>
|
||||
<texPath>Things/Building/Misc/TempControl/Cooler</texPath> <!-- 暂时使用制冷器的贴图 -->
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
<shadowData>
|
||||
<volume>(0.6, 0.4, 0.3)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>Impassable</passability>
|
||||
<blockWind>true</blockWind>
|
||||
<fillPercent>1</fillPercent>
|
||||
<coversFloor>true</coversFloor>
|
||||
<blockLight>true</blockLight>
|
||||
<blockWeather>true</blockWeather>
|
||||
<castEdgeShadows>true</castEdgeShadows>
|
||||
<canOverlapZones>false</canOverlapZones>
|
||||
<staticSunShadowHeight>0</staticSunShadowHeight>
|
||||
<statBases>
|
||||
<WorkToBuild>400</WorkToBuild>
|
||||
<MaxHitPoints>100</MaxHitPoints>
|
||||
<Flammability>1.0</Flammability>
|
||||
</statBases>
|
||||
<tickerType>Rare</tickerType>
|
||||
<costList>
|
||||
<ARA_Carapace>30</ARA_Carapace>
|
||||
</costList>
|
||||
<terrainAffordanceNeeded>Medium</terrainAffordanceNeeded>
|
||||
<placeWorkers>
|
||||
<li>PlaceWorker_Vent</li>
|
||||
</placeWorkers>
|
||||
<drawPlaceWorkersWhileSelected>true</drawPlaceWorkersWhileSelected>
|
||||
<building>
|
||||
<canPlaceOverWall>true</canPlaceOverWall>
|
||||
<canExchangeVacuum>true</canExchangeVacuum>
|
||||
<isAirtight>true</isAirtight>
|
||||
</building>
|
||||
<researchPrerequisites>
|
||||
<li>AirConditioning</li>
|
||||
</researchPrerequisites>
|
||||
<designationCategory>ARA_Buildings</designationCategory>
|
||||
<comps>
|
||||
<!-- 提供开关按钮 -->
|
||||
<li Class="CompProperties_Flickable">
|
||||
<commandTexture>UI/Commands/Vent</commandTexture>
|
||||
<commandLabelKey>CommandDesignateOpenCloseVentLabel</commandLabelKey>
|
||||
<commandDescKey>CommandDesignateOpenCloseVentDesc</commandDescKey>
|
||||
</li>
|
||||
|
||||
<!-- 提供温度控制UI和逻辑 -->
|
||||
<li Class="ArachnaeSwarm.CompProperties_TempControl_Fixed">
|
||||
<!-- 这是设备的热交换功率。数值越大,制冷/制热速度越快。-->
|
||||
<energyPerSecond>34</energyPerSecond>
|
||||
</li>
|
||||
|
||||
<li Class="CompProperties_Breakdownable"/>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
</Defs>
|
||||
@@ -22,4 +22,8 @@
|
||||
<ARA_TipString_ControlledDrones>控制的虫族:</ARA_TipString_ControlledDrones>
|
||||
<ARA_TipString_NoDronesBound>尚未绑定任何虫族。</ARA_TipString_NoDronesBound>
|
||||
|
||||
<!-- Trap messages -->
|
||||
<MessageTrapSprung>{TRAP} 被 {PAWN} 触发!</MessageTrapSprung>
|
||||
<MessageTrapSprung_NoInstigator>{TRAP} 被触发!</MessageTrapSprung_NoInstigator>
|
||||
|
||||
</LanguageData>
|
||||
BIN
Content/Textures/ArachnaeSwarm/Apparel/ARA_Maid_Uniform.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 214 KiB |
BIN
Content/Textures/ArachnaeSwarm/Building/ARA_GrowthVat.png
Normal file
|
After Width: | Height: | Size: 167 KiB |
BIN
Content/Textures/ArachnaeSwarm/Building/ARA_GrowthVatTop.png
Normal file
|
After Width: | Height: | Size: 171 KiB |
BIN
Content/Textures/ArachnaeSwarm/Building/ARA_JellyVat.png
Normal file
|
After Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 299 KiB After Width: | Height: | Size: 370 KiB |
|
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 323 KiB |
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 360 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
BIN
Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_EggSpew.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
BIN
Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_EggSpew_Huge.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
134
Nutrient_Network_Design.md
Normal file
@@ -0,0 +1,134 @@
|
||||
# 中央营养供给网络设计文档 (v2)
|
||||
|
||||
## 1. 概述
|
||||
|
||||
为了解决需要手动为大量建筑补充营养(燃料)的繁琐操作,本项目旨在设计并实现一个“中央营养供给网络”。该网络由一个或多个“中央供能塔”组成,它们能够自动、无线地为地图上所有需要营养的建筑进行补给。此外,系统还支持通过辅助建筑来提升供能塔的燃料传输效率。
|
||||
|
||||
## 2. 设计目标
|
||||
|
||||
* **自动化**: 消除手动为每个建筑“加油”的需求。
|
||||
* **策略性**: 引入效率加成建筑,鼓励玩家进行更优化的基地布局。
|
||||
* **可扩展性**: 系统应支持多个供能塔、消费者和增效器建筑。
|
||||
* **性能友好**: 设计应考虑到性能,避免在游戏后期造成明显的卡顿。
|
||||
* **用户友好**: 玩家应能轻松理解网络的工作状态,并对其进行基本控制。
|
||||
|
||||
## 3. 系统架构
|
||||
|
||||
本系统采用**去中心化**的设计。每个“中央供能塔”都是一个独立的网络节点。同时,它也作为一个可以被其他设施影响的单位,以接收效率加成。
|
||||
|
||||
### 3.1. 主要组件与建筑
|
||||
|
||||
#### a. `CompNutrientNetworkFeeder` (供能塔核心组件)
|
||||
|
||||
* **职责**:
|
||||
1. **扫描与链接**: 定期扫描地图,查找所有在范围内的消费者建筑,并维护一个持久化的 `linkedConsumers` 列表。
|
||||
2. **计算效率**: 检查自身 `Stat`,获取由“增效器”提供的 `NutrientTransmissionEfficiency` 总加成。
|
||||
3. **分配与供能**: 从 `linkedConsumers` 列表中选择目标,计算需要补充的燃料量 `X`。根据效率加成,从自身燃料库中扣除 `X * (1 - EfficiencyBonus)` 的燃料。
|
||||
4. **冲突避免**: 使用一个临时标记 `isBeingFueledNow` 来防止多个供能塔同时为一个目标补充。
|
||||
5. **视觉效果**: 借鉴原版 `CompFacility`,在选中供能塔时,持续绘制到所有已连接消费者的连接线。
|
||||
* **依附于**: 中央供能塔 (`Building_NutrientTower`)。
|
||||
|
||||
#### b. `CompRefuelableNutrition` (修改现有组件)
|
||||
|
||||
* **职责**:
|
||||
1. **接收燃料**: 增加一个新的公共方法 `ReceiveFuelFromNetwork(float amount)`。
|
||||
2. **状态标记**: 增加一个临时的 `bool isBeingFueledNow` 字段。
|
||||
|
||||
#### c. “营养网络增效器” (新建筑)
|
||||
* **`ThingDef`**: 一个新的建筑,例如 `ARA_NutrientNetworkBooster`。
|
||||
* **`comps`**:
|
||||
* 拥有 `<li Class="CompProperties_Facility">`。
|
||||
* 在 `statOffsets` 中提供一个新的 `StatDef` 加成:`<NutrientTransmissionEfficiency>0.1</NutrientTransmissionEfficiency>`。
|
||||
|
||||
#### d. “中央供能塔” (修改)
|
||||
* **`comps`**:
|
||||
* 除了原计划的组件,新增 `<li Class="CompProperties_AffectedByFacilities">`,使其可以链接到“增效器”。
|
||||
|
||||
### 3.2. 工作流程 (Mermaid)
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
subgraph "增效器 (Booster)"
|
||||
C(Building_Booster)
|
||||
C -- 提供加成 --> B
|
||||
end
|
||||
|
||||
subgraph "中央供能塔 (Provider)"
|
||||
B(Building_NutrientTower)
|
||||
B -- 拥有 --> B1[CompAffectedByFacilities]
|
||||
B -- 拥有 --> B2[CompNutrientNetworkFeeder]
|
||||
end
|
||||
|
||||
subgraph "消费者建筑 (Consumer)"
|
||||
A(Building_Existing)
|
||||
end
|
||||
|
||||
B2 -- 1. 扫描并连接 --> A
|
||||
B2 -- 2. 选中时绘制连接线 --> A
|
||||
C -- "statOffsets" --> B1
|
||||
B2 -- 3. 从B1读取效率加成 --> B1
|
||||
B2 -- 4. 根据效率进行供能 --> A
|
||||
```
|
||||
|
||||
## 4. 实现细节与挑战
|
||||
|
||||
* **自定义StatDef**: 需要在XML中创建一个新的 `StatDef`,名为 `NutrientTransmissionEfficiency`。
|
||||
* **性能优化**: 保持合理的扫描间隔。
|
||||
* **范围限制**: 供能塔的服务范围和增效器的影响范围都应是可配置的。
|
||||
* **视觉反馈**:
|
||||
* 供能塔 -> 消费者:绘制连接线,颜色可根据消费者燃料状态变化。
|
||||
* 增效器 -> 供能塔:使用原版的 `CompFacility` 机制,在选中增效器时会自动显示其影响的供能塔。
|
||||
|
||||
## 5. XML 定义 (示例)
|
||||
|
||||
#### a. 新的 StatDef
|
||||
```xml
|
||||
<StatDef>
|
||||
<defName>NutrientTransmissionEfficiency</defName>
|
||||
<label>nutrient transmission efficiency</label>
|
||||
<description>Reduces the amount of fuel consumed when transfering nutrients wirelessly. The final cost is multiplied by (1 - efficiency).</description>
|
||||
<category>Building</category>
|
||||
<defaultBaseValue>0</defaultBaseValue>
|
||||
<minValue>0</minValue>
|
||||
<toStringStyle>PercentZero</toStringStyle>
|
||||
</StatDef>
|
||||
```
|
||||
|
||||
#### b. 增效器 ThingDef
|
||||
```xml
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_NutrientNetworkBooster</defName>
|
||||
<!-- ...其他属性... -->
|
||||
<comps>
|
||||
<li Class="CompProperties_Facility">
|
||||
<linkableBuildings>
|
||||
<li>ARA_NutrientNetworkTower</li>
|
||||
</linkableBuildings>
|
||||
<statOffsets>
|
||||
<NutrientTransmissionEfficiency>0.1</NutrientTransmissionEfficiency>
|
||||
</statOffsets>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
```
|
||||
|
||||
#### c. 供能塔 ThingDef
|
||||
```xml
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_NutrientNetworkTower</defName>
|
||||
<!-- ...其他属性... -->
|
||||
<comps>
|
||||
<li Class="CompProperties_RefuelableNutrition">...</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_NutrientNetworkFeeder">...</li>
|
||||
<li Class="CompProperties_AffectedByFacilities">
|
||||
<linkableFacilities>
|
||||
<li>ARA_NutrientNetworkBooster</li>
|
||||
</linkableFacilities>
|
||||
</li>
|
||||
<!-- ...Flickable, Breakdownable, Power... -->
|
||||
</comps>
|
||||
</ThingDef>
|
||||
```
|
||||
|
||||
---
|
||||
这份文档现在包含了我们所有的设计决策,形成了一个完整且强大的功能蓝图。
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
|
||||
"WorkspaceRootPath": "C:\\Steam\\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\\verb\\verb_shootmeltbeam.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|c:\\steam\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\verb\\verb_shootmeltbeam.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:verb\\verb_shootmeltbeam.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\\verb\\compcleave.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\verb\\compcleave.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:verb\\compcleave.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
@@ -28,11 +28,11 @@
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Verb_ShootMeltBeam.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verb\\Verb_ShootMeltBeam.cs",
|
||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verb\\Verb_ShootMeltBeam.cs",
|
||||
"RelativeDocumentMoniker": "Verb\\Verb_ShootMeltBeam.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verb\\Verb_ShootMeltBeam.cs",
|
||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verb\\Verb_ShootMeltBeam.cs",
|
||||
"RelativeToolTip": "Verb\\Verb_ShootMeltBeam.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA8AAAAyAAAAAAAAAA==",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvwAAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-09-09T03:04:00.299Z",
|
||||
"EditorCaption": ""
|
||||
@@ -41,9 +41,9 @@
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "CompCleave.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verb\\CompCleave.cs",
|
||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verb\\CompCleave.cs",
|
||||
"RelativeDocumentMoniker": "Verb\\CompCleave.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verb\\CompCleave.cs",
|
||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verb\\CompCleave.cs",
|
||||
"RelativeToolTip": "Verb\\CompCleave.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAmAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
|
||||
@@ -85,7 +85,8 @@ namespace ArachnaeSwarm
|
||||
// 休眠期 (只有在强制休眠或日程为睡眠/娱乐时才恢复)
|
||||
if (needs.rest != null)
|
||||
{
|
||||
virtualRest = Mathf.Min(VirtualRestMax, virtualRest + (Need_Rest.BaseRestGainPerTick * ((CompProperties_Morphable)compMorphable.props).restGainMultiplier)); // 使用XML中定义的乘数
|
||||
// 使用XML中定义的乘数
|
||||
virtualRest = Mathf.Min(VirtualRestMax, virtualRest + (Need_Rest.BaseRestGainPerTick * ((CompProperties_Morphable)compMorphable.props).restGainMultiplier));
|
||||
}
|
||||
StopResearchEffect();
|
||||
}
|
||||
@@ -215,21 +216,35 @@ namespace ArachnaeSwarm
|
||||
|
||||
private void ForceRevert(DamageInfo dinfo)
|
||||
{
|
||||
Pawn pawn = compMorphable.StoredPawn;
|
||||
Map map = this.Map;
|
||||
IntVec3 position = this.Position;
|
||||
|
||||
compMorphable.SetStoredPawn(null);
|
||||
if (compMorphable?.StoredPawn == null) return;
|
||||
|
||||
Pawn pawn = compMorphable.StoredPawn;
|
||||
|
||||
// 计算将要对 Pawn 造成的伤害
|
||||
float damageProportion = dinfo.Amount / this.def.statBases.GetStatValueFromList(StatDefOf.MaxHitPoints, 1f);
|
||||
float pawnDamage = pawn.MaxHitPoints * damageProportion;
|
||||
DamageInfo pawnDinfo = new DamageInfo(dinfo.Def, pawnDamage, dinfo.ArmorPenetrationInt, dinfo.Angle, dinfo.Instigator, null, dinfo.Weapon, dinfo.Category, dinfo.IntendedTarget);
|
||||
|
||||
this.Destroy(DestroyMode.Vanish);
|
||||
|
||||
GenSpawn.Spawn(pawn, position, map, WipeMode.Vanish);
|
||||
PawnComponentsUtility.AddComponentsForSpawn(pawn);
|
||||
pawn.TakeDamage(pawnDinfo);
|
||||
// 关键修复:创建一个新的、干净的DamageInfo,不指定hitPart,让游戏自动选择有效的部位
|
||||
DamageInfo pawnDinfo = new DamageInfo(
|
||||
def: dinfo.Def,
|
||||
amount: pawnDamage,
|
||||
armorPenetration: dinfo.ArmorPenetrationInt,
|
||||
angle: dinfo.Angle,
|
||||
instigator: dinfo.Instigator,
|
||||
hitPart: null, // 明确设为null,防止继承无效上下文
|
||||
weapon: dinfo.Weapon,
|
||||
category: dinfo.Category,
|
||||
intendedTarget: dinfo.IntendedTarget
|
||||
);
|
||||
|
||||
// 调用统一的转换方法,它会处理建筑的移除、Pawn的生成和状态同步
|
||||
compMorphable.TransformBackToPawn();
|
||||
|
||||
// 在新生成的 Pawn 身上施加伤害
|
||||
if(pawn.Spawned)
|
||||
{
|
||||
pawn.TakeDamage(pawnDinfo);
|
||||
}
|
||||
|
||||
Messages.Message("PawnTransformer_ForcedRevert".Translate(pawn.Named("PAWN")), pawn, MessageTypeDefOf.NegativeEvent);
|
||||
}
|
||||
@@ -242,12 +257,14 @@ namespace ArachnaeSwarm
|
||||
researchEffecter = null;
|
||||
}
|
||||
|
||||
if (this.Spawned && compMorphable != null && compMorphable.StoredPawn != null)
|
||||
if (this.Spawned && compMorphable?.StoredPawn != null)
|
||||
{
|
||||
Pawn pawn = compMorphable.StoredPawn;
|
||||
GenSpawn.Spawn(pawn, this.Position, this.Map, WipeMode.Vanish);
|
||||
PawnComponentsUtility.AddComponentsForSpawn(pawn);
|
||||
|
||||
Pawn pawn = compMorphable.StoredPawn; // 缓存Pawn的引用
|
||||
|
||||
// 调用统一的转换方法
|
||||
compMorphable.TransformBackToPawn();
|
||||
|
||||
// 仅在 DestroyMode.KillFinalize 时显示消息
|
||||
if (mode == DestroyMode.KillFinalize)
|
||||
{
|
||||
Messages.Message("PawnTransformer_BuildingDestroyed".Translate(pawn.Named("PAWN"), this.Named("BUILDING")), pawn, MessageTypeDefOf.NegativeEvent);
|
||||
108
Source/ArachnaeSwarm/Abilities/ARA_Morphable/CompMorphable.cs
Normal file
@@ -0,0 +1,108 @@
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompMorphable : ThingComp
|
||||
{
|
||||
private Pawn storedPawn;
|
||||
public bool wasEjectedForFuel = false;
|
||||
public Pawn StoredPawn => storedPawn;
|
||||
|
||||
public CompProperties_Morphable Props => (CompProperties_Morphable)props;
|
||||
|
||||
public void SetStoredPawn(Pawn pawn)
|
||||
{
|
||||
this.storedPawn = pawn;
|
||||
}
|
||||
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
Scribe_Deep.Look(ref storedPawn, "storedPawn", false);
|
||||
}
|
||||
|
||||
public override IEnumerable<Gizmo> CompGetGizmosExtra()
|
||||
{
|
||||
if (parent.Faction == Faction.OfPlayer && storedPawn != null)
|
||||
{
|
||||
Command_Action command = new Command_Action();
|
||||
command.defaultLabel = Props.gizmoLabel;
|
||||
command.defaultDesc = Props.gizmoDesc;
|
||||
command.action = () => { TransformBackToPawn(); };
|
||||
|
||||
if (!Props.gizmoIconPath.NullOrEmpty())
|
||||
{
|
||||
command.icon = ContentFinder<UnityEngine.Texture2D>.Get(Props.gizmoIconPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
command.icon = TexCommand.ReleaseAnimals; // Fallback icon
|
||||
}
|
||||
|
||||
yield return command;
|
||||
}
|
||||
}
|
||||
|
||||
public void TransformBackToPawn()
|
||||
{
|
||||
if (storedPawn == null || !this.parent.Spawned) return;
|
||||
|
||||
Building building = (Building)this.parent;
|
||||
Map map = building.Map;
|
||||
|
||||
// 获取建筑和相关组件的引用
|
||||
var refuelableComp = building.GetComp<CompRefuelableNutrition>();
|
||||
var buildingMorphable = building as Building_Morphable;
|
||||
|
||||
// 在移除建筑之前,获取并缓存所有必要的数据
|
||||
float cachedFuel = 0f;
|
||||
float cachedFuelCapacity = 1f; // Avoid division by zero
|
||||
if (refuelableComp != null)
|
||||
{
|
||||
cachedFuel = refuelableComp.Fuel;
|
||||
cachedFuelCapacity = refuelableComp.Props.fuelCapacity;
|
||||
}
|
||||
|
||||
float cachedVirtualRest = 0f;
|
||||
float cachedVirtualRestMax = 1f; // Avoid division by zero
|
||||
if (buildingMorphable != null)
|
||||
{
|
||||
cachedVirtualRest = buildingMorphable.virtualRest;
|
||||
cachedVirtualRestMax = buildingMorphable.VirtualRestMax;
|
||||
}
|
||||
|
||||
// 清理Pawn引用,防止在DeSpawn过程中触发循环
|
||||
Pawn pawnToSpawn = storedPawn;
|
||||
this.storedPawn = null;
|
||||
|
||||
// 移除建筑
|
||||
building.DeSpawn(DestroyMode.Vanish);
|
||||
|
||||
// 重新生成Pawn
|
||||
GenSpawn.Spawn(pawnToSpawn, building.Position, map, WipeMode.Vanish);
|
||||
|
||||
// 重新初始化Pawn在地图上所需的组件
|
||||
PawnComponentsUtility.AddComponentsForSpawn(pawnToSpawn);
|
||||
|
||||
// 同步燃料到食物 (使用缓存的值)
|
||||
var needs = pawnToSpawn.needs;
|
||||
if (needs?.food != null)
|
||||
{
|
||||
needs.food.CurLevelPercentage = cachedFuel / cachedFuelCapacity;
|
||||
}
|
||||
if (needs?.rest != null)
|
||||
{
|
||||
needs.rest.CurLevelPercentage = cachedVirtualRest / cachedVirtualRestMax;
|
||||
}
|
||||
|
||||
// 选中Pawn
|
||||
if (Find.Selector.IsSelected(building))
|
||||
{
|
||||
Find.Selector.Select(pawnToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,12 @@ namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_Morphable : CompProperties
|
||||
{
|
||||
public float restGainMultiplier = 1f; // Default to 1.0 if not specified in XML
|
||||
public float restGainMultiplier = 1f;
|
||||
|
||||
// Gizmo properties
|
||||
public string gizmoLabel = "离开织座";
|
||||
public string gizmoDesc = "使织域种离开织座。";
|
||||
public string gizmoIconPath;
|
||||
|
||||
public CompProperties_Morphable()
|
||||
{
|
||||
@@ -0,0 +1,80 @@
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using System.Linq;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompAbilityEffect_PsychicBrainburn : CompAbilityEffect
|
||||
{
|
||||
public new CompProperties_PsychicBrainburn Props => (CompProperties_PsychicBrainburn)props;
|
||||
|
||||
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||
{
|
||||
base.Apply(target, dest);
|
||||
|
||||
Pawn pawn = target.Pawn;
|
||||
if (pawn == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 查找作为意识来源的身体部位
|
||||
BodyPartRecord brain = pawn.health.hediffSet.GetNotMissingParts()
|
||||
.FirstOrDefault(p => p.def.tags.Contains(BodyPartTagDefOf.ConsciousnessSource));
|
||||
|
||||
if (brain != null)
|
||||
{
|
||||
// 施加巨大伤害以摧毁大脑
|
||||
float damageAmount = 99999f;
|
||||
float penetration = 999f;
|
||||
pawn.TakeDamage(new DamageInfo(DamageDefOf.Burn, damageAmount, penetration, -1f, parent.pawn, brain));
|
||||
|
||||
// 如果在XML中定义了效果,则生成它
|
||||
if (Props.effecterDef != null)
|
||||
{
|
||||
Props.effecterDef.Spawn(pawn.Position, pawn.Map, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
||||
{
|
||||
Pawn pawn = target.Pawn;
|
||||
if (pawn == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查目标是否是血肉生物(如果XML中设置为需要)
|
||||
if (Props.requiresFlesh && !pawn.RaceProps.IsFlesh)
|
||||
{
|
||||
if (throwMessages)
|
||||
{
|
||||
Messages.Message("MessageCannotUseOnMechanical".Translate(pawn.Named("PAWN")), pawn, MessageTypeDefOf.RejectInput);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查目标是否有意识来源部位
|
||||
BodyPartRecord brain = pawn.health.hediffSet.GetNotMissingParts()
|
||||
.FirstOrDefault(p => p.def.tags.Contains(BodyPartTagDefOf.ConsciousnessSource));
|
||||
|
||||
if (brain == null)
|
||||
{
|
||||
if (throwMessages)
|
||||
{
|
||||
Messages.Message("MessageTargetHasNoBrain".Translate(pawn.Named("PAWN")), pawn, MessageTypeDefOf.RejectInput);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.Valid(target, throwMessages);
|
||||
}
|
||||
|
||||
public override bool AICanTargetNow(LocalTargetInfo target)
|
||||
{
|
||||
// AI不应主动使用此技能
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_PsychicBrainburn : CompProperties_AbilityEffect
|
||||
{
|
||||
// 如果为true,则技能只能对血肉生物使用。
|
||||
// 如果为false,则可以对机械体等非血肉生物使用。
|
||||
public bool requiresFlesh = true;
|
||||
|
||||
// 在目标身上产生的视觉效果。
|
||||
public EffecterDef effecterDef;
|
||||
|
||||
public CompProperties_PsychicBrainburn()
|
||||
{
|
||||
compClass = typeof(CompAbilityEffect_PsychicBrainburn);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,137 +68,132 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ARA_CustomUniqueWeapon\CompCustomUniqueWeapon.cs" />
|
||||
<Compile Include="ARA_CustomUniqueWeapon\CompProperties_CustomUniqueWeapon.cs" />
|
||||
<Compile Include="ARA_GiveHediffsInRangeToRace\HediffCompProperties_GiveHediffsInRangeToRace.cs" />
|
||||
<Compile Include="ARA_GiveHediffsInRangeToRace\HediffComp_GiveHediffsInRangeToRace.cs" />
|
||||
<Compile Include="ARA_SpawnPawnFromList\CompProperties_SpawnPawnFromList.cs" />
|
||||
<Compile Include="ARA_SpawnPawnFromList\CompSpawnPawnFromList.cs" />
|
||||
<Compile Include="ARA_SpawnPawnFromList\JobDriver_Incubate.cs" />
|
||||
<Compile Include="ARA_SpawnPawnFromList\CompQueuedPawnSpawner.cs" />
|
||||
<Compile Include="ARA_SpawnPawnFromList\ProductionContracts.cs" />
|
||||
<Compile Include="ARA_SpawnPawnFromList\JobDriver_AddToQueue.cs" />
|
||||
<Compile Include="ARA_QueenAbility\CompProperties_AbilitySprayLiquidMulti.cs" />
|
||||
<Compile Include="ARA_QueenAbility\CompAbilityEffect_SprayLiquidMulti.cs" />
|
||||
<Compile Include="DRM_HediffCurseFlame\Hediff_CurseFlame.cs" />
|
||||
<Compile Include="ARA_QueenAbility\CompAbilityEffect_NeedCost.cs" />
|
||||
<Compile Include="ARA_QueenAbility\CompAbilityEffect_BodyPartCheck.cs" />
|
||||
<Compile Include="ARA_QueenAbility\CompAbilityEffect_ResearchPrereq.cs" />
|
||||
<Compile Include="ARA_HiveMind\Hediff_HiveMindMaster.cs" />
|
||||
<Compile Include="ARA_HiveMind\Hediff_HiveMindDrone.cs" />
|
||||
<Compile Include="ARA_HiveMind\HediffCompProperties_HiveMindDrone.cs" />
|
||||
<Compile Include="ARA_HiveMind\HediffComp_HiveMindDrone.cs" />
|
||||
<Compile Include="ARA_HiveMind\HediffComp_HiveMindMaster.cs" />
|
||||
<Compile Include="ARA_HiveMind\CompAbilityEffect_BindDrone.cs" />
|
||||
<Compile Include="ARA_HiveMind\CompProperties_AbilityBindDrone.cs" />
|
||||
<Compile Include="ARA_SpawnPawnFromList\JobGiver_MaintainBuildings.cs" />
|
||||
<Compile Include="Verb\CompCleave.cs" />
|
||||
<Compile Include="Verb\CompMultiStrike.cs" />
|
||||
<Compile Include="Verb\VerbPropertiesExplosiveBeam.cs" />
|
||||
<Compile Include="Verb\VerbProperties_Excalibur.cs" />
|
||||
<Compile Include="Verb\VerbProperties_WeaponStealBeam.cs" />
|
||||
<Compile Include="Verb\Verb_MeleeAttack_Cleave.cs" />
|
||||
<Compile Include="Verb\Verb_MeleeAttack_MultiStrike.cs" />
|
||||
<Compile Include="Verb\Verb_ShootArc.cs" />
|
||||
<Compile Include="Verb\Verb_ShootBeamExplosive.cs" />
|
||||
<Compile Include="Verb\Verb_ShootMeltBeam.cs" />
|
||||
<Compile Include="Verb\Verb_ShootShotgun.cs" />
|
||||
<Compile Include="Verb\Verb_ShootWeaponStealBeam.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ARA_CompHediffGiver\CompHediffGiver.cs" />
|
||||
<Compile Include="ARA_CompHediffGiver\CompProperties_HediffGiver.cs" />
|
||||
<Compile Include="ARA_CompMilkableArachnae\CompMilkableArachnae.cs" />
|
||||
<Compile Include="ARA_CompMilkableArachnae\CompProperties_MilkableArachnae.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MainHarmony.cs" />
|
||||
<Compile Include="ARA_TrainingWork\JobPlant\ThinkNode_ConditionalAnimalShouldDoGrowingWork.cs" />
|
||||
<Compile Include="ARA_TrainingWork\CompAdvancedTraining.cs" />
|
||||
<Compile Include="ARA_TrainingWork\JobPlant\JobGiver_Grower.cs" />
|
||||
<Compile Include="ARA_TrainingWork\JobPlant\WorkGiver_ArachnaeSow.cs" />
|
||||
<Compile Include="ARA_TrainingWork\TrainingSystem_Patcher.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ARA_BuildingTerrainSpawn\CompProperties_DelayedTerrainSpawn.cs" />
|
||||
<Compile Include="ARA_BuildingTerrainSpawn\CompDelayedTerrainSpawn.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ARA_AutoMechCarrier\CompAutoMechCarrier.cs" />
|
||||
<Compile Include="ARA_AutoMechCarrier\CompProperties_AutoMechCarrier.cs" />
|
||||
<Compile Include="ARA_AutoMechCarrier\PawnProductionEntry.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ARA_CompInteractiveProducer\CompInteractiveProducer.cs" />
|
||||
<Compile Include="ARA_CompInteractiveProducer\JobDriver_StartProduction.cs" />
|
||||
<Compile Include="ARA_CompInteractiveProducer\CompRefuelableNutrition.cs" />
|
||||
<Compile Include="ARA_CompInteractiveProducer\DataContracts.cs" />
|
||||
<Compile Include="ARA_CompInteractiveProducer\CompTemperatureRuinableDamage.cs" />
|
||||
<Compile Include="ARA_CompInteractiveProducer\CompQueuedInteractiveProducer.cs" />
|
||||
<Compile Include="ARA_CompInteractiveProducer\JobDriver_AddProcessToQueue.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ARA_HuggingFace\Hediff_Possession.cs" />
|
||||
<Compile Include="ARA_HuggingFace\PawnDataUtility.cs" />
|
||||
<Compile Include="ARA_HuggingFace\CompAbilityEffect_Possess.cs" />
|
||||
<Compile Include="ARA_HuggingFace\CompProperties_AbilityPossess.cs" />
|
||||
<Compile Include="ARA_HuggingFace\Verb_JumpAndCastOnLanding.cs" />
|
||||
<Compile Include="ARA_HuggingFace\OriginalPawnData.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ARA_TrainingWork\JobClean\ARA_TrainableDefOf_Cleaning.cs" />
|
||||
<Compile Include="ARA_TrainingWork\JobClean\JobGiver_Cleaner.cs" />
|
||||
<Compile Include="ARA_TrainingWork\JobClean\ThinkNode_ConditionalAnimalShouldDoCleaningWork.cs" />
|
||||
<Compile Include="ARA_TrainingWork\JobClean\WorkGiver_ArachnaeClean.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="HediffComp_Temperature.cs" />
|
||||
<Compile Include="CompPawnFlight.cs" />
|
||||
<Compile Include="CompProperties_PawnFlight.cs" />
|
||||
<Compile Include="HarmonyPatches.cs" />
|
||||
<Compile Include="OPToxicGas.cs" />
|
||||
<Compile Include="PawnRenderNodeWorker_AttachmentBody_NoFlight.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CompAbilityEffect_LaunchMultiProjectile.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Abilities\CompAbilityEffect_TrackingCharge.cs" />
|
||||
<Compile Include="Abilities\CompProperties_TrackingCharge.cs" />
|
||||
<Compile Include="Abilities\PawnFlyer_TrackingCharge.cs" />
|
||||
<Compile Include="Abilities\Verb_CastAbilityTrackingCharge.cs" />
|
||||
<Compile Include="Abilities\ARA_HuggingFace\CompAbilityEffect_Possess.cs" />
|
||||
<Compile Include="Abilities\ARA_HuggingFace\CompProperties_AbilityPossess.cs" />
|
||||
<Compile Include="Abilities\ARA_HuggingFace\Hediff_Possession.cs" />
|
||||
<Compile Include="Abilities\ARA_HuggingFace\OriginalPawnData.cs" />
|
||||
<Compile Include="Abilities\ARA_HuggingFace\PawnDataUtility.cs" />
|
||||
<Compile Include="Abilities\ARA_HuggingFace\Verb_JumpAndCastOnLanding.cs" />
|
||||
<Compile Include="Abilities\ARA_Morphable\Building_Morphable.cs" />
|
||||
<Compile Include="Abilities\ARA_Morphable\CompAbilityEffect_Transform.cs" />
|
||||
<Compile Include="Abilities\ARA_Morphable\CompMorphable.cs" />
|
||||
<Compile Include="Abilities\ARA_Morphable\CompProperties_AbilityTransform.cs" />
|
||||
<Compile Include="Abilities\ARA_Morphable\CompProperties_Morphable.cs" />
|
||||
<Compile Include="Abilities\ARA_QueenAbility\CompAbilityEffect_BodyPartCheck.cs" />
|
||||
<Compile Include="Abilities\ARA_QueenAbility\CompAbilityEffect_NeedCost.cs" />
|
||||
<Compile Include="Abilities\ARA_QueenAbility\CompAbilityEffect_ResearchPrereq.cs" />
|
||||
<Compile Include="Abilities\ARA_QueenAbility\CompAbilityEffect_SprayLiquidMulti.cs" />
|
||||
<Compile Include="Abilities\ARA_QueenAbility\CompProperties_AbilitySprayLiquidMulti.cs" />
|
||||
<Compile Include="Abilities\CompAbilityEffect_DRM_Deaddustpop.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="HediffComp_SpawnPawnOnRemoved.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Projectiles\BulletWithTrail.cs" />
|
||||
<Compile Include="Projectiles\ExplosiveTrackingBulletDef.cs" />
|
||||
<Compile Include="Projectiles\Projectile_ConfigurableHellsphereCannon.cs" />
|
||||
<Compile Include="Projectiles\Projectile_CruiseMissile.cs" />
|
||||
<Compile Include="Projectiles\Projectile_ExplosiveTrackingBullet.cs" />
|
||||
<Compile Include="Projectiles\Projectile_ExplosiveWithTrail.cs" />
|
||||
<Compile Include="Projectiles\Projectile_TrackingBullet.cs" />
|
||||
<Compile Include="Projectiles\Projectile_WulaPenetratingBeam.cs" />
|
||||
<Compile Include="Projectiles\Projectile_WulaPenetratingBullet.cs" />
|
||||
<Compile Include="Projectiles\TrackingBulletDef.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="HediffComp_NecroticTransformation.cs" />
|
||||
<Compile Include="Hediff_NecroticVirus_Configurable.cs" />
|
||||
<Compile Include="NecroticTransformationUtility.cs" />
|
||||
<Compile Include="ProphecyGearEffect.cs" />
|
||||
<Compile Include="Hediff_ConfigurableMutant.cs" />
|
||||
<Compile Include="HediffComp_Symbiosis.cs" />
|
||||
<Compile Include="HediffGiver_RandomWithSeverity.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Morphable\CompProperties_Morphable.cs" />
|
||||
<Compile Include="Morphable\CompMorphable.cs" />
|
||||
<Compile Include="Morphable\CompProperties_AbilityTransform.cs" />
|
||||
<Compile Include="Morphable\CompAbilityEffect_Transform.cs" />
|
||||
<Compile Include="Morphable\Building_Morphable.cs" />
|
||||
<Compile Include="Abilities\CompAbilityEffect_LaunchMultiProjectile.cs" />
|
||||
<Compile Include="Abilities\PsychicBrainburn\CompAbilityEffect_PsychicBrainburn.cs" />
|
||||
<Compile Include="Abilities\PsychicBrainburn\CompProperties_PsychicBrainburn.cs" />
|
||||
<Compile Include="Abilities\TrackingCharge\CompAbilityEffect_TrackingCharge.cs" />
|
||||
<Compile Include="Abilities\TrackingCharge\CompProperties_TrackingCharge.cs" />
|
||||
<Compile Include="Abilities\TrackingCharge\PawnFlyer_TrackingCharge.cs" />
|
||||
<Compile Include="Abilities\TrackingCharge\Verb_CastAbilityTrackingCharge.cs" />
|
||||
<Compile Include="Building_Comps\ARA_BuildingTerrainSpawn\CompDelayedTerrainSpawn.cs" />
|
||||
<Compile Include="Building_Comps\ARA_BuildingTerrainSpawn\CompProperties_DelayedTerrainSpawn.cs" />
|
||||
<Compile Include="Building_Comps\ARA_CompInteractiveProducer\CompInteractiveProducer.cs" />
|
||||
<Compile Include="Building_Comps\ARA_CompInteractiveProducer\CompQueuedInteractiveProducer.cs" />
|
||||
<Compile Include="Building_Comps\ARA_CompInteractiveProducer\CompRefuelableNutrition.cs" />
|
||||
<Compile Include="Building_Comps\ARA_CompInteractiveProducer\CompTemperatureRuinableDamage.cs" />
|
||||
<Compile Include="Building_Comps\ARA_CompInteractiveProducer\DataContracts.cs" />
|
||||
<Compile Include="Building_Comps\ARA_CompInteractiveProducer\JobDriver_AddProcessToQueue.cs" />
|
||||
<Compile Include="Building_Comps\ARA_CompInteractiveProducer\JobDriver_StartProduction.cs" />
|
||||
<Compile Include="Building_Comps\ARA_CompTempControl\Building_SmartThermostat.cs" />
|
||||
<Compile Include="Building_Comps\ARA_CompTempControl\CompTempControl_Fixed.cs" />
|
||||
<Compile Include="Building_Comps\ARA_HunterTrap\Building_TrapReleaseRandom.cs" />
|
||||
<Compile Include="Building_Comps\ARA_HunterTrap\CompHunterExplosion.cs" />
|
||||
<Compile Include="Building_Comps\ARA_HunterTrap\CompProperties_HunterExplosion.cs" />
|
||||
<Compile Include="Building_Comps\ARA_HunterTrap\TrapReleaseRandomExtension.cs" />
|
||||
<Compile Include="Building_Comps\ARA_NutrientNetwork\CompFacility_GrowthVatBooster.cs" />
|
||||
<Compile Include="Building_Comps\ARA_NutrientNetwork\CompLineDrawer.cs" />
|
||||
<Compile Include="Building_Comps\ARA_NutrientNetwork\CompNutrientProvider.cs" />
|
||||
<Compile Include="Building_Comps\ARA_NutrientNetwork\CompProperties_NutrientProvider.cs" />
|
||||
<Compile Include="Building_Comps\ARA_NutrientVat\Building_NutrientVat.cs" />
|
||||
<Compile Include="Building_Comps\ARA_NutrientVat\DefModExtension_NutrientVat.cs" />
|
||||
<Compile Include="Building_Comps\ARA_SpawnPawnFromList\CompProperties_SpawnPawnFromList.cs" />
|
||||
<Compile Include="Building_Comps\ARA_SpawnPawnFromList\CompQueuedPawnSpawner.cs" />
|
||||
<Compile Include="Building_Comps\ARA_SpawnPawnFromList\CompSpawnPawnFromList.cs" />
|
||||
<Compile Include="Building_Comps\ARA_SpawnPawnFromList\JobDriver_AddToQueue.cs" />
|
||||
<Compile Include="Building_Comps\ARA_SpawnPawnFromList\JobDriver_Incubate.cs" />
|
||||
<Compile Include="Building_Comps\ARA_SpawnPawnFromList\JobGiver_MaintainBuildings.cs" />
|
||||
<Compile Include="Building_Comps\ARA_SpawnPawnFromList\ProductionContracts.cs" />
|
||||
<Compile Include="Building_Comps\WULA_MutiFuelSpawner\CompMultiFuelSpawner.cs" />
|
||||
<Compile Include="Building_Comps\WULA_MutiFuelSpawner\CompRefuelableNutrition_WithKey.cs" />
|
||||
<Compile Include="Building_Comps\WULA_MutiFuelSpawner\CompRefuelableWithKey.cs" />
|
||||
<Compile Include="Building_Comps\WULA_MutiFuelSpawner\IFuelSource.cs" />
|
||||
<Compile Include="Building_Comps\WULA_MutiFuelSpawner\Patch_CompRefuelableWithKey.cs" />
|
||||
<Compile Include="Hediffs\ARA_ConfigurableMutant\Hediff_ConfigurableMutant.cs" />
|
||||
<Compile Include="Hediffs\ARA_ConfigurableMutant\Hediff_NecroticVirus_Configurable.cs" />
|
||||
<Compile Include="Hediffs\ARA_ConfigurableMutant\HediffComp_NecroticTransformation.cs" />
|
||||
<Compile Include="Hediffs\ARA_ConfigurableMutant\HediffComp_Symbiosis.cs" />
|
||||
<Compile Include="Hediffs\ARA_ConfigurableMutant\NecroticTransformationUtility.cs" />
|
||||
<Compile Include="Hediffs\ARA_HiveMind\CompAbilityEffect_BindDrone.cs" />
|
||||
<Compile Include="Hediffs\ARA_HiveMind\CompProperties_AbilityBindDrone.cs" />
|
||||
<Compile Include="Hediffs\ARA_HiveMind\Hediff_HiveMindDrone.cs" />
|
||||
<Compile Include="Hediffs\ARA_HiveMind\Hediff_HiveMindMaster.cs" />
|
||||
<Compile Include="Hediffs\ARA_HiveMind\HediffComp_HiveMindDrone.cs" />
|
||||
<Compile Include="Hediffs\ARA_HiveMind\HediffComp_HiveMindMaster.cs" />
|
||||
<Compile Include="Hediffs\ARA_HiveMind\HediffCompProperties_HiveMindDrone.cs" />
|
||||
<Compile Include="Hediffs\DRM_HediffCurseFlame\Hediff_CurseFlame.cs" />
|
||||
<Compile Include="Hediffs\HediffComp_SpawnPawnOnRemoved.cs" />
|
||||
<Compile Include="Hediffs\HediffComp_Temperature.cs" />
|
||||
<Compile Include="Hediffs\HediffComp_TerrainBasedSeverity\HediffComp_TerrainBasedSeverity.cs" />
|
||||
<Compile Include="Hediffs\HediffComp_TerrainBasedSeverity\HediffCompProperties_TerrainBasedSeverity.cs" />
|
||||
<Compile Include="Hediffs\HediffGiver_RandomWithSeverity.cs" />
|
||||
<Compile Include="Hediffs\ProphecyGearEffect.cs" />
|
||||
<Compile Include="Hediffs\WULA_HediffDamgeShield\DRMDamageShield.cs" />
|
||||
<Compile Include="Hediffs\WULA_HediffDamgeShield\Hediff_DamageShield.cs" />
|
||||
<Compile Include="MainHarmony.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_AutoMechCarrier\CompAutoMechCarrier.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_AutoMechCarrier\CompProperties_AutoMechCarrier.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_AutoMechCarrier\PawnProductionEntry.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_CompHediffGiver\CompHediffGiver.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_CompHediffGiver\CompProperties_HediffGiver.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_CompMilkableArachnae\CompMilkableArachnae.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_CompMilkableArachnae\CompProperties_MilkableArachnae.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_Flight\CompPawnFlight.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_Flight\CompProperties_PawnFlight.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_Flight\Pawn_FlightTrackerPatches.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_Flight\PawnRenderNodeWorker_AttachmentBody_NoFlight.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_GiveHediffsInRangeToRace\HediffComp_GiveHediffsInRangeToRace.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_GiveHediffsInRangeToRace\HediffCompProperties_GiveHediffsInRangeToRace.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_TrainingWork\CompAdvancedTraining.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_TrainingWork\JobClean\ARA_TrainableDefOf_Cleaning.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_TrainingWork\JobClean\JobGiver_Cleaner.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_TrainingWork\JobClean\ThinkNode_ConditionalAnimalShouldDoCleaningWork.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_TrainingWork\JobClean\WorkGiver_ArachnaeClean.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_TrainingWork\JobPlant\JobGiver_Grower.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_TrainingWork\JobPlant\ThinkNode_ConditionalAnimalShouldDoGrowingWork.cs" />
|
||||
<Compile Include="Pawn_Comps\ARA_TrainingWork\JobPlant\WorkGiver_ArachnaeSow.cs" />
|
||||
<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\OPToxicGas.cs" />
|
||||
<Compile Include="Verbs\Cleave\CompCleave.cs" />
|
||||
<Compile Include="Verbs\Cleave\Verb_MeleeAttack_Cleave.cs" />
|
||||
<Compile Include="Verbs\ExplosiveBeam\Verb_ShootBeamExplosive.cs" />
|
||||
<Compile Include="Verbs\ExplosiveBeam\VerbPropertiesExplosiveBeam.cs" />
|
||||
<Compile Include="Verbs\MultiStrike\CompMultiStrike.cs" />
|
||||
<Compile Include="Verbs\MultiStrike\Verb_MeleeAttack_MultiStrike.cs" />
|
||||
<Compile Include="Verbs\Projectiles\BulletWithTrail.cs" />
|
||||
<Compile Include="Verbs\Projectiles\ExplosiveTrackingBulletDef.cs" />
|
||||
<Compile Include="Verbs\Projectiles\Projectile_ConfigurableHellsphereCannon.cs" />
|
||||
<Compile Include="Verbs\Projectiles\Projectile_CruiseMissile.cs" />
|
||||
<Compile Include="Verbs\Projectiles\Projectile_ExplosiveTrackingBullet.cs" />
|
||||
<Compile Include="Verbs\Projectiles\Projectile_ExplosiveWithTrail.cs" />
|
||||
<Compile Include="Verbs\Projectiles\Projectile_TrackingBullet.cs" />
|
||||
<Compile Include="Verbs\Projectiles\Projectile_WulaPenetratingBeam.cs" />
|
||||
<Compile Include="Verbs\Projectiles\Projectile_WulaPenetratingBullet.cs" />
|
||||
<Compile Include="Verbs\Projectiles\TrackingBulletDef.cs" />
|
||||
<Compile Include="Verbs\Verb_ShootArc.cs" />
|
||||
<Compile Include="Verbs\Verb_ShootMeltBeam.cs" />
|
||||
<Compile Include="Verbs\Verb_ShootShotgun.cs" />
|
||||
<Compile Include="Verbs\VerbProperties_Excalibur.cs" />
|
||||
<Compile Include="Verbs\WeaponStealBeam\Verb_ShootWeaponStealBeam.cs" />
|
||||
<Compile Include="Verbs\WeaponStealBeam\VerbProperties_WeaponStealBeam.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 自定义清理任务,删除obj文件夹中的临时文件 -->
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace ArachnaeSwarm
|
||||
}
|
||||
|
||||
[StaticConstructorOnStartup]
|
||||
public class CompRefuelableNutrition : CompRefuelable
|
||||
public class CompRefuelableNutrition : CompRefuelable, IFuelSource
|
||||
{
|
||||
public float currentConsumptionRate = 0f;
|
||||
public float NutritionStored => Fuel;
|
||||
@@ -68,6 +68,11 @@ namespace ArachnaeSwarm
|
||||
Messages.Message("MessageRefueled".Translate(parent.LabelShort, totalNutritionGained.ToString("0.##"), Props.fuelGizmoLabel), parent, MessageTypeDefOf.PositiveEvent);
|
||||
}
|
||||
}
|
||||
|
||||
public void ReceiveFuel(float amount)
|
||||
{
|
||||
base.Refuel(amount);
|
||||
}
|
||||
|
||||
public override string CompInspectStringExtra()
|
||||
{
|
||||
@@ -90,5 +95,13 @@ namespace ArachnaeSwarm
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
public new void Notify_UsedThisTick()
|
||||
{
|
||||
if (Props.consumeFuelOnlyWhenUsed)
|
||||
{
|
||||
ConsumeFuel(Props.fuelConsumptionRate / 60000f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class Building_SmartThermostat : Building_TempControl
|
||||
{
|
||||
private CompFlickable flickableComp;
|
||||
private const float HeatOutputMultiplier = 1.25f;
|
||||
private const float EfficiencyLossPerDegreeDifference = 1f / 130f;
|
||||
|
||||
public override void SpawnSetup(Map map, bool respawningAfterLoad)
|
||||
{
|
||||
base.SpawnSetup(map, respawningAfterLoad);
|
||||
flickableComp = GetComp<CompFlickable>();
|
||||
}
|
||||
|
||||
public override void TickRare()
|
||||
{
|
||||
// 如果设备被玩家关闭,则不工作
|
||||
if (flickableComp != null && !flickableComp.SwitchIsOn)
|
||||
{
|
||||
compTempControl.operatingAtHighPower = false;
|
||||
return;
|
||||
}
|
||||
|
||||
IntVec3 indoorCell = Position + IntVec3.South.RotatedBy(Rotation);
|
||||
IntVec3 outdoorCell = Position + IntVec3.North.RotatedBy(Rotation);
|
||||
|
||||
if (indoorCell.Impassable(Map) || outdoorCell.Impassable(Map))
|
||||
{
|
||||
compTempControl.operatingAtHighPower = false;
|
||||
return;
|
||||
}
|
||||
|
||||
float indoorTemp = indoorCell.GetTemperature(Map);
|
||||
float outdoorTemp = outdoorCell.GetTemperature(Map);
|
||||
float targetTemp = compTempControl.TargetTemperature;
|
||||
|
||||
float tempDifference = indoorTemp - outdoorTemp;
|
||||
float efficiency = 1f - Mathf.Abs(tempDifference) * EfficiencyLossPerDegreeDifference;
|
||||
if (efficiency < 0f)
|
||||
{
|
||||
efficiency = 0f;
|
||||
}
|
||||
|
||||
bool operating = false;
|
||||
|
||||
if (indoorTemp > targetTemp) // 制冷
|
||||
{
|
||||
float coolingEnergy = compTempControl.Props.energyPerSecond * efficiency * 4.1666665f;
|
||||
float tempChange = GenTemperature.ControlTemperatureTempChange(indoorCell, Map, -coolingEnergy, targetTemp);
|
||||
|
||||
if (!Mathf.Approximately(tempChange, 0f))
|
||||
{
|
||||
indoorCell.GetRoom(Map).Temperature += tempChange;
|
||||
GenTemperature.PushHeat(outdoorCell, Map, coolingEnergy * HeatOutputMultiplier);
|
||||
operating = true;
|
||||
}
|
||||
}
|
||||
else if (indoorTemp < targetTemp) // 制热
|
||||
{
|
||||
float heatingEnergy = compTempControl.Props.energyPerSecond * efficiency * 4.1666665f;
|
||||
float tempChange = GenTemperature.ControlTemperatureTempChange(indoorCell, Map, heatingEnergy, targetTemp);
|
||||
|
||||
if (!Mathf.Approximately(tempChange, 0f))
|
||||
{
|
||||
if (outdoorTemp > -100)
|
||||
{
|
||||
indoorCell.GetRoom(Map).Temperature += tempChange;
|
||||
GenTemperature.PushHeat(outdoorCell, Map, -heatingEnergy / HeatOutputMultiplier);
|
||||
operating = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compTempControl.operatingAtHighPower = operating;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
// First, we need a new properties class that points to our new component class
|
||||
public class CompProperties_TempControl_Fixed : CompProperties_TempControl
|
||||
{
|
||||
public CompProperties_TempControl_Fixed()
|
||||
{
|
||||
compClass = typeof(CompTempControl_Fixed);
|
||||
}
|
||||
}
|
||||
|
||||
// This is our new component class that inherits from the original
|
||||
public class CompTempControl_Fixed : CompTempControl
|
||||
{
|
||||
// We override the problematic method
|
||||
public override string CompInspectStringExtra()
|
||||
{
|
||||
// Call the original method to get its string
|
||||
string baseString = base.CompInspectStringExtra();
|
||||
|
||||
// If the string is not null, trim any whitespace from the end and return it
|
||||
if (!string.IsNullOrEmpty(baseString))
|
||||
{
|
||||
return baseString.TrimEnd();
|
||||
}
|
||||
|
||||
return baseString;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
using Verse.Sound;
|
||||
using RimWorld;
|
||||
using System.Linq;
|
||||
|
||||
namespace ArachnaeSwarm;
|
||||
|
||||
public class Building_TrapReleaseRandom : Building_TrapReleaseEntity
|
||||
{
|
||||
private TrapReleaseRandomExtension extension;
|
||||
|
||||
private TrapReleaseRandomExtension Extension
|
||||
{
|
||||
get
|
||||
{
|
||||
if (extension == null)
|
||||
{
|
||||
extension = def.GetModExtension<TrapReleaseRandomExtension>();
|
||||
}
|
||||
return extension;
|
||||
}
|
||||
}
|
||||
|
||||
protected override int CountToSpawn => Extension?.countToSpawn ?? 1;
|
||||
|
||||
protected override PawnKindDef PawnToSpawn
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Extension == null || Extension.pawnKinds.NullOrEmpty())
|
||||
{
|
||||
return PawnKindDefOf.Drone_Hunter;
|
||||
}
|
||||
return Extension.pawnKinds.RandomElement();
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpawnSetup(Map map, bool respawningAfterLoad)
|
||||
{
|
||||
if (this.Faction == null)
|
||||
{
|
||||
this.SetFaction(Faction.OfPlayer);
|
||||
}
|
||||
base.SpawnSetup(map, respawningAfterLoad);
|
||||
}
|
||||
|
||||
// Ensure spawned pawns use the building's faction when possible; otherwise spawn as wild (null faction)
|
||||
protected override void Tick()
|
||||
{
|
||||
if (!base.Spawned || base.IsStunned || !this.IsHashIntervalTick(60))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float radius = (Extension != null) ? Extension.detectionRadius : 20f;
|
||||
|
||||
Map map = base.Map;
|
||||
IEnumerable<Pawn> enumerable = map.mapPawns.AllPawnsSpawned.Where((Pawn x) => !x.IsPsychologicallyInvisible() && x.HostileTo(this) && x.Position.DistanceTo(base.Position) <= radius);
|
||||
IntVec3 position = base.Position;
|
||||
foreach (Pawn item in enumerable)
|
||||
{
|
||||
if ((base.Faction != Faction.OfPlayer || (!item.IsPrisoner && !item.Downed)) && GenSight.LineOfSight(position, item.Position, map))
|
||||
{
|
||||
Spring(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SpringSub(Pawn p)
|
||||
{
|
||||
if (base.Spawned)
|
||||
{
|
||||
SoundStarter.PlayOneShot(SoundDefOf.DroneTrapSpring, new TargetInfo(base.Position, base.Map));
|
||||
if (base.Faction != Faction.OfPlayer)
|
||||
{
|
||||
// Show a localized message including the trap name and, if available, the pawn who triggered it.
|
||||
if (p != null)
|
||||
{
|
||||
Messages.Message("MessageTrapSprung".Translate(this.Named("TRAP"), p.Named("PAWN")), new LookTargets(base.Position, base.Map), MessageTypeDefOf.NegativeEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
Messages.Message("MessageTrapSprung_NoInstigator".Translate(this.Named("TRAP")), new LookTargets(base.Position, base.Map), MessageTypeDefOf.NegativeEvent);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < CountToSpawn; i++)
|
||||
{
|
||||
PawnKindDef pawnToSpawn = PawnToSpawn;
|
||||
|
||||
// Prefer the building's faction (usually the faction that built it). If none, pass null to produce a wild pawn.
|
||||
Faction spawnFaction = this.Faction;
|
||||
|
||||
float? fixedBiologicalAge = 0f;
|
||||
float? fixedChronologicalAge = 0f;
|
||||
Pawn pawn = PawnGenerator.GeneratePawn(new PawnGenerationRequest(
|
||||
pawnToSpawn,
|
||||
spawnFaction,
|
||||
PawnGenerationContext.NonPlayer,
|
||||
null,
|
||||
forceGenerateNewPawn: false,
|
||||
allowDead: false,
|
||||
allowDowned: false,
|
||||
canGeneratePawnRelations: true,
|
||||
mustBeCapableOfViolence: false,
|
||||
1f,
|
||||
forceAddFreeWarmLayerIfNeeded: false,
|
||||
allowGay: true,
|
||||
allowPregnant: false,
|
||||
allowFood: true,
|
||||
allowAddictions: true,
|
||||
inhabitant: false,
|
||||
certainlyBeenInCryptosleep: false,
|
||||
forceRedressWorldPawnIfFormerColonist: false,
|
||||
worldPawnFactionDoesntMatter: false,
|
||||
0f,
|
||||
0f,
|
||||
null,
|
||||
1f,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
fixedBiologicalAge,
|
||||
fixedChronologicalAge));
|
||||
|
||||
pawn.mindState.enemyTarget = p;
|
||||
GenSpawn.Spawn(pawn, base.Position, base.Map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
using Verse;
|
||||
using Verse.Sound;
|
||||
using System.Collections.Generic;
|
||||
using RimWorld;
|
||||
|
||||
namespace ArachnaeSwarm;
|
||||
|
||||
public class CompHunterExplosion : ThingComp
|
||||
{
|
||||
private bool wickStarted;
|
||||
|
||||
private int wickTicks;
|
||||
|
||||
[Unsaved(false)]
|
||||
private Sustainer wickSoundSustainer;
|
||||
|
||||
[Unsaved(false)]
|
||||
private OverlayHandle? overlayBurningWick;
|
||||
|
||||
private CompProperties_HunterExplosion Props => (CompProperties_HunterExplosion)props;
|
||||
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
Scribe_Values.Look(ref wickStarted, "wickStarted", defaultValue: false);
|
||||
Scribe_Values.Look(ref wickTicks, "wickTicks", 0);
|
||||
}
|
||||
|
||||
public override void CompTickInterval(int delta)
|
||||
{
|
||||
if (!wickStarted && parent.IsHashIntervalTick(30, delta) && parent is Pawn { Spawned: not false, Downed: false } pawn && PawnUtility.EnemiesAreNearby(pawn, 9, passDoors: true, 1.5f))
|
||||
{
|
||||
StartWick();
|
||||
}
|
||||
}
|
||||
|
||||
public override void CompTick()
|
||||
{
|
||||
if (wickStarted)
|
||||
{
|
||||
wickSoundSustainer.Maintain();
|
||||
wickTicks--;
|
||||
if (wickTicks <= 0)
|
||||
{
|
||||
Detonate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void StartWick()
|
||||
{
|
||||
if (!wickStarted)
|
||||
{
|
||||
wickStarted = true;
|
||||
overlayBurningWick = parent.Map.overlayDrawer.Enable(parent, OverlayTypes.BurningWick);
|
||||
wickSoundSustainer = SoundDefOf.HissSmall.TrySpawnSustainer(SoundInfo.InMap(parent, MaintenanceType.PerTick));
|
||||
wickTicks = 120;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Notify_Killed(Map prevMap, DamageInfo? dinfo = null)
|
||||
{
|
||||
if (dinfo.HasValue)
|
||||
{
|
||||
Detonate(prevMap);
|
||||
}
|
||||
}
|
||||
|
||||
private void Detonate(Map map = null)
|
||||
{
|
||||
IntVec3 position = parent.Position;
|
||||
if (map == null)
|
||||
{
|
||||
map = parent.Map;
|
||||
}
|
||||
if (!parent.Destroyed)
|
||||
{
|
||||
parent.Destroy();
|
||||
}
|
||||
GenExplosion.DoExplosion(
|
||||
center: position,
|
||||
map: map,
|
||||
radius: Props.explosionRadius,
|
||||
damType: Props.explosionDamageType,
|
||||
instigator: parent,
|
||||
damAmount: Props.explosionDamageAmount,
|
||||
armorPenetration: Props.armorPenetration,
|
||||
explosionSound: Props.explosionSound,
|
||||
weapon: Props.weapon,
|
||||
projectile: Props.projectile,
|
||||
intendedTarget: Props.intendedTarget,
|
||||
postExplosionSpawnThingDef: Props.postExplosionSpawnThingDef,
|
||||
postExplosionSpawnChance: Props.postExplosionSpawnChance,
|
||||
postExplosionSpawnThingCount: Props.postExplosionSpawnThingCount,
|
||||
postExplosionGasType: Props.postExplosionGasType,
|
||||
postExplosionGasRadiusOverride: Props.postExplosionGasRadiusOverride,
|
||||
postExplosionGasAmount: Props.postExplosionGasAmount,
|
||||
applyDamageToExplosionCellsNeighbors: Props.applyDamageToExplosionCellsNeighbors,
|
||||
preExplosionSpawnThingDef: Props.preExplosionSpawnThingDef,
|
||||
preExplosionSpawnChance: Props.preExplosionSpawnChance,
|
||||
preExplosionSpawnThingCount: Props.preExplosionSpawnThingCount,
|
||||
chanceToStartFire: Props.chanceToStartFire,
|
||||
damageFalloff: Props.damageFalloff,
|
||||
direction: Props.direction,
|
||||
ignoredThings: Props.ignoredThings,
|
||||
affectedAngle: Props.affectedAngle,
|
||||
doVisualEffects: Props.doVisualEffects,
|
||||
propagationSpeed: Props.propagationSpeed,
|
||||
excludeRadius: Props.excludeRadius,
|
||||
doSoundEffects: Props.doSoundEffects,
|
||||
postExplosionSpawnThingDefWater: Props.postExplosionSpawnThingDefWater,
|
||||
screenShakeFactor: Props.screenShakeFactor,
|
||||
flammabilityChanceCurve: Props.flammabilityChanceCurve,
|
||||
overrideCells: Props.overrideCells,
|
||||
postExplosionSpawnSingleThingDef: Props.postExplosionSpawnSingleThingDef,
|
||||
preExplosionSpawnSingleThingDef: Props.preExplosionSpawnSingleThingDef
|
||||
);
|
||||
if (base.ParentHolder is Corpse corpse)
|
||||
{
|
||||
corpse.Destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using System.Collections.Generic;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm;
|
||||
|
||||
public class CompProperties_HunterExplosion : CompProperties
|
||||
{
|
||||
public float explosionRadius = 1.9f;
|
||||
public DamageDef explosionDamageType;
|
||||
public int explosionDamageAmount = 50;
|
||||
public float armorPenetration = -1f;
|
||||
public SoundDef explosionSound;
|
||||
public ThingDef weapon;
|
||||
public ThingDef projectile;
|
||||
public Thing intendedTarget;
|
||||
public ThingDef postExplosionSpawnThingDef;
|
||||
public float postExplosionSpawnChance;
|
||||
public int postExplosionSpawnThingCount = 1;
|
||||
public GasType? postExplosionGasType;
|
||||
public float? postExplosionGasRadiusOverride;
|
||||
public int postExplosionGasAmount = 255;
|
||||
public bool applyDamageToExplosionCellsNeighbors;
|
||||
public ThingDef preExplosionSpawnThingDef;
|
||||
public float preExplosionSpawnChance;
|
||||
public int preExplosionSpawnThingCount = 1;
|
||||
public float chanceToStartFire;
|
||||
public bool damageFalloff;
|
||||
public float? direction;
|
||||
public List<Thing> ignoredThings;
|
||||
public FloatRange? affectedAngle;
|
||||
public bool doVisualEffects = true;
|
||||
public float propagationSpeed = 1f;
|
||||
public float excludeRadius;
|
||||
public bool doSoundEffects = true;
|
||||
public ThingDef postExplosionSpawnThingDefWater;
|
||||
public float screenShakeFactor = 1f;
|
||||
public SimpleCurve flammabilityChanceCurve;
|
||||
public List<IntVec3> overrideCells;
|
||||
public ThingDef postExplosionSpawnSingleThingDef;
|
||||
public ThingDef preExplosionSpawnSingleThingDef;
|
||||
|
||||
public CompProperties_HunterExplosion()
|
||||
{
|
||||
compClass = typeof(CompHunterExplosion);
|
||||
}
|
||||
|
||||
public override void ResolveReferences(ThingDef parentDef)
|
||||
{
|
||||
base.ResolveReferences(parentDef);
|
||||
if (explosionDamageType == null)
|
||||
{
|
||||
explosionDamageType = DamageDefOf.Bomb;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class TrapReleaseRandomExtension : DefModExtension
|
||||
{
|
||||
public int countToSpawn = 1;
|
||||
public List<PawnKindDef> pawnKinds = new List<PawnKindDef>();
|
||||
public float detectionRadius = 20f;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_GrowthVatBooster : CompProperties_Facility
|
||||
{
|
||||
// We will use the base class's statOffsets field.
|
||||
// public List<StatModifier> statOffsets;
|
||||
|
||||
public CompProperties_GrowthVatBooster()
|
||||
{
|
||||
compClass = typeof(CompFacility_GrowthVatBooster);
|
||||
}
|
||||
}
|
||||
|
||||
public class CompFacility_GrowthVatBooster : CompFacility
|
||||
{
|
||||
private Building_NutrientVat Vat => parent as Building_NutrientVat;
|
||||
|
||||
public override List<StatModifier> StatOffsets
|
||||
{
|
||||
get
|
||||
{
|
||||
// If the vat contains a pawn, return the stat offsets defined in XML.
|
||||
if (Vat != null && Vat.innerContainer.Any)
|
||||
{
|
||||
return base.StatOffsets; // Returns the list from Props.statOffsets
|
||||
}
|
||||
|
||||
// Otherwise, return an empty list, providing no bonus.
|
||||
return new List<StatModifier>();
|
||||
}
|
||||
}
|
||||
|
||||
public override string CompInspectStringExtra()
|
||||
{
|
||||
// If we are not providing any bonus, don't call the base method to avoid empty lines.
|
||||
if (StatOffsets.NullOrEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return base.CompInspectStringExtra();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_LineDrawer : CompProperties
|
||||
{
|
||||
public List<ThingDef> linkableBuildings;
|
||||
public float maxDistance = 999f;
|
||||
public string lineTexturePath = "Things/Special/Power/Wire";
|
||||
|
||||
public CompProperties_LineDrawer()
|
||||
{
|
||||
compClass = typeof(CompLineDrawer);
|
||||
}
|
||||
}
|
||||
|
||||
public class CompLineDrawer : ThingComp
|
||||
{
|
||||
private CompProperties_LineDrawer Props => (CompProperties_LineDrawer)props;
|
||||
private List<Thing> linkedBuildings = new List<Thing>();
|
||||
private Material lineMat;
|
||||
|
||||
private Material LineMat
|
||||
{
|
||||
get
|
||||
{
|
||||
if (lineMat == null)
|
||||
{
|
||||
lineMat = MaterialPool.MatFrom(Props.lineTexturePath, ShaderDatabase.Transparent, Color.white);
|
||||
}
|
||||
return lineMat;
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostSpawnSetup(bool respawningAfterLoad)
|
||||
{
|
||||
base.PostSpawnSetup(respawningAfterLoad);
|
||||
FindAndLinkBuildings();
|
||||
}
|
||||
|
||||
public override void CompTick()
|
||||
{
|
||||
base.CompTick();
|
||||
if (parent.IsHashIntervalTick(120))
|
||||
{
|
||||
FindAndLinkBuildings();
|
||||
}
|
||||
}
|
||||
|
||||
private void FindAndLinkBuildings()
|
||||
{
|
||||
int previousCount = linkedBuildings.Count;
|
||||
|
||||
linkedBuildings.Clear();
|
||||
if (Props.linkableBuildings.NullOrEmpty()) return;
|
||||
|
||||
var potentialTargets = parent.Map.listerBuildings.allBuildingsColonist.Where(b =>
|
||||
b != parent &&
|
||||
Props.linkableBuildings.Contains(b.def) &&
|
||||
parent.Position.DistanceTo(b.Position) <= Props.maxDistance
|
||||
);
|
||||
|
||||
linkedBuildings.AddRange(potentialTargets);
|
||||
|
||||
if (linkedBuildings.Count != previousCount)
|
||||
{
|
||||
parent.Map.mapDrawer.MapMeshDirty(parent.Position, MapMeshFlagDefOf.Things, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostPrintOnto(SectionLayer layer)
|
||||
{
|
||||
base.PostPrintOnto(layer);
|
||||
foreach (var building in linkedBuildings)
|
||||
{
|
||||
Vector3 center = (this.parent.TrueCenter() + this.parent.Graphic.DrawOffset(this.parent.Rotation) + building.TrueCenter() + building.Graphic.DrawOffset(building.Rotation)) / 2f;
|
||||
center.y = AltitudeLayer.SmallWire.AltitudeFor();
|
||||
Vector3 v = building.TrueCenter() - this.parent.TrueCenter();
|
||||
Vector2 size = new Vector2(1f, v.MagnitudeHorizontal());
|
||||
float rot = v.AngleFlat();
|
||||
Printer_Plane.PrintPlane(layer, center, size, this.LineMat, rot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompNutrientProvider : CompFacility
|
||||
{
|
||||
private CompRefuelableNutrition selfRefuelable;
|
||||
private new CompProperties_NutrientProvider Props => (CompProperties_NutrientProvider)props;
|
||||
|
||||
public override void PostSpawnSetup(bool respawningAfterLoad)
|
||||
{
|
||||
base.PostSpawnSetup(respawningAfterLoad);
|
||||
selfRefuelable = parent.GetComp<CompRefuelableNutrition>();
|
||||
}
|
||||
|
||||
public override string CompInspectStringExtra()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
float efficiency = Mathf.Clamp(parent.GetStatValue(StatDef.Named("NutrientTransmissionEfficiency")), 0f, Props.maxEfficiency);
|
||||
sb.AppendLine("生物质传输效率".Translate() + ": " + efficiency.ToStringPercent());
|
||||
|
||||
sb.AppendLine("链接的建筑".Translate() + ":");
|
||||
|
||||
if (LinkedBuildings.NullOrEmpty())
|
||||
{
|
||||
sb.AppendLine(" (" + "None".Translate() + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var building in LinkedBuildings)
|
||||
{
|
||||
var comp = (building as ThingWithComps)?.GetComp<CompRefuelableNutrition>();
|
||||
if (comp != null)
|
||||
{
|
||||
bool needsFuel = NeedsFuel(comp);
|
||||
sb.AppendLine($" - {building.LabelCap}: {comp.Fuel:F0}/{comp.Props.fuelCapacity:F0} (目标: {comp.TargetFuelLevel:F0}) -> {(needsFuel ? "需要" : "不需要")}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString().TrimEnd();
|
||||
}
|
||||
|
||||
public override void CompTick()
|
||||
{
|
||||
base.CompTick();
|
||||
|
||||
if (!parent.IsHashIntervalTick(250))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (selfRefuelable == null || !selfRefuelable.HasFuel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var targetBuilding = LinkedBuildings
|
||||
.Select(b => new { Building = b, Comp = (b as ThingWithComps)?.GetComp<CompRefuelableNutrition>() })
|
||||
.Where(x => x.Comp != null && NeedsFuel(x.Comp))
|
||||
.OrderBy(x => x.Comp.Fuel / x.Comp.Props.fuelCapacity)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (targetBuilding != null)
|
||||
{
|
||||
var consumerComp = targetBuilding.Comp;
|
||||
float desiredLevel = GetDesiredFuelLevel(consumerComp);
|
||||
float fuelNeeded = desiredLevel - consumerComp.Fuel;
|
||||
|
||||
if (fuelNeeded < 0.1f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float fuelToTransfer = Mathf.Min(fuelNeeded, selfRefuelable.Fuel);
|
||||
|
||||
float efficiency = Mathf.Clamp(parent.GetStatValue(StatDef.Named("NutrientTransmissionEfficiency")), 0f, Props.maxEfficiency);
|
||||
float finalCost = fuelToTransfer * (1 - efficiency);
|
||||
|
||||
selfRefuelable.ConsumeFuel(finalCost);
|
||||
consumerComp.ReceiveFuel(fuelToTransfer);
|
||||
}
|
||||
}
|
||||
|
||||
private bool NeedsFuel(CompRefuelableNutrition comp)
|
||||
{
|
||||
if (comp == null) return false;
|
||||
return GetDesiredFuelLevel(comp) - comp.Fuel >= 0.1f;
|
||||
}
|
||||
|
||||
private float GetDesiredFuelLevel(CompRefuelableNutrition comp)
|
||||
{
|
||||
if (comp.TargetFuelLevel <= 0.01f || comp.TargetFuelLevel >= comp.Props.fuelCapacity * 0.99f)
|
||||
{
|
||||
return comp.Props.fuelCapacity;
|
||||
}
|
||||
return comp.TargetFuelLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_NutrientProvider : CompProperties_Facility
|
||||
{
|
||||
public float maxEfficiency = 0.9f;
|
||||
|
||||
public CompProperties_NutrientProvider()
|
||||
{
|
||||
compClass = typeof(CompNutrientProvider);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,369 @@
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
[StaticConstructorOnStartup]
|
||||
public class Building_NutrientVat : Building_Enterable, IThingHolder, IThingHolderWithDrawnPawn
|
||||
{
|
||||
private CompRefuelableNutrition cachedRefuelableComp;
|
||||
private Graphic cachedTopGraphic;
|
||||
|
||||
// IThingHolderWithDrawnPawn implementation
|
||||
public float HeldPawnDrawPos_Y => DrawPos.y + 0.03658537f;
|
||||
public float HeldPawnBodyAngle => base.Rotation.AsAngle;
|
||||
public PawnPosture HeldPawnPosture => PawnPosture.LayingOnGroundFaceUp;
|
||||
|
||||
private Graphic TopGraphic
|
||||
{
|
||||
get
|
||||
{
|
||||
if (cachedTopGraphic == null)
|
||||
{
|
||||
var modExtension = def.GetModExtension<DefModExtension_NutrientVat>();
|
||||
if (modExtension != null && !modExtension.topGraphicPath.NullOrEmpty())
|
||||
{
|
||||
cachedTopGraphic = GraphicDatabase.Get(modExtension.graphicClass, modExtension.topGraphicPath, ShaderDatabase.Transparent, def.graphicData.drawSize, Color.white, Color.white);
|
||||
}
|
||||
}
|
||||
return cachedTopGraphic;
|
||||
}
|
||||
}
|
||||
|
||||
// Constants for BioStarvation
|
||||
private const float BiostarvationGainPerDayNoFood = 0.5f;
|
||||
private const float BiostarvationFallPerDayFed = 0.1f;
|
||||
|
||||
public override Vector3 PawnDrawOffset => Vector3.zero;
|
||||
|
||||
public CompRefuelableNutrition RefuelableComp
|
||||
{
|
||||
get
|
||||
{
|
||||
if (cachedRefuelableComp == null)
|
||||
{
|
||||
cachedRefuelableComp = this.TryGetComp<CompRefuelableNutrition>();
|
||||
}
|
||||
return cachedRefuelableComp;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasNutrition => RefuelableComp != null && RefuelableComp.HasFuel;
|
||||
|
||||
public float BiostarvationDailyOffset
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!base.Working)
|
||||
{
|
||||
return 0f;
|
||||
}
|
||||
return HasNutrition ? -BiostarvationFallPerDayFed : BiostarvationGainPerDayNoFood;
|
||||
}
|
||||
}
|
||||
|
||||
public float NutritionConsumedPerDay
|
||||
{
|
||||
get
|
||||
{
|
||||
if (selectedPawn != null)
|
||||
{
|
||||
// Let's use the base consumption rate from the original GrowthVat
|
||||
float num = 3f;
|
||||
Hediff biostarvation = selectedPawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.BioStarvation);
|
||||
if (biostarvation != null && biostarvation.Severity > 0)
|
||||
{
|
||||
// Increase consumption when biostarving, same as original
|
||||
num *= 1.1f;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
return 0f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpawnSetup(Map map, bool respawningAfterLoad)
|
||||
{
|
||||
base.SpawnSetup(map, respawningAfterLoad);
|
||||
cachedRefuelableComp = this.TryGetComp<CompRefuelableNutrition>();
|
||||
}
|
||||
|
||||
public override void DeSpawn(DestroyMode mode = DestroyMode.Vanish)
|
||||
{
|
||||
if (mode != DestroyMode.WillReplace)
|
||||
{
|
||||
if (selectedPawn != null && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
Notify_PawnRemoved();
|
||||
}
|
||||
}
|
||||
base.DeSpawn(mode);
|
||||
}
|
||||
|
||||
protected override void Tick()
|
||||
{
|
||||
base.Tick();
|
||||
|
||||
if (selectedPawn != null && (selectedPawn.Destroyed || !innerContainer.Contains(selectedPawn)))
|
||||
{
|
||||
OnStop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (base.Working && selectedPawn != null)
|
||||
{
|
||||
// Update BioStarvation
|
||||
float biostarvationOffset = BiostarvationDailyOffset / 60000f * HediffDefOf.BioStarvation.maxSeverity;
|
||||
Hediff biostarvation = selectedPawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.BioStarvation);
|
||||
|
||||
if (biostarvation != null)
|
||||
{
|
||||
biostarvation.Severity += biostarvationOffset;
|
||||
if (biostarvation.ShouldRemove)
|
||||
{
|
||||
selectedPawn.health.RemoveHediff(biostarvation);
|
||||
}
|
||||
}
|
||||
else if (biostarvationOffset > 0f)
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(HediffDefOf.BioStarvation, selectedPawn);
|
||||
hediff.Severity = biostarvationOffset;
|
||||
selectedPawn.health.AddHediff(hediff);
|
||||
}
|
||||
|
||||
// Check for failure
|
||||
if (biostarvation != null && biostarvation.Severity >= HediffDefOf.BioStarvation.maxSeverity)
|
||||
{
|
||||
Fail();
|
||||
return;
|
||||
}
|
||||
|
||||
// Update nutrition consumption rate on the component
|
||||
RefuelableComp.currentConsumptionRate = NutritionConsumedPerDay;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If not working, consumption is zero
|
||||
if(RefuelableComp != null)
|
||||
{
|
||||
RefuelableComp.currentConsumptionRate = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override AcceptanceReport CanAcceptPawn(Pawn pawn)
|
||||
{
|
||||
if (base.Working)
|
||||
{
|
||||
return "Occupied".Translate();
|
||||
}
|
||||
if (selectedPawn != null && selectedPawn != pawn)
|
||||
{
|
||||
return "WaitingForPawn".Translate(selectedPawn.Named("PAWN"));
|
||||
}
|
||||
if (pawn.health.hediffSet.HasHediff(HediffDefOf.BioStarvation))
|
||||
{
|
||||
return "PawnBiostarving".Translate(pawn.Named("PAWN"));
|
||||
}
|
||||
return pawn.IsColonist && !pawn.IsQuestLodger();
|
||||
}
|
||||
|
||||
public override void TryAcceptPawn(Pawn pawn)
|
||||
{
|
||||
if (!CanAcceptPawn(pawn))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
selectedPawn = pawn;
|
||||
bool deselected = pawn.DeSpawnOrDeselect();
|
||||
if (innerContainer.TryAddOrTransfer(pawn))
|
||||
{
|
||||
startTick = Find.TickManager.TicksGame;
|
||||
}
|
||||
if (deselected)
|
||||
{
|
||||
Find.Selector.Select(pawn, playSound: false, forceDesignatorDeselect: false);
|
||||
}
|
||||
}
|
||||
|
||||
private void Finish()
|
||||
{
|
||||
if (selectedPawn != null && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
Notify_PawnRemoved();
|
||||
innerContainer.TryDrop(selectedPawn, InteractionCell, base.Map, ThingPlaceMode.Near, 1, out var _);
|
||||
OnStop();
|
||||
}
|
||||
}
|
||||
|
||||
private void Fail()
|
||||
{
|
||||
if (selectedPawn != null && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
Notify_PawnRemoved();
|
||||
innerContainer.TryDrop(selectedPawn, InteractionCell, base.Map, ThingPlaceMode.Near, 1, out var _);
|
||||
Hediff firstHediffOfDef = selectedPawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.BioStarvation);
|
||||
selectedPawn.Kill(null, firstHediffOfDef);
|
||||
}
|
||||
OnStop();
|
||||
}
|
||||
|
||||
private void OnStop()
|
||||
{
|
||||
selectedPawn = null;
|
||||
startTick = -1;
|
||||
if (RefuelableComp != null)
|
||||
{
|
||||
RefuelableComp.currentConsumptionRate = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
private void Notify_PawnRemoved()
|
||||
{
|
||||
// You can add sound effects here if you want, e.g., SoundDefOf.GrowthVat_Open.PlayOneShot(SoundInfo.InMap(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Gizmo> GetGizmos()
|
||||
{
|
||||
// Keep base gizmos
|
||||
foreach (Gizmo gizmo in base.GetGizmos())
|
||||
{
|
||||
yield return gizmo;
|
||||
}
|
||||
|
||||
if (base.Working)
|
||||
{
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "CommandCancelGrowth".Translate(), // Label can be changed
|
||||
defaultDesc = "CommandCancelGrowthDesc".Translate(), // Desc can be changed
|
||||
icon = ContentFinder<Texture2D>.Get("UI/Designators/Cancel"),
|
||||
action = () =>
|
||||
{
|
||||
Finish();
|
||||
innerContainer.TryDropAll(InteractionCell, base.Map, ThingPlaceMode.Near);
|
||||
}
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (selectedPawn != null)
|
||||
{
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "CommandCancelLoad".Translate(),
|
||||
defaultDesc = "CommandCancelLoadDesc".Translate(),
|
||||
icon = ContentFinder<Texture2D>.Get("UI/Designators/Cancel"),
|
||||
action = () =>
|
||||
{
|
||||
if (selectedPawn?.CurJobDef == JobDefOf.EnterBuilding)
|
||||
{
|
||||
selectedPawn.jobs.EndCurrentJob(JobCondition.InterruptForced);
|
||||
}
|
||||
OnStop();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var command_Action = new Command_Action
|
||||
{
|
||||
defaultLabel = "InsertPerson".Translate() + "...",
|
||||
defaultDesc = "InsertPersonGrowthVatDesc".Translate(), // Desc can be changed
|
||||
icon = Building_GrowthVat.InsertPawnIcon.Texture,
|
||||
action = () =>
|
||||
{
|
||||
List<FloatMenuOption> list = new List<FloatMenuOption>();
|
||||
foreach (Pawn p in base.Map.mapPawns.AllPawnsSpawned)
|
||||
{
|
||||
if ((bool)CanAcceptPawn(p))
|
||||
{
|
||||
list.Add(new FloatMenuOption(p.LabelCap, () => SelectPawn(p), p, Color.white));
|
||||
}
|
||||
}
|
||||
if (!list.Any())
|
||||
{
|
||||
list.Add(new FloatMenuOption("NoViablePawns".Translate(), null));
|
||||
}
|
||||
Find.WindowStack.Add(new FloatMenu(list));
|
||||
}
|
||||
};
|
||||
if (!base.AnyAcceptablePawns)
|
||||
{
|
||||
command_Action.Disable("NoViablePawns".Translate());
|
||||
}
|
||||
yield return command_Action;
|
||||
}
|
||||
}
|
||||
|
||||
public override string GetInspectString()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.Append(base.GetInspectString());
|
||||
|
||||
if (base.Working && selectedPawn != null)
|
||||
{
|
||||
stringBuilder.AppendLineIfNotEmpty().Append("CasketContains".Translate().ToString() + ": " + selectedPawn.NameShortColored.Resolve());
|
||||
|
||||
Hediff biostarvation = selectedPawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.BioStarvation);
|
||||
if (biostarvation != null && biostarvation.Severity > 0f)
|
||||
{
|
||||
string text = ((BiostarvationDailyOffset >= 0f) ? "+" : string.Empty);
|
||||
stringBuilder.AppendLineIfNotEmpty().Append(string.Format("{0}: {1} ({2})", "Biostarvation".Translate(), biostarvation.Severity.ToStringPercent(), "PerDay".Translate(text + BiostarvationDailyOffset.ToStringPercent())));
|
||||
}
|
||||
}
|
||||
else if (selectedPawn != null)
|
||||
{
|
||||
stringBuilder.AppendLineIfNotEmpty().Append("WaitingForPawn".Translate(selectedPawn.Named("PAWN")).Resolve());
|
||||
}
|
||||
|
||||
// The inspect string from CompRefuelableNutrition will be automatically added by the game.
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
public override IEnumerable<FloatMenuOption> GetFloatMenuOptions(Pawn selPawn)
|
||||
{
|
||||
foreach (FloatMenuOption floatMenuOption in base.GetFloatMenuOptions(selPawn))
|
||||
{
|
||||
yield return floatMenuOption;
|
||||
}
|
||||
if (!selPawn.CanReach(this, PathEndMode.InteractionCell, Danger.Deadly))
|
||||
{
|
||||
yield return new FloatMenuOption("CannotEnterBuilding".Translate(this) + ": " + "NoPath".Translate().CapitalizeFirst(), null);
|
||||
yield break;
|
||||
}
|
||||
AcceptanceReport acceptanceReport = CanAcceptPawn(selPawn);
|
||||
if (acceptanceReport.Accepted)
|
||||
{
|
||||
yield return FloatMenuUtility.DecoratePrioritizedTask(new FloatMenuOption("EnterBuilding".Translate(this), () => SelectPawn(selPawn)), selPawn, this);
|
||||
}
|
||||
else if (!acceptanceReport.Reason.NullOrEmpty())
|
||||
{
|
||||
yield return new FloatMenuOption("CannotEnterBuilding".Translate(this) + ": " + acceptanceReport.Reason.CapitalizeFirst(), null);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DynamicDrawPhaseAt(DrawPhase phase, Vector3 drawLoc, bool flip = false)
|
||||
{
|
||||
if (base.Working && selectedPawn != null && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
selectedPawn.Drawer.renderer.DynamicDrawPhaseAt(phase, drawLoc + PawnDrawOffset, null, neverAimWeapon: true);
|
||||
}
|
||||
base.DynamicDrawPhaseAt(phase, drawLoc, flip);
|
||||
}
|
||||
|
||||
protected override void DrawAt(Vector3 drawLoc, bool flip = false)
|
||||
{
|
||||
base.DrawAt(drawLoc, flip);
|
||||
// Draw the top graphic if it exists
|
||||
if (TopGraphic != null)
|
||||
{
|
||||
TopGraphic.Draw(DrawPos + Altitudes.AltIncVect * 2f, base.Rotation, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class DefModExtension_NutrientVat : DefModExtension
|
||||
{
|
||||
public string topGraphicPath;
|
||||
public Type graphicClass = typeof(Graphic_Multi); // Default to Graphic_Multi if not specified in XML
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class SpawnerProduct
|
||||
{
|
||||
public ThingDef thingDef;
|
||||
public int count = 1;
|
||||
}
|
||||
|
||||
public class CompProperties_MultiFuelSpawner : CompProperties
|
||||
{
|
||||
public List<SpawnerProduct> products;
|
||||
public IntRange spawnIntervalRange = new IntRange(100, 100);
|
||||
public bool spawnForbidden;
|
||||
public bool inheritFaction;
|
||||
public bool showMessageIfOwned;
|
||||
|
||||
public CompProperties_MultiFuelSpawner()
|
||||
{
|
||||
compClass = typeof(CompMultiFuelSpawner);
|
||||
}
|
||||
}
|
||||
|
||||
public class CompMultiFuelSpawner : ThingComp
|
||||
{
|
||||
private int ticksUntilSpawn;
|
||||
private List<IFuelSource> fuelComps;
|
||||
|
||||
public CompProperties_MultiFuelSpawner Props => (CompProperties_MultiFuelSpawner)props;
|
||||
|
||||
public override void PostSpawnSetup(bool respawningAfterLoad)
|
||||
{
|
||||
base.PostSpawnSetup(respawningAfterLoad);
|
||||
if (!respawningAfterLoad)
|
||||
{
|
||||
ResetCountdown();
|
||||
}
|
||||
fuelComps = parent.GetComps<ThingComp>().OfType<IFuelSource>().ToList();
|
||||
}
|
||||
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
Scribe_Values.Look(ref ticksUntilSpawn, "ticksUntilSpawn", 0);
|
||||
}
|
||||
|
||||
public override void CompTick()
|
||||
{
|
||||
base.CompTick();
|
||||
|
||||
if (fuelComps.NullOrEmpty()) return;
|
||||
|
||||
bool allFuelsOk = fuelComps.All(c => c.HasFuel);
|
||||
|
||||
if (allFuelsOk && (parent.GetComp<CompPowerTrader>()?.PowerOn ?? true))
|
||||
{
|
||||
// CORRECTED LOGIC: Consume fuel every tick
|
||||
foreach (var comp in fuelComps)
|
||||
{
|
||||
comp.Notify_UsedThisTick();
|
||||
}
|
||||
|
||||
ticksUntilSpawn--;
|
||||
if (ticksUntilSpawn <= 0)
|
||||
{
|
||||
TryDoSpawn();
|
||||
ResetCountdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TryDoSpawn()
|
||||
{
|
||||
if (Props.products.NullOrEmpty()) return;
|
||||
|
||||
foreach (var product in Props.products)
|
||||
{
|
||||
Thing thing = ThingMaker.MakeThing(product.thingDef);
|
||||
thing.stackCount = product.count;
|
||||
|
||||
if (Props.inheritFaction && thing.Faction != parent.Faction)
|
||||
{
|
||||
thing.SetFaction(parent.Faction);
|
||||
}
|
||||
|
||||
if (GenPlace.TryPlaceThing(thing, parent.Position, parent.Map, ThingPlaceMode.Near, out Thing resultingThing))
|
||||
{
|
||||
if (Props.spawnForbidden)
|
||||
{
|
||||
resultingThing.SetForbidden(true);
|
||||
}
|
||||
|
||||
if (Props.showMessageIfOwned && parent.Faction == Faction.OfPlayer)
|
||||
{
|
||||
Messages.Message("MessageCompSpawnerSpawnedItem".Translate(resultingThing.LabelCap), resultingThing, MessageTypeDefOf.PositiveEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ResetCountdown()
|
||||
{
|
||||
ticksUntilSpawn = Props.spawnIntervalRange.RandomInRange;
|
||||
}
|
||||
|
||||
public override string CompInspectStringExtra()
|
||||
{
|
||||
string text = base.CompInspectStringExtra();
|
||||
|
||||
if (!fuelComps.NullOrEmpty() && fuelComps.All(c => c.HasFuel))
|
||||
{
|
||||
if (!text.NullOrEmpty())
|
||||
{
|
||||
text += "\n";
|
||||
}
|
||||
string productsStr = Props.products.Select(p => (string)p.thingDef.LabelCap).ToCommaList();
|
||||
text += "NextSpawnedItemIn".Translate(productsStr) + ": " + ticksUntilSpawn.ToStringTicksToPeriod();
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using System.Reflection;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_RefuelableNutrition_WithKey : CompProperties_RefuelableNutrition
|
||||
{
|
||||
public string saveKeysPrefix;
|
||||
|
||||
public CompProperties_RefuelableNutrition_WithKey()
|
||||
{
|
||||
compClass = typeof(CompRefuelableNutrition_WithKey);
|
||||
}
|
||||
}
|
||||
|
||||
public class CompRefuelableNutrition_WithKey : CompRefuelableNutrition, IFuelSource
|
||||
{
|
||||
public new CompProperties_RefuelableNutrition_WithKey Props => (CompProperties_RefuelableNutrition_WithKey)props;
|
||||
|
||||
public override void PostExposeData()
|
||||
{
|
||||
string prefix = Props.saveKeysPrefix;
|
||||
if (prefix.NullOrEmpty())
|
||||
{
|
||||
Log.ErrorOnce($"CompRefuelableNutrition_WithKey on {parent.def.defName} has a null or empty saveKeysPrefix. Defaulting to standard save.", GetHashCode());
|
||||
base.PostExposeData();
|
||||
return;
|
||||
}
|
||||
|
||||
// --- Accessing private fields from CompRefuelable (base of CompRefuelableNutrition) ---
|
||||
FieldInfo fuelField = AccessTools.Field(typeof(CompRefuelable), "fuel");
|
||||
FieldInfo configuredTargetFuelLevelField = AccessTools.Field(typeof(CompRefuelable), "configuredTargetFuelLevel");
|
||||
FieldInfo allowAutoRefuelField = AccessTools.Field(typeof(CompRefuelable), "allowAutoRefuel");
|
||||
|
||||
// Get current values
|
||||
float currentFuel = (float)fuelField.GetValue(this);
|
||||
float currentConfiguredLevel = (float)configuredTargetFuelLevelField.GetValue(this);
|
||||
bool currentAllowAuto = (bool)allowAutoRefuelField.GetValue(this);
|
||||
|
||||
// Scribe with prefix
|
||||
Scribe_Values.Look(ref currentFuel, prefix + "_fuel", 0f);
|
||||
Scribe_Values.Look(ref currentConfiguredLevel, prefix + "_configuredTargetFuelLevel", -1f);
|
||||
Scribe_Values.Look(ref currentAllowAuto, prefix + "_allowAutoRefuel", true);
|
||||
|
||||
// Set values back if loading
|
||||
if (Scribe.mode == LoadSaveMode.LoadingVars)
|
||||
{
|
||||
fuelField.SetValue(this, currentFuel);
|
||||
configuredTargetFuelLevelField.SetValue(this, currentConfiguredLevel);
|
||||
allowAutoRefuelField.SetValue(this, currentAllowAuto);
|
||||
}
|
||||
|
||||
// --- Accessing private fields from CompRefuelableNutrition ---
|
||||
// (Assuming there are any. If not, this part is not needed)
|
||||
// Example:
|
||||
// FieldInfo someOtherField = AccessTools.Field(typeof(CompRefuelableNutrition), "someOtherPrivateField");
|
||||
// ... and so on
|
||||
}
|
||||
|
||||
public new void Notify_UsedThisTick()
|
||||
{
|
||||
if (Props.consumeFuelOnlyWhenUsed)
|
||||
{
|
||||
ConsumeFuel(Props.fuelConsumptionRate / 60000f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_RefuelableWithKey : CompProperties_Refuelable
|
||||
{
|
||||
public string saveKeysPrefix;
|
||||
|
||||
public CompProperties_RefuelableWithKey()
|
||||
{
|
||||
compClass = typeof(CompRefuelableWithKey);
|
||||
}
|
||||
}
|
||||
|
||||
public class CompRefuelableWithKey : CompRefuelable, IFuelSource
|
||||
{
|
||||
public new CompProperties_RefuelableWithKey Props => (CompProperties_RefuelableWithKey)props;
|
||||
|
||||
public new void Notify_UsedThisTick()
|
||||
{
|
||||
if (Props.consumeFuelOnlyWhenUsed)
|
||||
{
|
||||
ConsumeFuel(Props.fuelConsumptionRate / 60000f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||