<commit_before>﻿using System.Diagnostics;
using System.Threading;
using Atmospherics;
using UnityEngine;

public class AtmosSystem : SubsystemBehaviour
{
	public override void Initialize()
	{
		BoundsInt bounds = metaTileMap.GetBounds();

		foreach (Vector3Int position in bounds.allPositionsWithin)
		{
			//get toptile at pos to check if it should spawn with no air
			bool spawnWithNoAir = false;
			var topTile = metaTileMap.GetTile(position,LayerTypeSelection.Effects | LayerTypeSelection.Underfloor);
			if (topTile is BasicTile)
			{
				spawnWithNoAir = (topTile as BasicTile).SpawnWithNoAir;
			}
			MetaDataNode node = metaDataLayer.Get(position, false);
			node.GasMix = new GasMix( (node.IsRoom||node.IsOccupied) && !spawnWithNoAir ? GasMixes.Air : GasMixes.Space );
		}
	}

	public override void UpdateAt(Vector3Int localPosition)<commit_msg>Change: AtmosSystem.cs double casting<commit_after>﻿using System.Diagnostics;
using System.Threading;
using Atmospherics;
using UnityEngine;

public class AtmosSystem : SubsystemBehaviour
{
	public override void Initialize()
	{
		BoundsInt bounds = metaTileMap.GetBounds();

		foreach (Vector3Int position in bounds.allPositionsWithin)
		{
			//get toptile at pos to check if it should spawn with no air
			bool spawnWithNoAir = false;
			var topTile = metaTileMap.GetTile(position,LayerTypeSelection.Effects | LayerTypeSelection.Underfloor);
			if (topTile is BasicTile tile)
			{
				spawnWithNoAir = tile.SpawnWithNoAir;
			}
			MetaDataNode node = metaDataLayer.Get(position, false);
			node.GasMix = new GasMix( (node.IsRoom||node.IsOccupied) && !spawnWithNoAir ? GasMixes.Air : GasMixes.Space );
		}
	}

	public override void UpdateAt(Vector3Int localPosition)
{'fraction_non_alphanumeric': 0.08599651365485184, 'fraction_numerical': 0.002324230098779779, 'mean_word_length': 4.857142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1796399', 'n_tokens_mistral': 583, 'n_tokens_neox': 533, 'n_words': 137}