Stable merge (#37050)
This commit is contained in:
@@ -40,7 +40,7 @@ public sealed class AnimateSpellSystem : EntitySystem
|
||||
_container.AttachParentToContainerOrGrid((ent, xform)); // Items animated inside inventory now exit, they can't be picked up and so can't escape otherwise
|
||||
|
||||
var ev = new AnimateSpellEvent();
|
||||
RaiseLocalEvent(ref ev);
|
||||
RaiseLocalEvent(ent, ref ev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public sealed partial class RingerUplinkComponent : Component
|
||||
/// Set via GenerateUplinkCodeEvent.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public Note[] Code = new Note[SharedRingerSystem.RingtoneLength];
|
||||
public Note[]? Code;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to show the toggle uplink button in PDA settings.
|
||||
|
||||
@@ -45,8 +45,8 @@ public abstract class SharedRingerSystem : EntitySystem
|
||||
/// <inheritdoc/>
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
var ringerQuery = EntityQueryEnumerator<RingerComponent>();
|
||||
while (ringerQuery.MoveNext(out var uid, out var ringer))
|
||||
var ringerQuery = EntityQueryEnumerator<RingerComponent, TransformComponent>();
|
||||
while (ringerQuery.MoveNext(out var uid, out var ringer, out var xform))
|
||||
{
|
||||
if (!ringer.Active || !ringer.NextNoteTime.HasValue)
|
||||
continue;
|
||||
@@ -63,10 +63,9 @@ public abstract class SharedRingerSystem : EntitySystem
|
||||
// and play it separately with PlayLocal, so that it's actually predicted
|
||||
if (_net.IsServer)
|
||||
{
|
||||
var ringerXform = Transform(uid);
|
||||
_audio.PlayEntity(
|
||||
GetSound(ringer.Ringtone[ringer.NoteCount]),
|
||||
Filter.Empty().AddInRange(_xform.GetMapCoordinates(uid, ringerXform), ringer.Range),
|
||||
Filter.Empty().AddInRange(_xform.GetMapCoordinates(uid, xform), ringer.Range),
|
||||
uid,
|
||||
true,
|
||||
AudioParams.Default.WithMaxDistance(ringer.Range).WithVolume(ringer.Volume)
|
||||
@@ -257,14 +256,6 @@ public abstract class SharedRingerSystem : EntitySystem
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper method to determine if the mind is an antagonist.
|
||||
/// </summary>
|
||||
protected bool IsAntagonist(EntityUid? user)
|
||||
{
|
||||
return user != null && _mind.TryGetMind(user.Value, out var mindId, out _) && _role.MindIsAntagonist(mindId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sound path for a specific note.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user