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

Merged
merged 51 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7944bad
Lathe-able Welding Masks (#25842)
Nairodian Mar 4, 2024
163a527
Automatic changelog update
PJBot Mar 4, 2024
bdcf144
Frozen hydroponic dungeon (#25837)
TheShuEd Mar 4, 2024
40fb39e
resave fland (#25845)
Emisse Mar 4, 2024
79b1c0e
resave origin (#25846)
Emisse Mar 4, 2024
f4754fe
Shot glass max volume decrease (#25847)
Lawdog4817 Mar 4, 2024
1e8b683
Automatic changelog update
PJBot Mar 4, 2024
5a77e52
resave europa (#25848)
Emisse Mar 4, 2024
550612a
fishops nerf real (#25148)
deltanedas Mar 5, 2024
7d841d4
Automatic changelog update
PJBot Mar 5, 2024
511e245
Remove the ability for command or any antag-safe role from being ini…
Brandon-Huu Mar 5, 2024
926b140
Automatic changelog update
PJBot Mar 5, 2024
bbb7880
Fix docking fallback (#25854)
metalgearsloth Mar 5, 2024
4b56996
Change keybindings for paper (#25853)
Brandon-Huu Mar 5, 2024
68bb57b
Fixed Emag wiping door access without bolting open (#25836)
exincore Mar 5, 2024
574c625
Fix shuttle disabling on ftl (#25859)
metalgearsloth Mar 5, 2024
bad1174
Enforce Space Heater max/min temperatures server side (#25835)
Menshin Mar 5, 2024
4d0ec65
the bladed flatcap (#25780)
QuietlyWhisper Mar 5, 2024
35d0d0b
Automatic changelog update
PJBot Mar 5, 2024
b66bad2
Add nutribricks to other survival boxes (#25749)
DuskyJay Mar 5, 2024
f0e8695
Clockwork structures and furniture (#24673)
MACMAN2003 Mar 6, 2024
9036e59
Automatic changelog update
PJBot Mar 6, 2024
7e9c3b8
Adds paramedic cap to the uniform printer (#25861)
deepdarkdepths Mar 6, 2024
d938763
Automatic changelog update
PJBot Mar 6, 2024
d3b981f
Fixes glowsticks being unable to be inserted into trashbags (#25863)
deepdarkdepths Mar 6, 2024
9074037
Allow livestock and artifact crate to go under plastic flaps (#25862)
lzk228 Mar 6, 2024
f4976a3
Add prediction to hand labeler labels (#25869)
Tayrtahn Mar 6, 2024
b5066dc
Automatic changelog update
PJBot Mar 6, 2024
d385c1b
Paper save button, back to ctrl+enter save. (#25870)
PJB3005 Mar 6, 2024
8a154d3
Separate Certain Walls (#25674)
ps3moira Mar 6, 2024
55cebb3
Automatic changelog update
PJBot Mar 6, 2024
8e8156a
Add water to water tiles. (#25825)
Froffy025 Mar 6, 2024
be18649
Automatic changelog update
PJBot Mar 6, 2024
0ab4ace
Post light update (#25814)
Ko4ergaPunk Mar 6, 2024
0913327
Update wideswing rotations (#25868)
notquitehadouken Mar 6, 2024
623aa79
Automatic changelog update
PJBot Mar 6, 2024
27e14d8
buff gas leak event (#25864)
Ilya246 Mar 6, 2024
2ba28cc
New cloth & hair (#25772)
JustArt1m Mar 6, 2024
8e2ebdd
Automatic changelog update
PJBot Mar 6, 2024
89831d7
Automatic changelog update
PJBot Mar 6, 2024
46f6799
Readmin enables Debug Coordinates in F3 overlay (#25063)
Errant-4 Mar 6, 2024
e648fe5
Fix pod launch offset (#25855)
metalgearsloth Mar 6, 2024
72b0889
Automatic changelog update
PJBot Mar 6, 2024
0738829
Add SharedPopupSystem.PopupPredicted (#25811)
Tayrtahn Mar 6, 2024
974c4b9
adds barber scissors to hristov bundle (#25695)
Brandon-Huu Mar 6, 2024
4228305
Automatic changelog update
PJBot Mar 6, 2024
2935e5b
Remove all obsolete BatteryComponent method calls (#25871)
Tayrtahn Mar 6, 2024
8b30042
Merge remote-tracking branch 'wizard/master' into upstream-sync
KayzelW Mar 6, 2024
a5bdb51
yml success
KayzelW Mar 6, 2024
7bb340f
fix
KayzelW Mar 6, 2024
c6a3d44
done?
KayzelW Mar 6, 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 @@ -2,6 +2,7 @@
using Content.Shared.Administration.Managers;
using Robust.Client.Console;
using Robust.Client.Player;
using Robust.Client.UserInterface;
using Robust.Shared.ContentPack;
using Robust.Shared.Network;
using Robust.Shared.Player;
Expand All @@ -16,6 +17,7 @@ public sealed class ClientAdminManager : IClientAdminManager, IClientConGroupImp
[Dependency] private readonly IClientConGroupController _conGroup = default!;
[Dependency] private readonly IResourceManager _res = default!;
[Dependency] private readonly ILogManager _logManager = default!;
[Dependency] private readonly IUserInterfaceManager _userInterface = default!;

private AdminData? _adminData;
private readonly HashSet<string> _availableCommands = new();
Expand Down Expand Up @@ -101,6 +103,9 @@ private void UpdateMessageRx(MsgUpdateAdminStatus message)
{
var flagsText = string.Join("|", AdminFlagsHelper.FlagsToNames(_adminData.Flags));
_sawmill.Info($"Updated admin status: {_adminData.Active}/{_adminData.Title}/{flagsText}");

if (_adminData.Active)
_userInterface.DebugMonitors.SetMonitor(DebugMonitor.Coords, true);
}
else
{
Expand Down
7 changes: 7 additions & 0 deletions Content.Client/Labels/EntitySystems/LabelSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using Content.Shared.Labels.EntitySystems;

namespace Content.Client.Labels;

public sealed partial class LabelSystem : SharedLabelSystem
{
}
11 changes: 1 addition & 10 deletions Content.Client/Paper/UI/PaperBoundUserInterface.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using JetBrains.Annotations;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Input;
using Robust.Shared.Utility;
using static Content.Shared.Paper.SharedPaperComponent;

Expand All @@ -22,15 +21,7 @@ protected override void Open()

_window = new PaperWindow();
_window.OnClose += Close;
_window.Input.OnKeyBindDown += args => // Solution while TextEdit don't have events
{
if (args.Function == EngineKeyFunctions.MultilineTextSubmit)
{
var text = Rope.Collapse(_window.Input.TextRope);
Input_OnTextEntered(text);
args.Handle();
}
};
_window.OnSaved += Input_OnTextEntered;

if (EntMan.TryGetComponent<PaperVisualsComponent>(Owner, out var visuals))
{
Expand Down
4 changes: 4 additions & 0 deletions Content.Client/Paper/UI/PaperWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@
</PanelContainer>
</ScrollContainer>
</PanelContainer>
<!-- Bottom buttons for editing -->
<BoxContainer Name="EditButtons" Orientation="Horizontal" HorizontalAlignment="Right" Margin="6">
<Button Name="SaveButton" />
</BoxContainer>
</BoxContainer>
</paper:PaperWindow>
30 changes: 30 additions & 0 deletions Content.Client/Paper/UI/PaperWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@
using Content.Shared.Paper;
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.Input;
using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Utility;
using Robust.Client.UserInterface.RichText;
using Robust.Shared.Input;

namespace Content.Client.Paper.UI
{
[GenerateTypedNameReferences]
public sealed partial class PaperWindow : BaseWindow
{
[Dependency] private readonly IInputManager _inputManager = default!;

private static Color DefaultTextColor = new(25, 25, 25);

// <summary>
Expand Down Expand Up @@ -41,15 +45,35 @@ public sealed partial class PaperWindow : BaseWindow
typeof(ItalicTag)
};

public event Action<string>? OnSaved;

public PaperWindow()
{
IoCManager.InjectDependencies(this);
RobustXamlLoader.Load(this);

// We can't configure the RichTextLabel contents from xaml, so do it here:
BlankPaperIndicator.SetMessage(Loc.GetString("paper-ui-blank-page-message"), null, DefaultTextColor);

// Hook up the close button:
CloseButton.OnPressed += _ => Close();

Input.OnKeyBindDown += args => // Solution while TextEdit don't have events
{
if (args.Function == EngineKeyFunctions.MultilineTextSubmit)
{
RunOnSaved();
args.Handle();
}
};

SaveButton.OnPressed += _ =>
{
RunOnSaved();
};

SaveButton.Text = Loc.GetString("paper-ui-save-button",
("keybind", _inputManager.GetKeyFunctionButtonString(EngineKeyFunctions.MultilineTextSubmit)));
}

/// <summary>
Expand Down Expand Up @@ -196,6 +220,7 @@ public void Populate(SharedPaperComponent.PaperBoundUserInterfaceState state)
bool isEditing = state.Mode == SharedPaperComponent.PaperAction.Write;
bool wasEditing = InputContainer.Visible;
InputContainer.Visible = isEditing;
EditButtons.Visible = isEditing;

var msg = new FormattedMessage();
msg.AddMarkupPermissive(state.Text);
Expand Down Expand Up @@ -266,5 +291,10 @@ protected override DragMode GetDragModeFor(Vector2 relativeMousePos)
}
return mode & _allowedResizeModes;
}

private void RunOnSaved()
{
OnSaved?.Invoke(Rope.Collapse(Input.TextRope));
}
}
}
8 changes: 7 additions & 1 deletion Content.Client/Popups/PopupSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public override void PopupEntity(string? message, EntityUid uid, ICommonSession
PopupEntity(message, uid, type);
}

public override void PopupEntity(string? message, EntityUid uid, Filter filter, bool recordReplay, PopupType type=PopupType.Small)
public override void PopupEntity(string? message, EntityUid uid, Filter filter, bool recordReplay, PopupType type = PopupType.Small)
{
if (!filter.Recipients.Contains(_playerManager.LocalSession))
return;
Expand All @@ -170,6 +170,12 @@ public override void PopupEntity(string? message, EntityUid uid, PopupType type
PopupMessage(message, type, transform.Coordinates, uid, true);
}

public override void PopupPredicted(string? message, EntityUid uid, EntityUid? recipient, PopupType type = PopupType.Small)
{
if (recipient != null && _timing.IsFirstTimePredicted)
PopupEntity(message, uid, recipient.Value, type);
}

#endregion

#region Network Event Handlers
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Atmos/Portable/SpaceHeaterSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void OnTemperatureChanged(EntityUid uid, SpaceHeaterComponent spaceHeate
if (!TryComp<GasThermoMachineComponent>(uid, out var thermoMachine))
return;

thermoMachine.TargetTemperature += args.Temperature;
thermoMachine.TargetTemperature = float.Clamp(thermoMachine.TargetTemperature + args.Temperature, thermoMachine.MinTemperature, thermoMachine.MaxTemperature);

UpdateAppearance(uid);
DirtyUI(uid, spaceHeater);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
using Content.Server.Administration.Logs;
using Content.Server.Chemistry.Components;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Server.Nutrition.Components;
using Content.Server.Nutrition.EntitySystems;
using Content.Server.Labels.Components;
using Content.Server.Chemistry;
using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Chemistry.Dispenser;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Database;
using Content.Shared.FixedPoint;
using JetBrains.Annotations;
using Robust.Server.Audio;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.Prototypes;
using System.Linq;
using Content.Shared.Labels.Components;

namespace Content.Server.Chemistry.EntitySystems
{
Expand Down
30 changes: 30 additions & 0 deletions Content.Server/Forensics/Systems/ForensicsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Content.Server.Fluids.EntitySystems;
using Content.Server.Forensics.Components;
using Content.Server.Popups;
using Content.Shared.Chemistry.Components;
using Content.Shared.DoAfter;
using Content.Shared.Forensics;
using Content.Shared.Interaction;
Expand All @@ -27,6 +28,7 @@ public override void Initialize()

SubscribeLocalEvent<DnaComponent, BeingGibbedEvent>(OnBeingGibbed);
SubscribeLocalEvent<ForensicsComponent, MeleeHitEvent>(OnMeleeHit);
SubscribeLocalEvent<ForensicsComponent, GotRehydratedEvent>(OnRehydrated);
SubscribeLocalEvent<CleansForensicsComponent, AfterInteractEvent>(OnAfterInteract, after: new[] { typeof(AbsorbentSystem) });
SubscribeLocalEvent<ForensicsComponent, CleanForensicsDoAfterEvent>(OnCleanForensicsDoAfter);
SubscribeLocalEvent<DnaComponent, TransferDnaEvent>(OnTransferDnaEvent);
Expand Down Expand Up @@ -71,6 +73,34 @@ private void OnMeleeHit(EntityUid uid, ForensicsComponent component, MeleeHitEve
}
}

private void OnRehydrated(Entity<ForensicsComponent> ent, ref GotRehydratedEvent args)
{
CopyForensicsFrom(ent.Comp, args.Target);
}

/// <summary>
/// Copy forensic information from a source entity to a destination.
/// Existing forensic information on the target is still kept.
/// </summary>
public void CopyForensicsFrom(ForensicsComponent src, EntityUid target)
{
var dest = EnsureComp<ForensicsComponent>(target);
foreach (var dna in src.DNAs)
{
dest.DNAs.Add(dna);
}

foreach (var fiber in src.Fibers)
{
dest.Fibers.Add(fiber);
}

foreach (var print in src.Fingerprints)
{
dest.Fingerprints.Add(print);
}
}

private void OnAfterInteract(EntityUid uid, CleansForensicsComponent component, AfterInteractEvent args)
{
if (args.Handled)
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Friends/Systems/PettableFriendSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Content.Server.Chemistry.Components;
using Content.Server.Friends.Components;
using Content.Server.NPC.Components;
using Content.Server.NPC.Systems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Interaction.Events;
using Content.Shared.Popups;

Expand Down
21 changes: 17 additions & 4 deletions Content.Server/GameTicking/Rules/ZombieRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,23 @@ private List<EntityUid> GetHealthyHumans(bool includeOffStation = true)
/// </remarks>
private void InfectInitialPlayers(ZombieRuleComponent component)
{
//Get all players with initial infected enabled, and exclude those with the ZombieImmuneComponent
var eligiblePlayers = _antagSelection.GetEligiblePlayers(_playerManager.Sessions, component.PatientZeroPrototypeId, includeAllJobs: true, customExcludeCondition: x => HasComp<ZombieImmuneComponent>(x) || HasComp<InitialInfectedExemptComponent>(x));
//And get all players, excluding ZombieImmune - to fill any leftover initial infected slots
var allPlayers = _antagSelection.GetEligiblePlayers(_playerManager.Sessions, component.PatientZeroPrototypeId, acceptableAntags: Shared.Antag.AntagAcceptability.All, includeAllJobs: true, ignorePreferences: true, customExcludeCondition: HasComp<ZombieImmuneComponent>);
//Get all players with initial infected enabled, and exclude those with the ZombieImmuneComponent and roles with CanBeAntag = False
var eligiblePlayers = _antagSelection.GetEligiblePlayers(
_playerManager.Sessions,
component.PatientZeroPrototypeId,
includeAllJobs: false,
customExcludeCondition: player => HasComp<ZombieImmuneComponent>(player) || HasComp<InitialInfectedExemptComponent>(player)
);

//And get all players, excluding ZombieImmune and roles with CanBeAntag = False - to fill any leftover initial infected slots
var allPlayers = _antagSelection.GetEligiblePlayers(
_playerManager.Sessions,
component.PatientZeroPrototypeId,
acceptableAntags: Shared.Antag.AntagAcceptability.All,
includeAllJobs: false ,
ignorePreferences: true,
customExcludeCondition: HasComp<ZombieImmuneComponent>
);

//If there are no players to choose, abort
if (allPlayers.Count == 0)
Expand Down
24 changes: 0 additions & 24 deletions Content.Server/Labels/Label/Components/LabelComponent.cs

This file was deleted.

27 changes: 10 additions & 17 deletions Content.Server/Labels/Label/LabelSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Examine;
using Content.Shared.Labels;
using Content.Shared.Labels.Components;
using Content.Shared.Labels.EntitySystems;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.Utility;

namespace Content.Server.Labels
{
/// <summary>
/// A system that lets players see the contents of a label on an object.
/// </summary>
[UsedImplicitly]
public sealed class LabelSystem : EntitySystem
public sealed class LabelSystem : SharedLabelSystem
{
[Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
Expand All @@ -26,7 +26,6 @@ public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<LabelComponent, ExaminedEvent>(OnExamine);
SubscribeLocalEvent<LabelComponent, MapInitEvent>(OnLabelCompMapInit);
SubscribeLocalEvent<PaperLabelComponent, ComponentInit>(OnComponentInit);
SubscribeLocalEvent<PaperLabelComponent, ComponentRemove>(OnComponentRemove);
Expand All @@ -38,7 +37,10 @@ public override void Initialize()
private void OnLabelCompMapInit(EntityUid uid, LabelComponent component, MapInitEvent args)
{
if (!string.IsNullOrEmpty(component.CurrentLabel))
{
component.CurrentLabel = Loc.GetString(component.CurrentLabel);
Dirty(uid, component);
}
}

/// <summary>
Expand All @@ -65,13 +67,17 @@ public void Label(EntityUid uid, string? text, MetaDataComponent? metadata = nul
label.CurrentLabel = null;
label.OriginalName = null;

Dirty(uid, label);

return;
}

// Update label
label.OriginalName ??= metadata.EntityName;
label.CurrentLabel = text;
_metaData.SetEntityName(uid, $"{label.OriginalName} ({text})", metadata);

Dirty(uid, label);
}

private void OnComponentInit(EntityUid uid, PaperLabelComponent component, ComponentInit args)
Expand All @@ -89,19 +95,6 @@ private void OnComponentRemove(EntityUid uid, PaperLabelComponent component, Com
_itemSlotsSystem.RemoveItemSlot(uid, component.LabelSlot);
}

private void OnExamine(EntityUid uid, LabelComponent? label, ExaminedEvent args)
{
if (!Resolve(uid, ref label))
return;

if (label.CurrentLabel == null)
return;

var message = new FormattedMessage();
message.AddText(Loc.GetString("hand-labeler-has-label", ("label", label.CurrentLabel)));
args.PushMessage(message);
}

private void OnExamined(EntityUid uid, PaperLabelComponent comp, ExaminedEvent args)
{
if (comp.LabelSlot.Item is not {Valid: true} item)
Expand Down
Loading
Loading