68 lines
2.4 KiB
C#
68 lines
2.4 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace DanieleMarotta.RiversongCodeShowcase
|
|
{
|
|
public static class EntityCacheExtensions
|
|
{
|
|
public static List<Building> GetHarvesterBuildings(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Building>((int)EntityCacheKeys.HarvesterBuildings);
|
|
}
|
|
|
|
public static List<Building> GetHunterBuildings(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Building>((int)EntityCacheKeys.HunterBuildings);
|
|
}
|
|
|
|
public static List<Building> GetFarmBuildings(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Building>((int)EntityCacheKeys.FarmBuildings);
|
|
}
|
|
|
|
public static List<Building> GetProducers(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Building>((int)EntityCacheKeys.ProducerBuildings);
|
|
}
|
|
|
|
public static List<Building> GetProviders(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Building>((int)EntityCacheKeys.ProviderBuildings);
|
|
}
|
|
|
|
public static List<Building> GetBuildingsWithWorkers(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Building>((int)EntityCacheKeys.BuildingsWithWorkers);
|
|
}
|
|
|
|
public static List<Building> GetHouses(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Building>((int)EntityCacheKeys.HouseBuildings);
|
|
}
|
|
|
|
public static List<Building> GetTentBuildings(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Building>((int)EntityCacheKeys.TentBuildings);
|
|
}
|
|
|
|
public static List<Building> GetStorageBuildings(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Building>((int)EntityCacheKeys.StorageBuildings);
|
|
}
|
|
|
|
public static List<Building> GetStorageRequestBuildings(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Building>((int)EntityCacheKeys.StorageRequestBuildings);
|
|
}
|
|
|
|
public static List<Agent> GetHunterAgents(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Agent>((int)EntityCacheKeys.HunterAgents);
|
|
}
|
|
|
|
public static List<Agent> GetCritterAgents(this IEntityCache entityCache)
|
|
{
|
|
return entityCache.Get<Agent>((int)EntityCacheKeys.CritterAgents);
|
|
}
|
|
}
|
|
}
|