<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;

using BattleMech.PCL.Enums;
using BattleMech.PCL.Objects.Game.Base;

namespace BattleMech.PCL.Managers.Game {
    public class TexturableManager : BaseGameManager {
        private Dictionary<Guid, BaseTexturable> _items { get; }

        public List<BaseTexturable> Items => new List<BaseTexturable>(_items.Values);

        public TexturableManager() {
            _items = new Dictionary<Guid, BaseTexturable>();
        }

        public void AddItem(BaseTexturable item) {
            item.ID = Guid.NewGuid();

            _items.Add(item.ID, item);
        }

        public BaseTexturable GetItemByEnum(TEXTURABLE_ITEM_TYPES itemType) {
            return _items.Values.FirstOrDefault(a => a.ItemType == itemType);
        }

        public void UpdateItem(BaseTexturable item) {
            _items[item.ID] = item;
        }
    }
}<commit_msg>Change: Removed generic functions and moved them into the BaseGameManager<commit_after>﻿using System;
using System.Linq;

using BattleMech.PCL.Enums;
using BattleMech.PCL.Objects.Game.Base;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace BattleMech.PCL.Managers.Game {
    public class TexturableManager : BaseGameManager<BaseTexturable> {
        public TexturableManager(ContentManager content) : base(content) { }

        public void AddTextureItem<T>(string textureName) where T : BaseTexturable {
            AddItem((T)Activator.CreateInstance(typeof(T), _content.Load<Texture2D>(textureName)));
        }

        public BaseTexturable GetItemByEnum(TEXTURABLE_ITEM_TYPES itemType) {
            return _items.Values.FirstOrDefault(a => a.ItemType == itemType);
        }
    }
}
{'fraction_non_alphanumeric': 0.09626274065685164, 'fraction_numerical': 0.0005662514156285391, 'mean_word_length': 3.2992700729927007, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 13, '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': '5657', 'n_tokens_mistral': 515, 'n_tokens_neox': 507, 'n_words': 102}