фиксы (#168)
This commit is contained in:
@@ -26,6 +26,10 @@ public sealed class CriminalRecordsBoundUserInterface : BoundUserInterface
|
||||
{
|
||||
SendMessage(new ItemSlotButtonPressedEvent(CriminalRecordsConsoleComponent.IdSlotId));
|
||||
};
|
||||
_window.NonLogOutButton.Controller.OnPressed += _ =>
|
||||
{
|
||||
SendMessage(new ItemSlotButtonPressedEvent(CriminalRecordsConsoleComponent.IdSlotId));
|
||||
};
|
||||
_window.LogInButton.Controller.OnPressed += _ =>
|
||||
{
|
||||
SendMessage(new ItemSlotButtonPressedEvent(CriminalRecordsConsoleComponent.IdSlotId));
|
||||
|
||||
@@ -16,10 +16,40 @@
|
||||
HorizontalAlignment="Center"
|
||||
Icon="/Textures/Interface/VerbIcons/close.svg.192dpi.png"
|
||||
Label="{Loc 'criminal-login-in'}"
|
||||
ToolTip="{Loc 'criminal-login-in-desc'}"
|
||||
Margin="10 0 10 0">
|
||||
</controls:RecordIconButton>
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
<BoxContainer Access="Public" Name="NonServerContent" Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True">
|
||||
<uicontrols:StripeBack HasBottomEdge="True" HasMargins="False" HorizontalExpand="True">
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<RichTextLabel Access="Public"
|
||||
HorizontalExpand="True"
|
||||
Name="NonUserLabel"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10 0 10 0"/>
|
||||
<controls:RecordIconButton
|
||||
Name="NonLogOutButton"
|
||||
Access="Public"
|
||||
HorizontalAlignment="Right"
|
||||
Icon="/Textures/Interface/VerbIcons/close.svg.192dpi.png"
|
||||
Label="{Loc 'criminal-login-out'}"
|
||||
ToolTip="{Loc 'criminal-login-out-desc'}"
|
||||
Margin="10 0 10 0">
|
||||
</controls:RecordIconButton>
|
||||
</BoxContainer>
|
||||
</uicontrols:StripeBack>
|
||||
<TextureRect Access="Public"
|
||||
VerticalExpand="True"
|
||||
HorizontalExpand="True"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
MinSize="500 500"
|
||||
Visible="False"
|
||||
Name="NoiseBackground" />
|
||||
</BoxContainer>
|
||||
<BoxContainer Access="Public" Name="MainContent" Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True">
|
||||
<uicontrols:StripeBack HasBottomEdge="True" HasMargins="False" HorizontalExpand="True">
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
@@ -35,6 +65,7 @@
|
||||
HorizontalAlignment="Right"
|
||||
Icon="/Textures/Interface/VerbIcons/close.svg.192dpi.png"
|
||||
Label="{Loc 'criminal-login-out'}"
|
||||
ToolTip="{Loc 'criminal-login-out-desc'}"
|
||||
Margin="10 0 10 0">
|
||||
</controls:RecordIconButton>
|
||||
</BoxContainer>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Linq;
|
||||
using Content.Client.Humanoid;
|
||||
using Content.Client.Inventory;
|
||||
using Content.Client.Resources;
|
||||
using Content.Client.White.CriminalRecords.UI.Controls;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.CrewManifest;
|
||||
@@ -13,6 +14,7 @@ using Content.Shared.StationRecords;
|
||||
using Content.Shared.White.CriminalRecords;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
@@ -57,11 +59,29 @@ public sealed partial class CriminalRecordsWindow : DefaultWindow
|
||||
messageHint.AddMarkup(Loc.GetString("criminal-login-warn"));
|
||||
LoginHint.SetMessage(messageHint);
|
||||
MainContent.Visible = false;
|
||||
NonServerContent.Visible = false;
|
||||
NonAccessContent.Visible = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!state.HasServer)
|
||||
{
|
||||
var shader = _prototypeManager.Index<ShaderPrototype>("CameraStatic").Instance().Duplicate();
|
||||
NoiseBackground.Texture = _resourceCache.GetTexture("/Textures/Interface/Nano/square_black.png");
|
||||
NoiseBackground.ShaderOverride = shader;
|
||||
|
||||
NonUserLabel.SetMessage(Loc.GetString("criminal-login-info",
|
||||
("user", (state.ContainedId.FullName ?? string.Empty) + ", " +
|
||||
(state.ContainedId.JobTitle ?? string.Empty) )));
|
||||
|
||||
MainContent.Visible = false;
|
||||
NonServerContent.Visible = true;
|
||||
NonAccessContent.Visible = false;
|
||||
return;
|
||||
}
|
||||
|
||||
MainContent.Visible = true;
|
||||
NonServerContent.Visible = false;
|
||||
NonAccessContent.Visible = false;
|
||||
|
||||
// Init header panel
|
||||
@@ -90,6 +110,7 @@ public sealed partial class CriminalRecordsWindow : DefaultWindow
|
||||
foreach (var (recordKey, name) in RecordListing)
|
||||
{
|
||||
var element = CreateRecordItem(State, recordKey, name);
|
||||
element.ButtonElement.ToolTip = Loc.GetString("criminal-list-focus");
|
||||
element.ButtonElement.OnPressed += _ =>
|
||||
{
|
||||
OnKeySelected?.Invoke(recordKey);
|
||||
|
||||
@@ -86,7 +86,10 @@ public sealed class CriminalRecordsConsoleSystem : EntitySystem
|
||||
RaiseLocalEvent(hasServer);
|
||||
|
||||
if (!hasServer.Result)
|
||||
{
|
||||
UpdateUserInterface(uid, component);
|
||||
return;
|
||||
}
|
||||
|
||||
var ev = new EventChangeReason(msg.SelectedKey, msg.Text);
|
||||
RaiseLocalEvent(ev);
|
||||
@@ -104,7 +107,10 @@ public sealed class CriminalRecordsConsoleSystem : EntitySystem
|
||||
RaiseLocalEvent(hasServer);
|
||||
|
||||
if (!hasServer.Result)
|
||||
{
|
||||
UpdateUserInterface(uid, component);
|
||||
return;
|
||||
}
|
||||
|
||||
var messageId = "null";
|
||||
switch (msg.SelectedStatus.CriminalType)
|
||||
@@ -166,7 +172,7 @@ public sealed class CriminalRecordsConsoleSystem : EntitySystem
|
||||
|
||||
if (!TryComp<StationRecordsComponent>(owningStation, out var stationRecordsComponent))
|
||||
{
|
||||
CriminalRecordsConsoleBuiState state = new(null, null, null, null, null, false); //null
|
||||
CriminalRecordsConsoleBuiState state = new(null, null, null, null, null, false, false); //null
|
||||
SetStateForInterface(uid, state);
|
||||
return;
|
||||
}
|
||||
@@ -183,7 +189,7 @@ public sealed class CriminalRecordsConsoleSystem : EntitySystem
|
||||
|
||||
if (listing.Count == 0)
|
||||
{
|
||||
CriminalRecordsConsoleBuiState state = new(null, null, null, null, null, false); //console!.Filter
|
||||
CriminalRecordsConsoleBuiState state = new(null, null, null, null, null, false, false); //console!.Filter
|
||||
SetStateForInterface(uid, state);
|
||||
return;
|
||||
}
|
||||
@@ -202,9 +208,12 @@ public sealed class CriminalRecordsConsoleSystem : EntitySystem
|
||||
var serverEv = new EventGetCache();
|
||||
RaiseLocalEvent(serverEv);
|
||||
|
||||
var hasServer = new EventCheckServer();
|
||||
RaiseLocalEvent(hasServer);
|
||||
|
||||
var idCardInfo = console.ContainedID != null ? new IdCardNetInfo(console.ContainedID.FullName, console.ContainedID.JobTitle) : null;
|
||||
|
||||
CriminalRecordsConsoleBuiState newState = new(console.ActiveKey, record, listing, serverEv.Cache, idCardInfo, AccessCheck(console.ContainedID)); //console.Filter
|
||||
CriminalRecordsConsoleBuiState newState = new(console.ActiveKey, record, listing, serverEv.Cache, idCardInfo, AccessCheck(console.ContainedID), hasServer.Result); //console.Filter
|
||||
SetStateForInterface(uid, newState);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,10 +48,11 @@ public sealed class CriminalRecordsConsoleBuiState : BoundUserInterfaceState
|
||||
public Dictionary<StationRecordKey, CriminalRecordInfo>? Cache { get; }
|
||||
public IdCardNetInfo? ContainedId { get; }
|
||||
public bool IsAllowed { get; }
|
||||
public bool HasServer { get; }
|
||||
//public GeneralStationRecordsFilter? Filter { get; }
|
||||
public CriminalRecordsConsoleBuiState(StationRecordKey? key, GeneralStationRecord? record,
|
||||
Dictionary<StationRecordKey, string>? recordListing, Dictionary<StationRecordKey, CriminalRecordInfo>? cache
|
||||
, IdCardNetInfo? containedId, bool isAllowed) //GeneralStationRecordsFilter? newFilter
|
||||
, IdCardNetInfo? containedId, bool isAllowed, bool hasServer) //GeneralStationRecordsFilter? newFilter
|
||||
{
|
||||
SelectedKey = key;
|
||||
Record = record;
|
||||
@@ -59,6 +60,7 @@ public sealed class CriminalRecordsConsoleBuiState : BoundUserInterfaceState
|
||||
Cache = cache;
|
||||
ContainedId = containedId;
|
||||
IsAllowed = isAllowed;
|
||||
HasServer = hasServer;
|
||||
//Filter = newFilter;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,12 @@ criminal-console-list = Список экипажа
|
||||
criminal-console-name = консоль криминальных записей
|
||||
criminal-grant-status-button-name = Статус
|
||||
|
||||
criminal-list-focus = Нажмите для редактирования
|
||||
|
||||
criminal-login-out = Log Out
|
||||
criminal-login-out-desc = Выйти
|
||||
criminal-login-in = Log In
|
||||
criminal-login-in-desc = Войти
|
||||
criminal-login-info = ID: {$user}
|
||||
criminal-login-hint = Вставьте ID карту в консоль, нажав на "{$name}" (нужно держать ID карту в руке)
|
||||
criminal-login-warn = WARNING: Доступ к системе осуществляется уровнем доступа "службы безопасности"
|
||||
@@ -36,4 +40,7 @@ criminal-fingerprint-desc = - [color={$color}]{$info}[/color]
|
||||
criminal-detail-info = Заметка:
|
||||
|
||||
ent-CriminalRecordsServer = сервер криминальных записей
|
||||
.desc = Содержит все преступные записи об экипажа на станции. Не дайте злоумышлиникам уничтожить его!
|
||||
.desc = Содержит все преступные записи об экипаже на станции. Не дайте злоумышлиникам уничтожить его!
|
||||
|
||||
ent-CriminalRecordsServerCircuitboard = схема платы сервера криминальных записей
|
||||
.desc = Если сломали старый, постройте новый!
|
||||
|
||||
@@ -83,6 +83,9 @@
|
||||
- type: Stripping
|
||||
- type: SolutionScanner
|
||||
- type: IgnoreUIRange
|
||||
- type: ShowSecurityIcons
|
||||
- type: ShowHealthIcons
|
||||
- type: ShowWhiteHealthBars
|
||||
|
||||
- type: entity
|
||||
id: ActionAGhostShowSolar
|
||||
|
||||
@@ -436,6 +436,7 @@
|
||||
- SodaDispenserMachineCircuitboard
|
||||
- TelecomServerCircuitboard
|
||||
- MassMediaCircuitboard
|
||||
- CriminalRecordsServerCircuitboard # WD-EDIT
|
||||
- type: MaterialStorage
|
||||
whitelist:
|
||||
tags:
|
||||
|
||||
@@ -781,3 +781,13 @@
|
||||
Steel: 100
|
||||
Glass: 900
|
||||
Gold: 100
|
||||
|
||||
# WD-EDIT
|
||||
|
||||
- type: latheRecipe
|
||||
id: CriminalRecordsServerCircuitboard
|
||||
result: CriminalRecordsServerCircuitboard
|
||||
completetime: 4
|
||||
materials:
|
||||
Steel: 100
|
||||
Glass: 900
|
||||
|
||||
Reference in New Issue
Block a user