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

Merged
merged 106 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
a3dc0eb
Pill Bottles can only store pills now (#33074)
Boaz1111 Oct 31, 2024
826bd1a
Automatic changelog update
PJBot Oct 31, 2024
f5e5646
New workflow to apply the pr approved label (#28358)
AJCM-git Oct 31, 2024
4261698
Add a spare bible to PietyVend (#32363)
Jarmer123 Oct 31, 2024
a875bf3
Automatic changelog update
PJBot Oct 31, 2024
55861b4
[#28722 fix] Add notification for dependent wearables being dropped (…
SlamBamActionman Oct 31, 2024
872adb5
Automatic changelog update
PJBot Oct 31, 2024
a08da9d
More pda space (#32601)
BramvanZijp Oct 31, 2024
bca8d95
Automatic changelog update
PJBot Oct 31, 2024
d446a3e
Potencially fix approved labeler (#33083)
VasilisThePikachu Oct 31, 2024
1c2a965
Fixed spelling mistake in water blaster description. (#33087)
SpaceLizard24 Oct 31, 2024
4626904
[#20285 fix] Carp Plush and Rehydratables can now be put into mop buc…
SlamBamActionman Oct 31, 2024
d2baf18
Automatic changelog update
PJBot Oct 31, 2024
2282e3c
Revert #28358 (#33090)
VasilisThePikachu Oct 31, 2024
56d6231
Fixes tailthump breaking positional audio by making it mono (#33092)
deathride58 Oct 31, 2024
45aa782
Automatic changelog update
PJBot Oct 31, 2024
cf0d6c4
ExaminableDamage now puts its message at the bottom and in color (#32…
Moomoobeef Nov 1, 2024
835d0b4
Fixed trash not being spawned when throwing pies (#33013)
reesque Nov 1, 2024
59f1287
Automatic changelog update
PJBot Nov 1, 2024
b3190b8
Lower in-round votekick requirements (#32953)
SlamBamActionman Nov 1, 2024
06da4fc
Allow votekicks to be initiated in the lobby (#32528)
SlamBamActionman Nov 1, 2024
973aeb1
Automatic changelog update
PJBot Nov 1, 2024
d708a15
Fixes bolt lights of previously unpowered bolted doors (#33063)
PopGamer45 Nov 1, 2024
25b3898
Automatic changelog update
PJBot Nov 1, 2024
6ce80d9
Muffins (#29318)
RumiTiger Nov 1, 2024
b1a8eee
Automatic changelog update
PJBot Nov 1, 2024
e17d152
Borgs can no longer see mindshield + AI can no longer toggle off seei…
ScarKy0 Nov 1, 2024
c8259c6
Automatic changelog update
PJBot Nov 1, 2024
c9cd778
add IsMemberOfAny to faction system (#32975)
deltanedas Nov 1, 2024
d7a1753
Add CanLoad for biomes (#33050)
metalgearsloth Nov 1, 2024
b8a98de
Remove CargoPallet component from the cargo pallet (#33022)
Minemoder5000 Nov 1, 2024
844a920
Automatic changelog update
PJBot Nov 1, 2024
3382743
Minor antagonist guidebook changes (#32824)
UBlueberry Nov 2, 2024
146ae8a
Give Nukies a Hand Labeler (#33053)
thetolbean Nov 2, 2024
26194e2
Fix `ItemSlotSystem` popup Logic (#28856)
aspiringLich Nov 2, 2024
957b8de
Add cvars to votekick to customize requirements for the initiator. (#…
VasilisThePikachu Nov 2, 2024
2537bff
Automatic changelog update
PJBot Nov 2, 2024
1c8eed8
Add on-call functionality for adminning (#30443)
metalgearsloth Nov 2, 2024
51b8101
Automatic changelog update
PJBot Nov 2, 2024
05ae404
Pills are explosion resistant (partially reverts #15851) (#32458)
K-Dynamic Nov 2, 2024
7276fff
Automatic changelog update
PJBot Nov 2, 2024
b000a3e
Hasten handcraft gauze recipe & decrease techfab gauze cost (#32744)
K-Dynamic Nov 2, 2024
fcbf515
Automatic changelog update
PJBot Nov 2, 2024
1c2fd6a
Service workers antagonist fix. (#31359)
UbaserB Nov 2, 2024
2a6314b
Automatic changelog update
PJBot Nov 2, 2024
4f68315
Adds a new AME sound effect! (#33097)
AftrLite Nov 2, 2024
d1ab60f
Automatic changelog update
PJBot Nov 2, 2024
9520e82
Allow for the ai's laws to be changed from its core and eye (#32461)
nikthechampiongr Nov 2, 2024
131e492
Automatic changelog update
PJBot Nov 2, 2024
11f0dc4
clean up tools lathe recipes (#31521)
deltanedas Nov 2, 2024
7614c2f
Automatic changelog update
PJBot Nov 2, 2024
e7ca4b8
Intercoms and Radios both pick up proximate speech (#32737)
Centronias Nov 2, 2024
db4b2e0
Automatic changelog update
PJBot Nov 2, 2024
8c1281a
Adds headphones to loadouts (#33067)
joshepvodka Nov 2, 2024
a3ce9b0
Automatic changelog update
PJBot Nov 2, 2024
65462d8
Cardboard Box Capacity 4 -> 5 (#32743)
Scribbles0 Nov 2, 2024
6f1eeba
change ShowHealthBars and ShowHealthIcons to use protoId (#32355)
MilonPL Nov 2, 2024
0ba3350
Combat and survival knife storage/inhand sprites (#33111)
SpaceRox1244 Nov 2, 2024
4a39341
Delete conveyor_old.rsi (#33102)
Flareguy Nov 2, 2024
d993582
Fix broken computer white shadows (#33103)
Flareguy Nov 2, 2024
d2a487d
Update Credits (#33125)
github-actions[bot] Nov 3, 2024
912ac2c
Bugfix: Wielding now uses identity system. (#33134)
Plykiya Nov 3, 2024
a0ef431
Automatic changelog update
PJBot Nov 3, 2024
cc3a19c
Collapsible ghost roles menu (#32717)
MilenVolf Nov 4, 2024
9a51528
Automatic changelog update
PJBot Nov 4, 2024
83f7d3f
Added Popup for the Ligneous plant mutation when using hands. (#33136)
Tr1bute Nov 4, 2024
b8b958d
Automatic changelog update
PJBot Nov 4, 2024
5d9acb7
fix: Remove duplicate light blue towel from misc loadout (#33145)
michael-krebs Nov 4, 2024
f5fac7c
Made the SpeciesChange mutation no longer transfer with Sterile Swabs…
Tr1bute Nov 4, 2024
ad78b30
make emergency lights (de)constructable (#32945)
Boolean-Buckeye Nov 4, 2024
75dd790
Automatic changelog update
PJBot Nov 4, 2024
5b4f423
Fix: Web Clothing Butcher Issues (#33121)
thetolbean Nov 4, 2024
4ba8e35
Automatic changelog update
PJBot Nov 4, 2024
a3f10cc
Add Silicon Law cues to Every method a Silicon can have their laws ch…
poklj Nov 4, 2024
01ac967
Automatic changelog update
PJBot Nov 4, 2024
8f87bad
Fix DisplayVotes doing nothing for a vote (#33170)
DrSmugleaf Nov 5, 2024
aef7dd5
Automatic changelog update
PJBot Nov 5, 2024
cb59826
Hunger and thirst huds fix (#32832)
Kirus59 Nov 5, 2024
564606a
Automatic changelog update
PJBot Nov 5, 2024
da19abd
Don't show Reinforcement codewords on round end (#33181)
Errant-4 Nov 5, 2024
2382162
Automatic changelog update
PJBot Nov 5, 2024
1ded8e7
fix artifact debug assert (#33171)
slarticodefast Nov 5, 2024
bcfacec
Fix AI in Intelicard can see through walls (#33177)
Baptr0b0t Nov 6, 2024
d18dba9
Automatic changelog update
PJBot Nov 6, 2024
8ddc543
remove wanted list cartridge from captain PDA (#33084)
slarticodefast Nov 6, 2024
24e6b9f
Automatic changelog update
PJBot Nov 6, 2024
ed865ae
make admeme mouse eternally hungry and thirsty by increasing decay ra…
Plykiya Nov 6, 2024
d588409
Rework the Flare Gun & add a Security Shell Gun. (#32829)
BramvanZijp Nov 6, 2024
e72d63e
Automatic changelog update
PJBot Nov 6, 2024
b15d5a7
Changes to "Burst" firemode; Drozd, WT550 and C20-r (#31292)
SlamBamActionman Nov 6, 2024
5b0761d
Automatic changelog update
PJBot Nov 6, 2024
379fb4c
AI can now speak once more. (#33196)
ScarKy0 Nov 7, 2024
fc0d85b
Cog update (fixes) (#33202)
Spessmann Nov 7, 2024
8257dc8
Meta map: remove arrivals chair, changed maints shotgun to beanbag ro…
K-Dynamic Nov 7, 2024
d13765f
Fixes Lambordeere bolt buttons not being connected (#33065)
PopGamer45 Nov 7, 2024
03723af
Automatic changelog update
PJBot Nov 7, 2024
9ee47b9
Core Station: Telecoms air alarm connection to atmos devices (#33214)
scrivoy Nov 7, 2024
6a1d631
fix invalids core (#33215)
Emisse Nov 7, 2024
261c18f
Fix research disk crash (#33205)
ewokswagger Nov 8, 2024
0128554
Fix cursed mask bug (#33014)
FireNameFN Nov 8, 2024
667daa1
pass Actor to cartridge messages (#33210)
deltanedas Nov 8, 2024
80e148c
cham projector fixes/rewrite (#27111)
deltanedas Nov 8, 2024
8433868
Stable Merge (#33218)
Jezithyr Nov 8, 2024
2deb2ac
Merge remote-tracking branch 'wizards/master' into upstream-sync
Morb0 Nov 8, 2024
3c7e997
Fix upstream
Morb0 Nov 8, 2024
9b2b7b4
Update locale
Morb0 Nov 8, 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
4 changes: 3 additions & 1 deletion Content.Client/Commands/ShowHealthBarsCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Content.Shared.Damage.Prototypes;
using Content.Shared.Overlays;
using Robust.Client.Player;
using Robust.Shared.Console;
using Robust.Shared.Prototypes;
using System.Linq;

namespace Content.Client.Commands;
Expand Down Expand Up @@ -34,7 +36,7 @@ public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var showHealthBarsComponent = new ShowHealthBarsComponent
{
DamageContainers = args.ToList(),
DamageContainers = args.Select(arg => new ProtoId<DamageContainerPrototype>(arg)).ToList(),
HealthStatusIcon = null,
NetSyncEnabled = false
};
Expand Down
10 changes: 10 additions & 0 deletions Content.Client/Effects/ColorFlashEffectSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ private void OnColorFlashEffect(ColorFlashEffectEvent ev)
continue;
}

var targetEv = new GetFlashEffectTargetEvent(ent);
RaiseLocalEvent(ent, ref targetEv);
ent = targetEv.Target;

EnsureComp<ColorFlashEffectComponent>(ent, out comp);
comp.NetSyncEnabled = false;
comp.Color = sprite.Color;
Expand All @@ -132,3 +136,9 @@ private void OnColorFlashEffect(ColorFlashEffectEvent ev)
}
}
}

/// <summary>
/// Raised on an entity to change the target for a color flash effect.
/// </summary>
[ByRefEvent]
public record struct GetFlashEffectTargetEvent(EntityUid Target);
2 changes: 1 addition & 1 deletion Content.Client/Overlays/ShowThirstIconsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ private void OnGetStatusIconsEvent(EntityUid uid, ThirstComponent component, ref
return;

if (_thirst.TryGetStatusIconPrototype(component, out var iconPrototype))
ev.StatusIcons.Add(iconPrototype!);
ev.StatusIcons.Add(iconPrototype);
}
}
30 changes: 30 additions & 0 deletions Content.Client/Polymorph/Systems/ChameleonProjectorSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using Content.Client.Effects;
using Content.Client.Smoking;
using Content.Shared.Chemistry.Components;
using Content.Shared.Polymorph.Components;
using Content.Shared.Polymorph.Systems;
using Robust.Client.GameObjects;
using Robust.Shared.Player;

namespace Content.Client.Polymorph.Systems;

Expand All @@ -10,24 +13,51 @@ public sealed class ChameleonProjectorSystem : SharedChameleonProjectorSystem
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;

private EntityQuery<AppearanceComponent> _appearanceQuery;
private EntityQuery<SpriteComponent> _spriteQuery;

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

_appearanceQuery = GetEntityQuery<AppearanceComponent>();
_spriteQuery = GetEntityQuery<SpriteComponent>();

SubscribeLocalEvent<ChameleonDisguiseComponent, AfterAutoHandleStateEvent>(OnHandleState);

SubscribeLocalEvent<ChameleonDisguisedComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<ChameleonDisguisedComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<ChameleonDisguisedComponent, GetFlashEffectTargetEvent>(OnGetFlashEffectTargetEvent);
}

private void OnHandleState(Entity<ChameleonDisguiseComponent> ent, ref AfterAutoHandleStateEvent args)
{
CopyComp<SpriteComponent>(ent);
CopyComp<GenericVisualizerComponent>(ent);
CopyComp<SolutionContainerVisualsComponent>(ent);
CopyComp<BurnStateVisualsComponent>(ent);

// reload appearance to hopefully prevent any invisible layers
if (_appearanceQuery.TryComp(ent, out var appearance))
_appearance.QueueUpdate(ent, appearance);
}

private void OnStartup(Entity<ChameleonDisguisedComponent> ent, ref ComponentStartup args)
{
if (!_spriteQuery.TryComp(ent, out var sprite))
return;

ent.Comp.WasVisible = sprite.Visible;
sprite.Visible = false;
}

private void OnShutdown(Entity<ChameleonDisguisedComponent> ent, ref ComponentShutdown args)
{
if (_spriteQuery.TryComp(ent, out var sprite))
sprite.Visible = ent.Comp.WasVisible;
}

private void OnGetFlashEffectTargetEvent(Entity<ChameleonDisguisedComponent> ent, ref GetFlashEffectTargetEvent args)
{
args.Target = ent.Comp.Disguise;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<BoxContainer xmlns="https://spacestation14.io"
Orientation="Vertical"
Margin="8 0 8 0">
<BoxContainer Name="Buttons"
Orientation="Vertical"
SeparationOverride="5">
<!-- Buttons are added here by code -->
</BoxContainer>
</BoxContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,17 @@
namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles
{
[GenerateTypedNameReferences]
public sealed partial class GhostRolesEntry : BoxContainer
public sealed partial class GhostRoleButtonsBox : BoxContainer
{
private SpriteSystem _spriteSystem;
public event Action<GhostRoleInfo>? OnRoleSelected;
public event Action<GhostRoleInfo>? OnRoleFollow;

public GhostRolesEntry(string name, string description, bool hasAccess, FormattedMessage? reason, IEnumerable<GhostRoleInfo> roles, SpriteSystem spriteSystem)
public GhostRoleButtonsBox(bool hasAccess, FormattedMessage? reason, IEnumerable<GhostRoleInfo> roles, SpriteSystem spriteSystem)
{
RobustXamlLoader.Load(this);
_spriteSystem = spriteSystem;

Title.Text = name;
Description.SetMessage(description);

foreach (var role in roles)
{
var button = new GhostRoleEntryButtons(role);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<BoxContainer xmlns="https://spacestation14.io"
Orientation="Horizontal">
Orientation="Horizontal"
HorizontalAlignment="Stretch">
<Button Name="RequestButton"
Access="Public"
Text="{Loc 'ghost-roles-window-request-role-button'}"
StyleClasses="OpenRight"
HorizontalAlignment="Left"
SetWidth="300"/>
HorizontalExpand="True"
SizeFlagsStretchRatio="3"/>
<Button Name="FollowButton"
Access="Public"
Text="{Loc 'ghost-roles-window-follow-role-button'}"
StyleClasses="OpenLeft"
HorizontalAlignment="Right"
SetWidth="150"/>
HorizontalExpand="True"/>
</BoxContainer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<BoxContainer xmlns="https://spacestation14.io"
Orientation="Vertical">
<Label Name="Title"
StyleClasses="LabelKeyText"/>
<PanelContainer StyleClasses="HighDivider" />
<RichTextLabel Name="Description"
Margin="0 4"/>
</BoxContainer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles
{
[GenerateTypedNameReferences]
public sealed partial class GhostRoleInfoBox : BoxContainer
{
public GhostRoleInfoBox(string name, string description)
{
RobustXamlLoader.Load(this);

Title.Text = name;
Description.SetMessage(description);
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Content.Shared.Ghost.Roles;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Shared.Utility;

namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles
{
Expand Down Expand Up @@ -77,35 +76,46 @@ public override void HandleState(EuiStateBase state)

if (state is not GhostRolesEuiState ghostState)
return;

// We must save BodyVisible state, so all Collapsible boxes will not close
// on adding new ghost role.
// Save the current state of each Collapsible box being visible or not
_window.SaveCollapsibleBoxesStates();

// Clearing the container before adding new roles
_window.ClearEntries();

var entityManager = IoCManager.Resolve<IEntityManager>();
var sysManager = entityManager.EntitySysManager;
var spriteSystem = sysManager.GetEntitySystem<SpriteSystem>();
var requirementsManager = IoCManager.Resolve<JobRequirementsManager>();

// TODO: role.Requirements value doesn't work at all as an equality key, this must be fixed
// Grouping roles
var groupedRoles = ghostState.GhostRoles.GroupBy(
role => (role.Name, role.Description, role.Requirements));

// Add a new entry for each role group
foreach (var group in groupedRoles)
{
var name = group.Key.Name;
var description = group.Key.Description;
bool hasAccess = true;
FormattedMessage? reason;

if (!requirementsManager.CheckRoleRequirements(group.Key.Requirements, null, out reason))
{
hasAccess = false;
}
var hasAccess = requirementsManager.CheckRoleRequirements(
group.Key.Requirements,
null,
out var reason);

// Adding a new role
_window.AddEntry(name, description, hasAccess, reason, group, spriteSystem);
}

// Restore the Collapsible box state if it is saved
_window.RestoreCollapsibleBoxesStates();

// Close the rules window if it is no longer needed
var closeRulesWindow = ghostState.GhostRoles.All(role => role.Identifier != _windowRulesId);
if (closeRulesWindow)
{
_windowRules?.Close();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using System.Linq;
using Content.Shared.Ghost.Roles;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Utility;

namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles
Expand All @@ -12,20 +15,86 @@ public sealed partial class GhostRolesWindow : DefaultWindow
public event Action<GhostRoleInfo>? OnRoleRequestButtonClicked;
public event Action<GhostRoleInfo>? OnRoleFollow;

private Dictionary<(string name, string description), Collapsible> _collapsibleBoxes = new();
private HashSet<(string name, string description)> _uncollapsedStates = new();

public GhostRolesWindow()
{
RobustXamlLoader.Load(this);
}

public void ClearEntries()
{
NoRolesMessage.Visible = true;
EntryContainer.DisposeAllChildren();
_collapsibleBoxes.Clear();
}

public void SaveCollapsibleBoxesStates()
{
_uncollapsedStates.Clear();
foreach (var (key, collapsible) in _collapsibleBoxes)
{
if (collapsible.BodyVisible)
{
_uncollapsedStates.Add(key);
}
}
}

public void RestoreCollapsibleBoxesStates()
{
foreach (var (key, collapsible) in _collapsibleBoxes)
{
collapsible.BodyVisible = _uncollapsedStates.Contains(key);
}
}

public void AddEntry(string name, string description, bool hasAccess, FormattedMessage? reason, IEnumerable<GhostRoleInfo> roles, SpriteSystem spriteSystem)
{
NoRolesMessage.Visible = false;

var entry = new GhostRolesEntry(name, description, hasAccess, reason, roles, spriteSystem);
entry.OnRoleSelected += OnRoleRequestButtonClicked;
entry.OnRoleFollow += OnRoleFollow;
EntryContainer.AddChild(entry);
var ghostRoleInfos = roles.ToList();
var rolesCount = ghostRoleInfos.Count;

var info = new GhostRoleInfoBox(name, description);
var buttons = new GhostRoleButtonsBox(hasAccess, reason, ghostRoleInfos, spriteSystem);
buttons.OnRoleSelected += OnRoleRequestButtonClicked;
buttons.OnRoleFollow += OnRoleFollow;

EntryContainer.AddChild(info);

if (rolesCount > 1)
{
var buttonHeading = new CollapsibleHeading(Loc.GetString("ghost-roles-window-available-button", ("rolesCount", rolesCount)));

buttonHeading.AddStyleClass(ContainerButton.StyleClassButton);
buttonHeading.Label.HorizontalAlignment = HAlignment.Center;
buttonHeading.Label.HorizontalExpand = true;

var body = new CollapsibleBody
{
Margin = new Thickness(0, 5, 0, 0),
};

// TODO: Add Requirements to this key when it'll be fixed and work as an equality key in GhostRolesEui
var key = (name, description);

var collapsible = new Collapsible(buttonHeading, body)
{
Orientation = BoxContainer.LayoutOrientation.Vertical,
Margin = new Thickness(0, 0, 0, 8),
};

body.AddChild(buttons);

EntryContainer.AddChild(collapsible);
_collapsibleBoxes.Add(key, collapsible);
}
else
{
EntryContainer.AddChild(buttons);
}
}
}
}
Loading
Loading