mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
Beacon localization (#24138)
* localize beacons * No not like that * Tesla beacons were already depreciated, time to give the reaper their due * Entity name fallback * The real treasure was the far easier solution we missed along the way * weh * Shared mapinit * fix RT version * a single line break (cherry picked from commit efdc6f8d4c5dc8c593b6403c6592f0ddc6212266)
This commit is contained in:
@@ -8,6 +8,13 @@ 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>
|
||||
@@ -31,6 +38,13 @@ 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