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