Use nav beacon locations for announcements (#26437)
* use nav beacon locations for announcements * :thumbs_up:
This commit is contained in:
@@ -16,6 +16,13 @@ public sealed partial class NavMapBeaconComponent : Component
|
||||
[AutoNetworkedField]
|
||||
public string? Text;
|
||||
|
||||
/// <summary>
|
||||
/// A localization string that populates <see cref="Text"/> if it is null at mapinit.
|
||||
/// Used so that mappers can still override Text while mapping.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId? DefaultText;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[AutoNetworkedField]
|
||||
public Color Color = Color.Orange;
|
||||
|
||||
@@ -8,13 +8,6 @@ public abstract class SharedNavMapSystem : EntitySystem
|
||||
{
|
||||
public const byte ChunkSize = 4;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<NavMapBeaconComponent, MapInitEvent>(OnNavMapBeaconMapInit);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the chunk's tile into a bitflag for the slot.
|
||||
/// </summary>
|
||||
@@ -38,13 +31,6 @@ public abstract class SharedNavMapSystem : EntitySystem
|
||||
return new Vector2i(x, y);
|
||||
}
|
||||
|
||||
private void OnNavMapBeaconMapInit(EntityUid uid, NavMapBeaconComponent component, MapInitEvent args)
|
||||
{
|
||||
component.Text ??= string.Empty;
|
||||
component.Text = Loc.GetString(component.Text);
|
||||
Dirty(uid, component);
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
protected sealed class NavMapComponentState : ComponentState
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user