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

Merged
merged 76 commits into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
5a4e04e
Add nitrous oxide synthesis reaction (#22774)
whateverusername0 Dec 21, 2023
a157f7a
Automatic changelog update
PJBot Dec 21, 2023
c514af0
Add nitrous oxide decomposition reaction (#22738)
whateverusername0 Dec 21, 2023
e969f60
Automatic changelog update
PJBot Dec 21, 2023
2eeaf5e
Structural Balancing Pass (#22790)
Emisse Dec 21, 2023
bf7c788
Automatic changelog update
PJBot Dec 21, 2023
ad97580
Rename Miasma to Ammonia (#22791)
mirrorcult Dec 21, 2023
a3919cc
Automatic changelog update
PJBot Dec 21, 2023
295c85c
remove serialized rot from emergency meta.yml (#22793)
Emisse Dec 21, 2023
6c9a419
reorganize emergency delta power structure (#22794)
Emisse Dec 21, 2023
999cd4c
bagel update (#22795)
Emisse Dec 21, 2023
9f166d8
lox update (#22796)
Emisse Dec 21, 2023
3db343f
Updated (most) medipen sprites (#22789)
joshepvodka Dec 21, 2023
56788b1
Automatic changelog update
PJBot Dec 21, 2023
911e39f
Resprited carpet sprites (#22674)
Tunguso4ka Dec 21, 2023
8010111
Automatic changelog update
PJBot Dec 21, 2023
e9516fc
add Fresium, a chillingly complex chemical to prank your friends with…
CrigCrag Dec 21, 2023
d5087e5
Automatic changelog update
PJBot Dec 21, 2023
4c1e71e
Raise cryo metabolism min temperature (#22785)
Partmedia Dec 21, 2023
5ee01ce
Resprites energy sword and double energy sword (#22797)
SpaceRox1244 Dec 21, 2023
0273bbc
Fix right click not showing the context menu in AHelps, players tab a…
DrSmugleaf Dec 21, 2023
3b61b56
Automatic changelog update
PJBot Dec 21, 2023
b322542
Add missing admin changelog for #22798 (#22801)
DrSmugleaf Dec 21, 2023
6fce623
Change SpawnerSystem to use SpawnAtPosition instead of Spawn (#22800)
DrSmugleaf Dec 21, 2023
a1caf30
borgs know who is crew now (#22802)
Emisse Dec 21, 2023
8ce028d
Automatic changelog update
PJBot Dec 21, 2023
eac8796
Gauze Markings 2 - Medical Boogaloo (#22452)
KittenColony Dec 21, 2023
85b0ce9
Fireaxe icon resprite (#22805)
KittenColony Dec 21, 2023
2f210df
Automatic changelog update
PJBot Dec 21, 2023
59c8f23
Cleanup forensic cleaning (#22715)
themias Dec 21, 2023
b81344b
Automatic changelog update
PJBot Dec 21, 2023
3abfea5
add grav gen lmao (#22810)
Emisse Dec 21, 2023
5bf9a87
remove base agent id from nukie operatives (#22811)
Emisse Dec 21, 2023
3833673
Automatic changelog update
PJBot Dec 21, 2023
174dcac
give service borg syringe so they can mix drinks (#22813)
Emisse Dec 21, 2023
af76a4a
Prevent mice from spilling containers. (#22812)
Titian3 Dec 21, 2023
ad281a4
Automatic changelog update
PJBot Dec 21, 2023
d6f5ff7
Fix gas canister random item insertion prediction (#22809)
Lukasz825700516 Dec 21, 2023
4a0f3ae
Automatic changelog update
PJBot Dec 21, 2023
f1241ff
infiltrator update (#22820)
Emisse Dec 21, 2023
fdf718e
Reimplement smart equipping (#22815)
mirrorcult Dec 21, 2023
0c8b186
Automatic changelog update
PJBot Dec 21, 2023
221eb56
Fix for #22516 - mobs can no longer cause clumsy mobs to get hurt on …
DrMelon Dec 21, 2023
3af39ff
Automatic changelog update
PJBot Dec 21, 2023
4c081aa
Uranium Ammo (#22406)
Boaz1111 Dec 21, 2023
138f6be
Changelog for PR #22406 (#22824)
PJB3005 Dec 21, 2023
2f4d277
Automatic changelog update
PJBot Dec 21, 2023
456deea
Makes sabre sheathe use ItemSlots (#22792)
joshepvodka Dec 21, 2023
2189c6f
Add migration for MiasmaCanister (#22830)
Partmedia Dec 21, 2023
ee0c3c4
Fix glorfcode for real (#22838)
mirrorcult Dec 22, 2023
bc1f8b0
Convert atmos device events to ref events (#22843)
mirrorcult Dec 22, 2023
8ad0d26
Change range of 10-sided dice (#22833)
Tayrtahn Dec 22, 2023
02ede7d
nukie planet update (#22818)
JoeHammad1844 Dec 22, 2023
0b803e5
Try fix invalid entities in device networks (#22845)
ElectroJr Dec 22, 2023
ce5875f
Fix a collection enumeration modification exception in ArrivalsSystem…
ElectroJr Dec 22, 2023
fcd1a4d
adds embedding + throw damage to cybersun pen (#22822)
Ilya246 Dec 22, 2023
c7052f5
Adds top surgery scar markings to the character creator (#22806)
SpaceRox1244 Dec 22, 2023
fb47c4c
Added ashtrays (#22837)
joshepvodka Dec 22, 2023
d066b6a
add gambling to cargo (#22842)
Emisse Dec 22, 2023
cb6884e
DumpableComponent on an empty container no longer stops other interac…
LordCarve Dec 22, 2023
09c48c7
Fixed issue with the station map UI (#22848)
chromiumboy Dec 22, 2023
279d345
PARTY HATS YIPPIE (#22850)
lzk228 Dec 22, 2023
af753c1
Glossary (#22840)
2013HORSEMEATSCANDAL Dec 22, 2023
907b873
Fix various errors/exceptions (#22841)
ElectroJr Dec 22, 2023
0828c32
Add some clothes to the uniform printer (#22829)
MACMAN2003 Dec 22, 2023
054321d
Add YAML gas reactions (#22803)
Partmedia Dec 22, 2023
3389955
hotfix for party hats (#22852)
lzk228 Dec 22, 2023
5d18548
Reach update (#22854)
Emisse Dec 22, 2023
5a1e317
It's time to build a barbershop! (#22565)
TheShuEd Dec 22, 2023
053c1e8
Rigged boxing gloves have variant TC costs. (#22851)
Dec 22, 2023
b6bd82c
Use ECS prototype-reload events (#22613)
ElectroJr Dec 22, 2023
524dbf9
Consistent Absorbent System behavior (#22723)
LordCarve Dec 22, 2023
7d69055
Use different chatbox placeholder when dependent keys unbound (#22747)
LordCarve Dec 22, 2023
fe8e0e6
Remove job specific traitor items from vendors (#22867)
lzk228 Dec 22, 2023
4426394
Merge remote-tracking branch 'upstream/master' into upstream-sync
Morb0 Dec 22, 2023
203db7d
Update locale
Morb0 Dec 23, 2023
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
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System.Linq;
using Content.Client.Administration.Systems;
using Content.Client.UserInterface.Controls;
using Content.Client.Verbs;
using Content.Client.Verbs.UI;
using Content.Shared.Administration;
using Content.Shared.Input;
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
Expand Down Expand Up @@ -39,6 +37,7 @@ public PlayerListControl()
RobustXamlLoader.Load(this);
// Fill the Option data
PlayerListContainer.ItemPressed += PlayerListItemPressed;
PlayerListContainer.ItemKeyBindDown += PlayerListItemKeyBindDown;
PlayerListContainer.GenerateItem += GenerateButton;
PopulateList(_adminSystem.PlayerList);
FilterLineEdit.OnTextChanged += _ => FilterList();
Expand All @@ -50,18 +49,27 @@ private void PlayerListItemPressed(BaseButton.ButtonEventArgs? args, ListData? d
{
if (args == null || data is not PlayerListData {Info: var selectedPlayer})
return;
if (args.Event.Function == EngineKeyFunctions.UIClick)
{
OnSelectionChanged?.Invoke(selectedPlayer);

// update label text. Only required if there is some override (e.g. unread bwoink count).
if (OverrideText != null && args.Button.Children.FirstOrDefault()?.Children?.FirstOrDefault() is Label label)
label.Text = GetText(selectedPlayer);
}
else if (args.Event.Function == EngineKeyFunctions.UseSecondary && selectedPlayer.NetEntity != null)
{
_uiManager.GetUIController<VerbMenuUIController>().OpenVerbMenu(selectedPlayer.NetEntity.Value, true);
}
if (args.Event.Function != EngineKeyFunctions.UIClick)
return;

OnSelectionChanged?.Invoke(selectedPlayer);

// update label text. Only required if there is some override (e.g. unread bwoink count).
if (OverrideText != null && args.Button.Children.FirstOrDefault()?.Children?.FirstOrDefault() is Label label)
label.Text = GetText(selectedPlayer);
}

private void PlayerListItemKeyBindDown(GUIBoundKeyEventArgs? args, ListData? data)
{
if (args == null || data is not PlayerListData { Info: var selectedPlayer })
return;

if (args.Function != EngineKeyFunctions.UIRightClick || selectedPlayer.NetEntity == null)
return;

_uiManager.GetUIController<VerbMenuUIController>().OpenVerbMenu(selectedPlayer.NetEntity.Value, true);
args.Handle();
}

public void StopFiltering()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Content.Client.Station;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Map.Components;

Expand All @@ -15,7 +14,7 @@ public sealed partial class ObjectsTab : Control
private readonly List<ObjectsTabEntry> _objects = new();
private List<ObjectsTabSelection> _selections = new();

public event Action<BaseButton.ButtonEventArgs>? OnEntryPressed;
public event Action<ObjectsTabEntry, GUIBoundKeyEventArgs>? OnEntryKeyBindDown;

public ObjectsTab()
{
Expand Down Expand Up @@ -82,7 +81,7 @@ private void RefreshObjectList(ObjectsTabSelection selection)
var ctrl = new ObjectsTabEntry(name, entity);
_objects.Add(ctrl);
ObjectList.AddChild(ctrl);
ctrl.OnPressed += args => OnEntryPressed?.Invoke(args);
ctrl.OnKeyBindDown += args => OnEntryKeyBindDown?.Invoke(ctrl, args);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public sealed partial class PlayerTab : Control
private bool _ascending = true;
private bool _showDisconnected;

public event Action<ButtonEventArgs>? OnEntryPressed;
public event Action<PlayerTabEntry, GUIBoundKeyEventArgs>? OnEntryKeyBindDown;

public PlayerTab()
{
Expand Down Expand Up @@ -123,7 +123,7 @@ private void RefreshPlayerList(IReadOnlyList<PlayerInfo> players)
player.Connected,
player.PlaytimeString);
entry.PlayerEntity = player.NetEntity;
entry.OnPressed += args => OnEntryPressed?.Invoke(args);
entry.OnKeyBindDown += args => OnEntryKeyBindDown?.Invoke(entry, args);
entry.ToolTip = Loc.GetString("player-tab-entry-tooltip");
PlayerList.AddChild(entry);

Expand Down
14 changes: 4 additions & 10 deletions Content.Client/Audio/ContentAudioSystem.AmbientMusic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private void InitializeAmbientMusic()
_nextAudio = TimeSpan.MaxValue;

SetupAmbientSounds();
_proto.PrototypesReloaded += OnProtoReload;
SubscribeLocalEvent<PrototypesReloadedEventArgs>(OnProtoReload);
_state.OnStateChanged += OnStateChange;
// On round end summary OR lobby cut audio.
SubscribeNetworkEvent<RoundEndMessageEvent>(OnRoundEndMessage);
Expand All @@ -86,21 +86,14 @@ private void AmbienceCVarChanged(float obj)
private void ShutdownAmbientMusic()
{
_configManager.UnsubValueChanged(CCVars.AmbientMusicVolume, AmbienceCVarChanged);
_proto.PrototypesReloaded -= OnProtoReload;
_state.OnStateChanged -= OnStateChange;
_ambientMusicStream = _audio.Stop(_ambientMusicStream);
}

private void OnProtoReload(PrototypesReloadedEventArgs obj)
{
if (!obj.ByType.ContainsKey(typeof(AmbientMusicPrototype)) &&
!obj.ByType.ContainsKey(typeof(RulesPrototype)))
{
return;
}

_ambientSounds.Clear();
SetupAmbientSounds();
if (obj.WasModified<AmbientMusicPrototype>() || obj.WasModified<RulesPrototype>())
SetupAmbientSounds();
}

private void OnStateChange(StateChangedEventArgs obj)
Expand All @@ -114,6 +107,7 @@ private void OnStateChange(StateChangedEventArgs obj)

private void SetupAmbientSounds()
{
_ambientSounds.Clear();
foreach (var ambience in _proto.EnumeratePrototypes<AmbientMusicPrototype>())
{
var tracks = _ambientSounds.GetOrNew(ambience.ID);
Expand Down
13 changes: 4 additions & 9 deletions Content.Client/Clothing/Systems/ChameleonClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,13 @@ public override void Initialize()
SubscribeLocalEvent<ChameleonClothingComponent, AfterAutoHandleStateEvent>(HandleState);

PrepareAllVariants();
_proto.PrototypesReloaded += OnProtoReloaded;
SubscribeLocalEvent<PrototypesReloadedEventArgs>(OnProtoReloaded);
}

public override void Shutdown()
private void OnProtoReloaded(PrototypesReloadedEventArgs args)
{
base.Shutdown();
_proto.PrototypesReloaded -= OnProtoReloaded;
}

private void OnProtoReloaded(PrototypesReloadedEventArgs _)
{
PrepareAllVariants();
if (args.WasModified<EntityPrototype>())
PrepareAllVariants();
}

private void HandleState(EntityUid uid, ChameleonClothingComponent component, ref AfterAutoHandleStateEvent args)
Expand Down
18 changes: 6 additions & 12 deletions Content.Client/CrewManifest/CrewManifestSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Content.Client.GameTicking.Managers;
using Content.Shared.CrewManifest;
using Content.Shared.Roles;
using Robust.Shared.Prototypes;
Expand All @@ -19,12 +18,7 @@ public override void Initialize()
base.Initialize();

BuildDepartmentLookup();
_prototypeManager.PrototypesReloaded += OnPrototypesReload;
}

public override void Shutdown()
{
_prototypeManager.PrototypesReloaded -= OnPrototypesReload;
SubscribeLocalEvent<PrototypesReloadedEventArgs>(OnPrototypesReload);
}

/// <summary>
Expand All @@ -36,16 +30,16 @@ public void RequestCrewManifest(NetEntity netEntity)
RaiseNetworkEvent(new RequestCrewManifestMessage(netEntity));
}

private void OnPrototypesReload(PrototypesReloadedEventArgs _)
private void OnPrototypesReload(PrototypesReloadedEventArgs args)
{
_jobDepartmentLookup.Clear();
_departments.Clear();

BuildDepartmentLookup();
if (args.WasModified<DepartmentPrototype>())
BuildDepartmentLookup();
}

private void BuildDepartmentLookup()
{
_jobDepartmentLookup.Clear();
_departments.Clear();
foreach (var department in _prototypeManager.EnumeratePrototypes<DepartmentPrototype>())
{
_departments.Add(department.ID);
Expand Down
11 changes: 11 additions & 0 deletions Content.Client/MagicMirror/MagicMirrorBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,16 @@ protected override void ReceiveMessage(BoundUserInterfaceMessage message)

_window.UpdateState(data);
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing)
return;

if (_window != null)
_window.OnClose -= Close;

_window?.Dispose();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,6 @@ public void ClearAllOverlays()
_overlay.RemoveOverlay(overlay);
}

// hacky solution related to mapping
public void SetActiveDeviceList(EntityUid tool, EntityUid list, NetworkConfiguratorComponent? component = null)
{
if (!Resolve(tool, ref component))
{
return;
}

component.ActiveDeviceList = list;
}

private sealed class StatusControl : Control
{
private readonly RichTextLabel _label;
Expand Down
6 changes: 2 additions & 4 deletions Content.Client/Parallax/ParallaxSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ public override void Initialize()
{
base.Initialize();
_overlay.AddOverlay(new ParallaxOverlay());
_protoManager.PrototypesReloaded += OnReload;

SubscribeLocalEvent<PrototypesReloadedEventArgs>(OnReload);
SubscribeLocalEvent<ParallaxComponent, AfterAutoHandleStateEvent>(OnAfterAutoHandleState);
}

private void OnReload(PrototypesReloadedEventArgs obj)
{
if (!obj.ByType.ContainsKey(typeof(ParallaxPrototype)))
if (!obj.WasModified<ParallaxPrototype>())
return;

_parallax.UnloadParallax(Fallback);
Expand All @@ -48,7 +47,6 @@ public override void Shutdown()
{
base.Shutdown();
_overlay.RemoveOverlay<ParallaxOverlay>();
_protoManager.PrototypesReloaded -= OnReload;
}

private void OnAfterAutoHandleState(EntityUid uid, ParallaxComponent component, ref AfterAutoHandleStateEvent args)
Expand Down
14 changes: 12 additions & 2 deletions Content.Client/Pinpointer/UI/NavMapControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ public partial class NavMapControl : MapGridControl
protected float UpdateTime = 1.0f;
protected float MaxSelectableDistance = 10f;
protected float RecenterMinimum = 0.05f;
protected float MinDragDistance = 5f;

// Local variables
private Vector2 _offset;
private bool _draggin;
private Vector2 _startDragPosition = default!;
private bool _recentering = false;
private readonly Font _font;
private float _updateTimer = 0.25f;
Expand Down Expand Up @@ -168,23 +170,31 @@ protected override void KeyBindDown(GUIBoundKeyEventArgs args)
base.KeyBindDown(args);

if (args.Function == EngineKeyFunctions.Use)
{
_startDragPosition = args.PointerLocation.Position;
_draggin = true;
}
}

protected override void KeyBindUp(GUIBoundKeyEventArgs args)
{
base.KeyBindUp(args);

if (args.Function == EngineKeyFunctions.Use)
_draggin = false;

if (TrackedEntitySelectedAction == null)
return;

if (args.Function == EngineKeyFunctions.Use)
{
_draggin = false;

if (_xform == null || _physics == null || TrackedEntities.Count == 0)
return;

// If the cursor has moved a significant distance, exit
if ((_startDragPosition - args.PointerLocation.Position).Length() > MinDragDistance)
return;

// Get the clicked position
var offset = _offset + _physics.LocalCenter;
var localPosition = args.PointerLocation.Position - GlobalPixelPosition;
Expand Down
5 changes: 5 additions & 0 deletions Content.Client/UserInterface/BoundKeyHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public static string ShortKeyName(BoundKeyFunction keyFunction)
return TryGetShortKeyName(keyFunction, out var name) ? Loc.GetString(name) : " ";
}

public static bool IsBound(BoundKeyFunction keyFunction)
{
return TryGetShortKeyName(keyFunction, out _);
}

private static string? DefaultShortKeyName(BoundKeyFunction keyFunction)
{
var name = FormattedMessage.EscapeText(IoCManager.Resolve<IInputManager>().GetKeyFunctionButtonString(keyFunction));
Expand Down
7 changes: 7 additions & 0 deletions Content.Client/UserInterface/Controls/ListContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public bool Group
public bool Toggle { get; set; }
public Action<ListData, ListContainerButton>? GenerateItem;
public Action<BaseButton.ButtonEventArgs?, ListData?>? ItemPressed;
public Action<GUIBoundKeyEventArgs, ListData?>? ItemKeyBindDown;
public IReadOnlyList<ListData> Data => _data;

private const int DefaultSeparation = 3;
Expand Down Expand Up @@ -135,6 +136,11 @@ private void OnItemPressed(BaseButton.ButtonEventArgs args)
ItemPressed?.Invoke(args, button.Data);
}

private void OnItemKeyBindDown(ListContainerButton button, GUIBoundKeyEventArgs args)
{
ItemKeyBindDown?.Invoke(args, button.Data);
}

[Pure]
private Vector2 GetScrollValue()
{
Expand Down Expand Up @@ -256,6 +262,7 @@ protected override Vector2 ArrangeOverride(Vector2 finalSize)
{
button = new ListContainerButton(data);
button.OnPressed += OnItemPressed;
button.OnKeyBindDown += args => OnItemKeyBindDown(button, args);
button.ToggleMode = Toggle;
button.Group = _buttonGroup;

Expand Down
Loading
Loading