фиксы апстрима
This commit is contained in:
parent
d4887bc961
commit
0a408dece4
5 changed files with 26 additions and 18 deletions
|
|
@ -33,15 +33,6 @@ public sealed class SurveillanceCameraMonitorBoundUserInterface : BoundUserInter
|
|||
{
|
||||
base.Open();
|
||||
|
||||
// Sunrise-start
|
||||
EntityUid? gridUid = null;
|
||||
|
||||
if (_entManager.TryGetComponent<TransformComponent>(Owner, out var xform))
|
||||
{
|
||||
gridUid = xform.GridUid;
|
||||
}
|
||||
// Sunrise-end
|
||||
|
||||
_window = this.CreateWindow<SurveillanceCameraMonitorWindow>();
|
||||
|
||||
_window.CameraSelected += OnCameraSelected;
|
||||
|
|
@ -49,6 +40,8 @@ public sealed class SurveillanceCameraMonitorBoundUserInterface : BoundUserInter
|
|||
_window.SubnetRefresh += OnSubnetRefresh;
|
||||
_window.CameraSwitchTimer += OnCameraSwitchTimer;
|
||||
_window.CameraDisconnect += OnCameraDisconnect;
|
||||
|
||||
_window.SetEntity(Owner);
|
||||
}
|
||||
|
||||
private void OnCameraSelected(string cameraAddress, string subnetAddress) // Sunrise-edit
|
||||
|
|
|
|||
|
|
@ -35,7 +35,9 @@ public sealed partial class SurveillanceCameraMonitorWindow : FancyWindow
|
|||
private Texture? _blipTexture; // Sunrise-edit
|
||||
private NetEntity? _trackedEntity; // Sunrise-edit
|
||||
|
||||
public SurveillanceCameraMonitorWindow(EntityUid? mapUid)
|
||||
public EntityUid Entity;
|
||||
|
||||
public SurveillanceCameraMonitorWindow()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
|
|
@ -65,14 +67,21 @@ public sealed partial class SurveillanceCameraMonitorWindow : FancyWindow
|
|||
|
||||
// Sunrise-start
|
||||
NavMap.TrackedEntitySelectedAction += SetTrackedEntityFromNavMap;
|
||||
|
||||
_entManager = IoCManager.Resolve<IEntityManager>();
|
||||
// Sunrise-end
|
||||
}
|
||||
|
||||
if (_entManager.TryGetComponent<TransformComponent>(mapUid, out var xform))
|
||||
public void SetEntity(EntityUid uid)
|
||||
{
|
||||
Entity = uid;
|
||||
|
||||
// Pass owner to nav map
|
||||
NavMap.Owner = uid;
|
||||
|
||||
if (_entManager.TryGetComponent<TransformComponent>(uid, out var xform))
|
||||
NavMap.MapUid = xform.GridUid;
|
||||
else
|
||||
NavMap.Visible = false;
|
||||
// Sunrise-end
|
||||
}
|
||||
|
||||
// Sunrise-start
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public sealed partial class VoiceMaskNameChangeWindow : FancyWindow
|
|||
|
||||
private string? _verb;
|
||||
|
||||
public VoiceMaskNameChangeWindow(IPrototypeManager proto)
|
||||
public VoiceMaskNameChangeWindow()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
|
|
@ -37,13 +37,13 @@ public sealed partial class VoiceMaskNameChangeWindow : FancyWindow
|
|||
SpeechVerbSelector.SelectId(args.Id);
|
||||
};
|
||||
|
||||
ReloadVerbs(proto);
|
||||
ReloadVerbs(IoCManager.Resolve<IPrototypeManager>());
|
||||
|
||||
// Sunrise-TTS-Start
|
||||
if (IoCManager.Resolve<IConfigurationManager>().GetCVar(SunriseCCVars.TTSEnabled))
|
||||
{
|
||||
TTSContainer.Visible = true;
|
||||
ReloadVoices(proto);
|
||||
ReloadVoices(IoCManager.Resolve<IPrototypeManager>());
|
||||
}
|
||||
// Sunrise-TTS-End
|
||||
|
||||
|
|
|
|||
|
|
@ -559,8 +559,13 @@ public sealed class BanManager : IBanManager, IPostInjectInit
|
|||
DateTime.UtcNow,
|
||||
TimeZoneInfo.FindSystemTimeZoneById("Russian Standard Time"));
|
||||
|
||||
var adminDiscordId = await _discordAuth.GetDiscordUserId(banDef.BanningAdmin);
|
||||
var targetDiscordId = await _discordAuth.GetDiscordUserId(banDef.UserId);
|
||||
string? adminDiscordId = null;
|
||||
string? targetDiscordId = null;
|
||||
if (_discordAuth != null)
|
||||
{
|
||||
adminDiscordId = await _discordAuth.GetDiscordUserId(banDef.BanningAdmin);
|
||||
targetDiscordId = await _discordAuth.GetDiscordUserId(banDef.UserId);
|
||||
}
|
||||
|
||||
var adminLink = "";
|
||||
var targetLink = "";
|
||||
|
|
|
|||
|
|
@ -382,3 +382,4 @@ SignHydro3: SignHydro1
|
|||
# Sunrise migrations
|
||||
AirlockExternalGlassShuttleArrivals: AirlockExternalGlassShuttleArrivalsLocked
|
||||
AirlockHatchSyndicate: AirlockHatchSyndicateLocked
|
||||
SurveillanceCameraWirelessRouterBase: SurveillanceCameraWirelessRouterConstructed
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue