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

Merged
merged 100 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
db07fb5
Merge remote-tracking branch 'upstream/master' into upstream-sync
Morb0 Feb 17, 2024
7a96cfa
Update locale
Morb0 Feb 17, 2024
92aae19
Fix locale
Morb0 Feb 17, 2024
f7a6c76
Merge pull request #1877 from space-syndicate/upstream-sync
Morb0 Feb 17, 2024
f44a52c
Resprite overlays and fix some steel tiles (#1868)
Ko4ergaPunk Feb 18, 2024
7435de3
[Maps] Spectrume update (#1878)
poeMota Feb 18, 2024
93ebaa8
Translate Upstream #1875 #1877 (#1879)
lapatison Feb 18, 2024
db23332
Corvax drinks added (#1736)
Ko4ergaPunk Feb 19, 2024
75a2ade
[Resprite] Electric grill (#1882)
xKREKSx Feb 21, 2024
079e941
Microwave sprite offset (#1883)
SonicHDC Feb 21, 2024
128f5e8
Adds random pill canister (#25316)
IamVelcroboy Feb 21, 2024
046c874
Moves muted to shared (#25374)
keronshb Feb 21, 2024
79c6385
Fix bwoink sounds (#25441)
metalgearsloth Feb 21, 2024
499aa71
Dispenser jug fix (#25450)
MjrLandWhale Feb 21, 2024
abedce4
Automatic changelog update
PJBot Feb 21, 2024
ae11068
Fix EVA helmets quickequip (#25448)
Killerqu00 Feb 21, 2024
2cc484c
Automatic changelog update
PJBot Feb 21, 2024
1360d57
Crop harvest int cast fix (#25453)
genderGeometries Feb 22, 2024
fda1242
Automatic changelog update
PJBot Feb 22, 2024
326b890
Little rework of existing yaml flatpacks (#24814)
lzk228 Feb 22, 2024
26417b7
Fix xeno and dragon blood levels (#25442)
QuietlyWhisper Feb 22, 2024
7734b09
Automatic changelog update
PJBot Feb 22, 2024
48213eb
Changed radio jammer wattage from 6 -> 2 (#25432)
beck-thompson Feb 22, 2024
423b75f
Automatic changelog update
PJBot Feb 22, 2024
4ee0df9
Merge remote-tracking branch 'upstream/master' into master-syndie
Morb0 Feb 22, 2024
0f7f420
Update locale
Morb0 Feb 22, 2024
7c7bca1
Remove obs kit (#24768)
metalgearsloth Feb 22, 2024
d0df5ed
Revert "Remove handheld crew monitor (#24761)" (#25439)
metalgearsloth Feb 22, 2024
c27d0c1
Automatic changelog update
PJBot Feb 22, 2024
b26e9a9
Fix #22933 - Job-specific Uplink items leaking to non-job minds (#23179)
DrMelon Feb 22, 2024
3c25e63
Automatic changelog update
PJBot Feb 22, 2024
5ce36b2
Apply IAA on Train station
Morb0 Feb 22, 2024
85ae40e
Red flashlight color for assault borg (#25465)
liltenhead Feb 22, 2024
22c76bb
Automatic changelog update
PJBot Feb 22, 2024
a0307f2
Merge remote-tracking branch 'upstream/master' into upstream-sync
Morb0 Feb 22, 2024
487dd11
Add RequiresGrid component (#23394)
HoofedEar Feb 22, 2024
4744fe6
Update locale
Morb0 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
7c3a7ad
Merge pull request #1885 from space-syndicate/upstream-sync
Morb0 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
bbb7acd
[Mps] Astra update (#1886)
poeMota Feb 22, 2024
506e63e
Update Maus (#1884)
Zna1kin Feb 22, 2024
caf8d29
Translate Upstream #1885 (#1887)
lapatison Feb 22, 2024
fb14b84
New Paper Station (#1880)
mofkkol1 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
f081ca4
Locale fix (#1888)
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
559a9af
Merge remote-tracking branch 'upstream/master' into upstream-sync
Rxup Feb 25, 2024
d553de6
Merge remote-tracking branch 'wizard/master' into upstream-sync
Rxup Feb 25, 2024
d4dabb0
upd
Rxup Feb 25, 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
  •  
  •  
  •  
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
83 changes: 54 additions & 29 deletions Content.Client/Decals/Overlays/DecalOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Robust.Client.Graphics;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Map.Enumerators;
using Robust.Shared.Prototypes;

namespace Content.Client.Decals.Overlays
Expand All @@ -15,6 +16,8 @@ public sealed class DecalOverlay : GridOverlay

private readonly Dictionary<string, (Texture Texture, bool SnapCardinals)> _cachedTextures = new(64);

private readonly List<(uint Id, Decal Decal)> _decals = new();

public DecalOverlay(
SpriteSystem sprites,
IEntityManager entManager,
Expand All @@ -30,10 +33,10 @@ protected override void Draw(in OverlayDrawArgs args)
if (args.MapId == MapId.Nullspace)
return;

var grid = Grid;
var owner = Grid.Owner;

if (!_entManager.TryGetComponent(grid, out DecalGridComponent? decalGrid) ||
!_entManager.TryGetComponent(grid, out TransformComponent? xform))
if (!_entManager.TryGetComponent(owner, out DecalGridComponent? decalGrid) ||
!_entManager.TryGetComponent(owner, out TransformComponent? xform))
{
return;
}
Expand All @@ -46,46 +49,68 @@ protected override void Draw(in OverlayDrawArgs args)
var xformSystem = _entManager.System<TransformSystem>();
var eyeAngle = args.Viewport.Eye?.Rotation ?? Angle.Zero;

var zIndexDictionary = decalGrid.DecalRenderIndex;
var gridAABB = xformSystem.GetInvWorldMatrix(xform).TransformBox(args.WorldBounds.Enlarged(1f));
var chunkEnumerator = new ChunkIndicesEnumerator(gridAABB, SharedDecalSystem.ChunkSize);
_decals.Clear();

while (chunkEnumerator.MoveNext(out var index))
{
if (!decalGrid.ChunkCollection.ChunkCollection.TryGetValue(index.Value, out var chunk))
continue;

foreach (var (id, decal) in chunk.Decals)
{
if (!gridAABB.Contains(decal.Coordinates))
continue;

_decals.Add((id, decal));
}
}

if (zIndexDictionary.Count == 0)
if (_decals.Count == 0)
return;

var (_, worldRot, worldMatrix) = xformSystem.GetWorldPositionRotationMatrix(xform);
_decals.Sort((x, y) =>
{
var zComp = x.Decal.ZIndex.CompareTo(y.Decal.ZIndex);

if (zComp != 0)
return zComp;

return x.Id.CompareTo(y.Id);
});

var (_, worldRot, worldMatrix) = xformSystem.GetWorldPositionRotationMatrix(xform);
handle.SetTransform(worldMatrix);

foreach (var decals in zIndexDictionary.Values)
foreach (var (_, decal) in _decals)
{
foreach (var decal in decals.Values)
if (!_cachedTextures.TryGetValue(decal.Id, out var cache))
{
if (!_cachedTextures.TryGetValue(decal.Id, out var cache))
// Nothing to cache someone messed up
if (!_prototypeManager.TryIndex<DecalPrototype>(decal.Id, out var decalProto))
{
// Nothing to cache someone messed up
if (!_prototypeManager.TryIndex<DecalPrototype>(decal.Id, out var decalProto))
{
continue;
}

cache = (_sprites.Frame0(decalProto.Sprite), decalProto.SnapCardinals);
_cachedTextures[decal.Id] = cache;
continue;
}

var cardinal = Angle.Zero;

if (cache.SnapCardinals)
{
var worldAngle = eyeAngle + worldRot;
cardinal = worldAngle.GetCardinalDir().ToAngle();
}
cache = (_sprites.Frame0(decalProto.Sprite), decalProto.SnapCardinals);
_cachedTextures[decal.Id] = cache;
}

var angle = decal.Angle - cardinal;
var cardinal = Angle.Zero;

if (angle.Equals(Angle.Zero))
handle.DrawTexture(cache.Texture, decal.Coordinates, decal.Color);
else
handle.DrawTexture(cache.Texture, decal.Coordinates, angle, decal.Color);
if (cache.SnapCardinals)
{
var worldAngle = eyeAngle + worldRot;
cardinal = worldAngle.GetCardinalDir().ToAngle();
}

var angle = decal.Angle - cardinal;

if (angle.Equals(Angle.Zero))
handle.DrawTexture(cache.Texture, decal.Coordinates, decal.Color);
else
handle.DrawTexture(cache.Texture, decal.Coordinates, angle, decal.Color);
}

handle.SetTransform(Matrix3.Identity);
Expand Down
22 changes: 13 additions & 9 deletions Content.Client/Doors/AirlockSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Content.Client.Wires.Visualizers;
using Content.Shared.Doors.Components;
using Content.Shared.Doors.Systems;
using Content.Shared.Prying.Components;
using Robust.Client.Animations;
using Robust.Client.GameObjects;

Expand All @@ -16,13 +15,6 @@ public override void Initialize()
base.Initialize();
SubscribeLocalEvent<AirlockComponent, ComponentStartup>(OnComponentStartup);
SubscribeLocalEvent<AirlockComponent, AppearanceChangeEvent>(OnAppearanceChange);
SubscribeLocalEvent<AirlockComponent, BeforePryEvent>(OnAirlockPryAttempt);
}

private void OnAirlockPryAttempt(EntityUid uid, AirlockComponent component, ref BeforePryEvent args)
{
// TODO: Temporary until airlocks predicted.
args.Cancelled = true;
}

private void OnComponentStartup(EntityUid uid, AirlockComponent comp, ComponentStartup args)
Expand Down Expand Up @@ -104,7 +96,7 @@ private void OnAppearanceChange(EntityUid uid, AirlockComponent comp, ref Appear
|| state == DoorState.Denying
|| (state == DoorState.Open && comp.OpenUnlitVisible)
|| (_appearanceSystem.TryGetData<bool>(uid, DoorVisuals.ClosedLights, out var closedLights, args.Component) && closedLights))
&& !boltedVisible && !emergencyLightsVisible; ;
&& !boltedVisible && !emergencyLightsVisible;
}

args.Sprite.LayerSetVisible(DoorVisualLayers.BaseUnlit, unlitVisible);
Expand All @@ -120,5 +112,17 @@ private void OnAppearanceChange(EntityUid uid, AirlockComponent comp, ref Appear
&& !boltedVisible
);
}

switch (state)
{
case DoorState.Open:
args.Sprite.LayerSetState(DoorVisualLayers.BaseUnlit, comp.ClosingSpriteState);
args.Sprite.LayerSetAnimationTime(DoorVisualLayers.BaseUnlit, 0);
break;
case DoorState.Closed:
args.Sprite.LayerSetState(DoorVisualLayers.BaseUnlit, comp.OpeningSpriteState);
args.Sprite.LayerSetAnimationTime(DoorVisualLayers.BaseUnlit, 0);
break;
}
}
}
12 changes: 0 additions & 12 deletions Content.Client/Doors/DoorBoltSystem.cs

This file was deleted.

Loading
Loading