Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/wizards/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Content.Client/Lobby/UI/LobbyGui.xaml
#	Resources/Textures/Objects/Misc/bureaucracy.rsi/meta.json
#	Resources/Textures/Objects/Misc/bureaucracy.rsi/paper_stamp-psychologist.png
  • Loading branch information
VigersRay committed Sep 21, 2024
2 parents b2c096b + c5d62ce commit 73c323b
Show file tree
Hide file tree
Showing 24 changed files with 28,679 additions and 20,962 deletions.
3 changes: 3 additions & 0 deletions Content.Client/UserInterface/Controls/DialogWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ public DialogWindow(string title, List<QuickDialogEntry> entries, bool ok = true
Prompts.AddChild(box);
}

// Grab keyboard focus for the first dialog entry
_promptLines[0].Item2.GrabKeyboardFocus();

OkButton.OnPressed += _ => Confirm();

CancelButton.OnPressed += _ =>
Expand Down
71 changes: 25 additions & 46 deletions Content.Server/Administration/Commands/RoleBanListCommand.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Linq;
using System.Text;
using Content.Server.Administration.BanList;
using Content.Server.EUI;
using Content.Server.Database;
using Content.Shared.Administration;
using Robust.Server.Player;
Expand All @@ -10,6 +12,12 @@ namespace Content.Server.Administration.Commands;
[AdminCommand(AdminFlags.Ban)]
public sealed class RoleBanListCommand : IConsoleCommand
{
[Dependency] private readonly IServerDbManager _dbManager = default!;

[Dependency] private readonly EuiManager _eui = default!;

[Dependency] private readonly IPlayerLocator _locator = default!;

public string Command => "rolebanlist";
public string Description => Loc.GetString("cmd-rolebanlist-desc");
public string Help => Loc.GetString("cmd-rolebanlist-help");
Expand All @@ -29,66 +37,37 @@ public async void Execute(IConsoleShell shell, string argStr, string[] args)
return;
}

var dbMan = IoCManager.Resolve<IServerDbManager>();

var target = args[0];
var data = await _locator.LookupIdByNameOrIdAsync(args[0]);

var locator = IoCManager.Resolve<IPlayerLocator>();
var located = await locator.LookupIdByNameOrIdAsync(target);
if (located == null)
if (data == null)
{
shell.WriteError("Unable to find a player with that name or id.");
return;
}

var targetUid = located.UserId;
var targetHWid = located.LastHWId;
var targetAddress = located.LastAddress;

var bans = await dbMan.GetServerRoleBansAsync(targetAddress, targetUid, targetHWid, includeUnbanned);

if (bans.Count == 0)
if (shell.Player is not { } player)
{
shell.WriteLine("That user has no bans in their record.");
return;
}

var bansString = new StringBuilder("Bans in record:\n");
var bans = await _dbManager.GetServerRoleBansAsync(data.LastAddress, data.UserId, data.LastHWId, includeUnbanned);

var first = true;
foreach (var ban in bans)
{
if (!first)
bansString.Append("\n\n");
else
first = false;

bansString
.Append("Ban ID: ")
.Append(ban.Id)
.Append('\n')
.Append("Role: ")
.Append(ban.Role)
.Append('\n')
.Append("Banned on ")
.Append(ban.BanTime);

if (ban.ExpirationTime != null)
if (bans.Count == 0)
{
bansString
.Append(" until ")
.Append(ban.ExpirationTime.Value);
shell.WriteLine("That user has no bans in their record.");
return;
}

bansString
.Append('\n');

bansString
.Append("Reason: ")
.Append(ban.Reason);
foreach (var ban in bans)
{
var msg = $"ID: {ban.Id}: Role: {ban.Role} Reason: {ban.Reason}";
shell.WriteLine(msg);
}
return;
}

shell.WriteLine(bansString.ToString());
var ui = new BanListEui();
_eui.OpenEui(ui, player);
await ui.ChangeBanListPlayer(data.UserId);

}

public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,10 @@ private void OnPowerChange(EntityUid uid, SharedDisposalUnitComponent component,
return;
}

if (component.Engaged && !TryFlush(uid, component))
if (component.Engaged)
{
QueueAutomaticEngage(uid, component);
// Run ManualEngage to recalculate a new flush time
ManualEngage(uid, component);
}
}

Expand Down
16 changes: 12 additions & 4 deletions Content.Server/Objectives/Systems/StealConditionSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Server.Objectives.Components;
using Content.Server.Objectives.Components.Targets;
using Content.Shared.CartridgeLoader;
using Content.Shared.Interaction;
using Content.Shared.Mind;
using Content.Shared.Objectives.Components;
using Content.Shared.Objectives.Systems;
Expand All @@ -21,11 +22,14 @@ public sealed class StealConditionSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
[Dependency] private readonly SharedObjectivesSystem _objectives = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;

private EntityQuery<ContainerManagerComponent> _containerQuery;

private HashSet<Entity<TransformComponent>> _nearestEnts = new();

public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -103,15 +107,19 @@ private float GetProgress(MindComponent mind, StealConditionComponent condition)
//check stealAreas
if (condition.CheckStealAreas)
{
var areasQuery = AllEntityQuery<StealAreaComponent>();
while (areasQuery.MoveNext(out var uid, out var area))
var areasQuery = AllEntityQuery<StealAreaComponent, TransformComponent>();
while (areasQuery.MoveNext(out var uid, out var area, out var xform))
{
if (!area.Owners.Contains(mind.Owner))
continue;

var nearestEnt = _lookup.GetEntitiesInRange(uid, area.Range);
foreach (var ent in nearestEnt)
_nearestEnts.Clear();
_lookup.GetEntitiesInRange<TransformComponent>(xform.Coordinates, area.Range, _nearestEnts);
foreach (var ent in _nearestEnts)
{
if (!_interaction.InRangeUnobstructed((uid, xform), (ent, ent.Comp), range: area.Range))
continue;

CheckEntity(ent, condition, ref containerStack, ref count);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Beeper/Systems/ProximityBeeperSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ private void OnProximityTargetUpdate(EntityUid owner, ProximityBeeperComponent p

private void OnNewProximityTarget(EntityUid owner, ProximityBeeperComponent proxBeeper, ref NewProximityTargetEvent args)
{
_beeper.SetMute(owner, args.Target != null);
_beeper.SetMute(owner, args.Target == null);
}
}
2 changes: 1 addition & 1 deletion Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private bool CanBuckle(EntityUid buckleUid,
return false;
}

if (buckleComp.Buckled)
if (buckleComp.Buckled && !TryUnbuckle(buckleUid, user, buckleComp))
{
if (popup)
{
Expand Down
136 changes: 67 additions & 69 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,4 @@
Entries:
- author: Cojoke-dot
changes:
- message: The Spray Painter can now be used to paint glass airlocks to look like
regular glass airlocks.
type: Tweak
id: 6902
time: '2024-07-11T05:33:20.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29869
- author: MFMessage
changes:
- message: Picking a ghost role as an admin will now deadmin.
type: Fix
id: 6903
time: '2024-07-11T05:53:15.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29790
- author: Winkarst-cpu
changes:
- message: Admin notes popups are now more readable.
type: Tweak
id: 6904
time: '2024-07-11T14:03:22.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29909
- author: jonathanargo
changes:
- message: Muskets are now wieldable.
type: Tweak
id: 6905
time: '2024-07-12T09:16:21.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29910
- author: themias
changes:
- message: Notice boards can now be built on walls
type: Fix
id: 6906
time: '2024-07-12T09:18:32.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29851
- author: slarticodefast
changes:
- message: Stun batons, stun prods and banana cream pies now fly like other throwing
weapons when thrown.
type: Fix
id: 6907
time: '2024-07-12T09:19:24.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29883
- author: Plykiya
changes:
- message: Dropping an item while in a container now places the item in the container.
type: Fix
id: 6908
time: '2024-07-12T09:24:08.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29900
- author: coffeeware, slarticodefast
changes:
- message: Fixed items thrown very fast not being in the air. In particular this
fixes the pneumatic cannon.
type: Fix
- message: Buffed base hand throwing speed by 10% to be more similar to before the
recent throwing changes.
type: Tweak
id: 6909
time: '2024-07-12T10:32:47.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29935
- author: themias
changes:
- message: Timers can now be deconstructed
type: Fix
id: 6910
time: '2024-07-12T11:38:59.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29917
- author: jonathanargo
changes:
- message: Hard hat icon sprites are now centered correctly.
Expand Down Expand Up @@ -3922,3 +3853,70 @@
id: 7401
time: '2024-09-19T13:45:04.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32303
- author: deltanedas
changes:
- message: Increased the thieving beacon's range to 2 tiles.
type: Tweak
id: 7402
time: '2024-09-19T13:55:31.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/31340
- author: Winkarst-cpu
changes:
- message: The first editable line in the dialog window now grabs the keyboard focus
once it's open.
type: Fix
id: 7403
time: '2024-09-19T14:01:54.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/31294
- author: Plykiya
changes:
- message: You can now transfer someone from a rollerbed to a bed directly.
type: Tweak
id: 7404
time: '2024-09-19T14:08:33.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32089
- author: SaphireLattice
changes:
- message: Fland now has public glass airlocks sectioning the hallway.
type: Fix
id: 7405
time: '2024-09-19T19:17:19.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32264
- author: Plykiya
changes:
- message: Cockroaches and mothroaches can no longer damage things with their bites.
type: Tweak
id: 7406
time: '2024-09-19T22:15:45.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32221
- author: PopGamer46
changes:
- message: The rat king's rats now follow you instead of idling when there is no
one to attack during the CheeseEm order
type: Tweak
id: 7407
time: '2024-09-19T23:27:23.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32181
- author: JIPDawg
changes:
- message: Small Hydraulic clamp now correctly consumes 2% battery instead of recharging
the battery by 2%
type: Fix
id: 7408
time: '2024-09-20T04:09:01.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32320
- author: clinux
changes:
- message: Added the psychologist's stamp. Prescribe treatments for your less mentally
sane crew!
type: Add
id: 7409
time: '2024-09-20T14:42:57.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/31881
- author: saga3152
changes:
- message: You can now make vodka and soda water.
type: Add
id: 7410
time: '2024-09-20T22:27:41.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32252
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_strings/paper/stamp-component.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ stamp-component-stamped-name-trader = Trader
stamp-component-stamped-name-syndicate = Syndicate
stamp-component-stamped-name-ce = Chief Engineer
stamp-component-stamped-name-greytide = Greytide
stamp-component-stamped-name-psychologist = Psychologist
Loading

0 comments on commit 73c323b

Please sign in to comment.