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

[Tweak] Upstream sync #976

Merged
merged 92 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
ecdba1c
[Maps] Silly Winter Update (#2809)
Doctorjakes Nov 30, 2024
a793bc4
[Maps] Pilgrim update #7 — Winter (#2821)
Ko4ergaPunk Nov 30, 2024
021c983
Fix for handcuffing someone more than once (#33646)
Plykiya Nov 30, 2024
973f42b
Automatic changelog update
PJBot Nov 30, 2024
450bf81
Fix for inspecting entities in hand (#33642)
Plykiya Nov 30, 2024
3d98460
Automatic changelog update
PJBot Nov 30, 2024
fb76cd9
Fix for inspecting entities in the stripping window (#33644)
Plykiya Nov 30, 2024
766389a
Automatic changelog update
PJBot Nov 30, 2024
ab36b15
Fix borgs not getting names on roundstart (#33578)
Winkarst-cpu Nov 30, 2024
720fccf
Automatic changelog update
PJBot Nov 30, 2024
efb35d7
Require Wield To Activate Double-bladed ESword (#32869)
thetolbean Nov 30, 2024
44ef60a
Automatic changelog update
PJBot Nov 30, 2024
061b1b8
Fix makeghostroleraffle command where 4 arguments (#31836)
TokenStyle Nov 30, 2024
a46323d
Automatic changelog update
PJBot Nov 30, 2024
3984f0a
Update Credits (#33670)
github-actions[bot] Dec 1, 2024
2d405c9
Fix formatting IDE0055 warnings in VS Code (#33669)
CrafterKolyan Dec 1, 2024
5fdf03c
Replace obsolete GetTilesIntersecting methods (#32455)
MilenVolf Dec 1, 2024
feb2e21
delta winter (#2824)
Bloodcanis Dec 1, 2024
bf312f2
Update Snowasis (#33364)
IProduceWidgets Dec 1, 2024
237324e
Automatic changelog update
PJBot Dec 1, 2024
05d4513
[MAPS] Paper Cristmass update (#2822)
XsenonDash Dec 1, 2024
d4067bc
Fix wrong system usage (#33679)
MilenVolf Dec 1, 2024
fba997e
resprite new year nuke (#2825)
SonicHDC Dec 1, 2024
b3841e8
Fix BuckleSystem always marking InteractHandEvent as Handled (#33602)
MilenVolf Dec 1, 2024
560fd8d
Automatic changelog update
PJBot Dec 1, 2024
7f966ab
Touching up Bagel Security Brig (#33680)
dylanstrategie Dec 2, 2024
768d2ba
[Maps] Tushkan update #3 — Winter (#2826)
Ko4ergaPunk Dec 2, 2024
eada6f3
Map pool tweak (#2827)
Ko4ergaPunk Dec 2, 2024
638a1dc
Fixed ghost role rules for some syndicate familiars (#32457)
JIPDawg Dec 2, 2024
cc804bf
Automatic changelog update
PJBot Dec 2, 2024
b800d98
Fix lobby countdown not showing hours (#33685)
SpaceManiac Dec 2, 2024
e4e84ae
New Low-Mid Pop Station - Amber Station (#33441)
southbridge-fur Dec 3, 2024
f0829a6
Automatic changelog update
PJBot Dec 3, 2024
2e31eb3
Makes kukri not use combat knife's storage sprite (#33661)
SpaceRox1244 Dec 3, 2024
c1491e9
Adds a morgue locked maints airlock (#33693)
IamVelcroboy Dec 3, 2024
029b037
Juiceable slimeballs (#33660)
luizwritescode Dec 3, 2024
e50c98c
Add missing nacho recipes (#33637)
CheddaCheez Dec 3, 2024
bfd005a
Automatic changelog update
PJBot Dec 3, 2024
2c2a435
Amber Station Seasonal Update (#33698)
southbridge-fur Dec 3, 2024
8902943
[Maps] Pilgrim update #8 & Silly tweak (#2828)
Ko4ergaPunk Dec 3, 2024
8718263
Amber Improvements (#33707)
southbridge-fur Dec 3, 2024
cf202e8
Fix sinks and toilets not draining (#33691)
Partmedia Dec 4, 2024
7ffd801
Automatic changelog update
PJBot Dec 4, 2024
c10a72b
Fix layout on wires UI (#33714)
PJB3005 Dec 4, 2024
fc8f7fb
Automatic changelog update
PJBot Dec 4, 2024
2e26ca7
Fix for towels not having a cooldown for cleaning (#33700)
tapiocaphobe Dec 4, 2024
152cf33
Add cooldown to buttons in borg's laws UI (#31490)
Hreno Dec 4, 2024
82528dc
Adds Store on Collide and Wand of the Locker (#33710)
keronshb Dec 4, 2024
fbfcccb
Automatic changelog update
PJBot Dec 4, 2024
e76bb1f
Merge remote-tracking branch 'wizards/master' into upstream-sync
Morb0 Dec 4, 2024
214b315
Update locale
Morb0 Dec 4, 2024
da68ae9
Amber Station - Removed Vox Box (#33725)
southbridge-fur Dec 5, 2024
e5ea431
Fix upstream
Morb0 Dec 5, 2024
f02ba8b
Merge pull request #2830 from space-syndicate/upstream-sync
Morb0 Dec 5, 2024
90c8776
bagel update (#33726)
Emisse Dec 5, 2024
bcf2b9a
Box Station - Removed Vox Box (#33729)
southbridge-fur Dec 5, 2024
59bce41
Cog vox box removal (#33730)
Spessmann Dec 5, 2024
6f51aa4
More device configurator serialization fixes (#33664)
ElectroJr Dec 5, 2024
ce672ac
Fix meteor's ArithmeticException (#33556)
Winkarst-cpu Dec 5, 2024
8986c27
update server configs (#2799)
lzk228 Dec 5, 2024
dc8b859
Give vox health regen for poison below 20 damage (#33722)
PJB3005 Dec 5, 2024
97ece02
Automatic changelog update
PJBot Dec 5, 2024
8f3973b
set n2 survival box sprite layers (#33733)
IProduceWidgets Dec 5, 2024
0e6ec2e
Automatic changelog update
PJBot Dec 5, 2024
cf698b2
Fix displacements map for female vulp and reptilian (#2832)
Litogin Dec 5, 2024
3e0b93d
fix a station event weighting bug (#33584)
IProduceWidgets Dec 6, 2024
cd1177d
Automatic changelog update
PJBot Dec 6, 2024
207c849
Adds Station Anchor Beacon (#33711)
IamVelcroboy Dec 6, 2024
d6ba759
Fix name duplications (#33740)
MilenVolf Dec 6, 2024
52a8869
Add a maintenance panel to bar signs (#33467)
Winkarst-cpu Dec 6, 2024
38c8ffb
Automatic changelog update
PJBot Dec 6, 2024
274c3ab
Derelict Borg Revival (#33433)
ScarKy0 Dec 6, 2024
94090f7
Automatic changelog update
PJBot Dec 6, 2024
623a35b
Amber Station - Added Evac Shuttle (#33743)
southbridge-fur Dec 6, 2024
2d6e52b
vox guidebook update poison regen (#33739)
Errant-4 Dec 6, 2024
7d410d6
Fix debris chunks loot spawning (#33747)
TheShuEd Dec 6, 2024
d6d95f1
Automatic changelog update
PJBot Dec 6, 2024
6add781
Added several variables to make ClumsyComponent more modular for deve…
widgetbeck Dec 6, 2024
de19418
Add Sprite changes to Logic Gates to show the input/output state (#33…
0tito Dec 6, 2024
e244472
Samurai dogi is now major contraband (#33699)
K-Dynamic Dec 6, 2024
b66fd98
Localize ai dataset names (#33608)
MilenVolf Dec 6, 2024
3300ff2
clean up random lathe recipes (#31525)
deltanedas Dec 6, 2024
4beb101
Make unknown shuttle events trigger an announcement (#33450)
Winkarst-cpu Dec 6, 2024
9365e3a
Predicted gas pumps (#33717)
metalgearsloth Dec 7, 2024
44daf85
Automatic changelog update
PJBot Dec 7, 2024
0d45dfa
Christmas Nuke Song (#33752)
Piras314 Dec 7, 2024
1a96a2b
Automatic changelog update
PJBot Dec 7, 2024
cf73cd5
Box Station - Now more festive! (#33751)
southbridge-fur Dec 7, 2024
7f5c3cf
infiltrator update (#33759)
Emisse Dec 7, 2024
2a18da0
Merge remote-tracking branch 'wizard/master' into upstream-sync
Roudenn Dec 7, 2024
eb5def3
Merge remote-tracking branch 'corvax/master' into upstream-sync
Roudenn Dec 7, 2024
60b5161
fix
Roudenn Dec 7, 2024
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
12 changes: 6 additions & 6 deletions Content.Client/Actions/ActionsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,13 @@ public void UnlinkAllActions()

public void LinkAllActions(ActionsComponent? actions = null)
{
if (_playerManager.LocalEntity is not { } user ||
!Resolve(user, ref actions, false))
{
return;
}
if (_playerManager.LocalEntity is not { } user ||
!Resolve(user, ref actions, false))
{
return;
}

LinkActions?.Invoke(actions);
LinkActions?.Invoke(actions);
}

public override void Shutdown()
Expand Down
23 changes: 23 additions & 0 deletions Content.Client/Atmos/EntitySystems/GasPressurePumpSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Content.Client.Atmos.UI;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
using Content.Shared.Atmos.Piping.Binary.Components;

namespace Content.Client.Atmos.EntitySystems;

public sealed class GasPressurePumpSystem : SharedGasPressurePumpSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<GasPressurePumpComponent, AfterAutoHandleStateEvent>(OnPumpUpdate);
}

private void OnPumpUpdate(Entity<GasPressurePumpComponent> ent, ref AfterAutoHandleStateEvent args)
{
if (UserInterfaceSystem.TryGetOpenUi<GasPressurePumpBoundUserInterface>(ent.Owner, GasPressurePumpUiKey.Key, out var bui))
{
bui.Update();
}
}
}
90 changes: 44 additions & 46 deletions Content.Client/Atmos/UI/GasPressurePumpBoundUserInterface.cs
Original file line number Diff line number Diff line change
@@ -1,65 +1,63 @@
using Content.Shared.Atmos;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.Piping.Binary.Components;
using Content.Shared.IdentityManagement;
using Content.Shared.Localizations;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;

namespace Content.Client.Atmos.UI
namespace Content.Client.Atmos.UI;

/// <summary>
/// Initializes a <see cref="GasPressurePumpWindow"/> and updates it when new server messages are received.
/// </summary>
[UsedImplicitly]
public sealed class GasPressurePumpBoundUserInterface : BoundUserInterface
{
/// <summary>
/// Initializes a <see cref="GasPressurePumpWindow"/> and updates it when new server messages are received.
/// </summary>
[UsedImplicitly]
public sealed class GasPressurePumpBoundUserInterface : BoundUserInterface
{
[ViewVariables]
private const float MaxPressure = Atmospherics.MaxOutputPressure;
[ViewVariables]
private const float MaxPressure = Atmospherics.MaxOutputPressure;

[ViewVariables]
private GasPressurePumpWindow? _window;

[ViewVariables]
private GasPressurePumpWindow? _window;
public GasPressurePumpBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}

public GasPressurePumpBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();

protected override void Open()
{
base.Open();
_window = this.CreateWindow<GasPressurePumpWindow>();

_window = this.CreateWindow<GasPressurePumpWindow>();
_window.ToggleStatusButtonPressed += OnToggleStatusButtonPressed;
_window.PumpOutputPressureChanged += OnPumpOutputPressurePressed;
Update();
}

_window.ToggleStatusButtonPressed += OnToggleStatusButtonPressed;
_window.PumpOutputPressureChanged += OnPumpOutputPressurePressed;
}
public void Update()
{
if (_window == null)
return;

private void OnToggleStatusButtonPressed()
{
if (_window is null) return;
SendMessage(new GasPressurePumpToggleStatusMessage(_window.PumpStatus));
}
_window.Title = Identity.Name(Owner, EntMan);

private void OnPumpOutputPressurePressed(string value)
{
var pressure = UserInputParser.TryFloat(value, out var parsed) ? parsed : 0f;
if (pressure > MaxPressure) pressure = MaxPressure;
if (!EntMan.TryGetComponent(Owner, out GasPressurePumpComponent? pump))
return;

SendMessage(new GasPressurePumpChangeOutputPressureMessage(pressure));
}
_window.SetPumpStatus(pump.Enabled);
_window.MaxPressure = pump.MaxTargetPressure;
_window.SetOutputPressure(pump.TargetPressure);
}

/// <summary>
/// Update the UI state based on server-sent info
/// </summary>
/// <param name="state"></param>
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
if (_window == null || state is not GasPressurePumpBoundUserInterfaceState cast)
return;
private void OnToggleStatusButtonPressed()
{
if (_window is null) return;
SendPredictedMessage(new GasPressurePumpToggleStatusMessage(_window.PumpStatus));
}

_window.Title = (cast.PumpLabel);
_window.SetPumpStatus(cast.Enabled);
_window.SetOutputPressure(cast.OutputPressure);
}
private void OnPumpOutputPressurePressed(float value)
{
SendPredictedMessage(new GasPressurePumpChangeOutputPressureMessage(value));
}
}
22 changes: 9 additions & 13 deletions Content.Client/Atmos/UI/GasPressurePumpWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
<DefaultWindow xmlns="https://spacestation14.io"
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
MinSize="200 120" Title="Pressure Pump">
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
SetSize="340 110" MinSize="340 110" Title="Pressure Pump">
<BoxContainer Orientation="Vertical" Margin="5 5 5 5" SeparationOverride="10">
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<Label Text="{Loc comp-gas-pump-ui-pump-status}"/>
<Control MinSize="5 0" />
<Label Text="{Loc comp-gas-pump-ui-pump-status}" Margin="0 0 5 0"/>
<Button Name="ToggleStatusButton"/>
<Control HorizontalExpand="True"/>
<Button HorizontalAlignment="Right" Name="SetOutputPressureButton" Text="{Loc comp-gas-pump-ui-pump-set-rate}" Disabled="True" Margin="0 0 5 0"/>
<Button Name="SetMaxPressureButton" Text="{Loc comp-gas-pump-ui-pump-set-max}" />
</BoxContainer>

<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<Label Text="{Loc comp-gas-pump-ui-pump-output-pressure}"/>
<Control MinSize="5 0" />
<LineEdit Name="PumpPressureOutputInput" MinSize="70 0" />
<Control MinSize="5 0" />
<Button Name="SetMaxPressureButton" Text="{Loc comp-gas-pump-ui-pump-set-max}" />
<Control MinSize="5 0" />
<Control HorizontalExpand="True" />
<Button Name="SetOutputPressureButton" Text="{Loc comp-gas-pump-ui-pump-set-rate}" HorizontalAlignment="Right" Disabled="True"/>
<FloatSpinBox HorizontalExpand="True" Name="PumpPressureOutputInput" MinSize="70 0" />
</BoxContainer>
</BoxContainer>
</DefaultWindow>
</controls:FancyWindow>
35 changes: 22 additions & 13 deletions Content.Client/Atmos/UI/GasPressurePumpWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using Content.Client.Atmos.EntitySystems;
using Content.Client.UserInterface.Controls;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Prototypes;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Localization;

namespace Content.Client.Atmos.UI
{
/// <summary>
/// Client-side UI used to control a gas pressure pump.
/// </summary>
[GenerateTypedNameReferences]
public sealed partial class GasPressurePumpWindow : DefaultWindow
public sealed partial class GasPressurePumpWindow : FancyWindow
{
public bool PumpStatus = true;

public event Action? ToggleStatusButtonPressed;
public event Action<string>? PumpOutputPressureChanged;
public event Action<float>? PumpOutputPressureChanged;

public float MaxPressure
{
get => _maxPressure;
set
{
_maxPressure = value;

PumpPressureOutputInput.Value = MathF.Min(value, PumpPressureOutputInput.Value);
}
}

private float _maxPressure = Atmospherics.MaxOutputPressure;

public GasPressurePumpWindow()
{
Expand All @@ -30,23 +37,25 @@ public GasPressurePumpWindow()
ToggleStatusButton.OnPressed += _ => SetPumpStatus(!PumpStatus);
ToggleStatusButton.OnPressed += _ => ToggleStatusButtonPressed?.Invoke();

PumpPressureOutputInput.OnTextChanged += _ => SetOutputPressureButton.Disabled = false;
PumpPressureOutputInput.OnValueChanged += _ => SetOutputPressureButton.Disabled = false;

SetOutputPressureButton.OnPressed += _ =>
{
PumpOutputPressureChanged?.Invoke(PumpPressureOutputInput.Text ??= "");
PumpPressureOutputInput.Value = Math.Clamp(PumpPressureOutputInput.Value, 0f, _maxPressure);
PumpOutputPressureChanged?.Invoke(PumpPressureOutputInput.Value);
SetOutputPressureButton.Disabled = true;
};

SetMaxPressureButton.OnPressed += _ =>
{
PumpPressureOutputInput.Text = Atmospherics.MaxOutputPressure.ToString(CultureInfo.CurrentCulture);
PumpPressureOutputInput.Value = _maxPressure;
SetOutputPressureButton.Disabled = false;
};
}

public void SetOutputPressure(float pressure)
{
PumpPressureOutputInput.Text = pressure.ToString(CultureInfo.CurrentCulture);
PumpPressureOutputInput.Value = pressure;
}

public void SetPumpStatus(bool enabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Content.Client.Clothing;

public sealed class FlippableClothingVisualizerSystem : VisualizerSystem<FlippableClothingVisualsComponent>
public sealed class FlippableClothingVisualizerSystem : VisualizerSystem<FlippableClothingVisualsComponent>
{
[Dependency] private readonly SharedItemSystem _itemSys = default!;

Expand Down
6 changes: 6 additions & 0 deletions Content.Client/Inventory/StrippableBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,15 @@ private void SlotPressed(GUIBoundKeyEventArgs ev, SlotControl slot)
return;

if (ev.Function == ContentKeyFunctions.ExamineEntity)
{
_examine.DoExamine(slot.Entity.Value);
ev.Handle();
}
else if (ev.Function == EngineKeyFunctions.UseSecondary)
{
_ui.GetUIController<VerbMenuUIController>().OpenVerbMenu(slot.Entity.Value);
ev.Handle();
}
}

private void AddInventoryButton(EntityUid invUid, string slotId, InventoryComponent inv)
Expand Down
6 changes: 5 additions & 1 deletion Content.Client/Lobby/LobbyState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public override void FrameUpdate(FrameEventArgs e)
return;
}

Lobby!.StationTime.Text = Loc.GetString("lobby-state-player-status-round-not-started");
Lobby!.StationTime.Text = Loc.GetString("lobby-state-player-status-round-not-started");
string text;

if (_gameTicker.Paused)
Expand All @@ -142,6 +142,10 @@ public override void FrameUpdate(FrameEventArgs e)
{
text = Loc.GetString(seconds < -5 ? "lobby-state-right-now-question" : "lobby-state-right-now-confirmation");
}
else if (difference.TotalHours >= 1)
{
text = $"{Math.Floor(difference.TotalHours)}:{difference.Minutes:D2}:{difference.Seconds:D2}";
}
else
{
text = $"{difference.Minutes}:{difference.Seconds:D2}";
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Overlays/StencilOverlay.Weather.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private void DrawWeather(in OverlayDrawArgs args, WeatherPrototype weatherProto,
var matty = Matrix3x2.Multiply(matrix, invMatrix);
worldHandle.SetTransform(matty);

foreach (var tile in grid.Comp.GetTilesIntersecting(worldAABB))
foreach (var tile in _map.GetTilesIntersecting(grid.Owner, grid, worldAABB))
{
// Ignored tiles for stencil
if (_weather.CanWeatherAffect(grid.Owner, grid, tile))
Expand Down
4 changes: 3 additions & 1 deletion Content.Client/Overlays/StencilOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public sealed partial class StencilOverlay : Overlay
[Dependency] private readonly IPrototypeManager _protoManager = default!;
private readonly ParallaxSystem _parallax;
private readonly SharedTransformSystem _transform;
private readonly SharedMapSystem _map;
private readonly SpriteSystem _sprite;
private readonly WeatherSystem _weather;

Expand All @@ -33,11 +34,12 @@ public sealed partial class StencilOverlay : Overlay

private readonly ShaderInstance _shader;

public StencilOverlay(ParallaxSystem parallax, SharedTransformSystem transform, SpriteSystem sprite, WeatherSystem weather)
public StencilOverlay(ParallaxSystem parallax, SharedTransformSystem transform, SharedMapSystem map, SpriteSystem sprite, WeatherSystem weather)
{
ZIndex = ParallaxSystem.ParallaxZIndex + 1;
_parallax = parallax;
_transform = transform;
_map = map;
_sprite = sprite;
_weather = weather;
IoCManager.InjectDependencies(this);
Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Overlays/StencilOverlaySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ public sealed class StencilOverlaySystem : EntitySystem
[Dependency] private readonly IOverlayManager _overlay = default!;
[Dependency] private readonly ParallaxSystem _parallax = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly SharedMapSystem _map = default!;
[Dependency] private readonly SpriteSystem _sprite = default!;
[Dependency] private readonly WeatherSystem _weather = default!;

public override void Initialize()
{
base.Initialize();
_overlay.AddOverlay(new StencilOverlay(_parallax, _transform, _sprite, _weather));
_overlay.AddOverlay(new StencilOverlay(_parallax, _transform, _map, _sprite, _weather));
}

public override void Shutdown()
Expand Down
Loading
Loading