diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll
index edb3697..f5d0010 100644
Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ
diff --git a/1.6/1.6/Defs/Thing_building/ARA_NutrientNetworkBuilding.xml b/1.6/1.6/Defs/Thing_building/ARA_NutrientNetworkBuilding.xml
index cf4cefa..c513f01 100644
--- a/1.6/1.6/Defs/Thing_building/ARA_NutrientNetworkBuilding.xml
+++ b/1.6/1.6/Defs/Thing_building/ARA_NutrientNetworkBuilding.xml
@@ -552,7 +552,6 @@
1
true
true
- true
@@ -572,7 +571,7 @@
ARA_InsectJelly
- 2.0
+ 5.0
false
虫蜜
没有营养
@@ -687,7 +686,7 @@
- true
+ false
true
true
diff --git a/Source/ArachnaeSwarm/Abilities/ARA_Morphable/Building_Morphable.cs b/Source/ArachnaeSwarm/Abilities/ARA_Morphable/Building_Morphable.cs
index fb7b50b..fc22459 100644
--- a/Source/ArachnaeSwarm/Abilities/ARA_Morphable/Building_Morphable.cs
+++ b/Source/ArachnaeSwarm/Abilities/ARA_Morphable/Building_Morphable.cs
@@ -11,6 +11,7 @@ namespace ArachnaeSwarm
private CompMorphable compMorphable;
private CompRefuelableNutrition compRefuelable;
private Effecter researchEffecter;
+ private Mote psyfocusMote; // For the sustained pulse effect
public float virtualRest; // Public for external access
private bool forceSleep;
@@ -37,7 +38,7 @@ namespace ArachnaeSwarm
if (compMorphable?.StoredPawn == null)
{
- StopResearchEffect();
+ StopWorkEffects();
return;
}
@@ -87,8 +88,14 @@ namespace ArachnaeSwarm
{
// 使用XML中定义的乘数
virtualRest = Mathf.Min(VirtualRestMax, virtualRest + (Need_Rest.BaseRestGainPerTick * ((CompProperties_Morphable)compMorphable.props).restGainMultiplier));
+
+ // --- ADDED: Zzz effect when sleeping ---
+ if (this.IsHashIntervalTick(120)) // Slightly slower than meditation
+ {
+ FleckMaker.ThrowMetaIcon(this.Position, this.Map, FleckDefOf.SleepZ);
+ }
}
- StopResearchEffect();
+ StopWorkEffects();
}
else // 工作或任意时间 (只要不在休息/娱乐,就下降)
{
@@ -105,31 +112,41 @@ namespace ArachnaeSwarm
researchSpeed *= this.GetStatValue(StatDefOf.ResearchSpeedFactor);
Find.ResearchManager.ResearchPerformed(researchSpeed, pawn);
pawn.skills.Learn(SkillDefOf.Intellectual, 0.1f, false);
- StartResearchEffect();
+
+ // --- Directly replicating the logic of Toil.WithEffect() ---
+ if (researchEffecter == null)
+ {
+ researchEffecter = EffecterDefOf.Research.Spawn();
+ }
+ researchEffecter.EffectTick(this, this);
+
+ // Maintain the other effect as well
+ if (psyfocusMote == null || psyfocusMote.Destroyed)
+ {
+ psyfocusMote = MoteMaker.MakeAttachedOverlay(this, ThingDefOf.Mote_PsyfocusPulse, Vector3.zero);
+ }
+ psyfocusMote.Maintain();
}
else
{
- StopResearchEffect();
+ StopWorkEffects();
}
}
}
- private void StartResearchEffect()
- {
- if (researchEffecter == null)
- {
- researchEffecter = EffecterDefOf.Research.Spawn();
- }
- researchEffecter.EffectTick(this, TargetInfo.Invalid);
- }
-
- private void StopResearchEffect()
+ // We no longer need StartWorkEffects, the logic is now directly in Tick()
+ private void StopWorkEffects()
{
if (researchEffecter != null)
{
researchEffecter.Cleanup();
researchEffecter = null;
}
+ if (psyfocusMote != null && !psyfocusMote.Destroyed)
+ {
+ psyfocusMote.Destroy();
+ }
+ psyfocusMote = null;
}
@@ -251,11 +268,7 @@ namespace ArachnaeSwarm
public override void Destroy(DestroyMode mode)
{
- if (researchEffecter != null)
- {
- researchEffecter.Cleanup();
- researchEffecter = null;
- }
+ StopWorkEffects();
if (this.Spawned && compMorphable?.StoredPawn != null)
{