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 sync #1893

Merged
merged 77 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
487dd11
Add RequiresGrid component (#23394)
HoofedEar Feb 22, 2024
35723ad
Make even more items good looking in inventory + size changing (#25461)
lzk228 Feb 22, 2024
7ac3a2a
Automatic changelog update
PJBot Feb 22, 2024
83cd108
Add Large Wood Floors (#25462)
ps3moira Feb 22, 2024
2b34970
Automatic changelog update
PJBot Feb 22, 2024
f38a961
fix reagent slime role description being friendly (#25466)
QuietlyWhisper Feb 22, 2024
e6605a7
Automatic changelog update
PJBot Feb 22, 2024
b774759
Give "DO NOT MAP" suffix to handheld crew monitor (#25473)
notquitehadouken Feb 22, 2024
ce0a51f
Predict doors and airlocks (#25419)
EmoGarbage404 Feb 22, 2024
146c7b2
Fix examine text bug for Openable Drinkables (#25478)
Tayrtahn Feb 23, 2024
6568737
Make galoshes obtainable and slowing you (#25484)
lzk228 Feb 23, 2024
84d9f7a
Automatic changelog update
PJBot Feb 23, 2024
381bb90
Add prediction to Openable (#25477)
Tayrtahn Feb 23, 2024
2458c87
Add Ratvar (#24958)
MACMAN2003 Feb 23, 2024
b1de6dd
Switch project files to C# 12. (#25487)
PJB3005 Feb 23, 2024
715794d
Make department / job list sorting consistent. (#25486)
PJB3005 Feb 23, 2024
945c8db
Automatic changelog update
PJBot Feb 23, 2024
4ea1d21
Buff emergency welder (#25483)
liltenhead Feb 23, 2024
b75ff77
Automatic changelog update
PJBot Feb 23, 2024
033f232
Update submodule to 211.0.0 (#25489)
metalgearsloth Feb 23, 2024
d8e5f5c
Optimise DecalOverlay (#25266)
metalgearsloth Feb 23, 2024
af7e802
Fix attribution (#25495)
TheShuEd Feb 23, 2024
237d89c
Fix centcom and other jobs with setPreference set to false showing up…
VasilisThePikachu Feb 23, 2024
2ad3243
Automatic changelog update
PJBot Feb 23, 2024
7a37d4a
Make cargo order unanchored thruster and gyroscope (#25497)
lzk228 Feb 23, 2024
2a5eb86
Minor cookie fortune fix (#25503)
lapatison Feb 23, 2024
39a2ff5
Fix a single grammar error (#25512)
Erisfiregamer1 Feb 24, 2024
786ecd9
Automatic changelog update
PJBot Feb 24, 2024
431f0bd
Update Credits (#25532)
github-actions[bot] Feb 25, 2024
84fff93
Fixed Fire Extinguisher safety range (#25534)
beck-thompson Feb 25, 2024
51caf3b
Automatic changelog update
PJBot Feb 25, 2024
5806401
Remove the ability for command or any antag-safe role from being init…
ArchPigeon Feb 25, 2024
c52820a
Automatic changelog update
PJBot Feb 25, 2024
e1cce9d
Prevent clients from setting their species to whatever they want (#25…
DebugOk Feb 25, 2024
34a6f12
Update submodule to 211.0.2 (#25536)
metalgearsloth Feb 25, 2024
531d722
Increase contrast with hand select for Ashen UI theme (#25517)
UbaserB Feb 25, 2024
9a4c10c
pAI map button sprite change (#25384)
UbaserB Feb 25, 2024
aa4e7c0
Made ordering multiple crates at cargo order multiple crates (#25518)
PolterTzi Feb 25, 2024
e52ebe0
Automatic changelog update
PJBot Feb 25, 2024
ec5edc3
Selectively revert gun penetration (#25551)
metalgearsloth Feb 25, 2024
bcbe2ec
Cleanup ExecutionSystem (#24382)
nikthechampiongr Feb 25, 2024
bb0776c
Revert "Cleanup ExecutionSystem (#24382)" (#25555)
metalgearsloth Feb 25, 2024
51acebd
Automatic changelog update
PJBot Feb 25, 2024
902198d
Fix candy bowls (#25514)
Krunklehorn Feb 25, 2024
6f3893a
Automatic changelog update
PJBot Feb 25, 2024
a440ccf
Fix cuffs popup prediction (#25553)
metalgearsloth Feb 25, 2024
1a5f7c3
Toggleable items shape change on toggle state (#25392)
MilenVolf Feb 25, 2024
1de102d
Juice that makes you Weh! (but real!) (#25132)
QuietlyWhisper Feb 25, 2024
87def40
Added ContainerSpawnPoint check for integration test (#25446)
778b Feb 25, 2024
4613c9d
Automatic changelog update
PJBot Feb 25, 2024
ad29dbe
Fix ItemSlots prediction (#25552)
metalgearsloth Feb 25, 2024
7ba6765
fix solar computer sprite (#25548)
potato1234x Feb 25, 2024
b30cda8
Added Survival to the secret rotation (#25568)
wafehling Feb 25, 2024
4e16034
Automatic changelog update
PJBot Feb 25, 2024
de36ebe
Don't double-dip survival intensity scaling (#25570)
mirrorcult Feb 25, 2024
3ef4e83
Add server name into the replay final (#25564)
VasilisThePikachu Feb 25, 2024
b26acc9
Panic bunker fix (#25538)
metalgearsloth Feb 25, 2024
100ece2
Add a container display to dispenser UI (#25391)
Tayrtahn Feb 25, 2024
02be78b
Automatic changelog update
PJBot Feb 25, 2024
7d6e4b1
Fix grid inventory pick/drop rotation (#25510)
Krunklehorn Feb 25, 2024
f463cdf
Satchel empty space is now fully transparent (#25147)
UbaserB Feb 25, 2024
48604b0
Automatic changelog update
PJBot Feb 25, 2024
97d41cf
add "missing spacepen" poster (#25502)
hiucko Feb 25, 2024
656679c
Flora anomaly nerf (#25499)
TheShuEd Feb 25, 2024
90279b3
Automatic changelog update
PJBot Feb 25, 2024
8d244f7
Character profile sanitization improvements (#25579)
PJB3005 Feb 26, 2024
b7be693
[Tweak] Everything can read (#25580)
OctoRocket Feb 26, 2024
485fb4c
Remove self-uncuff spam suicide, damage changes (#25161)
SlamBamActionman Feb 26, 2024
2a2324e
Automatic changelog update
PJBot Feb 26, 2024
e00f745
Use new ComponentPauseGenerator (#25183)
PJB3005 Feb 26, 2024
002b8d8
add crew monitor as traitor steal objective (#25563)
deltanedas Feb 26, 2024
c02c8c2
Automatic changelog update
PJBot Feb 26, 2024
dffd02a
Syringe UI cached updates (#25581)
Plykiya Feb 26, 2024
fe48e6d
Merge remote-tracking branch 'upstream/master' into upstream-sync
Morb0 Feb 26, 2024
cea2689
Fix sponsors prototypes
Morb0 Feb 26, 2024
3053b36
Update locale
Morb0 Feb 26, 2024
5f8b358
Fix locale
Morb0 Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions Content.Client/Chemistry/UI/InjectorStatusControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Client.Stylesheets;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.FixedPoint;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Timing;
Expand All @@ -14,6 +15,10 @@ public sealed class InjectorStatusControl : Control
private readonly SharedSolutionContainerSystem _solutionContainers;
private readonly RichTextLabel _label;

private FixedPoint2 PrevVolume;
private FixedPoint2 PrevMaxVolume;
private InjectorToggleMode PrevToggleState;

public InjectorStatusControl(Entity<InjectorComponent> parent, SharedSolutionContainerSystem solutionContainers)
{
_parent = parent;
Expand All @@ -29,6 +34,16 @@ protected override void FrameUpdate(FrameEventArgs args)
if (!_solutionContainers.TryGetSolution(_parent.Owner, InjectorComponent.SolutionName, out _, out var solution))
return;

// only updates the UI if any of the details are different than they previously were
if (PrevVolume == solution.Volume
&& PrevMaxVolume == solution.MaxVolume
&& PrevToggleState == _parent.Comp.ToggleState)
return;

PrevVolume = solution.Volume;
PrevMaxVolume = solution.MaxVolume;
PrevToggleState = _parent.Comp.ToggleState;

// Update current volume and injector state
var modeStringLocalized = Loc.GetString(_parent.Comp.ToggleState switch
{
Expand Down
31 changes: 17 additions & 14 deletions Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,22 @@
StyleClasses="OpenLeft"/>
</BoxContainer>
<Control MinSize="0 10"/>
<ScrollContainer HScrollEnabled="False" HorizontalExpand="True" VerticalExpand="True" MinSize="0 160">
<PanelContainer VerticalExpand="True"
SizeFlagsStretchRatio="6"
MinSize="0 150">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1b1b1e" />
</PanelContainer.PanelOverride>
<BoxContainer Name="ContainerInfo"
Orientation="Vertical"
HorizontalExpand="True">
<Label Text="{Loc 'reagent-dispenser-window-no-container-loaded-text'}"/>
</BoxContainer>
</PanelContainer>
</ScrollContainer>
<BoxContainer Orientation="Horizontal">
<SpriteView Name="View" Scale="4 4" MinSize="150 150"/>
<ScrollContainer HScrollEnabled="False" HorizontalExpand="True" VerticalExpand="True" MinSize="0 160">
<PanelContainer VerticalExpand="True"
SizeFlagsStretchRatio="6"
MinSize="0 150">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1b1b1e" />
</PanelContainer.PanelOverride>
<BoxContainer Name="ContainerInfo"
Orientation="Vertical"
HorizontalExpand="True">
<Label Text="{Loc 'reagent-dispenser-window-no-container-loaded-text'}"/>
</BoxContainer>
</PanelContainer>
</ScrollContainer>
</BoxContainer>
</BoxContainer>
</DefaultWindow>
13 changes: 8 additions & 5 deletions Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Linq;
using Content.Client.Stylesheets;
using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Reagent;
Expand All @@ -19,6 +18,7 @@ namespace Content.Client.Chemistry.UI
public sealed partial class ReagentDispenserWindow : DefaultWindow
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
public event Action<BaseButton.ButtonEventArgs, DispenseReagentButton>? OnDispenseReagentButtonPressed;
public event Action<GUIMouseHoverEventArgs, DispenseReagentButton>? OnDispenseReagentButtonMouseEntered;
public event Action<GUIMouseHoverEventArgs, DispenseReagentButton>? OnDispenseReagentButtonMouseExited;
Expand Down Expand Up @@ -52,7 +52,7 @@ public ReagentDispenserWindow()
/// Update the button grid of reagents which can be dispensed.
/// </summary>
/// <param name="inventory">Reagents which can be dispensed by this dispenser</param>
public void UpdateReagentsList(List<KeyValuePair<string, KeyValuePair<string,string>>> inventory)
public void UpdateReagentsList(List<KeyValuePair<string, KeyValuePair<string, string>>> inventory)
{
if (ChemicalList == null)
return;
Expand Down Expand Up @@ -86,6 +86,9 @@ public void UpdateState(BoundUserInterfaceState state)
UpdateContainerInfo(castState);
UpdateReagentsList(castState.Inventory);

_entityManager.TryGetEntity(castState.OutputContainerEntity, out var outputContainerEnt);
View.SetEntity(outputContainerEnt);

// Disable the Clear & Eject button if no beaker
ClearButton.Disabled = castState.OutputContainer is null;
EjectButton.Disabled = castState.OutputContainer is null;
Expand Down Expand Up @@ -134,7 +137,7 @@ public void UpdateContainerInfo(ReagentDispenserBoundUserInterfaceState state)

if (state.OutputContainer is null)
{
ContainerInfo.Children.Add(new Label {Text = Loc.GetString("reagent-dispenser-window-no-container-loaded-text") });
ContainerInfo.Children.Add(new Label { Text = Loc.GetString("reagent-dispenser-window-no-container-loaded-text") });
return;
}

Expand All @@ -159,11 +162,11 @@ public void UpdateContainerInfo(ReagentDispenserBoundUserInterfaceState state)
? p.LocalizedName
: Loc.GetString("reagent-dispenser-window-reagent-name-not-found-text");

var nameLabel = new Label {Text = $"{localizedName}: "};
var nameLabel = new Label { Text = $"{localizedName}: " };
var quantityLabel = new Label
{
Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", quantity)),
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor},
StyleClasses = { StyleNano.StyleClassLabelSecondaryColor },
};

ContainerInfo.Children.Add(new BoxContainer
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Content.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework>
<LangVersion>11</LangVersion>
<LangVersion>12</LangVersion>
<IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\bin\Content.Client\</OutputPath>
Expand Down
32 changes: 5 additions & 27 deletions Content.Client/CrewManifest/UI/CrewManifestListing.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
using Content.Shared.CCVar;
using Content.Shared.CrewManifest;
using Content.Shared.CrewManifest;
using Content.Shared.Roles;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
using System.Linq;

namespace Content.Client.CrewManifest.UI;

public sealed class CrewManifestListing : BoxContainer
{
[Dependency] private readonly IConfigurationManager _configManager = default!;
[Dependency] private readonly IEntitySystemManager _entitySystem = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
private readonly SpriteSystem _spriteSystem;
Expand All @@ -25,7 +21,7 @@ public CrewManifestListing()

public void AddCrewManifestEntries(CrewManifestEntries entries)
{
var entryDict = new Dictionary<string, List<CrewManifestEntry>>();
var entryDict = new Dictionary<DepartmentPrototype, List<CrewManifestEntry>>();

foreach (var entry in entries.Entries)
{
Expand All @@ -34,37 +30,19 @@ public void AddCrewManifestEntries(CrewManifestEntries entries)
// this is a little expensive, and could be better
if (department.Roles.Contains(entry.JobPrototype))
{
entryDict.GetOrNew(department.ID).Add(entry);
entryDict.GetOrNew(department).Add(entry);
}
}
}

var entryList = new List<(string section, List<CrewManifestEntry> entries)>();
var entryList = new List<(DepartmentPrototype section, List<CrewManifestEntry> entries)>();

foreach (var (section, listing) in entryDict)
{
entryList.Add((section, listing));
}

var sortOrder = _configManager.GetCVar(CCVars.CrewManifestOrdering).Split(",").ToList();

entryList.Sort((a, b) =>
{
var ai = sortOrder.IndexOf(a.section);
var bi = sortOrder.IndexOf(b.section);

// this is up here so -1 == -1 occurs first
if (ai == bi)
return 0;

if (ai == -1)
return -1;

if (bi == -1)
return 1;

return ai.CompareTo(bi);
});
entryList.Sort((a, b) => DepartmentUIComparer.Instance.Compare(a.section, b.section));

foreach (var item in entryList)
{
Expand Down
14 changes: 8 additions & 6 deletions Content.Client/CrewManifest/UI/CrewManifestSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,25 @@
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Prototypes;
using System.Numerics;
using Content.Shared.Roles;

namespace Content.Client.CrewManifest.UI;

public sealed class CrewManifestSection : BoxContainer
{
public CrewManifestSection(IPrototypeManager prototypeManager, SpriteSystem spriteSystem, string sectionTitle,
public CrewManifestSection(
IPrototypeManager prototypeManager,
SpriteSystem spriteSystem,
DepartmentPrototype section,
List<CrewManifestEntry> entries)
{
Orientation = LayoutOrientation.Vertical;
HorizontalExpand = true;

if (Loc.TryGetString($"department-{sectionTitle}", out var localizedDepart))
sectionTitle = localizedDepart;

AddChild(new Label()
{
StyleClasses = { "LabelBig" },
Text = Loc.GetString(sectionTitle)
Text = Loc.GetString($"department-{section.ID}")
});

var gridContainer = new GridContainer()
Expand Down Expand Up @@ -55,8 +56,9 @@ public CrewManifestSection(IPrototypeManager prototypeManager, SpriteSystem spri
var icon = new TextureRect()
{
TextureScale = new Vector2(2, 2),
Stretch = TextureRect.StretchMode.KeepCentered,
VerticalAlignment = VAlignment.Center,
Texture = spriteSystem.Frame0(jobIcon.Icon),
Margin = new Thickness(0, 0, 4, 0)
};

titleContainer.AddChild(icon);
Expand Down
19 changes: 2 additions & 17 deletions Content.Client/Decals/DecalSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,8 @@ public override void Shutdown()
protected override void OnDecalRemoved(EntityUid gridId, uint decalId, DecalGridComponent component, Vector2i indices, DecalChunk chunk)
{
base.OnDecalRemoved(gridId, decalId, component, indices, chunk);

if (!component.DecalZIndexIndex.Remove(decalId, out var zIndex))
return;

if (!component.DecalRenderIndex.TryGetValue(zIndex, out var renderIndex))
return;

renderIndex.Remove(decalId);
if (renderIndex.Count == 0)
component.DecalRenderIndex.Remove(zIndex);
DebugTools.Assert(chunk.Decals.ContainsKey(decalId));
chunk.Decals.Remove(decalId);
}

private void OnHandleState(EntityUid gridUid, DecalGridComponent gridComp, ref ComponentHandleState args)
Expand Down Expand Up @@ -133,8 +125,6 @@ private void OnChunkUpdate(DecalChunkUpdateEvent ev)
private void UpdateChunks(EntityUid gridId, DecalGridComponent gridComp, Dictionary<Vector2i, DecalChunk> updatedGridChunks)
{
var chunkCollection = gridComp.ChunkCollection.ChunkCollection;
var renderIndex = gridComp.DecalRenderIndex;
var zIndexIndex = gridComp.DecalZIndexIndex;

// Update any existing data / remove decals we didn't receive data for.
foreach (var (indices, newChunkData) in updatedGridChunks)
Expand All @@ -155,11 +145,6 @@ private void UpdateChunks(EntityUid gridId, DecalGridComponent gridComp, Diction

foreach (var (uid, decal) in newChunkData.Decals)
{
if (zIndexIndex.TryGetValue(uid, out var zIndex))
renderIndex[zIndex].Remove(uid);

renderIndex.GetOrNew(decal.ZIndex)[uid] = decal;
zIndexIndex[uid] = decal.ZIndex;
gridComp.DecalIndex[uid] = indices;
}
}
Expand Down
Loading
Loading