public bool BlockIDExists(string id, EcoBlock.BlockType type) { if (type == EcoBlock.BlockType.Ruler) { foreach (Ruler ruler in rulerDictionary.Keys) { if (ruler.blockID == id) { return(true); } } } else if (type == EcoBlock.BlockType.Warband) { foreach (Warband warband in warbandDictionary.Keys) { if (warband.blockID == id) { return(true); } } } else if (type == EcoBlock.BlockType.Territory) { foreach (Territory terr in territoryDictionary.Keys) { if (terr.blockID == id) { return(true); } } } else if (type == EcoBlock.BlockType.Population) { foreach (Population pop in populationDictionary.Keys) { if (pop.blockID == id) { return(true); } } } return(false); }
public void SetLinkedEcoBlock(EcoBlock ecoBlock) { tileEcoBlockType = ecoBlock.blockType; linkedEcoBlock = ecoBlock; }
public void SetTileEcoBlockType(EcoBlock.BlockType type) { tileEcoBlockType = type; }