<commit_before>﻿using Assets.Scripts.UI;
using UnityEngine;

namespace Assets.Scripts
{
    public class MachineSlot : MonoBehaviour
    {
        public bool HasMachine {  get { return Machine != null; } }
        public Vector3 PlacementOffset;
    
        public Machine Machine;
        private Light _light;

        public enum RoomTypes
        {
            InsideRoom,
            OutsideRoom,
            IceAsteroid,
            GasCloud,
            MineralAsteroid
        }

        public RoomTypes RoomType;

        void Start()
        {
            _light = GetComponentInChildren<Light>();
            if (Machine == null)
            {
               // if(_light != null)
                 //   _light.intensity = 0f;
            }
        }

        void Update()
        {
        }

        public void PlaceMachine(MachineData machine)
        {
            if (HasMachine) return;
            if (machine.Prefab == null)
            {
                Debug.LogWarningFormat("Prefab is not set for machine {0}", machine.name);
                return;
            }
            Machine = Instantiate(machine.Prefab, this.transform).GetComponent<Machine>();
            Machine.transform.localPosition = PlacementOffset;
            GameManager.Instance.BuiltMachines.Add(machine);
            Machine.Place();
        }

        public void RemoveMachine()
        {
            GameManager.Instance.BuiltMachines.Remove(Machine.MachineData);
            Machine.Remove();
        }

        public void OnMouseClick()
        {
            UIBuildingMenu.Instance.Show(this);
        }

        public void OnMouseEnter()
        {
            if(!UIBuildingMenu.Instance.IsActive)
                UIBuildIcon.Instance.Show(gameObject);
        }

        public void OnMouseLeave()
        {
            if (!UIBuildingMenu.Instance.IsActive)
                UIBuildIcon.Instance.Hide();
        }
    }
}<commit_msg>Fixed build icon<commit_after>﻿using Assets.Scripts.UI;
using UnityEngine;

namespace Assets.Scripts
{
    public class MachineSlot : MonoBehaviour
    {
        public bool HasMachine {  get { return Machine != null; } }
        public Vector3 PlacementOffset;
    
        public Machine Machine;
        private Light _light;

        public enum RoomTypes
        {
            InsideRoom,
            OutsideRoom,
            IceAsteroid,
            GasCloud,
            MineralAsteroid
        }

        public RoomTypes RoomType;

        void Start()
        {
            _light = GetComponentInChildren<Light>();
            if (Machine == null)
            {
               // if(_light != null)
                 //   _light.intensity = 0f;
            }
        }

        void Update()
        {
        }

        public void PlaceMachine(MachineData machine)
        {
            if (HasMachine) return;
            if (machine.Prefab == null)
            {
                Debug.LogWarningFormat("Prefab is not set for machine {0}", machine.name);
                return;
            }
            Machine = Instantiate(machine.Prefab, this.transform).GetComponent<Machine>();
            Machine.transform.localPosition = PlacementOffset;
            GameManager.Instance.BuiltMachines.Add(machine);
            Machine.Place();
            UIBuildIcon.Instance.Hide();
        }

        public void RemoveMachine()
        {
            GameManager.Instance.BuiltMachines.Remove(Machine.MachineData);
            Machine.Remove();
        }

        public void OnMouseClick()
        {
            UIBuildingMenu.Instance.Show(this);
        }

        public void OnMouseEnter()
        {
            if (!HasMachine)
            {
                if (!UIBuildingMenu.Instance.IsActive)
                    UIBuildIcon.Instance.Show(gameObject);
            }
        }

        public void OnMouseLeave()
        {
            if (!HasMachine)
            {
                if (!UIBuildingMenu.Instance.IsActive)
                    UIBuildIcon.Instance.Hide();
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.08491262613832144, 'fraction_numerical': 0.0014767413241447206, 'mean_word_length': 1.394814378314673, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '639451', 'n_tokens_mistral': 1038, 'n_tokens_neox': 996, 'n_words': 200}