1
This commit is contained in:
Binary file not shown.
@@ -3,15 +3,16 @@
|
||||
<ThingDef ParentName="GravshipComponentBase">
|
||||
<defName>ARA_HiveShip_Heart</defName>
|
||||
<label>猎手虫巢舰-心脏</label>
|
||||
<description>一艘阿拉克涅虫群猎手虫巢舰的心脏。其功能和人类的逆重引擎类似</description>
|
||||
<description>一艘阿拉克涅虫群猎手虫巢舰的心脏,其功能和人类的逆重引擎类似。</description>
|
||||
<thingClass>ArachnaeSwarm.Building_ArachnaeGravEngine</thingClass>
|
||||
<drawerType>RealtimeOnly</drawerType>
|
||||
<tickerType>Normal</tickerType>
|
||||
<minifiedDef>MinifiedThing</minifiedDef>
|
||||
<uiIconPath>ArachnaeSwarm/Building/ARA_HiveShip_Heart_Icon</uiIconPath>
|
||||
<graphicData>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<texPath>Things/Building/GravEngine/GravEngine</texPath>
|
||||
<drawSize>(3,3)</drawSize>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_HiveShip_Heart_Pedestal</texPath>
|
||||
<drawSize>(3.25,3.25)</drawSize>
|
||||
<addTopAltitudeBias>true</addTopAltitudeBias>
|
||||
</graphicData>
|
||||
<statBases>
|
||||
@@ -24,17 +25,15 @@
|
||||
<!-- 应用 ModExtension -->
|
||||
<modExtensions>
|
||||
<li Class="ArachnaeSwarm.ArachnaeGravEngineExtension">
|
||||
<inspectCommandTexPath>UI/Commands/ArachnaeInspect</inspectCommandTexPath>
|
||||
<orbTexPath>Things/Building/ArachnaeGravEngine/ArachnaeGravEngine_Orb</orbTexPath>
|
||||
<cooldownTexPath>Things/Building/ArachnaeGravEngine/ArachnaeGravEngine_Cooldown</cooldownTexPath>
|
||||
<swarmIconPath>UI/Icons/ArachnaeSwarm</swarmIconPath>
|
||||
<inspectCommandTexPath>UI/Commands/Inspect</inspectCommandTexPath>
|
||||
<orbTexPath>ArachnaeSwarm/Building/ARA_HiveShip_Heart</orbTexPath>
|
||||
<cooldownTexPath>ArachnaeSwarm/Building/ARA_HiveShip_Heart</cooldownTexPath>
|
||||
</li>
|
||||
</modExtensions>
|
||||
<size>(3,3)</size>
|
||||
<castEdgeShadows>true</castEdgeShadows>
|
||||
<fillPercent>0.6</fillPercent>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<pathCost>20</pathCost>
|
||||
<passability>Impassable</passability>
|
||||
<canOverlapZones>false</canOverlapZones>
|
||||
<building>
|
||||
<ai_neverTrashThis>true</ai_neverTrashThis>
|
||||
@@ -48,20 +47,18 @@
|
||||
</building>
|
||||
<comps>
|
||||
<li Class="CompProperties_SubstructureFootprint">
|
||||
<radius>18.9</radius>
|
||||
<radius>30</radius>
|
||||
</li>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>8</glowRadius>
|
||||
<glowColor>(0,218,255,0)</glowColor>
|
||||
<glowColor>(199,136,114,0)</glowColor>
|
||||
</li>
|
||||
<li Class="CompProperties_AffectedByFacilities">
|
||||
<linkableFacilities>
|
||||
<li>GravFieldExtender</li>
|
||||
<li>PilotConsole</li>
|
||||
<li>ChemfuelTank</li>
|
||||
<li>LargeChemfuelTank</li>
|
||||
<li>SmallThruster</li>
|
||||
<li>LargeThruster</li>
|
||||
<li>GravFieldExtender</li> <!-- 硬编码 -->
|
||||
<li>PilotConsole</li> <!-- 硬编码 -->
|
||||
<li>ARA_HiveShip_Stomach</li>
|
||||
<li>ARA_HiveShip_Tail</li>
|
||||
<li>FuelOptimizer</li>
|
||||
<li>SignalJammer</li>
|
||||
<li>PilotSubpersonaCore</li>
|
||||
@@ -73,4 +70,114 @@
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="FuelTankBase">
|
||||
<defName>ARA_HiveShip_Stomach</defName>
|
||||
<label>猎手虫巢舰-胃囊</label>
|
||||
<description>阿拉克涅虫群猎手虫巢舰的胃囊,它可以储存供虫巢舰进行移动的生物质。</description>
|
||||
<graphicData>
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
<texPath>Things/Building/ChemfuelTank/ChemfuelTank</texPath>
|
||||
<drawSize>(2, 2)</drawSize>
|
||||
</graphicData>
|
||||
<statBases>
|
||||
<MaxHitPoints>200</MaxHitPoints>
|
||||
<Mass>30</Mass>
|
||||
<Flammability>1</Flammability>
|
||||
<Beauty>-10</Beauty>
|
||||
<WorkToBuild>2000</WorkToBuild>
|
||||
</statBases>
|
||||
<size>(2, 2)</size>
|
||||
<costList>
|
||||
<Steel>120</Steel>
|
||||
</costList>
|
||||
<researchPrerequisites>
|
||||
<li>BasicGravtech</li>
|
||||
</researchPrerequisites>
|
||||
<comps>
|
||||
<li Class="CompProperties_Refuelable">
|
||||
<fuelCapacity>250</fuelCapacity>
|
||||
<targetFuelLevelConfigurable>true</targetFuelLevelConfigurable>
|
||||
<initialConfigurableTargetFuelLevel>250</initialConfigurableTargetFuelLevel>
|
||||
<fuelFilter>
|
||||
<thingDefs>
|
||||
<li>Chemfuel</li>
|
||||
</thingDefs>
|
||||
</fuelFilter>
|
||||
<fuelLabel>Chemfuel</fuelLabel>
|
||||
<fuelGizmoLabel>Chemfuel</fuelGizmoLabel>
|
||||
<consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
|
||||
<autoRefuelPercent>1</autoRefuelPercent>
|
||||
<showFuelGizmo>true</showFuelGizmo>
|
||||
<drawOutOfFuelOverlay>false</drawOutOfFuelOverlay>
|
||||
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
|
||||
<canEjectFuel>true</canEjectFuel>
|
||||
<drawFuelGaugeInMap>false</drawFuelGaugeInMap>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="ThrusterBase">
|
||||
<defName>ARA_HiveShip_Tail</defName>
|
||||
<label>small thruster</label>
|
||||
<description>A chemfuel thruster that increases the range of a gravship. Thrusters require an unobstructed area free of large buildings and gravship substructure.\n\nA gravship can support up to four small thrusters.</description>
|
||||
<graphicData>
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
<texPath>Things/Building/SmallThruster/SmallThruster</texPath>
|
||||
<drawSize>(1.1, 2.2)</drawSize>
|
||||
<shadowData>
|
||||
<volume>(1, 1, 2)</volume>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<statBases>
|
||||
<MaxHitPoints>250</MaxHitPoints>
|
||||
<Flammability>0</Flammability>
|
||||
<Beauty>-10</Beauty>
|
||||
<WorkToBuild>10000</WorkToBuild>
|
||||
<Mass>20</Mass>
|
||||
</statBases>
|
||||
<size>(1, 2)</size>
|
||||
<constructionSkillPrerequisite>4</constructionSkillPrerequisite>
|
||||
<costList>
|
||||
<Steel>180</Steel>
|
||||
<ComponentIndustrial>4</ComponentIndustrial>
|
||||
</costList>
|
||||
<researchPrerequisites>
|
||||
<li>BasicGravtech</li>
|
||||
</researchPrerequisites>
|
||||
<comps>
|
||||
<li Class="CompProperties_GravshipThruster">
|
||||
<statOffsets>
|
||||
<GravshipRange>10</GravshipRange>
|
||||
</statOffsets>
|
||||
<componentTypeDef>Thruster</componentTypeDef>
|
||||
<exclusionAreaSize>(1, 0, 5)</exclusionAreaSize>
|
||||
<exclusionAreaOffset>(0, 0, -5)</exclusionAreaOffset>
|
||||
<directionInfluence>20</directionInfluence>
|
||||
<flameSize>4.0</flameSize>
|
||||
<flameOffsetsPerDirection>
|
||||
<li>(0, 0, 0.5)</li>
|
||||
<li>(0, 0, 0.5)</li>
|
||||
<li>(0, 0, 0.5)</li>
|
||||
<li>(0, 0, 0.5)</li>
|
||||
</flameOffsetsPerDirection>
|
||||
<flameShaderType>MoteGlow</flameShaderType>
|
||||
<flameShaderParameters>
|
||||
<_MainTex>/Things/Mote/SmallThruster_Burn</_MainTex>
|
||||
</flameShaderParameters>
|
||||
<requiresLOS>false</requiresLOS>
|
||||
<maxSimultaneous>4</maxSimultaneous>
|
||||
<maxDistance>500</maxDistance>
|
||||
<exhaustSettings>
|
||||
<exhaustFleckDef>GravshipThrusterExhaust</exhaustFleckDef>
|
||||
<emissionsPerSecond>40.0</emissionsPerSecond>
|
||||
<spawnRadiusRange>0.0~0.5</spawnRadiusRange>
|
||||
<velocity>(0.0,0.0,-20.0)</velocity>
|
||||
<velocityRotationRange>-10.0~10.0</velocityRotationRange>
|
||||
<velocityMultiplierRange>0.8~1.2</velocityMultiplierRange>
|
||||
<rotationOverTimeRange>-180.0~180.0</rotationOverTimeRange>
|
||||
<scaleRange>1.5~3.0</scaleRange>
|
||||
</exhaustSettings>
|
||||
</li>
|
||||
<li Class="CompProperties_Breakdownable" />
|
||||
</comps>
|
||||
</ThingDef>
|
||||
</Defs>
|
||||
BIN
Content/Textures/ArachnaeSwarm/Building/ARA_HiveShip_Heart.png
Normal file
BIN
Content/Textures/ArachnaeSwarm/Building/ARA_HiveShip_Heart.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 128 KiB |
Binary file not shown.
@@ -1,25 +1,17 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
|
||||
"WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\buildings\\building_arachnaegravengine.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\\buildings\\building_arachnaegravengine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:buildings\\building_arachnaegravengine.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_spawnpawnfromlist\\compspawnpawnfromlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:building_comps\\ara_spawnpawnfromlist\\compspawnpawnfromlist.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_spawnpawnfromlist\\compproperties_spawnpawnfromlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:building_comps\\ara_spawnpawnfromlist\\compproperties_spawnpawnfromlist.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\\hediffs\\ara_hediffterrainspawn\\comphediffterrainspawn.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\\hediffs\\ara_hediffterrainspawn\\comphediffterrainspawn.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:hediffs\\ara_hediffterrainspawn\\comphediffterrainspawn.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\\abilities\\compabilityeffect_randomhediff.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\\abilities\\compabilityeffect_randomhediff.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\compabilityeffect_randomhediff.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
@@ -40,59 +32,35 @@
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Building_ArachnaeGravEngine.cs",
|
||||
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_ArachnaeGravEngine.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_ArachnaeGravEngine.cs",
|
||||
"RelativeDocumentMoniker": "Buildings\\Building_ArachnaeGravEngine.cs",
|
||||
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_ArachnaeGravEngine.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_ArachnaeGravEngine.cs",
|
||||
"RelativeToolTip": "Buildings\\Building_ArachnaeGravEngine.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAADwvw0AAAAmAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAK0AAAAAAAAAAAAUwL4AAAANAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-10-23T12:04:20.765Z",
|
||||
"WhenOpened": "2025-10-24T02:30:45.288Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "CompSpawnPawnFromList.cs",
|
||||
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_SpawnPawnFromList\\CompSpawnPawnFromList.cs",
|
||||
"RelativeDocumentMoniker": "Building_Comps\\ARA_SpawnPawnFromList\\CompSpawnPawnFromList.cs",
|
||||
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_SpawnPawnFromList\\CompSpawnPawnFromList.cs",
|
||||
"RelativeToolTip": "Building_Comps\\ARA_SpawnPawnFromList\\CompSpawnPawnFromList.cs",
|
||||
"ViewState": "AgIAAHQAAAAAAAAAAAAgwKAAAAA/AAAAAAAAAA==",
|
||||
"Title": "CompHediffTerrainSpawn.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"RelativeDocumentMoniker": "Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"RelativeToolTip": "Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"ViewState": "AgIAAB0AAAAAAAAAAAAswE0AAABHAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-10-23T10:44:55.813Z",
|
||||
"WhenOpened": "2025-10-23T08:00:28.236Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "CompProperties_SpawnPawnFromList.cs",
|
||||
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_SpawnPawnFromList\\CompProperties_SpawnPawnFromList.cs",
|
||||
"RelativeDocumentMoniker": "Building_Comps\\ARA_SpawnPawnFromList\\CompProperties_SpawnPawnFromList.cs",
|
||||
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_SpawnPawnFromList\\CompProperties_SpawnPawnFromList.cs",
|
||||
"RelativeToolTip": "Building_Comps\\ARA_SpawnPawnFromList\\CompProperties_SpawnPawnFromList.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAADwvwAAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-10-23T10:44:53.422Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "CompHediffTerrainSpawn.cs",
|
||||
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"RelativeDocumentMoniker": "Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"RelativeToolTip": "Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"ViewState": "AgIAAF4AAAAAAAAAAAAAAG4AAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-10-23T08:00:28.236Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "CompAbilityEffect_RandomHediff.cs",
|
||||
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"RelativeDocumentMoniker": "Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"RelativeToolTip": "Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"ViewState": "AgIAALoAAAAAAAAAAAAqwNcAAAAZAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
|
||||
@@ -114,7 +114,8 @@ namespace ArachnaeSwarm
|
||||
{
|
||||
if (selectedPawn != null && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
Notify_PawnRemoved();
|
||||
Log.Warning($"RefuelingVat despawned with pawn inside, forcing ejection.");
|
||||
Finish(); // 使用修改后的Finish方法
|
||||
}
|
||||
}
|
||||
base.DeSpawn(mode);
|
||||
@@ -172,6 +173,13 @@ namespace ArachnaeSwarm
|
||||
|
||||
if (base.Working && selectedPawn != null)
|
||||
{
|
||||
// 检查俘虏是否死亡 - 增加更严格的检查
|
||||
if (selectedPawn.Dead || selectedPawn.Destroyed)
|
||||
{
|
||||
Finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// 酸蚀伤害逻辑
|
||||
if (pawnTickCounters.TryGetValue(selectedPawn, out int tickCount))
|
||||
{
|
||||
@@ -195,13 +203,6 @@ namespace ArachnaeSwarm
|
||||
float fuelToAdd = FuelProductionPerTick;
|
||||
RefuelableComp.Refuel(fuelToAdd);
|
||||
}
|
||||
|
||||
// 检查俘虏是否死亡
|
||||
if (selectedPawn.Dead)
|
||||
{
|
||||
Finish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,11 +255,61 @@ namespace ArachnaeSwarm
|
||||
|
||||
private void Finish()
|
||||
{
|
||||
if (selectedPawn != null && innerContainer.Contains(selectedPawn))
|
||||
if (selectedPawn != null)
|
||||
{
|
||||
Notify_PawnRemoved();
|
||||
innerContainer.TryDrop(selectedPawn, InteractionCell, base.Map, ThingPlaceMode.Near, 1, out var _);
|
||||
OnStop();
|
||||
try
|
||||
{
|
||||
Notify_PawnRemoved();
|
||||
|
||||
bool ejected = false;
|
||||
string ejectionMethod = "None";
|
||||
|
||||
// 方法1:标准弹出 - 在交互单元格附近
|
||||
if (innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
ejected = innerContainer.TryDrop(selectedPawn, InteractionCell, base.Map, ThingPlaceMode.Near, 1, out var _);
|
||||
if (ejected) ejectionMethod = "Standard";
|
||||
}
|
||||
|
||||
// 方法2:尝试随机相邻单元格
|
||||
if (!ejected && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
var adjacentCells = GenAdj.CellsAdjacent8Way(this).Where(c => c.Walkable(base.Map) && c.InBounds(base.Map)).ToList();
|
||||
if (adjacentCells.Count > 0)
|
||||
{
|
||||
IntVec3 randomCell = adjacentCells.RandomElement();
|
||||
ejected = innerContainer.TryDrop(selectedPawn, randomCell, base.Map, ThingPlaceMode.Direct, 1, out var _);
|
||||
if (ejected) ejectionMethod = "Adjacent";
|
||||
}
|
||||
}
|
||||
|
||||
// 方法3:强制移除
|
||||
if (!ejected && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
Log.Warning($"Forcing removal of dead pawn {selectedPawn} from RefuelingVat");
|
||||
innerContainer.Remove(selectedPawn);
|
||||
GenPlace.TryPlaceThing(selectedPawn, this.Position, base.Map, ThingPlaceMode.Near);
|
||||
ejected = true;
|
||||
ejectionMethod = "Forced";
|
||||
}
|
||||
|
||||
if (ejected)
|
||||
{
|
||||
Log.Message($"Successfully ejected {selectedPawn} using method: {ejectionMethod}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Failed to eject {selectedPawn} from RefuelingVat");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error($"Error during Finish() for {selectedPawn}: {ex}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
OnStop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,6 +318,13 @@ namespace ArachnaeSwarm
|
||||
if (selectedPawn != null)
|
||||
{
|
||||
pawnTickCounters.Remove(selectedPawn);
|
||||
|
||||
// 确保pawn不在容器中
|
||||
if (innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
Log.Warning($"Pawn {selectedPawn} still in container during OnStop, forcing removal.");
|
||||
innerContainer.Remove(selectedPawn);
|
||||
}
|
||||
}
|
||||
selectedPawn = null;
|
||||
startTick = -1;
|
||||
|
||||
@@ -88,6 +88,10 @@ namespace ArachnaeSwarm
|
||||
}
|
||||
}
|
||||
|
||||
// 酸蚀伤害间隔(每6000 tick约1/10天)
|
||||
private const int AcidDamageInterval = 6000;
|
||||
private Dictionary<Pawn, int> pawnTickCounters = new Dictionary<Pawn, int>();
|
||||
|
||||
public override void SpawnSetup(Map map, bool respawningAfterLoad)
|
||||
{
|
||||
base.SpawnSetup(map, respawningAfterLoad);
|
||||
@@ -100,19 +104,13 @@ namespace ArachnaeSwarm
|
||||
{
|
||||
if (selectedPawn != null && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
Notify_PawnRemoved();
|
||||
Log.Warning($"NutrientVat despawned with pawn inside, forcing ejection.");
|
||||
Finish(); // 使用修改后的Finish方法
|
||||
}
|
||||
}
|
||||
base.DeSpawn(mode);
|
||||
}
|
||||
|
||||
//修改点:对里面的人员进行酸蚀伤害
|
||||
private Dictionary<Pawn, int> pawnTickCounters = new Dictionary<Pawn, int>();
|
||||
private BodyPartRecord GetRandomBodyPart(Pawn pawn)
|
||||
{
|
||||
var parts = pawn.health.hediffSet.GetNotMissingParts().ToList();
|
||||
return parts.Count > 0 ? parts.RandomElement() : pawn.RaceProps.body.corePart;
|
||||
}
|
||||
private void ApplyAcidDamage(Pawn pawn)
|
||||
{
|
||||
try
|
||||
@@ -123,14 +121,14 @@ namespace ArachnaeSwarm
|
||||
|
||||
DamageInfo acidDamage = new DamageInfo(
|
||||
acidDamageDef,
|
||||
3f, // 每次3点伤害
|
||||
2f, // 轻微护甲穿透
|
||||
-1f, // 随机角度
|
||||
3f, // 每次3点伤害
|
||||
2f, // 护甲穿透
|
||||
-1f, // 随机角度
|
||||
instigator: null,
|
||||
hitPart: targetPart
|
||||
);
|
||||
|
||||
// 应用伤害
|
||||
// 应用伤害
|
||||
pawn.TakeDamage(acidDamage);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -138,9 +136,10 @@ namespace ArachnaeSwarm
|
||||
Log.Error($"Error applying acid damage to {pawn}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private BodyPartRecord GetRandomVulnerablePart(Pawn pawn)
|
||||
{
|
||||
// 优先选择外部身体部位
|
||||
// 优先选择外部身体部位
|
||||
var vulnerableParts = pawn.health.hediffSet.GetNotMissingParts()
|
||||
.Where(part => part.depth == BodyPartDepth.Outside &&
|
||||
!part.def.conceptual &&
|
||||
@@ -164,24 +163,23 @@ namespace ArachnaeSwarm
|
||||
|
||||
if (base.Working && selectedPawn != null)
|
||||
{
|
||||
//修改点:对里面的人员进行酸蚀伤害
|
||||
// 检查俘虏是否死亡 - 增加更严格的检查
|
||||
if (selectedPawn.Dead || selectedPawn.Destroyed)
|
||||
{
|
||||
Finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// 酸蚀伤害逻辑
|
||||
if (pawnTickCounters.TryGetValue(selectedPawn, out int tickCount))
|
||||
{
|
||||
tickCount++;
|
||||
pawnTickCounters[selectedPawn] = tickCount;
|
||||
|
||||
if (tickCount >= 6000)
|
||||
if (tickCount >= AcidDamageInterval)
|
||||
{
|
||||
DamageInfo acidDamage = new DamageInfo(
|
||||
DefDatabase<DamageDef>.GetNamed("AcidBurn") ?? DamageDefOf.Burn,
|
||||
1f,
|
||||
100f, // 完全护甲穿透
|
||||
-1f,
|
||||
instigator: null,
|
||||
hitPart: GetRandomBodyPart(selectedPawn)
|
||||
);
|
||||
pawnTickCounters[selectedPawn] = 0;
|
||||
ApplyAcidDamage(selectedPawn);
|
||||
pawnTickCounters[selectedPawn] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -242,24 +240,26 @@ namespace ArachnaeSwarm
|
||||
{
|
||||
return "PawnBiostarving".Translate(pawn.Named("PAWN"));
|
||||
}
|
||||
//修改点:禁止置入虫群成员
|
||||
if (pawn.health.hediffSet.HasHediff(ARA_HediffDefOf.ARA_HiveMindMaster) || pawn.health.hediffSet.HasHediff(ARA_HediffDefOf.ARA_HiveMindDrone) || pawn.health.hediffSet.HasHediff(ARA_HediffDefOf.ARA_HiveMindWorker))
|
||||
// 禁止置入虫群成员
|
||||
if (pawn.health.hediffSet.HasHediff(ARA_HediffDefOf.ARA_HiveMindMaster) ||
|
||||
pawn.health.hediffSet.HasHediff(ARA_HediffDefOf.ARA_HiveMindDrone) ||
|
||||
pawn.health.hediffSet.HasHediff(ARA_HediffDefOf.ARA_HiveMindWorker))
|
||||
{
|
||||
return "PawnIsHiveMember".Translate(pawn.Named("PAWN"));
|
||||
}
|
||||
|
||||
//修改点:允许殖民者、囚犯和奴隶
|
||||
// 允许殖民者、囚犯和奴隶
|
||||
bool isColonist = pawn.IsColonist;
|
||||
bool isPrisoner = pawn.IsPrisonerOfColony;
|
||||
bool isSlave = pawn.IsSlaveOfColony;
|
||||
|
||||
// 允许殖民者、囚犯或奴隶,但不能是任务寄宿者
|
||||
// 允许殖民者、囚犯或奴隶,但不能是任务寄宿者
|
||||
return (isColonist || isPrisoner || isSlave) && !pawn.IsQuestLodger();
|
||||
}
|
||||
|
||||
public override void TryAcceptPawn(Pawn pawn)
|
||||
{
|
||||
if (!CanAcceptPawn(pawn))
|
||||
if (!CanAcceptPawn(pawn).Accepted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -269,6 +269,7 @@ namespace ArachnaeSwarm
|
||||
if (innerContainer.TryAddOrTransfer(pawn))
|
||||
{
|
||||
startTick = Find.TickManager.TicksGame;
|
||||
pawnTickCounters[pawn] = 0; // 初始化伤害计数器
|
||||
}
|
||||
if (deselected)
|
||||
{
|
||||
@@ -278,28 +279,143 @@ namespace ArachnaeSwarm
|
||||
|
||||
private void Finish()
|
||||
{
|
||||
if (selectedPawn != null && innerContainer.Contains(selectedPawn))
|
||||
if (selectedPawn != null)
|
||||
{
|
||||
Notify_PawnRemoved();
|
||||
innerContainer.TryDrop(selectedPawn, InteractionCell, base.Map, ThingPlaceMode.Near, 1, out var _);
|
||||
OnStop();
|
||||
try
|
||||
{
|
||||
Notify_PawnRemoved();
|
||||
|
||||
bool ejected = false;
|
||||
string ejectionMethod = "None";
|
||||
|
||||
// 方法1:标准弹出 - 在交互单元格附近
|
||||
if (innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
ejected = innerContainer.TryDrop(selectedPawn, InteractionCell, base.Map, ThingPlaceMode.Near, 1, out var _);
|
||||
if (ejected) ejectionMethod = "Standard";
|
||||
}
|
||||
|
||||
// 方法2:尝试随机相邻单元格
|
||||
if (!ejected && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
var adjacentCells = GenAdj.CellsAdjacent8Way(this).Where(c => c.Walkable(base.Map) && c.InBounds(base.Map)).ToList();
|
||||
if (adjacentCells.Count > 0)
|
||||
{
|
||||
IntVec3 randomCell = adjacentCells.RandomElement();
|
||||
ejected = innerContainer.TryDrop(selectedPawn, randomCell, base.Map, ThingPlaceMode.Direct, 1, out var _);
|
||||
if (ejected) ejectionMethod = "Adjacent";
|
||||
}
|
||||
}
|
||||
|
||||
// 方法3:强制移除
|
||||
if (!ejected && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
Log.Warning($"Forcing removal of pawn {selectedPawn} from NutrientVat");
|
||||
innerContainer.Remove(selectedPawn);
|
||||
GenPlace.TryPlaceThing(selectedPawn, this.Position, base.Map, ThingPlaceMode.Near);
|
||||
ejected = true;
|
||||
ejectionMethod = "Forced";
|
||||
}
|
||||
|
||||
if (ejected)
|
||||
{
|
||||
Log.Message($"Successfully ejected {selectedPawn} using method: {ejectionMethod}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Failed to eject {selectedPawn} from NutrientVat");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error($"Error during Finish() for {selectedPawn}: {ex}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
OnStop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Fail()
|
||||
{
|
||||
if (selectedPawn != null && innerContainer.Contains(selectedPawn))
|
||||
if (selectedPawn != null)
|
||||
{
|
||||
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);
|
||||
try
|
||||
{
|
||||
Notify_PawnRemoved();
|
||||
|
||||
bool ejected = false;
|
||||
string ejectionMethod = "None";
|
||||
|
||||
// 方法1:标准弹出 - 在交互单元格附近
|
||||
if (innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
ejected = innerContainer.TryDrop(selectedPawn, InteractionCell, base.Map, ThingPlaceMode.Near, 1, out var _);
|
||||
if (ejected) ejectionMethod = "Standard";
|
||||
}
|
||||
|
||||
// 方法2:尝试随机相邻单元格
|
||||
if (!ejected && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
var adjacentCells = GenAdj.CellsAdjacent8Way(this).Where(c => c.Walkable(base.Map) && c.InBounds(base.Map)).ToList();
|
||||
if (adjacentCells.Count > 0)
|
||||
{
|
||||
IntVec3 randomCell = adjacentCells.RandomElement();
|
||||
ejected = innerContainer.TryDrop(selectedPawn, randomCell, base.Map, ThingPlaceMode.Direct, 1, out var _);
|
||||
if (ejected) ejectionMethod = "Adjacent";
|
||||
}
|
||||
}
|
||||
|
||||
// 方法3:强制移除
|
||||
if (!ejected && innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
Log.Warning($"Forcing removal of failed pawn {selectedPawn} from NutrientVat");
|
||||
innerContainer.Remove(selectedPawn);
|
||||
GenPlace.TryPlaceThing(selectedPawn, this.Position, base.Map, ThingPlaceMode.Near);
|
||||
ejected = true;
|
||||
ejectionMethod = "Forced";
|
||||
}
|
||||
|
||||
if (ejected)
|
||||
{
|
||||
Log.Message($"Successfully ejected failed pawn {selectedPawn} using method: {ejectionMethod}");
|
||||
// 在成功弹出后杀死俘虏
|
||||
Hediff firstHediffOfDef = selectedPawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.BioStarvation);
|
||||
selectedPawn.Kill(null, firstHediffOfDef);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Failed to eject failed pawn {selectedPawn} from NutrientVat");
|
||||
// 即使弹出失败也要杀死俘虏
|
||||
Hediff firstHediffOfDef = selectedPawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.BioStarvation);
|
||||
selectedPawn.Kill(null, firstHediffOfDef);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error($"Error during Fail() for {selectedPawn}: {ex}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
OnStop();
|
||||
}
|
||||
}
|
||||
OnStop();
|
||||
}
|
||||
|
||||
private void OnStop()
|
||||
{
|
||||
if (selectedPawn != null)
|
||||
{
|
||||
pawnTickCounters.Remove(selectedPawn);
|
||||
|
||||
// 确保pawn不在容器中
|
||||
if (innerContainer.Contains(selectedPawn))
|
||||
{
|
||||
Log.Warning($"Pawn {selectedPawn} still in container during OnStop, forcing removal.");
|
||||
innerContainer.Remove(selectedPawn);
|
||||
}
|
||||
}
|
||||
selectedPawn = null;
|
||||
startTick = -1;
|
||||
if (RefuelableComp != null)
|
||||
@@ -312,22 +428,22 @@ namespace ArachnaeSwarm
|
||||
{
|
||||
// You can add sound effects here if you want, e.g., SoundDefOf.GrowthVat_Open.PlayOneShot(SoundInfo.InMap(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Gizmo> GetGizmos()
|
||||
{
|
||||
// 原有的基础Gizmos
|
||||
// 原有的基础Gizmos
|
||||
foreach (Gizmo gizmo in base.GetGizmos())
|
||||
{
|
||||
yield return gizmo;
|
||||
}
|
||||
|
||||
// 修改点:删除了弹出功能
|
||||
if (base.Working)
|
||||
{
|
||||
// 原有的工作状态下的Gizmos
|
||||
// 原有的工作状态下的Gizmos
|
||||
}
|
||||
else
|
||||
{
|
||||
// 原有的选择殖民者的操作
|
||||
// 原有的选择殖民者的操作
|
||||
var command_Action = new Command_Action
|
||||
{
|
||||
defaultLabel = "InsertPerson".Translate() + "...",
|
||||
@@ -338,7 +454,7 @@ namespace ArachnaeSwarm
|
||||
List<FloatMenuOption> list = new List<FloatMenuOption>();
|
||||
foreach (Pawn p in base.Map.mapPawns.AllPawnsSpawned)
|
||||
{
|
||||
if ((bool)CanAcceptPawn(p))
|
||||
if (CanAcceptPawn(p).Accepted)
|
||||
{
|
||||
list.Add(new FloatMenuOption(p.LabelCap, () => SelectPawn(p), p, Color.white));
|
||||
}
|
||||
@@ -356,7 +472,7 @@ namespace ArachnaeSwarm
|
||||
}
|
||||
yield return command_Action;
|
||||
|
||||
// 新增:指派搬运囚犯/奴隶的操作
|
||||
// 指派搬运囚犯/奴隶的操作
|
||||
var command_CarryPrisoner = new Command_Action
|
||||
{
|
||||
defaultLabel = "AssignCarryPrisoner".Translate() + "...",
|
||||
@@ -366,10 +482,10 @@ namespace ArachnaeSwarm
|
||||
{
|
||||
List<FloatMenuOption> list = new List<FloatMenuOption>();
|
||||
|
||||
// 获取所有可接受的囚犯和奴隶
|
||||
// 获取所有可接受的囚犯和奴隶
|
||||
foreach (Pawn p in base.Map.mapPawns.AllPawnsSpawned)
|
||||
{
|
||||
if ((bool)CanAcceptPawn(p) && (p.IsPrisonerOfColony || p.IsSlaveOfColony))
|
||||
if (CanAcceptPawn(p).Accepted && (p.IsPrisonerOfColony || p.IsSlaveOfColony))
|
||||
{
|
||||
list.Add(new FloatMenuOption(
|
||||
p.LabelCap + " (" + (p.IsPrisonerOfColony ? "Prisoner" : "Slave") + ")",
|
||||
@@ -388,9 +504,9 @@ namespace ArachnaeSwarm
|
||||
}
|
||||
};
|
||||
|
||||
// 检查是否有可用的囚犯/奴隶
|
||||
// 检查是否有可用的囚犯/奴隶
|
||||
bool hasPrisonersOrSlaves = base.Map.mapPawns.AllPawnsSpawned
|
||||
.Any(p => (bool)CanAcceptPawn(p) && (p.IsPrisonerOfColony || p.IsSlaveOfColony));
|
||||
.Any(p => CanAcceptPawn(p).Accepted && (p.IsPrisonerOfColony || p.IsSlaveOfColony));
|
||||
|
||||
if (!hasPrisonersOrSlaves)
|
||||
{
|
||||
@@ -416,6 +532,13 @@ namespace ArachnaeSwarm
|
||||
string text = ((BiostarvationDailyOffset >= 0f) ? "+" : string.Empty);
|
||||
stringBuilder.AppendLineIfNotEmpty().Append(string.Format("{0}: {1} ({2})", "Biostarvation".Translate(), biostarvation.Severity.ToStringPercent(), "PerDay".Translate(text + BiostarvationDailyOffset.ToStringPercent())));
|
||||
}
|
||||
|
||||
// 显示酸蚀伤害信息
|
||||
if (pawnTickCounters.TryGetValue(selectedPawn, out int tickCount))
|
||||
{
|
||||
float damageProgress = (float)tickCount / AcidDamageInterval;
|
||||
stringBuilder.AppendLineIfNotEmpty().Append("AcidDamageProgress".Translate() + ": " + damageProgress.ToStringPercent());
|
||||
}
|
||||
}
|
||||
else if (selectedPawn != null)
|
||||
{
|
||||
@@ -466,13 +589,14 @@ namespace ArachnaeSwarm
|
||||
TopGraphic.Draw(DrawPos + Altitudes.AltIncVect * 2f, base.Rotation, this);
|
||||
}
|
||||
}
|
||||
|
||||
public Job CreateCarryJobForPrisoner(Pawn prisoner, Pawn carrier)
|
||||
{
|
||||
if (prisoner == null || carrier == null)
|
||||
return null;
|
||||
if (!CanAcceptPawn(prisoner).Accepted)
|
||||
return null;
|
||||
// 创建搬运工作定义
|
||||
// 创建搬运工作定义
|
||||
JobDef carryJobDef = DefDatabase<JobDef>.GetNamed("ARA_CarryPrisonerToNutrientVat");
|
||||
if (carryJobDef == null)
|
||||
return null;
|
||||
@@ -480,16 +604,17 @@ namespace ArachnaeSwarm
|
||||
job.count = 1;
|
||||
return job;
|
||||
}
|
||||
|
||||
public IEnumerable<Pawn> GetAvailableCarriers()
|
||||
{
|
||||
foreach (Pawn pawn in base.Map.mapPawns.AllPawnsSpawned)
|
||||
{
|
||||
// 检查是否是虫群成员(拥有ARA_HiveMindDrone)
|
||||
// 检查是否是虫群成员
|
||||
if (pawn.health.hediffSet.HasHediff(ARA_HediffDefOf.ARA_HiveMindDrone) ||
|
||||
pawn.health.hediffSet.HasHediff(ARA_HediffDefOf.ARA_HiveMindWorker) ||
|
||||
pawn.health.hediffSet.HasHediff(ARA_HediffDefOf.ARA_HiveMindMaster))
|
||||
{
|
||||
// 检查是否能够工作且不是囚犯
|
||||
// 检查是否能够工作且不是囚犯
|
||||
if (pawn.workSettings != null && pawn.workSettings.WorkIsActive(WorkTypeDefOf.Hauling) &&
|
||||
!pawn.Downed && !pawn.IsPrisoner && pawn.CanReach(this, PathEndMode.InteractionCell, Danger.Some))
|
||||
{
|
||||
@@ -498,11 +623,12 @@ namespace ArachnaeSwarm
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AssignCarrierForPrisoner(Pawn prisoner)
|
||||
{
|
||||
if (prisoner == null)
|
||||
return;
|
||||
// 获取可用的搬运者
|
||||
// 获取可用的搬运者
|
||||
var availableCarriers = GetAvailableCarriers().ToList();
|
||||
|
||||
if (!availableCarriers.Any())
|
||||
@@ -510,7 +636,7 @@ namespace ArachnaeSwarm
|
||||
Messages.Message("NoAvailableHiveCarriers".Translate(), MessageTypeDefOf.RejectInput);
|
||||
return;
|
||||
}
|
||||
// 创建浮动菜单选择搬运者
|
||||
// 创建浮动菜单选择搬运者
|
||||
List<FloatMenuOption> options = new List<FloatMenuOption>();
|
||||
|
||||
foreach (Pawn carrier in availableCarriers)
|
||||
@@ -539,5 +665,12 @@ namespace ArachnaeSwarm
|
||||
Messages.Message("NoAvailableCarriers".Translate(), MessageTypeDefOf.RejectInput);
|
||||
}
|
||||
}
|
||||
|
||||
// 保存和加载数据
|
||||
public override void ExposeData()
|
||||
{
|
||||
base.ExposeData();
|
||||
Scribe_Collections.Look(ref pawnTickCounters, "pawnTickCounters", LookMode.Reference, LookMode.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,12 +174,22 @@ namespace ArachnaeSwarm
|
||||
Messages.Message("ArachnaeSwarmActivated".Translate(), this, MessageTypeDefOf.PositiveEvent);
|
||||
}
|
||||
|
||||
// 重写 DrawAt 方法以使用自定义材质
|
||||
// 重写 DrawAt 方法以完全控制绘制过程
|
||||
protected override void DrawAt(Vector3 drawLoc, bool flip = false)
|
||||
{
|
||||
base.DrawAt(drawLoc, flip);
|
||||
// 不调用 base.DrawAt,而是直接绘制建筑主体
|
||||
// 复制父类 Building 的 DrawAt 逻辑,但不包括 orb 的绘制
|
||||
if (def.graphicData != null)
|
||||
{
|
||||
Graphic graphic = Graphic;
|
||||
if (graphic != null)
|
||||
{
|
||||
graphic.Draw(drawLoc, flip ? base.Rotation.Opposite : base.Rotation, this, 0f);
|
||||
}
|
||||
}
|
||||
if (base.Spawned)
|
||||
{
|
||||
// 应用浮动效果(与父类相同)
|
||||
if (Find.TickManager.TicksGame >= cooldownCompleteTick)
|
||||
{
|
||||
// 使用 Mathf 替代 MathF
|
||||
@@ -187,8 +197,8 @@ namespace ArachnaeSwarm
|
||||
}
|
||||
drawLoc.y += 0.03658537f;
|
||||
Vector3 s = new Vector3(def.graphicData.drawSize.x, 1f, def.graphicData.drawSize.y);
|
||||
|
||||
// 使用自定义的球体材质
|
||||
|
||||
// 只使用自定义的球体材质,不绘制默认 orb
|
||||
Graphics.DrawMesh(MeshPool.plane10Back, Matrix4x4.TRS(drawLoc, base.Rotation.AsQuat, s), CustomOrbMat.Material, 0, null, 0);
|
||||
}
|
||||
}
|
||||
@@ -217,6 +227,5 @@ namespace ArachnaeSwarm
|
||||
public string inspectCommandTexPath;
|
||||
public string orbTexPath;
|
||||
public string cooldownTexPath;
|
||||
public string swarmIconPath;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user