Unstable 1.1.14.0

This commit is contained in:
Markus Isberg
2023-10-02 16:43:54 +03:00
parent 94f5a93a0c
commit cf8f0de659
606 changed files with 21906 additions and 11456 deletions
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Barotrauma.Items.Components;
using Barotrauma.Networking;
using Microsoft.Xna.Framework;
@@ -20,9 +22,10 @@ namespace Barotrauma
ApplyStatusEffect = 7,
Upgrade = 8,
ItemStat = 9,
DroppedStack = 10,
MinValue = 0,
MaxValue = 9
MaxValue = 10
}
public interface IEventData : NetEntityEvent.IData
@@ -47,10 +50,12 @@ namespace Barotrauma
{
public EventType EventType => EventType.InventoryState;
public readonly ItemContainer Component;
public readonly Range SlotRange;
public InventoryStateEventData(ItemContainer component)
public InventoryStateEventData(ItemContainer component, Range slotRange)
{
Component = component;
SlotRange = slotRange;
}
}
@@ -62,6 +67,10 @@ namespace Barotrauma
public ChangePropertyEventData(SerializableProperty serializableProperty, ISerializableEntity entity)
{
if (serializableProperty.GetAttribute<Editable>() == null)
{
DebugConsole.ThrowError($"Attempted to create {nameof(ChangePropertyEventData)} for the non-editable property {serializableProperty.Name}.");
}
SerializableProperty = serializableProperty;
Entity = entity;
}
@@ -94,6 +103,13 @@ namespace Barotrauma
private readonly struct AssignCampaignInteractionEventData : IEventData
{
public EventType EventType => EventType.AssignCampaignInteraction;
public readonly ImmutableArray<Client> TargetClients;
public AssignCampaignInteractionEventData(IEnumerable<Client> targetClients)
{
TargetClients = (targetClients ?? Enumerable.Empty<Client>()).ToImmutableArray();
}
}
public readonly struct ApplyStatusEffectEventData : IEventData