- Crafting UI fully functional - Crafting Stat stones and modular equippable items fully functional Notes: - Urgent need for exclusive(auto sorted) inventory for stones only - Something to do with the "trash" modular items instead of just selling - Add new uses for gold besides equipment, preset items will probably be worthless with modular crafting
45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using Kryz.CharacterStats.Examples;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[System.Serializable]
|
|
public class ItemInstance
|
|
{
|
|
public string ItemName;
|
|
public Sprite Icon;
|
|
public int sellPricePlayer;
|
|
public int sellPriceVendor;
|
|
public string description;
|
|
public int templateIndex;
|
|
|
|
public ItemInstance()
|
|
{
|
|
ItemName = "";
|
|
Icon = null;
|
|
sellPricePlayer = 0;
|
|
sellPriceVendor = 0;
|
|
description = "";
|
|
templateIndex = 0;
|
|
}
|
|
public ItemInstance(Item template)
|
|
{
|
|
ItemName = template.ItemName;
|
|
Icon = template.Icon;
|
|
sellPricePlayer = template.sellPricePlayer;
|
|
sellPriceVendor = template.sellPriceVendor;
|
|
description = template.description;
|
|
templateIndex = ItemIndexer.Instance.Items.IndexOf(template);
|
|
}
|
|
|
|
public ItemInstance(Item template, int templateIndex)
|
|
{
|
|
ItemName = template.ItemName;
|
|
Icon = template.Icon;
|
|
sellPricePlayer = template.sellPricePlayer;
|
|
sellPriceVendor = template.sellPriceVendor;
|
|
description = template.description;
|
|
this.templateIndex = templateIndex;
|
|
}
|
|
} |