Exemple #1
0
        private void Update(MetaDataNode node)
        {
            //Gases are frozen within closed airlocks or walls
            if (node.IsOccupied || node.IsClosedAirlock)
            {
                return;
            }

            nodes.Clear();
            nodes.Add(node);

            node.AddNeighborsToList(ref nodes);

            bool isPressureChanged = AtmosUtils.IsPressureChanged(node, out var windDirection, out var windForce);

            if (isPressureChanged)
            {
                node.ReactionManager.AddWindEvent(node, windDirection, windForce);
                Equalize();

                for (int i = 1; i < nodes.Count; i++)
                {
                    updateList.Enqueue(nodes[i]);
                }
            }

            //Check to see if node needs vfx applied
            GasVisualEffects(node);
        }
        private void Update(MetaDataNode node)
        {
            nodes.Clear();

            if (!node.IsClosedAirlock)
            {             //Gases are frozen within closed airlocks
                nodes.Add(node);
            }

            node.AddNeighborsToList(ref nodes);

            bool isPressureChanged = AtmosUtils.IsPressureChanged(node, out var windDirection, out var windForce);

            if (node.IsOccupied || node.IsSpace || isPressureChanged)
            {
                if (isPressureChanged)
                {
                    node.ReactionManager.AddWindEvent(node, windDirection, windForce);                       //fixme: ass backwards
                }
                Equalize();

                for (int i = 1; i < nodes.Count; i++)
                {
                    updateList.Enqueue(nodes[i]);
                }
            }
        }
        private void Update(MetaDataNode node)
        {
            nodes.Clear();
            nodes.Add(node);

            node.AddNeighborsToList(ref nodes);

            if (node.IsOccupied || node.IsSpace || AtmosUtils.IsPressureChanged(node))
            {
                Equalize();

                for (int i = 1; i < nodes.Count; i++)
                {
                    updateList.Enqueue(nodes[i]);
                }
            }
        }