/* * AstroResources.cs * Authors: August Zinsser * * Copyright Matthew Belmonte 2007 */ using System.Collections.Generic; using tAC_Engine; namespace Astropolis { /// /// Defines the basic fundamental resources used by the Colony Simulator. Each Resource is harvestable in the Colony Sim /// and/or collectible some of the MiniGames. /// public class AstroResources : GenericResources { private static bool mFilled = false; protected static Dictionary mUnits = new Dictionary(); // Stores the unit quantity for each resource (should only be used when displaying resources to the user) public const string Credits = "Credits"; public const string Bonus = "Bonus"; public const string DamageCosts = "DamageCosts"; public const string Carbon = "Carbon"; new public static List List { get { if (!mFilled) { Fill(); } return mList; } } /// /// Returns a description of the unit quantity for the given resource. /// public static string GetUnitDescription(string resourceName) { if (mUnits.ContainsKey(resourceName)) return mUnits[resourceName]; else return " "; } protected static void Fill() { mList.Clear(); mUnits.Clear(); // Fill the type of resources mList.Add(Credits); mList.Add(Bonus); mList.Add(Carbon); // Add unit descriptions as appropriate mUnits.Add(Carbon, " tons of "); mFilled = true; } } }