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 7/11/2024 #45

Merged
merged 44 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
849b330
Languages Markers (#510)
FoxxoTrystan Jul 9, 2024
eae8ea8
Automatic Changelog Update (#510)
SimpleStation14 Jul 9, 2024
be6c214
Fix Item Transfer System (#524)
Spatison Jul 9, 2024
408ab5d
Automatic Changelog Update (#524)
SimpleStation14 Jul 9, 2024
6affbc1
Power Resprite (#520)
FoxxoTrystan Jul 9, 2024
2cc737c
Automatic Changelog Update (#520)
SimpleStation14 Jul 9, 2024
5090aab
Update Probers and Power Cooldown Scaling
VMSolidus Jul 9, 2024
df38eed
Revert "Reapply "Don't look at this please.""
VMSolidus Jul 9, 2024
399bd96
Mirror: NPC Steering Tweaks (#307)
SimpleStation14 Jul 9, 2024
8926496
Mirror: Door Remote Now Shows Mode in UI (#293)
SimpleStation14 Jul 9, 2024
24f36c1
Mirror: Pulling Rework V2 (#269)
SimpleStation14 Jul 9, 2024
a8911da
Mirror: Configuration argument for content packaging (#316)
SimpleStation14 Jul 9, 2024
6720f78
Mirror: Fix Scram! Implant Keeping You Pulled to Someone when Telepor…
SimpleStation14 Jul 10, 2024
83d6633
Mirror: Fix Decoy Bomb Uplink Category (#254)
SimpleStation14 Jul 10, 2024
68aa211
Mirror: Fix Cream Pie Bomb when Eaten or Sliced (#172)
SimpleStation14 Jul 10, 2024
1258961
Cherry-Pick PR #26312: Fix Puller Being Improperly Unset When Pulling…
VMSolidus Jul 10, 2024
d61e23d
Mirror: Added 18 New Bounties to Cargo (#239)
SimpleStation14 Jul 10, 2024
e7fd3c7
Cherry-Pick PR #26467: Update Submodule To 216.0.0 (#533)
VMSolidus Jul 10, 2024
dc46648
Arachne Plushie (#531)
CodedCrow Jul 11, 2024
02dbd8d
Automatic Changelog Update (#531)
SimpleStation14 Jul 11, 2024
9549acb
Cherry-Pick PR "Wallmount Substations Can Once Again Be Created" #271…
WarMechanic Jul 11, 2024
bf2b66e
Automatic Changelog Update (#539)
SimpleStation14 Jul 11, 2024
7463b37
More Gamemodes (#527)
Mnemotechnician Jul 11, 2024
5460b76
Automatic Changelog Update (#527)
SimpleStation14 Jul 11, 2024
4634419
Update Submodule to 217.2.1 (#534)
VMSolidus Jul 12, 2024
50ec3cd
Update Submodule to 218.2.0 (#535)
VMSolidus Jul 12, 2024
30fa120
Update Submodule to 219.2.0 (#536)
VMSolidus Jul 12, 2024
dfeb3b9
Mirror: Fix Recycled Containers Deleting Items Inside Them (#267)
SimpleStation14 Jul 12, 2024
19568f7
Mirror 25908: Chat Censorship Systems (#444)
SimpleStation14 Jul 12, 2024
318bb08
Mirror 26421: Nerf Ninja's Research Stealing (#446)
SimpleStation14 Jul 12, 2024
1c91476
Mirror 26427: Make the Chest Rig Purchasable in Uplink (#448)
SimpleStation14 Jul 12, 2024
6949685
Mirror: Fix Playglobalsound Autocompletion (#319)
SimpleStation14 Jul 12, 2024
e6779b6
Mirror: Add Stealthmins (#360)
SimpleStation14 Jul 12, 2024
6084740
Foreigner Traits (#525)
Mnemotechnician Jul 12, 2024
c9e08f3
Automatic Changelog Update (#525)
SimpleStation14 Jul 12, 2024
504c0cc
>Merge remote-tracking branch 'EE-Personal/Psionic-Power-Refactor' in…
VMSolidus Jul 12, 2024
89a7d37
Commit Engine Update
VMSolidus Jul 12, 2024
05dfec7
Merge branch 'master' into Psionic-Power-Refactor
VMSolidus Jul 12, 2024
05e97b5
Update GlimmerStructuresSystem.cs
VMSolidus Jul 12, 2024
2b9d813
Make the test shut up
VMSolidus Jul 12, 2024
ba3090f
Merge remote-tracking branch 'EE-Personal/Psionic-Power-Refactor' int…
VMSolidus Jul 12, 2024
e7ff8d1
Merge branch 'master' into Upstream-Merge-7/11/2024
VMSolidus Jul 12, 2024
c51a264
Update Submodule
VMSolidus Jul 12, 2024
bcdcb42
Merge branch 'Upstream-Merge-7/11/2024' of https://github.com/VMSolid…
VMSolidus Jul 12, 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
  •  
  •  
  •  
21 changes: 10 additions & 11 deletions Content.Client/Alerts/ClientAlertsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,23 @@ public IReadOnlyDictionary<AlertKey, AlertState>? ActiveAlerts

protected override void AfterShowAlert(Entity<AlertsComponent> alerts)
{
if (_playerManager.LocalEntity != alerts.Owner)
return;

SyncAlerts?.Invoke(this, alerts.Comp.Alerts);
UpdateHud(alerts);
}

protected override void AfterClearAlert(Entity<AlertsComponent> alertsComponent)
protected override void AfterClearAlert(Entity<AlertsComponent> alerts)
{
if (_playerManager.LocalEntity != alertsComponent.Owner)
return;
UpdateHud(alerts);
}

SyncAlerts?.Invoke(this, alertsComponent.Comp.Alerts);
private void ClientAlertsHandleState(Entity<AlertsComponent> alerts, ref AfterAutoHandleStateEvent args)
{
UpdateHud(alerts);
}

private void ClientAlertsHandleState(EntityUid uid, AlertsComponent component, ref AfterAutoHandleStateEvent args)
private void UpdateHud(Entity<AlertsComponent> entity)
{
if (_playerManager.LocalEntity == uid)
SyncAlerts?.Invoke(this, component.Alerts);
if (_playerManager.LocalEntity == entity.Owner)
SyncAlerts?.Invoke(this, entity.Comp.Alerts);
}

private void OnPlayerAttached(EntityUid uid, AlertsComponent component, LocalPlayerAttachedEvent args)
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Audio/AmbientSoundSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ protected override void QueueUpdate(EntityUid uid, AmbientSoundComponent ambienc
private static AudioParams _params = AudioParams.Default
.WithVariation(0.01f)
.WithLoop(true)
.WithAttenuation(Attenuation.LinearDistance)
.WithMaxDistance(7f);

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public sealed partial class ContentAudioSystem
[Dependency] private readonly IStateManager _stateManager = default!;
[Dependency] private readonly IResourceCache _resourceCache = default!;

private readonly AudioParams _lobbySoundtrackParams = new(-5f, 1, "Master", 0, 0, 0, false, 0f);
private readonly AudioParams _roundEndSoundEffectParams = new(-5f, 1, "Master", 0, 0, 0, false, 0f);
private readonly AudioParams _lobbySoundtrackParams = new(-5f, 1, 0, 0, 0, false, 0f);
private readonly AudioParams _roundEndSoundEffectParams = new(-5f, 1, 0, 0, 0, false, 0f);

/// <summary>
/// EntityUid of lobby restart sound component.
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Clothing/ClientClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private bool TryGetDefaultVisuals(EntityUid uid, ClothingComponent clothing, str
else if (TryComp(uid, out SpriteComponent? sprite))
rsi = sprite.BaseRSI;

if (rsi == null || rsi.Path == null)
if (rsi == null)
return false;

var correctedSlot = slot;
Expand Down
2 changes: 0 additions & 2 deletions Content.Client/Doors/DoorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
using Robust.Client.GameObjects;
using Robust.Client.ResourceManagement;
using Robust.Shared.Serialization.TypeSerializers.Implementations;
using Robust.Shared.Timing;

namespace Content.Client.Doors;

public sealed class DoorSystem : SharedDoorSystem
{
[Dependency] private readonly AnimationPlayerSystem _animationSystem = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IResourceCache _resourceCache = default!;

public override void Initialize()
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Entry/EntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ public override void Init()
_prototypeManager.RegisterIgnore("alertLevels");
_prototypeManager.RegisterIgnore("nukeopsRole");
_prototypeManager.RegisterIgnore("stationGoal");
_prototypeManager.RegisterIgnore("npcConversationTree");

_componentFactory.GenerateNetIds();
_adminManager.Initialize();
Expand Down
12 changes: 5 additions & 7 deletions Content.Client/IconSmoothing/IconSmoothSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ namespace Content.Client.IconSmoothing
[UsedImplicitly]
public sealed partial class IconSmoothSystem : EntitySystem
{
[Dependency] private readonly IMapManager _mapManager = default!;

private readonly Queue<EntityUid> _dirtyEntities = new();
private readonly Queue<EntityUid> _anchorChangedEntities = new();

Expand Down Expand Up @@ -47,7 +45,7 @@ private void OnStartup(EntityUid uid, IconSmoothComponent component, ComponentSt
var xform = Transform(uid);
if (xform.Anchored)
{
component.LastPosition = _mapManager.TryGetGrid(xform.GridUid, out var grid)
component.LastPosition = TryComp<MapGridComponent>(xform.GridUid, out var grid)
? (xform.GridUid.Value, grid.TileIndicesFor(xform.Coordinates))
: (null, new Vector2i(0, 0));

Expand Down Expand Up @@ -134,7 +132,7 @@ public void DirtyNeighbours(EntityUid uid, IconSmoothComponent? comp = null, Tra

Vector2i pos;

if (transform.Anchored && _mapManager.TryGetGrid(transform.GridUid, out var grid))
if (transform.Anchored && TryComp<MapGridComponent>(transform.GridUid, out var grid))
{
pos = grid.CoordinatesToTile(transform.Coordinates);
}
Expand All @@ -144,7 +142,7 @@ public void DirtyNeighbours(EntityUid uid, IconSmoothComponent? comp = null, Tra
if (comp.LastPosition is not (EntityUid gridId, Vector2i oldPos))
return;

if (!_mapManager.TryGetGrid(gridId, out grid))
if (!TryComp(gridId, out grid))
return;

pos = oldPos;
Expand Down Expand Up @@ -206,7 +204,7 @@ private void CalculateNewSprite(EntityUid uid,
{
var directions = DirectionFlag.None;

if (_mapManager.TryGetGrid(xform.GridUid, out grid))
if (TryComp(xform.GridUid, out grid))
{
var pos = grid.TileIndicesFor(xform.Coordinates);

Expand Down Expand Up @@ -240,7 +238,7 @@ private void CalculateNewSprite(EntityUid uid,

if (xform.Anchored)
{
if (!_mapManager.TryGetGrid(xform.GridUid, out grid))
if (!TryComp(xform.GridUid, out grid))
{
Log.Error($"Failed to calculate IconSmoothComponent sprite in {uid} because grid {xform.GridUid} was missing.");
return;
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Items/Systems/ItemSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private bool TryGetDefaultVisuals(EntityUid uid, ItemComponent item, string defa
else if (TryComp(uid, out SpriteComponent? sprite))
rsi = sprite.BaseRSI;

if (rsi == null || rsi.Path == null)
if (rsi == null)
return false;

var state = (item.HeldPrefix == null)
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Movement/Systems/JetpackSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Content.Shared.Movement.Systems;
using Robust.Client.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics.Components;
using Robust.Shared.Timing;

Expand All @@ -12,7 +13,6 @@ namespace Content.Client.Movement.Systems;
public sealed class JetpackSystem : SharedJetpackSystem
{
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly ClothingSystem _clothing = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;

Expand Down Expand Up @@ -75,7 +75,7 @@ private void CreateParticles(EntityUid uid)
var coordinates = uidXform.Coordinates;
var gridUid = coordinates.GetGridUid(EntityManager);

if (_mapManager.TryGetGrid(gridUid, out var grid))
if (TryComp<MapGridComponent>(gridUid, out var grid))
{
coordinates = new EntityCoordinates(gridUid.Value, grid.WorldToLocal(coordinates.ToMapPos(EntityManager, _transform)));
}
Expand Down
1 change: 0 additions & 1 deletion Content.Client/NPC/PathfindingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ private void DrawScreen(OverlayDrawArgs args, DrawingHandleScreen screenHandle)

var invGridMatrix = gridXform.InvWorldMatrix;
DebugPathPoly? nearest = null;
var nearestDistance = float.MaxValue;

foreach (var poly in tile)
{
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/NodeContainer/NodeVisualizationOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private void DrawScreen(in OverlayDrawArgs args)


var xform = _entityManager.GetComponent<TransformComponent>(_entityManager.GetEntity(node.Entity));
if (!_mapManager.TryGetGrid(xform.GridUid, out var grid))
if (!_entityManager.TryGetComponent<MapGridComponent>(xform.GridUid, out var grid))
return;
var gridTile = grid.TileIndicesFor(xform.Coordinates);

Expand Down Expand Up @@ -145,7 +145,7 @@ private void DrawWorld(in OverlayDrawArgs overlayDrawArgs)

foreach (var (gridId, gridDict) in _gridIndex)
{
var grid = _mapManager.GetGrid(gridId);
var grid = _entityManager.GetComponent<MapGridComponent>(gridId);
var (_, _, worldMatrix, invMatrix) = _entityManager.GetComponent<TransformComponent>(gridId).GetWorldPositionRotationMatrixWithInv();

var lCursorBox = invMatrix.TransformBox(cursorBox);
Expand Down
7 changes: 4 additions & 3 deletions Content.Client/Physics/Controllers/MoverController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Pulling.Components;
using Robust.Client.GameObjects;
using Robust.Client.Physics;
using Robust.Client.Player;
using Robust.Shared.Physics.Components;
Expand All @@ -24,7 +25,7 @@ public override void Initialize()

SubscribeLocalEvent<InputMoverComponent, UpdateIsPredictedEvent>(OnUpdatePredicted);
SubscribeLocalEvent<MovementRelayTargetComponent, UpdateIsPredictedEvent>(OnUpdateRelayTargetPredicted);
SubscribeLocalEvent<SharedPullableComponent, UpdateIsPredictedEvent>(OnUpdatePullablePredicted);
SubscribeLocalEvent<PullableComponent, UpdateIsPredictedEvent>(OnUpdatePullablePredicted);
}

private void OnUpdatePredicted(EntityUid uid, InputMoverComponent component, ref UpdateIsPredictedEvent args)
Expand All @@ -40,7 +41,7 @@ private void OnUpdateRelayTargetPredicted(EntityUid uid, MovementRelayTargetComp
args.IsPredicted = true;
}

private void OnUpdatePullablePredicted(EntityUid uid, SharedPullableComponent component, ref UpdateIsPredictedEvent args)
private void OnUpdatePullablePredicted(EntityUid uid, PullableComponent component, ref UpdateIsPredictedEvent args)
{
// Enable prediction if an entity is being pulled by the player.
// Disable prediction if an entity is being pulled by some non-player entity.
Expand Down
21 changes: 0 additions & 21 deletions Content.Client/Pulling/PullingSystem.cs

This file was deleted.

9 changes: 4 additions & 5 deletions Content.Client/Radiation/Overlays/RadiationDebugOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
using Robust.Client.Graphics;
using Robust.Client.ResourceManagement;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;

namespace Content.Client.Radiation.Overlays;

public sealed class RadiationDebugOverlay : Overlay
{
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
private readonly RadiationSystem _radiation;

Expand Down Expand Up @@ -63,7 +62,7 @@ private void DrawScreenRays(OverlayDrawArgs args)
{
var gridUid = _entityManager.GetEntity(netGrid);

if (!_mapManager.TryGetGrid(gridUid, out var grid))
if (!_entityManager.TryGetComponent<MapGridComponent>(gridUid, out var grid))
continue;

foreach (var (tile, rads) in blockers)
Expand All @@ -88,7 +87,7 @@ private void DrawScreenResistance(OverlayDrawArgs args)
{
var gridUid = _entityManager.GetEntity(netGrid);

if (!_mapManager.TryGetGrid(gridUid, out var grid))
if (!_entityManager.TryGetComponent<MapGridComponent>(gridUid, out var grid))
continue;
if (query.TryGetComponent(gridUid, out var trs) && trs.MapID != args.MapId)
continue;
Expand Down Expand Up @@ -127,7 +126,7 @@ private void DrawWorld(in OverlayDrawArgs args)
{
var gridUid = _entityManager.GetEntity(netGrid);

if (!_mapManager.TryGetGrid(gridUid, out var grid))
if (!_entityManager.TryGetComponent<MapGridComponent>(gridUid, out var grid))
continue;
var (destTile, _) = blockers.Last();
var destWorld = grid.GridTileToWorldPos(destTile);
Expand Down
16 changes: 16 additions & 0 deletions Content.Client/Remotes/EntitySystems/DoorRemoteSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Content.Client.Remote.UI;
using Content.Client.Items;
using Content.Shared.Remotes.EntitySystems;
using Content.Shared.Remotes.Components;

namespace Content.Client.Remotes.EntitySystems;

public sealed class DoorRemoteSystem : SharedDoorRemoteSystem
{
public override void Initialize()
{
base.Initialize();

Subs.ItemStatus<DoorRemoteComponent>(ent => new DoorRemoteStatusControl(ent));
}
}
46 changes: 46 additions & 0 deletions Content.Client/Remotes/UI/DoorRemoteStatusControl.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using Content.Client.Message;
using Content.Client.Stylesheets;
using Content.Shared.Remotes.Components;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Timing;

namespace Content.Client.Remote.UI;

public sealed class DoorRemoteStatusControl : Control
{
private readonly Entity<DoorRemoteComponent> _entity;
private readonly RichTextLabel _label;

// set to toggle bolts initially just so that it updates on first pickup of remote
private OperatingMode PrevOperatingMode = OperatingMode.placeholderForUiUpdates;

public DoorRemoteStatusControl(Entity<DoorRemoteComponent> entity)
{
_entity = entity;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
AddChild(_label);
}

protected override void FrameUpdate(FrameEventArgs args)
{
base.FrameUpdate(args);

// only updates the UI if any of the details are different than they previously were
if (PrevOperatingMode == _entity.Comp.Mode)
return;

PrevOperatingMode = _entity.Comp.Mode;

// Update current volume and injector state
var modeStringLocalized = Loc.GetString(_entity.Comp.Mode switch
{
OperatingMode.OpenClose => "door-remote-open-close-text",
OperatingMode.ToggleBolts => "door-remote-toggle-bolt-text",
OperatingMode.ToggleEmergencyAccess => "door-remote-emergency-access-text",
_ => "door-remote-invalid-text"
});

_label.SetMarkup(Loc.GetString("door-remote-mode-label", ("modeString", modeStringLocalized)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Content.Shared.Inventory.Events;
using Content.Shared.Item;
using Content.Shared.Movement.Events;
using Content.Shared.Physics.Pull;
using Content.Shared.Movement.Pulling.Events;
using Content.Shared.Throwing;

namespace Content.Client.Replay.Spectator;
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ protected void DrawCircles(DrawingHandleScreen handle)
var cornerDistance = MathF.Sqrt(WorldRange * WorldRange + WorldRange * WorldRange);

var origin = ScalePosition(-new Vector2(Offset.X, -Offset.Y));
var distOffset = -24f;

for (var radius = minDistance; radius <= maxDistance; radius *= EquatorialMultiplier)
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Throwing/ThrownItemVisualizerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public override void Initialize()

private void OnAutoHandleState(EntityUid uid, ThrownItemComponent component, ref AfterAutoHandleStateEvent args)
{
if (!TryComp<SpriteComponent>(uid, out var sprite))
if (!TryComp<SpriteComponent>(uid, out var sprite) || !component.Animate)
return;

var animationPlayer = EnsureComp<AnimationPlayerComponent>(uid);
Expand Down
7 changes: 3 additions & 4 deletions Content.IntegrationTests/Pair/TestMapData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ namespace Content.IntegrationTests.Pair;
public sealed class TestMapData
{
public EntityUid MapUid { get; set; }
public EntityUid GridUid { get; set; }
public MapId MapId { get; set; }
public MapGridComponent MapGrid { get; set; } = default!;
public Entity<MapGridComponent> Grid;
public MapId MapId;
public EntityCoordinates GridCoords { get; set; }
public MapCoordinates MapCoords { get; set; }
public TileRef Tile { get; set; }
Expand All @@ -21,4 +20,4 @@ public sealed class TestMapData
public EntityUid CMapUid { get; set; }
public EntityUid CGridUid { get; set; }
public EntityCoordinates CGridCoords { get; set; }
}
}
Loading
Loading