/// <summary> /// Use this for initialization /// </summary> void Start() { EventManager.Initialize(); DifficultyUtils.Initialize(); ConfigurationUtils.Initialize(); FrenchFriesPool.Initialize(); }
public override string GetTooltip() { bool primitiveDataAvailable = OverworldManager.turnCount > DifficultyUtils.Multiply(RuntimeData.save.data.difficulty, 5); bool advancedDataAvailable = OverworldManager.turnCount > DifficultyUtils.Multiply(RuntimeData.save.data.difficulty, 8); string s = ""; s += "Leads to [" + _system.star.name + "]:"; s += "\n"; s += primitiveDataAvailable ? "" : "Primitive data will become available in " + (DifficultyUtils.Multiply(RuntimeData.save.data.difficulty, 5) - OverworldManager.turnCount) + " turn(s).\n"; s += advancedDataAvailable ? "" : "Advanced data will become available in " + (DifficultyUtils.Multiply(RuntimeData.save.data.difficulty, 8) - OverworldManager.turnCount) + " turn(s).\n"; s += "\n"; s += (primitiveDataAvailable ? _system.planets.Count.ToString() : "?") + " planet(s).\n"; s += (primitiveDataAvailable ? _system.stargates.Count.ToString() : "?") + " stargate(s).\n"; s += (primitiveDataAvailable ? _system.structures.Count.ToString() : "?") + " structure(s).\n"; s += (primitiveDataAvailable ? _system.wormholes.Count.ToString() : "?") + " wormhole(s).\n"; s += "\n"; if (advancedDataAvailable) { if (_system.structures.Count > 0) { s += "[Structures]:\n"; for (int i = 0; i < _system.structures.Count; i++) { s += _system.structures[i].name + ".\n"; } s += "\n"; } s += "? fleets.\n"; s += "\n"; } s += "<color=" + (PlayerData.fleet.GetVital(FleetVitalType.ProcessedFuel).current >= _jumpCost ? "white" : "red") + ">Jump cost: " + _jumpCost + "</color> " + FleetVital.Format(FleetVitalType.ProcessedFuel); s += "\n\n" + base.GetDistanceTooltip(); return(s); }
protected string GetResourceString() { string s = ""; s += "Local resources:\n\n"; int turns = OverworldManager.turnCount; int threshold = DifficultyUtils.Multiply(RuntimeData.save.data.difficulty, 2); bool infoAvailable = turns > threshold; if (!infoAvailable) { s += "Data will become available in " + (threshold - turns) + " days.\n\n"; } s += FleetVital.Format(FleetVitalType.NebulaGas) + ": " + (infoAvailable ? (base.resourceDensities[0] * 100f).ToString("0.##") : "?") + "%\n"; s += FleetVital.Format(FleetVitalType.Veldspar) + ": " + (infoAvailable ? (base.resourceDensities[1] * 100f).ToString("0.##") : "?") + "%\n"; s += FleetVital.Format(FleetVitalType.Tritanite) + ": " + (infoAvailable ? (base.resourceDensities[2] * 100f).ToString("0.##") : "?") + "%\n"; return(s); }
/// <summary> /// Gets the homing delay for the given tag /// </summary> /// <returns>homing delay</returns> /// <param name="tag">tag</param> public static float GetHomingDelay(string tag) { return(DifficultyUtils.GetHomingDelay(tag)); }
static IEnumerator TurnTickAsync() { bool hasSpawnedFirstIncursion = false; int turnsSinceLastIncursion = 0; while (true) { if (!hasSpawnedFirstIncursion || turnsSinceLastIncursion > 0 && Random.Range(0f, 100f) <= (_incursionChance + turnsSinceLastIncursion) * DifficultyUtils.GetModifier(RuntimeData.save.data.difficulty)) { GenerateIncursion(); hasSpawnedFirstIncursion = true; } turnsSinceLastIncursion++; LogManager.getInstance.AddEntry("A day has passed."); yield return(new WaitForSeconds(_turnTimeInMinutes * 60)); } }
/// <summary> /// Use this for initialization /// </summary> void Start() { EventManager.Initialize(); DifficultyUtils.Initialize(); }
public Stargate(string name, Vector3 location, Random random) : base(name, location, random) { base.type = PointOfInterestType.Wormhole; _jumpCost = DifficultyUtils.Multiply(RuntimeData.save.data.difficulty, base.random.Next(2, 4)); }