public void ProcessText(string effects) { string[] list = continuous.Split(';'); for (int i = 0; i < list.Length; i++) { string[] effect = list[i].Trim().Split('='); switch (effect[0]) { case "unity": ResourceManager.AddUnity(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; case "trust": ResourceManager.AddTrust(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; case "unrest": ResourceManager.AddUnrest(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; case "unrestChange": ResourceManager.AddUnrestChange(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; case "population": ResourceManager.AddPopulation(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; case "food": ResourceManager.AddFood(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; case "materials": ResourceManager.AddMaterials(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; case "machinery": ResourceManager.AddMachinery(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; case "foodIncome": ResourceManager.AddFoodIncome(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; case "materialsIncome": ResourceManager.AddMaterialsIncome(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; case "machineryIncome": ResourceManager.AddMachineryIncome(int.Parse(effect[1], NumberStyles.AllowLeadingSign)); break; } } }