explicit interface go brrrr
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Content.Client.GameObjects.Components.Body
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool CanDrop(CanDropEventArgs args)
|
||||
bool IDraggable.CanDrop(CanDropEventArgs args)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Content.Client.GameObjects.Components
|
||||
|
||||
public static DirBoundData Default { get; } = new();
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref All, "all", default);
|
||||
serializer.DataField(ref North, "north", default);
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace Content.Client.GameObjects.Components.Items
|
||||
return args.Target.HasComponent<DisposalUnitComponent>();
|
||||
}
|
||||
|
||||
public bool Drop(DragDropEventArgs args)
|
||||
bool IDraggable.Drop(DragDropEventArgs args)
|
||||
{
|
||||
// TODO: Shared item class
|
||||
return false;
|
||||
|
||||
@@ -16,6 +16,8 @@ using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Reflection;
|
||||
using Robust.Shared.Timing;
|
||||
using System;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.IntegrationTests.Tests.Networking
|
||||
{
|
||||
@@ -415,6 +417,7 @@ namespace Content.IntegrationTests.Tests.Networking
|
||||
return new PredictionComponentState(Foo);
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
private sealed class PredictionComponentState : ComponentState
|
||||
{
|
||||
public bool Foo { get; }
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Utility;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Actions
|
||||
@@ -15,7 +16,7 @@ namespace Content.Server.Actions
|
||||
public string Message { get; private set; }
|
||||
public float Cooldown { get; private set; }
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Message, "message", "Instant action used.");
|
||||
serializer.DataField(this, x => x.Cooldown, "cooldown", 0);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Content.Server.Utility;
|
||||
using Content.Shared.Actions;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Actions
|
||||
@@ -8,8 +9,7 @@ namespace Content.Server.Actions
|
||||
[UsedImplicitly]
|
||||
public class DebugTargetEntity : ITargetEntityAction, ITargetEntityItemAction
|
||||
{
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Content.Shared.Actions;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -10,7 +11,7 @@ namespace Content.Server.Actions
|
||||
[UsedImplicitly]
|
||||
public class DebugTargetPoint : ITargetPointAction, ITargetPointItemAction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Content.Server.Utility;
|
||||
using Content.Shared.Actions;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Actions
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.Actions
|
||||
public string MessageOn { get; private set; }
|
||||
public string MessageOff { get; private set; }
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.MessageOn, "messageOn", "on!");
|
||||
serializer.DataField(this, x => x.MessageOff, "messageOff", "off!");
|
||||
|
||||
@@ -21,6 +21,7 @@ using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
@@ -36,7 +37,7 @@ namespace Content.Server.Actions
|
||||
private float _pushProb;
|
||||
private float _cooldown;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref _failProb, "failProb", 0.4f);
|
||||
serializer.DataField(ref _pushProb, "pushProb", 0.4f);
|
||||
|
||||
@@ -13,6 +13,7 @@ using Robust.Server.GameObjects.EntitySystems;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -38,7 +39,7 @@ namespace Content.Server.Actions
|
||||
_random = IoCManager.Resolve<IRobustRandom>();
|
||||
}
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref _male, "male", null);
|
||||
serializer.DataField(ref _female, "female", null);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Content.Server.GameObjects.Components.Atmos;
|
||||
using Content.Shared.Alert;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Alert.Click
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.Alert.Click
|
||||
[UsedImplicitly]
|
||||
public class ResistFire : IAlertClick
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer) { }
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer) { }
|
||||
|
||||
public void AlertClicked(ClickAlertEventArgs args)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using Content.Server.GameObjects.Components.Movement;
|
||||
using Content.Shared.Alert;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Alert.Click
|
||||
{
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.Alert.Click
|
||||
[UsedImplicitly]
|
||||
public class StopPiloting : IAlertClick
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer) { }
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer) { }
|
||||
|
||||
public void AlertClicked(ClickAlertEventArgs args)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Alert.Click
|
||||
{
|
||||
@@ -13,7 +14,7 @@ namespace Content.Server.Alert.Click
|
||||
[UsedImplicitly]
|
||||
public class StopPulling : IAlertClick
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer) { }
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer) { }
|
||||
|
||||
public void AlertClicked(ClickAlertEventArgs args)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Content.Shared.Alert;
|
||||
using Robust.Shared.Serialization;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
|
||||
namespace Content.Server.Alert.Click
|
||||
{
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.Alert.Click
|
||||
[UsedImplicitly]
|
||||
public class Unbuckle : IAlertClick
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer) { }
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer) { }
|
||||
|
||||
public void AlertClicked(ClickAlertEventArgs args)
|
||||
{
|
||||
|
||||
@@ -534,7 +534,7 @@ namespace Content.Server.Atmos
|
||||
NumericsHelpers.Multiply(_moles, multiplier);
|
||||
}
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Immutable, "immutable", false);
|
||||
serializer.DataField(this, x => x.Volume, "volume", 0f);
|
||||
|
||||
@@ -6,6 +6,7 @@ using Content.Shared.Atmos;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects.EntitySystems.TileLookup;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Atmos.Reactions
|
||||
@@ -89,7 +90,7 @@ namespace Content.Server.Atmos.Reactions
|
||||
return mixture.ReactionResults[GasReaction.Fire] != 0 ? ReactionResult.Reacting : ReactionResult.NoReaction;
|
||||
}
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Shared.Atmos;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects.EntitySystems.TileLookup;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Atmos.Reactions
|
||||
@@ -12,7 +13,7 @@ namespace Content.Server.Atmos.Reactions
|
||||
[UsedImplicitly]
|
||||
public class TritiumFireReaction : IGasReactionEffect
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,12 @@ namespace Content.Server.Botany
|
||||
#endregion
|
||||
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
InternalExposeData(serializer);
|
||||
}
|
||||
|
||||
public void InternalExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.ID, "id", string.Empty);
|
||||
serializer.DataField(this, x => x.Name, "name", string.Empty);
|
||||
@@ -190,7 +195,7 @@ namespace Content.Server.Botany
|
||||
public void LoadFrom(YamlMappingNode mapping)
|
||||
{
|
||||
var serializer = YamlObjectSerializer.NewReader(mapping);
|
||||
ExposeData(serializer);
|
||||
InternalExposeData(serializer);
|
||||
}
|
||||
|
||||
public Seed Clone()
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Botany;
|
||||
using Content.Shared.Interfaces.Chemistry;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -17,7 +18,7 @@ namespace Content.Server.Chemistry.PlantMetabolism
|
||||
public float Amount { get; private set; }
|
||||
public float Prob { get; private set; }
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Amount, "amount", 1f);
|
||||
serializer.DataField(this, x => x.Prob, "prob", 1f);
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Shared.Interfaces.Chemistry;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -13,7 +14,7 @@ namespace Content.Server.Chemistry.PlantMetabolism
|
||||
[UsedImplicitly]
|
||||
public class Clonexadone : IPlantMetabolizable
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Interfaces.Chemistry;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Random;
|
||||
@@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.PlantMetabolism
|
||||
[UsedImplicitly]
|
||||
public class Diethylamine : IPlantMetabolizable
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Interfaces.Chemistry;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Random;
|
||||
@@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.PlantMetabolism
|
||||
[UsedImplicitly]
|
||||
public class RobustHarvest : IPlantMetabolizable
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Server.Explosions;
|
||||
using Content.Server.GameObjects.Components.Chemistry;
|
||||
using Content.Server.Interfaces.Chemistry;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Chemistry.ReactionEffects
|
||||
@@ -24,7 +25,7 @@ namespace Content.Server.Chemistry.ReactionEffects
|
||||
/// </summary>
|
||||
private float _maxScale;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref _devastationRange, "devastationRange", 1);
|
||||
serializer.DataField(ref _heavyImpactRange, "heavyImpactRange", 2);
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Atmos;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.Interfaces.Chemistry;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.TileReactions
|
||||
{
|
||||
private float _coolingTemperature = 2f;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref _coolingTemperature, "coolingTemperature", 2f);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Atmos;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.Interfaces.Chemistry;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.TileReactions
|
||||
{
|
||||
private float _temperatureMultiplier = 1.25f;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref _temperatureMultiplier, "temperatureMultiplier", 1.15f);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Movement;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.Interfaces.Chemistry;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.Chemistry.TileReactions
|
||||
[UsedImplicitly]
|
||||
public class SpillIfPuddlePresentTileReaction : ITileReaction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Movement;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.Interfaces.Chemistry;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -17,7 +18,7 @@ namespace Content.Server.Chemistry.TileReactions
|
||||
private float _paralyzeTime = 1f;
|
||||
private bool _overflow;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
// If you want to modify more puddle/slippery values, add them here.
|
||||
serializer.DataField(ref _paralyzeTime, "paralyzeTime", 1f);
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Construction;
|
||||
using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Completions
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions
|
||||
[UsedImplicitly]
|
||||
public class AddContainer : IGraphAction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Container, "container", null);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects.Components.Container;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -16,7 +17,7 @@ namespace Content.Server.Construction.Completions
|
||||
{
|
||||
public string Container { get; private set; } = string.Empty;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Container, "container", string.Empty);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ using Robust.Server.GameObjects.Components.Container;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -108,7 +109,7 @@ namespace Content.Server.Construction.Completions
|
||||
entity.Delete();
|
||||
}
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Threading.Tasks;
|
||||
using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Completions
|
||||
@@ -10,7 +11,7 @@ namespace Content.Server.Construction.Completions
|
||||
[UsedImplicitly]
|
||||
public class DeleteEntity : IGraphAction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects.Components.Container;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Completions
|
||||
@@ -12,7 +13,7 @@ namespace Content.Server.Construction.Completions
|
||||
[UsedImplicitly]
|
||||
public class EmptyAllContainers : IGraphAction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects.Components.Container;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Completions
|
||||
@@ -15,7 +16,7 @@ namespace Content.Server.Construction.Completions
|
||||
{
|
||||
public string Container { get; private set; } = string.Empty;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Container, "container", string.Empty);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Construction;
|
||||
using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Completions
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions
|
||||
[UsedImplicitly]
|
||||
public class MachineFrameRegenerateProgress : IGraphAction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{ }
|
||||
|
||||
public async Task PerformAction(IEntity entity, IEntity? user)
|
||||
|
||||
@@ -6,6 +6,7 @@ using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects.EntitySystems;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Completions
|
||||
@@ -16,7 +17,7 @@ namespace Content.Server.Construction.Completions
|
||||
public string SoundCollection { get; private set; } = string.Empty;
|
||||
public string Sound { get; private set; } = string.Empty;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Sound, "sound", string.Empty);
|
||||
serializer.DataField(this, x => x.SoundCollection, "soundCollection", string.Empty);
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Construction;
|
||||
using Content.Shared.Interfaces;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Completions
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions
|
||||
[UsedImplicitly]
|
||||
public class PopupUser : IGraphAction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Text, "text", string.Empty);
|
||||
serializer.DataField(this, x => x.Cursor, "cursor", false);
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Completions
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions
|
||||
[UsedImplicitly]
|
||||
public class SetAnchor : IGraphAction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Value, "value", true);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using System;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -15,7 +16,7 @@ namespace Content.Server.Construction.Completions
|
||||
{
|
||||
public int Amount { get; private set; }
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Amount, "amount", 1);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects.Components.Transform;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Completions
|
||||
@@ -14,7 +15,7 @@ namespace Content.Server.Construction.Completions
|
||||
{
|
||||
public SnapGridOffset Offset { get; private set; } = SnapGridOffset.Center;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Offset, "offset", SnapGridOffset.Center);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ using Content.Shared.Construction;
|
||||
using Content.Shared.Utility;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -17,7 +18,7 @@ namespace Content.Server.Construction.Completions
|
||||
public string Prototype { get; private set; } = string.Empty;
|
||||
public int Amount { get; private set; } = 1;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Prototype, "prototype", string.Empty);
|
||||
serializer.DataField(this, x => x.Amount, "amount", 1);
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -13,7 +14,7 @@ namespace Content.Server.Construction.Completions
|
||||
[UsedImplicitly]
|
||||
public class SpriteChange : IGraphAction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.SpriteSpecifier, "specifier", SpriteSpecifier.Invalid);
|
||||
serializer.DataField(this, x => x.Layer, "layer", 0);
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -12,8 +13,7 @@ namespace Content.Server.Construction.Completions
|
||||
[UsedImplicitly]
|
||||
public class SpriteStateChange : IGraphAction
|
||||
{
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.State, "state", string.Empty);
|
||||
serializer.DataField(this, x => x.Layer, "layer", 0);
|
||||
|
||||
@@ -5,6 +5,7 @@ using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Reflection;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -20,7 +21,7 @@ namespace Content.Server.Construction.Completions
|
||||
IoCManager.InjectDependencies(this);
|
||||
}
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Key, "key", string.Empty);
|
||||
serializer.DataField(this, x => x.Data, "data", 0);
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Power;
|
||||
using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.Construction.Conditions
|
||||
@@ -15,7 +16,7 @@ namespace Content.Server.Construction.Conditions
|
||||
[UsedImplicitly]
|
||||
public class AllWiresCut : IEdgeCondition
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Value, "value", true);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Maps;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -23,7 +24,7 @@ namespace Content.Server.Construction.Conditions
|
||||
IoCManager.InjectDependencies(this);
|
||||
}
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Component, "component", string.Empty);
|
||||
serializer.DataField(this, x => x.HasEntity, "hasEntity", true);
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects.Components.Container;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -15,7 +16,7 @@ namespace Content.Server.Construction.Conditions
|
||||
public string Container { get; private set; } = string.Empty;
|
||||
public string Text { get; private set; } = string.Empty;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Container, "container", string.Empty);
|
||||
serializer.DataField(this, x => x.Text, "text", string.Empty);
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -16,7 +17,8 @@ namespace Content.Server.Construction.Conditions
|
||||
public class DoorWelded : IEdgeCondition
|
||||
{
|
||||
public bool Welded { get; private set; }
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Welded, "welded", true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -13,7 +14,7 @@ namespace Content.Server.Construction.Conditions
|
||||
{
|
||||
public bool Anchored { get; private set; }
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Anchored, "anchored", true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Construction;
|
||||
using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -15,7 +16,7 @@ namespace Content.Server.Construction.Conditions
|
||||
[UsedImplicitly]
|
||||
public class MachineFrameComplete : IEdgeCondition
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer) { }
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer) { }
|
||||
|
||||
public async Task<bool> Condition(IEntity entity)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Watercloset;
|
||||
using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -28,7 +29,7 @@ namespace Content.Server.Construction.Conditions
|
||||
return true;
|
||||
}
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components;
|
||||
using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -14,7 +15,7 @@ namespace Content.Server.Construction.Conditions
|
||||
{
|
||||
public bool Open { get; private set; }
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Open, "open", true);
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace Content.Server.GameObjects.Components.Access
|
||||
UserInterface?.SetState(newState);
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
if(!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
{
|
||||
@@ -224,7 +224,7 @@ namespace Content.Server.GameObjects.Components.Access
|
||||
UserInterface?.Open(actor.playerSession);
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
var item = eventArgs.Using;
|
||||
var user = eventArgs.User;
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Content.Server.GameObjects.Components.Arcade
|
||||
}
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
if(!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace Content.Server.GameObjects.Components.Arcade
|
||||
_game = new SpaceVillainGame(this);
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
if(!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
DisconnectInternals();
|
||||
}
|
||||
|
||||
public void Equipped(EquippedEventArgs eventArgs)
|
||||
void IEquipped.Equipped(EquippedEventArgs eventArgs)
|
||||
{
|
||||
if ((EquipmentSlotDefines.SlotMasks[eventArgs.Slot] & _allowedSlots) != _allowedSlots) return;
|
||||
IsFunctional = true;
|
||||
@@ -48,10 +48,9 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
}
|
||||
}
|
||||
|
||||
public void Unequipped(UnequippedEventArgs eventArgs)
|
||||
void IUnequipped.Unequipped(UnequippedEventArgs eventArgs)
|
||||
{
|
||||
DisconnectInternals();
|
||||
|
||||
}
|
||||
|
||||
public void DisconnectInternals()
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
});
|
||||
}
|
||||
|
||||
public ReagentUnit ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume)
|
||||
ReagentUnit IReagentReaction.ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume)
|
||||
{
|
||||
switch (reagent.ID)
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.ComponentDependencies;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -166,14 +167,14 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
return air;
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false;
|
||||
OpenInterface(actor.playerSession);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return;
|
||||
OpenInterface(actor.playerSession);
|
||||
@@ -323,7 +324,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
_integrity++;
|
||||
}
|
||||
|
||||
public void Dropped(DroppedEventArgs eventArgs)
|
||||
void IDropped.Dropped(DroppedEventArgs eventArgs)
|
||||
{
|
||||
DisconnectFromInternals(eventArgs.User);
|
||||
}
|
||||
@@ -363,7 +364,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
[UsedImplicitly]
|
||||
public class ToggleInternalsAction : IToggleItemAction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer) {}
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer) {}
|
||||
|
||||
public bool DoToggleAction(ToggleItemActionEventArgs args)
|
||||
{
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace Content.Server.GameObjects.Components.Body.Part
|
||||
}
|
||||
}
|
||||
|
||||
public async Task AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
// TODO BODY
|
||||
if (eventArgs.Target == null)
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
{
|
||||
public override string Name => "Log";
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!ActionBlockerSystem.CanInteract(eventArgs.User))
|
||||
return false;
|
||||
|
||||
@@ -639,7 +639,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
Seed = Seed.Diverge(modified);
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
var user = eventArgs.User;
|
||||
var usingItem = eventArgs.Using;
|
||||
@@ -767,7 +767,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
return false;
|
||||
}
|
||||
|
||||
public ReagentUnit ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume)
|
||||
ReagentUnit IReagentReaction.ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume)
|
||||
{
|
||||
if(_solutionContainer == null)
|
||||
return ReagentUnit.Zero;
|
||||
@@ -776,7 +776,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
return accepted;
|
||||
}
|
||||
|
||||
public ReagentUnit ReagentReactInjection(ReagentPrototype reagent, ReagentUnit volume)
|
||||
ReagentUnit IReagentReaction.ReagentReactInjection(ReagentPrototype reagent, ReagentUnit volume)
|
||||
{
|
||||
if(_solutionContainer == null)
|
||||
return ReagentUnit.Zero;
|
||||
@@ -785,13 +785,13 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
return accepted;
|
||||
}
|
||||
|
||||
public bool InteractHand(InteractHandEventArgs eventArgs)
|
||||
bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
|
||||
{
|
||||
// DoHarvest does the sanity checks.
|
||||
return DoHarvest(eventArgs.User);
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
// DoHarvest does the sanity checks.
|
||||
DoHarvest(eventArgs.User);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
private int _minSeeds = 1;
|
||||
private int _maxSeeds = 4;
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!_powerReceiver?.Powered ?? false)
|
||||
return false;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
}
|
||||
|
||||
// Feeding someone else
|
||||
public async Task AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.Target == null)
|
||||
{
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace Content.Server.GameObjects.Components.Construction
|
||||
TargetNextEdge = Node.GetEdge(TargetPathfinding.Peek().Name);
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (_handling)
|
||||
return true;
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace Content.Server.GameObjects.Components.Construction
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!HasBoard && eventArgs.Using.TryGetComponent<MachineBoardComponent>(out var machineBoard))
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Construction
|
||||
serializer.DataField(ref _refineTime, "refineTime", 2f);
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
// check if object is welder
|
||||
if (!eventArgs.Using.TryGetComponent(out ToolComponent? tool))
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Content.Server.GameObjects.Components.Damage
|
||||
serializer.DataField(ref _ignoreResistances, "ignoreResistances", false);
|
||||
}
|
||||
|
||||
public void Land(LandEventArgs eventArgs)
|
||||
void ILand.Land(LandEventArgs eventArgs)
|
||||
{
|
||||
if (!Owner.TryGetComponent(out IDamageableComponent damageable)) return;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Server.GameObjects.Components.Damage
|
||||
serializer.DataField(ref _tools, "tools", new List<ToolQuality>());
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.Using.TryGetComponent<ToolComponent>(out var tool))
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Content.Server.GameObjects.Components.Damage
|
||||
serializer.DataField(ref _ignoreResistances, "ignoreResistances", false);
|
||||
}
|
||||
|
||||
public void DoHit(ThrowCollideEventArgs eventArgs)
|
||||
void IThrowCollide.DoHit(ThrowCollideEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.Target.TryGetComponent(out IDamageableComponent damageable)) return;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
@@ -19,7 +20,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
set => _acts = (int) value;
|
||||
}
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref _acts, "acts", 0, WithFormat.Flags<ActsFlags>());
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.GameObjects.Components.Body;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
{
|
||||
private bool _recursive = true;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref _recursive, "recursive", true);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.Audio;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
@@ -12,7 +13,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
/// </summary>
|
||||
public string Sound { get; set; }
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Sound, "sound", string.Empty);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.Audio;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
@@ -12,7 +13,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
/// </summary>
|
||||
private string SoundCollection { get; set; }
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.SoundCollection, "soundCollection", string.Empty);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Stack;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.Utility;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
@@ -15,7 +16,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
/// </summary>
|
||||
public Dictionary<string, MinMax> Spawn { get; set; } = new();
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Spawn, "spawn", new Dictionary<string, MinMax>());
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Fluids;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
@@ -11,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
||||
[UsedImplicitly]
|
||||
public class SpillBehavior : IThresholdBehavior
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer) { }
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer) { }
|
||||
|
||||
public void Trigger(IEntity owner, DestructibleSystem system)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds
|
||||
[ViewVariables]
|
||||
public int Max;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref Min, "min", 0);
|
||||
serializer.DataField(ref Max, "max", 0);
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds
|
||||
/// </summary>
|
||||
[ViewVariables] public IReadOnlyList<IThresholdBehavior> Behaviors => _behaviors;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Triggered, "triggered", false);
|
||||
serializer.DataField(this, x => x.TriggersOnce, "triggersOnce", false);
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
return true;
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!Owner.TryGetComponent(out SolutionContainerComponent? contents))
|
||||
{
|
||||
|
||||
@@ -185,13 +185,13 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
}
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
ToggleSafety(eventArgs.User);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
ToggleSafety(eventArgs.User);
|
||||
}
|
||||
@@ -212,7 +212,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
appearance.SetData(SprayVisuals.Safety, _safety);
|
||||
}
|
||||
|
||||
public void Dropped(DroppedEventArgs eventArgs)
|
||||
void IDropped.Dropped(DroppedEventArgs eventArgs)
|
||||
{
|
||||
if(_hasSafety && Owner.TryGetComponent(out AppearanceComponent appearance))
|
||||
appearance.SetData(SprayVisuals.Safety, _safety);
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace Content.Server.GameObjects.Components.Gravity
|
||||
return true;
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.Using.TryGetComponent(out WelderComponent? tool))
|
||||
return false;
|
||||
|
||||
@@ -290,7 +290,7 @@ namespace Content.Server.GameObjects.Components.Instruments
|
||||
_laggedBatches = 0;
|
||||
}
|
||||
|
||||
public void Dropped(DroppedEventArgs eventArgs)
|
||||
void IDropped.Dropped(DroppedEventArgs eventArgs)
|
||||
{
|
||||
Clean();
|
||||
SendNetworkMessage(new InstrumentStopMidiMessage());
|
||||
@@ -298,7 +298,7 @@ namespace Content.Server.GameObjects.Components.Instruments
|
||||
UserInterface?.CloseAll();
|
||||
}
|
||||
|
||||
public void Thrown(ThrownEventArgs eventArgs)
|
||||
void IThrown.Thrown(ThrownEventArgs eventArgs)
|
||||
{
|
||||
Clean();
|
||||
SendNetworkMessage(new InstrumentStopMidiMessage());
|
||||
@@ -306,7 +306,7 @@ namespace Content.Server.GameObjects.Components.Instruments
|
||||
UserInterface?.CloseAll();
|
||||
}
|
||||
|
||||
public void HandSelected(HandSelectedEventArgs eventArgs)
|
||||
void IHandSelected.HandSelected(HandSelectedEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.User == null || !eventArgs.User.TryGetComponent(out BasicActorComponent? actor))
|
||||
return;
|
||||
@@ -318,14 +318,14 @@ namespace Content.Server.GameObjects.Components.Instruments
|
||||
InstrumentPlayer = session;
|
||||
}
|
||||
|
||||
public void HandDeselected(HandDeselectedEventArgs eventArgs)
|
||||
void IHandDeselected.HandDeselected(HandDeselectedEventArgs eventArgs)
|
||||
{
|
||||
Clean();
|
||||
SendNetworkMessage(new InstrumentStopMidiMessage());
|
||||
UserInterface?.CloseAll();
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
if (Handheld || !eventArgs.User.TryGetComponent(out IActorComponent? actor)) return;
|
||||
|
||||
@@ -335,7 +335,7 @@ namespace Content.Server.GameObjects.Components.Instruments
|
||||
OpenUserInterface(actor.playerSession);
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.ComponentDependencies;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -282,7 +283,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
||||
[UsedImplicitly]
|
||||
public class ToggleLightAction : IToggleItemAction
|
||||
{
|
||||
public void ExposeData(ObjectSerializer serializer) {}
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer) {}
|
||||
|
||||
public bool DoToggleAction(ToggleItemActionEventArgs args)
|
||||
{
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace Content.Server.GameObjects.Components.Interactable
|
||||
{
|
||||
public override string Name => "Matchbox";
|
||||
|
||||
public int Priority => 1;
|
||||
int IInteractUsing.Priority => 1;
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.Using.TryGetComponent<MatchstickComponent>(out var matchstick)
|
||||
&& matchstick.CurrentState == SharedBurningStates.Unlit)
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
||||
Owner.SpawnTimer(_duration * 1000, () => CurrentState = SharedBurningStates.Burnt);
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.Target.TryGetComponent<IHotItem>(out var hotItem)
|
||||
&& hotItem.IsCurrentlyHot()
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
||||
public string SoundCollection => _soundCollection;
|
||||
public string ChangeSound => _changeSound;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(this, x => x.Behavior, "behavior", ToolQuality.None);
|
||||
serializer.DataField(ref _state, "state", string.Empty);
|
||||
@@ -104,7 +104,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
||||
serializer.DataField(ref _tools, "tools", new List<ToolEntry>());
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
Cycle();
|
||||
return true;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
||||
public override string Name => "TilePrying";
|
||||
private bool _toolComponentNeeded = true;
|
||||
|
||||
public async Task AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
TryPryTile(eventArgs.User, eventArgs.ClickLocation);
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
return ToggleWelderStatus(eventArgs.User);
|
||||
}
|
||||
@@ -257,7 +257,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
||||
|
||||
}
|
||||
|
||||
public SuicideKind Suicide(IEntity victim, IChatManager chat)
|
||||
SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
|
||||
{
|
||||
string othersMessage;
|
||||
string selfMessage;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Content.Server.GameObjects.Components.Items.Clothing
|
||||
return new ClothingComponentState(ClothingEquippedPrefix, EquippedPrefix);
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
if (!_quickEquipEnabled) return false;
|
||||
if (!eventArgs.User.TryGetComponent(out InventoryComponent inv)
|
||||
|
||||
@@ -12,22 +12,23 @@ namespace Content.Server.GameObjects.Components.Items
|
||||
public class DebugEquipComponent : Component, IEquipped, IEquippedHand, IUnequipped, IUnequippedHand
|
||||
{
|
||||
public override string Name => "DebugEquip";
|
||||
public void Equipped(EquippedEventArgs eventArgs)
|
||||
|
||||
void IEquipped.Equipped(EquippedEventArgs eventArgs)
|
||||
{
|
||||
eventArgs.User.PopupMessage("equipped " + Owner.Name);
|
||||
}
|
||||
|
||||
public void EquippedHand(EquippedHandEventArgs eventArgs)
|
||||
void IEquippedHand.EquippedHand(EquippedHandEventArgs eventArgs)
|
||||
{
|
||||
eventArgs.User.PopupMessage("equipped hand " + Owner.Name);
|
||||
}
|
||||
|
||||
public void Unequipped(UnequippedEventArgs eventArgs)
|
||||
void IUnequipped.Unequipped(UnequippedEventArgs eventArgs)
|
||||
{
|
||||
eventArgs.User.PopupMessage("unequipped " + Owner.Name);
|
||||
}
|
||||
|
||||
public void UnequippedHand(UnequippedHandEventArgs eventArgs)
|
||||
void IUnequippedHand.UnequippedHand(UnequippedHandEventArgs eventArgs)
|
||||
{
|
||||
eventArgs.User.PopupMessage("unequipped hand" + Owner.Name);
|
||||
}
|
||||
|
||||
@@ -64,18 +64,18 @@ namespace Content.Server.GameObjects.Components.Items
|
||||
}
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
Roll();
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
Roll();
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Land(LandEventArgs eventArgs)
|
||||
void ILand.Land(LandEventArgs eventArgs)
|
||||
{
|
||||
Roll();
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Content.Server.GameObjects.Components.Items
|
||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Items/genhit.ogg", location, AudioHelpers.WithVariation(0.125f));
|
||||
}
|
||||
|
||||
public async Task AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.InRangeUnobstructed(ignoreInsideBlocker: true, popup: true)) return;
|
||||
if (!Owner.TryGetComponent(out StackComponent stack)) return;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
|
||||
message.AddMarkup(Loc.GetString("It holds {0} charges.", refillAmmo));
|
||||
}
|
||||
|
||||
public async Task AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.Target == null || !eventArgs.Target.TryGetComponent(out RCDComponent rcdComponent) || !eventArgs.User.TryGetComponent(out IHandsComponent hands))
|
||||
{
|
||||
|
||||
@@ -68,8 +68,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
|
||||
///<summary>
|
||||
/// Method called when the RCD is clicked in-hand, this will cycle the RCD mode.
|
||||
///</summary>
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
SwapMode(eventArgs);
|
||||
return true;
|
||||
@@ -94,7 +93,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
|
||||
message.AddMarkup(Loc.GetString("It's currently on {0} mode, and holds {1} charges.",_mode.ToString(), _ammo));
|
||||
}
|
||||
|
||||
public async Task AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
//No changing mode mid-RCD
|
||||
var startingMode = _mode;
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
return user.InRangeUnobstructed(Owner, ignoreInsideBlocker: true, popup: true);
|
||||
}
|
||||
|
||||
public bool InteractHand(InteractHandEventArgs eventArgs)
|
||||
bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
|
||||
{
|
||||
if (!CanPickup(eventArgs.User)) return false;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
public string GroupId;
|
||||
public int Amount;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref PrototypeName, "name", null);
|
||||
serializer.DataField(ref Amount, "amount", 1);
|
||||
|
||||
@@ -45,17 +45,18 @@ namespace Content.Server.GameObjects.Components.Items
|
||||
}
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
Squeak();
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
Squeak();
|
||||
return false;
|
||||
}
|
||||
public void Land(LandEventArgs eventArgs)
|
||||
|
||||
void ILand.Land(LandEventArgs eventArgs)
|
||||
{
|
||||
Squeak();
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
||||
victim.Delete();
|
||||
}
|
||||
|
||||
public SuicideKind Suicide(IEntity victim, IChatManager chat)
|
||||
SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
|
||||
{
|
||||
var othersMessage = Loc.GetString("{0:theName} has thrown themselves on a meat spike!", victim);
|
||||
victim.PopupMessageOtherClients(othersMessage);
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
||||
UserInterface?.Toggle(actor.playerSession);
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!Powered)
|
||||
{
|
||||
@@ -473,7 +473,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
||||
_audioSystem.PlayFromEntity("/Audio/Machines/machine_switch.ogg",Owner,AudioParams.Default.WithVolume(-2f));
|
||||
}
|
||||
|
||||
public SuicideKind Suicide(IEntity victim, IChatManager chat)
|
||||
SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
|
||||
{
|
||||
var headCount = 0;
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
||||
UserInterface?.Toggle(actor.playerSession);
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.User.TryGetComponent(out IHandsComponent? hands))
|
||||
{
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace Content.Server.GameObjects.Components.MachineLinking
|
||||
{
|
||||
public override string Name => "SignalButton";
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
TransmitSignal(eventArgs.User);
|
||||
}
|
||||
|
||||
public bool InteractHand(InteractHandEventArgs eventArgs)
|
||||
bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
|
||||
{
|
||||
TransmitSignal(eventArgs.User);
|
||||
return true;
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace Content.Server.GameObjects.Components.MachineLinking
|
||||
return true;
|
||||
}
|
||||
|
||||
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.Using.TryGetComponent<ToolComponent>(out var tool))
|
||||
return false;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user