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

Merged
merged 75 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
9dc9e22
Bwoink fix (#28899)
nikthechampiongr Jun 15, 2024
e16bf41
Automatic changelog update
PJBot Jun 15, 2024
31d1d3b
fix borgs getting deleted by salvage magnets (#29006)
EmoGarbage404 Jun 15, 2024
7e4c760
Automatic changelog update
PJBot Jun 15, 2024
71eb4d9
CVarify meteor behavior (#29030)
TsjipTsjip Jun 15, 2024
789453a
Make firelock warning light not require power and add a PointLight (#…
ShadowCommander Jun 15, 2024
ba16cd1
Automatic changelog update
PJBot Jun 15, 2024
ca58811
make the donk microwave drop the correct board on normal deconstructi…
Ian321 Jun 15, 2024
5dbee6f
Automatic changelog update
PJBot Jun 15, 2024
81e41f8
Mannequin (#29004)
BombasterDS Jun 15, 2024
30cdb90
Automatic changelog update
PJBot Jun 15, 2024
6835e6b
Adjust TEG efficiency curve, remove heat transfer limit (#29050)
Partmedia Jun 15, 2024
a9610d4
Automatic changelog update
PJBot Jun 15, 2024
6d3d92c
Fix mime mask loadout minlimit (#29056)
lzk228 Jun 15, 2024
b70f222
Automatic changelog update
PJBot Jun 15, 2024
2ddebba
Fix speech bubble occlusion being checked from the player's position …
DrSmugleaf Jun 15, 2024
a2affe3
add 👷 JobCondition system for reagents (#29023)
icekot8 Jun 15, 2024
6d6da12
ToggleVisualLayers hair disappeared fix (#28949)
FunTust Jun 15, 2024
2a710ee
Automatic changelog update
PJBot Jun 15, 2024
280b0a1
Adds New Shoes to Sec loadouts (#29018)
Cojoke-dot Jun 15, 2024
904f15f
Automatic changelog update
PJBot Jun 15, 2024
c063347
fix meteor announcement color (#29058)
EmoGarbage404 Jun 15, 2024
97761e4
Change "they're" to "their" in the lungs cargo bounty: Fixes #29051 (…
Keer-Sar Jun 16, 2024
ddd7008
Update Credits (#29065)
github-actions[bot] Jun 16, 2024
17aa1f9
Automatic changelog update
PJBot Jun 16, 2024
e633fe8
Widen power monitoring widget (#29062)
Partmedia Jun 16, 2024
c2f88b2
fix exclusive borg module bug (#29038)
EmoGarbage404 Jun 16, 2024
2fde5ac
Cleans up ClothingShoesBootsMagSyndie in magboots.yml (#28653)
Cojoke-dot Jun 16, 2024
dfe9d52
Slightly speed up borgsystem module check (#29070)
EmoGarbage404 Jun 16, 2024
65af00a
Fixes capitalization mistake when non-humanoids insert things into ma…
Keer-Sar Jun 16, 2024
a341c3a
Automatic changelog update
PJBot Jun 16, 2024
3644602
Fix magboots not needing a grid to work (#29034)
EmoGarbage404 Jun 16, 2024
732576b
Automatic changelog update
PJBot Jun 16, 2024
9348a5c
Apc & Substation resprite (#28998)
EmoGarbage404 Jun 16, 2024
32e1d1a
Use EntityQuery for mob state system resolves (#29021)
DrSmugleaf Jun 16, 2024
4954b6d
Add cvar to disable ghosting killing your crit mob (#28945)
DrSmugleaf Jun 16, 2024
f730d12
give spiders unique venom reagent (#29066)
deltanedas Jun 16, 2024
26f809a
Instruments for Musician lodouts (#29059)
Cojoke-dot Jun 16, 2024
ac97964
Automatic changelog update
PJBot Jun 16, 2024
f121946
Fix RotateWhilePulling not working (#29032)
ElectroJr Jun 16, 2024
22efc2b
Automatic changelog update
PJBot Jun 16, 2024
1cb9f5d
add carp hardsuit for traitors (#25155)
deltanedas Jun 16, 2024
c9540db
Automatic changelog update
PJBot Jun 16, 2024
14cd55e
Remove ServerAlertsComponentTests (#29027)
ElectroJr Jun 16, 2024
6829630
Update submodule to 226.0.0 (#29100)
metalgearsloth Jun 16, 2024
fdb487c
Update origin (#28342)
lzk228 Jun 16, 2024
771c34c
Update omega (#28343)
lzk228 Jun 16, 2024
99358e8
Update marathon (#28344)
lzk228 Jun 16, 2024
93ea4c0
Update packed (#28346)
lzk228 Jun 16, 2024
92e6e10
Update train (#28345)
lzk228 Jun 16, 2024
ce56410
Update fland (#28347)
lzk228 Jun 16, 2024
31d155d
Update box (#28348)
lzk228 Jun 16, 2024
5e50bd8
Missing meteor presets (#29044)
EmoGarbage404 Jun 16, 2024
ee2769e
atlas update (#28514)
deltanedas Jun 16, 2024
89a9f07
Add a system for modifying entity names without causing conflicts (#2…
Tayrtahn Jun 16, 2024
1482345
Delete RandomSentience event (#28982)
Futuristic-OK Jun 16, 2024
8a199a8
Automatic changelog update
PJBot Jun 16, 2024
388d372
Fix incorrect use of atmos dt (#29112)
Partmedia Jun 17, 2024
72665eb
Automatic changelog update
PJBot Jun 17, 2024
f7aca6b
nuke actions from map files (#28589)
deltanedas Jun 17, 2024
390f8d1
Makes Eyepatches Flippable (#26277)
Cojoke-dot Jun 17, 2024
7ff557d
Automatic changelog update
PJBot Jun 17, 2024
c332677
remove robotics console emag checking, make it a bit fairer (#27876)
deltanedas Jun 17, 2024
ffcaf61
Automatic changelog update
PJBot Jun 17, 2024
4aa74c5
improve meteor spawning (#29057)
EmoGarbage404 Jun 17, 2024
b02e838
Automatic changelog update
PJBot Jun 17, 2024
5038012
Add new lizard horns, Demonic (#29022)
UbaserB Jun 17, 2024
efbcce2
Automatic changelog update
PJBot Jun 17, 2024
e5a85e2
Make wearing an Ushanka also apply accent to your name (#29111)
Tayrtahn Jun 17, 2024
ce4a90a
Merge remote-tracking branch 'refs/remotes/upstream/master' into upst…
Morb0 Jun 17, 2024
fb5d835
Fix apc
Morb0 Jun 17, 2024
7331809
Update locale
Morb0 Jun 17, 2024
b434d38
Fix locale
Morb0 Jun 17, 2024
23a8a6c
Fix locale
Morb0 Jun 17, 2024
b7a1750
Merge branch 'refs/heads/master-syndie' into upstream-sync
Morb0 Jun 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ private void SwitchToChannel(NetUserId? ch)
{
UpdateButtons();

AHelpHelper.HideAllPanels();
if (ch != null)
{
AHelpHelper.HideAllPanels();
var panel = AHelpHelper.EnsurePanel(ch.Value);
panel.Visible = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public BwoinkWindow()
{
if (sel is null)
{
Title = Loc.GetString("bwoink-none-selected");
Title = Loc.GetString("bwoink-title-none-selected");
return;
}

Expand Down
8 changes: 4 additions & 4 deletions Content.Client/Clothing/ClientClothingSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Numerics;
using Content.Client.Inventory;
using Content.Shared.Clothing;
using Content.Shared.Clothing.Components;
Expand Down Expand Up @@ -113,6 +114,7 @@ private void OnGetVisuals(EntityUid uid, ClothingComponent item, GetEquipmentVis
i++;
}

item.MappedLayer = key;
args.Layers.Add((key, layer));
}
}
Expand Down Expand Up @@ -153,13 +155,9 @@ private bool TryGetDefaultVisuals(EntityUid uid, ClothingComponent clothing, str

// species specific
if (speciesId != null && rsi.TryGetState($"{state}-{speciesId}", out _))
{
state = $"{state}-{speciesId}";
}
else if (!rsi.TryGetState(state, out _))
{
return false;
}

var layer = new PrototypeLayerData();
layer.RsiPath = rsi.Path.ToString();
Expand Down Expand Up @@ -287,6 +285,8 @@ private void RenderEquipment(EntityUid equipee, EntityUid equipment, string slot

if (layerData.Color != null)
sprite.LayerSetColor(key, layerData.Color.Value);
if (layerData.Scale != null)
sprite.LayerSetScale(key, layerData.Scale.Value);
}
else
index = sprite.LayerMapReserveBlank(key);
Expand Down
48 changes: 48 additions & 0 deletions Content.Client/Clothing/FlippableClothingVisualizerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using Content.Shared.Clothing;
using Content.Shared.Clothing.Components;
using Content.Shared.Clothing.EntitySystems;
using Content.Shared.Foldable;
using Content.Shared.Item;
using Robust.Client.GameObjects;

namespace Content.Client.Clothing;

public sealed class FlippableClothingVisualizerSystem : VisualizerSystem<FlippableClothingVisualsComponent>
{
[Dependency] private readonly SharedItemSystem _itemSys = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<FlippableClothingVisualsComponent, GetEquipmentVisualsEvent>(OnGetVisuals, after: [typeof(ClothingSystem)]);
SubscribeLocalEvent<FlippableClothingVisualsComponent, FoldedEvent>(OnFolded);
}

private void OnFolded(Entity<FlippableClothingVisualsComponent> ent, ref FoldedEvent args)
{
_itemSys.VisualsChanged(ent);
}

private void OnGetVisuals(Entity<FlippableClothingVisualsComponent> ent, ref GetEquipmentVisualsEvent args)
{
if (!TryComp(ent, out SpriteComponent? sprite) ||
!TryComp(ent, out ClothingComponent? clothing))
return;

if (clothing.MappedLayer == null ||
!AppearanceSystem.TryGetData<bool>(ent, FoldableSystem.FoldedVisuals.State, out var folding) ||
!sprite.LayerMapTryGet(folding ? ent.Comp.FoldingLayer : ent.Comp.UnfoldingLayer, out var idx))
return;

// add each layer to the visuals
var spriteLayer = sprite[idx];
foreach (var layer in args.Layers)
{
if (layer.Item1 != clothing.MappedLayer)
continue;

layer.Item2.Scale = spriteLayer.Scale;
}
}
}
16 changes: 16 additions & 0 deletions Content.Client/Clothing/FlippableClothingVisualsComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace Content.Client.Clothing;

/// <summary>
/// Communicates folded layers data (currently only Scale to handle flipping)
/// to the wearer clothing sprite layer
/// </summary>
[RegisterComponent]
[Access(typeof(FlippableClothingVisualizerSystem))]
public sealed partial class FlippableClothingVisualsComponent : Component
{
[DataField]
public string FoldingLayer = "foldedLayer";

[DataField]
public string UnfoldingLayer = "unfoldedLayer";
}
15 changes: 6 additions & 9 deletions Content.Client/Doors/FirelockSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@ private void OnAppearanceChange(EntityUid uid, FirelockComponent comp, ref Appea
if (!_appearanceSystem.TryGetData<DoorState>(uid, DoorVisuals.State, out var state, args.Component))
state = DoorState.Closed;

if (_appearanceSystem.TryGetData<bool>(uid, DoorVisuals.Powered, out var powered, args.Component) && powered)
{
boltedVisible = _appearanceSystem.TryGetData<bool>(uid, DoorVisuals.BoltLights, out var lights, args.Component) && lights;
unlitVisible =
state == DoorState.Closing
|| state == DoorState.Opening
|| state == DoorState.Denying
|| (_appearanceSystem.TryGetData<bool>(uid, DoorVisuals.ClosedLights, out var closedLights, args.Component) && closedLights);
}
boltedVisible = _appearanceSystem.TryGetData<bool>(uid, DoorVisuals.BoltLights, out var lights, args.Component) && lights;
unlitVisible =
state == DoorState.Closing
|| state == DoorState.Opening
|| state == DoorState.Denying
|| (_appearanceSystem.TryGetData<bool>(uid, DoorVisuals.ClosedLights, out var closedLights, args.Component) && closedLights);

args.Sprite.LayerSetVisible(DoorVisualLayers.BaseUnlit, unlitVisible && !boltedVisible);
args.Sprite.LayerSetVisible(DoorVisualLayers.BaseBolted, boltedVisible);
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Power/APC/ApcVisualizerComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public sealed partial class ApcVisualsComponent : Component
/// </summary>
[DataField("screenColors")]
[ViewVariables(VVAccess.ReadWrite)]
public Color[] ScreenColors = new Color[(byte)ApcChargeState.NumStates]{Color.FromHex("#d1332e"), Color.FromHex("#2e8ad1"), Color.FromHex("#3db83b"), Color.FromHex("#ffac1c")};
public Color[] ScreenColors = new Color[(byte)ApcChargeState.NumStates]{Color.FromHex("#d1332e"), Color.FromHex("#dcdc28"), Color.FromHex("#82ff4c"), Color.FromHex("#ffac1c")};

/// <summary>
/// The sprite state of the unlit overlay used for the APC screen when the APC has been emagged.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ public PowerMonitoringButton()
{
HorizontalAlignment = HAlignment.Right,
Align = Label.AlignMode.Right,
SetWidth = 72f,
SetWidth = 80f,
Margin = new Thickness(10, 0, 0, 0),
ClipText = true,
};
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Robotics/UI/RoboticsConsoleWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private void PopulateData()
BorgInfo.SetMessage(text);

// how the turntables
DisableButton.Disabled = !data.HasBrain;
DisableButton.Disabled = !(data.HasBrain && data.CanDisable);
DestroyButton.Disabled = _timing.CurTime < _console.Comp1.NextDestroy;
}

Expand Down
3 changes: 0 additions & 3 deletions Content.Client/Sprite/RandomSpriteSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ private void UpdateClothingComponentAppearance(EntityUid uid, RandomSpriteCompon
if (!Resolve(uid, ref clothing, false))
return;

if (clothing.ClothingVisuals == null)
return;

foreach (var slotPair in clothing.ClothingVisuals)
{
foreach (var keyColorPair in component.Selected)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
using Content.Shared.Administration;
using Content.Shared.CCVar;
using Content.Shared.Chat;
using Content.Shared.Decals;
using Content.Shared.Damage.ForceSay;
using Content.Shared.Examine;
using Content.Shared.Decals;
using Content.Shared.Input;
using Content.Shared.Radio;
using Robust.Client.GameObjects;
Expand Down Expand Up @@ -626,7 +625,7 @@ private void UpdateQueuedSpeechBubbles(FrameEventArgs delta)
var predicate = static (EntityUid uid, (EntityUid compOwner, EntityUid? attachedEntity) data)
=> uid == data.compOwner || uid == data.attachedEntity;
var playerPos = player != null
? _transform?.GetMapCoordinates(player.Value) ?? MapCoordinates.Nullspace
? _eye.CurrentEye.Position
: MapCoordinates.Nullspace;

var occluded = player != null && _examine.IsOccluded(player.Value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ private void OnRoundStartAttempt(RoundStartAttemptEvent args)
while (query.MoveNext(out _, out _, out var gameRule))
{
var minPlayers = gameRule.MinPlayers;
if (!gameRule.CancelPresetOnTooFewPlayers)
continue;
if (args.Players.Length >= minPlayers)
continue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ namespace Content.Server.Chemistry.Components;
[RegisterComponent, Access(typeof(TransformableContainerSystem))]
public sealed partial class TransformableContainerComponent : Component
{
/// <summary>
/// This is the initial metadata name for the container.
/// It will revert to this when emptied.
/// It defaults to the name of the parent entity unless overwritten.
/// </summary>
[DataField("initialName")]
public string? InitialName;

/// <summary>
/// This is the initial metadata description for the container.
/// It will revert to this when emptied.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.NameModifier.EntitySystems;
using Robust.Shared.Prototypes;

namespace Content.Server.Chemistry.EntitySystems;
Expand All @@ -11,22 +12,20 @@ public sealed class TransformableContainerSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly SolutionContainerSystem _solutionsSystem = default!;
[Dependency] private readonly MetaDataSystem _metadataSystem = default!;
[Dependency] private readonly NameModifierSystem _nameMod = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<TransformableContainerComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<TransformableContainerComponent, SolutionContainerChangedEvent>(OnSolutionChange);
SubscribeLocalEvent<TransformableContainerComponent, RefreshNameModifiersEvent>(OnRefreshNameModifiers);
}

private void OnMapInit(Entity<TransformableContainerComponent> entity, ref MapInitEvent args)
private void OnMapInit(Entity<TransformableContainerComponent> entity, ref MapInitEvent args)
{
var meta = MetaData(entity.Owner);
if (string.IsNullOrEmpty(entity.Comp.InitialName))
{
entity.Comp.InitialName = meta.EntityName;
}
if (string.IsNullOrEmpty(entity.Comp.InitialDescription))
{
entity.Comp.InitialDescription = meta.EntityDescription;
Expand Down Expand Up @@ -58,12 +57,20 @@ private void OnSolutionChange(Entity<TransformableContainerComponent> entity, re
&& _prototypeManager.TryIndex(reagentId.Value.Prototype, out ReagentPrototype? proto))
{
var metadata = MetaData(entity.Owner);
var val = Loc.GetString("transformable-container-component-glass", ("name", proto.LocalizedName));
_metadataSystem.SetEntityName(entity.Owner, val, metadata);
_metadataSystem.SetEntityDescription(entity.Owner, proto.LocalizedDescription, metadata);
entity.Comp.CurrentReagent = proto;
entity.Comp.Transformed = true;
}

_nameMod.RefreshNameModifiers(entity.Owner);
}

private void OnRefreshNameModifiers(Entity<TransformableContainerComponent> entity, ref RefreshNameModifiersEvent args)
{
if (entity.Comp.CurrentReagent is { } currentReagent)
{
args.AddModifier("transformable-container-component-glass", priority: -1, ("reagent", currentReagent.LocalizedName));
}
}

private void CancelTransformation(Entity<TransformableContainerComponent> entity)
Expand All @@ -73,10 +80,8 @@ private void CancelTransformation(Entity<TransformableContainerComponent> entity

var metadata = MetaData(entity);

if (!string.IsNullOrEmpty(entity.Comp.InitialName))
{
_metadataSystem.SetEntityName(entity.Owner, entity.Comp.InitialName, metadata);
}
_nameMod.RefreshNameModifiers(entity.Owner);

if (!string.IsNullOrEmpty(entity.Comp.InitialDescription))
{
_metadataSystem.SetEntityDescription(entity.Owner, entity.Comp.InitialDescription, metadata);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System.Linq;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Components;
using Content.Shared.Localizations;
using Robust.Shared.Prototypes;
using Content.Shared.Mind;
using Content.Shared.Mind.Components;
using Content.Shared.Roles;
using Content.Shared.Roles.Jobs;
using Content.Shared.Station;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.IoC;

namespace Content.Server.Chemistry.ReagentEffectConditions
{
public sealed partial class JobCondition : ReagentEffectCondition
{
[DataField(required: true)] public List<ProtoId<JobPrototype>> Job;

public override bool Condition(ReagentEffectArgs args)
{
args.EntityManager.TryGetComponent<MindContainerComponent>(args.SolutionEntity, out var mindContainer);
if (mindContainer != null && mindContainer.Mind != null)
{
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
if (args.EntityManager.TryGetComponent<JobComponent>(mindContainer?.Mind, out var comp) && prototypeManager.TryIndex(comp.Prototype, out var prototype))
{
foreach (var jobId in Job)
{
if (prototype.ID == jobId)
{
return true;
}
}
}
}

return false;
}

public override string GuidebookExplanation(IPrototypeManager prototype)
{
var localizedNames = Job.Select(jobId => prototype.Index(jobId).LocalizedName).ToList();
return Loc.GetString("reagent-effect-condition-guidebook-job-condition", ("job", ContentLocalizationManager.FormatListToOr(localizedNames)));
}
}
}

Loading
Loading