Inventory Events
Added an event system allowing the UI to subscribe to changes in entity cargo, hardpoints or on specific items Fixed bugs in colony tab caused by recent refactoring
This commit is contained in:
parent
d8d542f438
commit
39ce6809c0
11 changed files with 370 additions and 249 deletions
|
|
@ -55,9 +55,16 @@ public class SimpleCommodity : ItemInstance
|
|||
}
|
||||
|
||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||
public class Gear : CraftedItemInstance
|
||||
public class Gear : CraftedItemInstance, IDynamicProperties
|
||||
{
|
||||
[JsonProperty("durability"), Key(7)] public float Durability;
|
||||
|
||||
public EquippableItemData ItemData => Context.GetData(this);
|
||||
|
||||
public event Action OnChanged;
|
||||
|
||||
public void Change()
|
||||
{
|
||||
OnChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue