暂存
This commit is contained in:
Binary file not shown.
@@ -9,6 +9,7 @@ namespace ArachnaeSwarm
|
||||
public enum WormholePortalStatus
|
||||
{
|
||||
Idle,
|
||||
Deploying,
|
||||
Linked
|
||||
}
|
||||
|
||||
@@ -146,7 +147,7 @@ namespace ArachnaeSwarm
|
||||
if (stringBuilder.Length > 0) stringBuilder.AppendLine();
|
||||
stringBuilder.Append("Status".Translate() + ": " + status.ToString().Translate());
|
||||
|
||||
if (linkedPortalB != null && !linkedPortalB.Destroyed)
|
||||
if (status == WormholePortalStatus.Linked && linkedPortalB != null && !linkedPortalB.Destroyed)
|
||||
{
|
||||
stringBuilder.AppendLine();
|
||||
stringBuilder.Append("LinkedTo".Translate() + ": " + linkedPortalB.Map.Parent.LabelCap);
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace ArachnaeSwarm
|
||||
|
||||
public override IEnumerable<Gizmo> CompGetGizmosExtra()
|
||||
{
|
||||
if (PortalA?.status == WormholePortalStatus.Linked)
|
||||
if (PortalA?.status == WormholePortalStatus.Linked || PortalA?.status == WormholePortalStatus.Deploying)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
@@ -115,6 +115,8 @@ namespace ArachnaeSwarm
|
||||
|
||||
Find.WorldObjects.Add(travelingWormhole);
|
||||
|
||||
PortalA.status = WormholePortalStatus.Deploying;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@ namespace ArachnaeSwarm
|
||||
{
|
||||
public class DefModExtension_TravelingWormhole : DefModExtension
|
||||
{
|
||||
public float travelSpeed = 20f; // Default speed in tiles per day
|
||||
public float travelSpeed = 5f; // 20 Default speed in tiles per day
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ namespace ArachnaeSwarm
|
||||
Pawn pilot = contents.First() as Pawn;
|
||||
if (pilot != null)
|
||||
{
|
||||
Map targetMap = GetOrGenerateMapUtility.GetOrGenerateMap(destinationTile, null);
|
||||
Map targetMap = GetOrGenerateMapUtility.GetOrGenerateMap(destinationTile, WorldObjectDefOf.Camp);
|
||||
|
||||
Building_WormholePortal_B portalB = (Building_WormholePortal_B)ThingMaker.MakeThing(ThingDef.Named("ARA_WormholePortal_B"));
|
||||
IntVec3 cell = DropCellFinder.RandomDropSpot(targetMap);
|
||||
@@ -83,7 +83,7 @@ namespace ArachnaeSwarm
|
||||
|
||||
if (sourcePortal != null && !sourcePortal.Destroyed)
|
||||
{
|
||||
sourcePortal.SetLinkedPortal(portalB);
|
||||
sourcePortal.SetLinkedPortal(portalB); // This sets status to Linked
|
||||
portalB.SetLinkedPortal(sourcePortal);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user