Remove artificial Thread.Sleep startup delays in Galaxy
This commit is contained in:
parent
93af7cce4c
commit
5ed14093b4
1 changed files with 0 additions and 7 deletions
|
|
@ -3,7 +3,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using DataStructures.ViliWonka.Heap;
|
||||
using Ink.Runtime;
|
||||
|
|
@ -359,7 +358,6 @@ public class Galaxy
|
|||
private void PlaceFactionsMain(int bossCount, Action<string> progressCallback = null)
|
||||
{
|
||||
progressCallback?.Invoke("Finding Chokepoints");
|
||||
if(progressCallback!=null) Thread.Sleep(500); // Inserting Delay to make it seem like it's doing more work lmao
|
||||
|
||||
// Find all zones on the exit path where removing that zone would disconnect the entrance from the exit
|
||||
// Disregard "corridor" zones with only two adjacent zones
|
||||
|
|
@ -367,7 +365,6 @@ public class Galaxy
|
|||
.Where(z => z.AdjacentZones.Count > 2 && !ConnectedRegion(Entrance, z).Contains(Exit));
|
||||
|
||||
progressCallback?.Invoke("Placing Factions");
|
||||
if (progressCallback != null) Thread.Sleep(500); // Inserting Delay to make it seem like it's doing more work lmao
|
||||
|
||||
// Choose some megas to have bosses placed: the factions whose boss Loadout resolves
|
||||
var bossMegas = Factions
|
||||
|
|
@ -426,7 +423,6 @@ public class Galaxy
|
|||
private void CalculateFactionInfluence(Action<string> progressCallback = null)
|
||||
{
|
||||
progressCallback?.Invoke("Calculating Faction Influence");
|
||||
if (progressCallback != null) Thread.Sleep(500); // Inserting Delay to make it seem like it's doing more work lmao
|
||||
|
||||
// Assign faction presence
|
||||
foreach (var zone in Zones)
|
||||
|
|
@ -498,7 +494,6 @@ public class Galaxy
|
|||
private void GenerateLinks(float linkDensity, Action<string> progressCallback = null)
|
||||
{
|
||||
progressCallback?.Invoke("Triangulating Zone Positions");
|
||||
if (progressCallback != null) Thread.Sleep(500); // Inserting Delay to make it seem like it's doing more work lmao
|
||||
|
||||
// The Delaunay triangulation connects adjacent sectors, every zone among them
|
||||
var links = Delaunay.Edges(Zones.Select(z => z.Position).ToArray())
|
||||
|
|
@ -507,7 +502,6 @@ public class Galaxy
|
|||
RequireEveryZoneLinked(Zones, links);
|
||||
|
||||
progressCallback?.Invoke("Eliminating Zone Links");
|
||||
if (progressCallback != null) Thread.Sleep(500); // Inserting Delay to make it seem like it's doing more work lmao
|
||||
// foreach (var link in links.ToArray())
|
||||
// {
|
||||
// foreach (var zone in Zones)
|
||||
|
|
@ -559,7 +553,6 @@ public class Galaxy
|
|||
private void CalculateDistanceMatrix(Action<string> progressCallback = null)
|
||||
{
|
||||
progressCallback?.Invoke("Calculating Distance Matrix");
|
||||
if(progressCallback!=null) Thread.Sleep(500); // Inserting Delay to make it seem like it's doing more work lmao
|
||||
foreach (var zone in Zones)
|
||||
{
|
||||
zone.Distance = ConnectedRegionDistance(zone);
|
||||
|
|
|
|||
Loading…
Reference in a new issue