Skip to content

Commit

Permalink
Merge branch 'space-wizards:master' into VoxStacksReal
Browse files Browse the repository at this point in the history
  • Loading branch information
MissKay1994 authored Jan 15, 2025
2 parents c74d305 + 9d5ef57 commit 1f76037
Show file tree
Hide file tree
Showing 59 changed files with 4,664 additions and 66 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
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
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
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 1f76037

Please sign in to comment.