2026-06-13 04:56:50 +01:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2020-12-22 03:13:43 +00:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
|
|
using System;
|
2020-03-22 19:05:26 +00:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using Unity.Mathematics;
|
|
|
|
|
using static Unity.Mathematics.math;
|
|
|
|
|
|
2020-12-10 23:20:38 +00:00
|
|
|
public abstract class ItemInstance
|
2020-03-22 19:05:26 +00:00
|
|
|
{
|
2026-06-14 11:40:28 +01:00
|
|
|
public RuntimeItemDefinitionReference Reference;
|
2026-06-13 11:03:30 +01:00
|
|
|
public ItemRotation Rotation;
|
2026-06-14 11:19:27 +01:00
|
|
|
|
2026-06-14 11:40:28 +01:00
|
|
|
public Guid ItemId => Reference?.ItemId ?? Guid.Empty;
|
2020-03-22 19:05:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public abstract class CraftedItemInstance : ItemInstance
|
|
|
|
|
{
|
2026-06-13 11:03:30 +01:00
|
|
|
public float Quality;
|
2020-03-22 19:05:26 +00:00
|
|
|
}
|
|
|
|
|
|
2020-12-10 23:20:38 +00:00
|
|
|
public class CompoundCommodity : CraftedItemInstance { }
|
2020-03-22 19:05:26 +00:00
|
|
|
|
|
|
|
|
public class SimpleCommodity : ItemInstance
|
|
|
|
|
{
|
2026-06-13 11:03:30 +01:00
|
|
|
public int Quantity;
|
2020-03-22 19:05:26 +00:00
|
|
|
}
|
|
|
|
|
|
2020-12-10 23:20:38 +00:00
|
|
|
public class EquippableItem : CraftedItemInstance
|
2020-03-22 19:05:26 +00:00
|
|
|
{
|
2026-06-13 11:03:30 +01:00
|
|
|
public float Durability;
|
|
|
|
|
public bool OverrideShutdown;
|
2021-04-18 05:13:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ConsumableItem : CraftedItemInstance
|
|
|
|
|
{
|
2026-06-13 11:03:30 +01:00
|
|
|
}
|