Пример #1
0
		private static void InterpretMiner(String name, LuaTable values)
		{
			Miner newMiner = new Miner(name);

			newMiner.Icon = LoadImage(values["icon"] as String);
			newMiner.MiningPower = Convert.ToSingle(values["mining_power"]);
			newMiner.Speed = Convert.ToSingle(values["mining_speed"]);
			newMiner.ModuleSlots = Convert.ToInt32(values["module_slots"]);

			LuaTable categories = values["resource_categories"] as LuaTable;
			if (categories != null)
			{
				foreach (String category in categories.Values)
				{
					newMiner.ResourceCategories.Add(category);
				}
			}

			Miners.Add(name, newMiner);
		}