Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream merge 8 #196

Merged
merged 67 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
4509312
Revert "Localize walls (#18827)" (#18881)
Vordenburg Aug 8, 2023
2df7079
Add access configurator (#18638)
chromiumboy Aug 8, 2023
2196dd2
Automatic changelog update
PJBot Aug 8, 2023
b84b88d
Update disk.yml (#18871)
lzk228 Aug 8, 2023
2714101
Fix sprite state for brute and burn auto-injectors (#18866)
JoeHammad1844 Aug 8, 2023
375f487
Fix stun baton throwing and visual effect (#18777)
Slava0135 Aug 8, 2023
2597668
Automatic changelog update
PJBot Aug 8, 2023
07f932a
New /vg/ nuke sprite (#18890)
PJB3005 Aug 8, 2023
2401002
Automatic changelog update
PJBot Aug 8, 2023
181086b
packed update (#18893)
Emisse Aug 8, 2023
a99f1da
Add More Fluff To Maintenance Spawners (#18895)
Nairodian Aug 9, 2023
88988ff
Automatic changelog update
PJBot Aug 9, 2023
68018ee
Disable wheelchair trait (#18896)
QuietlyWhisper Aug 9, 2023
7381a03
Automatic changelog update
PJBot Aug 9, 2023
4775fd4
Space cat survives in space (#18889)
Doru991 Aug 9, 2023
cf14383
Automatic changelog update
PJBot Aug 9, 2023
50f0d10
Fix metabolizer exception (#18878)
metalgearsloth Aug 9, 2023
7489d90
saltern teg groundworks and comms fix (#18849)
deltanedas Aug 9, 2023
45c69f1
Replaces CEV-Eris style rocks with SS13 ones, adds Ironrock (#18898)
Flareguy Aug 9, 2023
61f546d
Automatic changelog update
PJBot Aug 9, 2023
6b2fef1
small moth changes (#18810)
LankLTE Aug 9, 2023
b354688
Automatic changelog update
PJBot Aug 9, 2023
e3f491c
Make metal crates reflect energy projectiles (#18884)
Vordenburg Aug 9, 2023
9124c60
Fix assert when arming the nuke (#18891)
PJB3005 Aug 9, 2023
c12fd36
Fix PA admin warning FTL string (#18887)
lapatison Aug 9, 2023
1856d6a
Add clothing toggle to character editor (#18903)
metalgearsloth Aug 9, 2023
383c284
Automatic changelog update
PJBot Aug 9, 2023
c4067df
Add IgnoreKudzu for Diona (#18916)
Vordenburg Aug 9, 2023
47f53c8
Automatic changelog update
PJBot Aug 9, 2023
a8c9158
Taxibot robot speech bubble (#18919)
themias Aug 9, 2023
aee88e1
Automatic changelog update
PJBot Aug 9, 2023
d3244b6
copy-settings-to-all-similar for scrubbers and vents in air alarms (#…
Ilya246 Aug 9, 2023
22f82c0
Automatic changelog update
PJBot Aug 9, 2023
5b2d20b
Disabler inhand sprites (#18918)
Errant-4 Aug 9, 2023
c5af5c1
vehicles cannot be shot (#18910)
deltanedas Aug 9, 2023
a78aa42
fix hair (#18931)
Emisse Aug 10, 2023
71d3689
qm turtleneck (#18909)
Emisse Aug 10, 2023
ac71bf8
qm uniform pants are now khakis (#18926)
Emisse Aug 10, 2023
4d2c039
Improved Coloring Layers For Moth Wings (#18929)
Nairodian Aug 10, 2023
75c2e41
Automatic changelog update
PJBot Aug 10, 2023
3457729
Added Mustard (#18930)
Interrobang01 Aug 10, 2023
e4bfb27
Automatic changelog update
PJBot Aug 10, 2023
30f0ad2
Botany tweaks vol. 2 (#18888)
Doru991 Aug 10, 2023
b688a06
Automatic changelog update
PJBot Aug 10, 2023
59e32b8
Add SolutionScanner to admin ghost (#18932)
crazybrain23 Aug 10, 2023
d951064
Automatic changelog update
PJBot Aug 10, 2023
1f3a4be
Fix marking color bands (#18934)
metalgearsloth Aug 10, 2023
705a5e9
Automatic changelog update
PJBot Aug 10, 2023
9da4679
Remove or fix broken Dirty() calls. (#18933)
ElectroJr Aug 10, 2023
267783b
Update engine to v147.0.0 (#18936)
ElectroJr Aug 10, 2023
c6bfea6
Automatic changelog update
PJBot Aug 10, 2023
9550a04
Adds Sechud to lockers and sec techfab (#18907)
QuietlyWhisper Aug 10, 2023
1de28ac
Automatic changelog update
PJBot Aug 10, 2023
5688c40
Resprite grappling hook (#18939)
metalgearsloth Aug 10, 2023
b789f5a
Automatic changelog update
PJBot Aug 10, 2023
30abda2
moths magboots fix (#18942)
LankLTE Aug 10, 2023
ab8c550
Update battery_guns.yml (#18946)
CrigCrag Aug 10, 2023
13991d3
Automatic changelog update
PJBot Aug 10, 2023
636819f
Hacking protections for airlocks (#18894)
chromiumboy Aug 10, 2023
0964496
Automatic changelog update
PJBot Aug 10, 2023
829f2f8
Remove request computer board steal objective (#18925)
EmoGarbage404 Aug 10, 2023
7e1e761
Automatic changelog update
PJBot Aug 10, 2023
b2bf492
Nerf emp pricing, add EMP kit to uplink (#18877)
misandrie Aug 10, 2023
4b803af
Automatic changelog update
PJBot Aug 10, 2023
5914538
Merge branch 'master' of https://github.com/space-wizards/space-stati…
TheArturZh Aug 10, 2023
b1bd431
Post-merge fixes
TheArturZh Aug 10, 2023
d7d3e8f
Merge branch 'master' of https://github.com/space-wizards/space-stati…
TheArturZh Aug 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Content.Client/Access/AccessOverriderSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Content.Shared.Access.Systems;
using JetBrains.Annotations;

namespace Content.Client.Access
{
[UsedImplicitly]
public sealed class AccessOverriderSystem : SharedAccessOverriderSystem
{

}
}
72 changes: 72 additions & 0 deletions Content.Client/Access/UI/AccessOverriderBoundUserInterface.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Content.Shared.Containers.ItemSlots;
using Robust.Client.GameObjects;
using Robust.Shared.Prototypes;
using static Content.Shared.Access.Components.AccessOverriderComponent;

namespace Content.Client.Access.UI
{
public sealed class AccessOverriderBoundUserInterface : BoundUserInterface
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
private readonly SharedAccessOverriderSystem _accessOverriderSystem = default!;

private AccessOverriderWindow? _window;

public AccessOverriderBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
_accessOverriderSystem = EntMan.System<SharedAccessOverriderSystem>();
}

protected override void Open()
{
base.Open();

List<string> accessLevels;

if (EntMan.TryGetComponent<AccessOverriderComponent>(Owner, out var accessOverrider))
{
accessLevels = accessOverrider.AccessLevels;
accessLevels.Sort();
}

else
{
accessLevels = new List<string>();
_accessOverriderSystem.Log.Error($"No AccessOverrider component found for {EntMan.ToPrettyString(Owner)}!");
}

_window = new AccessOverriderWindow(this, _prototypeManager, accessLevels)
{
Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName
};

_window.PrivilegedIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(PrivilegedIdCardSlotId));

_window.OnClose += Close;
_window.OpenCentered();
}

protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing)
return;

_window?.Dispose();
}

protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
var castState = (AccessOverriderBoundUserInterfaceState) state;
_window?.UpdateState(castState);
}

public void SubmitData(List<string> newAccessList)
{
SendMessage(new WriteToTargetAccessReaderIdMessage(newAccessList));
}
}
}
23 changes: 23 additions & 0 deletions Content.Client/Access/UI/AccessOverriderWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<DefaultWindow xmlns="https://spacestation14.io"
MinSize="650 290">
<BoxContainer Orientation="Vertical">
<GridContainer Columns="2">
<GridContainer Columns="3" HorizontalExpand="True">
<Label Text="{Loc 'access-overrider-window-privileged-id'}" />
<Button Name="PrivilegedIdButton" Access="Public"/>
<Label Name="PrivilegedIdLabel" />
</GridContainer>
</GridContainer>
<Label Name="TargetNameLabel" />
<Control MinSize="0 8"/>
<GridContainer Name="AccessLevelGrid" Columns="5" HorizontalAlignment="Center">

<!-- Access level buttons are added here by the C# code -->

</GridContainer>
<Control MinSize="0 8"/>
<Label Name="MissingPrivilegesLabel" />
<Control MinSize="0 4"/>
<Label Name="MissingPrivilegesText" />
</BoxContainer>
</DefaultWindow>
111 changes: 111 additions & 0 deletions Content.Client/Access/UI/AccessOverriderWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
using System.Linq;
using Content.Shared.Access;
using Content.Shared.Access.Systems;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Prototypes;
using static Content.Shared.Access.Components.AccessOverriderComponent;

namespace Content.Client.Access.UI
{
[GenerateTypedNameReferences]
public sealed partial class AccessOverriderWindow : DefaultWindow
{
[Dependency] private readonly ILogManager _logManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;

private readonly ISawmill _logMill = default!;
private readonly AccessOverriderBoundUserInterface _owner;
private readonly Dictionary<string, Button> _accessButtons = new();

public AccessOverriderWindow(AccessOverriderBoundUserInterface owner, IPrototypeManager prototypeManager,
List<string> accessLevels)
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
_logMill = _logManager.GetSawmill(SharedAccessOverriderSystem.Sawmill);

_owner = owner;

foreach (var access in accessLevels)
{
if (!prototypeManager.TryIndex<AccessLevelPrototype>(access, out var accessLevel))
{
_logMill.Error($"Unable to find accesslevel for {access}");
continue;
}

var newButton = new Button
{
Text = GetAccessLevelName(accessLevel),
ToggleMode = true,
};

AccessLevelGrid.AddChild(newButton);
_accessButtons.Add(accessLevel.ID, newButton);
newButton.OnPressed += _ => SubmitData();
}
}

private static string GetAccessLevelName(AccessLevelPrototype prototype)
{
if (prototype.Name is { } name)
return Loc.GetString(name);

return prototype.ID;
}

public void UpdateState(AccessOverriderBoundUserInterfaceState state)
{
PrivilegedIdLabel.Text = state.PrivilegedIdName;
PrivilegedIdButton.Text = state.IsPrivilegedIdPresent
? Loc.GetString("access-overrider-window-eject-button")
: Loc.GetString("access-overrider-window-insert-button");

TargetNameLabel.Text = state.TargetLabel;
TargetNameLabel.FontColorOverride = state.TargetLabelColor;

MissingPrivilegesLabel.Text = "";
MissingPrivilegesLabel.FontColorOverride = Color.Yellow;

MissingPrivilegesText.Text = "";
MissingPrivilegesText.FontColorOverride = Color.Yellow;

if (state.MissingPrivilegesList != null && state.MissingPrivilegesList.Any())
{
List<string> missingPrivileges = new List<string>();

foreach (string tag in state.MissingPrivilegesList)
{
string privilege = Loc.GetString(_prototypeManager.Index<AccessLevelPrototype>(tag)?.Name ?? "generic-unknown");
missingPrivileges.Add(privilege);
}

MissingPrivilegesLabel.Text = Loc.GetString("access-overrider-window-missing-privileges");
MissingPrivilegesText.Text = string.Join(", ", missingPrivileges);
}

var interfaceEnabled = state.IsPrivilegedIdPresent && state.IsPrivilegedIdAuthorized;

foreach (var (accessName, button) in _accessButtons)
{
button.Disabled = !interfaceEnabled;
if (interfaceEnabled)
{
button.Pressed = state.TargetAccessReaderIdAccessList?.Contains(accessName) ?? false;
button.Disabled = (!state.AllowedModifyAccessList?.Contains(accessName)) ?? true;
}
}
}

private void SubmitData()
{
_owner.SubmitData(

// Iterate over the buttons dictionary, filter by `Pressed`, only get key from the key/value pair
_accessButtons.Where(x => x.Value.Pressed).Select(x => x.Key).ToList());
}
}
}
6 changes: 6 additions & 0 deletions Content.Client/Atmos/Monitor/UI/AirAlarmBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ protected override void Open()

_window.OnClose += Close;
_window.AtmosDeviceDataChanged += OnDeviceDataChanged;
_window.AtmosDeviceDataCopied += OnDeviceDataCopied;
_window.AtmosAlarmThresholdChanged += OnThresholdChanged;
_window.AirAlarmModeChanged += OnAirAlarmModeChanged;
_window.AutoModeChanged += OnAutoModeChanged;
Expand All @@ -47,6 +48,11 @@ private void OnDeviceDataChanged(string address, IAtmosDeviceData data)
{
SendMessage(new AirAlarmUpdateDeviceDataMessage(address, data));
}

private void OnDeviceDataCopied(IAtmosDeviceData data)
{
SendMessage(new AirAlarmCopyDeviceDataMessage(data));
}

private void OnAirAlarmModeChanged(AirAlarmMode mode)
{
Expand Down
3 changes: 3 additions & 0 deletions Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace Content.Client.Atmos.Monitor.UI;
public sealed partial class AirAlarmWindow : FancyWindow
{
public event Action<string, IAtmosDeviceData>? AtmosDeviceDataChanged;
public event Action<IAtmosDeviceData>? AtmosDeviceDataCopied;
public event Action<string, AtmosMonitorThresholdType, AtmosAlarmThreshold, Gas?>? AtmosAlarmThresholdChanged;
public event Action<AirAlarmMode>? AirAlarmModeChanged;
public event Action<bool>? AutoModeChanged;
Expand Down Expand Up @@ -137,6 +138,7 @@ public void UpdateDeviceData(string addr, IAtmosDeviceData device)
{
var control= new PumpControl(pump, addr);
control.PumpDataChanged += AtmosDeviceDataChanged!.Invoke;
control.PumpDataCopied += AtmosDeviceDataCopied!.Invoke;
_pumps.Add(addr, control);
CVentContainer.AddChild(control);
}
Expand All @@ -151,6 +153,7 @@ public void UpdateDeviceData(string addr, IAtmosDeviceData device)
{
var control = new ScrubberControl(scrubber, addr);
control.ScrubberDataChanged += AtmosDeviceDataChanged!.Invoke;
control.ScrubberDataCopied += AtmosDeviceDataCopied!.Invoke;
_scrubbers.Add(addr, control);
CScrubberContainer.AddChild(control);
}
Expand Down
5 changes: 4 additions & 1 deletion Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<OptionButton Name="CPressureCheck" />
</BoxContainer>
</BoxContainer>
<!-- Lower row: pressure bounds -->
<!-- Lower row: pressure bounds, copy settings -->
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
<Label Text="{Loc 'air-alarm-ui-vent-external-bound-label'}" Margin="0 0 0 1" />
Expand All @@ -30,6 +30,9 @@
<FloatSpinBox Name="CInternalBound" HorizontalExpand="True" />
</BoxContainer>
</BoxContainer>
<BoxContainer Orientation="Horizontal" Margin ="0 0 0 2">
<Button Name="CCopySettings" Text="{Loc 'air-alarm-ui-widget-copy'}" ToolTip="{Loc 'air-alarm-ui-widget-copy-tooltip'}" />
</BoxContainer>
</BoxContainer>
</CollapsibleBody>
</Collapsible>
Expand Down
7 changes: 7 additions & 0 deletions Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ public sealed partial class PumpControl : BoxContainer
private string _address;

public event Action<string, IAtmosDeviceData>? PumpDataChanged;
public event Action<IAtmosDeviceData>? PumpDataCopied;

private CheckBox _enabled => CEnableDevice;
private CollapsibleHeading _addressLabel => CAddress;
private OptionButton _pumpDirection => CPumpDirection;
private OptionButton _pressureCheck => CPressureCheck;
private FloatSpinBox _externalBound => CExternalBound;
private FloatSpinBox _internalBound => CInternalBound;
private Button _copySettings => CCopySettings;

public PumpControl(GasVentPumpData data, string address)
{
Expand Down Expand Up @@ -84,6 +86,11 @@ public PumpControl(GasVentPumpData data, string address)
_data.PressureChecks = (VentPressureBound) args.Id;
PumpDataChanged?.Invoke(_address, _data);
};

_copySettings.OnPressed += _ =>
{
PumpDataCopied?.Invoke(_data);
};
}

public void ChangeData(GasVentPumpData data)
Expand Down
5 changes: 4 additions & 1 deletion Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<BoxContainer Orientation="Horizontal" Margin="0 0 0 2">
<CheckBox Name="CEnableDevice" Text="{Loc 'air-alarm-ui-widget-enable'}" />
</BoxContainer>
<!-- Upper row: toggle, direction, volume rate, widenet -->
<!-- Upper row: toggle, direction, volume rate, widenet, copy settings -->
<BoxContainer Orientation="Horizontal" Margin="0 0 0 2" HorizontalExpand="True">
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
<Label Text="{Loc 'air-alarm-ui-scrubber-pump-direction-label'}" Margin="0 0 0 1"/>
Expand All @@ -22,6 +22,9 @@
<BoxContainer>
<CheckBox Name="CWideNet" Text="{Loc 'air-alarm-ui-scrubber-wide-net-label'}" />
</BoxContainer>
<BoxContainer Orientation="Horizontal" Margin ="0 0 0 2">
<Button Name="CCopySettings" Text="{Loc 'air-alarm-ui-widget-copy'}" ToolTip="{Loc 'air-alarm-ui-widget-copy-tooltip'}" />
</BoxContainer>
<!-- Lower row: every single gas -->
<Collapsible Orientation="Vertical" Margin="2 2 2 2">
<CollapsibleHeading Title="Gas filters" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ public sealed partial class ScrubberControl : BoxContainer
private string _address;

public event Action<string, IAtmosDeviceData>? ScrubberDataChanged;
public event Action<IAtmosDeviceData>? ScrubberDataCopied;

private CheckBox _enabled => CEnableDevice;
private CollapsibleHeading _addressLabel => CAddress;
private OptionButton _pumpDirection => CPumpDirection;
private FloatSpinBox _volumeRate => CVolumeRate;
private CheckBox _wideNet => CWideNet;
private Button _copySettings => CCopySettings;

private GridContainer _gases => CGasContainer;
private Dictionary<Gas, Button> _gasControls = new();
Expand Down Expand Up @@ -75,6 +77,11 @@ public ScrubberControl(GasVentScrubberData data, string address)
_data.PumpDirection = (ScrubberPumpDirection) args.Id;
ScrubberDataChanged?.Invoke(_address, _data);
};

_copySettings.OnPressed += _ =>
{
ScrubberDataCopied?.Invoke(_data);
};

foreach (var value in Enum.GetValues<Gas>())
{
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Corvax/TTS/HumanoidProfileEditor.TTS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private void InitializeVoice()
_voiceButton.SelectId(args.Id);
SetVoice(_voiceList[args.Id].ID);
};

_voicePlayButton.OnPressed += _ => { PlayTTS(); };
}

Expand All @@ -52,7 +52,7 @@ private void UpdateTTSVoicesControls()
var voice = _voiceList[i];
if (!HumanoidCharacterProfile.CanHaveVoice(voice, Profile.Sex))
continue;

var name = Loc.GetString(voice.Name);
_voiceButton.AddItem(name, i);

Expand Down
Loading
Loading