Exemplo n.º 1
0
        public void UpdateAllStorageEffects()
        {
            StorageEffects         storageEffects = Service.Get <StorageEffects>();
            NodeList <StorageNode> nodeList       = Service.Get <EntityController>().GetNodeList <StorageNode>();

            for (StorageNode storageNode = nodeList.Head; storageNode != null; storageNode = storageNode.Next)
            {
                storageEffects.UpdateFillState(storageNode.Entity, storageNode.BuildingComp.BuildingType);
            }
            NodeList <GeneratorNode> nodeList2 = Service.Get <EntityController>().GetNodeList <GeneratorNode>();

            for (GeneratorNode generatorNode = nodeList2.Head; generatorNode != null; generatorNode = generatorNode.Next)
            {
                storageEffects.UpdateFillState(generatorNode.Entity, generatorNode.BuildingComp.BuildingType);
            }
        }
Exemplo n.º 2
0
        private void UpdateStorageEffectsAfterCollection(Entity generatorEntity, BuildingTypeVO generatorVO)
        {
            StorageEffects storageEffects = Service.Get <StorageEffects>();

            storageEffects.UpdateFillState(generatorEntity, generatorVO);
            NodeList <StorageNode> nodeList = Service.Get <EntityController>().GetNodeList <StorageNode>();

            for (StorageNode storageNode = nodeList.Head; storageNode != null; storageNode = storageNode.Next)
            {
                BuildingTypeVO buildingType = storageNode.BuildingComp.BuildingType;
                if (buildingType.Currency == generatorVO.Currency)
                {
                    storageEffects.UpdateFillState(storageNode.Entity, buildingType);
                }
            }
        }
Exemplo n.º 3
0
        private void UpdateStorageEffectsOnStorages(CurrencyType currencyType)
        {
            StorageEffects         storageEffects = Service.Get <StorageEffects>();
            NodeList <StorageNode> nodeList       = Service.Get <EntityController>().GetNodeList <StorageNode>();

            for (StorageNode storageNode = nodeList.Head; storageNode != null; storageNode = storageNode.Next)
            {
                if (storageNode.BuildingComp.BuildingType.Currency == currencyType)
                {
                    storageEffects.UpdateFillState(storageNode.Entity, storageNode.BuildingComp.BuildingType);
                }
            }
        }