Decompiled source of CustomSafeZone v0.11.0

BepInEx/plugins/SafehouseStudio/SafehouseStudio.dll

Decompiled 27 minutes ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Newtonsoft.Json;
using Steamworks;
using Unity.Collections;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.Utilities;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using WKModUI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyFileVersion("0.11.0.0")]
[assembly: AssemblyVersion("0.11.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace WKModUI
{
	internal static class SharedLanguage
	{
		internal const string Protocol = "ilya.whiteknuckle.shared-language.v1";

		private static Dictionary<string, object> State => AppDomain.CurrentDomain.GetData("ilya.whiteknuckle.shared-language.v1") as Dictionary<string, object>;

		internal static string Current
		{
			get
			{
				Dictionary<string, object> state = State;
				if (state != null)
				{
					return (string)state["resolved"];
				}
				return "en";
			}
		}

		internal static string Label
		{
			get
			{
				if (!(Current == "ru"))
				{
					return "ENG";
				}
				return "RU";
			}
		}

		private static SortedDictionary<string, object[]> Clients(Dictionary<string, object> state)
		{
			return (SortedDictionary<string, object[]>)state["clients"];
		}

		internal static string Normalize(string language)
		{
			language = (language ?? "").Trim().ToLowerInvariant().Replace('_', '-');
			switch (language)
			{
			default:
				if (!language.StartsWith("ru-", StringComparison.Ordinal))
				{
					return "en";
				}
				break;
			case "ru":
			case "russian":
			case "русский":
				break;
			}
			return "ru";
		}

		private static string Choice(string value)
		{
			if (!(value == "ru") && !(value == "en"))
			{
				return "auto";
			}
			return value;
		}

		internal static void Connect(string id, Action<string> apply, Func<bool> visible, string automatic, string legacy, Func<object[]> settings, Action<Exception> error)
		{
			Dictionary<string, object> dictionary = State;
			if (dictionary == null)
			{
				object[] array = settings();
				dictionary = new Dictionary<string, object>(StringComparer.Ordinal)
				{
					{
						"clients",
						new SortedDictionary<string, object[]>(StringComparer.Ordinal)
					},
					{
						"read",
						array[1]
					},
					{
						"write",
						array[2]
					},
					{
						"choice",
						Choice(((Func<string>)array[1])())
					},
					{
						"allowLegacy",
						!(bool)array[0]
					},
					{ "resolved", "en" }
				};
				AppDomain.CurrentDomain.SetData("ilya.whiteknuckle.shared-language.v1", dictionary);
			}
			Clients(dictionary)[id] = new object[4]
			{
				apply,
				visible,
				Normalize(automatic),
				error
			};
			if ((bool)dictionary["allowLegacy"] && (legacy == "ru" || legacy == "en"))
			{
				SetChoice(legacy);
			}
			Refresh(dictionary);
			Apply(Clients(dictionary)[id], (string)dictionary["resolved"]);
		}

		internal static void Disconnect(string id)
		{
			Dictionary<string, object> state = State;
			if (state != null)
			{
				Clients(state).Remove(id);
				Refresh(state);
			}
		}

		internal static void Automatic(string id, string language)
		{
			Dictionary<string, object> state = State;
			if (state != null && Clients(state).TryGetValue(id, out var value))
			{
				value[2] = Normalize(language);
				state["choice"] = Choice(((Func<string>)state["read"])());
				Refresh(state);
			}
		}

		internal static void Toggle()
		{
			SetChoice((Current == "ru") ? "en" : "ru");
		}

		internal static void SetChoice(string choice)
		{
			if (choice != "auto" && choice != "ru" && choice != "en")
			{
				throw new ArgumentException("Expected auto, ru or en.", "choice");
			}
			Dictionary<string, object> state = State;
			if (state == null)
			{
				return;
			}
			state["allowLegacy"] = false;
			state["choice"] = choice;
			try
			{
				((Action<string>)state["write"])(choice);
			}
			catch (Exception exception)
			{
				foreach (object[] value in Clients(state).Values)
				{
					Report(value, exception);
				}
			}
			Refresh(state);
		}

		internal static bool OwnsButton(string id)
		{
			Dictionary<string, object> state = State;
			if (state == null)
			{
				return false;
			}
			foreach (KeyValuePair<string, object[]> item in Clients(state))
			{
				bool flag = false;
				try
				{
					flag = ((Func<bool>)item.Value[1])();
				}
				catch (Exception exception)
				{
					Report(item.Value, exception);
				}
				if (flag)
				{
					return item.Key == id;
				}
			}
			return false;
		}

		private static void Refresh(Dictionary<string, object> state)
		{
			string text = (string)state["choice"];
			if (text == "auto")
			{
				text = "en";
				using SortedDictionary<string, object[]>.ValueCollection.Enumerator enumerator = Clients(state).Values.GetEnumerator();
				if (enumerator.MoveNext())
				{
					text = (string)enumerator.Current[2];
				}
			}
			if ((string)state["resolved"] == text)
			{
				return;
			}
			state["resolved"] = text;
			foreach (object[] item in new List<object[]>(Clients(state).Values))
			{
				Apply(item, text);
			}
		}

		private static void Apply(object[] client, string language)
		{
			try
			{
				((Action<string>)client[0])(language);
			}
			catch (Exception exception)
			{
				Report(client, exception);
			}
		}

		private static void Report(object[] client, Exception exception)
		{
			if (client[3] is Action<Exception> action)
			{
				try
				{
					action(exception);
				}
				catch (Exception)
				{
				}
			}
		}
	}
	internal static class SharedLanguageConfig
	{
		internal const string Filename = "ilya.whiteknuckle.shared-language.cfg";

		internal static object[] Open(string directory)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Expected O, but got Unknown
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Expected O, but got Unknown
			string text = Path.Combine(directory, "ilya.whiteknuckle.shared-language.cfg");
			bool flag = File.Exists(text);
			ConfigFile file = new ConfigFile(text, false)
			{
				SaveOnConfigSet = false
			};
			ConfigEntry<string> choice = file.Bind<string>("General", "Language", "auto", new ConfigDescription("Language for all compatible Ilyushkins WK mods. RU/ENG switches every connected mod. auto follows the game; ru = Russian; en = English. / Язык всех совместимых WK-модов Илюшкинса. RU/ENG переключает все подключённые моды. auto = язык игры; ru = русский; en = английский.", (AcceptableValueBase)(object)new AcceptableValueList<string>(new string[3] { "auto", "ru", "en" }), Array.Empty<object>()));
			if (!flag)
			{
				file.Save();
			}
			return new object[3]
			{
				flag,
				(Func<string>)(() => choice.Value),
				(Action<string>)delegate(string value)
				{
					choice.Value = value;
					file.Save();
				}
			};
		}
	}
}
namespace Safehouse
{
	internal sealed class Catalog : IDisposable
	{
		internal Decor[] items = new Decor[255]
		{
			new Decor("pine", "Нарядная ёлка", "Holiday pine", Mount.Floor, Shelf.Winter, null, null, flat: false, "ChristmasTree", supportTop: false, 1.68f),
			new Decor("gift", "Подарок с бантом", "Wrapped present", Mount.Floor, Shelf.Winter, null, null, flat: false, "Present_01", supportTop: false, 0.58f),
			new Decor("gift_blue", "Подарок · синий и серебро", "Gift · blue and silver", Mount.Floor, Shelf.Winter, null, null, flat: false, "Present_01")
			{
				giftPalette = 1
			},
			new Decor("gift_purple", "Подарок · фиолетовый и золото", "Gift · purple and gold", Mount.Floor, Shelf.Winter, null, null, flat: false, "Present_01")
			{
				giftPalette = 2
			},
			new Decor("gift_pine", "Подарок · хвоя и крем", "Gift · pine and cream", Mount.Floor, Shelf.Winter, null, null, flat: false, "Present_01")
			{
				giftPalette = 3
			},
			new Decor("lantern", "Станционный фонарь", "Station lantern", Mount.Floor, Shelf.Winter, null, null, flat: false, null, supportTop: false, 0.6707019f),
			new Decor("candles", "Восковые свечи", "Wax candles", Mount.Floor, Shelf.Winter, null, "Rho_Candle_Beige_03", flat: false, null, supportTop: false, 0.56f),
			new Decor("wreath", "Хвойный венок", "Pine wreath", Mount.Wall, Shelf.Winter, null, null, flat: false, null, supportTop: false, 0.8887502f),
			new Decor("lights", "Цветная гирлянда", "String lights", Mount.Wall, Shelf.Winter, null, null, flat: false, "L_HolidayLights", supportTop: false, 1.62142f),
			new Decor("snowflake", "Ледяная снежинка", "Ice crystal", Mount.Wall, Shelf.Winter, null, null, flat: false, null, supportTop: false, 0.72f),
			new Decor("bauble", "Подвесной шар", "Hanging bauble", Mount.Ceiling, Shelf.Winter, null, null, flat: false, "Ornament", supportTop: false, 0.5541f),
			new Decor("cocoa", "Кружка какао", "Hot cocoa", Mount.Floor, Shelf.Table, "Item_Cocoa_Full", "Item_Cocoa_Full", flat: false, null, supportTop: false, 0.163833f),
			new Decor("milk", "Пакет молока", "Milk carton", Mount.Floor, Shelf.Table, "Item_Milk", "Item_Milk", flat: false, null, supportTop: false, 0.1965f),
			new Decor("cookie", "Печенье", "Cookie", Mount.Floor, Shelf.Table, "Item_Food_Cookie", null, flat: true, null, supportTop: false, 0.112f),
			new Decor("mug", "Пустая кружка", "Empty cocoa mug", Mount.Floor, Shelf.Table, "Item_Cocoa_Empty", "Item_Cocoa_Empty", flat: false, null, supportTop: false, 0.163833f),
			new Decor("carton", "Пустой пакет молока", "Empty milk carton", Mount.Floor, Shelf.Table, "Item_Milk_Empty", "Item_Milk_Empty", flat: false, null, supportTop: false, 0.1965f),
			new Decor("bar", "Батончик", "Food bar", Mount.Floor, Shelf.Table, "Item_Food_Bar", null, flat: true, null, supportTop: false, 0.172f),
			new Decor("fruit", "Фрукт", "Fruit", Mount.Floor, Shelf.Table, "Item_Food_Fruit", "Item_fruit", flat: false, null, supportTop: false, 0.1033962f),
			new Decor("cauldron", "Котелок с конфетами", "Candy cauldron", Mount.Floor, Shelf.Table, "Item_CandyCauldron", "Item_candyCauldron", flat: false, null, supportTop: false, 0.2639491f),
			new Decor("desk_lamp", "Настольная лампа", "Desk lamp", Mount.Floor, Shelf.Props, null, "Prop_DeskLamp_01", flat: false, null, supportTop: false, 0.2464276f),
			new Decor("radio", "Радио", "Radio", Mount.Floor, Shelf.Props, "Item_Radio", "Prop_Radio", flat: false, "Prop_Radio", supportTop: false, 0.2426933f),
			new Decor("planter", "Кашпо", "Planter", Mount.Floor, Shelf.Props, null, "Prop_MediumPlantpot_01", flat: false, null, supportTop: false, 0.228f, pot: true),
			new Decor("pumpkin", "Маленькая тыква", "Small pumpkin", Mount.Floor, Shelf.Props, null, "Prop_PumpkinSmall_1", flat: false, null, supportTop: false, 0.2026935f),
			new Decor("moonrock", "Лунный камень", "Moon rock", Mount.Floor, Shelf.Props, "Item_Trinket_MoonRock", "Item_Trinket_MoonRock", flat: false, null, supportTop: false, 0.1605939f),
			new Decor("candy_cane", "Леденец-трость", "Candy cane", Mount.Floor, Shelf.Props, "Item_Rebar_Holiday", "Item_CandyCaneRebar", flat: true, null, supportTop: false, 0.2226539f),
			new Decor("dining_table", "Обеденный стол", "Dining table", Mount.Floor, Shelf.Furniture, null, "Prop_DIningTable_01", flat: false, "Prop_DiningTable_01", supportTop: true),
			new Decor("metal_table", "Металлический стол", "Metal table", Mount.Floor, Shelf.Furniture, null, "Prop_Table_Metal_01", flat: false, "Prop_Table_Metal_01", supportTop: true),
			new Decor("chair", "Стул", "Chair", Mount.Floor, Shelf.Furniture, null, "Prop_Chair", flat: false, "Prop_Chair_01"),
			new Decor("office_chair", "Офисное кресло", "Office chair", Mount.Floor, Shelf.Furniture, null, "Prop_OfficeChair_01", flat: false, "Prop_OfficeChair_01"),
			new Decor("crate", "Ящик", "Crate", Mount.Floor, Shelf.Furniture, null, "Prop_Crate_Small_01", flat: false, "Prop_Crate_Small_01", supportTop: true),
			new Decor("metal_crate", "Металлический ящик", "Metal crate", Mount.Floor, Shelf.Furniture, null, "Prop_Crate_Metal_Small_01", flat: false, "Prop_Crate_Metal_Small_01", supportTop: true),
			new Decor("desktop", "Настольный компьютер", "Desktop computer", Mount.Floor, Shelf.Furniture, null, "Prop_Computer_Desktop_01", flat: false, "Prop_Computer_Desktop_01"),
			new Decor("desk", "Письменный стол", "Office desk", Mount.Floor, Shelf.Furniture, null, "Prop_OfficeDesk_03", flat: false, "Prop_OfficeDesk_03", supportTop: true),
			new Decor("can", "Банка фасоли", "Bean can", Mount.Floor, Shelf.Table, "Item_Beans", "Item_Can"),
			new Decor("can_empty", "Пустая жестянка", "Empty tin can", Mount.Floor, Shelf.Table, "Item_Beans_Eaten", "Item_Can_Empty"),
			new Decor("can_delta", "Банка Дельта 0052", "Delta 0052 can", Mount.Floor, Shelf.Table, "Item_Beans_Periphery"),
			new Decor("coffee_mug", "Кофейная кружка", "Coffee mug", Mount.Floor, Shelf.Table, null, "Prop_Mug_01"),
			new Decor("coffee_pot", "Кофейник", "Coffee pot", Mount.Floor, Shelf.Table, null, "Prop_CoffiePot_1"),
			new Decor("wine", "Бутылка вина", "Wine bottle", Mount.Floor, Shelf.Table, "Item_Wine"),
			new Decor("wine_empty", "Пустая бутылка", "Empty wine bottle", Mount.Floor, Shelf.Table, "Item_Wine_Empty"),
			new Decor("pot_empty", "Пустой котелок", "Empty cauldron", Mount.Floor, Shelf.Table, "Item_CandyCauldron_Empty", "Item_CandyCauldron_Empty"),
			new Decor("tv_1", "Телевизор 1", "Television 1", Mount.Floor, Shelf.Furniture, null, "Prop_tv_01"),
			new Decor("tv_2", "Телевизор 2", "Television 2", Mount.Floor, Shelf.Furniture, null, "Prop_tv_02"),
			new Decor("tv_3", "Телевизор 3", "Television 3", Mount.Floor, Shelf.Furniture, null, "Prop_tv_03"),
			new Decor("tv_4", "Телевизор 4", "Television 4", Mount.Floor, Shelf.Furniture, null, "Prop_tv_04"),
			new Decor("tv_old", "Старый телевизор", "Old television", Mount.Floor, Shelf.Furniture, null, "Prop_Artifact_OldTV"),
			new Decor("wide_monitor", "Широкий монитор", "Wide monitor", Mount.Floor, Shelf.Furniture, null, "Prop_BankMonitor_Extrawide"),
			new Decor("small_plant_1", "Малое растение 1", "Small plant 1", Mount.Floor, Shelf.Plants, null, "Small_plant_01"),
			new Decor("small_plant_2", "Малое растение 2", "Small plant 2", Mount.Floor, Shelf.Plants, null, "Small_plant_02"),
			new Decor("small_plant_3", "Малое растение 3", "Small plant 3", Mount.Floor, Shelf.Plants, null, "Small_plant_03"),
			new Decor("small_plant_4", "Малое растение 4", "Small plant 4", Mount.Floor, Shelf.Plants, null, "Small_plant_04"),
			new Decor("medium_plant", "Среднее растение", "Medium plant", Mount.Floor, Shelf.Plants, null, "Medim__Plant_01"),
			new Decor("tall_plant_1", "Высокое растение 1", "Tall plant 1", Mount.Floor, Shelf.Plants, null, "Tall_plant_01"),
			new Decor("tall_plant_2", "Высокое растение 2", "Tall plant 2", Mount.Floor, Shelf.Plants, null, "Tall_plant_02"),
			new Decor("crossbow", "Арбалет SB13", "SB13 crossbow", Mount.Floor, Shelf.Weapons, "Item_Crossbow"),
			new Decor("handgun", "Пистолет MD95", "MD95 handgun", Mount.Floor, Shelf.Weapons, "Item_Handgun"),
			new Decor("flashgun", "Зажигательный пистолет SP-10", "SP-10 flashgun", Mount.Floor, Shelf.Weapons, "Item_Flashgun"),
			new Decor("flaregun", "Ракетница", "Flare gun", Mount.Floor, Shelf.Weapons, "Item_Flaregun", "Item_Flaregun"),
			new Decor("machinegun", "Пулемёт", "Machine gun", Mount.Floor, Shelf.Weapons, "Item_Machinegun"),
			new Decor("cryogun", "Криопушка", "Cryo-gun", Mount.Floor, Shelf.Weapons, "Item_Cryogun", "Item_icegun"),
			new Decor("cleaver", "Тесак", "Cleaver", Mount.Floor, Shelf.Weapons, "Item_Cleaver"),
			new Decor("rapier", "Рапира", "Rapier", Mount.Floor, Shelf.Weapons, "Item_Artifact_Rapier"),
			new Decor("scissors", "Ножницы", "Scissors", Mount.Floor, Shelf.Weapons, "Item_Artifact_Scissors", "Low_rez_Scissors"),
			new Decor("hammer", "Молоток", "Hammer", Mount.Floor, Shelf.Weapons, "Item_Hammer", "Item_Hammer"),
			new Decor("banhammer", "Банхаммер", "Ban hammer", Mount.Floor, Shelf.Weapons, "Item_BanHammer"),
			new Decor("wrench", "Трубный ключ", "Pipe wrench", Mount.Floor, Shelf.Weapons, "Item_Pipewrench"),
			new Decor("hammer_wrench", "Молоток-ключ", "Wrench hammer", Mount.Floor, Shelf.Weapons, "Item_Hammer_Cosmetic_Wrench"),
			new Decor("rebar", "Арматура", "Rebar", Mount.Floor, Shelf.Weapons, "Item_Rebar", "Item_Rebar"),
			new Decor("bonespear", "Костяное копьё", "Bone spear", Mount.Floor, Shelf.Weapons, "Item_Rebar_Bone", "Item_BoneSpear"),
			new Decor("rebar_blast", "Разрывная арматура", "Explosive rebar", Mount.Floor, Shelf.Weapons, "Item_Rebar_Explosive", "Item_Rebar_Explosive"),
			new Decor("rebar_return", "Возвратная арматура", "Returning rebar", Mount.Floor, Shelf.Weapons, "Item_Artifact_Rebar_Return", "Item_Artifact_ReturnRebar"),
			new Decor("rebar_rope", "Арматура с верёвкой", "Rope rebar", Mount.Floor, Shelf.Weapons, "Item_RebarRope", "Item_Rebar_Rope"),
			new Decor("rebar_rope_winter", "Праздничная арматура с верёвкой", "Holiday rope rebar", Mount.Floor, Shelf.Weapons, "Item_RebarRope_Holiday", "Item_Rebar_Rope_Holiday"),
			new Decor("piton_grenade", "Граната с крюками", "Piton grenade", Mount.Floor, Shelf.Weapons, "Item_Grenade_Piton"),
			new Decor("ammo", "Патроны 10 мм", "10 mm ammo", Mount.Floor, Shelf.Weapons, "Item_10mm_Ammo"),
			new Decor("flare_round", "Сигнальный патрон", "Flare round", Mount.Floor, Shelf.Weapons, "Item_Flaregun_Ammo", "Item_Flare_Ammo"),
			new Decor("piton", "Скальный крюк", "Piton", Mount.Floor, Shelf.Weapons, "Item_Piton"),
			new Decor("bone_piton", "Костяной крюк", "Bone piton", Mount.Floor, Shelf.Weapons, "Item_Piton_Bone"),
			new Decor("auto_piton", "Автоматический крюк", "Auto-piton", Mount.Floor, Shelf.Weapons, "Item_AutoPiton"),
			new Decor("grapple", "Захватный крюк", "Grapple piton", Mount.Floor, Shelf.Weapons, "Item_GrapplePiton"),
			new Decor("winter_piton", "Праздничный крюк", "Holiday piton", Mount.Floor, Shelf.Weapons, "Item_Piton_Holiday"),
			new Decor("barnacle_hook", "Крюк усоногого", "Barnacle hook", Mount.Floor, Shelf.Weapons, "Item_BarnacleHook"),
			new Decor("hook_infinite", "Вечный крюк усоногого", "Infinite barnacle hook", Mount.Floor, Shelf.Weapons, "Item_BarnacleHook_Infinite"),
			new Decor("debug_handgun", "Отладочный пистолет", "Debug handgun", Mount.Floor, Shelf.Weapons, "Item_Handgun_Debug"),
			new Decor("rubble", "Кусок щебня", "Rubble", Mount.Floor, Shelf.Weapons, "Item_Rubble", "Item_Brick"),
			new Decor("pot_1", "Малый горшок", "Small pot", Mount.Floor, Shelf.Plants, null, "SmallPlantPot_01", flat: false, null, supportTop: false, 0f, pot: true),
			new Decor("pot_2", "Цветочный горшок", "Flowerpot", Mount.Floor, Shelf.Plants, null, "Plant_pot", flat: false, null, supportTop: false, 0f, pot: true),
			new Decor("pot_3", "Среднее кашпо", "Medium planter", Mount.Floor, Shelf.Plants, null, "Prop_MediumPlantpot_02", flat: false, null, supportTop: false, 0f, pot: true),
			new Decor("pot_4", "Высокий горшок", "Tall pot", Mount.Floor, Shelf.Plants, null, "Prop_TallPlantpot_01", flat: false, null, supportTop: false, 0f, pot: true),
			new Decor("pot_5", "Высокое кашпо", "Tall planter", Mount.Floor, Shelf.Plants, null, "Prop_TallPlantpot_02", flat: false, null, supportTop: false, 0f, pot: true),
			new Decor("wall_garland", "Настенная гирлянда", "Draped wall lights", Mount.Wall, Shelf.Winter, null, "L_HolidayLights"),
			new Decor("sofa_1", "Диван 1", "Sofa 1", Mount.Floor, Shelf.Furniture, null, "Prop_Sofa_01"),
			new Decor("sofa_2", "Диван 2", "Sofa 2", Mount.Floor, Shelf.Furniture, null, "Prop_Sofa_02"),
			new Decor("sofa_3", "Диван 3", "Sofa 3", Mount.Floor, Shelf.Furniture, null, "Prop_Sofa_03"),
			new Decor("sofa_4", "Диван 4", "Sofa 4", Mount.Floor, Shelf.Furniture, null, "Prop_Sofa_04"),
			new Decor("sofa_5", "Диван 5", "Sofa 5", Mount.Floor, Shelf.Furniture, null, "Prop_Sofa_05"),
			new Decor("sofa_6", "Диван 6", "Sofa 6", Mount.Floor, Shelf.Furniture, null, "Prop_Sofa_06"),
			new Decor("sofa_7", "Диван 7", "Sofa 7", Mount.Floor, Shelf.Furniture, null, "Prop_Sofa_07"),
			new Decor("mattress_2", "Матрас 2", "Mattress 2", Mount.Floor, Shelf.Furniture, null, "Prop_Mattress_02"),
			new Decor("mattress_3", "Матрас 3", "Mattress 3", Mount.Floor, Shelf.Furniture, null, "Prop_Mattress_03"),
			new Decor("autumn_chair_2", "Осенний стул 2", "Autumn chair 2", Mount.Floor, Shelf.Furniture, null, "Prop_HaloweenChair2"),
			new Decor("autumn_chair_3", "Осенний стул 3", "Autumn chair 3", Mount.Floor, Shelf.Furniture, null, "Prop_HaloweenChair3"),
			new Decor("autumn_chair_4", "Осенний стул 4", "Autumn chair 4", Mount.Floor, Shelf.Furniture, null, "Prop_HaloweenChair4"),
			new Decor("wood_table", "Низкий деревянный стол", "Low wooden table", Mount.Floor, Shelf.Furniture, null, "Prop_Table_Wood_Short_01", flat: false, null, supportTop: true),
			new Decor("writing_desk", "Кабинетный стол", "Writing desk", Mount.Floor, Shelf.Furniture, null, "Prop_OfficeDesk_04", flat: false, null, supportTop: true),
			new Decor("swivel", "Поворотное кресло", "Swivel chair", Mount.Floor, Shelf.Furniture, null, "Prop_OfficeChair_02"),
			new Decor("cooler", "Кулер для воды", "Water cooler", Mount.Floor, Shelf.Furniture, null, "Prop_waterCooler"),
			new Decor("bookshelf_1", "Книжный шкаф 1", "Bookcase 1", Mount.Floor, Shelf.Storage, null, "Prop_Bookcase_01", flat: false, null, supportTop: true),
			new Decor("bookshelf_2", "Книжный шкаф 2", "Bookcase 2", Mount.Floor, Shelf.Storage, null, "Prop_Bookcase_02", flat: false, null, supportTop: true),
			new Decor("medium_books", "Средний книжный шкаф", "Medium bookcase", Mount.Floor, Shelf.Storage, null, "Prop_BookcaseMedium_02", flat: false, null, supportTop: true),
			new Decor("large_books", "Большой книжный шкаф", "Large bookcase", Mount.Floor, Shelf.Storage, null, "Prop_BookcaseLarge_02", flat: false, null, supportTop: true),
			new Decor("equipment_locker", "Шкаф для снаряжения", "Equipment locker", Mount.Floor, Shelf.Storage, null, "Prop_EquipmentLocker_01", flat: false, null, supportTop: true),
			new Decor("ration_locker", "Шкаф для пайков", "Ration locker", Mount.Floor, Shelf.Storage, null, "Prop_RationLocker", flat: false, null, supportTop: true),
			new Decor("small_crate_2", "Малый грузовой ящик", "Small cargo crate", Mount.Floor, Shelf.Storage, null, "Prop_Crate_Small_02", flat: false, null, supportTop: true),
			new Decor("wide_crate", "Широкий ящик", "Wide crate", Mount.Floor, Shelf.Storage, null, "L_WideCrate_01", flat: false, null, supportTop: true),
			new Decor("station_crate", "Станционный ящик", "Station crate", Mount.Floor, Shelf.Storage, null, "L_Crate_01", flat: false, null, supportTop: true),
			new Decor("flare_crate", "Ящик для ракет", "Flare crate", Mount.Floor, Shelf.Storage, null, "Prop_FlareCrate_01", flat: false, null, supportTop: true),
			new Decor("large_crate_1", "Большой ящик 1", "Large crate 1", Mount.Floor, Shelf.Storage, null, "Prop_Crate_Large_01", flat: false, null, supportTop: true),
			new Decor("large_crate_2", "Большой ящик 2", "Large crate 2", Mount.Floor, Shelf.Storage, null, "Prop_Crate_Large_02", flat: false, null, supportTop: true),
			new Decor("large_crate_3", "Большой ящик 3", "Large crate 3", Mount.Floor, Shelf.Storage, null, "Prop_Crate_Large_03", flat: false, null, supportTop: true),
			new Decor("box_1", "Картонная коробка 1", "Cardboard box 1", Mount.Floor, Shelf.Storage, null, "Prop_Cardboard_Box_01", flat: false, null, supportTop: true),
			new Decor("box_4", "Картонная коробка 4", "Cardboard box 4", Mount.Floor, Shelf.Storage, null, "Prop_Cardboard_Box_04", flat: false, null, supportTop: true),
			new Decor("box_5", "Картонная коробка 5", "Cardboard box 5", Mount.Floor, Shelf.Storage, null, "Prop_Cardboard_Box_05", flat: false, null, supportTop: true),
			new Decor("supply_crate_1", "Ящик снабжения 1", "Supply crate 1", Mount.Floor, Shelf.Storage, null, "Prop_ItemCrate_01", flat: false, null, supportTop: true),
			new Decor("supply_crate_2", "Ящик снабжения 2", "Supply crate 2", Mount.Floor, Shelf.Storage, null, "Prop_ItemCrate_02", flat: false, null, supportTop: true),
			new Decor("drum_1", "Бочка 1", "Barrel 1", Mount.Floor, Shelf.Storage, null, "Prop_Barrel_01", flat: false, null, supportTop: true),
			new Decor("drum_2", "Бочка 2", "Barrel 2", Mount.Floor, Shelf.Storage, null, "Prop_Barrel_02", flat: false, null, supportTop: true),
			new Decor("drum_3", "Бочка 3", "Barrel 3", Mount.Floor, Shelf.Storage, null, "Prop_Barrel_03", flat: false, null, supportTop: true),
			new Decor("cabinet_grey1", "Серая картотека 1", "Grey file cabinet 1", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Grey_01", flat: false, null, supportTop: true),
			new Decor("cabinet_grey2", "Серая картотека 2", "Grey file cabinet 2", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Grey_02", flat: false, null, supportTop: true),
			new Decor("cabinet_grey3", "Серая картотека 3", "Grey file cabinet 3", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Grey_03", flat: false, null, supportTop: true),
			new Decor("cabinet_grey4", "Серая картотека 4", "Grey file cabinet 4", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Grey_04", flat: false, null, supportTop: true),
			new Decor("cabinet_red1", "Красная картотека 1", "Red file cabinet 1", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Red_01", flat: false, null, supportTop: true),
			new Decor("cabinet_red2", "Красная картотека 2", "Red file cabinet 2", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Red_02", flat: false, null, supportTop: true),
			new Decor("cabinet_red3", "Красная картотека 3", "Red file cabinet 3", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Red_03", flat: false, null, supportTop: true),
			new Decor("cabinet_red4", "Красная картотека 4", "Red file cabinet 4", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Red_04", flat: false, null, supportTop: true),
			new Decor("cabinet_yellow1", "Жёлтая картотека 1", "Yellow file cabinet 1", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Yellow_01", flat: false, null, supportTop: true),
			new Decor("cabinet_yellow2", "Жёлтая картотека 2", "Yellow file cabinet 2", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Yellow_02", flat: false, null, supportTop: true),
			new Decor("cabinet_yellow3", "Жёлтая картотека 3", "Yellow file cabinet 3", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Yellow_03", flat: false, null, supportTop: true),
			new Decor("cabinet_yellow4", "Жёлтая картотека 4", "Yellow file cabinet 4", Mount.Floor, Shelf.Storage, null, "Prop_FilingCabinet_Yellow_04", flat: false, null, supportTop: true),
			new Decor("screen_panel", "Экранная панель", "Display panel", Mount.Wall, Shelf.Electronics, null, "Prop_ScreenPanel_01"),
			new Decor("bare_screen", "Экран терминала", "Terminal screen", Mount.Wall, Shelf.Electronics, null, "Prop_UpgradeConsole_OnlyScreen"),
			new Decor("console", "Малая консоль", "Small computer console", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerConsole_Small"),
			new Decor("term_main", "Терминал улучшений", "Upgrade terminal", Mount.Floor, Shelf.Electronics, null, "Prop_UpgradeConsole_Main"),
			new Decor("atm", "Банкомат", "ATM", Mount.Floor, Shelf.Electronics, null, "Prop_ATM_01"),
			new Decor("projector", "Проектор", "Projector", Mount.Floor, Shelf.Electronics, null, "Prop_Projector"),
			new Decor("cassette_player", "Кассетный плеер", "Cassette player", Mount.Floor, Shelf.Electronics, null, "Prop_Cassette_Player"),
			new Decor("tapedeck", "Кассетная дека", "Tape deck", Mount.Floor, Shelf.Electronics, null, "Prop_TapeDeck"),
			new Decor("cam", "Камера наблюдения", "Security camera", Mount.Wall, Shelf.Electronics, null, "Prop_Camera"),
			new Decor("damaged_radio", "Сломанное радио", "Damaged radio", Mount.Floor, Shelf.Electronics, null, "Prop_Radio_Damaged"),
			new Decor("vendor", "Торговый автомат", "Vending machine", Mount.Floor, Shelf.Electronics, null, "Prop_VendingMachine_T2"),
			new Decor("rack_metal1x2_01", "Стальная стойка 1", "Metal rack 1", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Metal_1x2_01"),
			new Decor("rack_metal1x2_02", "Стальная стойка 2", "Metal rack 2", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Metal_1x2_02"),
			new Decor("rack_metal1x2_03", "Стальная стойка 3", "Metal rack 3", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Metal_1x2_03"),
			new Decor("rack_metal2x2_01", "Стальная стойка 4", "Metal rack 4", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Metal_2x2_01"),
			new Decor("rack_metal2x2_02", "Стальная стойка 5", "Metal rack 5", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Metal_2x2_02"),
			new Decor("rack_red1x2_01", "Красная стойка 1", "Red rack 1", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Red_1x2_01"),
			new Decor("rack_red1x2_02", "Красная стойка 2", "Red rack 2", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Red_1x2_02"),
			new Decor("rack_red1x2_03", "Красная стойка 3", "Red rack 3", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Red_1x2_03"),
			new Decor("rack_red2x2_01", "Красная стойка 4", "Red rack 4", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Red_2x2_01"),
			new Decor("rack_red2x2_02", "Красная стойка 5", "Red rack 5", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Red_2x2_02"),
			new Decor("rack_yellow1x2_02", "Жёлтая стойка 1", "Yellow rack 1", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Yellow_1x2_02"),
			new Decor("rack_yellow1x2_03", "Жёлтая стойка 2", "Yellow rack 2", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Yellow_1x2_03"),
			new Decor("rack_yellow2x2_01", "Жёлтая стойка 3", "Yellow rack 3", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Yellow_2x2_01"),
			new Decor("rack_blue2x2_01", "Синяя стойка 1", "Blue rack 1", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Blue_2x2_01"),
			new Decor("microscope", "Микроскоп", "Microscope", Mount.Floor, Shelf.Props, null, "Prop_Microscope_01"),
			new Decor("burner", "Горелка Бунзена", "Bunsen burner", Mount.Floor, Shelf.Props, null, "Prop_BunsenBurner_01"),
			new Decor("eraser", "Мина (ластик)", "Mine (eraser)", Mount.Floor, Shelf.Props, null, "Prop_Eraser_01"),
			new Decor("cassette", "Кассета", "Cassette tape", Mount.Floor, Shelf.Props, null, "Prop_TapeDeck_Tape"),
			new Decor("bowlingball", "Шар для боулинга", "Bowling ball", Mount.Floor, Shelf.Props, null, "Prop_BowlingBall"),
			new Decor("bowlingpin", "Кегля", "Bowling pin", Mount.Floor, Shelf.Props, null, "Prop_BowlingPin"),
			new Decor("science", "Лабораторный прибор", "Lab instrument", Mount.Floor, Shelf.Props, null, "Prop_SientificEquipment_01"),
			new Decor("book_1", "Книга 1", "Book 1", Mount.Floor, Shelf.Props, null, "Prop_Book_01"),
			new Decor("book_2", "Книга 2", "Book 2", Mount.Floor, Shelf.Props, null, "Prop_Book_02"),
			new Decor("book_3", "Книга 3", "Book 3", Mount.Floor, Shelf.Props, null, "Prop_Book_03"),
			new Decor("book_4", "Книга 4", "Book 4", Mount.Floor, Shelf.Props, null, "Prop_Book_04"),
			new Decor("calculator_1", "Калькулятор 1", "Calculator 1", Mount.Floor, Shelf.Props, null, "Prop_calculator_01"),
			new Decor("calculator_2", "Калькулятор 2", "Calculator 2", Mount.Floor, Shelf.Props, null, "Prop_calculator_02"),
			new Decor("brewer_1", "Кофеварка 1", "Coffee brewer 1", Mount.Floor, Shelf.Table, null, "Prop_Coffie_brew_1"),
			new Decor("brewer_2", "Кофеварка 2", "Coffee brewer 2", Mount.Floor, Shelf.Table, null, "Prop_Coffie_brew_2"),
			new Decor("brewer_3", "Кофеварка 3", "Coffee brewer 3", Mount.Floor, Shelf.Table, null, "Prop_Coffie_brew_3"),
			new Decor("pumpkin_big_1", "Большая тыква 1", "Large pumpkin 1", Mount.Floor, Shelf.Winter, null, "Prop_PumpkinLarge_1"),
			new Decor("pumpkin_big_2", "Большая тыква 2", "Large pumpkin 2", Mount.Floor, Shelf.Winter, null, "Prop_PumpkinLarge_2"),
			new Decor("pumpkin_big_3", "Большая тыква 3", "Large pumpkin 3", Mount.Floor, Shelf.Winter, null, "Prop_PumpkinLarge_3"),
			new Decor("pumpkin_big_4", "Большая тыква 4", "Large pumpkin 4", Mount.Floor, Shelf.Winter, null, "Prop_PumpkinLarge_4"),
			new Decor("pumpkin_mini_2", "Малая тыква 2", "Small pumpkin 2", Mount.Floor, Shelf.Winter, null, "Prop_PumpkinSmall_2"),
			new Decor("pumpkin_mini_3", "Малая тыква 3", "Small pumpkin 3", Mount.Floor, Shelf.Winter, null, "Prop_PumpkinSmall_3"),
			new Decor("pumpkin_mini_4", "Малая тыква 4", "Small pumpkin 4", Mount.Floor, Shelf.Winter, null, "Prop_PumpkinSmall_4"),
			new Decor("trinket_calmingbuddy", "Успокаивающий смайлик", "Calming Buddy", Mount.Floor, Shelf.Trinkets, "Item_Trinket_CalmingBuddy", "Item_Trinket_CalmingBuddy"),
			new Decor("trinket_beta", "Обучающая кассета", "The Beta", Mount.Floor, Shelf.Trinkets, "Item_Trinket_Beta", "Item_Trinket_Betamax"),
			new Decor("trinket_carabiner", "Карабин", "Carabiner", Mount.Floor, Shelf.Trinkets, "Item_Trinket_Carabiner", "Item_Trinket_Carabiner"),
			new Decor("trinket_chalk", "Мел для лазания", "Climbing chalk", Mount.Floor, Shelf.Trinkets, "Item_Trinket_Chalk", "Item_Trinket_Chalk"),
			new Decor("trinket_employeeid", "Пропуск сотрудника", "Employee ID", Mount.Floor, Shelf.Trinkets, "Item_Trinket_EmployeeID", "Item_Trinket_EmployeeID"),
			new Decor("trinket_headlamp", "Налобный фонарь", "Headlamp", Mount.Floor, Shelf.Trinkets, "Item_Trinket_Headlamp", "Item_Trinket_Headlamp"),
			new Decor("trinket_massdamper", "Резной амулет", "Mass damper", Mount.Floor, Shelf.Trinkets, "Item_Trinket_MassDamper", "Item_Trinket_MassDamper"),
			new Decor("trinket_nugget", "Золотой самородок", "Gold nugget", Mount.Floor, Shelf.Trinkets, "Item_Trinket_Nugget", "Item_Trinket_GoldNugget"),
			new Decor("trinket_photoofhome", "Фотография дома", "Photo of home", Mount.Floor, Shelf.Trinkets, "Item_Trinket_PhotoOfHome", "Item_Trinket_Photo"),
			new Decor("trinket_bagupgrade", "Большой рюкзак", "Larger pack", Mount.Floor, Shelf.Trinkets, "Item_Trinket_BagUpgrade", "Item_Trinket_BagUpgrade"),
			new Decor("trinket_pouch", "Подсумок", "Pouch", Mount.Floor, Shelf.Trinkets, "Item_Trinket_Pouch", "Item_Trinket_Pouch"),
			new Decor("trinket_helmet", "Каска", "Helmet", Mount.Floor, Shelf.Trinkets, "Item_Trinket_Helmet", "Item_Trinket_Helmet"),
			new Decor("trinket_climbingshoes", "Скальные туфли", "Climbing shoes", Mount.Floor, Shelf.Trinkets, "Item_Trinket_ClimbingShoes", "Item_Trinket_ClimbingShoes"),
			new Decor("trinket_pulsepump", "Импульсный насос", "Pulse pump", Mount.Floor, Shelf.Trinkets, "Item_Trinket_PulsePump", "Item_Trinket_PulsePump"),
			new Decor("trinket_rhoamulet", "Амулет Ро", "Rho amulet", Mount.Floor, Shelf.Trinkets, "Item_Trinket_RhoAmulet", "Item_Tricket_RhoAmulet"),
			new Decor("alarm_red", "Сигнальная сирена", "Alarm siren", Mount.Wall, Shelf.Electronics, null, "Prop_Alarm_01"),
			new Decor("alarm_3", "Настенный оповещатель", "Wall alarm", Mount.Wall, Shelf.Electronics, null, "Prop_Alarm_03"),
			new Decor("keypad", "Кодовая панель", "Keypad", Mount.Wall, Shelf.Electronics, null, "Prop_Button_Keypad_01"),
			new Decor("yellow_button", "Жёлтая кнопка", "Yellow pushbutton", Mount.Wall, Shelf.Electronics, null, "Prop_Button_05_Yellow"),
			new Decor("lever_box", "Рычажный пульт", "Lever box", Mount.Wall, Shelf.Electronics, null, "Prop_LeverBox_01"),
			new Decor("lever_box_2", "Рычажный пульт 2", "Lever box 2", Mount.Wall, Shelf.Electronics, null, "Prop_LeverBox_02"),
			new Decor("handwheel", "Маховик вентиля", "Valve handwheel", Mount.Wall, Shelf.Electronics, null, "Prop_Valve_Handwheel_01"),
			new Decor("handwheel_2", "Маховик вентиля 2", "Valve handwheel 2", Mount.Wall, Shelf.Electronics, null, "Prop_Valve_Handwheel_02"),
			new Decor("vent_cover", "Вентиляционная решётка", "Vent grille", Mount.Wall, Shelf.Electronics, null, "Prop_VentCover_01"),
			new Decor("vent_cover_3", "Широкая вентрешётка", "Wide vent grille", Mount.Wall, Shelf.Electronics, null, "Prop_VentCover_03"),
			new Decor("fan2", "Вентилятор", "Fan", Mount.Wall, Shelf.Electronics, null, "Prop_Fan_02"),
			new Decor("fan3", "Вентилятор 2", "Fan 2", Mount.Wall, Shelf.Electronics, null, "Prop_Fan_03"),
			new Decor("wash", "Химическая мойка", "Chemical wash station", Mount.Floor, Shelf.Electronics, null, "Prop_ChemsWash_01"),
			new Decor("field_gen", "Генератор поля", "Field generator", Mount.Floor, Shelf.Electronics, null, "Prop_FieldGenerator_01"),
			new Decor("incubator", "Инкубатор", "Cell incubator", Mount.Floor, Shelf.Electronics, null, "Prop_cell_incubator"),
			new Decor("probe", "Зонд", "Probe", Mount.Floor, Shelf.Electronics, null, "Prop_Probe_01"),
			new Decor("refueler", "Криозаправщик", "Cryo refueler", Mount.Floor, Shelf.Electronics, null, "Prop_CryoRefueler"),
			new Decor("recycler", "Переработчик", "Recycler", Mount.Floor, Shelf.Electronics, null, "Prop_Recycler"),
			new Decor("depositor", "Приёмник валюты", "Currency deposit", Mount.Floor, Shelf.Electronics, null, "Prop_CurrencyDeposit"),
			new Decor("sec_system", "Блок охраны", "Security unit", Mount.Wall, Shelf.Electronics, null, "Prop_SecSystem_01"),
			new Decor("rack_yellow4", "Жёлтая двойная стойка", "Yellow double rack", Mount.Floor, Shelf.Electronics, null, "Prop_ComputerRack_Yellow_2x2_02"),
			new Decor("bandage", "Бинт", "Bandage", Mount.Floor, Shelf.Props, "Item_Bandage"),
			new Decor("inoculator", "Инокулятор", "Inoculator", Mount.Floor, Shelf.Props, "Item_Inoculator"),
			new Decor("injector", "Инъектор", "Injector", Mount.Floor, Shelf.Props, "Item_Injector"),
			new Decor("pills", "Флакон таблеток", "Pill bottle", Mount.Floor, Shelf.Props, "Item_Pillbottle"),
			new Decor("flashlight", "Ручной фонарик", "Handheld flashlight", Mount.Floor, Shelf.Props, "Item_Flashlight"),
			new Decor("powercell", "Энергоячейка", "Power cell", Mount.Floor, Shelf.Props, "Item_Powercell"),
			new Decor("scanner", "Сканер", "Entity scanner", Mount.Floor, Shelf.Props, "Item_EntityScanner"),
			new Decor("lost_disk", "Потерянная дискета", "Lost floppy disk", Mount.Floor, Shelf.Props, "Item_Floppy_Lost"),
			new Decor("disk_t1", "Дискета T1", "T1 disk", Mount.Floor, Shelf.Props, "Item_Floppy_T1"),
			new Decor("disk_t2", "Дискета T2", "T2 disk", Mount.Floor, Shelf.Props, "Item_Floppy_T2"),
			new Decor("disk_t3", "Дискета T3", "T3 disk", Mount.Floor, Shelf.Props, "Item_Floppy_T3"),
			new Decor("note", "Записка", "Note", Mount.Floor, Shelf.Props, "Item_Note_01"),
			new Decor("stained_note", "Запятнанная записка", "Stained note", Mount.Floor, Shelf.Props, "Item_Note_02_Bloody"),
			new Decor("loose_key", "Ключ", "Key", Mount.Floor, Shelf.Props, "Item_Other_Key_01"),
			new Decor("rope", "Верёвка", "Rope", Mount.Floor, Shelf.Props, "Item_Rope"),
			new Decor("rho_stone", "Камень Ро", "Rho stone", Mount.Floor, Shelf.Props, "Item_RhoStone"),
			new Decor("timepiece", "Часы-артефакт", "Timepiece", Mount.Floor, Shelf.Props, "Item_Artifact_Timepiece"),
			new Decor("translocator", "Транслокатор", "Translocator", Mount.Floor, Shelf.Props, "Item_Artifact_Translocator"),
			new Decor("artifact_remote", "Пульт-артефакт", "Artifact remote", Mount.Floor, Shelf.Props, "Item_Artifact_Remote"),
			new Decor("craft_cube", "Куб-артефакт", "Craft cube", Mount.Floor, Shelf.Props, "Item_Artifact_CraftCube"),
			new Decor("eva_glove", "Перчатка ВКД", "EVA glove", Mount.Floor, Shelf.Props, "Item_Artifact_EVAGlove"),
			new Decor("rho_milk", "Молоко Ро", "Rho milk", Mount.Floor, Shelf.Table, "Item_Milk_Rho"),
			new Decor("hazard_drum", "Бочка с маркировкой", "Marked barrel", Mount.Floor, Shelf.Storage, null, "Prop_Barrel_Explosive"),
			new Decor("plank", "Доска", "Wooden plank", Mount.Floor, Shelf.Props, null, "Prop_Plank_04"),
			new Decor("cell_loader", "Стойка энергоячеек", "Power cell loader", Mount.Floor, Shelf.Electronics, null, "Prop_Powercell_Loader_01"),
			new Decor("single_loader", "Гнездо энергоячейки", "Single cell loader", Mount.Floor, Shelf.Electronics, null, "Prop_Powercell_Loader_Single_01"),
			new Decor("arrow_left", "Стрелка влево", "Left arrow button", Mount.Wall, Shelf.Electronics, null, "Prop_Button_Arrow_Left"),
			new Decor("arrow_right", "Стрелка вправо", "Right arrow button", Mount.Wall, Shelf.Electronics, null, "Prop_Button_Arrow_Right"),
			new Decor("stand_light1", "Переносной светильник 1", "Portable light 1", Mount.Floor, Shelf.Electronics, null, "Prop_MovableLight_01"),
			new Decor("stand_light2", "Переносной светильник 2", "Portable light 2", Mount.Floor, Shelf.Electronics, null, "Prop_MovableLight_02"),
			new Decor("stand_light3", "Переносной светильник 3", "Portable light 3", Mount.Floor, Shelf.Electronics, null, "Prop_MovableLight_03")
		};

		private readonly Dictionary<string, Decor> byID = new Dictionary<string, Decor>();

		private readonly Material[] palette = (Material[])(object)new Material[16];

		internal Material green;

		internal Material red;

		private GameVisuals native;

		internal readonly EmitterArt lightArt = new EmitterArt();

		internal readonly FurnitureSurfaces surfaces = new FurnitureSurfaces();

		private string lastCoverage;

		private static readonly string[] colors = new string[16]
		{
			"133e36", "24634d", "378466", "b53338", "eb4c42", "d6a24d", "ffda77", "5a3930", "292e36", "a8d8e5",
			"f0e5d6", "47838e", "b79259", "fff2b0", "eabbb0", "254452"
		};

		internal const int PageSize = 8;

		private readonly Dictionary<string, Decor> sourceItems = new Dictionary<string, Decor>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> sceneNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private static readonly string[] propPrefixes = new string[6] { "Prop_", "Deco_", "Decor_", "Decoration_", "Furniture_", "poster-" };

		private static readonly HashSet<string> technicalParts = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
		{
			"handhold", "grabgeo", "collider", "colider", "collision", "col", "trigger", "spawn", "lod", "root",
			"navmesh", "fx", "vfx", "lightcone", "audio", "gizmo", "sprite", "proxy", "test", "dev",
			"brokenpart", "shattered", "cell", "grinder", "spinny", "spinny01", "spinny02", "feet", "shaft", "epilepsy",
			"tutorial"
		};

		private string posterFolder => Path.Combine(Paths.ConfigPath, "SafehouseStudio", "Posters");

		internal Catalog()
		{
			Decor[] array = new Decor[159]
			{
				new Decor("asset_prop_briefcase", "Портфель", "Briefcase", Mount.Floor, Shelf.Props, null, null, flat: false, "Prop_Briefcase"),
				new Decor("asset_prop_astronauthelmet", "Шлем космонавта", "Astronaut helmet", Mount.Floor, Shelf.Props, null, null, flat: false, "Prop_AstronautHelmet"),
				new Decor("asset_l_junk_pile_01", "Куча старых деталей 1", "Scrap pile 1", Mount.Floor, Shelf.Props, null, "L_Junk_pile_01"),
				new Decor("asset_l_junk_pile_02", "Куча старых деталей 2", "Scrap pile 2", Mount.Floor, Shelf.Props, null, "L_Junk_pile_02"),
				new Decor("asset_l_buttonstand_01", "Стойка для кнопки", "Button stand", Mount.Floor, Shelf.Props, null, "L_ButtonStand_01"),
				new Decor("asset_rho_offeringstone", "Камень для подношений", "Offering stone", Mount.Floor, Shelf.Props, null, "Rho_OfferingStone"),
				new Decor("asset_rho_altarstone_01", "Алтарный камень 1", "Altar stone 1", Mount.Floor, Shelf.Props, null, "Rho_AltarStone_01"),
				new Decor("asset_rho_altarstone_02", "Алтарный камень 2", "Altar stone 2", Mount.Floor, Shelf.Props, null, "Rho_AltarStone_02"),
				new Decor("asset_rho_altarstone_01_broken", "Расколотый алтарный камень", "Broken altar stone", Mount.Floor, Shelf.Props, null, "Rho_AltarStone_01_Broken"),
				new Decor("asset_rho_altarstone_01_fixed", "Восстановленный алтарный камень", "Restored altar stone", Mount.Floor, Shelf.Props, null, "Rho_AltarStone_01_Fixed"),
				new Decor("asset_rho_altar_broken", "Разбитый алтарь", "Broken altar", Mount.Floor, Shelf.Props, null, "Rho_Altar_Broken"),
				new Decor("asset_rho_altar_fixed", "Целый алтарь", "Restored altar", Mount.Floor, Shelf.Props, null, "Rho_Altar_Fixed"),
				new Decor("asset_l_rho_obelisk_01", "Обелиск Ро", "Rho obelisk", Mount.Floor, Shelf.Props, null, "L_Rho_Obelisk_01"),
				new Decor("asset_deadbody_skull", "Череп", "Skull", Mount.Floor, Shelf.Props, null, "DeadBody_Skull"),
				new Decor("asset_rubblepile_01", "Груда камней 1", "Rubble pile 1", Mount.Floor, Shelf.Props, null, "RubblePile_01"),
				new Decor("asset_rubblepile_02", "Груда камней 2", "Rubble pile 2", Mount.Floor, Shelf.Props, null, "RubblePile_02"),
				new Decor("asset_prop_plank_04_broken", "Сломанная доска", "Broken plank", Mount.Floor, Shelf.Props, null, null, flat: false, "Prop_Plank_04_Broken"),
				new Decor("asset_l_fountain", "Фонтан", "Fountain", Mount.Floor, Shelf.Props, null, "L_Fountain"),
				new Decor("asset_l_desk", "Письменный стол станции", "Station desk", Mount.Floor, Shelf.Furniture, null, "L_Desk", flat: false, null, supportTop: true),
				new Decor("asset_prop_bookcasemedium_03", "Книжный шкаф 3", "Bookcase 3", Mount.Floor, Shelf.Furniture, null, null, flat: false, "Prop_BookcaseMedium_03", supportTop: true),
				new Decor("asset_prop_bookcasemedium_04", "Книжный шкаф 4", "Bookcase 4", Mount.Floor, Shelf.Furniture, null, null, flat: false, "Prop_BookcaseMedium_04", supportTop: true),
				new Decor("asset_prop_dentistchair", "Стоматологическое кресло", "Dentist chair", Mount.Floor, Shelf.Furniture, null, null, flat: false, "Prop_DentistChair"),
				new Decor("asset_prop_animatedprisoner_chair", "Кресло заключённого", "Prisoner chair", Mount.Floor, Shelf.Furniture, null, null, flat: false, "Prop_AnimatedPrisoner_Chair"),
				new Decor("asset_prop_prisonerchair_02", "Кресло заключённого 2", "Prisoner chair 2", Mount.Floor, Shelf.Furniture, null, null, flat: false, "Prop_PrisonerChair_02"),
				new Decor("asset_prop_prisonerchair_03", "Кресло заключённого 3", "Prisoner chair 3", Mount.Floor, Shelf.Furniture, null, null, flat: false, "Prop_PrisonerChair_03"),
				new Decor("asset_tram_seating", "Сиденья из трамвая", "Tram seating", Mount.Floor, Shelf.Furniture, null, "Tram_Seating"),
				new Decor("tram_seat_narrow", "Узкое сиденье трамвая", "Narrow tram seat", Mount.Floor, Shelf.Furniture, null, "Tram_Seating"),
				new Decor("tram_seat_wide", "Широкое сиденье трамвая", "Wide tram seat", Mount.Floor, Shelf.Furniture, null, "Tram_Seating"),
				new Decor("asset_l_carpet_hallway", "Ковровая дорожка", "Hallway carpet", Mount.Floor, Shelf.Furniture, null, "L_Carpet_Hallway"),
				new Decor("asset_l_basicshelf", "Простая полка", "Basic shelf", Mount.Wall, Shelf.Storage, null, "L_BasicShelf", flat: false, null, supportTop: true),
				new Decor("asset_prop_equipmentlocker_02", "Шкаф снаряжения 2", "Equipment locker 2", Mount.Floor, Shelf.Storage, null, null, flat: false, "Prop_EquipmentLocker_02", supportTop: true),
				new Decor("asset_prop_supplycrate_01", "Ящик припасов 1", "Supply crate model 1", Mount.Floor, Shelf.Storage, null, null, flat: false, "Prop_SupplyCrate_01", supportTop: true),
				new Decor("asset_prop_supplycrate_02", "Ящик припасов 2", "Supply crate model 2", Mount.Floor, Shelf.Storage, null, null, flat: false, "Prop_SupplyCrate_02", supportTop: true),
				new Decor("asset_l_fueltank_01", "Топливный бак", "Fuel tank", Mount.Floor, Shelf.Storage, null, "L_FuelTank_01", flat: false, null, supportTop: true),
				new Decor("asset_l_container_01", "Грузовой контейнер 1", "Cargo container 1", Mount.Floor, Shelf.Storage, null, "L_Container_01", flat: false, null, supportTop: true),
				new Decor("asset_l_container_02", "Грузовой контейнер 2", "Cargo container 2", Mount.Floor, Shelf.Storage, null, "L_Container_02", flat: false, null, supportTop: true),
				new Decor("asset_l_container_03", "Грузовой контейнер 3", "Cargo container 3", Mount.Floor, Shelf.Storage, null, "L_Container_03", flat: false, null, supportTop: true),
				new Decor("asset_l_container_04", "Грузовой контейнер 4", "Cargo container 4", Mount.Floor, Shelf.Storage, null, "L_Container_04", flat: false, null, supportTop: true),
				new Decor("asset_l_container_05", "Грузовой контейнер 5", "Cargo container 5", Mount.Floor, Shelf.Storage, null, "L_Container_05", flat: false, null, supportTop: true),
				new Decor("asset_l_computer", "Компьютер станции", "Station computer", Mount.Floor, Shelf.Electronics, null, "L_Computer"),
				new Decor("asset_l_batterybank", "Блок аккумуляторов", "Battery bank", Mount.Floor, Shelf.Electronics, null, "L_BatteryBank"),
				new Decor("asset_prop_computerconsole_basic", "Базовый терминал", "Basic terminal", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_ComputerConsole_Basic"),
				new Decor("asset_prop_button_console_01", "Кнопочный пульт", "Button console", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_Button_Console_01"),
				new Decor("asset_prop_diskvendor", "Автомат с дискетами", "Disk vendor", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_DiskVendor"),
				new Decor("asset_prop_diskvendor_2x", "Двойной автомат с дискетами", "Double disk vendor", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_DiskVendor_2x"),
				new Decor("asset_prop_rationvendor", "Автомат с пайками", "Ration vendor", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_RationVendor"),
				new Decor("asset_prop_eventvendor", "Автомат событий", "Event vendor", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_EventVendor"),
				new Decor("asset_prop_vendingmachine", "Станционный автомат", "Station vendor", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_VendingMachine"),
				new Decor("asset_prop_vendingmachine_big", "Большой торговый автомат", "Large vending machine", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_VendingMachine_Big"),
				new Decor("asset_prop_upgradeconsole_experimental", "Экспериментальный терминал", "Experimental terminal", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_UpgradeConsole_Experimental"),
				new Decor("asset_prop_upgradeconsole_training", "Учебный терминал", "Training terminal", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_UpgradeConsole_Training"),
				new Decor("asset_prop_upgradeconsole_nodisk", "Терминал без дискеты", "Terminal without disk", Mount.Floor, Shelf.Electronics, null, "Prop_UpgradeConsole_NoDisk"),
				new Decor("asset_prop_upgradeconsole_screenanddisk", "Терминал с дисководом", "Disk and screen terminal", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_UpgradeConsole_ScreenAndDisk"),
				new Decor("asset_prop_radio_artifact", "Радио-артефакт", "Artifact radio", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_Radio_Artifact"),
				new Decor("asset_prop_pa_ground", "Громкоговоритель", "PA speaker", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_PA_Ground"),
				new Decor("asset_l_lamppost", "Фонарный столб", "Lamp post", Mount.Floor, Shelf.Electronics, null, "L_LampPost"),
				new Decor("asset_l_lightpost_01", "Станционный фонарь", "Station light post", Mount.Floor, Shelf.Electronics, null, "L_Lightpost_01"),
				new Decor("asset_prop_woowoopole", "Сигнальная стойка", "Signal pole", Mount.Floor, Shelf.Electronics, null, "Prop_WooWooPole"),
				new Decor("asset_l_radome", "Радиопрозрачный купол", "Radome", Mount.Floor, Shelf.Electronics, null, "L_Radome"),
				new Decor("asset_l_antennae_02", "Антенна", "Antenna", Mount.Floor, Shelf.Electronics, null, "L_Antennae_02"),
				new Decor("asset_prop_rho_artifactdevice_01", "Устройство Ро", "Rho artifact device", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_Rho_ArtifactDevice_01"),
				new Decor("asset_l_control_panel_01", "Панель управления", "Control panel", Mount.Wall, Shelf.Electronics, null, "L_Control_Panel_01"),
				new Decor("asset_l_dooraccessstation", "Панель доступа", "Door access station", Mount.Wall, Shelf.Electronics, null, "L_DoorAccessStation"),
				new Decor("asset_prop_locklight", "Индикатор замка", "Lock light", Mount.Wall, Shelf.Electronics, null, "Prop_LockLight"),
				new Decor("asset_prop_lever_01", "Рычаг 1", "Lever 1", Mount.Wall, Shelf.Electronics, null, "Prop_Lever_01"),
				new Decor("asset_prop_lever_02", "Рычаг 2", "Lever 2", Mount.Wall, Shelf.Electronics, null, "Prop_Lever_02"),
				new Decor("asset_prop_floppy_insert", "Дисковод", "Disk drive", Mount.Wall, Shelf.Electronics, null, "Prop_Floppy_Insert"),
				new Decor("asset_elevator_button_main", "Кнопка лифта", "Elevator button", Mount.Wall, Shelf.Electronics, null, "Elevator_Button_Main"),
				new Decor("asset_l_crane_screen", "Дисплей крана", "Crane display", Mount.Wall, Shelf.Electronics, null, "L_Crane_Screen"),
				new Decor("asset_l_vent_grate", "Решётка вентиляции", "Vent grille", Mount.Wall, Shelf.Electronics, null, "L_Vent_Grate"),
				new Decor("asset_l_sewerdrain_01", "Сливная решётка", "Drain cover", Mount.Wall, Shelf.Electronics, null, "L_SewerDrain_01"),
				new Decor("asset_prop_desklamp_02", "Настольный светильник 2", "Desk fixture 2", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_DeskLamp_02"),
				new Decor("asset_prop_desklamp_03", "Настольный светильник 3", "Desk fixture 3", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_DeskLamp_03"),
				new Decor("asset_prop_desklamp_04", "Настольный светильник 4", "Desk fixture 4", Mount.Floor, Shelf.Electronics, null, null, flat: false, "Prop_DeskLamp_04"),
				new Decor("asset_prop_button_01", "Промышленная кнопка 1", "Industrial button 1", Mount.Wall, Shelf.Electronics, null, "Prop_Button_01"),
				new Decor("asset_prop_button_02", "Промышленная кнопка 2", "Industrial button 2", Mount.Wall, Shelf.Electronics, null, "Prop_Button_02"),
				new Decor("asset_prop_button_03", "Промышленная кнопка 3", "Industrial button 3", Mount.Wall, Shelf.Electronics, null, "Prop_Button_03"),
				new Decor("asset_prop_button_04", "Промышленная кнопка 4", "Industrial button 4", Mount.Wall, Shelf.Electronics, null, "Prop_Button_04"),
				new Decor("asset_prop_light_02", "Станционный светильник 2", "Station light 2", Mount.Wall, Shelf.Electronics, null, "Prop_light_02"),
				new Decor("asset_prop_light_05", "Станционный светильник 5", "Station light 5", Mount.Wall, Shelf.Electronics, null, "Prop_light_05"),
				new Decor("asset_prop_light_07", "Станционный светильник 7", "Station light 7", Mount.Wall, Shelf.Electronics, null, "Prop_light_07"),
				new Decor("asset_prop_light_08", "Станционный светильник 8", "Station light 8", Mount.Wall, Shelf.Electronics, null, "Prop_light_08"),
				new Decor("asset_l_light_1x2_01", "Светильник 1x2 01", "Light 1x2 01", Mount.Wall, Shelf.Electronics, null, "L_Light_1x2_01"),
				new Decor("asset_l_light_1x2_02", "Светильник 1x2 02", "Light 1x2 02", Mount.Wall, Shelf.Electronics, null, "L_Light_1x2_02"),
				new Decor("asset_l_light_1x2_03", "Светильник 1x2 03", "Light 1x2 03", Mount.Wall, Shelf.Electronics, null, "L_Light_1x2_03"),
				new Decor("asset_l_light_1x2_05", "Светильник 1x2 05", "Light 1x2 05", Mount.Wall, Shelf.Electronics, null, "L_Light_1x2_05"),
				new Decor("asset_l_light_1x2_on", "Светильник 1x2 On", "Light 1x2 On", Mount.Wall, Shelf.Electronics, null, "L_Light_1x2_On"),
				new Decor("asset_l_light_1x2_off", "Светильник 1x2  Off", "Light 1x2  Off", Mount.Wall, Shelf.Electronics, null, "L_Light_1x2__Off"),
				new Decor("asset_l_light_2x2_01", "Светильник 2x2 01", "Light 2x2 01", Mount.Wall, Shelf.Electronics, null, "L_Light_2x2_01"),
				new Decor("asset_l_light_2x2_02", "Светильник 2x2 02", "Light 2x2 02", Mount.Wall, Shelf.Electronics, null, "L_Light_2x2_02"),
				new Decor("asset_l_light_2x2_03", "Светильник 2x2 03", "Light 2x2 03", Mount.Wall, Shelf.Electronics, null, "L_Light_2x2_03"),
				new Decor("asset_l_light_2x2_05", "Светильник 2x2 05", "Light 2x2 05", Mount.Wall, Shelf.Electronics, null, "L_Light_2x2_05"),
				new Decor("asset_l_light_abyss_outpost_1x1", "Светильник Abyss Outpost 1x1", "Light Abyss Outpost 1x1", Mount.Wall, Shelf.Electronics, null, "L_Light_Abyss_Outpost_1x1"),
				new Decor("asset_l_light_chimney_1x2_01_off", "Светильник Chimney 1x2 01 Off", "Light Chimney 1x2 01 Off", Mount.Wall, Shelf.Electronics, null, "L_Light_Chimney_1x2_01_Off"),
				new Decor("asset_l_light_chimney_1x2_01_on", "Светильник Chimney 1x2 01 On", "Light Chimney 1x2 01 On", Mount.Wall, Shelf.Electronics, null, "L_Light_Chimney_1x2_01_On"),
				new Decor("asset_l_light_habitation_1x1_01", "Светильник Habitation 1x1 01", "Light Habitation 1x1 01", Mount.Wall, Shelf.Electronics, null, "L_Light_Habitation_1x1_01"),
				new Decor("asset_l_light_habitation_1x1_red", "Светильник Habitation 1x1 Red", "Light Habitation 1x1 Red", Mount.Wall, Shelf.Electronics, null, "L_Light_Habitation_1x1_Red"),
				new Decor("asset_l_light_habitation_1x2_01_off", "Светильник Habitation 1x2 01 Off", "Light Habitation 1x2 01 Off", Mount.Wall, Shelf.Electronics, null, "L_Light_Habitation_1x2_01_Off"),
				new Decor("asset_l_light_habitation_1x2_01_on", "Светильник Habitation 1x2 01 On", "Light Habitation 1x2 01 On", Mount.Wall, Shelf.Electronics, null, "L_Light_Habitation_1x2_01_On"),
				new Decor("asset_l_blackboard", "Доска для записей", "Blackboard", Mount.Wall, Shelf.Props, null, "L_Blackboard"),
				new Decor("asset_rho_banner_01", "Знамя Ро", "Rho banner", Mount.Wall, Shelf.Props, null, "Rho_Banner_01"),
				new Decor("asset_l_rhotrianglebanners_01", "Треугольные флаги Ро", "Rho pennants", Mount.Wall, Shelf.Props, null, "L_RhoTriangleBanners_01"),
				new Decor("asset_poster_64x64_01_dm", "Плакат «Эмблема»", "Poster · 01 dm", Mount.Wall, Shelf.Props, null, null, flat: false, "poster-64x64-01-dm"),
				new Decor("asset_poster_64x64_01_hanginthere", "Плакат «Держись»", "Poster · 01 hanginthere", Mount.Wall, Shelf.Props, null, null, flat: false, "poster-64x64-01-hanginthere"),
				new Decor("asset_poster_64x64_01_landscape", "Плакат «Пейзаж»", "Poster · 01 landscape", Mount.Wall, Shelf.Props, null, null, flat: false, "poster-64x64-01-landscape"),
				new Decor("asset_poster_64x64_01_photos", "Плакат «Фотографии»", "Poster · 01 photos", Mount.Wall, Shelf.Props, null, null, flat: false, "poster-64x64-01-photos"),
				new Decor("asset_poster_64x64_02_futureproducts", "Плакат «Продукция будущего»", "Poster · 02 futureproducts", Mount.Wall, Shelf.Props, null, null, flat: false, "poster-64x64-02-futureproducts"),
				new Decor("asset_poster_64x64_02_products", "Плакат «Каталог продукции»", "Poster · 02 products", Mount.Wall, Shelf.Props, null, null, flat: false, "poster-64x64-02-products"),
				new Decor("asset_poster_64x64_03_scientist", "Плакат «Учёный»", "Poster · 03 scientist", Mount.Wall, Shelf.Props, null, null, flat: false, "poster-64x64-03-scientist"),
				new Decor("asset_poster_64x64_04_scientist2", "Плакат «Учёный 2»", "Poster · 04 scientist2", Mount.Wall, Shelf.Props, null, null, flat: false, "poster-64x64-04-scientist2"),
				new Decor("asset_poster_64x64_06_landscape", "Плакат «Панорама»", "Poster · 06 landscape", Mount.Wall, Shelf.Props, null, null, flat: false, "poster-64x64-06-landscape"),
				new Decor("asset_poster_64x64_staycalm", "Плакат «Сохраняй спокойствие»", "Poster · staycalm", Mount.Wall, Shelf.Props, null, null, flat: false, "poster-64x64-staycalm"),
				new Decor("asset_present_02", "Игровой подарок 2", "Holiday present 2", Mount.Floor, Shelf.Winter, null, "Present_02"),
				new Decor("asset_present_03", "Игровой подарок 3", "Holiday present 3", Mount.Floor, Shelf.Winter, null, "Present_03"),
				new Decor("asset_present_04", "Игровой подарок 4", "Holiday present 4", Mount.Floor, Shelf.Winter, null, "Present_04"),
				new Decor("asset_present_05", "Игровой подарок 5", "Holiday present 5", Mount.Floor, Shelf.Winter, null, "Present_05"),
				new Decor("asset_present_06", "Игровой подарок 6", "Holiday present 6", Mount.Floor, Shelf.Winter, null, "Present_06"),
				new Decor("asset_present_07", "Игровой подарок 7", "Holiday present 7", Mount.Floor, Shelf.Winter, null, "Present_07"),
				new Decor("asset_present_08", "Игровой подарок 8", "Holiday present 8", Mount.Floor, Shelf.Winter, null, "Present_08"),
				new Decor("asset_present_09", "Игровой подарок 9", "Holiday present 9", Mount.Floor, Shelf.Winter, null, "Present_09"),
				new Decor("asset_present_10", "Игровой подарок 10", "Holiday present 10", Mount.Floor, Shelf.Winter, null, "Present_10"),
				new Decor("asset_stocking_01", "Рождественский носок 1", "Christmas stocking 1", Mount.Wall, Shelf.Winter, null, "Stocking_01"),
				new Decor("asset_stocking_02", "Рождественский носок 2", "Christmas stocking 2", Mount.Wall, Shelf.Winter, null, "Stocking_02"),
				new Decor("asset_slug_grub_christmas_hat", "Рождественский колпак", "Christmas hat", Mount.Floor, Shelf.Winter, null, "Slug_grub_christmas_hat"),
				new Decor("asset_smallplantpot_02", "Малый горшок 2", "Small pot 2", Mount.Floor, Shelf.Plants, null, null, flat: false, "SmallPlantPot_02", supportTop: false, 0f, pot: true),
				new Decor("asset_smallplantpot_03", "Малый горшок 3", "Small pot 3", Mount.Floor, Shelf.Plants, null, null, flat: false, "SmallPlantPot_03", supportTop: false, 0f, pot: true),
				new Decor("asset_smallplantpot_04", "Малый горшок 4", "Small pot 4", Mount.Floor, Shelf.Plants, null, null, flat: false, "SmallPlantPot_04", supportTop: false, 0f, pot: true),
				new Decor("asset_prop_tallplantpot_03", "Высокий горшок 3", "Tall pot 3", Mount.Floor, Shelf.Plants, null, null, flat: false, "Prop_TallPlantpot_03", supportTop: false, 0f, pot: true),
				new Decor("asset_l_bigtree_01", "Большое дерево 01", "BigTree 01", Mount.Floor, Shelf.Plants, null, "L_BigTree_01"),
				new Decor("asset_l_bigtree_01_pipeworks", "Большое дерево 01 Трубопровод", "BigTree 01 Pipeworks", Mount.Floor, Shelf.Plants, null, "L_BigTree_01_Pipeworks"),
				new Decor("asset_l_bigtree_02", "Большое дерево 02", "BigTree 02", Mount.Floor, Shelf.Plants, null, "L_BigTree_02"),
				new Decor("asset_l_bigtree_02_pipeworks", "Большое дерево 02 Трубопровод", "BigTree 02 Pipeworks", Mount.Floor, Shelf.Plants, null, "L_BigTree_02_Pipeworks"),
				new Decor("asset_l_bigtree_h_01", "Большое дерево H 01", "BigTree H 01", Mount.Floor, Shelf.Plants, null, "L_BigTree_H_01"),
				new Decor("asset_l_bigtree_h_01_pipeworks", "Большое дерево H 01 Трубопровод", "BigTree H 01 Pipeworks", Mount.Floor, Shelf.Plants, null, "L_BigTree_H_01_Pipeworks"),
				new Decor("asset_l_dodecaroot_01", "Додекорут 01", "Dodecaroot 01", Mount.Floor, Shelf.Plants, null, "L_Dodecaroot_01"),
				new Decor("asset_l_dodecaroot_small", "Додекорут малый", "Dodecaroot Small", Mount.Floor, Shelf.Plants, null, "L_Dodecaroot_Small"),
				new Decor("asset_l_medtree_02", "Среднее дерево 02", "MedTree 02", Mount.Floor, Shelf.Plants, null, "L_MedTree_02"),
				new Decor("asset_l_medtree_02_pipeworks", "Среднее дерево 02 Трубопровод", "MedTree 02 Pipeworks", Mount.Floor, Shelf.Plants, null, "L_MedTree_02_Pipeworks"),
				new Decor("asset_l_medtree_03", "Среднее дерево 03", "MedTree 03", Mount.Floor, Shelf.Plants, null, "L_MedTree_03"),
				new Decor("asset_l_metafungus_pod", "Стручок метагриба", "Metafungus Pod", Mount.Floor, Shelf.Plants, null, "L_Metafungus_Pod"),
				new Decor("asset_l_metafungus_pod_01", "Стручок метагриба 01", "Metafungus Pod 01", Mount.Floor, Shelf.Plants, null, "L_Metafungus_Pod_01"),
				new Decor("asset_l_smallbush", "Низкий куст", "SmallBush", Mount.Floor, Shelf.Plants, null, "L_SmallBush"),
				new Decor("asset_l_smalltree_01", "Малое дерево 01", "SmallTree 01", Mount.Floor, Shelf.Plants, null, "L_SmallTree_01"),
				new Decor("asset_l_smalltree_01_pipeworks", "Малое дерево 01 Трубопровод", "SmallTree 01 Pipeworks", Mount.Floor, Shelf.Plants, null, "L_SmallTree_01_Pipeworks"),
				new Decor("asset_l_smalltree_02", "Малое дерево 02", "SmallTree 02", Mount.Floor, Shelf.Plants, null, "L_SmallTree_02"),
				new Decor("asset_l_smalltree_03", "Малое дерево 03", "SmallTree 03", Mount.Floor, Shelf.Plants, null, "L_SmallTree_03"),
				new Decor("asset_l_smalltree_h_01", "Малое дерево H 01", "SmallTree H 01", Mount.Floor, Shelf.Plants, null, "L_SmallTree_H_01"),
				new Decor("asset_l_smalltree_h_01_abyss", "Малое дерево H 01 Бездна", "SmallTree H 01 Abyss", Mount.Floor, Shelf.Plants, null, "L_SmallTree_H_01_Abyss"),
				new Decor("asset_l_smalltree_h_01_pipeworks", "Малое дерево H 01 Трубопровод", "SmallTree H 01 Pipeworks", Mount.Floor, Shelf.Plants, null, "L_SmallTree_H_01_Pipeworks"),
				new Decor("asset_prop_organismcilia_01", "Реснички организма 01", "OrganismCilia 01", Mount.Floor, Shelf.Plants, null, "Prop_OrganismCilia_01"),
				new Decor("asset_prop_organismcilia_02", "Реснички организма 02", "OrganismCilia 02", Mount.Floor, Shelf.Plants, null, "Prop_OrganismCilia_02"),
				new Decor("asset_prop_shroompod_explosive", "Грибной стручок", "Shroompod Explosive", Mount.Floor, Shelf.Plants, null, "Prop_Shroompod_Explosive"),
				new Decor("asset_item_blinkeye", "Моргающий глаз", "Blink Eye", Mount.Floor, Shelf.Props, "Item_BlinkEye"),
				new Decor("asset_item_component", "Деталь", "Component", Mount.Floor, Shelf.Props, "Item_Component"),
				new Decor("asset_item_component_handwheel", "Съёмный маховик", "Loose handwheel", Mount.Floor, Shelf.Props, "Item_Component_Handwheel"),
				new Decor("asset_item_floppy_t1_notes", "Дискета с заметками", "Notes disk", Mount.Floor, Shelf.Props, "Item_Floppy_T1_Notes"),
				new Decor("asset_item_floppy_t1_randomitem", "Служебная дискета T1", "T1 item disk", Mount.Floor, Shelf.Props, "Item_Floppy_T1_RandomItem"),
				new Decor("asset_item_floppy_variant", "Особая дискета", "Variant disk", Mount.Floor, Shelf.Props, "Item_Floppy_Variant"),
				new Decor("asset_item_food_meat", "Кусок мяса", "Meat", Mount.Floor, Shelf.Table, "Item_Food_Meat")
			};
			int num = items.Length;
			Decor[] array2 = PosterPresets();
			int num2 = Array.FindIndex(array, (Decor d) => PosterFrame.IsPoster(d));
			Array.Resize(ref items, num + array.Length + array2.Length);
			Array.Copy(array, 0, items, num, num2);
			array2.CopyTo(items, num + num2);
			Array.Copy(array, num2, items, num + num2 + array2.Length, array.Length - num2);
		}

		internal static bool Matches(string id, string ru, string en, string query)
		{
			if (string.IsNullOrWhiteSpace(query))
			{
				return true;
			}
			string text = (ru + " " + en + " " + id.Replace('_', ' ')).ToLowerInvariant().Replace('ё', 'е');
			if (id.StartsWith("image_", StringComparison.Ordinal))
			{
				text += " свой плакат свои плакаты custom poster imported image";
			}
			if (id == "candles")
			{
				text += " свеча свечу свечка свечки свечку свечей candle wax wick";
			}
			string[] array = query.ToLowerInvariant().Replace('ё', 'е').Split(new char[2] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
			foreach (string value in array)
			{
				if (text.IndexOf(value, StringComparison.Ordinal) < 0)
				{
					return false;
				}
			}
			return true;
		}

		internal static bool Visible(Decor d, Shelf shelf, string query)
		{
			if (!d.Placeable)
			{
				return false;
			}
			if (string.IsNullOrWhiteSpace(query))
			{
				return d.OnShelf(shelf);
			}
			if (d.lastQuery != query)
			{
				d.lastQuery = query;
				d.lastMatch = Matches(d.id, d.ru, d.en, query);
			}
			return d.lastMatch;
		}

		internal bool BindGameModels(Action<string> log)
		{
			if (native == null)
			{
				native = new GameVisuals();
			}
			WKAssetDatabase val = CL_AssetManager.baseDatabase;
			if (!Object.op_Implicit((Object)(object)val))
			{
				val = Resources.Load<WKAssetDatabase>("WK_AssetDatabase");
			}
			List<Decor> extra = new List<Decor>();
			if (Object.op_Implicit((Object)(object)val) && val.itemPrefabs != null)
			{
				foreach (GameObject itemPrefab in val.itemPrefabs)
				{
					if (Object.op_Implicit((Object)(object)itemPrefab))
					{
						DiscoverItem(itemPrefab.GetComponent<Item_Object>(), extra);
					}
				}
			}
			if (Object.op_Implicit((Object)(object)val))
			{
				DiscoverTrinkets(val, extra);
			}
			Item_Object[] array = Resources.FindObjectsOfTypeAll<Item_Object>();
			Item_Object[] array2 = array;
			foreach (Item_Object obj in array2)
			{
				DiscoverItem(obj, extra);
			}
			Append(extra);
			lightArt.FindFlame();
			bool result = native.Bind(this, array, log);
			int num = 0;
			int num2 = 0;
			List<string> list = new List<string>();
			Decor[] array3 = items;
			foreach (Decor decor in array3)
			{
				if (decor.Placeable)
				{
					num++;
				}
				if (decor.OnShelf(Shelf.Trinkets))
				{
					if (decor.Placeable)
					{
						num2++;
					}
					else
					{
						list.Add(decor.id);
					}
				}
			}
			string text = "Placeable models: " + num + "; 3D trinkets: " + num2 + "; pending trinkets: " + string.Join(", ", list.ToArray());
			if (text != lastCoverage)
			{
				lastCoverage = text;
				log(text);
			}
			return result;
		}

		internal static string CreatureKind(string key)
		{
			string[] array = key.ToLowerInvariant().Split('_', ' ', '-', '.');
			if (Array.IndexOf(array, "rat") >= 0 || Array.IndexOf(array, "ratking") >= 0)
			{
				return "Rat";
			}
			if (Array.IndexOf(array, "spider") >= 0 || Array.IndexOf(array, "arachnid") >= 0)
			{
				return "Spider";
			}
			if (Array.IndexOf(array, "roach") >= 0)
			{
				return "Roach";
			}
			return null;
		}

		private static Shader Find(params string[] names)
		{
			for (int i = 0; i < names.Length; i++)
			{
				Shader val = Shader.Find(names[i]);
				if (Object.op_Implicit((Object)(object)val) && val.isSupported)
				{
					return val;
				}
			}
			throw new InvalidOperationException("Decoration shader unavailable");
		}

		internal void Initialize()
		{
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Expected O, but got Unknown
			//IL_008b: Expected O, but got Unknown
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Expected O, but got Unknown
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Expected O, but got Unknown
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			Shader val = (Object.op_Implicit((Object)(object)GraphicsSettings.currentRenderPipeline) ? Find("Universal Render Pipeline/Lit", "Sprites/Default", "Unlit/Color") : Find("Standard", "Legacy Shaders/Diffuse", "Sprites/Default", "Unlit/Color"));
			Color val2 = default(Color);
			for (int i = 0; i < palette.Length; i++)
			{
				ColorUtility.TryParseHtmlString("#" + colors[i], ref val2);
				Material[] array = palette;
				int num = i;
				Material val3 = new Material(val);
				Material val4 = val3;
				array[num] = val3;
				Material val5 = val4;
				val5.color = val2;
				if (val5.HasProperty("_BaseColor"))
				{
					val5.SetColor("_BaseColor", val2);
				}
			}
			Shader val6 = Find("Sprites/Default", "Legacy Shaders/Transparent/Diffuse", "Unlit/Color");
			green = new Material(val6)
			{
				color = new Color(0.15f, 1f, 0.43f, 0.55f)
			};
			red = new Material(val6)
			{
				color = new Color(1f, 0.16f, 0.16f, 0.55f)
			};
			Decor[] array2 = items;
			foreach (Decor decor in array2)
			{
				if (decor.posterPreset >= 0)
				{
					MakePreset(decor);
				}
				else if (decor.LegacyOnly)
				{
					ReadModel(decor);
				}
				byID.Add(decor.id, decor);
				RememberSource(decor);
			}
		}

		private static Stream Resource(string name)
		{
			return Assembly.GetExecutingAssembly().GetManifestResourceStream("decor." + name) ?? throw new FileNotFoundException(name);
		}

		private void ReadModel(Decor d)
		{
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Expected O, but got Unknown
			//IL_00cc: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			List<Vector3> list = new List<Vector3>();
			SortedDictionary<int, List<int>> sortedDictionary = new SortedDictionary<int, List<int>>();
			using (BinaryReader binaryReader = new BinaryReader(Resource(d.id + ".meshbin")))
			{
				int num = binaryReader.ReadInt32();
				for (int i = 0; i < num; i++)
				{
					int key = binaryReader.ReadByte();
					if (!sortedDictionary.TryGetValue(key, out var value))
					{
						sortedDictionary.Add(key, value = new List<int>());
					}
					for (int j = 0; j < 3; j++)
					{
						value.Add(list.Count);
						list.Add(new Vector3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle()));
					}
				}
			}
			Mesh val = new Mesh
			{
				name = d.en
			};
			Mesh val2 = val;
			d.mesh = val;
			Mesh val3 = val2;
			val3.SetVertices(list);
			val3.subMeshCount = sortedDictionary.Count;
			d.materials = (Material[])(object)new Material[sortedDictionary.Count];
			int num2 = 0;
			foreach (KeyValuePair<int, List<int>> item in sortedDictionary)
			{
				val3.SetTriangles(item.Value, num2);
				d.materials[num2++] = palette[item.Key];
			}
			val3.RecalculateNormals();
			val3.RecalculateBounds();
			d.bounds = val3.bounds;
		}

		internal GameObject Make(Decor d, Transform parent, bool ghost = false)
		{
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Expected O, but got Unknown
			if (Object.op_Implicit((Object)(object)d.template))
			{
				GameObject obj = Object.Instantiate<GameObject>(d.template, parent, false);
				((Object)obj).name = (ghost ? "Placement preview" : d.en);
				return obj;
			}
			if (!d.LegacyOnly || !Object.op_Implicit((Object)(object)d.mesh))
			{
				throw new InvalidOperationException("Game model unavailable: " + d.id);
			}
			GameObject val = new GameObject(ghost ? "Placement preview" : d.en);
			val.transform.SetParent(parent, false);
			val.AddComponent<MeshFilter>().sharedMesh = d.mesh;
			((Renderer)val.AddComponent<MeshRenderer>()).sharedMaterials = d.materials;
			return val;
		}

		internal void Tint(Renderer[] renderers, bool valid)
		{
			foreach (Renderer val in renderers)
			{
				Material[] sharedMaterials = val.sharedMaterials;
				for (int j = 0; j < sharedMaterials.Length; j++)
				{
					sharedMaterials[j] = (valid ? green : red);
				}
				val.sharedMaterials = sharedMaterials;
				val.shadowCastingMode = (ShadowCastingMode)0;
				val.receiveShadows = false;
			}
		}

		internal void RenderNext(Shelf shelf, int page, string query, Action<string> log)
		{
			int num = 0;
			Decor[] array = items;
			foreach (Decor decor in array)
			{
				if (Visible(decor, shelf, query) && num++ / 8 == page && Object.op_Implicit((Object)(object)decor.template) && !Object.op_Implicit((Object)(object)decor.icon) && !(Time.unscaledTime < decor.previewRetry))
				{
					decor.previewRetry = Time.unscaledTime + 15f;
					try
					{
						decor.icon = ModelPortrait.Render(decor);
						break;
					}
					catch (Exception ex)
					{
						decor.previewFailed = true;
						log("Catalog preview " + decor.id + ": " + ex.Message);
						break;
					}
				}
			}
		}

		public void Dispose()
		{
			lightArt.Dispose();
			surfaces.Dispose();
			native?.Dispose();
			Decor[] array = items;
			foreach (Decor obj in array)
			{
				Object.Destroy((Object)(object)obj.mesh);
				Object.Destroy((Object)(object)obj.icon);
			}
			Material[] array2 = palette;
			for (int i = 0; i < array2.Length; i++)
			{
				Object.Destroy((Object)(object)array2[i]);
			}
			Object.Destroy((Object)(object)green);
			Object.Destroy((Object)(object)red);
		}

		internal static string AssetName(string raw)
		{
			if (string.IsNullOrEmpty(raw))
			{
				return "";
			}
			if (!raw.EndsWith("(Clone)", StringComparison.Ordinal))
			{
				return raw.Trim();
			}
			return raw.Substring(0, raw.Length - "(Clone)".Length).TrimEnd();
		}

		internal static string ItemKey(string prefab, string obj)
		{
			string text = AssetName(obj);
			if (IsTrinketItem(text) || string.IsNullOrWhiteSpace(prefab))
			{
				return text;
			}
			return AssetName(prefab);
		}

		internal static bool PickableAsset(string key)
		{
			string text = AssetName(key);
			if (text.Length > 0 && !text.Equals("Item_Temp", StringComparison.OrdinalIgnoreCase) && !text.Equals("Item_Trinket_Base", StringComparison.OrdinalIgnoreCase) && !text.EndsWith("_Dev", StringComparison.OrdinalIgnoreCase))
			{
				return !text.EndsWith("_Test", StringComparison.OrdinalIgnoreCase);
			}
			return false;
		}

		internal static bool PropAsset(string name)
		{
			if (string.IsNullOrEmpty(name))
			{
				return false;
			}
			if (name.Length < 5)
			{
				return false;
			}
			bool flag = false;
			string[] array = propPrefixes;
			int i;
			for (i = 0; i < array.Length; i++)
			{
				string value = array[i];
				if (name.StartsWith(value, StringComparison.OrdinalIgnoreCase))
				{
					flag = true;
					break;
				}
			}
			if (!flag || name.Contains(":") || name.Contains("("))
			{
				return false;
			}
			int num = name.LastIndexOf('.');
			if (num >= 0 && int.TryParse(name.Substring(num + 1), out i))
			{
				return false;
			}
			array = name.Split('_', ' ', '-');
			foreach (string item in array)
			{
				if (technicalParts.Contains(item))
				{
					return false;
				}
			}
			return true;
		}

		private static string PropLabel(string key)
		{
			int num = key.IndexOf('_');
			string obj = ((num < 0) ? key : key.Substring(num + 1));
			StringBuilder stringBuilder = new StringBuilder();
			string text = obj;
			foreach (char c in text)
			{
				if (c == '_' || c == '-')
				{
					stringBuilder.Append(' ');
					continue;
				}
				if (stringBuilder.Length > 0 && char.IsLower(stringBuilder[stringBuilder.Length - 1]) && char.IsUpper(c))
				{
					stringBuilder.Append(' ');
				}
				stringBuilder.Append(c);
			}
			return stringBuilder.ToString();
		}

		private void RememberSource(Decor d)
		{
			if (d.sceneObject != null)
			{
				sceneNames.Add(d.sceneObject);
			}
			if (d.sceneMesh != null)
			{
				sceneNames.Add(d.sceneMesh);
			}
			if (d.prefab != null)
			{
				sceneNames.Add(d.prefab);
				if (!sourceItems.ContainsKey(d.prefab))
				{
					sourceItems.Add(d.prefab, d);
				}
			}
		}

		internal void AddSceneProp(string name, List<Decor> extra)
		{
			if (PropAsset(name) && sceneNames.Add(name))
			{
				string text = PropLabel(name);
				string text2 = "wk_prop_" + name.ToLowerInvariant();
				if (!byID.ContainsKey(text2))
				{
					bool flag = name.StartsWith("poster-", StringComparison.OrdinalIgnoreCase);
					Decor decor = new Decor(text2, text, text, flag ? Mount.Wall : Mount.Floor, Shelf.Props, null, name, flat: false, name);
					byID.Add(text2, decor);
					extra.Add(decor);
				}
			}
		}

		private void DiscoverItem(Item_Object obj, List<Decor> extra)
		{
			if (!Object.op_Implicit((Object)(object)obj) || obj.itemData == null)
			{
				return;
			}
			Item itemData = obj.itemData;
			string text = AssetName(((Object)obj).name);
			string text2 = ItemKey(itemData.prefabName, text);
			if (!PickableAsset(text2))
			{
				return;
			}
			if (IsTrinketItem(text2) || IsTrinketItem(text) || HasTrinketTag(itemData))
			{
				AddTrinketItem(obj, extra);
			}
			else
			{
				if (sourceItems.ContainsKey(text2) || sourceItems.ContainsKey(text))
				{
					return;
				}
				HandItem handItemAsset = itemData.handItemAsset;
				bool flag = handItemAsset is HandItem_Melee || handItemAsset is HandItem_Shoot || handItemAsset is HandItem_Scissors || (itemData.executionModules != null && itemData.executionModules.Exists((ItemExecutionModule m) => m is ItemExecutionModule_Grenade));
				string text3 = (flag ? "wk_weapon_" : "wk_item_") + text2.ToLowerInvariant();
				if (byID.ContainsKey(text3))
				{
					return;
				}
				string text4 = (string.IsNullOrWhiteSpace(itemData.itemName) ? PropLabel(text2) : itemData.itemName);
				string text5 = CreatureKind(text2 + "_" + text);
				if (text5 == "Roach" || (text5 == null && text4.IndexOf("roach", StringComparison.OrdinalIgnoreCase) >= 0))
				{
					Renderer[] componentsInChildren = ((Component)obj).GetComponentsInChildren<Renderer>(true);
					foreach (Renderer val in componentsInChildren)
					{
						SkinnedMeshRenderer val2 = (SkinnedMeshRenderer)(object)((val is SkinnedMeshRenderer) ? val : null);
						object obj2;
						if (val2 == null)
						{
							MeshFilter component = ((Component)val).GetComponent<MeshFilter>();
							obj2 = ((component != null) ? component.sharedMesh : null);
						}
						else
						{
							obj2 = val2.sharedMesh;
						}
						Mesh val3 = (Mesh)obj2;
						string text6 = (Object.op_Implicit((Object)(object)val3) ? CreatureKind(((Object)val3).name) : null);
						switch (text6)
						{
						case "Rat":
						case "Spider":
							break;
						default:
							text5 = text6;
							continue;
						case null:
							continue;
						}
						text5 = text6;
						break;
					}
					if (text5 == null)
					{
						text5 = "Roach";
					}
				}
				string ru = ((text5 == "Rat") ? "Крыса" : ((text5 == "Spider") ? "Паук" : text4));
				string en = ((text5 == "Rat" || text5 == "Spider") ? text5 : text4);
				Decor decor = new Decor(text3, ru, en, Mount.Floor, (flag && text5 == null) ? Shelf.Weapons : Shelf.Props, text2);
				RememberSource(decor);
				byID.Add(text3, decor);
				extra.Add(decor);
			}
		}

		private static bool HasTrinketTag(Item item)
		{
			if (!string.Equals(item.itemTag, "trinket", StringComparison.OrdinalIgnoreCase))
			{
				if (item.itemTags != null)
				{
					return item.itemTags.Exists((string t) => string.Equals(t, "trinket", StringComparison.OrdinalIgnoreCase));
				}
				return false;
			}
			return true;
		}

		internal Decor Get(string id)
		{
			if (string.IsNullOrEmpty(id))
			{
				return null;
			}
			if (byID.TryGetValue(id, out var value))
			{
				return value;
			}
			if (id.StartsWith("wk_weapon_", StringComparison.Ordinal))
			{
				sourceItems.TryGetValue(id.Substring("wk_weapon_".Length), out value);
			}
			else if (id.StartsWith("wk_item_", StringComparison.Ordinal))
			{
				sourceItems.TryGetValue(id.Substring("wk_item_".Length), out value);
			}
			else if (id.StartsWith("wk_prop_", StringComparison.Ordinal))
			{
				string key = id.Substring("wk_prop_".Length);
				return Array.Find(items, (Decor e) => string.Equals(e.sceneMesh, key, StringComparison.OrdinalIgnoreCase) || string.Equals(e.sceneObject, key, StringComparison.OrdinalIgnoreCase));
			}
			return value;
		}

		internal void Append(List<Decor> extra)
		{
			if (extra.Count != 0)
			{
				extra.Sort((Decor a, Decor b) => StringComparer.Ordinal.Compare(a.id, b.id));
				int num = items.Length;
				Array.Resize(ref items, num + extra.Count);
				extra.CopyTo(items, num);
			}
		}

		internal static bool ImageExtension(string path)
		{
			string text = Path.GetExtension(path).ToLowerInvariant();
			if (!(text == ".png") && !(text == ".jpg"))
			{
				return text == ".jpeg";
			}
			return true;
		}

		internal static bool ImageSize(byte[] b, out int width, out int height)
		{
			width = (height = 0);
			if (b.Length >= 24 && b[0] == 137 && b[1] == 80 && b[2] == 78 && b[3] == 71 && b[4] == 13 && b[5] == 10 && b[6] == 26 && b[7] == 10 && b[12] == 73 && b[13] == 72 && b[14] == 68 && b[15] == 82)
			{
				width = (b[16] << 24) | (b[17] << 16) | (b[18] << 8) | b[19];
				height = (b[20] << 24) | (b[21] << 16) | (b[22] << 8) | b[23];
			}
			else if (b.Length >= 4 && b[0] == byte.MaxValue && b[1] == 216)
			{
				int i = 2;
				while (i + 4 <= b.Length && b[i] == byte.MaxValue)
				{
					for (; i < b.Length && b[i] == byte.MaxValue; i++)
					{
					}
					if (i + 3 > b.Length)
					{
						break;
					}
					int num = b[i++];
					switch (num)
					{
					default:
					{
						int num2 = (b[i] << 8) | b[i + 1];
						if (num2 >= 2 && i + num2 <= b.Length)
						{
							if (num < 192 || num > 207 || num == 196 || num == 200 || num == 204 || num2 < 8)
							{
								i += num2;
								continue;
							}
							height = (b[i + 3] << 8) | b[i + 4];
							width = (b[i + 5] << 8) | b[i + 6];
						}
						break;
					}
					case 1:
					case 208:
					case 209:
					case 210:
					case 211:
					case 212:
					case 213:
					case 214:
					case 215:
						continue;
					case 217:
					case 218:
						break;
					}
					break;
				}
			}
			if (width > 0 && height > 0 && width <= 8192 && height <= 8192)
			{
				return (long)width * (long)height <= 16777216;
			}
			return false;
		}

		internal static string StoreImage(string folder, string hash, string name, byte[] bytes)
		{
			string fullName = Directory.CreateDirectory(Path.Combine(folder, hash)).FullName;
			string text = Path.Combine(fullName, Path.GetFileName(name));
			if (File.Exists(text))
			{
				return text;
			}
			string text2 = Path.Combine(fullName, Guid.NewGuid().ToString("N") + ".tmp");
			try
			{
				File.WriteAllBytes(text2, bytes);
				try
				{
					File.Move(text2, text);
				}
				catch (IOException) when (File.Exists(text))
				{
				}
			}
			finally
			{
				if (File.Exists(text2))
				{
					File.Delete(text2);
				}
			}
			return text;
		}

		internal static void WriteCrop(string path, PosterCrop value)
		{
			string text = path + "." + Guid.NewGuid().ToString("N") + ".tmp";
			try
			{
				File.WriteAllText(text, JsonConvert.SerializeObject((object)value));
				if (File.Exists(path))
				{
					File.Replace(text, path, null);
				}
				else
				{
					File.Move(text, path);
				}
			}
			finally
			{
				if (File.Exists(text))
				{
					File.Delete(text);
				}
			}
		}

		internal void RememberCrop(Decor d, PosterCrop crop)
		{
			WriteCrop(Path.Combine(posterFolder, d.id.Substring("image_".Length), "crop.json"), crop);
			d.defaultCrop = crop;
		}

		private static PosterCrop LoadCrop(string path, float aspect)
		{
			if (!File.Exists(path))
			{
				return PosterCrop.Original;
			}
			try
			{
				PosterCrop result = JsonConvert.DeserializeObject<PosterCrop>(File.ReadAllText(path));
				result.Normalize(aspect);
				return result;
			}
			catch (JsonException)
			{
				return PosterCrop.Original;
			}
			catch (IOException)
			{
				return PosterCrop.Original;
			}
			catch (UnauthorizedAccessException)
			{
				return PosterCrop.Original;
			}
		}

		internal Decor ImportPoster(string path, bool save)
		{
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Expected O, but got Unknown
			FileInfo fileInfo = new FileInfo(path);
			if (!ImageExtension(path) || !fileInfo.Exists || fileInfo.Length < 8 || fileInfo.Length > 33554432)
			{
				throw new InvalidDataException();
			}
			byte[] array = File.ReadAllBytes(path);
			if (!ImageSize(array, out var width, out var height))
			{
				throw new InvalidDataException();
			}
			string text;
			using (SHA256 sHA = SHA256.Create())
			{
				text = BitConverter.ToString(sHA.ComputeHash(array)).Replace("-", "").ToLowerInvariant();
			}
			string text2 = "image_" + text;
			if (byID.TryGetValue(text2, out var value))
			{
				return value;
			}
			if (!save && !string.Equals(fileInfo.Directory.Name, text, StringComparison.OrdinalIgnoreCase))
			{
				throw new InvalidDataException();
			}
			Texture2D val = new Texture2D(2, 2, (TextureFormat)4, true);
			try
			{
				if (!ImageConversion.LoadImage(val, array, true) || ((Texture)val).width != width || ((Texture)val).height != height)
				{
					throw new InvalidDataException();
				}
				((Texture)val).wrapMode = (TextureWrapMode)1;
				string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.Name);
				if (save)
				{
					StoreImage(posterFolder, text, fileInfo.Name, array);
				}
				Decor decor = new Decor(text2, fileNameWithoutExtension, fileNameWithoutExtension, Mount.Wall, Shelf.Props, null, null, flat: false, "poster-import");
				if (native == null)
				{
					native = new GameVisuals();
				}
				decor.defaultCrop = LoadCrop(Path.Combine(posterFolder, text, "crop.json"), (float)width / (float)height);
				decor.posterImage = val;
				native.CreatePrint(decor, val);
				val = null;
				byID.Add(text2, decor);
				Append(new List<Decor> { decor });
				return decor;
			}
			finally
			{
				if (Object.op_Implicit((Object)(object)val))
				{
					Object.Destroy((Object)(object)val);
				}
			}
		}

		internal void LoadPosters(Action<string> log)
		{
			if (!Directory.Exists(posterFolder))
			{
				return;
			}
			string[] directories = Directory.GetDirectories(posterFolder);
			foreach (string path in directories)
			{
				if (Path.GetFileName(path).Length != 64)
				{
					continue;
				}
				string[] files = Directory.GetFiles(path);
				foreach (string path2 in files)
				{
					if (ImageExtension(path2))
					{
						try
						{
							ImportPoster(path2, save: false);
						}
						catch (Exception ex)
						{
							log("Poster unavailable: " + Path.GetFileName(path2) + " | " + ex.Message);
							continue;
						}
						break;
					}
				}
			}
		}

		private static Decor[] PosterPresets()
		{
			Decor[] array = new Decor[PosterFrame.Formats.Length];
			for (int i = 0; i < array.Length; i++)
			{
				string text = PosterFrame.Formats[i];
				string text2 = ((i == 0) ? "original" : text.Replace(':', 'x'));
				array[i] = new Decor("custom_poster_" + text2, "Свой плакат · " + ((i == 0) ? "Оригинал" : text), "Custom poster · " + ((i == 0) ? "Original" : text), Mount.Wall, Shelf.Props)
				{
					posterPreset = i
				};
			}
			return array;
		}

		internal static Color32[] CheckerPaper(int width, int height)
		{
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			Color32[] array = (Color32[])(object)new Color32[width * height];
			int num = Math.Max(4, Math.Min(width, height) / 7);
			for (int i = 0; i < height; i++)
			{
				for (int j = 0; j < width; j++)
				{
					int num2 = Math.Min(Math.Min(j, width - 1 - j), Math.Min(i, height - 1 - i));
					byte b = (byte)((num2 < 1) ? 110 : ((num2 < 4) ? 224 : (((j / num + i / num) % 2 == 0) ? 238 : 157)));
					array[i * width + j] = new Color32(b, b, b, byte.MaxValue);
				}
			}
			return array;
		}

		private void MakePreset(Decor d)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Expected O, but got Unknown
			if (native == null)
			{
				native = new GameVisuals();
			}
			float x = PosterFrame.Paper(1f, 1f, d.posterPreset).x;
			int num = Mathf.RoundToInt(144f * Mathf.Min(1f, x));
			int num2 = Mathf.RoundToInt(144f / Mathf.Max(1f, x));
			Texture2D val = new Texture2D(num, num2, (TextureFormat)4, true);
			try
			{
				((Texture)val).wrapMode = (TextureWrapMode)1;
				((Texture)val).filterMode = (FilterMode)0;
				val.SetPixels32(CheckerPaper(num, num2));
				val.Apply(true, true);
				native.CreatePrint(d, val);
			}
			catch
			{
				Object.Destroy((Object)(object)val);
				throw;
			}
		}

		internal static string TrinketKey(string name)
		{
			if (string.IsNullOrEmpty(name))
			{
				return "";
			}
			string text = name.Trim().ToLowerInvariant().Replace("item_tricket_", "")
				.Replace("item_trinket_", "")
				.Replace("trinket_", "")
				.Replace(" ", "")
				.Replace("_", "");
			return text switch
			{
				"goldnugget" => "nugget", 
				"betamax" => "beta", 
				"photo" => "photoofhome", 
				"bagexpander" => "bagupgrade", 
				_ => text, 
			};
		}

		internal static bool IsTrinketItem(string key)
		{
			if (key != null && key.StartsWith("Item_Trinket_", StringComparison.OrdinalIgnoreCase))
			{
				return !key.Equals("Item_Trinket_Base", StringComparison.OrdinalIgnoreCase);
			}
			return false;
		}

		private Decor AddTrinketItem(Item_Object source, List<Decor> extra, string matchedSuffix = null)
		{
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			Item itemData = source.itemData;
			string text = ItemKey(itemData?.prefabName, ((Object)source).name);
			if (!PickableAsset(text) || (matchedSuffix == null && !IsTrinketItem(text) && (itemData == null || !HasTrinketTag(itemData))))
			{
				return null;
			}
			string text2 = matchedSuffix ?? TrinketKey(text);
			string text3 = ((text2 == "moonrock") ? "moonrock" : ("trinket_" + text2));
			if (!IsTrinketItem(text) && sourceItems.TryGetValue(text, out var value))
			{
				text3 = value.id;
			}
			if (!byID.TryGetValue(text3, out var value2))
			{
				string text4 = (string.IsNullOrWhiteSpace(itemData?.itemName) ? PropLabel(text) : itemData.itemName);
				value2 = new Decor(text3, text4, text4, Mount.Floor, Shelf.Trinkets, text, text);
				RememberSource(value2);
				byID.Add(text3, value2);
				extra.Add(value2);
			}
			value2.nativeTrinket = true;
			if (!Object.op_Implicit((Object)(object)value2.trinketSource))
			{
				goto IL_013d;
			}
			Scene scene = ((Component)value2.trinketSource).gameObject.scene;
			if (((Scene)(ref scene)).IsValid())
			{
				scene = ((Component)source).gameObject.scene;
				if (!((Scene)(ref scene)).IsValid())
				{
					goto IL_013d;
				}
			}
			goto IL_0145;
			IL_0145:
			return value2;
			IL_013d:
			value2.trinketSource = source;
			goto IL_0145;
		}

		internal Decor TrinketMesh(string name, List<Decor> extra)
		{
			if (string.IsNullOrEmpty(name))
			{
				return null;
			}
			string text = name;
			int num = text.LastIndexOf('.');
			if (num > 0 && int.TryParse(text.Substring(num + 1), out var _))
			{
				text = text.Substring(0, num);
			}
			if ((!IsTrinketItem(text) && !text.StartsWith("Item_Tricket_", StringComparison.OrdinalIgnoreCase)) || !PickableAsset(text))
			{
				return null;
			}
			string text2 = TrinketKey(text);
			string text3 = ((text2 == "moonrock") ? "moonrock" : ("trinket_" + text2));
			if (!byID.TryGetValue(text3, out var value))
			{
				string text4 = PropLabel(text.Substring(text.IndexOf('_') + 1));
				value = new Decor(text3, text4, text4, Mount.Floor, Shelf.Trinkets, null, name);
				RememberSource(value);
				byID.Add(text3, value);
				extra.Add(value);
			}
			value.nativeTrinket = true;
			return value;
		}

		private static string MatchedGrant(Item_Object item, string suffix)
		{
			string text = ItemKe