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 #1993

Merged
merged 122 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
b06d40e
fix legally distinct visor man plush name. (#26299)
PJB3005 Mar 21, 2024
b347771
Fix some invalid damage types (#26295)
Tayrtahn Mar 21, 2024
f4cb02f
Code cleanup: Purge calls to obsolete EntityCoordinates methods (#26292)
Tayrtahn Mar 21, 2024
12f94b3
Rats eyes glow in dark + reorganize rat textures (#26300)
jamessimo Mar 21, 2024
f87480d
Automatic changelog update
PJBot Mar 21, 2024
d776c4b
Improve admin message seen/dismiss state. (#26223)
PJB3005 Mar 21, 2024
f9b195f
Automatic changelog update
PJBot Mar 21, 2024
eb80d97
Fix scram! implant keeping you pulled to someone when teleporting you…
nikthechampiongr Mar 21, 2024
de6fc40
Automatic changelog update
PJBot Mar 21, 2024
e627a0d
Door Remote now shows Mode in UI (#26162)
Plykiya Mar 22, 2024
5ac88d9
remove rped (#26316)
deltanedas Mar 22, 2024
6a7c059
Automatic changelog update
PJBot Mar 22, 2024
000a259
FTL UIScale fixes (#26305)
metalgearsloth Mar 22, 2024
ae2c1c5
Automatic changelog update
PJBot Mar 22, 2024
a6c018d
Fix puller being improperly unset when pulling stops. (#26312)
nikthechampiongr Mar 22, 2024
df3838e
Automatic changelog update
PJBot Mar 22, 2024
596f9a6
bagel update (#26326)
Emisse Mar 22, 2024
4f816b4
Sanitize "ig" (#26328)
Doctor-Cpu Mar 22, 2024
3b3b874
Snore is a trait now (#26322)
lzk228 Mar 22, 2024
2ed0e58
Automatic changelog update
PJBot Mar 22, 2024
ae3d745
Code Cleanup: Purge obsolete MapManager methods (#26279)
Tayrtahn Mar 22, 2024
bec3a2f
Nerf budget insulated gloves (#26318)
liltenhead Mar 22, 2024
c5803e6
Automatic changelog update
PJBot Mar 22, 2024
e93af9b
Irish Coffee Recipe Tweak (#26327)
BlitzTheSquishy Mar 22, 2024
c9b8fa0
Automatic changelog update
PJBot Mar 22, 2024
70c718f
Added verb action to Glue/Lube system (#26002)
SlamBamActionman Mar 22, 2024
b6b67e2
Automatic changelog update
PJBot Mar 22, 2024
4ad1e05
Fix missing semicolon after migration. (#26337)
PJB3005 Mar 22, 2024
6bffa31
The return of the 'long bedhead' haircut as an alternative (#26336)
ImRenQ Mar 22, 2024
f30ed8d
Automatic changelog update
PJBot Mar 22, 2024
763d2bc
Fix cross-grid spreader behavior (#26346)
Tayrtahn Mar 22, 2024
64b648f
NPC steering tweaks (#26351)
metalgearsloth Mar 23, 2024
ef4f263
Automatic changelog update
PJBot Mar 23, 2024
6e8a078
Make air tanks appear on the back in suitstorage (#26353)
Dutch-VanDerLinde Mar 23, 2024
e697231
Fix crash on load when no slot key assigned (#26354)
wrexbe Mar 23, 2024
393bcbf
Throwing Knives: Syndicate Kit (#26026)
UbaserB Mar 23, 2024
ab2d56a
Automatic changelog update
PJBot Mar 23, 2024
05f282f
Changed black carpet texture to correctly align itself. (#26358)
OnyxTheBrave Mar 23, 2024
18a35e7
Partial atmos refactor (#22521)
ElectroJr Mar 23, 2024
821e9ac
Automatic changelog update
PJBot Mar 23, 2024
8928761
1x2 cable coils (#26361)
Killerqu00 Mar 23, 2024
18b99ed
Automatic changelog update
PJBot Mar 23, 2024
225bc3c
Fix bypassing vaulting clumsy check with verb action. (#24977)
Tayrtahn Mar 23, 2024
141e4e4
Automatic changelog update
PJBot Mar 23, 2024
93e3aed
Restrict door remotes to only being able to manipulate doors relevant…
nikthechampiongr Mar 24, 2024
d770586
Automatic changelog update
PJBot Mar 24, 2024
4c840a7
Update Credits (#26373)
github-actions[bot] Mar 24, 2024
9e7b196
Configuration argument for content packaging (#25569)
VasilisThePikachu Mar 24, 2024
5ba5815
Update submodule to 215.0.0 (#26375)
metalgearsloth Mar 24, 2024
b9db06e
Admin New Player Notification Sound (#24327)
DEATHB4DEFEAT Mar 24, 2024
65960fa
Fix playglobalsound autocompletion (#26167)
metalgearsloth Mar 24, 2024
2cc8db3
Update submodule to 215.1.0 (#26376)
metalgearsloth Mar 24, 2024
952b7f4
Haunted dungeon template (#23768)
Emisse Mar 24, 2024
cb97abb
Maybe fix rsi truncheon error (#26374)
wrexbe Mar 24, 2024
a1817a1
Add Prometheus stats for admin count (#26284)
PJB3005 Mar 24, 2024
4790ccb
Hide empty marking categories in the markings picker (#26377)
DrSmugleaf Mar 24, 2024
0467aeb
Automatic changelog update
PJBot Mar 24, 2024
ea818ea
Give cap door remote his access (#26378)
Baptr0b0t Mar 24, 2024
f96cf36
Automatic changelog update
PJBot Mar 24, 2024
54dd273
Landmine stepoff (#22962)
YuriyKiss Mar 24, 2024
3731cc3
Update submodule to 215.2.0 (#26388)
metalgearsloth Mar 24, 2024
dca0c66
Add stealthmins (#26263)
nikthechampiongr Mar 24, 2024
8f33db1
Automatic changelog update
PJBot Mar 24, 2024
ec76111
Run `fixgridatmos` for cargo & emergency shuttle (#26382)
ElectroJr Mar 24, 2024
03bb9da
Automatic changelog update
PJBot Mar 24, 2024
0188327
Fix Medical Hud death icon animation and Changes critical icon (#26391)
DoutorWhite Mar 24, 2024
eff4d37
Automatic changelog update
PJBot Mar 24, 2024
0303e9c
Adds "untriaged" labeler workflow (#26392)
PJB3005 Mar 24, 2024
4dced51
Fixes store purchase events and adds support to raise a directed even…
keronshb Mar 24, 2024
f7a1ffd
Store keybind priority (#26356)
wrexbe Mar 24, 2024
af6a2d7
Origin Station Update 12.03.2024 (#26055)
brainfood1183 Mar 24, 2024
f2112e6
Make fland's mail into wheel-and-spoke distribution. (#26404)
IProduceWidgets Mar 24, 2024
89db440
Remove CRLF, enforce with workflow (#26401)
PJB3005 Mar 24, 2024
b44015b
Removed Cannabis from thief objectives (#26412)
ChaseFlorom Mar 24, 2024
a9b6433
Automatic changelog update
PJBot Mar 24, 2024
1dff979
Gives borg industrial welder (#26332)
SoulFN Mar 24, 2024
a8b714a
Automatic changelog update
PJBot Mar 24, 2024
8f652ea
Immovable Rod visual variations (#25932)
SlamBamActionman Mar 24, 2024
5562bce
Fixed some icon rsi warnings (#26414)
wrexbe Mar 24, 2024
a30fb1f
Update close-master-pr.yml (#26416)
PJB3005 Mar 24, 2024
a46e710
Accept cloth and ingots in the ammofab (#26413)
IProduceWidgets Mar 25, 2024
3197262
Automatic changelog update
PJBot Mar 25, 2024
451890b
Fix admin verb to set unspawned ballisic ammo count (#26411)
IProduceWidgets Mar 25, 2024
31d70db
Use entity queries in ambient sound & power receiver systems (#26410)
ElectroJr Mar 25, 2024
92ab9a8
Unswap small and tall wodden fence gates (#26409)
Luminighty Mar 25, 2024
0bc886c
Holoprojectors crafted at lathes no longer come with a cell (#26405)
Callmore Mar 25, 2024
e972829
Automatic changelog update
PJBot Mar 25, 2024
27a9b07
Fix tags on antique laser gun (#26398)
IProduceWidgets Mar 25, 2024
6f55aa6
Automatic changelog update
PJBot Mar 25, 2024
89235b9
Add astro-jungle/mowed grass and astro-snow (#26381)
IProduceWidgets Mar 25, 2024
8ee0fc5
Automatic changelog update
PJBot Mar 25, 2024
cd4eda4
Make parrots talk like parrots (#26340)
Tayrtahn Mar 25, 2024
49dbead
Automatic changelog update
PJBot Mar 25, 2024
266cc85
Create DeviceNetworkJammerComponent & System as a general way for ent…
nikthechampiongr Mar 25, 2024
b2c5ae9
nerf rad artifacts (#26422)
EmoGarbage404 Mar 25, 2024
964c6d5
Code cleanup: Purge obsoleted SharedPhysicsSystem methods (#26287)
Tayrtahn Mar 25, 2024
55ad9c7
Cleaner Grenade (#25444)
BombasterDS Mar 25, 2024
3f92410
Automatic changelog update
PJBot Mar 25, 2024
b60f61c
Wearable Harmonicas (#26261)
ImWeax Mar 25, 2024
aec1d6a
Automatic changelog update
PJBot Mar 25, 2024
94e4755
Fix mailing units turning into disposal units while recharging. (#26383)
nikthechampiongr Mar 25, 2024
66bb3fc
Automatic changelog update
PJBot Mar 25, 2024
a0cc87c
Church Bells (#26030)
SphiraI Mar 25, 2024
bd58954
Re-resprites labcoats (#26425)
Flareguy Mar 25, 2024
bf98a6a
SS14-17313 Chatfactor: Chat Censorship Systems (#25908)
FairlySadPanda Mar 25, 2024
771390b
Make all implants unable to be implanted more than once (#26250)
Simyon264 Mar 26, 2024
327a6e9
Automatic changelog update
PJBot Mar 26, 2024
3b9c5d4
Nerf ninja research stealing (#26421)
EmoGarbage404 Mar 26, 2024
d636be9
Automatic changelog update
PJBot Mar 26, 2024
47fe7d3
Reduces size of smaller cartons and fix size discrepancies with empty…
IamVelcroboy Mar 26, 2024
4b28603
Make chest rig purchasable in uplink (#26427)
Dutch-VanDerLinde Mar 26, 2024
51a02c9
Automatic changelog update
PJBot Mar 26, 2024
fdb4a61
Fix atmos NaN error (#26441)
ElectroJr Mar 26, 2024
00f95c6
Automatic changelog update
PJBot Mar 26, 2024
55b146a
Curtains fix (#26447)
Futuristic-OK Mar 26, 2024
b0f4a9b
Update submodule (#26451)
PJB3005 Mar 26, 2024
bf7fb53
Update submodule (#26454)
PJB3005 Mar 26, 2024
4630e94
Minor cleanup of cuffablesystem (#26434)
nikthechampiongr Mar 26, 2024
21583f9
Automatic changelog update
PJBot Mar 26, 2024
6fc8c1c
Merge remote-tracking branch 'upstream/master' into master-syndicate
Morb0 Mar 26, 2024
ef1ca87
Fix meta.json
Morb0 Mar 26, 2024
a45c5db
Update locale
Morb0 Mar 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 .github/workflows/check-crlf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CRLF Check

on:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]

jobs:
build:
name: CRLF Check
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Check for CRLF
run: Tools/check_crlf.py
2 changes: 1 addition & 1 deletion .github/workflows/close-master-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Close PR's on master
name: Close PRs on master

on:
pull_request_target:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/labeler-untriaged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Labels: Untriaged"

on:
issues:
types: [opened]

jobs:
add_label:
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: "Status: Untriaged"
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Shared.Administration.Notes;
using Content.Shared.Eui;
using JetBrains.Annotations;
using Robust.Client.UserInterface.Controls;
using static Content.Shared.Administration.Notes.AdminMessageEuiMsg;

namespace Content.Client.Administration.UI.AdminRemarks;
Expand All @@ -14,9 +15,8 @@ public sealed class AdminMessageEui : BaseEui
public AdminMessageEui()
{
_popup = new AdminMessagePopupWindow();
_popup.OnAcceptPressed += () => SendMessage(new Accept());
_popup.OnDismissPressed += () => SendMessage(new Dismiss());
_popup.OnClose += () => SendMessage(new CloseEuiMessage());
_popup.OnAcceptPressed += () => SendMessage(new Dismiss(true));
_popup.OnDismissPressed += () => SendMessage(new Dismiss(false));
}

public override void HandleState(EuiStateBase state)
Expand All @@ -26,13 +26,17 @@ public override void HandleState(EuiStateBase state)
return;
}

_popup.SetMessage(s.Message);
_popup.SetDetails(s.AdminName, s.AddedOn);
_popup.Timer = s.Time;
_popup.SetState(s);
}

public override void Opened()
{
_popup.OpenCentered();
_popup.UserInterfaceManager.WindowRoot.AddChild(_popup);
LayoutContainer.SetAnchorPreset(_popup, LayoutContainer.LayoutPreset.Wide);
}

public override void Closed()
{
_popup.Orphan();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Control xmlns="https://spacestation14.io" Margin="0 0 0 8">
<BoxContainer Orientation="Vertical">
<RichTextLabel Name="Admin" Margin="0 0 0 4" />
<RichTextLabel Name="Message" Margin="2 0 0 0" />
</BoxContainer>
</Control>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Content.Shared.Administration.Notes;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Utility;

namespace Content.Client.Administration.UI.AdminRemarks;

[GenerateTypedNameReferences]
public sealed partial class AdminMessagePopupMessage : Control
{
public AdminMessagePopupMessage(AdminMessageEuiState.Message message)
{
RobustXamlLoader.Load(this);

Admin.SetMessage(FormattedMessage.FromMarkup(Loc.GetString(
"admin-notes-message-admin",
("admin", message.AdminName),
("date", message.AddedOn.ToLocalTime()))));

Message.SetMessage(message.Text);
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
<ui:FancyWindow xmlns="https://spacestation14.io"
xmlns:ui="clr-namespace:Content.Client.UserInterface.Controls"
VerticalExpand="True" HorizontalExpand="True"
Title="{Loc admin-notes-message-window-title}"
MinSize="600 170">
<PanelContainer VerticalExpand="True" HorizontalExpand="True" StyleClasses="BackgroundDark">
<ScrollContainer HScrollEnabled="False" VerticalExpand="True" HorizontalExpand="True" Margin="4">
<BoxContainer Orientation="Vertical" SeparationOverride="10" VerticalAlignment="Bottom">
<Label Name="AdminLabel" Text="Loading..." />
<RichTextLabel Name="MessageLabel" />
<Control xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client">
<PanelContainer MouseFilter="Stop">
<PanelContainer.PanelOverride>
<!-- semi-transparent background -->
<gfx:StyleBoxFlat BackgroundColor="#000000AA" />
</PanelContainer.PanelOverride>

<Control HorizontalAlignment="Center" VerticalAlignment="Center" MaxWidth="600">
<PanelContainer StyleClasses="AngleRect" />

<BoxContainer Orientation="Vertical" Margin="4">
<RichTextLabel Name="Description" />

<!-- Contains actual messages -->
<ScrollContainer HScrollEnabled="False" Margin="4" VerticalExpand="True" ReturnMeasure="True" MaxHeight="400">
<BoxContainer Orientation="Vertical" Name="MessageContainer" Margin="0 2 0 0" />
</ScrollContainer>

<Label Name="WaitLabel" />
<BoxContainer Orientation="Horizontal">
<Button Name="DismissButton"
Text="{Loc 'admin-notes-message-dismiss'}" />
Text="{Loc 'admin-notes-message-dismiss'}"
Disabled="True"
HorizontalExpand="True"
StyleClasses="OpenRight" />
<Button Name="AcceptButton"
Text="{Loc 'admin-notes-message-accept'}"
Disabled="True" />
Disabled="True"
HorizontalExpand="True"
StyleClasses="OpenLeft" />
</BoxContainer>
</BoxContainer>
</ScrollContainer>
</Control>
</PanelContainer>
</ui:FancyWindow>
</Control>
Original file line number Diff line number Diff line change
@@ -1,56 +1,65 @@
using Content.Client.UserInterface.Controls;
using Content.Client.Stylesheets;
using Content.Shared.Administration.Notes;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Timing;
using Robust.Shared.Utility;

namespace Content.Client.Administration.UI.AdminRemarks;

[GenerateTypedNameReferences]
public sealed partial class AdminMessagePopupWindow : FancyWindow
public sealed partial class AdminMessagePopupWindow : Control
{
private float _timer = float.MaxValue;
public float Timer
{
get => _timer;
set
{
WaitLabel.Text = Loc.GetString("admin-notes-message-wait", ("time", MathF.Floor(value)));
_timer = value;
}
}

public event Action? OnDismissPressed;

public event Action? OnAcceptPressed;

public AdminMessagePopupWindow()
{
RobustXamlLoader.Load(this);

Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;

AcceptButton.OnPressed += OnAcceptButtonPressed;
DismissButton.OnPressed += OnDismissButtonPressed;
}

public void SetMessage(string message)
public float Timer
{
MessageLabel.SetMessage(message);
get => _timer;
private set
{
WaitLabel.Text = Loc.GetString("admin-notes-message-wait", ("time", MathF.Floor(value)));
_timer = value;
}
}

public void SetDetails(string adminName, DateTime addedOn)
public void SetState(AdminMessageEuiState state)
{
AdminLabel.Text = Loc.GetString("admin-notes-message-admin", ("admin", adminName), ("date", addedOn));
Timer = (float) state.Time.TotalSeconds;

MessageContainer.RemoveAllChildren();

foreach (var message in state.Messages)
{
MessageContainer.AddChild(new AdminMessagePopupMessage(message));
}

Description.SetMessage(FormattedMessage.FromMarkup(Loc.GetString("admin-notes-message-desc", ("count", state.Messages.Length))));
}

private void OnDismissButtonPressed(BaseButton.ButtonEventArgs obj)
{
OnDismissPressed?.Invoke();
Close();
}

private void OnAcceptButtonPressed(BaseButton.ButtonEventArgs obj)
{
OnAcceptPressed?.Invoke();
Close();
}

protected override void FrameUpdate(FrameEventArgs args)
Expand All @@ -70,6 +79,7 @@ protected override void FrameUpdate(FrameEventArgs args)
else
{
AcceptButton.Disabled = false;
DismissButton.Disabled = false;
}
}
}
2 changes: 2 additions & 0 deletions Content.Client/Atmos/Overlays/AtmosDebugOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ private void DrawTooltip(DrawingHandleScreen handle, Vector2 pos, AtmosDebugOver
handle.DrawString(_font, pos, $"Map: {data.MapAtmosphere}");
pos += offset;
handle.DrawString(_font, pos, $"NoGrid: {data.NoGrid}");
pos += offset;
handle.DrawString(_font, pos, $"Immutable: {data.Immutable}");
}

private void GetGrids(MapId mapId, Box2Rotated box)
Expand Down
70 changes: 46 additions & 24 deletions Content.Client/Atmos/Overlays/GasTileOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Robust.Client.Graphics;
using Robust.Client.ResourceManagement;
using Robust.Shared.Enums;
using Robust.Shared.Graphics;
using Robust.Shared.Graphics.RSI;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
Expand All @@ -23,7 +22,7 @@ public sealed class GasTileOverlay : Overlay
private readonly IEntityManager _entManager;
private readonly IMapManager _mapManager;

public override OverlaySpace Space => OverlaySpace.WorldSpaceEntities;
public override OverlaySpace Space => OverlaySpace.WorldSpaceEntities | OverlaySpace.WorldSpaceBelowWorld;
private readonly ShaderInstance _shader;

// Gas overlays
Expand Down Expand Up @@ -79,7 +78,8 @@ public GasTileOverlay(GasTileOverlaySystem system, IEntityManager entManager, IR
var rsi = resourceCache.GetResource<RSIResource>(animated.RsiPath).RSI;
var stateId = animated.RsiState;

if (!rsi.TryGetState(stateId, out var state)) continue;
if (!rsi.TryGetState(stateId, out var state))
continue;

_frames[i] = state.GetFrames(RsiDirection.South);
_frameDelays[i] = state.GetDelays();
Expand Down Expand Up @@ -111,7 +111,8 @@ protected override void FrameUpdate(FrameEventArgs args)
for (var i = 0; i < _gasCount; i++)
{
var delays = _frameDelays[i];
if (delays.Length == 0) continue;
if (delays.Length == 0)
continue;

var frameCount = _frameCounter[i];
_timer[i] += args.DeltaSeconds;
Expand All @@ -127,7 +128,8 @@ protected override void FrameUpdate(FrameEventArgs args)
for (var i = 0; i < FireStates; i++)
{
var delays = _fireFrameDelays[i];
if (delays.Length == 0) continue;
if (delays.Length == 0)
continue;

var frameCount = _fireFrameCounter[i];
_fireTimer[i] += args.DeltaSeconds;
Expand Down Expand Up @@ -161,26 +163,10 @@ protected override void Draw(in OverlayDrawArgs args)
var mapUid = _mapManager.GetMapEntityId(args.MapId);

if (_entManager.TryGetComponent<MapAtmosphereComponent>(mapUid, out var atmos))
{
var bottomLeft = args.WorldAABB.BottomLeft.Floored();
var topRight = args.WorldAABB.TopRight.Ceiled();

for (var x = bottomLeft.X; x <= topRight.X; x++)
{
for (var y = bottomLeft.Y; y <= topRight.Y; y++)
{
var tilePosition = new Vector2(x, y);

for (var i = 0; i < atmos.OverlayData.Opacity.Length; i++)
{
var opacity = atmos.OverlayData.Opacity[i];
DrawMapOverlay(drawHandle, args, mapUid, atmos);

if (opacity > 0)
args.WorldHandle.DrawTexture(_frames[i][_frameCounter[i]], tilePosition, Color.White.WithAlpha(opacity));
}
}
}
}
if (args.Space != OverlaySpace.WorldSpaceEntities)
return;

// TODO: WorldBounds callback.
_mapManager.FindGridsIntersecting(args.MapId, args.WorldAABB, ref gridState,
Expand Down Expand Up @@ -265,5 +251,41 @@ protected override void Draw(in OverlayDrawArgs args)
drawHandle.UseShader(null);
drawHandle.SetTransform(Matrix3.Identity);
}

private void DrawMapOverlay(
DrawingHandleWorld handle,
OverlayDrawArgs args,
EntityUid map,
MapAtmosphereComponent atmos)
{
var mapGrid = _entManager.HasComponent<MapGridComponent>(map);

// map-grid atmospheres get drawn above grids
if (mapGrid && args.Space != OverlaySpace.WorldSpaceEntities)
return;

// Normal map atmospheres get drawn below grids
if (!mapGrid && args.Space != OverlaySpace.WorldSpaceBelowWorld)
return;

var bottomLeft = args.WorldAABB.BottomLeft.Floored();
var topRight = args.WorldAABB.TopRight.Ceiled();

for (var x = bottomLeft.X; x <= topRight.X; x++)
{
for (var y = bottomLeft.Y; y <= topRight.Y; y++)
{
var tilePosition = new Vector2(x, y);

for (var i = 0; i < atmos.OverlayData.Opacity.Length; i++)
{
var opacity = atmos.OverlayData.Opacity[i];

if (opacity > 0)
handle.DrawTexture(_frames[i][_frameCounter[i]], tilePosition, Color.White.WithAlpha(opacity));
}
}
}
}
}
}
3 changes: 2 additions & 1 deletion Content.Client/Construction/ConstructionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public sealed class ConstructionSystem : SharedConstructionSystem
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;

private readonly Dictionary<int, EntityUid> _ghosts = new();
Expand Down Expand Up @@ -195,7 +196,7 @@ public bool TrySpawnGhost(
return false;

// This InRangeUnobstructed should probably be replaced with "is there something blocking us in that tile?"
var predicate = GetPredicate(prototype.CanBuildInImpassable, loc.ToMap(EntityManager));
var predicate = GetPredicate(prototype.CanBuildInImpassable, loc.ToMap(EntityManager, _transformSystem));
if (!_interactionSystem.InRangeUnobstructed(user, loc, 20f, predicate: predicate))
return false;

Expand Down
Loading
Loading