Skip to content

Commit

Permalink
Merge pull request #2556 from space-syndicate/upstream-sync
Browse files Browse the repository at this point in the history
Upstream sync
  • Loading branch information
Morb0 authored Sep 3, 2024
2 parents 3b788ff + a8c6210 commit ad04253
Show file tree
Hide file tree
Showing 246 changed files with 27,694 additions and 17,997 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Linq;
using Content.Client.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Atmos.Prototypes;
using Content.Shared.Body.Part;
using Content.Shared.Chemistry;
Expand All @@ -16,7 +16,7 @@ namespace Content.Client.Chemistry.EntitySystems;
/// <inheritdoc/>
public sealed class ChemistryGuideDataSystem : SharedChemistryGuideDataSystem
{
[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;

[ValidatePrototypeId<MixingCategoryPrototype>]
private const string DefaultMixingCategory = "DummyMix";
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Clothing/ClientClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public sealed class ClientClothingSystem : ClothingSystem
};

[Dependency] private readonly IResourceCache _cache = default!;
[Dependency] private readonly ISerializationManager _serialization = default!;
[Dependency] private readonly InventorySystem _inventorySystem = default!;
[Dependency] private readonly DisplacementMapSystem _displacement = default!;

Expand Down
1 change: 0 additions & 1 deletion Content.Client/Commands/MappingClientSideSetupCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ internal sealed class MappingClientSideSetupCommand : LocalizedCommands
{
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
[Dependency] private readonly ILightManager _lightManager = default!;
[Dependency] private readonly IStateManager _stateManager = default!;

public override string Command => "mappingclientsidesetup";

Expand Down
2 changes: 0 additions & 2 deletions Content.Client/Computer/ComputerBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ namespace Content.Client.Computer
[Virtual]
public class ComputerBoundUserInterface<TWindow, TState> : ComputerBoundUserInterfaceBase where TWindow : BaseWindow, IComputerWindow<TState>, new() where TState : BoundUserInterfaceState
{
[Dependency] private readonly IDynamicTypeFactory _dynamicTypeFactory = default!;

[ViewVariables]
private TWindow? _window;

Expand Down
3 changes: 0 additions & 3 deletions Content.Client/Light/Components/LightBehaviourComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,6 @@ void ISerializationHooks.AfterDeserialization()
[RegisterComponent]
public sealed partial class LightBehaviourComponent : SharedLightBehaviourComponent, ISerializationHooks
{
[Dependency] private readonly IEntityManager _entMan = default!;
[Dependency] private readonly IRobustRandom _random = default!;

public const string KeyPrefix = nameof(LightBehaviourComponent);

public sealed class AnimationContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ namespace Content.Client.MachineLinking.UI;

public sealed class SignalTimerBoundUserInterface : BoundUserInterface
{
[Dependency] private readonly IGameTiming _gameTiming = default!;

[ViewVariables]
private SignalTimerWindow? _window;

Expand Down
10 changes: 4 additions & 6 deletions Content.Client/Physics/JointVisualsOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System.Numerics;
using Content.Shared.Physics;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Enums;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Dynamics.Joints;

namespace Content.Client.Physics;

Expand All @@ -16,29 +15,28 @@ public sealed class JointVisualsOverlay : Overlay

private IEntityManager _entManager;

private HashSet<Joint> _drawn = new();

public JointVisualsOverlay(IEntityManager entManager)
{
_entManager = entManager;
}

protected override void Draw(in OverlayDrawArgs args)
{
_drawn.Clear();
var worldHandle = args.WorldHandle;

var spriteSystem = _entManager.System<SpriteSystem>();
var xformSystem = _entManager.System<SharedTransformSystem>();
var joints = _entManager.EntityQueryEnumerator<JointVisualsComponent, TransformComponent>();
var xformQuery = _entManager.GetEntityQuery<TransformComponent>();

args.DrawingHandle.SetTransform(Matrix3x2.Identity);

while (joints.MoveNext(out var visuals, out var xform))
{
if (xform.MapID != args.MapId)
continue;

var other = visuals.Target;
var other = _entManager.GetEntity(visuals.Target);

if (!xformQuery.TryGetComponent(other, out var otherXform))
continue;
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Silicons/StationAi/StationAiMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public sealed partial class StationAiMenu : RadialMenu
{
[Dependency] private readonly IClyde _clyde = default!;
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IEyeManager _eyeManager = default!;

public event Action<BaseStationAiAction>? OnAiRadial;

Expand Down
10 changes: 9 additions & 1 deletion Content.Client/UserInterface/Screens/DefaultGameScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ public DefaultGameScreen()

Chat.OnResized += ChatOnResized;
Chat.OnChatResizeFinish += ChatOnResizeFinish;
Actions.ActionsContainer.Columns = 1;

MainViewport.OnResized += ResizeActionContainer;
Inventory.OnResized += ResizeActionContainer;
}

private void ResizeActionContainer()
{
float indent = Inventory.Size.Y + TopBar.Size.Y + 40;
Actions.ActionsContainer.MaxGridHeight = MainViewport.Size.Y - indent;
}

private void ChatOnResizeFinish(Vector2 _)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ public SeparatedChatGameScreen()

ScreenContainer.OnSplitResizeFinished += () =>
OnChatResized?.Invoke(new Vector2(ScreenContainer.SplitFraction, 0));

ViewportContainer.OnResized += ResizeActionContainer;
}

private void ResizeActionContainer()
{
float indent = 20;
Actions.ActionsContainer.MaxGridWidth = ViewportContainer.Size.X - indent;
}

public override ChatBox ChatBox => GetWidget<ChatBox>()!;
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Verbs/VerbSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public sealed class VerbSystem : SharedVerbSystem
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly ExamineSystem _examine = default!;
[Dependency] private readonly TagSystem _tagSystem = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly IStateManager _stateManager = default!;
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Access/Systems/IdCardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public sealed class IdCardSystem : SharedIdCardSystem
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<IdCardComponent, BeingMicrowavedEvent>(OnMicrowaved);
}

Expand Down
1 change: 0 additions & 1 deletion Content.Server/Administration/BanPanelEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public sealed class BanPanelEui : BaseEui
[Dependency] private readonly IEntityManager _entities = default!;
[Dependency] private readonly ILogManager _log = default!;
[Dependency] private readonly IPlayerLocator _playerLocator = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IChatManager _chat = default!;
[Dependency] private readonly IAdminManager _admins = default!;

Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Administration/Commands/AddReagent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Administration;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Chemistry.Reagent;
Expand Down Expand Up @@ -42,7 +42,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
return;
}

var solutionContainerSystem = _entManager.System<SolutionContainerSystem>();
var solutionContainerSystem = _entManager.System<SharedSolutionContainerSystem>();
if (!solutionContainerSystem.TryGetSolution((uid.Value, man), args[1], out var solution))
{
var validSolutions = string.Join(", ", solutionContainerSystem.EnumerateSolutions((uid.Value, man)).Select(s => s.Name));
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Administration/Commands/SetSolutionCapacity.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Administration;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.FixedPoint;
Expand Down Expand Up @@ -36,7 +36,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
return;
}

var solutionContainerSystem = _entManager.System<SolutionContainerSystem>();
var solutionContainerSystem = _entManager.System<SharedSolutionContainerSystem>();
if (!solutionContainerSystem.TryGetSolution((uid.Value, man), args[1], out var solution))
{
var validSolutions = string.Join(", ", solutionContainerSystem.EnumerateSolutions((uid.Value, man)).Select(s => s.Name));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Administration;
using Content.Shared.Chemistry.Components.SolutionManager;
using Robust.Shared.Console;
Expand Down Expand Up @@ -35,7 +35,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
return;
}

var solutionContainerSystem = _entManager.System<SolutionContainerSystem>();
var solutionContainerSystem = _entManager.System<SharedSolutionContainerSystem>();
if (!solutionContainerSystem.TryGetSolution((uid.Value, man), args[1], out var solution))
{
var validSolutions = string.Join(", ", solutionContainerSystem.EnumerateSolutions((uid.Value, man)).Select(s => s.Name));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Administration;
using Content.Shared.Chemistry.Components.SolutionManager;
using Robust.Shared.Console;
Expand Down Expand Up @@ -35,7 +35,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
return;
}

var solutionContainerSystem = _entManager.System<SolutionContainerSystem>();
var solutionContainerSystem = _entManager.System<SharedSolutionContainerSystem>();
if (!solutionContainerSystem.TryGetSolution((uid.Value, man), args[1], out var solutionEnt, out var solution))
{
var validSolutions = string.Join(", ", solutionContainerSystem.EnumerateSolutions((uid.Value, man)).Select(s => s.Name));
Expand Down
7 changes: 4 additions & 3 deletions Content.Server/Administration/Toolshed/SolutionCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Content.Shared.Chemistry.EntitySystems;
using Robust.Shared.Toolshed;
using Robust.Shared.Toolshed.Syntax;
using Robust.Shared.Toolshed.TypeParsers;
Expand All @@ -13,7 +14,7 @@ namespace Content.Server.Administration.Toolshed;
[ToolshedCommand, AdminCommand(AdminFlags.Debug)]
public sealed class SolutionCommand : ToolshedCommand
{
private SolutionContainerSystem? _solutionContainer;
private SharedSolutionContainerSystem? _solutionContainer;

[CommandImplementation("get")]
public SolutionRef? Get(
Expand All @@ -22,7 +23,7 @@ public sealed class SolutionCommand : ToolshedCommand
[CommandArgument] ValueRef<string> name
)
{
_solutionContainer ??= GetSys<SolutionContainerSystem>();
_solutionContainer ??= GetSys<SharedSolutionContainerSystem>();

if (_solutionContainer.TryGetSolution(input, name.Evaluate(ctx)!, out var solution))
return new SolutionRef(solution.Value);
Expand All @@ -48,7 +49,7 @@ public SolutionRef AdjReagent(
[CommandArgument] ValueRef<FixedPoint2> amountRef
)
{
_solutionContainer ??= GetSys<SolutionContainerSystem>();
_solutionContainer ??= GetSys<SharedSolutionContainerSystem>();

var amount = amountRef.Evaluate(ctx);
if (amount > 0)
Expand Down
5 changes: 3 additions & 2 deletions Content.Server/Administration/UI/EditSolutionsEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Content.Shared.Administration;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Eui;
using Content.Shared.Chemistry.EntitySystems;
using JetBrains.Annotations;
using Robust.Shared.Timing;

Expand All @@ -17,13 +18,13 @@ public sealed class EditSolutionsEui : BaseEui
{
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
private readonly SolutionContainerSystem _solutionContainerSystem = default!;
private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
public readonly EntityUid Target;

public EditSolutionsEui(EntityUid entity)
{
IoCManager.InjectDependencies(this);
_solutionContainerSystem = _entityManager.System<SolutionContainerSystem>();
_solutionContainerSystem = _entityManager.System<SharedSolutionContainerSystem>();
Target = entity;
}

Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Animals/Systems/UdderSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Content.Server.Animals.Components;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Server.Popups;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.DoAfter;
using Content.Shared.IdentityManagement;
Expand All @@ -25,7 +25,7 @@ internal sealed class UdderSystem : EntitySystem
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;

public override void Initialize()
{
Expand Down
6 changes: 3 additions & 3 deletions Content.Server/Animals/Systems/WoolySystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Content.Server.Animals.Components;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Server.Nutrition;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Mobs.Systems;
using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
Expand All @@ -9,15 +9,15 @@
namespace Content.Server.Animals.Systems;

/// <summary>
/// Gives ability to produce fiber reagents, produces endless if the
/// Gives ability to produce fiber reagents, produces endless if the
/// owner has no HungerComponent
/// </summary>
public sealed class WoolySystem : EntitySystem
{
[Dependency] private readonly HungerSystem _hunger = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;

public override void Initialize()
{
Expand Down
6 changes: 3 additions & 3 deletions Content.Server/Anomaly/Effects/InjectionAnomalySystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Content.Server.Anomaly.Components;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Anomaly.Components;
using Content.Shared.Chemistry.Components.SolutionManager;
using System.Linq;
Expand All @@ -16,15 +16,15 @@ namespace Content.Server.Anomaly.Effects;
public sealed class InjectionAnomalySystem : EntitySystem
{
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;
[Dependency] private readonly TransformSystem _transform = default!;

private EntityQuery<InjectableSolutionComponent> _injectableQuery;

public override void Initialize()
{
SubscribeLocalEvent<InjectionAnomalyComponent, AnomalyPulseEvent>(OnPulse);
SubscribeLocalEvent<InjectionAnomalyComponent, AnomalySupercriticalEvent>(OnSupercritical, before: new[] { typeof(SolutionContainerSystem) });
SubscribeLocalEvent<InjectionAnomalyComponent, AnomalySupercriticalEvent>(OnSupercritical, before: new[] { typeof(SharedSolutionContainerSystem) });

_injectableQuery = GetEntityQuery<InjectableSolutionComponent>();
}
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Anomaly/Effects/PuddleCreateAnomalySystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Content.Server.Anomaly.Components;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.EntitySystems;
using Content.Server.Fluids.EntitySystems;
using Content.Shared.Anomaly.Components;

Expand All @@ -11,7 +11,7 @@ namespace Content.Server.Anomaly.Effects;
public sealed class PuddleCreateAnomalySystem : EntitySystem
{
[Dependency] private readonly PuddleSystem _puddle = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;

public override void Initialize()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Content.Server.Anomaly.Components;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Anomaly.Components;
using Content.Shared.Chemistry.Components;
using Content.Shared.Sprite;
Expand Down Expand Up @@ -28,7 +28,7 @@ public sealed class ReagentProducerAnomalySystem : EntitySystem
//Useful:
//Those reagents that the players are hunting for. Very low percentage of loss.

[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly PointLightSystem _light = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
Expand Down
Loading

0 comments on commit ad04253

Please sign in to comment.