1
This commit is contained in:
Binary file not shown.
@@ -1,9 +1,13 @@
|
||||
{
|
||||
"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\\stat\\statworker_incubationinfo.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\\moharhediffs\\hediffcomp_spawner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:hediffs\\moharhediffs\\hediffcomp_spawner.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\\stat\\statworker_incubationinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:stat\\statworker_incubationinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
@@ -23,10 +27,23 @@
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "HediffComp_Spawner.cs",
|
||||
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\MoharHediffs\\HediffComp_Spawner.cs",
|
||||
"RelativeDocumentMoniker": "Hediffs\\MoharHediffs\\HediffComp_Spawner.cs",
|
||||
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\MoharHediffs\\HediffComp_Spawner.cs*",
|
||||
"RelativeToolTip": "Hediffs\\MoharHediffs\\HediffComp_Spawner.cs*",
|
||||
"ViewState": "AgIAAKABAAAAAAAAAAAUwLoBAAAUAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-09-30T23:28:37.585Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "StatWorker_IncubationInfo.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Stat\\StatWorker_IncubationInfo.cs",
|
||||
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Stat\\StatWorker_IncubationInfo.cs",
|
||||
"RelativeDocumentMoniker": "Stat\\StatWorker_IncubationInfo.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Stat\\StatWorker_IncubationInfo.cs",
|
||||
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Stat\\StatWorker_IncubationInfo.cs",
|
||||
"RelativeToolTip": "Stat\\StatWorker_IncubationInfo.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
|
||||
@@ -425,31 +425,49 @@ namespace ArachnaeSwarm.MoharHediffs
|
||||
}
|
||||
}
|
||||
|
||||
private bool TryFindSpawnCell(out IntVec3 result)
|
||||
{
|
||||
result = IntVec3.Invalid;
|
||||
bool result2;
|
||||
if (this.pawn == null)
|
||||
{
|
||||
result2 = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Map map = this.pawn.Map;
|
||||
if (map == null)
|
||||
{
|
||||
result2 = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = CellFinder.RandomClosewalkCellNear(this.pawn.Position, map, 5, null);
|
||||
result2 = true;
|
||||
}
|
||||
}
|
||||
return result2;
|
||||
}
|
||||
private bool TryFindSpawnCell(out IntVec3 result)
|
||||
{
|
||||
result = IntVec3.Invalid;
|
||||
bool result2;
|
||||
if (this.pawn == null)
|
||||
{
|
||||
result2 = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Map map = this.pawn.Map;
|
||||
if (map == null)
|
||||
{
|
||||
result2 = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 修改这里:将半径从5减少到2,让生成位置更靠近pawn
|
||||
int searchRadius = 2;
|
||||
|
||||
private void ResetCountdown()
|
||||
// 首先尝试在pawn的相邻单元格生成(半径为1)
|
||||
result = CellFinder.RandomClosewalkCellNear(this.pawn.Position, map, 1, null);
|
||||
|
||||
// 如果相邻单元格找不到合适位置,再尝试稍远一点(半径为2)
|
||||
if (!result.IsValid)
|
||||
{
|
||||
result = CellFinder.RandomClosewalkCellNear(this.pawn.Position, map, searchRadius, null);
|
||||
}
|
||||
|
||||
// 如果还是找不到,尝试pawn当前位置(作为最后手段)
|
||||
if (!result.IsValid && this.pawn.Position.IsValid && this.pawn.Position.Walkable(map))
|
||||
{
|
||||
result = this.pawn.Position;
|
||||
}
|
||||
|
||||
result2 = result.IsValid;
|
||||
}
|
||||
}
|
||||
return result2;
|
||||
}
|
||||
|
||||
|
||||
private void ResetCountdown()
|
||||
{
|
||||
this.ticksUntilSpawn = (int)(this.RandomDays2wait() * 60000f);
|
||||
this.initialTicksUntilSpawn = this.ticksUntilSpawn;
|
||||
|
||||
Reference in New Issue
Block a user