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

Ed 13 06 2024 upstream 3 #241

Merged
merged 168 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
71a6e60
Revert "Buff the AME until somebody fixes engineering" (#28419)
moonheart08 Jun 4, 2024
b394eb9
Automatic changelog update
PJBot Jun 4, 2024
6271879
hand teleport portals now may start in the same grid. (#28556)
icekot8 Jun 4, 2024
0e93d13
Microwave recipes now uses stacktype id instead of entity prototype i…
blueDev2 Jun 4, 2024
1de261d
Automatic changelog update
PJBot Jun 4, 2024
a4881f5
Add "fill level" sprites to mops and damp rag (#28590)
Tayrtahn Jun 4, 2024
3a0880f
Automatic changelog update
PJBot Jun 4, 2024
ec5a3b0
Reword some criminal records text (#28597)
TsjipTsjip Jun 4, 2024
41549db
Remove obsolete VisibilitySystem functions (#28610)
Plykiya Jun 5, 2024
86cf5cc
Prayable datafield typo (#28622)
TsjipTsjip Jun 5, 2024
0f3a242
Update engine to v224.1.0 (#28624)
ElectroJr Jun 5, 2024
7bd1b45
Use dummy sessions in NukeOpsTest (#28549)
ElectroJr Jun 5, 2024
e154135
Update engine to v224.1.1 (#28632)
ElectroJr Jun 5, 2024
adeed70
Add Job preference tests (#28625)
ElectroJr Jun 5, 2024
f933922
Add logs that provide session to player admin logs (#28628)
ShadowCommander Jun 5, 2024
bc36078
Cluster Update (#28627)
Boaz1111 Jun 5, 2024
ca9830a
Automatic changelog update
PJBot Jun 5, 2024
192a318
minor banner changes (#28636)
Hmeister-real Jun 5, 2024
4c0a878
Revenant spell catalog locale (#28638)
lapatison Jun 5, 2024
d75de9f
Make cuff default range again (#28576)
Plykiya Jun 5, 2024
8a7b0f6
Automatic changelog update
PJBot Jun 5, 2024
729e67a
Machine-code cleanup (#28489)
EmoGarbage404 Jun 5, 2024
c368d5d
Make Projectiles Only Hit a Variety of Station Objects Unless Clicked…
Cojoke-dot Jun 5, 2024
a710c75
Automatic changelog update
PJBot Jun 5, 2024
513023a
Fix Smoke-grenade.ogg not being mono (#28593)
DrSmugleaf Jun 5, 2024
f223931
Fix Cigars Sprites + YAML fix for Inhand unlit cigars/cigs (#28641)
ps3moira Jun 5, 2024
014c5eb
Automatic changelog update
PJBot Jun 5, 2024
27a5d08
Clean up Eva and Hardsuit helm yml + Lets atmos firesuit helm work as…
Cojoke-dot Jun 5, 2024
72df1a0
Shifts borgs hats to the right a bit (#28600)
Cojoke-dot Jun 5, 2024
110c8a9
Fix mouse inhands (#28623)
Vermidia Jun 5, 2024
8a1f3f4
Adjust some touch reaction damage levels (#28591)
Tayrtahn Jun 5, 2024
8e85bec
Automatic changelog update
PJBot Jun 5, 2024
ba57e3e
Add closing storage UIs to StorageInteractionTest (#28633)
ElectroJr Jun 5, 2024
fea2bc9
Update rules (#28452)
Chief-Engineer Jun 5, 2024
d71b88a
Add support for LocalizedDatasets to RandomMetadata (#28601)
Tayrtahn Jun 6, 2024
039fd93
Fix Admin Object tab sorting and search (#28609)
Titian3 Jun 6, 2024
180f1e8
Automatic changelog update
PJBot Jun 6, 2024
dec1c28
Internals are kept on as long as any breathing tool is on (#28595)
Plykiya Jun 6, 2024
8b40d18
Automatic changelog update
PJBot Jun 6, 2024
1333b48
Convert rules to use guidebook parsing (#28647)
EmoGarbage404 Jun 6, 2024
02c345d
Gives Insulation and NoSlip to all bots (#28621)
Cojoke-dot Jun 6, 2024
520e0dd
Automatic changelog update
PJBot Jun 6, 2024
c625cee
Nerfs welderbombing (#28650)
Flareguy Jun 6, 2024
236d2e5
Automatic changelog update
PJBot Jun 6, 2024
e7f2ae5
Give jobs & antags prototypes a guide field (#28614)
ElectroJr Jun 6, 2024
f2c2a14
Automatic changelog update
PJBot Jun 6, 2024
e72ac31
Fix typo in Space Law's restricted gear (#28668)
Aeshus Jun 6, 2024
5773970
Automatic changelog update
PJBot Jun 6, 2024
6e98965
fixed "silicones" typo in new rules (#28671)
Moomoobeef Jun 6, 2024
3dc4f82
fix janitor not spawning with a survival box (#28669)
Dutch-VanDerLinde Jun 6, 2024
997e34d
Automatic changelog update
PJBot Jun 6, 2024
08d2918
Fix typo in slime naming conventions (#28682)
Vermidia Jun 7, 2024
b317fa4
Flatpacker fixes (#28417)
EmoGarbage404 Jun 7, 2024
f2792e9
Return medicine recipe solid material costs to 1 (#28679)
blueDev2 Jun 7, 2024
6bae088
Automatic changelog update
PJBot Jun 7, 2024
7ba26f4
Update Core (#28689)
UbaserB Jun 7, 2024
accf8ad
Fixed the guidebook listing every single rule (#28680)
AJCM-git Jun 7, 2024
2405502
Automatic changelog update
PJBot Jun 7, 2024
b3debf4
rule fixes first pass (#28701)
Chief-Engineer Jun 7, 2024
b632a65
Add JobRequirementOverride prototypes (#28607)
ElectroJr Jun 7, 2024
a1a3a0d
Tweak chapel salvage wreck (#28703)
UbaserB Jun 7, 2024
63e0ee0
Fixes client having authority over rules popup cvars (#28655)
AJCM-git Jun 7, 2024
567d6a0
Add locale support for booze and soda jugs labels (#28708)
lzk228 Jun 8, 2024
d19b430
Swap some InRangeUnobstructed for InRangeUnoccluded (#28706)
Plykiya Jun 8, 2024
b714210
Automatic changelog update
PJBot Jun 8, 2024
f37060f
Ports the singularity's values from vgstation (#28720)
Flareguy Jun 8, 2024
0762f9d
Fix action icons when dragging an active action to another slot (#28692)
DrSmugleaf Jun 8, 2024
7f19331
Add DoPopup data field to OnUseTimerTrigger (#28691)
DrSmugleaf Jun 8, 2024
1584a50
Dropping Corpses Devoured by Space Dragons on Gib/Butcher. (#28709)
Lyndomen Jun 8, 2024
4d10f35
Automatic changelog update
PJBot Jun 8, 2024
49496b4
Improve grammar of various petting messages (#28715)
Tayrtahn Jun 8, 2024
a7c7cd7
Fix DamageOtherOnHit.OnDoHit when the target is terminating or delete…
DrSmugleaf Jun 8, 2024
c2bbc72
Update Core (#28735)
UbaserB Jun 8, 2024
2c7598f
Fix flatpacker (#28736)
ElectroJr Jun 8, 2024
b50faff
rn, atp (#28674)
MerrytheManokit Jun 8, 2024
4501518
Add loadout group check for role proto (#28731)
metalgearsloth Jun 8, 2024
74ed68b
Automatic changelog update
PJBot Jun 8, 2024
7ef7fe6
Try fix RGBee (#28741)
ElectroJr Jun 8, 2024
c4966e5
Automatic changelog update
PJBot Jun 8, 2024
db6548b
Ensure packager creates a release folder (#28426)
VasilisThePikachu Jun 8, 2024
123dfee
allow ' in character names (#28652)
QuietlyWhisper Jun 8, 2024
511336b
Automatic changelog update
PJBot Jun 8, 2024
8cf9037
Make freeze, freeze & mute, and unmute verbs work on disconnected pla…
nikthechampiongr Jun 8, 2024
33e68dc
Automatic changelog update
PJBot Jun 8, 2024
4089d6a
fix singulo decay (#28743)
EmoGarbage404 Jun 8, 2024
c79384c
Automatic changelog update
PJBot Jun 8, 2024
1fdbf94
Don't use invalid defaults for loadouts (#28729)
metalgearsloth Jun 8, 2024
e3c37f6
Maybe fix invalid loadout prototypes (#28734)
metalgearsloth Jun 8, 2024
cce50da
Automatic changelog update
PJBot Jun 8, 2024
7f686a6
Fix null ref exception in PrayerSystem (#28712)
Tayrtahn Jun 8, 2024
c6ff1e4
Guidebook Updates for the Amateur Spessman (#28603)
UBlueberry Jun 8, 2024
6a8892f
Automatic changelog update
PJBot Jun 8, 2024
c061d9c
Add suffixes to excap survival boxes (#28755)
TsjipTsjip Jun 8, 2024
182fe29
Add Jani lobby background (#28724)
Psychpsyo Jun 8, 2024
468728c
Automatic changelog update
PJBot Jun 8, 2024
5f91c3f
Strip markdown from silicon laws before saying them (#28596)
Tayrtahn Jun 8, 2024
fb1ab64
saltern update (#28773)
deltanedas Jun 9, 2024
8d52f6b
Fix admin menu objects list (#28787)
ElectroJr Jun 9, 2024
ad9d187
Make `MakeAntag()` log errors instead of throwing exceptions (#28771)
ElectroJr Jun 9, 2024
c549573
add default page support for the guidebook (#28772)
EmoGarbage404 Jun 9, 2024
346ac44
Open the guidebook when people with less than an hour playing join th…
AJCM-git Jun 9, 2024
bcf1069
Automatic changelog update
PJBot Jun 9, 2024
1490fc3
Redo new player & controls guidebooks (#28794)
EmoGarbage404 Jun 9, 2024
b51e787
new station and shifts guide (#28799)
EmoGarbage404 Jun 9, 2024
fffa1df
Update Cargo Guidebook (#28775)
Aeshus Jun 9, 2024
f4e80b0
Automatic changelog update
PJBot Jun 9, 2024
3ceb92a
SS14-28662 Add Baby Jail: a Jail for Babies (inverse panic bunker) (#…
FairlySadPanda Jun 9, 2024
de07c29
Implement map text (#28705)
juliangiebel Jun 9, 2024
50d83b9
Cap scramble tag (#28804)
EmoGarbage404 Jun 9, 2024
1bb9d94
Panic Bunker uses minutes not hours (#28805)
FairlySadPanda Jun 9, 2024
d741968
Temporarily update server configs (#28780)
Chief-Engineer Jun 9, 2024
edd13ad
Fix wizardsDenCoreOnly.toml (#28807)
ElectroJr Jun 9, 2024
0804020
FUCK (#28808)
PJB3005 Jun 9, 2024
e95fb9a
Disable panic bunker for servers (#28812)
nikthechampiongr Jun 9, 2024
7032c01
Fix description of temp servers and add region tags (#28811)
Chief-Engineer Jun 10, 2024
bc5a627
Fixes a typo in the glossary (#28818)
Zonespace27 Jun 10, 2024
b60c9a8
Automatic changelog update
PJBot Jun 10, 2024
63ad5e0
enable search filters on drinks guidebook (#28815)
EmoGarbage404 Jun 10, 2024
d3d8a9e
Automatic changelog update
PJBot Jun 10, 2024
f571e23
Enable save button on changing job unavailable preference (#28839)
dffdff2423 Jun 11, 2024
3c2b1af
Automatic changelog update
PJBot Jun 11, 2024
2b28830
Fix some wideswing animations (#28819)
lzk228 Jun 11, 2024
41a0ffb
Add reward line in bounty label (#28853)
lzk228 Jun 11, 2024
b6d7a6a
Automatic changelog update
PJBot Jun 11, 2024
bd42c2b
Fix nearest beacon messages reporting the opposite direction (#28869)
Tayrtahn Jun 11, 2024
c5b30a3
Automatic changelog update
PJBot Jun 11, 2024
3d25893
Cluster Update (#28854)
Boaz1111 Jun 12, 2024
d639944
Automatic changelog update
PJBot Jun 12, 2024
9a32a19
Removes Trials of Mana grassland sprites: Bare Minimum Edition (#28868)
Flareguy Jun 12, 2024
90354fa
Fix "no materials loaded" messege in lathes (#28885)
Deserty0 Jun 12, 2024
a0f7099
Automatic changelog update
PJBot Jun 12, 2024
94bf301
Comms Consoles without CanShuttle can no longer recall (#28803)
robertmanbob Jun 12, 2024
9b40bcc
Automatic changelog update
PJBot Jun 12, 2024
8c514b9
fix pda ui troll (#28896)
deltanedas Jun 12, 2024
ca39135
Automatic changelog update
PJBot Jun 12, 2024
b091a55
Add new icon for Remove Evidence verb (#28898)
dragonryan06 Jun 12, 2024
35e5a96
Fix queued deletion check (singulo loosing at beyond PA 1 but only on…
Partmedia Jun 12, 2024
1aa5e02
Automatic changelog update
PJBot Jun 12, 2024
12911d2
Reach Fixes (#28913)
Bibbly10 Jun 13, 2024
dc0327c
Update PA admin warnings (#28911)
Partmedia Jun 13, 2024
0e32d63
Make automatic gasps not create a chat message (#28907)
Vermidia Jun 13, 2024
d322a82
Pets toggle internals fix (#28904)
stalengd Jun 13, 2024
865810c
New Sprites for Tranq Shells + Add consistancy to printing Tranqs (#2…
Cojoke-dot Jun 13, 2024
7d4586b
Automatic changelog update
PJBot Jun 13, 2024
1d4d6c3
Fix gauze stopping if it stops bleeding (#28844)
Plykiya Jun 13, 2024
020b291
Automatic changelog update
PJBot Jun 13, 2024
22b1ec9
added a new sprite for the super synthesizer. (#28884)
Moomoobeef Jun 13, 2024
ab8b3ec
Fix magazine sprites after Auto Eject (#28859)
geraeumig Jun 13, 2024
d9bac82
localize RoleBriefing (#28824)
deltanedas Jun 13, 2024
d865bff
Fix .30 ammo listing wrong number of bullets in uplink (#28919)
Cojoke-dot Jun 13, 2024
249e4a9
Fix guns appearing to cycle bolt when wielded (#28756)
Doomsdrayk Jun 13, 2024
d38ad12
Fix `playtime_addrole` command printing the wrong time (#28783)
ElectroJr Jun 13, 2024
99f2e6f
Automatic changelog update
PJBot Jun 13, 2024
68dc1fb
Fix ninja Spider Clan charge not getting a target (#28871)
Tayrtahn Jun 13, 2024
8791f98
Fix playtime on player tab getting set to Unknown (#28876)
ShadowCommander Jun 13, 2024
e02ef68
Automatic changelog update
PJBot Jun 13, 2024
8ff09f5
Merge remote-tracking branch 'upstream/master' into ed-13-06-2024-ups…
TheShuEd Jun 13, 2024
db91bab
Update CCVars.cs
TheShuEd Jun 13, 2024
151db2c
fix locale
TheShuEd Jun 13, 2024
d92d75a
Update ame-controller-component.ftl
TheShuEd Jun 13, 2024
43d8839
Update options-menu.ftl
TheShuEd Jun 13, 2024
fb7ffc4
Update arenas.yml
TheShuEd Jun 13, 2024
720d4ad
save old grass sprite
TheShuEd Jun 13, 2024
124f6f3
Update natural.yml
TheShuEd Jun 13, 2024
898bf1f
try fix tests
TheShuEd Jun 13, 2024
791db75
fuck this test
TheShuEd Jun 13, 2024
ac74198
Update JobTest.cs
TheShuEd Jun 13, 2024
147921c
Update JobTest.cs
TheShuEd Jun 13, 2024
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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
/Content.*/GameTicking/ @moonheart08 @EmoGarbage404
/Resources/ServerInfo/ @moonheart08 @Chief-Engineer
/Resources/ServerInfo/Guidebook/ @moonheart08 @EmoGarbage404
/Resources/ServerInfo/Guidebook/ServerRules/ @Chief-Engineer
/Resources/engineCommandPerms.yml @moonheart08 @Chief-Engineer
/Resources/clientCommandPerms.yml @moonheart08 @Chief-Engineer

Expand All @@ -23,6 +24,7 @@
/Resources/Prototypes/Body/ @DrSmugleaf # suffering
/Resources/Prototypes/Entities/Mobs/Player/ @DrSmugleaf
/Resources/Prototypes/Entities/Mobs/Species/ @DrSmugleaf
/Resources/Prototypes/Guidebook/rules.yml @Chief-Engineer
/Content.*/Body/ @DrSmugleaf
/Content.YAMLLinter @DrSmugleaf
/Content.Shared/Damage/ @DrSmugleaf
Expand Down
41 changes: 15 additions & 26 deletions Content.Benchmarks/PvsBenchmark.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using Content.IntegrationTests;
using Content.IntegrationTests.Pair;
using Content.Server.Mind;
using Content.Server.Warps;
using Robust.Server.GameObjects;
using Robust.Shared;
using Robust.Shared.Analyzers;
using Robust.Shared.Enums;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.Map;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Random;

Expand Down Expand Up @@ -58,15 +56,20 @@ public void Setup()
_pair.Server.CfgMan.SetCVar(CVars.NetPvsAsync, false);
_sys = _entMan.System<SharedTransformSystem>();

SetupAsync().Wait();
}

private async Task SetupAsync()
{
// Spawn the map
_pair.Server.ResolveDependency<IRobustRandom>().SetSeed(42);
_pair.Server.WaitPost(() =>
await _pair.Server.WaitPost(() =>
{
var success = _entMan.System<MapLoaderSystem>().TryLoad(_mapId, Map, out _);
if (!success)
throw new Exception("Map load failed");
_pair.Server.MapMan.DoMapInitialize(_mapId);
}).Wait();
});

// Get list of ghost warp positions
_spawns = _entMan.AllComponentsList<WarpPointComponent>()
Expand All @@ -76,17 +79,19 @@ public void Setup()

Array.Resize(ref _players, PlayerCount);

// Spawn "Players".
_pair.Server.WaitPost(() =>
// Spawn "Players"
_players = await _pair.Server.AddDummySessions(PlayerCount);
await _pair.Server.WaitPost(() =>
{
var mind = _pair.Server.System<MindSystem>();
for (var i = 0; i < PlayerCount; i++)
{
var pos = _spawns[i % _spawns.Length];
var uid =_entMan.SpawnEntity("MobHuman", pos);
_pair.Server.ConsoleHost.ExecuteCommand($"setoutfit {_entMan.GetNetEntity(uid)} CaptainGear");
_players[i] = new DummySession{AttachedEntity = uid};
mind.ControlMob(_players[i].UserId, uid);
}
}).Wait();
});

// Repeatedly move players around so that they "explore" the map and see lots of entities.
// This will populate their PVS data with out-of-view entities.
Expand Down Expand Up @@ -168,20 +173,4 @@ public void CycleTick()
}).Wait();
_pair.Server.PvsTick(_players);
}

private sealed class DummySession : ICommonSession
{
public SessionStatus Status => SessionStatus.InGame;
public EntityUid? AttachedEntity {get; set; }
public NetUserId UserId => default;
public string Name => string.Empty;
public short Ping => default;
public INetChannel Channel { get; set; } = default!;
public LoginType AuthType => default;
public HashSet<EntityUid> ViewSubscriptions { get; } = new();
public DateTime ConnectedTime { get; set; }
public SessionState State => default!;
public SessionData Data => default!;
public bool ClientSide { get; set; }
}
}
4 changes: 3 additions & 1 deletion Content.Client/Administration/UI/AdminMenuWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
xmlns:tabs="clr-namespace:Content.Client.Administration.UI.Tabs"
xmlns:playerTab="clr-namespace:Content.Client.Administration.UI.Tabs.PlayerTab"
xmlns:objectsTab="clr-namespace:Content.Client.Administration.UI.Tabs.ObjectsTab"
xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab">
xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab"
xmlns:baby="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab">
<TabContainer Name="MasterTabContainer">
<adminTab:AdminTab />
<adminbusTab:AdminbusTab />
<atmosTab:AtmosTab />
<tabs:RoundTab />
<tabs:ServerTab />
<panic:PanicBunkerTab Name="PanicBunkerControl" Access="Public" />
<baby:BabyJailTab Name="BabyJailControl" Access="Public" />
<playerTab:PlayerTab Name="PlayerTabControl" Access="Public" />
<objectsTab:ObjectsTab Name="ObjectsTabControl" Access="Public" />
</TabContainer>
Expand Down
8 changes: 6 additions & 2 deletions Content.Client/Administration/UI/AdminMenuWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ public AdminMenuWindow()
MasterTabContainer.SetTabTitle(3, Loc.GetString("admin-menu-round-tab"));
MasterTabContainer.SetTabTitle(4, Loc.GetString("admin-menu-server-tab"));
MasterTabContainer.SetTabTitle(5, Loc.GetString("admin-menu-panic-bunker-tab"));
MasterTabContainer.SetTabTitle(6, Loc.GetString("admin-menu-players-tab"));
MasterTabContainer.SetTabTitle(7, Loc.GetString("admin-menu-objects-tab"));
/*
* TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
*/
MasterTabContainer.SetTabTitle(6, Loc.GetString("admin-menu-baby-jail-tab"));
MasterTabContainer.SetTabTitle(7, Loc.GetString("admin-menu-players-tab"));
MasterTabContainer.SetTabTitle(8, Loc.GetString("admin-menu-objects-tab"));
}

protected override void Dispose(bool disposing)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<controls:BabyJailStatusWindow
xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab"
Title="{Loc admin-ui-baby-jail-window-title}">
<RichTextLabel Name="MessageLabel" Access="Public" />
</controls:BabyJailStatusWindow>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Content.Client.Message;
using Content.Client.UserInterface.Controls;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.Administration.UI.Tabs.BabyJailTab;

/*
* TODO: Remove me once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
*/

[GenerateTypedNameReferences]
public sealed partial class BabyJailStatusWindow : FancyWindow
{
public BabyJailStatusWindow()
{
RobustXamlLoader.Load(this);
MessageLabel.SetMarkup(Loc.GetString("admin-ui-baby-jail-is-enabled"));
}
}
26 changes: 26 additions & 0 deletions Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<controls:BabyJailTab
xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
Margin="4">
<BoxContainer Orientation="Vertical">
<cc:CommandButton Name="EnabledButton" Command="babyjail" ToggleMode="True"
Text="{Loc admin-ui-baby-jail-disabled}"
ToolTip="{Loc admin-ui-baby-jail-tooltip}" />
<cc:CommandButton Name="ShowReasonButton" Command="babyjail_show_reason"
ToggleMode="True" Text="{Loc admin-ui-baby-jail-show-reason}"
ToolTip="{Loc admin-ui-baby-jail-show-reason-tooltip}" />
<BoxContainer Orientation="Vertical" Margin="0 10 0 0">
<BoxContainer Orientation="Horizontal" Margin="2">
<Label Text="{Loc admin-ui-baby-jail-max-account-age}" MinWidth="175" />
<LineEdit Name="MaxAccountAge" MinWidth="50" Margin="0 0 5 0" />
<Label Text="{Loc generic-minutes}" />
</BoxContainer>
<BoxContainer Orientation="Horizontal" Margin="2">
<Label Text="{Loc admin-ui-baby-jail-max-overall-minutes}" MinWidth="175" />
<LineEdit Name="MaxOverallMinutes" MinWidth="50" Margin="0 0 5 0" />
<Label Text="{Loc generic-minutes}" />
</BoxContainer>
</BoxContainer>
</BoxContainer>
</controls:BabyJailTab>
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
using Content.Shared.Administration.Events;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Console;

/*
* TODO: Remove me once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
*/

namespace Content.Client.Administration.UI.Tabs.BabyJailTab;

[GenerateTypedNameReferences]
public sealed partial class BabyJailTab : Control
{
[Dependency] private readonly IConsoleHost _console = default!;

private string _maxAccountAge;
private string _maxOverallMinutes;

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

MaxAccountAge.OnTextEntered += args => SendMaxAccountAge(args.Text);
MaxAccountAge.OnFocusExit += args => SendMaxAccountAge(args.Text);
_maxAccountAge = MaxAccountAge.Text;

MaxOverallMinutes.OnTextEntered += args => SendMaxOverallMinutes(args.Text);
MaxOverallMinutes.OnFocusExit += args => SendMaxOverallMinutes(args.Text);
_maxOverallMinutes = MaxOverallMinutes.Text;
}

private void SendMaxAccountAge(string text)
{
if (string.IsNullOrWhiteSpace(text) ||
text == _maxAccountAge ||
!int.TryParse(text, out var minutes))
{
return;
}

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

private void SendMaxOverallMinutes(string text)
{
if (string.IsNullOrWhiteSpace(text) ||
text == _maxOverallMinutes ||
!int.TryParse(text, out var minutes))
{
return;
}

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

public void UpdateStatus(BabyJailStatus status)
{
EnabledButton.Pressed = status.Enabled;
EnabledButton.Text = Loc.GetString(status.Enabled
? "admin-ui-baby-jail-enabled"
: "admin-ui-baby-jail-disabled"
);
EnabledButton.ModulateSelfOverride = status.Enabled ? Color.Red : null;
ShowReasonButton.Pressed = status.ShowReason;

MaxAccountAge.Text = status.MaxAccountAgeMinutes.ToString();
_maxAccountAge = MaxAccountAge.Text;

MaxOverallMinutes.Text = status.MaxOverallMinutes.ToString();
_maxOverallMinutes = MaxOverallMinutes.Text;
}
}
16 changes: 11 additions & 5 deletions Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<Control xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls">
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:ot="clr-namespace:Content.Client.Administration.UI.Tabs.ObjectsTab"
xmlns:co="clr-namespace:Content.Client.UserInterface.Controls">
<BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Horizontal">
<Label HorizontalExpand="True" SizeFlagsStretchRatio="0.50"
Text="{Loc Object type:}" />
<LineEdit Name="SearchLineEdit" PlaceHolder="{Loc Search...}" HorizontalExpand="True" SizeFlagsStretchRatio="1"/>
<OptionButton Name="ObjectTypeOptions" HorizontalExpand="True" SizeFlagsStretchRatio="0.25"/>
</BoxContainer>
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
</BoxContainer>
<cc:HSeparator/>
<ScrollContainer HorizontalExpand="True" VerticalExpand="True">
<BoxContainer Orientation="Vertical" Name="ObjectList">
</BoxContainer>
</ScrollContainer>
<BoxContainer Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True">
<ot:ObjectsTabHeader Name="ListHeader"/>
<cc:HSeparator/>
<co:SearchListContainer Name="SearchList" Access="Public" VerticalExpand="True"/>
</BoxContainer>
</BoxContainer>
</Control>
Loading
Loading