2025-08-06 17:20:11 +02:00
|
|
|
using Godot;
|
|
|
|
|
namespace Babushka.scripts.CSharp.Common.Inventory;
|
2025-03-25 19:39:00 +01:00
|
|
|
|
2025-08-06 17:20:11 +02:00
|
|
|
// Do not instantiate this resource
|
|
|
|
|
// But it has to be a resource because Godot
|
|
|
|
|
[GlobalClass]
|
|
|
|
|
public partial class ItemInstance: Resource
|
2025-03-25 19:39:00 +01:00
|
|
|
{
|
2025-08-06 17:20:11 +02:00
|
|
|
[Export] public ItemResource blueprint;
|
|
|
|
|
[Export] public int amount = 1;
|
2025-04-17 16:10:12 +02:00
|
|
|
|
|
|
|
|
public ItemInstance Clone()
|
|
|
|
|
{
|
|
|
|
|
return new ItemInstance
|
|
|
|
|
{
|
|
|
|
|
blueprint = blueprint,
|
|
|
|
|
amount = amount
|
|
|
|
|
};
|
|
|
|
|
}
|
2025-03-25 19:39:00 +01:00
|
|
|
}
|