Example #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 any reactions are needed
            DoReactions(node);

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

            node.AddNeighborsToList(ref nodes);

            //Conduct heat from this nodes gas mix to this nodes tile
            if (node.IsOccupied == false || node.IsIsolatedNode)
            {
                ConductFromOpenToSolid(node, meanGasMix);
            }

            //Gases are frozen within walls and isolated tiles (closed airlocks) so dont do gas equalising
            if (node.IsOccupied == false && node.IsIsolatedNode == false)
            {
                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 we need to do conductivity to other adjacent tiles
            Conductivity(node);

            //Only allow open tiles or isolated tiles to do reactions
            if (node.IsOccupied && node.IsIsolatedNode == false)
            {
                return;
            }

            //Check to see if any reactions are needed
            DoReactions(node);

            //Check to see if node needs vfx applied
            GasVisualEffects(node);
        }