projectEli/Assets/Inventory System/Scripts/Inventory/InventorySystemPreferences.cs

88 lines
1.8 KiB
C#
Raw Permalink Normal View History

using System;
using System.Collections;
using System.Collections.Generic;
2023-03-15 11:43:15 +00:00
using System.Text.RegularExpressions;
using UnityEngine;
namespace SimpleInventorySystem
{
public enum ItemTags
{
Any,
Helmet,
Headset,
Glasses,
FaceCover,
Plate,
Weapon,
Sidearm,
MeleeWeapon,
TacticalRig,
TacticalRigAttachment,
MedPouch,
Backpack,
Pouch1x1,
Pouch2x1,
Pouch3x1,
Pouch2x2,
BodyArmor,
PlateCarrier,
HeavyAmmunition,
MediumAmmunition,
LightAmmunition,
ShotgunRounds,
Ammo
}
2023-03-15 11:43:15 +00:00
public enum ItemCategory
{
Gear,
Ammo
2023-03-15 11:43:15 +00:00
}
public enum ItemSubCategory
{
PlateCarriers,
TacticalRig,
Backpack,
2023-03-15 11:43:15 +00:00
}
public enum RarityType
{
Common,
2023-01-05 02:11:52 +00:00
Uncommon,
Rare,
Epic,
Legendary
}
[Serializable]
public class Rarity
{
public RarityType rarityType;
public Color color;
}
public class InventorySystemPreferences
{
// This class is simply there for convenience. The bulk of this file will contain elements that the game developer or programmer can modify to extend their game.
2023-03-15 11:43:15 +00:00
public static Dictionary<ItemCategory, ItemSubCategory> ItemCategorySubcategoryMapping = new Dictionary<ItemCategory, ItemSubCategory>()
{
{ ItemCategory.Gear, ItemSubCategory.PlateCarriers }
};
public static string SeparateWords(string input)
{
string output = input;
//Regex.Replace(output, "(\\B[A-Z])", " $1");
Regex.Replace(output, "(\\B[A-Z0-9])", " $1");
return output;
}
}
}