public void ClearPopulation() { population = 0.0f; farmers = builders = traders = soldiers = scholars = 0; foodUnits = 0.0f; foodEfficiency = 1.2f; sanitation = 30; healthcare = -0.2f; unrestDecay = 0.8f; lastPopGrowth = 0.0f; storedFood = 0.0f; unrest = unrestCultural = unrestReligious = 0.0f; culture = null; cultureBonus = 0.0f; disaster = null; disasterDuration = 0; religion = null; religionBonus = 0.0f; infrastructurePoints = 0.0f; for (int i = 0; i < infrastructureLevels.Length; i++) { infrastructureLevels[i] = 1; } plannedInfrastructure = null; constructionBonus = 0.0f; government = null; prosperity = 0.0f; foreach (WS_ResourceStack stack in resStacks) { stack.amount = 0; } caravan = null; qualityBonus = 1.0f; exploitationBonus = 1.0f; armyBonus = 0.5f; defenseBonus = 1.0f; currentTech = null; storedTechPoints = 0.0f; availableTech.Clear(); researchedTech.Clear(); }
protected override bool SuccessCheck() { spreadTech = null; foreach (WS_Tile neighbor in tile.Neighbors()) { foreach (WS_Tech tech in neighbor.researchedTech) { if (tile.availableTech.Contains(tech) && tile.currentTech != tech) { spreadTech = tech; return((neighbor.researchedTech.Count / Mathf.Max(1.0f, tile.researchedTech.Count)) * 0.002f > Random.Range(0.0f, 1.0f)); } } } return(false); }