调整价格,绘制外骨骼初稿

This commit is contained in:
Tourswen
2025-10-18 00:10:24 +08:00
parent 0539703a6e
commit eba65611fd
12 changed files with 162 additions and 193 deletions

Binary file not shown.

View File

@@ -10,7 +10,7 @@
<tab>ARA_ResearchTab</tab>
<techprintCount>1</techprintCount>
<techprintCommonality>0</techprintCommonality>
<techprintMarketValue>1</techprintMarketValue>
<techprintMarketValue>2500</techprintMarketValue>
<hiddenPrerequisites>
<li>ARA_Technology_5ESS</li>
</hiddenPrerequisites>

View File

@@ -692,6 +692,7 @@
<raceRestriction>
<!-- 武器列表 -->
<weaponList>
<li>ARA_RW_Large_Arc_Gun</li>
<li>ARA_RW_Acid_Mortar</li>
<li>ARA_RW_Basic_SniperCannon_Gun</li>
<li>ARA_RW_Basic_FireSpewer_Gun</li>

View File

@@ -152,7 +152,7 @@
<healthAffectsPrice>false</healthAffectsPrice>
<stackLimit>30</stackLimit>
<statBases>
<MarketValue>120</MarketValue>
<MarketValue>100</MarketValue>
<MaxHitPoints>50</MaxHitPoints>
<Mass>0.01</Mass>
</statBases>
@@ -182,7 +182,7 @@
<healthAffectsPrice>false</healthAffectsPrice>
<stackLimit>30</stackLimit>
<statBases>
<MarketValue>120</MarketValue>
<MarketValue>20</MarketValue>
<MaxHitPoints>10</MaxHitPoints>
<Mass>0.01</Mass>
</statBases>

View File

@@ -33,7 +33,7 @@
<ARA_Carapace>50</ARA_Carapace>
</costList>
<statBases>
<MarketValue>100</MarketValue>
<MarketValue>300</MarketValue>
<WorkToMake>1000</WorkToMake>
<Mass>5</Mass>
<ARA_IncubationCost>25</ARA_IncubationCost>
@@ -45,7 +45,7 @@
<capacities>
<li>Cut</li>
</capacities>
<power>10</power>
<power>12</power>
<cooldownTime>1.3</cooldownTime>
<armorPenetration>0.50</armorPenetration>
</li>
@@ -54,7 +54,7 @@
<capacities>
<li>Poke</li>
</capacities>
<power>8</power>
<power>10</power>
<armorPenetration>0.20</armorPenetration>
<cooldownTime>1.5</cooldownTime>
<extraMeleeDamages>
@@ -197,7 +197,7 @@
</costList>
<statBases>
<MarketValue>350</MarketValue>
<WorkToMake>1000</WorkToMake>
<WorkToMake>3000</WorkToMake>
<Mass>5</Mass>
<ARA_IncubationCost>350</ARA_IncubationCost>
<ARA_IncubationTime>12</ARA_IncubationTime>
@@ -279,7 +279,7 @@
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<MarketValue>300</MarketValue>
<MarketValue>200</MarketValue>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>0.5</Mass>
@@ -391,7 +391,7 @@
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<MarketValue>600</MarketValue>
<MarketValue>1000</MarketValue>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>4</Mass>
@@ -408,7 +408,7 @@
<verbClass>ArachnaeSwarm.Verb_ShootWithOffset</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
<warmupTime>0.8</warmupTime>
<warmupTime>0.5</warmupTime>
<defaultProjectile>Bullet_ARA_RW_Toxic_Needle_MG</defaultProjectile>
<range>25.9</range>
<burstShotCount>48</burstShotCount>
@@ -489,7 +489,7 @@
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<MarketValue>600</MarketValue>
<MarketValue>650</MarketValue>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>4</Mass>
@@ -605,7 +605,7 @@
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<MarketValue>1500</MarketValue>
<MarketValue>2000</MarketValue>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>3.5</Mass>
@@ -721,7 +721,7 @@
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<MarketValue>1500</MarketValue>
<MarketValue>1400</MarketValue>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>3.5</Mass>
@@ -949,16 +949,16 @@
<hasStandardCommand>true</hasStandardCommand>
<warmupTime>1.5</warmupTime>
<range>16</range> <!-- Standard range property -->
<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
<ticksBetweenBurstShots>8</ticksBetweenBurstShots>
<burstShotCount>3</burstShotCount>
<soundCast>Shot_MiniFlameblaster</soundCast>
<soundCastTail>GunTail_Medium</soundCastTail>
<muzzleFlashScale>9</muzzleFlashScale>
<!-- Custom Properties for the modified Verb_SpewFire logic -->
<degrees>15</degrees>
<degrees>45</degrees>
<damageDef>ARA_AcidBurn</damageDef>
<damageAmount>12</damageAmount>
<damageAmount>15</damageAmount>
<filthDef>Filth_SpentAcid</filthDef>
<effecterDef>ARA_Fire_Spew</effecterDef>
<propagationSpeed>0.5</propagationSpeed>
@@ -1085,7 +1085,7 @@
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<MarketValue>2500</MarketValue>
<MarketValue>2200</MarketValue>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>3.5</Mass>
@@ -1165,7 +1165,7 @@
<damageDef>ARA_AcidBurn</damageDef>
<spinRate>15</spinRate>
<damageAmountBase>20</damageAmountBase>
<speed>45</speed>
<speed>30</speed>
<arcHeightFactor>1</arcHeightFactor>
<explosionRadius>3.5</explosionRadius>
<flyOverhead>true</flyOverhead>
@@ -1287,7 +1287,7 @@
<projectile>
<speed>60</speed>
<damageDef>ARA_AcidBurn</damageDef>
<damageAmountBase>5</damageAmountBase>
<damageAmountBase>15</damageAmountBase>
<filth>Filth_SpentAcid</filth>
<filthCount>2</filthCount>
<explosionSpawnsSingleFilth>true</explosionSpawnsSingleFilth>
@@ -1342,7 +1342,7 @@
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<MarketValue>2500</MarketValue>
<MarketValue>2200</MarketValue>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>4</Mass>
@@ -1423,7 +1423,7 @@
<projectile>
<speed>60</speed>
<damageDef>ARA_AcidBurn</damageDef>
<damageAmountBase>3</damageAmountBase>
<damageAmountBase>6</damageAmountBase>
<filth>Filth_SpentAcid</filth>
<filthCount>2</filthCount>
<explosionSpawnsSingleFilth>true</explosionSpawnsSingleFilth>
@@ -1477,7 +1477,7 @@
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<MarketValue>700</MarketValue>
<MarketValue>1600</MarketValue>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>3.5</Mass>
@@ -1588,120 +1588,17 @@
</ThingDef>
<!-- 闪电 -->
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Arc_Gun</defName>
<label>武装器官"生物电导线"</label>
<description>阿拉克涅虫群督虫使用的远程武装器官,通过从携带大量电荷的细胞中释放能量,虫群可以使用这种武装器官在敌人的集群中发起连锁闪电打击。</description>
<tickerType>Normal</tickerType>
<techLevel>Animal</techLevel>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon_1Stage</ThingDef>
</descriptionHyperlinks>
<graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_SkyHive_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>1.2</drawSize>
</graphicData>
<uiIconScale>0.8</uiIconScale>
<soundInteract>SpitterSpawn</soundInteract>
<recipeMaker>
<recipeUsers Inherit="False" />
<researchPrerequisite>ARA_Technology_1THD</researchPrerequisite>
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<MarketValue>2500</MarketValue>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>3.5</Mass>
<AccuracyTouch>0.5</AccuracyTouch>
<AccuracyShort>0.6</AccuracyShort>
<AccuracyMedium>0.45</AccuracyMedium>
<AccuracyLong>0.3</AccuracyLong>
<RangedWeapon_Cooldown>2.5</RangedWeapon_Cooldown>
<ARA_IncubationCost>160</ARA_IncubationCost>
<ARA_IncubationTime>7</ARA_IncubationTime>
</statBases>
<verbs>
<li Class="ArachnaeSwarm.VerbProperties_BeamArc">
<verbClass>ArachnaeSwarm.Verb_ShootBeamArc</verbClass>
<!-- 基础射线参数 -->
<hasStandardCommand>true</hasStandardCommand>
<warmupTime>0</warmupTime>
<range>18</range>
<burstShotCount>6</burstShotCount>
<ticksBetweenBurstShots>10</ticksBetweenBurstShots>
<beamDamageDef>ARA_Psi_Damage</beamDamageDef>
<beamTotalDamage>20</beamTotalDamage>
<!-- 视觉和音效 -->
<muzzleFlashScale>0</muzzleFlashScale>
<soundCastBeam>BeamGraser_Shooting</soundCastBeam>
<beamGroundFleckDef>Fleck_BeamBurn</beamGroundFleckDef>
<beamFleckChancePerTick>0.32</beamFleckChancePerTick>
<beamMoteDef>ARA_Arc_Beam_Mote</beamMoteDef>
<beamEndEffecterDef>GraserBeam_End</beamEndEffecterDef>
<!-- 火焰效果 -->
<beamChanceToStartFire>0.6</beamChanceToStartFire>
<beamChanceToAttachFire>0.6</beamChanceToAttachFire>
<beamFireSizeRange>0.25</beamFireSizeRange>
<!-- 攻击目标设置 -->
<targetParams>
<canTargetLocations>true</canTargetLocations>
</targetParams>
<!-- 电弧链属性 -->
<conductNum>6</conductNum>
<conductRange>18</conductRange>
<secondaryDamageFactor>0.7</secondaryDamageFactor>
<chainMoteDef>ARA_Arc_Beam_Mote</chainMoteDef>
</li>
</verbs>
<costList Inherit="False">
<ARA_Carapace>50</ARA_Carapace>
</costList>
<weaponTags Inherit="False">
<li>ARA_Armed_Organ</li>
<li>ARA_Armed_Organ_Ranged</li>
<li>ARA_Armed_Organ_T2</li>
<li>ARA_Armed_Organ_Small_Ranged_Energy</li>
</weaponTags>
<generateCommonality>0.01</generateCommonality>
<tradeability>None</tradeability>
<thingSetMakerTags Inherit="False"/>
<comps>
<li Class="ArachnaeSwarm.CompProperties_ExtraIncubationInfo">
<cocoonDefs>
<li>ARA_Cocoon_Weapon_1Stage</li>
<li>ARA_Cocoon_Weapon_1Stage_From_Death</li>
<li>ARA_BioforgeIncubator_Thing</li>
</cocoonDefs>
</li>
<li Class="ArachnaeSwarm.CompProperties_CustomUniqueWeapon" MayRequire="Ludeon.RimWorld.Odyssey">
<forcedTraits>
<li>ARA_Weapon_Damage_LightingChain</li>
</forcedTraits>
<numTraitsRange>
<min>1</min>
<max>1</max>
</numTraitsRange>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Large_Arc_Gun</defName>
<label>武装器官"闪电吐息炮"</label>
<description>阿拉克涅虫群督虫使用的大型远程武装器官,发射可分裂的传导性闪电链。电死你电死你电死你</description>
<label>武装器官"生物电导线"</label>
<description>阿拉克涅虫群督虫使用的大型远程武装器官,通过从携带大量电荷的细胞中释放能量,虫群可以使用这种武装器官在敌人的集群中发起连锁闪电打击</description>
<tickerType>Normal</tickerType>
<techLevel>Animal</techLevel>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon_1Stage</ThingDef>
</descriptionHyperlinks>
<graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_SkyHive_Gun</texPath>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Large_Arc_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>1.2</drawSize>
</graphicData>
@@ -1789,11 +1686,12 @@
</li>
<li Class="ArachnaeSwarm.CompProperties_CustomUniqueWeapon" MayRequire="Ludeon.RimWorld.Odyssey">
<forcedTraits>
<li>ARA_Huge_Weapon</li>
<li>ARA_Weapon_Damage_LightingChain</li>
</forcedTraits>
<numTraitsRange>
<min>1</min>
<max>1</max>
<min>2</min>
<max>2</max>
</numTraitsRange>
</li>
</comps>

View File

@@ -735,34 +735,13 @@
<li>InsectJelly</li>
</disallowedThingDefs>
</fuelFilter>
<fuelCapacity>20</fuelCapacity>
<fuelCapacity>10</fuelCapacity>
<fuelConsumptionRate>0</fuelConsumptionRate>
<consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
<targetFuelLevelConfigurable>true</targetFuelLevelConfigurable>
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
</li>
<li Class="CompProperties_Refuelable">
<fuelLabel>虫蜜</fuelLabel>
<fuelGizmoLabel>虫蜜</fuelGizmoLabel>
<fuelCapacity>100.0</fuelCapacity>
<fuelConsumptionRate>0</fuelConsumptionRate>
<consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
<autoRefuelPercent>0</autoRefuelPercent>
<initialAllowAutoRefuel>false</initialAllowAutoRefuel>
<showAllowAutoRefuelToggle>false</showAllowAutoRefuelToggle>
<fuelFilter>
<thingDefs>
<li>ARA_InsectJelly</li>
</thingDefs>
</fuelFilter>
<targetFuelLevelConfigurable>false</targetFuelLevelConfigurable>
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
<canEjectFuel>true</canEjectFuel>
</li>
<li Class="ArachnaeSwarm.CompProperties_NutritionToFuelConverter">
<checkInterval>200</checkInterval>
<nutritionCost>0.25</nutritionCost>
@@ -770,12 +749,35 @@
<fuelAmount>1</fuelAmount>
</li>
<li Class="ArachnaeSwarm.CompProperties_ProductStorage">
<fuelLabel>虫蜜</fuelLabel>
<fuelGizmoLabel>虫蜜</fuelGizmoLabel>
<fuelCapacity>25</fuelCapacity>
<fuelConsumptionRate>0</fuelConsumptionRate>
<consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
<fuelFilter>
<thingDefs>
<li>ARA_InsectJelly</li>
</thingDefs>
</fuelFilter>
<allowRefuelIfNotEmpty>false</allowRefuelIfNotEmpty>
<drawFuelGaugeInMap>false</drawFuelGaugeInMap>
<drawOutOfFuelOverlay>false</drawOutOfFuelOverlay>
<targetFuelLevelConfigurable>false</targetFuelLevelConfigurable>
<showAllowAutoRefuelToggle>false</showAllowAutoRefuelToggle>
<canEjectFuel>true</canEjectFuel>
</li>
<!-- 燃料满了自动弹出 -->
<li Class="ArachnaeSwarm.CompProperties_AutoEjector">
<!-- 精确指定要监控的燃料组件 -->
<targetComp>CompRefuelable</targetComp>
<!-- 在燃料达到99%时弹出 -->
<checkInterval>60</checkInterval>
<ejectAtPercent>0.99</ejectAtPercent>
<allowEjectedFuel>true</allowEjectedFuel>
<monitorProductStorage>true</monitorProductStorage>
<monitorRefuelable>false</monitorRefuelable>
</li>
<li Class="ArachnaeSwarm.CompProperties_DelayedTerrainSpawn">

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -1,13 +1,17 @@
{
"Version": 1,
"WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
"WorkspaceRootPath": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\building_comps\\ara_compinteractiveproducer\\compinteractiveproducer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\building_comps\\compnutritiontofuelconverter.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:building_comps\\compnutritiontofuelconverter.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\building_comps\\ara_compinteractiveproducer\\compinteractiveproducer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:building_comps\\ara_compinteractiveproducer\\compinteractiveproducer.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\\building_comps\\ara_compinteractiveproducer\\compresearchproducer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\building_comps\\ara_compinteractiveproducer\\compresearchproducer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:building_comps\\ara_compinteractiveproducer\\compresearchproducer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
@@ -18,21 +22,8 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 2,
"SelectedChildIndex": 1,
"Children": [
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "CompResearchProducer.cs",
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompResearchProducer.cs",
"RelativeDocumentMoniker": "Building_Comps\\ARA_CompInteractiveProducer\\CompResearchProducer.cs",
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompResearchProducer.cs",
"RelativeToolTip": "Building_Comps\\ARA_CompInteractiveProducer\\CompResearchProducer.cs",
"ViewState": "AgIAADoBAAAAAAAAAAAkwFIBAAAmAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-17T09:09:18.518Z",
"EditorCaption": ""
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
@@ -40,12 +31,37 @@
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "CompNutritionToFuelConverter.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\CompNutritionToFuelConverter.cs",
"RelativeDocumentMoniker": "Building_Comps\\CompNutritionToFuelConverter.cs",
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\CompNutritionToFuelConverter.cs",
"RelativeToolTip": "Building_Comps\\CompNutritionToFuelConverter.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAKEAAAAcAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-17T11:32:00.484Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "CompResearchProducer.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompResearchProducer.cs",
"RelativeDocumentMoniker": "Building_Comps\\ARA_CompInteractiveProducer\\CompResearchProducer.cs",
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompResearchProducer.cs",
"RelativeToolTip": "Building_Comps\\ARA_CompInteractiveProducer\\CompResearchProducer.cs",
"ViewState": "AgIAADoBAAAAAAAAAAAkwFIBAAAmAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-17T09:09:18.518Z"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "CompInteractiveProducer.cs",
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs",
"RelativeDocumentMoniker": "Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs",
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs",
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs",
"RelativeToolTip": "Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs",
"ViewState": "AgIAAJMBAAAAAAAAAAAUwNcBAAAyAAAAAAAAAA==",
"ViewState": "AgIAAJYBAAAAAAAAAAAUwKoBAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-17T09:00:51.526Z",
"EditorCaption": ""

View File

@@ -1,4 +1,5 @@
using RimWorld;
using System.Collections.Generic;
using Verse;
namespace ArachnaeSwarm
@@ -19,7 +20,7 @@ namespace ArachnaeSwarm
public class CompNutritionToFuelConverter : ThingComp
{
private CompRefuelableNutrition nutritionComp;
private CompRefuelable fuelComp;
private CompProductStorage productStorageComp; // 改为使用 CompProductStorage
public float nutritionProgress = 0f;
public float workProgress = 0f;
@@ -30,15 +31,15 @@ namespace ArachnaeSwarm
{
base.PostSpawnSetup(respawningAfterLoad);
nutritionComp = parent.GetComp<CompRefuelableNutrition>();
fuelComp = parent.GetComp<CompRefuelable>();
productStorageComp = parent.GetComp<CompProductStorage>(); // 改为获取 CompProductStorage
if (nutritionComp == null)
{
Log.Error($"[ArachnaeSwarm] {parent.def.defName} has CompNutritionToFuelConverter but no CompRefuelableNutrition.");
}
if (fuelComp == null)
if (productStorageComp == null)
{
Log.Error($"[ArachnaeSwarm] {parent.def.defName} has CompNutritionToFuelConverter but no CompRefuelable.");
Log.Error($"[ArachnaeSwarm] {parent.def.defName} has CompNutritionToFuelConverter but no CompProductStorage.");
}
}
@@ -60,7 +61,7 @@ namespace ArachnaeSwarm
private void TryProcess()
{
if (fuelComp == null || fuelComp.IsFull)
if (productStorageComp == null || productStorageComp.IsFull)
{
return;
}
@@ -88,27 +89,37 @@ namespace ArachnaeSwarm
{
int unitsToCraft = (int)(workProgress / Props.workAmount);
float fuelToProduce = unitsToCraft * Props.fuelAmount;
float spaceInTank = fuelComp.Props.fuelCapacity - fuelComp.Fuel;
float spaceInStorage = productStorageComp.StorageSpaceRemaining;
if (spaceInTank > 0)
if (spaceInStorage > 0)
{
// Add as much fuel as possible, up to what was produced.
float fuelToAdd = System.Math.Min(fuelToProduce, spaceInTank);
fuelComp.Refuel(fuelToAdd);
// 使用 CompProductStorage 的 API 添加产物
float fuelToAdd = System.Math.Min(fuelToProduce, spaceInStorage);
bool added = productStorageComp.TryAddProduct(fuelToAdd);
if (added)
{
// Consume the full cost, regardless of how much was actually added.
nutritionProgress -= unitsToCraft * Props.nutritionCost;
workProgress -= unitsToCraft * Props.workAmount;
// 记录日志用于调试
Log.Message($"[NutritionToFuel] Added {fuelToAdd} fuel to storage. Remaining space: {productStorageComp.StorageSpaceRemaining}");
}
// If spaceInTank is 0, do nothing and let progress build up.
else
{
Log.Warning($"[NutritionToFuel] Failed to add fuel to storage. Requested: {fuelToAdd}, Space: {spaceInStorage}");
}
}
// If spaceInStorage is 0, do nothing and let progress build up.
}
}
public override string CompInspectStringExtra()
{
if (fuelComp == null) return null;
if (productStorageComp == null) return null;
if (fuelComp.IsFull)
if (productStorageComp.IsFull)
{
return "ARA_NutritionConverter_State_TankFull".Translate();
}
@@ -120,5 +131,46 @@ namespace ArachnaeSwarm
return "ARA_NutritionConverter_Working".Translate(workProgress.ToString("F0"), Props.workAmount);
}
// 新增:调试命令
public override IEnumerable<Gizmo> CompGetGizmosExtra()
{
foreach (var gizmo in base.CompGetGizmosExtra())
{
yield return gizmo;
}
if (DebugSettings.ShowDevGizmos)
{
// 调试命令:显示状态信息
yield return new Command_Action
{
defaultLabel = "DEV: Show Converter Status",
action = delegate
{
string status = $"Nutrition Converter Status:\n" +
$"Nutrition Progress: {nutritionProgress:F1}/{Props.nutritionCost}\n" +
$"Work Progress: {workProgress:F0}/{Props.workAmount}\n" +
$"Product Storage: {productStorageComp?.StorageAmount:F1}/{productStorageComp?.StorageCapacity:F1}\n" +
$"Nutrition Comp: {(nutritionComp != null ? "Found" : "Missing")}\n" +
$"Product Storage Comp: {(productStorageComp != null ? "Found" : "Missing")}";
Messages.Message(status, MessageTypeDefOf.SilentInput);
Log.Message(status);
}
};
// 调试命令:重置进度
yield return new Command_Action
{
defaultLabel = "DEV: Reset Progress",
action = delegate
{
nutritionProgress = 0f;
workProgress = 0f;
Messages.Message("Converter progress reset", MessageTypeDefOf.SilentInput);
}
};
}
}
}
}