Merge remote-tracking branch 'upstream/stable'
This commit is contained in:
@@ -11,6 +11,9 @@ namespace Content.Client.Administration.UI.CustomControls;
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public sealed partial class PlayerListEntry : BoxContainer
|
public sealed partial class PlayerListEntry : BoxContainer
|
||||||
{
|
{
|
||||||
|
private readonly ResPath _pinnedResPath = new("/Textures/Interface/Bwoink/pinned.png");
|
||||||
|
private readonly ResPath _unPinnedResPath = new("/Textures/Interface/Bwoink/un_pinned.png");
|
||||||
|
|
||||||
public PlayerListEntry()
|
public PlayerListEntry()
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
@@ -44,15 +47,6 @@ public sealed partial class PlayerListEntry : BoxContainer
|
|||||||
|
|
||||||
private void UpdatePinButtonTexture(bool isPinned)
|
private void UpdatePinButtonTexture(bool isPinned)
|
||||||
{
|
{
|
||||||
if (isPinned)
|
PlayerEntryPinButton.TexturePath = isPinned ? _pinnedResPath.CanonPath : _unPinnedResPath.CanonPath;
|
||||||
{
|
|
||||||
PlayerEntryPinButton?.RemoveStyleClass(StyleNano.StyleClassPinButtonUnpinned);
|
|
||||||
PlayerEntryPinButton?.AddStyleClass(StyleNano.StyleClassPinButtonPinned);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
PlayerEntryPinButton?.RemoveStyleClass(StyleNano.StyleClassPinButtonPinned);
|
|
||||||
PlayerEntryPinButton?.AddStyleClass(StyleNano.StyleClassPinButtonUnpinned);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,11 @@ public abstract class CommonStylesheet : PalettedStylesheet, IButtonConfig, IWin
|
|||||||
ResPath IButtonConfig.RoundedButtonPath => new("rounded_button.svg.96dpi.png");
|
ResPath IButtonConfig.RoundedButtonPath => new("rounded_button.svg.96dpi.png");
|
||||||
ResPath IButtonConfig.RoundedButtonBorderedPath => new("rounded_button_bordered.svg.96dpi.png");
|
ResPath IButtonConfig.RoundedButtonBorderedPath => new("rounded_button_bordered.svg.96dpi.png");
|
||||||
|
|
||||||
|
ResPath IButtonConfig.MonotoneBaseButtonPath => new("Monotone/monotone_button.svg.96dpi.png");
|
||||||
|
ResPath IButtonConfig.MonotoneOpenLeftButtonPath => new("Monotone/monotone_button_open_left.svg.96dpi.png");
|
||||||
|
ResPath IButtonConfig.MonotoneOpenRightButtonPath => new("Monotone/monotone_button_open_right.svg.96dpi.png");
|
||||||
|
ResPath IButtonConfig.MonotoneOpenBothButtonPath => new("Monotone/monotone_button_open_both.svg.96dpi.png");
|
||||||
|
|
||||||
ColorPalette IButtonConfig.ButtonPalette => PrimaryPalette with { PressedElement = PositivePalette.PressedElement };
|
ColorPalette IButtonConfig.ButtonPalette => PrimaryPalette with { PressedElement = PositivePalette.PressedElement };
|
||||||
ColorPalette IButtonConfig.PositiveButtonPalette => PositivePalette;
|
ColorPalette IButtonConfig.PositiveButtonPalette => PositivePalette;
|
||||||
ColorPalette IButtonConfig.NegativeButtonPalette => NegativePalette;
|
ColorPalette IButtonConfig.NegativeButtonPalette => NegativePalette;
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ public interface IButtonConfig : ISheetletConfig
|
|||||||
public ResPath SmallButtonPath { get; }
|
public ResPath SmallButtonPath { get; }
|
||||||
public ResPath RoundedButtonPath { get; }
|
public ResPath RoundedButtonPath { get; }
|
||||||
public ResPath RoundedButtonBorderedPath { get; }
|
public ResPath RoundedButtonBorderedPath { get; }
|
||||||
|
public ResPath MonotoneBaseButtonPath { get; }
|
||||||
|
public ResPath MonotoneOpenLeftButtonPath { get; }
|
||||||
|
public ResPath MonotoneOpenRightButtonPath { get; }
|
||||||
|
public ResPath MonotoneOpenBothButtonPath { get; }
|
||||||
|
|
||||||
public ColorPalette ButtonPalette { get; }
|
public ColorPalette ButtonPalette { get; }
|
||||||
public ColorPalette PositiveButtonPalette { get; }
|
public ColorPalette PositiveButtonPalette { get; }
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Content.Client.Resources;
|
||||||
using Content.Client.Stylesheets.Fonts;
|
using Content.Client.Stylesheets.Fonts;
|
||||||
using Content.Client.Stylesheets.Palette;
|
using Content.Client.Stylesheets.Palette;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
@@ -11,6 +12,10 @@ public sealed class LabelSheetlet : Sheetlet<PalettedStylesheet>
|
|||||||
{
|
{
|
||||||
public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
|
public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
|
||||||
{
|
{
|
||||||
|
var robotoMonoBold11 = ResCache.GetFont("/Fonts/RobotoMono/RobotoMono-Bold.ttf", size: 11);
|
||||||
|
var robotoMonoBold12 = ResCache.GetFont("/Fonts/RobotoMono/RobotoMono-Bold.ttf", size: 12);
|
||||||
|
var robotoMonoBold14 = ResCache.GetFont("/Fonts/RobotoMono/RobotoMono-Bold.ttf", size: 14);
|
||||||
|
|
||||||
return
|
return
|
||||||
[
|
[
|
||||||
E<Label>()
|
E<Label>()
|
||||||
@@ -58,6 +63,17 @@ public sealed class LabelSheetlet : Sheetlet<PalettedStylesheet>
|
|||||||
E<Label>()
|
E<Label>()
|
||||||
.Class(StyleClass.StatusCritical)
|
.Class(StyleClass.StatusCritical)
|
||||||
.FontColor(Palettes.Status.Critical),
|
.FontColor(Palettes.Status.Critical),
|
||||||
|
|
||||||
|
// Console text
|
||||||
|
E<Label>()
|
||||||
|
.Class(StyleClass.LabelMonospaceText)
|
||||||
|
.Prop(Label.StylePropertyFont, robotoMonoBold11),
|
||||||
|
E<Label>()
|
||||||
|
.Class(StyleClass.LabelMonospaceHeading)
|
||||||
|
.Prop(Label.StylePropertyFont, robotoMonoBold12),
|
||||||
|
E<Label>()
|
||||||
|
.Class(StyleClass.LabelMonospaceSubHeading)
|
||||||
|
.Prop(Label.StylePropertyFont, robotoMonoBold14),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
105
Content.Client/Stylesheets/Sheetlets/MonotoneButtonSheetlet.cs
Normal file
105
Content.Client/Stylesheets/Sheetlets/MonotoneButtonSheetlet.cs
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
using System.Numerics;
|
||||||
|
using Content.Client.Stylesheets.Stylesheets;
|
||||||
|
using Content.Client.Stylesheets.SheetletConfigs;
|
||||||
|
using Content.Client.UserInterface.Controls;
|
||||||
|
using Robust.Client.Graphics;
|
||||||
|
using Robust.Client.UserInterface;
|
||||||
|
using Robust.Client.UserInterface.Controls;
|
||||||
|
using static Content.Client.Stylesheets.StylesheetHelpers;
|
||||||
|
|
||||||
|
namespace Content.Client.Stylesheets.Sheetlets;
|
||||||
|
|
||||||
|
[CommonSheetlet]
|
||||||
|
public sealed class MonotoneButtonSheetlet<T> : Sheetlet<T> where T : IButtonConfig
|
||||||
|
{
|
||||||
|
public override StyleRule[] GetRules(T sheet, object config)
|
||||||
|
{
|
||||||
|
// Monotone (unfilled)
|
||||||
|
var monotoneButton = new StyleBoxTexture
|
||||||
|
{
|
||||||
|
Texture = sheet.GetTextureOr(sheet.MonotoneBaseButtonPath, NanotrasenStylesheet.TextureRoot)
|
||||||
|
};
|
||||||
|
monotoneButton.SetPatchMargin(StyleBox.Margin.All, 11);
|
||||||
|
monotoneButton.SetPadding(StyleBox.Margin.All, 1);
|
||||||
|
monotoneButton.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
|
||||||
|
monotoneButton.SetContentMarginOverride(StyleBox.Margin.Horizontal, 14);
|
||||||
|
|
||||||
|
var monotoneButtonOpenLeft = new StyleBoxTexture(monotoneButton)
|
||||||
|
{
|
||||||
|
Texture = sheet.GetTextureOr(sheet.MonotoneOpenLeftButtonPath, NanotrasenStylesheet.TextureRoot)
|
||||||
|
};
|
||||||
|
|
||||||
|
var monotoneButtonOpenRight = new StyleBoxTexture(monotoneButton)
|
||||||
|
{
|
||||||
|
Texture = sheet.GetTextureOr(sheet.MonotoneOpenRightButtonPath, NanotrasenStylesheet.TextureRoot)
|
||||||
|
};
|
||||||
|
|
||||||
|
var monotoneButtonOpenBoth = new StyleBoxTexture(monotoneButton)
|
||||||
|
{
|
||||||
|
Texture = sheet.GetTextureOr(sheet.MonotoneOpenBothButtonPath, NanotrasenStylesheet.TextureRoot)
|
||||||
|
};
|
||||||
|
|
||||||
|
// Monotone (filled)
|
||||||
|
var buttonTex = sheet.GetTextureOr(sheet.OpenLeftButtonPath, NanotrasenStylesheet.TextureRoot);
|
||||||
|
var monotoneFilledButton = new StyleBoxTexture(monotoneButton)
|
||||||
|
{
|
||||||
|
Texture = buttonTex
|
||||||
|
};
|
||||||
|
|
||||||
|
var monotoneFilledButtonOpenLeft = new StyleBoxTexture(monotoneButton)
|
||||||
|
{
|
||||||
|
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions(new Vector2(10, 0), new Vector2(14, 24))),
|
||||||
|
};
|
||||||
|
monotoneFilledButtonOpenLeft.SetPatchMargin(StyleBox.Margin.Left, 0);
|
||||||
|
|
||||||
|
var monotoneFilledButtonOpenRight = new StyleBoxTexture(monotoneButton)
|
||||||
|
{
|
||||||
|
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions(new Vector2(0, 0), new Vector2(14, 24))),
|
||||||
|
};
|
||||||
|
monotoneFilledButtonOpenRight.SetPatchMargin(StyleBox.Margin.Right, 0);
|
||||||
|
|
||||||
|
var monotoneFilledButtonOpenBoth = new StyleBoxTexture(monotoneButton)
|
||||||
|
{
|
||||||
|
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions(new Vector2(10, 0), new Vector2(3, 24))),
|
||||||
|
};
|
||||||
|
monotoneFilledButtonOpenBoth.SetPatchMargin(StyleBox.Margin.Horizontal, 0);
|
||||||
|
|
||||||
|
|
||||||
|
return
|
||||||
|
[
|
||||||
|
// Unfilled
|
||||||
|
E<MonotoneButton>()
|
||||||
|
.Box(monotoneButton),
|
||||||
|
E<MonotoneButton>()
|
||||||
|
.Class(StyleClass.ButtonOpenLeft)
|
||||||
|
.Box(monotoneButtonOpenLeft),
|
||||||
|
E<MonotoneButton>()
|
||||||
|
.Class(StyleClass.ButtonOpenRight)
|
||||||
|
.Box(monotoneButtonOpenRight),
|
||||||
|
E<MonotoneButton>()
|
||||||
|
.Class(StyleClass.ButtonOpenBoth)
|
||||||
|
.Box(monotoneButtonOpenBoth),
|
||||||
|
|
||||||
|
// Filled
|
||||||
|
E<MonotoneButton>()
|
||||||
|
.PseudoPressed()
|
||||||
|
.Box(monotoneFilledButton)
|
||||||
|
.Prop(Button.StylePropertyModulateSelf, Color.White),
|
||||||
|
E<MonotoneButton>()
|
||||||
|
.Class(StyleClass.ButtonOpenLeft)
|
||||||
|
.PseudoPressed()
|
||||||
|
.Box(monotoneFilledButtonOpenLeft)
|
||||||
|
.Prop(Button.StylePropertyModulateSelf, Color.White),
|
||||||
|
E<MonotoneButton>()
|
||||||
|
.Class(StyleClass.ButtonOpenRight)
|
||||||
|
.PseudoPressed()
|
||||||
|
.Box(monotoneFilledButtonOpenRight)
|
||||||
|
.Prop(Button.StylePropertyModulateSelf, Color.White),
|
||||||
|
E<MonotoneButton>()
|
||||||
|
.Class(StyleClass.ButtonOpenBoth)
|
||||||
|
.PseudoPressed()
|
||||||
|
.Box(monotoneFilledButtonOpenBoth)
|
||||||
|
.Prop(Button.StylePropertyModulateSelf, Color.White),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using Content.Client.Resources;
|
||||||
|
using Content.Client.Stylesheets.SheetletConfigs;
|
||||||
|
using Content.Client.UserInterface.Controls;
|
||||||
|
using Robust.Client.UserInterface;
|
||||||
|
using Robust.Client.UserInterface.Controls;
|
||||||
|
using static Content.Client.Stylesheets.StylesheetHelpers;
|
||||||
|
|
||||||
|
namespace Content.Client.Stylesheets.Sheetlets;
|
||||||
|
|
||||||
|
[CommonSheetlet]
|
||||||
|
public sealed class MonotoneCheckBoxSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet, IButtonConfig
|
||||||
|
{
|
||||||
|
public override StyleRule[] GetRules(T sheet, object config)
|
||||||
|
{
|
||||||
|
IButtonConfig buttonCfg = sheet;
|
||||||
|
|
||||||
|
var monotoneCheckBoxTextureChecked = ResCache.GetTexture("/Textures/Interface/Nano/Monotone/monotone_checkbox_checked.svg.96dpi.png");
|
||||||
|
var monotoneCheckBoxTextureUnchecked = ResCache.GetTexture("/Textures/Interface/Nano/Monotone/monotone_checkbox_unchecked.svg.96dpi.png");
|
||||||
|
|
||||||
|
return [
|
||||||
|
E<TextureRect>()
|
||||||
|
.Class(MonotoneCheckBox.StyleClassMonotoneCheckBox)
|
||||||
|
.Prop(TextureRect.StylePropertyTexture, monotoneCheckBoxTextureUnchecked),
|
||||||
|
E<TextureRect>()
|
||||||
|
.Class(MonotoneCheckBox.StyleClassMonotoneCheckBox)
|
||||||
|
.Class(CheckBox.StyleClassCheckBoxChecked)
|
||||||
|
.Prop(TextureRect.StylePropertyTexture, monotoneCheckBoxTextureChecked),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,6 +40,9 @@ public static class StyleClass
|
|||||||
public const string LabelSubText = "LabelSubText";
|
public const string LabelSubText = "LabelSubText";
|
||||||
public const string LabelKeyText = "LabelKeyText";
|
public const string LabelKeyText = "LabelKeyText";
|
||||||
public const string LabelWeak = "LabelWeak"; // replaces `LabelSecondaryColor`
|
public const string LabelWeak = "LabelWeak"; // replaces `LabelSecondaryColor`
|
||||||
|
public const string LabelMonospaceText = "ConsoleText";
|
||||||
|
public const string LabelMonospaceHeading = "ConsoleText";
|
||||||
|
public const string LabelMonospaceSubHeading = "ConsoleText";
|
||||||
|
|
||||||
public const string BackgroundPanel = "BackgroundPanel"; // replaces `AngleRect`
|
public const string BackgroundPanel = "BackgroundPanel"; // replaces `AngleRect`
|
||||||
public const string BackgroundPanelOpenLeft = "BackgroundPanelOpenLeft"; // replaces `BackgroundOpenLeft`
|
public const string BackgroundPanelOpenLeft = "BackgroundPanelOpenLeft"; // replaces `BackgroundOpenLeft`
|
||||||
|
|||||||
@@ -159,10 +159,6 @@ namespace Content.Client.Stylesheets
|
|||||||
|
|
||||||
public static readonly Color ChatBackgroundColor = Color.FromHex("#25252ADD");
|
public static readonly Color ChatBackgroundColor = Color.FromHex("#25252ADD");
|
||||||
|
|
||||||
//Bwoink
|
|
||||||
public const string StyleClassPinButtonPinned = "pinButtonPinned";
|
|
||||||
public const string StyleClassPinButtonUnpinned = "pinButtonUnpinned";
|
|
||||||
|
|
||||||
// i'm not sure what the missing symbols were referencing, and this is getting obseleted anyway so:
|
// i'm not sure what the missing symbols were referencing, and this is getting obseleted anyway so:
|
||||||
public const string ButtonOpenRight = "OpenRight";
|
public const string ButtonOpenRight = "OpenRight";
|
||||||
public const string ButtonOpenLeft = "OpenLeft";
|
public const string ButtonOpenLeft = "OpenLeft";
|
||||||
@@ -198,9 +194,6 @@ namespace Content.Client.Stylesheets
|
|||||||
var notoSansBold18 = resCache.NotoStack(variation: "Bold", size: 18);
|
var notoSansBold18 = resCache.NotoStack(variation: "Bold", size: 18);
|
||||||
var notoSansBold20 = resCache.NotoStack(variation: "Bold", size: 20);
|
var notoSansBold20 = resCache.NotoStack(variation: "Bold", size: 20);
|
||||||
var notoSansMono = resCache.GetFont("/EngineFonts/NotoSans/NotoSansMono-Regular.ttf", size: 12);
|
var notoSansMono = resCache.GetFont("/EngineFonts/NotoSans/NotoSansMono-Regular.ttf", size: 12);
|
||||||
var robotoMonoBold11 = resCache.GetFont("/Fonts/RobotoMono/RobotoMono-Bold.ttf", size: 11);
|
|
||||||
var robotoMonoBold12 = resCache.GetFont("/Fonts/RobotoMono/RobotoMono-Bold.ttf", size: 12);
|
|
||||||
var robotoMonoBold14 = resCache.GetFont("/Fonts/RobotoMono/RobotoMono-Bold.ttf", size: 14);
|
|
||||||
|
|
||||||
var windowHeaderTex = resCache.GetTexture("/Textures/Interface/Nano/window_header.png");
|
var windowHeaderTex = resCache.GetTexture("/Textures/Interface/Nano/window_header.png");
|
||||||
var windowHeader = new StyleBoxTexture
|
var windowHeader = new StyleBoxTexture
|
||||||
@@ -429,60 +422,9 @@ namespace Content.Client.Stylesheets
|
|||||||
};
|
};
|
||||||
progressBarForeground.SetContentMarginOverride(StyleBox.Margin.Vertical, 14.5f);
|
progressBarForeground.SetContentMarginOverride(StyleBox.Margin.Vertical, 14.5f);
|
||||||
|
|
||||||
// Monotone (unfilled)
|
|
||||||
var monotoneButton = new StyleBoxTexture
|
|
||||||
{
|
|
||||||
Texture = resCache.GetTexture("/Textures/Interface/Nano/Monotone/monotone_button.svg.96dpi.png"),
|
|
||||||
};
|
|
||||||
monotoneButton.SetPatchMargin(StyleBox.Margin.All, 11);
|
|
||||||
monotoneButton.SetPadding(StyleBox.Margin.All, 1);
|
|
||||||
monotoneButton.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
|
|
||||||
monotoneButton.SetContentMarginOverride(StyleBox.Margin.Horizontal, 14);
|
|
||||||
|
|
||||||
var monotoneButtonOpenLeft = new StyleBoxTexture(monotoneButton)
|
|
||||||
{
|
|
||||||
Texture = resCache.GetTexture("/Textures/Interface/Nano/Monotone/monotone_button_open_left.svg.96dpi.png"),
|
|
||||||
};
|
|
||||||
|
|
||||||
var monotoneButtonOpenRight = new StyleBoxTexture(monotoneButton)
|
|
||||||
{
|
|
||||||
Texture = resCache.GetTexture("/Textures/Interface/Nano/Monotone/monotone_button_open_right.svg.96dpi.png"),
|
|
||||||
};
|
|
||||||
|
|
||||||
var monotoneButtonOpenBoth = new StyleBoxTexture(monotoneButton)
|
|
||||||
{
|
|
||||||
Texture = resCache.GetTexture("/Textures/Interface/Nano/Monotone/monotone_button_open_both.svg.96dpi.png"),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Monotone (filled)
|
|
||||||
var monotoneFilledButton = new StyleBoxTexture(monotoneButton)
|
|
||||||
{
|
|
||||||
Texture = buttonTex,
|
|
||||||
};
|
|
||||||
|
|
||||||
var monotoneFilledButtonOpenLeft = new StyleBoxTexture(monotoneButton)
|
|
||||||
{
|
|
||||||
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions(new Vector2(10, 0), new Vector2(14, 24))),
|
|
||||||
};
|
|
||||||
monotoneFilledButtonOpenLeft.SetPatchMargin(StyleBox.Margin.Left, 0);
|
|
||||||
|
|
||||||
var monotoneFilledButtonOpenRight = new StyleBoxTexture(monotoneButton)
|
|
||||||
{
|
|
||||||
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions(new Vector2(0, 0), new Vector2(14, 24))),
|
|
||||||
};
|
|
||||||
monotoneFilledButtonOpenRight.SetPatchMargin(StyleBox.Margin.Right, 0);
|
|
||||||
|
|
||||||
var monotoneFilledButtonOpenBoth = new StyleBoxTexture(monotoneButton)
|
|
||||||
{
|
|
||||||
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions(new Vector2(10, 0), new Vector2(3, 24))),
|
|
||||||
};
|
|
||||||
monotoneFilledButtonOpenBoth.SetPatchMargin(StyleBox.Margin.Horizontal, 0);
|
|
||||||
|
|
||||||
// CheckBox
|
// CheckBox
|
||||||
var checkBoxTextureChecked = resCache.GetTexture("/Textures/Interface/Nano/checkbox_checked.svg.96dpi.png");
|
var checkBoxTextureChecked = resCache.GetTexture("/Textures/Interface/Nano/checkbox_checked.svg.96dpi.png");
|
||||||
var checkBoxTextureUnchecked = resCache.GetTexture("/Textures/Interface/Nano/checkbox_unchecked.svg.96dpi.png");
|
var checkBoxTextureUnchecked = resCache.GetTexture("/Textures/Interface/Nano/checkbox_unchecked.svg.96dpi.png");
|
||||||
var monotoneCheckBoxTextureChecked = resCache.GetTexture("/Textures/Interface/Nano/Monotone/monotone_checkbox_checked.svg.96dpi.png");
|
|
||||||
var monotoneCheckBoxTextureUnchecked = resCache.GetTexture("/Textures/Interface/Nano/Monotone/monotone_checkbox_unchecked.svg.96dpi.png");
|
|
||||||
|
|
||||||
// Tooltip box
|
// Tooltip box
|
||||||
var tooltipTexture = resCache.GetTexture("/Textures/Interface/Nano/tooltip.png");
|
var tooltipTexture = resCache.GetTexture("/Textures/Interface/Nano/tooltip.png");
|
||||||
@@ -987,17 +929,6 @@ namespace Content.Client.Stylesheets
|
|||||||
new StyleProperty(BoxContainer.StylePropertySeparation, 10),
|
new StyleProperty(BoxContainer.StylePropertySeparation, 10),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// MonotoneCheckBox
|
|
||||||
new StyleRule(new SelectorElement(typeof(TextureRect), new [] { MonotoneCheckBox.StyleClassMonotoneCheckBox }, null, null), new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(TextureRect.StylePropertyTexture, monotoneCheckBoxTextureUnchecked),
|
|
||||||
}),
|
|
||||||
|
|
||||||
new StyleRule(new SelectorElement(typeof(TextureRect), new [] { MonotoneCheckBox.StyleClassMonotoneCheckBox, CheckBox.StyleClassCheckBoxChecked }, null, null), new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(TextureRect.StylePropertyTexture, monotoneCheckBoxTextureChecked),
|
|
||||||
}),
|
|
||||||
|
|
||||||
// Tooltip
|
// Tooltip
|
||||||
new StyleRule(new SelectorElement(typeof(Tooltip), null, null, null), new[]
|
new StyleRule(new SelectorElement(typeof(Tooltip), null, null, null), new[]
|
||||||
{
|
{
|
||||||
@@ -1196,22 +1127,6 @@ namespace Content.Client.Stylesheets
|
|||||||
new StyleProperty(Label.StylePropertyFontColor, Color.DarkGray),
|
new StyleProperty(Label.StylePropertyFontColor, Color.DarkGray),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// Console text
|
|
||||||
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassConsoleText}, null, null), new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Label.StylePropertyFont, robotoMonoBold11)
|
|
||||||
}),
|
|
||||||
|
|
||||||
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassConsoleSubHeading}, null, null), new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Label.StylePropertyFont, robotoMonoBold12)
|
|
||||||
}),
|
|
||||||
|
|
||||||
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassConsoleHeading}, null, null), new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Label.StylePropertyFont, robotoMonoBold14)
|
|
||||||
}),
|
|
||||||
|
|
||||||
// Big Button
|
// Big Button
|
||||||
new StyleRule(new SelectorChild(
|
new StyleRule(new SelectorChild(
|
||||||
new SelectorElement(typeof(Button), new[] {StyleClassButtonBig}, null, null),
|
new SelectorElement(typeof(Button), new[] {StyleClassButtonBig}, null, null),
|
||||||
@@ -1290,64 +1205,6 @@ namespace Content.Client.Stylesheets
|
|||||||
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorHovered),
|
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorHovered),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// MonotoneButton (unfilled)
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(typeof(MonotoneButton), null, null, null),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Button.StylePropertyStyleBox, monotoneButton),
|
|
||||||
}),
|
|
||||||
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(typeof(MonotoneButton), new[] { ButtonOpenLeft }, null, null),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Button.StylePropertyStyleBox, monotoneButtonOpenLeft),
|
|
||||||
}),
|
|
||||||
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(typeof(MonotoneButton), new[] { ButtonOpenRight }, null, null),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Button.StylePropertyStyleBox, monotoneButtonOpenRight),
|
|
||||||
}),
|
|
||||||
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(typeof(MonotoneButton), new[] { ButtonOpenBoth }, null, null),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Button.StylePropertyStyleBox, monotoneButtonOpenBoth),
|
|
||||||
}),
|
|
||||||
|
|
||||||
// MonotoneButton (filled)
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(typeof(MonotoneButton), null, null, new[] { Button.StylePseudoClassPressed }),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Button.StylePropertyStyleBox, monotoneFilledButton),
|
|
||||||
}),
|
|
||||||
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(typeof(MonotoneButton), new[] { ButtonOpenLeft }, null, new[] { Button.StylePseudoClassPressed }),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Button.StylePropertyStyleBox, monotoneFilledButtonOpenLeft),
|
|
||||||
}),
|
|
||||||
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(typeof(MonotoneButton), new[] { ButtonOpenRight }, null, new[] { Button.StylePseudoClassPressed }),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Button.StylePropertyStyleBox, monotoneFilledButtonOpenRight),
|
|
||||||
}),
|
|
||||||
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(typeof(MonotoneButton), new[] { ButtonOpenBoth }, null, new[] { Button.StylePseudoClassPressed }),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(Button.StylePropertyStyleBox, monotoneFilledButtonOpenBoth),
|
|
||||||
}),
|
|
||||||
|
|
||||||
// NanoHeading
|
// NanoHeading
|
||||||
|
|
||||||
new StyleRule(
|
new StyleRule(
|
||||||
@@ -1768,21 +1625,6 @@ namespace Content.Client.Stylesheets
|
|||||||
// Silicon law edit ui
|
// Silicon law edit ui
|
||||||
Element<Label>().Class(SiliconLawContainer.StyleClassSiliconLawPositionLabel)
|
Element<Label>().Class(SiliconLawContainer.StyleClassSiliconLawPositionLabel)
|
||||||
.Prop(Label.StylePropertyFontColor, NanoGold),
|
.Prop(Label.StylePropertyFontColor, NanoGold),
|
||||||
// Pinned button style
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(typeof(TextureButton), new[] { StyleClassPinButtonPinned }, null, null),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Bwoink/pinned.png"))
|
|
||||||
}),
|
|
||||||
|
|
||||||
// Unpinned button style
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(typeof(TextureButton), new[] { StyleClassPinButtonUnpinned }, null, null),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Bwoink/un_pinned.png"))
|
|
||||||
}),
|
|
||||||
|
|
||||||
Element<PanelContainer>()
|
Element<PanelContainer>()
|
||||||
.Class(StyleClassInset)
|
.Class(StyleClassInset)
|
||||||
|
|||||||
@@ -1,18 +1,15 @@
|
|||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Content.Shared.CombatMode.Pacification;
|
|
||||||
using Content.Shared.Damage;
|
using Content.Shared.Damage;
|
||||||
using Content.Shared.DoAfter;
|
using Content.Shared.DoAfter;
|
||||||
using Content.Shared.Hands.EntitySystems;
|
using Content.Shared.Hands.EntitySystems;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Inventory;
|
using Content.Shared.Inventory;
|
||||||
using Content.Shared.Mobs.Components;
|
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
using Robust.Shared.Audio.Systems;
|
using Robust.Shared.Audio.Systems;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Network;
|
using Robust.Shared.Network;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Components;
|
using Robust.Shared.Physics.Components;
|
||||||
using Robust.Shared.Physics.Dynamics;
|
|
||||||
using Robust.Shared.Physics.Events;
|
using Robust.Shared.Physics.Events;
|
||||||
using Robust.Shared.Physics.Systems;
|
using Robust.Shared.Physics.Systems;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -24,7 +21,6 @@ public abstract partial class SharedProjectileSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
public const string ProjectileFixture = "projectile";
|
public const string ProjectileFixture = "projectile";
|
||||||
|
|
||||||
[Dependency] private readonly INetManager _net = default!;
|
|
||||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||||
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
|
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
|
||||||
[Dependency] private readonly SharedHandsSystem _hands = default!;
|
[Dependency] private readonly SharedHandsSystem _hands = default!;
|
||||||
@@ -136,20 +132,20 @@ public abstract partial class SharedProjectileSystem : EntitySystem
|
|||||||
if (!Resolve(uid, ref component))
|
if (!Resolve(uid, ref component))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (component.EmbeddedIntoUid is not null)
|
if (component.EmbeddedIntoUid == null)
|
||||||
|
return; // the entity is not embedded, so do nothing
|
||||||
|
|
||||||
|
if (TryComp<EmbeddedContainerComponent>(component.EmbeddedIntoUid.Value, out var embeddedContainer))
|
||||||
{
|
{
|
||||||
if (TryComp<EmbeddedContainerComponent>(component.EmbeddedIntoUid.Value, out var embeddedContainer))
|
embeddedContainer.EmbeddedObjects.Remove(uid);
|
||||||
{
|
Dirty(component.EmbeddedIntoUid.Value, embeddedContainer);
|
||||||
embeddedContainer.EmbeddedObjects.Remove(uid);
|
if (embeddedContainer.EmbeddedObjects.Count == 0)
|
||||||
Dirty(component.EmbeddedIntoUid.Value, embeddedContainer);
|
RemCompDeferred<EmbeddedContainerComponent>(component.EmbeddedIntoUid.Value);
|
||||||
if (embeddedContainer.EmbeddedObjects.Count == 0)
|
|
||||||
RemCompDeferred<EmbeddedContainerComponent>(component.EmbeddedIntoUid.Value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (component.DeleteOnRemove && _net.IsServer)
|
if (component.DeleteOnRemove)
|
||||||
{
|
{
|
||||||
QueueDel(uid);
|
PredictedQueueDel(uid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3926,3 +3926,10 @@
|
|||||||
id: 9163
|
id: 9163
|
||||||
time: '2025-10-27T18:56:16.0000000+00:00'
|
time: '2025-10-27T18:56:16.0000000+00:00'
|
||||||
url: https://github.com/space-wizards/space-station-14/pull/41148
|
url: https://github.com/space-wizards/space-station-14/pull/41148
|
||||||
|
- author: Princess-Cheeseballs
|
||||||
|
changes:
|
||||||
|
- message: Wizard is now only a midround spawn.
|
||||||
|
type: Tweak
|
||||||
|
id: 9164
|
||||||
|
time: '2025-10-23T15:29:38.0000000+00:00'
|
||||||
|
url: https://github.com/space-wizards/space-station-14/pull/40983
|
||||||
|
|||||||
@@ -26,16 +26,6 @@
|
|||||||
maxDistance: 2
|
maxDistance: 2
|
||||||
- type: UseDelay
|
- type: UseDelay
|
||||||
delay: 1.5
|
delay: 1.5
|
||||||
- type: EmbeddableProjectile
|
|
||||||
offset: 0.3,0.0
|
|
||||||
removalTime: 0.0
|
|
||||||
- type: ThrowingAngle
|
|
||||||
angle: 315
|
|
||||||
- type: LandAtCursor
|
|
||||||
- type: DamageOtherOnHit
|
|
||||||
damage:
|
|
||||||
types:
|
|
||||||
Piercing: 1
|
|
||||||
- type: Fixtures
|
- type: Fixtures
|
||||||
fixtures:
|
fixtures:
|
||||||
fix1:
|
fix1:
|
||||||
@@ -53,19 +43,25 @@
|
|||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: Pen
|
parent: Pen
|
||||||
id: BasePenFancy
|
id: PenEmbeddable
|
||||||
abstract: true
|
abstract: true
|
||||||
components:
|
components:
|
||||||
|
- type: EmbeddableProjectile
|
||||||
|
offset: 0.3,0.0
|
||||||
|
removalTime: 0.0
|
||||||
|
- type: ThrowingAngle
|
||||||
|
angle: 315
|
||||||
|
- type: LandAtCursor
|
||||||
- type: DamageOtherOnHit
|
- type: DamageOtherOnHit
|
||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Piercing: 3 #nothing shows luxury like inflicting injury
|
Piercing: 3
|
||||||
|
|
||||||
#TODO: I want the luxury pen to write a cool font like Merriweather in the future.
|
#TODO: I want the luxury pen to write a cool font like Merriweather in the future.
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: luxury pen
|
name: luxury pen
|
||||||
parent: BasePenFancy
|
parent: Pen
|
||||||
id: LuxuryPen
|
id: LuxuryPen
|
||||||
description: A fancy and expensive pen that you only deserve to own if you're qualified to handle vast amounts of paperwork.
|
description: A fancy and expensive pen that you only deserve to own if you're qualified to handle vast amounts of paperwork.
|
||||||
components:
|
components:
|
||||||
@@ -76,7 +72,7 @@
|
|||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: BaseAdvancedPen
|
id: BaseAdvancedPen
|
||||||
parent: BasePenFancy
|
parent: PenEmbeddable
|
||||||
abstract: true
|
abstract: true
|
||||||
components:
|
components:
|
||||||
- type: Tag
|
- type: Tag
|
||||||
@@ -123,7 +119,7 @@
|
|||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: captain's fountain pen
|
name: captain's fountain pen
|
||||||
parent: BasePenFancy
|
parent: PenEmbeddable
|
||||||
id: PenCap
|
id: PenCap
|
||||||
description: A luxurious fountain pen for the captain of the station.
|
description: A luxurious fountain pen for the captain of the station.
|
||||||
components:
|
components:
|
||||||
@@ -132,7 +128,7 @@
|
|||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: hop's fountain pen
|
name: hop's fountain pen
|
||||||
parent: BasePenFancy
|
parent: PenEmbeddable
|
||||||
id: PenHop
|
id: PenHop
|
||||||
description: A luxurious fountain pen for the hop of the station.
|
description: A luxurious fountain pen for the hop of the station.
|
||||||
components:
|
components:
|
||||||
@@ -141,7 +137,7 @@
|
|||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: wizard's magical pen
|
name: wizard's magical pen
|
||||||
parent: [ BasePenFancy, BaseMagicalContraband ]
|
parent: [ PenEmbeddable, BaseMagicalContraband ]
|
||||||
id: PenWiz
|
id: PenWiz
|
||||||
description: A luxurious fountain pen. Seems to have a magical crystal eraser.
|
description: A luxurious fountain pen. Seems to have a magical crystal eraser.
|
||||||
components:
|
components:
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
name: pen
|
|
||||||
suffix: Exploding
|
suffix: Exploding
|
||||||
parent: Pen
|
parent: Pen
|
||||||
description: A dark ink pen.
|
|
||||||
id: PenExploding
|
id: PenExploding
|
||||||
components:
|
components:
|
||||||
- type: TimerTrigger
|
- type: TimerTrigger
|
||||||
@@ -25,6 +23,18 @@
|
|||||||
- Trigger
|
- Trigger
|
||||||
- type: EmitSoundOnUse
|
- type: EmitSoundOnUse
|
||||||
handle: false # don't want the sound to stop the explosion from triggering
|
handle: false # don't want the sound to stop the explosion from triggering
|
||||||
|
- type: AddComponentsOnTrigger # make them embed into the target, but only when activated so that they can't be metagamed
|
||||||
|
components: # copied from PenEmbeddable
|
||||||
|
- type: EmbeddableProjectile
|
||||||
|
offset: 0.3,0.0
|
||||||
|
removalTime: 0.0
|
||||||
|
- type: ThrowingAngle
|
||||||
|
angle: 315
|
||||||
|
- type: LandAtCursor
|
||||||
|
- type: DamageOtherOnHit
|
||||||
|
damage:
|
||||||
|
types:
|
||||||
|
Piercing: 3
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: [BaseItem, BaseSyndicateContraband]
|
parent: [BaseItem, BaseSyndicateContraband]
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
id: Wizard
|
id: Wizard
|
||||||
name: roles-antag-wizard-name
|
name: roles-antag-wizard-name
|
||||||
antagonist: true
|
antagonist: true
|
||||||
setPreference: true
|
# setPreference: true # Disabled as roundstart gamemode until reworked
|
||||||
objective: roles-antag-wizard-objective # TODO: maybe give random objs and stationary ones from AntagObjectives and AntagRandomObjectives
|
objective: roles-antag-wizard-objective # TODO: maybe give random objs and stationary ones from AntagObjectives and AntagRandomObjectives
|
||||||
requirements: # I hate time locked roles but this should be enough time for someone to be acclimated
|
requirements: # I hate time locked roles but this should be enough time for someone to be acclimated
|
||||||
- !type:OverallPlaytimeRequirement
|
- !type:OverallPlaytimeRequirement
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
rules:
|
rules:
|
||||||
- DummyNonAntagChance
|
- DummyNonAntagChance
|
||||||
- Traitor
|
- Traitor
|
||||||
- SubGamemodesRule
|
- SubGamemodesRuleNoWizard
|
||||||
- BasicStationEventScheduler
|
- BasicStationEventScheduler
|
||||||
- MeteorSwarmScheduler
|
- MeteorSwarmScheduler
|
||||||
- SpaceTrafficControlEventScheduler
|
- SpaceTrafficControlEventScheduler
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
rules:
|
rules:
|
||||||
- Nukeops
|
- Nukeops
|
||||||
- DummyNonAntagChance
|
- DummyNonAntagChance
|
||||||
- SubGamemodesRule
|
- SubGamemodesRuleNoWizard
|
||||||
- BasicStationEventScheduler
|
- BasicStationEventScheduler
|
||||||
- MeteorSwarmScheduler
|
- MeteorSwarmScheduler
|
||||||
- SpaceTrafficControlEventScheduler
|
- SpaceTrafficControlEventScheduler
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
rules:
|
rules:
|
||||||
- DummyNonAntagChance
|
- DummyNonAntagChance
|
||||||
- Revolutionary
|
- Revolutionary
|
||||||
- SubGamemodesRule
|
- SubGamemodesRuleNoWizard
|
||||||
- BasicStationEventScheduler
|
- BasicStationEventScheduler
|
||||||
- MeteorSwarmScheduler
|
- MeteorSwarmScheduler
|
||||||
- SpaceTrafficControlEventScheduler
|
- SpaceTrafficControlEventScheduler
|
||||||
|
|||||||
@@ -6,4 +6,4 @@
|
|||||||
Zombie: 0.05
|
Zombie: 0.05
|
||||||
Survival: 0.10
|
Survival: 0.10
|
||||||
Revolutionary: 0.05
|
Revolutionary: 0.05
|
||||||
Wizard: 0.05 # Why not, should probably be lower
|
# Wizard: 0.05 # Disabled as roundstart gamemode until reworked
|
||||||
|
|||||||
Reference in New Issue
Block a user