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

Upstream2 #48

Merged
merged 190 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
3a24824
Show total playtime in player list and AHelp window (#20980)
DrSmugleaf Oct 14, 2023
5be0df3
Add admin Erase verb, add checkbox to erase from the ban panel (#20985)
DrSmugleaf Oct 14, 2023
f02a544
Make the panic bunker UI send cvar updates on focus exit, add erase v…
DrSmugleaf Oct 14, 2023
d59dd0d
saltern update (#20986)
deltanedas Oct 14, 2023
8639df7
Add pop sound effect when using the erase admin verb (#20988)
DrSmugleaf Oct 14, 2023
546fa44
Kill `SharedUnoccludedExtensions` (#20914)
mirrorcult Oct 14, 2023
0775ab6
Moves SolutionContainerManagerComponent to Shared. (#20944)
TemporalOroboros Oct 14, 2023
ce76a03
Small ExplosionSystem Cleanup (#20817)
ElectroJr Oct 14, 2023
49a584f
Update comms console description (#20974)
Interrobang01 Oct 14, 2023
9e1ecde
Remove obsolete usages of AnimationPlayerComponent (#20806)
DrSmugleaf Oct 14, 2023
ed15b93
Make starting gear automatically find hands for inhand items (#20861)
DrSmugleaf Oct 14, 2023
5767a59
Automatic changelog update
PJBot Oct 14, 2023
eba6e74
helm explosion resist nerf (#20943)
liltenhead Oct 14, 2023
8555a8e
Automatic changelog update
PJBot Oct 14, 2023
aac17c3
Cleanup more follower leaks (#20902)
metalgearsloth Oct 14, 2023
38387ef
atmos buttons and new jani sign (#20969)
JustCone14 Oct 14, 2023
d2ad017
meta update (#20916)
JoeHammad1844 Oct 14, 2023
abf80c5
Barratry update (#20810)
JoeHammad1844 Oct 14, 2023
873e287
Automatic changelog update
PJBot Oct 14, 2023
8801885
Fix not being able to sort by playtime in the F7 players tab (#21004)
DrSmugleaf Oct 14, 2023
e5f5a28
adds "idk." to the text to emote list (#21015)
QuietlyWhisper Oct 15, 2023
d10e33c
Allow Hand-Prying Most Unpowered Airlocks (#21002)
ike709 Oct 15, 2023
212a892
Automatic changelog update
PJBot Oct 15, 2023
bfb5bcd
add rainbow fish (#20955)
deltanedas Oct 15, 2023
687ceee
Rolling pin can be worn in belt slot (#21019)
deltanedas Oct 16, 2023
58ae379
Fix low tickrate eye lerping (#21001)
ElectroJr Oct 16, 2023
556e679
Make secure crate weldable (#21007)
iacore Oct 16, 2023
27b9c35
Automatic changelog update
PJBot Oct 16, 2023
3ecaa65
fixes behonkers, they now function like spitters and will attack via …
brainfood1183 Oct 16, 2023
e40172e
Automatic changelog update
PJBot Oct 16, 2023
c20bf50
Fix sound on material reclaimer (#21030)
ShadowCommander Oct 16, 2023
b5a7af1
Fix uncuffing for zombies (#21021)
EmoGarbage404 Oct 16, 2023
7032a5a
Update dev map (#21016)
ElectroJr Oct 16, 2023
f7fbaba
Less charges for Sci flash (#20959)
coolmankid12345 Oct 16, 2023
1f564f0
Automatic changelog update
PJBot Oct 16, 2023
c3e303b
Fix sorting admin player tab playtime alphabetically (#21028)
DrSmugleaf Oct 16, 2023
101cc34
upgrade (#20997)
Lomcastar Oct 16, 2023
4225440
Automatic changelog update
PJBot Oct 16, 2023
1f0c931
Default warp point names (#21017)
ElectroJr Oct 16, 2023
00e274e
Add new entity spawn test & fix misc bugs (#19953)
ElectroJr Oct 16, 2023
77964d4
Kill `SharedEntityExtensions` and all popup extensions (#20909)
mirrorcult Oct 16, 2023
a439a12
Stun baton tweak (#20970)
JoeHammad1844 Oct 16, 2023
2b1e4ed
Automatic changelog update
PJBot Oct 16, 2023
91ea140
Fix item drop mispredicts (#21035)
metalgearsloth Oct 16, 2023
fedc7c6
Automatic changelog update
PJBot Oct 16, 2023
fd99451
technology auto guidebook (#21029)
EmoGarbage404 Oct 16, 2023
d394477
Update submodule to 167.0.0 (#21060)
metalgearsloth Oct 17, 2023
ebd5238
Restrict arrows from being used in cannons (#21067)
VasilisThePikachu Oct 17, 2023
c08be70
Automatic changelog update
PJBot Oct 17, 2023
0cf28f9
Spear 1984 (#21065)
VasilisThePikachu Oct 17, 2023
b33b575
Automatic changelog update
PJBot Oct 17, 2023
df81532
Change wide swing sprites to be that of the weapon used (#21050)
notquitehadouken Oct 18, 2023
433c706
Automatic changelog update
PJBot Oct 18, 2023
cb1b067
Lockable Suit Storages (#20950)
rosieposieeee Oct 18, 2023
a136616
Replace Component.OnRemove with ComponentRemove event subscriptions (…
DrSmugleaf Oct 18, 2023
5934c67
Replace all T : Component constraints with T : IComponent (#21073)
DrSmugleaf Oct 18, 2023
7ac3387
Update RobustToolbox to 904ddea27497caa6e652eec1b9d3ff2743a79e5c (#21…
DrSmugleaf Oct 18, 2023
13cff0e
Fix build (#21075)
DrSmugleaf Oct 18, 2023
c72b95d
Fix debug assert when shooting guns (#21070)
DrSmugleaf Oct 18, 2023
7a878f7
Fix vaulting mispredict (#21082)
metalgearsloth Oct 18, 2023
6b58757
Automatic changelog update
PJBot Oct 18, 2023
344c107
FIX (#21091)
notquitehadouken Oct 18, 2023
badb601
Added implanter sprite (#20758)
LinkF2kkk Oct 18, 2023
8edd525
Display current load and maximum capacity (#20181)
daerSeebaer Oct 18, 2023
8adbd50
Automatic changelog update
PJBot Oct 18, 2023
064cb87
Accurate temperature alerts (#19913)
Errant-4 Oct 18, 2023
f20ed94
Automatic changelog update
PJBot Oct 18, 2023
9741aaa
Adjust warm donk pocket chemicals (#21052)
FluffiestFloof Oct 18, 2023
7b4ceb9
Add checkbox for toggle walking (#20926)
Oct 18, 2023
c92b99f
Tortilla dough, Taco shells, and Tacos (#20797)
phunnyguy Oct 18, 2023
dffc321
Automatic changelog update
PJBot Oct 18, 2023
414701d
Swaps HV/MV/LV scaling to supply power scaling (#20880)
TemporalOroboros Oct 18, 2023
9c25db8
Automatic changelog update
PJBot Oct 18, 2023
b419dbb
Make gibbing drop items again (#21047)
Doru991 Oct 18, 2023
68ed978
Automatic changelog update
PJBot Oct 18, 2023
83acaa5
Add security beacon (#21048)
IamVelcroboy Oct 19, 2023
4ca9227
Add sufix to sci flash (#21095)
VasilisThePikachu Oct 19, 2023
5703776
Atmos-tech's casual jumpsuit resprite (#20989)
KingFroozy Oct 19, 2023
3e32e75
Automatic changelog update
PJBot Oct 19, 2023
e04d6a3
Fixed players without headrevs ticked being picked anyway (#20895)
VasilisThePikachu Oct 19, 2023
0a4c16c
make meat sizzle when cooked (#20877)
deltanedas Oct 19, 2023
41ec40a
Automatic changelog update
PJBot Oct 19, 2023
3be48be
wet floor bomb properties (#20823)
Panzer-IV1 Oct 19, 2023
8d070d4
Allow Chemical Dispenser to be scrollable (#20800)
Itzbenz Oct 19, 2023
9bb6218
Added fun: Darts (#20582)
TheShuEd Oct 19, 2023
1a12892
Automatic changelog update
PJBot Oct 19, 2023
0d2afb0
reduce c4 and c4 bundle price (#21102)
asperger-sind Oct 19, 2023
5825ffb
Automatic changelog update
PJBot Oct 19, 2023
f560f88
Remove 700 usages of Component.Owner (#21100)
DrSmugleaf Oct 19, 2023
aeaabc5
Update RobustToolbox to v169.0.0 (#21105)
DrSmugleaf Oct 19, 2023
69b38ef
Yeah (#21112)
coolmankid12345 Oct 20, 2023
2cb47e5
fix botany tools and air tank wide swing animations (#21103)
notquitehadouken Oct 20, 2023
d4aeba8
add craft rollerbed & wheelchair (#21110)
IntegerTempest Oct 20, 2023
5ae3a02
Automatic changelog update
PJBot Oct 20, 2023
5734f02
Fix ghost actions disappearing when toggling visibility of other ghos…
DrSmugleaf Oct 20, 2023
3a561ed
fixed localization for guardian (#21101)
Sirionaut Oct 20, 2023
68aa295
Add internal temperatures for cooking meats (#20659)
deltanedas Oct 20, 2023
f7108af
Automatic changelog update
PJBot Oct 20, 2023
82627ca
Orewall and cobblestone wall pack (#21034)
TheShuEd Oct 20, 2023
44bd12c
Fix replay infinite loop (#21129)
metalgearsloth Oct 20, 2023
77d9876
Automatic changelog update
PJBot Oct 20, 2023
8f06856
Fix rat king rummage audio (#21130)
metalgearsloth Oct 20, 2023
29ac3f3
Update Robust to v169.0.1 (#21139)
DrSmugleaf Oct 21, 2023
db81050
Automatic changelog update
PJBot Oct 21, 2023
b105590
Merge remote-tracking branch 'wizards/master' into upstream2
xtray85 Oct 21, 2023
d80ef97
Fixes
xtray85 Oct 21, 2023
470db42
HandVirtualItem disable
xtray85 Oct 21, 2023
e2227c6
Make common netspeak get replaced in the chat (#20180)
Dutch-VanDerLinde Oct 21, 2023
93c345a
Automatic changelog update
PJBot Oct 21, 2023
9ea8e03
Social a-anxiety/st-st-stuttering t-trait. (#20500)
VasilisThePikachu Oct 21, 2023
498af49
Automatic changelog update
PJBot Oct 21, 2023
4fc45f3
Update RobustToolbox to v170.0.0 (#21149)
DrSmugleaf Oct 21, 2023
b589a12
Fix thrusters starting disabled (#21147)
DrSmugleaf Oct 21, 2023
0109e7a
Fix expeditions console not having any expeditions (#21148)
DrSmugleaf Oct 21, 2023
0b5fd38
Automatic changelog update
PJBot Oct 21, 2023
b44281a
Fix whitelist commands not giving feedback with 0 arguments, trim nam…
DrSmugleaf Oct 21, 2023
d282082
Telekinetic door prying fix (#21150)
nikthechampiongr Oct 22, 2023
3f241b4
emitter bolts can mine (#21135)
deltanedas Oct 22, 2023
082e3b9
Automatic changelog update
PJBot Oct 22, 2023
60bfdc4
Automatic changelog update
PJBot Oct 22, 2023
e2352fc
Update buckle jointrelay (#21079)
metalgearsloth Oct 22, 2023
a5f1683
RCD and tile placement fixes (#21132)
metalgearsloth Oct 22, 2023
e3eaba1
Fix inventory transform bug (#21144)
ElectroJr Oct 22, 2023
fbf4333
Maybe fix hand test failures (#21157)
ElectroJr Oct 22, 2023
975a8e8
Automatic changelog update
PJBot Oct 22, 2023
7c2a00d
Update submodule to 171.0.0 (#21158)
metalgearsloth Oct 22, 2023
c1bc177
Make secure crates weldable, for real this time (#21037)
iacore Oct 22, 2023
dc9f9b5
ignition source refactor (#21044)
deltanedas Oct 22, 2023
002d3be
The Quartermaster's Requisition Digi-board (#21023)
Endecc Oct 22, 2023
ef0c079
Automatic changelog update
PJBot Oct 22, 2023
988bfa5
Replaced Wieldable DoAfter with UseDelay (#18880)
stopbreaking Oct 22, 2023
c318cba
Automatic changelog update
PJBot Oct 22, 2023
190b1f6
Kettle updates (#21164)
TsjipTsjip Oct 22, 2023
43d5c00
Store round start date in the database (#21153)
DrSmugleaf Oct 23, 2023
52e1d64
Stop all reads/writes to the admin_log_entity table (#21186)
DrSmugleaf Oct 23, 2023
33935c5
Increase Ninja Suit Weight (#21188)
Nairodian Oct 23, 2023
46a3076
Predict tile-prying (#21167)
metalgearsloth Oct 23, 2023
eae349d
Automatic changelog update
PJBot Oct 23, 2023
7073b29
Buffs Double bladed energy swords (#21131)
Tryded Oct 23, 2023
60092e8
Automatic changelog update
PJBot Oct 23, 2023
472381c
Add GrantContainedActions() (#21206)
ElectroJr Oct 24, 2023
0e0ac5f
Drop admin log entity db table (#21216)
DrSmugleaf Oct 24, 2023
ddf1fd9
fix magnet trigger for artifacts (#21213)
EmoGarbage404 Oct 24, 2023
51885f4
Automatic changelog update
PJBot Oct 24, 2023
4bb355a
Fix ore bag not picking up artifact fragments (#21195)
Stray-Pyramid Oct 24, 2023
29889f5
Automatic changelog update
PJBot Oct 24, 2023
4e7bdc6
Fix electrocution resolve error log (#21179)
ElectroJr Oct 24, 2023
94796dd
Slightly better locale for revs (#21168)
VasilisThePikachu Oct 24, 2023
fe3bcda
Remove noRot from asteroids (#21219)
QuietlyWhisper Oct 24, 2023
47b244b
Hijack shuttle objective (#19621)
Morb0 Oct 24, 2023
c09633f
Automatic changelog update
PJBot Oct 24, 2023
41a9b88
Make it a lil easier to restrict what can go in a cannon (#21093)
VasilisThePikachu Oct 24, 2023
c500a63
Add placementreplacement to wallrocks (#21220)
metalgearsloth Oct 24, 2023
7ba0ea2
IPlayerManager refactor (#21215)
ElectroJr Oct 24, 2023
b98b0d9
Update submodule to 172.0.0 (#21222)
metalgearsloth Oct 24, 2023
ba6aaa5
Make stuttering less common with the trait (#21207)
VasilisThePikachu Oct 24, 2023
ea0459f
Automatic changelog update
PJBot Oct 24, 2023
4701b85
Fix 0-length climbs (#21224)
metalgearsloth Oct 24, 2023
517aea8
Automatic changelog update
PJBot Oct 24, 2023
a2bbda4
Revert "Update submodule to 172.0.0 (#21222)" (#21225)
metalgearsloth Oct 24, 2023
0880145
Mind tweaks & fixes (#21203)
ElectroJr Oct 24, 2023
7c22616
Update deathhead_r_leg.png (#21226)
FluffiestFloof Oct 24, 2023
13c5ac7
Add hint for the examine trigger effect (#21166)
liltenhead Oct 24, 2023
dd30b3f
Automatic changelog update
PJBot Oct 24, 2023
b59cc50
cornmeal is actually obtainable now (#21162)
Stealthbomber16 Oct 24, 2023
968e6e6
Automatic changelog update
PJBot Oct 24, 2023
ed36abc
Healing skeletons by pouring milk over them (and clean pie remains of…
Myakot Oct 24, 2023
7ef9bac
Automatic changelog update
PJBot Oct 24, 2023
4df2f91
Fix anomaly locators frantically beeping when entering detection rang…
TemporalOroboros Oct 24, 2023
33593b7
Automatic changelog update
PJBot Oct 24, 2023
ef7f3b1
Remove "mk --> mmm, okay" and "u --> you" to chatsan anti slang (#21177)
Dutch-VanDerLinde Oct 25, 2023
f0c5aa1
Automatic changelog update
PJBot Oct 25, 2023
3007200
Adds AttemptEntity(Uns|S)tickEvent. (#20728)
TemporalOroboros Oct 25, 2023
4b10cab
Change ListContainer to send null when selected is removed from the d…
ShadowCommander Oct 25, 2023
6e007b0
fix feeding unremovable items (#21234)
EmoGarbage404 Oct 25, 2023
9025cca
Automatic changelog update
PJBot Oct 25, 2023
b6a8f5e
Power switchable refactor (#20419)
deltanedas Oct 25, 2023
33c82d6
simple space mobs cant be flashed (#20784)
deltanedas Oct 25, 2023
88a2945
give roundstart borgs names (#20081)
deltanedas Oct 25, 2023
0253270
fix searching on vending machines (#21233)
EmoGarbage404 Oct 25, 2023
07a956e
syndicate snack box (#21024)
deltanedas Oct 25, 2023
80c5717
Fix DockingControl (#21238)
metalgearsloth Oct 25, 2023
94cda6a
Shadow Dimension visual pack (#21237)
TheShuEd Oct 25, 2023
6b04aaf
Potato battery update + potato AI (#21142)
Doru991 Oct 25, 2023
5e71e44
Merge remote-tracking branch 'wizards/master' into upstream2
xtray85 Oct 25, 2023
1b1a622
YAML ФИКСЫ
xtray85 Oct 27, 2023
f808584
Fix Item
xtray85 Oct 27, 2023
dd24d19
Merge branch 'master' into upstream2
xtray85 Oct 27, 2023
12c1d52
YAML FIx
xtray85 Oct 27, 2023
dd282f5
Fix Container Fill Spawner
xtray85 Oct 27, 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
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion Content.Client/Administration/UI/BanPanel/BanPanel.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<LineEdit Name="HwidLine" MinWidth="100" HorizontalExpand="True" PlaceHolder="{Loc ban-panel-hwid}" ToolTip="{Loc ban-panel-ip-hwid-tooltip}" />
</BoxContainer>
<CheckBox Name="LastConnCheckbox" Margin="2" Text="{Loc ban-panel-last-conn}" Pressed="True" />
<CheckBox Name="EraseCheckbox" Margin="2" Text="{Loc ban-panel-erase}" Pressed="False" />
<BoxContainer Orientation="Horizontal" Margin="2">
<LineEdit Name="TimeLine" MaxWidth="150" MinWidth="70" PlaceHolder="0" />
<OptionButton Name="MultiplierOption" />
Expand All @@ -30,7 +31,7 @@
</BoxContainer>
<BoxContainer Orientation="Horizontal" Margin="4">
<OptionButton Name="TypeOption" />
<Control MinWidth="30"></Control>
<Control MinWidth="30" />
<Label Text="{Loc ban-panel-severity}" />
<OptionButton Name="SeverityOption" />
</BoxContainer>
Expand Down
8 changes: 3 additions & 5 deletions Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using System.Globalization;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text.RegularExpressions;
using Content.Client.Administration.UI.CustomControls;
using Content.Client.Stylesheets;
using Content.Shared.Administration;
using Content.Shared.Database;
using Content.Shared.Roles;
Expand All @@ -23,7 +20,7 @@ namespace Content.Client.Administration.UI.BanPanel;
[GenerateTypedNameReferences]
public sealed partial class BanPanel : DefaultWindow
{
public event Action<string?, (IPAddress, int)?, bool, byte[]?, bool, uint, string, NoteSeverity, string[]?>? BanSubmitted;
public event Action<string?, (IPAddress, int)?, bool, byte[]?, bool, uint, string, NoteSeverity, string[]?, bool>? BanSubmitted;
public event Action<string>? PlayerChanged;
private string? PlayerUsername { get; set; }
private (IPAddress, int)? IpAddress { get; set; }
Expand Down Expand Up @@ -441,7 +438,8 @@ private void SubmitButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
var useLastIp = IpCheckbox.Pressed && LastConnCheckbox.Pressed && IpAddress is null;
var useLastHwid = HwidCheckbox.Pressed && LastConnCheckbox.Pressed && Hwid is null;
var severity = (NoteSeverity) SeverityOption.SelectedId;
BanSubmitted?.Invoke(player, IpAddress, useLastIp, Hwid, useLastHwid, (uint) (TimeEntered * Multiplier), reason, severity, roles);
var erase = EraseCheckbox.Pressed;
BanSubmitted?.Invoke(player, IpAddress, useLastIp, Hwid, useLastHwid, (uint) (TimeEntered * Multiplier), reason, severity, roles, erase);
}

protected override void FrameUpdate(FrameEventArgs args)
Expand Down
9 changes: 2 additions & 7 deletions Content.Client/Administration/UI/BanPanel/BanPanelEui.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Content.Client.Eui;
using Content.Shared.Administration;
using Content.Shared.Eui;
Expand All @@ -19,8 +14,8 @@ public BanPanelEui()
{
BanPanel = new BanPanel();
BanPanel.OnClose += () => SendMessage(new CloseEuiMessage());
BanPanel.BanSubmitted += (player, ip, useLastIp, hwid, useLastHwid, minutes, reason, severity, roles)
=> SendMessage(new BanPanelEuiStateMsg.CreateBanRequest(player, ip, useLastIp, hwid, useLastHwid, minutes, reason, severity, roles));
BanPanel.BanSubmitted += (player, ip, useLastIp, hwid, useLastHwid, minutes, reason, severity, roles, erase)
=> SendMessage(new BanPanelEuiStateMsg.CreateBanRequest(player, ip, useLastIp, hwid, useLastHwid, minutes, reason, severity, roles, erase));
BanPanel.PlayerChanged += player => SendMessage(new BanPanelEuiStateMsg.GetPlayerInfoRequest(player));
}

Expand Down
5 changes: 5 additions & 0 deletions Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public BwoinkWindow()
if (sel is not null)
{
Title = $"{sel.CharacterName} / {sel.Username}";

if (sel.OverallPlaytime != null)
{
Title += $" | {Loc.GetString("generic-playtime-title")}: {sel.PlaytimeString}";
}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed partial class PlayerListControl : BoxContainer
private List<PlayerInfo> _playerList = new();
private readonly List<PlayerInfo> _sortedPlayerList = new();

public event Action<PlayerInfo?>? OnSelectionChanged;
public event Action<PlayerInfo>? OnSelectionChanged;
public IReadOnlyList<PlayerInfo> PlayerInfo => _playerList;

public Func<PlayerInfo, string, string>? OverrideText;
Expand All @@ -46,9 +46,9 @@ public PlayerListControl()
BackgroundPanel.PanelOverride = new StyleBoxFlat {BackgroundColor = new Color(32, 32, 40)};
}

private void PlayerListItemPressed(BaseButton.ButtonEventArgs args, ListData data)
private void PlayerListItemPressed(BaseButton.ButtonEventArgs? args, ListData? data)
{
if (data is not PlayerListData {Info: var selectedPlayer})
if (args == null || data is not PlayerListData {Info: var selectedPlayer})
return;
if (args.Event.Function == EngineKeyFunctions.UIClick)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Linq;
using System.Numerics;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.ResourceManagement;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using System.Linq;
using System.Numerics;
using Robust.Shared.Map.Components;

namespace Content.Client.Administration.UI.SpawnExplosion;

Expand All @@ -13,7 +15,6 @@ public sealed class ExplosionDebugOverlay : Overlay
{
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly IMapManager _mapManager = default!;

public Dictionary<int, List<Vector2i>>? SpaceTiles;
public Dictionary<EntityUid, Dictionary<int, List<Vector2i>>> Tiles = new();
Expand Down Expand Up @@ -61,14 +62,15 @@ private void DrawScreen(OverlayDrawArgs args)
var handle = args.ScreenHandle;
Box2 gridBounds;
var xformQuery = _entityManager.GetEntityQuery<TransformComponent>();
var xformSystem = _entityManager.System<TransformSystem>();

foreach (var (gridId, tileSets) in Tiles)
{
if (!_mapManager.TryGetGrid(gridId, out var grid))
if (!_entityManager.TryGetComponent(gridId, out MapGridComponent? grid))
continue;

var gridXform = xformQuery.GetComponent(grid.Owner);
var (_, _, matrix, invMatrix) = gridXform.GetWorldPositionRotationMatrixWithInv(xformQuery);
var gridXform = xformQuery.GetComponent(gridId);
var (_, _, matrix, invMatrix) = xformSystem.GetWorldPositionRotationMatrixWithInv(gridXform, xformQuery);
gridBounds = invMatrix.TransformBox(args.WorldBounds).Enlarged(grid.TileSize * 2);
DrawText(handle, gridBounds, matrix, tileSets, grid.TileSize);
}
Expand Down Expand Up @@ -114,9 +116,9 @@ private void DrawText(
}
}

if (tileSets.ContainsKey(0))
if (tileSets.TryGetValue(0, out var set))
{
var epicenter = tileSets[0].First();
var epicenter = set.First();
var worldCenter = transform.Transform((epicenter + Vector2Helpers.Half) * tileSize);
var screenCenter = _eyeManager.WorldToScreen(worldCenter) + new Vector2(-24, -24);
var text = $"{Intensity[0]:F2}\nΣ={TotalIntensity:F1}\nΔ={Slope:F1}";
Expand All @@ -129,14 +131,15 @@ private void DrawWorld(in OverlayDrawArgs args)
var handle = args.WorldHandle;
Box2 gridBounds;
var xformQuery = _entityManager.GetEntityQuery<TransformComponent>();
var xformSystem = _entityManager.System<TransformSystem>();

foreach (var (gridId, tileSets) in Tiles)
{
if (!_mapManager.TryGetGrid(gridId, out var grid))
if (!_entityManager.TryGetComponent(gridId, out MapGridComponent? grid))
continue;

var gridXform = xformQuery.GetComponent(grid.Owner);
var (_, _, worldMatrix, invWorldMatrix) = gridXform.GetWorldPositionRotationMatrixWithInv(xformQuery);
var gridXform = xformQuery.GetComponent(gridId);
var (_, _, worldMatrix, invWorldMatrix) = xformSystem.GetWorldPositionRotationMatrixWithInv(gridXform, xformQuery);
gridBounds = invWorldMatrix.TransformBox(args.WorldBounds).Enlarged(grid.TileSize * 2);
handle.SetTransform(worldMatrix);
DrawTiles(handle, gridBounds, tileSets, SpaceTileSize);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.Player;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Map.Components;

namespace Content.Client.Administration.UI.Tabs.AtmosTab
Expand All @@ -17,16 +13,29 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
[UsedImplicitly]
public sealed partial class AddAtmosWindow : DefaultWindow
{
private IEnumerable<MapGridComponent>? _data;
[Dependency] private readonly IPlayerManager _players = default!;
[Dependency] private readonly IEntityManager _entities = default!;

private readonly List<Entity<MapGridComponent>> _data = new();

public AddAtmosWindow()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
}

protected override void EnteredTree()
{
_data = IoCManager.Resolve<IMapManager>().GetAllGrids().Where(g => (int) g.Owner != 0);
foreach (var grid in _data)
_data.Clear();

var player = _players.LocalPlayer?.ControlledEntity;
var playerGrid = _entities.GetComponentOrNull<TransformComponent>(player)?.GridUid;
var query = IoCManager.Resolve<IEntityManager>().AllEntityQueryEnumerator<MapGridComponent>();

while (query.MoveNext(out var uid, out var grid))
{
var player = IoCManager.Resolve<IPlayerManager>().LocalPlayer?.ControlledEntity;
var playerGrid = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<TransformComponent>(player)?.GridUid;
GridOptions.AddItem($"{grid.Owner} {(playerGrid == grid.Owner ? " (Current)" : "")}");
_data.Add((uid, grid));
GridOptions.AddItem($"{uid} {(playerGrid == uid ? " (Current)" : "")}");
}

GridOptions.OnItemSelected += eventArgs => GridOptions.SelectId(eventArgs.Id);
Expand All @@ -35,12 +44,8 @@ protected override void EnteredTree()

private void SubmitButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
{
if (_data == null)
return;
var dataList = _data.ToList();
var entManager = IoCManager.Resolve<IEntityManager>();
var selectedGrid = dataList[GridOptions.SelectedId].Owner;
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand($"addatmos {entManager.GetNetEntity(selectedGrid)}");
var selectedGrid = _data[GridOptions.SelectedId].Owner;
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand($"addatmos {_entities.GetNetEntity(selectedGrid)}");
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Linq;
using Content.Client.Station;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
Expand Down Expand Up @@ -40,13 +39,34 @@ public ObjectsTab()

private void RefreshObjectList(ObjectsTabSelection selection)
{
var entities = selection switch
var entities = new List<EntityUid>();
switch (selection)
{
ObjectsTabSelection.Stations => _entityManager.EntitySysManager.GetEntitySystem<StationSystem>().Stations.ToList(),
ObjectsTabSelection.Grids => _entityManager.EntityQuery<MapGridComponent>(true).Select(x => x.Owner).ToList(),
ObjectsTabSelection.Maps => _entityManager.EntityQuery<MapComponent>(true).Select(x => x.Owner).ToList(),
_ => throw new ArgumentOutOfRangeException(nameof(selection), selection, null),
};
case ObjectsTabSelection.Stations:
entities.AddRange(_entityManager.EntitySysManager.GetEntitySystem<StationSystem>().Stations);
break;
case ObjectsTabSelection.Grids:
{
var query = _entityManager.AllEntityQueryEnumerator<MapGridComponent>();
while (query.MoveNext(out var uid, out _))
{
entities.Add(uid);
}

break;
}
case ObjectsTabSelection.Maps:
{
var query = _entityManager.AllEntityQueryEnumerator<MapComponent>();
while (query.MoveNext(out var uid, out _))
{
entities.Add(uid);
}
break;
}
default:
throw new ArgumentOutOfRangeException(nameof(selection), selection, null);
}

foreach (var control in _objects)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,47 @@ public sealed partial class PanicBunkerTab : Control
{
[Dependency] private readonly IConsoleHost _console = default!;

private string _minAccountAge;
private string _minOverallHours;

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

DisableAutomaticallyButton.ToolTip = Loc.GetString("admin-ui-panic-bunker-disable-automatically-tooltip");

MinAccountAge.OnTextEntered += args =>
MinAccountAge.OnTextEntered += args => SendMinAccountAge(args.Text);
MinAccountAge.OnFocusExit += args => SendMinAccountAge(args.Text);
_minAccountAge = MinAccountAge.Text;

MinOverallHours.OnTextEntered += args => SendMinOverallHours(args.Text);
MinOverallHours.OnFocusExit += args => SendMinOverallHours(args.Text);
_minOverallHours = MinOverallHours.Text;
}

private void SendMinAccountAge(string text)
{
if (string.IsNullOrWhiteSpace(text) ||
text == _minAccountAge ||
!int.TryParse(text, out var minutes))
{
if (string.IsNullOrWhiteSpace(args.Text) || !int.TryParse(args.Text, out var minutes))
return;
return;
}

_console.ExecuteCommand($"panicbunker_min_account_age {minutes}");
};
_console.ExecuteCommand($"panicbunker_min_account_age {minutes}");
}

MinOverallHours.OnTextEntered += args =>
private void SendMinOverallHours(string text)
{
if (string.IsNullOrWhiteSpace(text) ||
text == _minOverallHours ||
!int.TryParse(text, out var hours))
{
if (string.IsNullOrWhiteSpace(args.Text) || !int.TryParse(args.Text, out var hours))
return;
return;
}

_console.ExecuteCommand($"panicbunker_min_overall_hours {hours}");
};
_console.ExecuteCommand($"panicbunker_min_overall_hours {hours}");
}

public void UpdateStatus(PanicBunkerStatus status)
Expand All @@ -48,7 +67,11 @@ public void UpdateStatus(PanicBunkerStatus status)
EnableAutomaticallyButton.Pressed = status.EnableWithoutAdmins;
CountDeadminnedButton.Pressed = status.CountDeadminnedAdmins;
ShowReasonButton.Pressed = status.ShowReason;

MinAccountAge.Text = status.MinAccountAgeHours.ToString();
_minAccountAge = MinAccountAge.Text;

MinOverallHours.Text = status.MinOverallHours.ToString();
_minOverallHours = MinOverallHours.Text;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ private void RefreshPlayerList(IReadOnlyList<PlayerInfo> players)
player.Antag ? "YES" : "NO",
player.Sponsor ? "YES" : "NO",
new StyleBoxFlat(useAltColor ? _altColor : _defaultColor),
player.Connected);
player.Connected,
player.PlaytimeString);
entry.PlayerEntity = player.NetEntity;
entry.OnPressed += args => OnEntryPressed?.Invoke(args);
entry.ToolTip = Loc.GetString("player-tab-entry-tooltip");
PlayerList.AddChild(entry);

useAltColor ^= true;
Expand All @@ -149,6 +151,7 @@ private int Compare(PlayerInfo x, PlayerInfo y)
Header.Character => Compare(x.CharacterName, y.CharacterName),
Header.Job => Compare(x.StartingJob, y.StartingJob),
Header.Antagonist => x.Antag.CompareTo(y.Antag),
Header.Playtime => TimeSpan.Compare(x.OverallPlaytime ?? default, y.OverallPlaytime ?? default),
_ => 1
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@
SizeFlagsStretchRatio="2"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>
<Label Name="OverallPlaytimeLabel"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"
ClipText="True"/>
</BoxContainer>
</ContainerButton>
Loading
Loading