Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…on-14 into spawners
  • Loading branch information
southbridge-fur committed Jan 16, 2025
2 parents 88fcbe1 + e094b79 commit 67f4b79
Show file tree
Hide file tree
Showing 111 changed files with 15,025 additions and 8,396 deletions.
5 changes: 3 additions & 2 deletions Content.Client/Access/UI/AccessOverriderWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ public void UpdateState(IPrototypeManager protoManager, AccessOverriderBoundUser
button.Disabled = !interfaceEnabled;
if (interfaceEnabled)
{
button.Pressed = state.TargetAccessReaderIdAccessList?.Contains(accessName) ?? false;
button.Disabled = (!state.AllowedModifyAccessList?.Contains(accessName)) ?? true;
// Explicit cast because Rider gives a false error otherwise.
button.Pressed = state.TargetAccessReaderIdAccessList?.Contains((ProtoId<AccessLevelPrototype>) accessName) ?? false;
button.Disabled = (!state.AllowedModifyAccessList?.Contains((ProtoId<AccessLevelPrototype>) accessName)) ?? true;
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions Content.Client/Administration/UI/AdminMenuWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
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:baby="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab">
xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab">
<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
5 changes: 0 additions & 5 deletions Content.Client/Administration/UI/AdminMenuWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ public AdminMenuWindow()
MasterTabContainer.SetTabTitle((int) TabIndex.Round, Loc.GetString("admin-menu-round-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Server, Loc.GetString("admin-menu-server-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.PanicBunker, Loc.GetString("admin-menu-panic-bunker-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((int) TabIndex.BabyJail, Loc.GetString("admin-menu-baby-jail-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Players, Loc.GetString("admin-menu-players-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Objects, Loc.GetString("admin-menu-objects-tab"));
MasterTabContainer.OnTabChanged += OnTabChanged;
Expand Down Expand Up @@ -52,7 +48,6 @@ private enum TabIndex
Round,
Server,
PanicBunker,
BabyJail,
Players,
Objects,
}
Expand Down
19 changes: 15 additions & 4 deletions Content.Client/Administration/UI/PermissionsEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ private void SaveAdminPressed(EditAdminWindow popup)
}

var title = string.IsNullOrWhiteSpace(popup.TitleEdit.Text) ? null : popup.TitleEdit.Text;
var suspended = popup.SuspendedCheckbox.Pressed;

if (popup.SourceData is { } src)
{
Expand All @@ -139,7 +140,8 @@ private void SaveAdminPressed(EditAdminWindow popup)
Title = title,
PosFlags = pos,
NegFlags = neg,
RankId = rank
RankId = rank,
Suspended = suspended,
});
}
else
Expand All @@ -152,7 +154,8 @@ private void SaveAdminPressed(EditAdminWindow popup)
Title = title,
PosFlags = pos,
NegFlags = neg,
RankId = rank
RankId = rank,
Suspended = suspended,
});
}

Expand All @@ -171,7 +174,7 @@ private void SaveAdminRankPressed(EditAdminRankWindow popup)
{
Id = src,
Flags = flags,
Name = name
Name = name,
});
}
else
Expand Down Expand Up @@ -351,6 +354,7 @@ private sealed class EditAdminWindow : DefaultWindow
public readonly OptionButton RankButton;
public readonly Button SaveButton;
public readonly Button? RemoveButton;
public readonly CheckBox SuspendedCheckbox;

public readonly Dictionary<AdminFlags, (Button inherit, Button sub, Button plus)> FlagButtons
= new();
Expand Down Expand Up @@ -381,6 +385,12 @@ public EditAdminWindow(PermissionsEui ui, PermissionsEuiState.AdminData? data)
RankButton = new OptionButton();
SaveButton = new Button { Text = Loc.GetString("permissions-eui-edit-admin-window-save-button"), HorizontalAlignment = HAlignment.Right };

SuspendedCheckbox = new CheckBox
{
Text = Loc.GetString("permissions-eui-edit-admin-window-suspended"),
Pressed = data?.Suspended ?? false,
};

RankButton.AddItem(Loc.GetString("permissions-eui-edit-admin-window-no-rank-button"), NoRank);
foreach (var (rId, rank) in ui._ranks)
{
Expand Down Expand Up @@ -488,7 +498,8 @@ public EditAdminWindow(PermissionsEui ui, PermissionsEuiState.AdminData? data)
{
nameControl,
TitleEdit,
RankButton
RankButton,
SuspendedCheckbox,
}
},
permGrid
Expand Down

This file was deleted.

This file was deleted.

26 changes: 0 additions & 26 deletions Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions Content.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Content.Client
{
internal static class Program
{
[STAThread]
public static void Main(string[] args)
{
ContentStart.Start(args);
Expand Down
22 changes: 0 additions & 22 deletions Content.Client/UserInterface/Systems/Admin/AdminUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Content.Client.Administration.UI;
using Content.Client.Administration.UI.Tabs.ObjectsTab;
using Content.Client.Administration.UI.Tabs.PanicBunkerTab;
using Content.Client.Administration.UI.Tabs.BabyJailTab;
using Content.Client.Administration.UI.Tabs.PlayerTab;
using Content.Client.Gameplay;
using Content.Client.Lobby;
Expand Down Expand Up @@ -38,13 +37,11 @@ public sealed class AdminUIController : UIController,
private AdminMenuWindow? _window;
private MenuButton? AdminButton => UIManager.GetActiveUIWidgetOrNull<MenuBar.Widgets.GameTopMenuBar>()?.AdminButton;
private PanicBunkerStatus? _panicBunker;
private BabyJailStatus? _babyJail;

public override void Initialize()
{
base.Initialize();
SubscribeNetworkEvent<PanicBunkerChangedEvent>(OnPanicBunkerUpdated);
SubscribeNetworkEvent<BabyJailChangedEvent>(OnBabyJailUpdated);
}

private void OnPanicBunkerUpdated(PanicBunkerChangedEvent msg, EntitySessionEventArgs args)
Expand All @@ -59,18 +56,6 @@ private void OnPanicBunkerUpdated(PanicBunkerChangedEvent msg, EntitySessionEven
}
}

private void OnBabyJailUpdated(BabyJailChangedEvent msg, EntitySessionEventArgs args)
{
var showDialog = _babyJail == null && msg.Status.Enabled;
_babyJail = msg.Status;
_window?.BabyJailControl.UpdateStatus(msg.Status);

if (showDialog)
{
UIManager.CreateWindow<BabyJailStatusWindow>().OpenCentered();
}
}

public void OnStateEntered(GameplayState state)
{
EnsureWindow();
Expand Down Expand Up @@ -116,13 +101,6 @@ private void EnsureWindow()
if (_panicBunker != null)
_window.PanicBunkerControl.UpdateStatus(_panicBunker);

/*
* 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.
*/

if (_babyJail != null)
_window.BabyJailControl.UpdateStatus(_babyJail);

_window.PlayerTabControl.OnEntryKeyBindDown += PlayerTabEntryKeyBindDown;
_window.ObjectsTabControl.OnEntryKeyBindDown += ObjectsTabEntryKeyBindDown;
_window.OnOpen += OnWindowOpen;
Expand Down
10 changes: 8 additions & 2 deletions Content.Packaging/ClientPackaging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ public static async Task WriteResources(
var graph = new RobustClientAssetGraph();
pass.Dependencies.Add(new AssetPassDependency(graph.Output.Name));

AssetGraph.CalculateGraph(graph.AllPasses.Append(pass).ToArray(), logger);
var dropSvgPass = new AssetPassFilterDrop(f => f.Path.EndsWith(".svg"))
{
Name = "DropSvgPass",
};
dropSvgPass.AddDependency(graph.Input).AddBefore(graph.PresetPasses);

AssetGraph.CalculateGraph([pass, dropSvgPass, ..graph.AllPasses], logger);

var inputPass = graph.Input;

Expand All @@ -72,7 +78,7 @@ await RobustSharedPackaging.WriteContentAssemblies(
new[] { "Content.Client", "Content.Shared", "Content.Shared.Database" },
cancel: cancel);

await RobustClientPackaging.WriteClientResources(contentDir, pass, cancel);
await RobustClientPackaging.WriteClientResources(contentDir, inputPass, cancel);

inputPass.InjectFinished();
}
Expand Down
Loading

0 comments on commit 67f4b79

Please sign in to comment.