Merge remote-tracking branch 'upstream/master' into upstream

This commit is contained in:
Aviu00
2024-03-22 12:17:00 +03:00
578 changed files with 1758125 additions and 1483 deletions

View File

@@ -49,7 +49,7 @@ namespace Content.Client.Administration.UI.CustomControls
PopulateList(_adminSystem.PlayerList);
FilterLineEdit.OnTextChanged += _ => FilterList();
_adminSystem.PlayerListChanged += PopulateList;
BackgroundPanel.PanelOverride = new StyleBoxFlat {BackgroundColor = new Color(20, 20, 20)};
BackgroundPanel.PanelOverride = new StyleBoxFlat {BackgroundColor = new Color(11, 11, 11)};
}
private void PlayerListItemPressed(BaseButton.ButtonEventArgs? args, ListData? data)

View File

@@ -19,7 +19,7 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
private const string ArrowUp = "↑";
private const string ArrowDown = "↓";
private readonly Color _altColor = Color.FromHex("#141414");
private readonly Color _altColor = Color.FromHex("#050505");
private readonly Color _defaultColor = Color.FromHex("#191919");
private readonly AdminSystem _adminSystem;
private IReadOnlyList<PlayerInfo> _players = new List<PlayerInfo>();

View File

@@ -43,7 +43,7 @@
<!-- Vent devices -->
<PanelContainer VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#212723" />
<gfx:StyleBoxFlat BackgroundColor="#050505" />
</PanelContainer.PanelOverride>
<ScrollContainer>
@@ -53,7 +53,7 @@
<!-- Scrubber devices -->
<PanelContainer VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#212723" />
<gfx:StyleBoxFlat BackgroundColor="#050505" />
</PanelContainer.PanelOverride>
<ScrollContainer>
@@ -63,7 +63,7 @@
<!-- Sensors -->
<PanelContainer VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#212723" />
<gfx:StyleBoxFlat BackgroundColor="#050505" />
</PanelContainer.PanelOverride>
<ScrollContainer>

View File

@@ -9,7 +9,7 @@
HorizontalExpand="True">
<PanelContainer VerticalExpand="True" HorizontalExpand="True" Margin="10">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
<gfx:StyleBoxFlat BackgroundColor="#212121" />
</PanelContainer.PanelOverride>
<ScrollContainer HScrollEnabled="False"
HorizontalExpand="True"

View File

@@ -15,7 +15,7 @@
<PanelContainer VerticalExpand="True" MinSize="0 200">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#212723" />
<gfx:StyleBoxFlat BackgroundColor="#050505" />
</PanelContainer.PanelOverride>
<ScrollContainer HorizontalExpand="True" MinSize="0 200">
<!-- Initially empty, when server sends state data this will have container contents and fill volume.-->
@@ -39,7 +39,7 @@
<!-- Buffer info -->
<PanelContainer VerticalExpand="True" MinSize="0 200">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#212723" />
<gfx:StyleBoxFlat BackgroundColor="#050505" />
</PanelContainer.PanelOverride>
<ScrollContainer HorizontalExpand="True" MinSize="0 200">
@@ -61,7 +61,7 @@
<PanelContainer VerticalExpand="True" MinSize="0 200">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#212723" />
<gfx:StyleBoxFlat BackgroundColor="#050505" />
</PanelContainer.PanelOverride>
<ScrollContainer HorizontalExpand="True" MinSize="0 200">
@@ -86,7 +86,7 @@
<!-- Wrap the packaging info-->
<PanelContainer>
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#212723" />
<gfx:StyleBoxFlat BackgroundColor="#050505" />
</PanelContainer.PanelOverride>
<!-- Packaging Info -->

View File

@@ -40,7 +40,7 @@
SizeFlagsStretchRatio="6"
MinSize="0 150">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#212723" />
<gfx:StyleBoxFlat BackgroundColor="#050505" />
</PanelContainer.PanelOverride>
<BoxContainer Name="ContainerInfo"
Orientation="Vertical"

View File

@@ -18,7 +18,7 @@
<PanelContainer VerticalExpand="True"
HorizontalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
<gfx:StyleBoxFlat BackgroundColor="#212121" />
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical" VerticalAlignment="Center">
<RichTextLabel Name="CostLabel" HorizontalAlignment="Center" VerticalAlignment="Center"/>
@@ -35,7 +35,7 @@
HorizontalExpand="True"
RectClipContent="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
<gfx:StyleBoxFlat BackgroundColor="#212121" />
</PanelContainer.PanelOverride>
<ui:MaterialStorageControl Name="MaterialStorageControl"/>
</PanelContainer>

View File

@@ -134,7 +134,7 @@ public sealed class DoAfterOverlay : Overlay
}
var xProgress = (EndX - StartX) * elapsedRatio + StartX;
var box = new Box2(new Vector2(StartX, 3f) / EyeManager.PixelsPerMeter,
var box = new Box2(new Vector2(StartX, 2f) / EyeManager.PixelsPerMeter,
new Vector2(xProgress, 4f) / EyeManager.PixelsPerMeter);
box = box.Translated(position);

View File

@@ -2,7 +2,7 @@
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client">
<PanelContainer>
<PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BackgroundColor="#242429" />
<graphics:StyleBoxFlat BackgroundColor="#111111" />
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical" HorizontalExpand="True" Margin="5">

View File

@@ -13,7 +13,7 @@
<!-- Item list -->
<BoxContainer Name="MarkingSelectorContainer" Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True">
<ScrollContainer MinHeight="500" VerticalExpand="True" HorizontalExpand="True">
<ScrollContainer MinHeight="200" VerticalExpand="True" HorizontalExpand="True">
<ItemList Name="MarkingList" VerticalExpand="True" />
</ScrollContainer>

View File

@@ -76,6 +76,7 @@ namespace Content.Client.Input
human.AddFunction(ContentKeyFunctions.Arcade1);
human.AddFunction(ContentKeyFunctions.Arcade2);
human.AddFunction(ContentKeyFunctions.Arcade3);
human.AddFunction(ContentKeyFunctions.LieDown); // WD EDIT
// actions should be common (for ghosts, mobs, etc)
common.AddFunction(ContentKeyFunctions.OpenActionsMenu);

View File

@@ -38,7 +38,7 @@
SizeFlagsStretchRatio="4">
<PanelContainer VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
<gfx:StyleBoxFlat BackgroundColor="#212121" />
</PanelContainer.PanelOverride>
<ScrollContainer VerticalExpand="True" HScrollEnabled="False">
<BoxContainer

View File

@@ -6,7 +6,7 @@
<gfx:StyleBoxFlat
BorderThickness="2"
BorderColor="#464966"
BackgroundColor="#25252A"
BackgroundColor="#050505"
/>
</PanelContainer.PanelOverride>
<BoxContainer

View File

@@ -1,96 +1,37 @@
<Control xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
<TextureRect Access="Public" TexturePath="/Textures/Ohio/ohfuck.png" VerticalExpand="True" HorizontalExpand="True" Name="Background" Stretch="KeepAspectCovered"/>
<Control HorizontalAlignment="Center" VerticalAlignment="Center">
<PanelContainer StyleClasses="AngleRect" />
<BoxContainer Orientation="Vertical" MinSize="300 200">
<BoxContainer Orientation="Horizontal">
<Label Margin="8 0 0 0" Text="{Loc 'connecting-title'}"
StyleClasses="LabelHeading" VAlign="Center" />
xmlns:mainMenu="clr-namespace:Content.Client.MainMenu">
<mainMenu:BackgroundControl TexturePath="/Textures/Logo/logo-ru.png" Stretch="KeepAspectCentered" Name="Background"/>
<Control HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
<PanelContainer MinWidth="900" StyleClasses="LobbyShadedBackground" HorizontalAlignment="Center">
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Center" Margin="4 4 4 4">
<BoxContainer Orientation="Horizontal" Name="ConnectingStatus">
<Label StyleClasses="LabelHeadingFuckingBigger" Text="{Loc 'connecting-in-progress'}" Align="Center" Margin="0 0 24 0" />
<!-- Who the fuck named these cont- oh wait I did -->
<Label Name="ConnectStatus" StyleClasses="LabelHeadingFuckingBigger" Align="Center" />
</BoxContainer>
<BoxContainer Orientation="Horizontal" Name="Disconnected">
<Label Text="{Loc 'connecting-disconnected'}" StyleClasses="LabelHeadingFuckingBigger" Align="Center" Margin="0 0 24 0" />
<Label Name="DisconnectReason" StyleClasses="LabelHeadingFuckingBigger" Align="Center" />
</BoxContainer>
</BoxContainer>
<PanelContainer Name="ConnectFail" HorizontalAlignment="Center" VerticalAlignment="Center" Visible="False">
<RichTextLabel Name="ConnectFailReason" />
</PanelContainer>
</PanelContainer>
<PanelContainer HorizontalAlignment="Left">
<Label Name="ConnectingAddress" StyleClasses="LabelSubText" Margin="4 4 4 4" VerticalAlignment="Bottom" />
</PanelContainer>
<PanelContainer StyleClasses="LobbyShadedBackground" HorizontalAlignment="Right">
<BoxContainer Orientation="Horizontal" Margin="4 4 4 4">
<Button Name="ExitButton" Text="{Loc 'connecting-exit'}"
HorizontalAlignment="Right" HorizontalExpand="True" />
</BoxContainer>
<controls:HighDivider />
<BoxContainer Orientation="Vertical" VerticalExpand="True" Margin="4 4 4 0">
<Control VerticalExpand="True" Margin="0 0 0 8">
<BoxContainer Orientation="Vertical" Name="ConnectingStatus">
<Label Text="{Loc 'connecting-in-progress'}" Align="Center" />
<!-- Who the fuck named these cont- oh wait I did -->
<Label Name="ConnectStatus" StyleClasses="LabelSubText" Align="Center" />
</BoxContainer>
<BoxContainer Orientation="Vertical" Name="ConnectFail" Visible="False">
<RichTextLabel Name="ConnectFailReason" VerticalAlignment="Stretch"/>
<Button Name="RetryButton" Text="{Loc 'connecting-retry'}"
HorizontalAlignment="Center"
VerticalExpand="True" VerticalAlignment="Bottom" />
</BoxContainer>
<BoxContainer Orientation="Vertical" Name="Disconnected">
<Label Text="{Loc 'connecting-disconnected'}" Align="Center" />
<Label Name="DisconnectReason" Align="Center" />
<Button Name="ReconnectButton" Text="{Loc 'connecting-reconnect'}"
HorizontalAlignment="Center"
VerticalExpand="True" VerticalAlignment="Bottom" />
HorizontalAlignment="Right" HorizontalExpand="True" />
<Button Name="RedialButton" Text="{Loc 'connecting-redial'}"
Disabled="True"
HorizontalAlignment="Center"
VerticalExpand="True" VerticalAlignment="Bottom" />
</BoxContainer>
</Control>
<Label Name="ConnectingAddress" StyleClasses="LabelSubText" HorizontalAlignment="Center" />
</BoxContainer>
<PanelContainer>
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#444" ContentMarginTopOverride="2" />
</PanelContainer.PanelOverride>
</PanelContainer>
<BoxContainer Orientation="Horizontal" Margin="12 0 4 0" VerticalAlignment="Bottom">
<Label Text="{Loc 'connecting-tip'}" StyleClasses="LabelSubText" />
<Label Text="{Loc 'connecting-version'}" StyleClasses="LabelSubText"
HorizontalAlignment="Right" HorizontalExpand="True" />
</BoxContainer>
</BoxContainer>
</PanelContainer>
</Control>
</Control>

View File

@@ -16,7 +16,7 @@ namespace Content.Client.Launcher;
[GenerateTypedNameReferences]
public sealed partial class LauncherConnectingGui : Control
{
private const float RedialWaitTimeSeconds = 15f;
private const float RedialWaitTimeSeconds = 47f;
private readonly LauncherConnecting _state;
private readonly IRobustRandom _random;
private readonly IPrototypeManager _prototype;
@@ -36,10 +36,9 @@ public sealed partial class LauncherConnectingGui : Control
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetNano;
ChangeLoginTip();
ReconnectButton.OnPressed += _ => _state.RetryConnect();
// Redial shouldn't fail, but if it does, try a reconnect (maybe we're being run from debug)
RedialButton.OnPressed += _ =>
{
@@ -76,7 +75,6 @@ public sealed partial class LauncherConnectingGui : Control
{
var redialFlag = args?.RedialFlag ?? false;
RedialButton.Visible = redialFlag;
ReconnectButton.Visible = !redialFlag;
}
private void ChangeLoginTip()

View File

@@ -108,7 +108,7 @@
</PanelContainer>
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom">
<BoxContainer Name="VersionLabel" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom">
<PanelContainer StyleClasses="LobbyGayBackground">

View File

@@ -37,6 +37,7 @@ namespace Content.Client.Lobby.UI
Version.Visible = true;
LabelName.Visible = true;
Changelog.Visible = true;
VersionLabel.Visible = true;
break;
case LobbyGuiState.CharacterSetup:
CharacterSetupState.Visible = true;
@@ -45,6 +46,7 @@ namespace Content.Client.Lobby.UI
Version.Visible = false;
LabelName.Visible = false;
Changelog.Visible = false;
VersionLabel.Visible = false;
break;
}
}

View File

@@ -0,0 +1,52 @@
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Prototypes;
namespace Content.Client.MainMenu;
public sealed class BackgroundControl : TextureRect
{
[Dependency] private readonly IClyde _clyde = default!;
[Dependency] private readonly IPrototypeManager _prototype = default!;
private IRenderTexture? _buffer;
private readonly ShaderInstance _glitchShader;
public BackgroundControl()
{
IoCManager.InjectDependencies(this);
_glitchShader = _prototype.Index<ShaderPrototype>("Cyberglitch").Instance().Duplicate();
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
_buffer?.Dispose();
}
protected override void Resized()
{
base.Resized();
_buffer?.Dispose();
_buffer = _clyde.CreateRenderTarget(PixelSize, RenderTargetColorFormat.Rgba8Srgb, default);
}
protected override void Draw(DrawingHandleScreen handle)
{
if (_buffer is null)
return;
handle.RenderInRenderTarget(_buffer, () =>
{
base.Draw(handle);
}, Color.Transparent);
handle.UseShader(_glitchShader);
handle.DrawTextureRect(_buffer.Texture, PixelSizeBox);
handle.UseShader(null);
}
}

View File

@@ -18,7 +18,7 @@
<customControls:HSeparator StyleClasses="LowDivider" Margin="0 0 0 10"/>
<PanelContainer VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
<gfx:StyleBoxFlat BackgroundColor="#212121" />
</PanelContainer.PanelOverride>
<ScrollContainer
HScrollEnabled="False"

View File

@@ -45,7 +45,7 @@ public sealed partial class MaterialStorageControl : BoxContainer
}
var gridStorage = _entityManager.TryGetComponent<TransformComponent>(_owner, out var transformComponent) &&
_entityManager.HasComponent<BluespaceSiloComponent>(_owner) &&
_entityManager.HasComponent<BluespaceStorageComponent>(_owner) &&
_entityManager.TryGetComponent<MaterialStorageComponent>(transformComponent.GridUid,
out var materialStorageComponent) ? materialStorageComponent : null;

View File

@@ -49,7 +49,7 @@
<BoxContainer VerticalExpand="True" Margin="10 0 10 10" Orientation="Vertical">
<PanelContainer VerticalExpand="True" MinSize="0 200">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#212723" />
<gfx:StyleBoxFlat BackgroundColor="#050505" />
</PanelContainer.PanelOverride>
<ScrollContainer
HScrollEnabled="False"

View File

@@ -14,7 +14,7 @@ namespace Content.Client.NetworkConfigurator;
[GenerateTypedNameReferences]
public sealed partial class NetworkConfiguratorLinkMenu : FancyWindow
{
private const string PanelBgColor = "#202023";
private const string PanelBgColor = "#202020";
private readonly LinksRender _links;

View File

@@ -1,7 +1,7 @@
<DefaultWindow xmlns="https://spacestation14.io"
xmlns:tabs="clr-namespace:Content.Client.Options.UI.Tabs"
Title="{Loc 'ui-options-title'}"
MinSize="980 450">
MinSize="980 500">
<TabContainer Name="Tabs" Access="Public">
<tabs:MiscTab Name="MiscTab" />
<tabs:GraphicsTab Name="GraphicsTab" />

View File

@@ -25,6 +25,7 @@
<BoxContainer Orientation="Horizontal"
Align="End"
HorizontalExpand="True"
Margin="8 8"
VerticalExpand="True">
<Button Name="ResetButton"
Text="{Loc 'ui-options-reset-all'}"

View File

@@ -142,11 +142,13 @@
Text="{Loc 'ui-options-reset-all'}"
StyleClasses="Caution"
HorizontalExpand="True"
Margin="8 8"
HorizontalAlignment="Right" />
<Control MinSize="2 0" />
<Button Name="ApplyButton"
Text="{Loc 'ui-options-apply'}"
TextAlign="Center"
Margin="8 8"
HorizontalAlignment="Right" />
</BoxContainer>
</controls:StripeBack>

View File

@@ -45,6 +45,7 @@
<Button Name="ApplyButton"
Text="{Loc 'ui-options-apply'}"
TextAlign="Center"
Margin="8 8"
HorizontalAlignment="Right" />
</controls:StripeBack>
</BoxContainer>

View File

@@ -183,6 +183,7 @@ namespace Content.Client.Options.UI.Tabs
AddButton(ContentKeyFunctions.SwapHands);
AddButton(ContentKeyFunctions.MoveStoredItem);
AddButton(ContentKeyFunctions.RotateStoredItem);
AddButton(ContentKeyFunctions.LieDown); // WD EDIT
AddHeader("ui-options-header-interaction-adv");
AddButton(ContentKeyFunctions.SmartEquipBackpack);

View File

@@ -59,6 +59,7 @@
<Button Name="ApplyButton"
Text="{Loc 'ui-options-apply'}"
TextAlign="Center"
Margin="8 8"
HorizontalAlignment="Right" />
</controls:StripeBack>
</BoxContainer>

View File

@@ -81,6 +81,7 @@
<BoxContainer Orientation="Horizontal"
Align="End"
HorizontalExpand="True"
Margin="8 8"
VerticalExpand="True">
<Button Name="ResetButton"
Text="{Loc 'ui-options-reset-all'}"

View File

@@ -19,13 +19,13 @@ public sealed partial class PdaNavigationButton : ContainerButton
private readonly StyleBoxFlat _styleBox = new()
{
BackgroundColor = Color.FromHex("#202023"),
BackgroundColor = Color.FromHex("#202020"),
BorderColor = Color.FromHex("#5a5a5a"),
BorderThickness = new Thickness(0, 0, 0, 2)
};
public string InactiveBgColor { get; set; } = "#202023";
public string ActiveBgColor { get; set; } = "#141414";
public string InactiveBgColor { get; set; } = "#202020";
public string ActiveBgColor { get; set; } = "#050505";
public string InactiveFgColor { get; set; } = "#5a5a5a";
public string ActiveFgColor { get; set; } = "#FFFFFF";

View File

@@ -14,7 +14,7 @@ public sealed partial class PdaProgramItem : ContainerButton
private readonly StyleBoxFlat _styleBox = new()
{
BackgroundColor = Color.FromHex("#141414")
BackgroundColor = Color.FromHex("#050505")
};
public Color BackgroundColor

View File

@@ -18,7 +18,7 @@ public sealed partial class PdaSettingsButton : ContainerButton
private readonly StyleBoxFlat _styleBox = new()
{
BackgroundColor = Color.FromHex("#141414")
BackgroundColor = Color.FromHex("#050505")
};
public string? Text

View File

@@ -37,7 +37,7 @@ public sealed class ParallaxControl : Control
var ourSize = PixelSize;
var currentTime = (float) _timing.RealTime.TotalSeconds;
var offset = Offset + new Vector2(currentTime * 100f, currentTime * 0f);
var offset = Offset + new Vector2(currentTime * 0f, currentTime * 100f);
if (layer.Config.Tiled)
{

View File

@@ -86,13 +86,13 @@ namespace Content.Client.ParticleAccelerator.UI
var back = new StyleBoxTexture
{
Texture = panelTex,
Modulate = Color.FromHex("#141414"),
Modulate = Color.FromHex("#050505"),
};
back.SetPatchMargin(StyleBox.Margin.All, 10);
var back2 = new StyleBoxTexture(back)
{
Modulate = Color.FromHex("#202023")
Modulate = Color.FromHex("#202020")
};
AddChild(new PanelContainer

View File

@@ -10,13 +10,13 @@
<Label Text="{Loc 'character-setup-gui-character-setup-label'}"
Margin="8 0 0 0" VAlign="Center"
StyleClasses="LabelHeadingBigger" />
<Button Name="StatsButton" HorizontalExpand="True"
Text="{Loc 'character-setup-gui-character-setup-stats-button'}"
<Button Name="RulesButton" HorizontalExpand="True"
Text="{Loc 'character-setup-gui-character-setup-rules-button'}"
StyleClasses="ButtonBig"
HorizontalAlignment="Right" />
<Button Name="RulesButton"
Text="{Loc 'character-setup-gui-character-setup-rules-button'}"
StyleClasses="ButtonBig"/>
<Button Name="StatsButton"
StyleClasses="ButtonBig"
Text="{Loc 'character-setup-gui-character-setup-stats-button'}"/>
<Button Name="SaveButton"
Access="Public"
Text="{Loc 'character-setup-gui-character-setup-save-button'}"
@@ -31,16 +31,18 @@
<gfx:StyleBoxFlat BackgroundColor="{x:Static style:StyleNano.NanoGold}" ContentMarginTopOverride="2" />
</PanelContainer.PanelOverride>
</PanelContainer>
<BoxContainer Orientation="Horizontal" VerticalExpand="True" SeparationOverride="0">
<ScrollContainer MinSize="325 0" Margin="5 5 0 0">
<BoxContainer Name="Characters" Orientation="Vertical" />
<BoxContainer Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True" SeparationOverride="0">
<ScrollContainer MinSize="450 90" Margin="5 5 5 5">
<BoxContainer Name="Characters" Orientation="Horizontal" />
</ScrollContainer>
<PanelContainer MinSize="2 0">
<PanelContainer MinSize="0 2">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="{x:Static style:StyleNano.NanoGold}" ContentMarginTopOverride="2" />
</PanelContainer.PanelOverride>
</PanelContainer>
<BoxContainer Name="CharEditor" />
<BoxContainer Orientation="Horizontal" VerticalExpand="True" HorizontalExpand="True" SeparationOverride="0">
<BoxContainer Name="CharEditor" HorizontalExpand="True" HorizontalAlignment="Stretch" />
</BoxContainer>
</BoxContainer>
</BoxContainer>
</Control>

View File

@@ -76,6 +76,12 @@ namespace Content.Client.Preferences.UI
_humanoidProfileEditor = new HumanoidProfileEditor(preferencesManager, prototypeManager, entityManager, configurationManager);
_humanoidProfileEditor.OnProfileChanged += ProfileChanged;
// WD-EDIT start
_humanoidProfileEditor.HorizontalExpand = true;
_humanoidProfileEditor.HorizontalAlignment = HAlignment.Stretch;
// WD-EDIT end
CharEditor.AddChild(_humanoidProfileEditor);
UpdateUI();
@@ -194,7 +200,7 @@ namespace Content.Client.Preferences.UI
var view = new SpriteView
{
Scale = new Vector2(2, 2),
Scale = new Vector2((float) 1.45, (float) 1.45),
OverrideDirection = Direction.South
};
view.SetEntity(_previewDummy);
@@ -212,6 +218,9 @@ namespace Content.Client.Preferences.UI
{
Text = description,
ClipText = true,
// WD-EDIT start
MinSize = new Vector2(100, 0),
// WD-EDIT end
HorizontalExpand = true
};
var deleteButton = new Button
@@ -243,6 +252,9 @@ namespace Content.Client.Preferences.UI
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true,
// WD-EDIT start
MinSize = new Vector2(125, 0),
// WD-EDIT end
SeparationOverride = 0,
Children =
{

View File

@@ -2,135 +2,163 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prefUi="clr-namespace:Content.Client.Preferences.UI"
xmlns:humanoid="clr-namespace:Content.Client.Humanoid"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:humanoidProfileEditorExt="clr-namespace:Content.Client._Amour.HumanoidProfileEditorExt">
<BoxContainer Orientation="Horizontal">
<!-- Left side -->
<BoxContainer Orientation="Vertical" Margin="10 10 10 10">
<BoxContainer Orientation="Horizontal" HorizontalExpand="True" HorizontalAlignment="Stretch" Margin="10 10 10 10">
<!-- Middle container -->
<BoxContainer Orientation="Horizontal" SeparationOverride="10">
<BoxContainer Orientation="Vertical" SeparationOverride="10">
<!-- Name box-->
<PanelContainer StyleClasses="GayShitBackground">
<BoxContainer Orientation="Vertical">
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Vertical">
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Horizontal" VerticalExpand="True">
<GridContainer Columns="3">
<Label Text="{Loc 'humanoid-profile-editor-name-label'}" />
<LineEdit Name="CNameEdit" MinSize="270 0" VerticalAlignment="Center" Margin="5 0 0 0" />
<Button Name="CNameRandomize" Text="{Loc 'humanoid-profile-editor-name-random-button'}" />
</BoxContainer>
<BoxContainer Orientation="Horizontal" VerticalExpand="True">
<LineEdit Name="CNameEdit" MinSize="200 0" VerticalAlignment="Center" Margin="5 0 0 0" />
<Control MinHeight="5" />
<Label Text="{Loc 'humanoid-profile-editor-clown-name-label'}" />
<LineEdit Name="CClownNameEdit" MinSize="270 0" VerticalAlignment="Center" Margin="5 0 0 0" />
<LineEdit Name="CClownNameEdit" MinSize="200 0" VerticalAlignment="Center" Margin="5 0 0 0" />
<Button Name="CClownNameRandomize" Text="{Loc 'humanoid-profile-editor-name-random-button'}" />
</BoxContainer>
<BoxContainer Orientation="Horizontal" VerticalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-mime-name-label'}" />
<LineEdit Name="CMimeNameEdit" MinSize="270 0" VerticalAlignment="Center" Margin="5 0 0 0" />
<LineEdit Name="CMimeNameEdit" MinSize="200 0" VerticalAlignment="Center" Margin="5 0 0 0" />
<Button Name="CMimeNameRandomize" Text="{Loc 'humanoid-profile-editor-name-random-button'}" />
</BoxContainer>
<BoxContainer Orientation="Horizontal" VerticalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-borg-name-label'}" />
<LineEdit Name="CBorgNameEdit" MinSize="270 0" VerticalAlignment="Center" Margin="5 0 0 0" />
<LineEdit Name="CBorgNameEdit" MinSize="200 0" VerticalAlignment="Center" Margin="5 0 0 0" />
<Button Name="CBorgNameRandomize" Text="{Loc 'humanoid-profile-editor-name-random-button'}" />
</BoxContainer>
<Button Name="CNameRandomize" Text="{Loc 'humanoid-profile-editor-name-random-button'}"
HorizontalAlignment="Center"
HorizontalExpand="False" MaxWidth="200" />
<Button Name="CRandomizeEverything" HorizontalAlignment="Center"
HorizontalExpand="False" MaxWidth="256"
HorizontalExpand="False" MaxWidth="200"
Text="{Loc 'humanoid-profile-editor-randomize-everything-button'}" />
</GridContainer>
<RichTextLabel Name="CWarningLabel" HorizontalExpand="False"
VerticalExpand="True" MaxWidth="425"
VerticalExpand="True" MaxWidth="400"
HorizontalAlignment="Left" />
</BoxContainer>
</prefUi:HighlightedContainer>
</BoxContainer>
</prefUi:HighlightedContainer>
</BoxContainer>
</PanelContainer>
<!-- Import/Export -->
<PanelContainer StyleClasses="GayShitBackground">
<BoxContainer Orientation="Vertical">
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Horizontal">
<Button Text="{Loc 'humanoid-profile-editor-import-button'}" Disabled="True"
ToolTip="{Loc 'generic-not-yet-implemented'}" />
ToolTip="{Loc 'generic-not-yet-implemented'}"
HorizontalAlignment="Center" />
<Button Text="{Loc 'humanoid-profile-editor-export-button'}" Disabled="True"
ToolTip="{Loc 'generic-not-yet-implemented'}" />
</BoxContainer>
</prefUi:HighlightedContainer>
ToolTip="{Loc 'generic-not-yet-implemented'}"
HorizontalAlignment="Center" />
<!-- Save -->
<prefUi:HighlightedContainer>
<Button Name="CSaveButton" Text="{Loc 'humanoid-profile-editor-save-button'}" HorizontalAlignment="Center" />
</BoxContainer>
</prefUi:HighlightedContainer>
</BoxContainer>
</PanelContainer>
<PanelContainer StyleClasses="GayShitBackground">
<BoxContainer Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True" VerticalAlignment="Center">
<SpriteView Name="CSpriteView" Scale="8 8" SizeFlagsStretchRatio="1" />
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 5">
<Button Name="CSpriteRotateLeft" Text="◀" StyleClasses="OpenRight" />
<Button Name="CSpriteRotateRight" Text="▶" StyleClasses="OpenLeft" />
</BoxContainer>
<Control MinHeight="10" />
</BoxContainer>
</PanelContainer>
</BoxContainer>
<Control MinWidth="10" />
<!-- tabContainer -->
<TabContainer Name="CTabContainer" VerticalExpand="True">
<PanelContainer StyleClasses="GayShitBackground" HorizontalExpand="True" HorizontalAlignment="Stretch">
<TabContainer Name="CTabContainer" MinWidth="750" VerticalExpand="True" HorizontalExpand="True">
<BoxContainer Orientation="Vertical">
<ScrollContainer VerticalExpand="True">
<!-- appearanceList -->
<BoxContainer Orientation="Vertical">
<BoxContainer Margin="10" Orientation="Vertical" HorizontalExpand="True">
<!-- Species -->
<BoxContainer HorizontalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-species-label'}" />
<Control HorizontalExpand="True"/>
<OptionButton Name="CSpeciesButton" HorizontalAlignment="Right" />
</BoxContainer>
<!-- Body Type -->
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'humanoid-profile-editor-body-type-label'}"/>
<Control HorizontalExpand="True"/>
<OptionButton Name="CBodyTypesButton" HorizontalAlignment="Right" />
</BoxContainer>
<!-- Age -->
<BoxContainer HorizontalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-age-label'}" />
<Control HorizontalExpand="True"/>
<LineEdit Name="CAgeEdit" MinSize="40 0" HorizontalAlignment="Right" />
</BoxContainer>
<!-- SexAndAgeRow -->
<BoxContainer Orientation="Horizontal" SeparationOverride="10">
<!-- Sex -->
<BoxContainer HorizontalExpand="True">
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'humanoid-profile-editor-sex-label'}" />
<Control HorizontalExpand="True"/>
<OptionButton Name="CSexButton" HorizontalAlignment="Right" />
<OptionButton Name="CSexButton" />
</BoxContainer>
<!-- Pronouns -->
<BoxContainer HorizontalExpand="True">
</prefUi:HighlightedContainer>
<!-- Body Type -->
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'humanoid-profile-editor-body-type-label'}"></Label>
<OptionButton Name="CBodyTypesButton" />
</BoxContainer>
</prefUi:HighlightedContainer>
<!-- Age -->
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'humanoid-profile-editor-age-label'}" />
<LineEdit Name="CAgeEdit" MinSize="40 0" />
</BoxContainer>
</prefUi:HighlightedContainer>
<!-- Gender -->
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'humanoid-profile-editor-pronouns-label'}" />
<Control HorizontalExpand="True"/>
<OptionButton Name="CPronounsButton" HorizontalAlignment="Right" />
<OptionButton Name="CPronounsButton" />
</BoxContainer>
<!-- TTS -->
<BoxContainer HorizontalExpand="True">
</prefUi:HighlightedContainer>
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'humanoid-profile-editor-voice-label'}" />
<Control HorizontalExpand="True"/>
<OptionButton Name="CVoiceButton" HorizontalAlignment="Right" />
<Button Name="CVoicePlayButton" Text=">" MaxWidth="80" />
<OptionButton Name="CVoiceButton" />
<Button Name="CVoicePlayButton" Text="{Loc 'humanoid-profile-editor-voice-play'}" MaxWidth="80" />
</BoxContainer>
</prefUi:HighlightedContainer>
</BoxContainer>
<BoxContainer Orientation="Horizontal" SeparationOverride="10">
<!-- Species -->
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'humanoid-profile-editor-species-label'}" />
<OptionButton Name="CSpeciesButton" />
</BoxContainer>
</prefUi:HighlightedContainer>
<!-- Show clothing -->
<prefUi:HighlightedContainer>
<BoxContainer HorizontalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-clothing'}" />
<Control HorizontalExpand="True"/>
<Button Name="ShowClothes" Pressed="True" ToggleMode="True" Text="{Loc 'humanoid-profile-editor-clothing-show'}" HorizontalAlignment="Right" />
</BoxContainer>
</prefUi:HighlightedContainer>
<!-- Clothing -->
<BoxContainer HorizontalExpand="True">
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'humanoid-profile-editor-clothing-label'}" />
<Control HorizontalExpand="True"/>
<OptionButton Name="CClothingButton" HorizontalAlignment="Right" />
<OptionButton Name="CClothingButton" />
</BoxContainer>
</prefUi:HighlightedContainer>
<!-- Backpack -->
<BoxContainer HorizontalExpand="True">
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'humanoid-profile-editor-backpack-label'}" />
<Control HorizontalExpand="True"/>
<OptionButton Name="CBackpackButton" HorizontalAlignment="Right" />
<OptionButton Name="CBackpackButton" />
</BoxContainer>
</prefUi:HighlightedContainer>
<!-- Spawn Priority -->
<prefUi:HighlightedContainer>
<BoxContainer HorizontalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-spawn-priority-label'}" />
<Control HorizontalExpand="True"/>
<OptionButton Name="CSpawnPriorityButton" HorizontalAlignment="Right" />
</BoxContainer>
</prefUi:HighlightedContainer>
</BoxContainer>
<!-- Height -->
<BoxContainer HorizontalExpand="True" Orientation="Vertical" Name="HeightContainer">
<Label Text="{Loc 'humanoid-profile-editor-height-label'}" />
@@ -140,23 +168,28 @@
<Button Name="ResetHeightButton" Text="{Loc 'height-reset'}"/>
</BoxContainer>
</BoxContainer>
</BoxContainer>
<!-- Skin -->
<BoxContainer Margin="10" HorizontalExpand="True" Orientation="Vertical">
<prefUi:HighlightedContainer>
<BoxContainer HorizontalExpand="True" Orientation="Vertical">
<Label Text="{Loc 'humanoid-profile-editor-skin-color-label'}" />
<Slider HorizontalExpand="True" Name="CSkin" MinValue="0" MaxValue="100" Value="20" />
<BoxContainer Name="CRgbSkinColorContainer" Visible="False" Orientation="Vertical" HorizontalExpand="True"></BoxContainer>
</BoxContainer>
<!-- Hair -->
<BoxContainer Margin="10" Orientation="Horizontal">
<humanoid:SingleMarkingPicker Name="CHairStylePicker" Category="Hair" />
<humanoid:SingleMarkingPicker Name="CFacialHairPicker" Category="FacialHair" />
</BoxContainer>
</prefUi:HighlightedContainer>
<!-- Eyes -->
<BoxContainer Margin="10" Orientation="Vertical">
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Vertical">
<Label Text="{Loc 'humanoid-profile-editor-eyes-label'}" />
<humanoid:EyeColorPicker Name="CEyeColorPicker" />
</BoxContainer>
</prefUi:HighlightedContainer>
<!-- Hair -->
<prefUi:HighlightedContainer>
<BoxContainer Orientation="Horizontal">
<humanoid:SingleMarkingPicker Name="CHairStylePicker" Category="Hair" />
<humanoid:SingleMarkingPicker Name="CFacialHairPicker" Category="FacialHair" />
</BoxContainer>
</prefUi:HighlightedContainer>
<!-- AMOUR -->
<humanoidProfileEditorExt:GenitalBoxView Name="GenitalBoxView"/>
</BoxContainer>
@@ -194,15 +227,7 @@
</ScrollContainer>
</BoxContainer>
</TabContainer>
</BoxContainer>
<!-- Right side -->
<BoxContainer Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True" VerticalAlignment="Center">
<SpriteView Name="CSpriteView" Scale="8 8" SizeFlagsStretchRatio="1" />
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 5">
<Button Name="CSpriteRotateLeft" Text="◀" StyleClasses="OpenRight" />
<cc:VSeparator Margin="2 0 3 0" />
<Button Name="CSpriteRotateRight" Text="▶" StyleClasses="OpenLeft" />
</BoxContainer>
</PanelContainer>
</BoxContainer>
</BoxContainer>
</Control>

View File

@@ -43,7 +43,6 @@ namespace Content.Client.Preferences.UI
{
PanelOverride = new StyleBoxFlat
{
BackgroundColor = new Color(25, 25, 25),
ContentMarginTopOverride = 10,
ContentMarginBottomOverride = 10,
ContentMarginLeftOverride = 10,

View File

@@ -37,7 +37,7 @@
<customControls:HSeparator StyleClasses="LowDivider" Margin="0 0 0 10"/>
<PanelContainer VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
<gfx:StyleBoxFlat BackgroundColor="#212121" />
</PanelContainer.PanelOverride>
<ScrollContainer
HScrollEnabled="False"
@@ -55,7 +55,7 @@
<customControls:HSeparator StyleClasses="LowDivider" Margin="0 0 0 10"/>
<PanelContainer VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
<gfx:StyleBoxFlat BackgroundColor="#212121" />
</PanelContainer.PanelOverride>
<ScrollContainer
HScrollEnabled="False"
@@ -76,7 +76,7 @@
Margin="0 0 10 10">
<PanelContainer VerticalExpand="True" MinSize="0 200">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
<gfx:StyleBoxFlat BackgroundColor="#212121" />
</PanelContainer.PanelOverride>
<ScrollContainer
HScrollEnabled="False"

View File

@@ -19,7 +19,7 @@
<customControls:HSeparator Margin="0 10 0 10"/>
<PanelContainer VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E"/>
<gfx:StyleBoxFlat BackgroundColor="#212121"/>
</PanelContainer.PanelOverride>
<BoxContainer HorizontalAlignment="Center" VerticalAlignment="Center">
<SpriteView Name="BorgSprite" Scale="5 5"/>
@@ -40,7 +40,7 @@
<Label Text="{Loc 'borg-ui-modules-label'}" Margin="0 0 0 5"/>
<PanelContainer VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E"/>
<gfx:StyleBoxFlat BackgroundColor="#212121"/>
</PanelContainer.PanelOverride>
<BoxContainer VerticalExpand="True" Orientation="Vertical">
<ScrollContainer HScrollEnabled="False" HorizontalExpand="True" VerticalExpand="True">

View File

@@ -9,7 +9,7 @@
VerticalExpand="True">
<PanelContainer VerticalExpand="True" Margin="10 10 10 10">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E"/>
<gfx:StyleBoxFlat BackgroundColor="#212121"/>
</PanelContainer.PanelOverride>
<ScrollContainer
HScrollEnabled="False"

View File

@@ -43,20 +43,11 @@ namespace Content.Client.Stylesheets
protected StyleBase(IResourceCache resCache)
{
var wariowareinc = resCache.GetFont
(
new []
{
"/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"
},
12
);
var notoSans12 = resCache.GetFont
(
new []
{
"/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf",
"/Fonts/IBMPlexSans/IBMPlexSans-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf"
},
@@ -66,7 +57,7 @@ namespace Content.Client.Stylesheets
(
new []
{
"/Fonts/IBMPlexMono/IBMPlexMono-Italic.ttf",
"/Fonts/IBMPlexSans/IBMPlexSans-Italic.ttf",
"/Fonts/NotoSans/NotoSansSymbols-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf"
},
@@ -168,7 +159,7 @@ namespace Content.Client.Stylesheets
new SelectorElement(null, null, null, null),
new[]
{
new StyleProperty("font", wariowareinc),
new StyleProperty("font", notoSans12),
}),
// Default font.
@@ -176,7 +167,7 @@ namespace Content.Client.Stylesheets
new SelectorElement(null, new[] {StyleClassItalic}, null, null),
new[]
{
new StyleProperty("font", wariowareinc),
new StyleProperty("font", notoSans12Italic),
}),
// Window close button base texture.
@@ -186,7 +177,7 @@ namespace Content.Client.Stylesheets
new[]
{
new StyleProperty(TextureButton.StylePropertyTexture, textureCloseButton),
new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#1e1e1e")),
new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#9e9e9e")),
}),
// Window close button hover.
new StyleRule(
@@ -202,7 +193,7 @@ namespace Content.Client.Stylesheets
new[] {TextureButton.StylePseudoClassPressed}),
new[]
{
new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#141414")),
new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#050505")),
}),
// Scroll bars

View File

@@ -29,9 +29,9 @@ namespace Content.Client.Stylesheets
// Ew, but ok
new[]
{
$"/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf",
$"/Fonts/IBMPlexSans/IBMPlexSans-{variation}.ttf",
$"/Fonts/NotoSans/NotoSansSymbols-{sv}.ttf",
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf"
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf",
},
size
);
@@ -67,6 +67,7 @@ namespace Content.Client.Stylesheets
public const string StyleClassFuckyWuckyBackground = "FuckyWuckyBackground";
public const string StyleClassGayShitBackground = "GayShitBackground";
public const string StyleClassLobbyGayBackground = "LobbyGayBackground";
public const string StyleLobbyShadedBackground = "LobbyShadedBackground";
public const string StyleClassSliderRed = "Red";
public const string StyleClassSliderGreen = "Green";
@@ -74,6 +75,9 @@ namespace Content.Client.Stylesheets
public const string StyleClassSliderWhite = "White";
public const string StyleClassLabelHeadingBigger = "LabelHeadingBigger";
// WD-EDIT start
public const string StyleClassLabelHeadingFuckingBigger = "LabelHeadingFuckingBigger";
// WD-EDIT end
public const string StyleClassLabelKeyText = "LabelKeyText";
public const string StyleClassLabelSecondaryColor = "LabelSecondaryColor";
public const string StyleClassLabelBig = "LabelBig";
@@ -86,28 +90,28 @@ namespace Content.Client.Stylesheets
public const string StyleClassPopupMessageLarge = "PopupMessageLarge";
public const string StyleClassPopupMessageLargeCaution = "PopupMessageLargeCaution";
public static readonly Color PanelDark = Color.FromHex("#0a0a0a");
public static readonly Color PanelDark = Color.FromHex("#1E1E22");
public static readonly Color NanoGold = Color.FromHex("#76428a");
public static readonly Color GoodGreenFore = Color.FromHex("#006400");
public static readonly Color ConcerningOrangeFore = Color.FromHex("#99461d");
public static readonly Color DangerousRedFore = Color.FromHex("#1e1e1e");
public static readonly Color DisabledFore = Color.FromHex("#5A5A5A");
public static readonly Color NanoGold = Color.FromHex("#c1c3c7");
public static readonly Color GoodGreenFore = Color.FromHex("#618e71");
public static readonly Color ConcerningOrangeFore = Color.FromHex("#f1b959");
public static readonly Color DangerousRedFore = Color.FromHex("#5C4D5B");
public static readonly Color DisabledFore = Color.FromHex("#26292E");
public static readonly Color ButtonColorDefault = Color.FromHex("#232323");
public static readonly Color ButtonColorDefaultRed = Color.FromHex("#640000");
public static readonly Color ButtonColorHovered = Color.FromHex("#2d2d2d");
public static readonly Color ButtonColorHoveredRed = Color.FromHex("#960000");
public static readonly Color ButtonColorPressed = Color.FromHex("#0f0f0f");
public static readonly Color ButtonColorDisabled = Color.FromHex("#0f0f0f");
public static readonly Color ButtonColorDefault = Color.FromHex("#29282f");
public static readonly Color ButtonColorDefaultRed = Color.FromHex("#992327");
public static readonly Color ButtonColorHovered = Color.FromHex("#3f3d48");
public static readonly Color ButtonColorHoveredRed = Color.FromHex("#4D5D53");
public static readonly Color ButtonColorPressed = Color.FromHex("#000000");
public static readonly Color ButtonColorDisabled = Color.FromHex("#000000");
public static readonly Color ButtonColorCautionDefault = Color.FromHex("#99461d");
public static readonly Color ButtonColorCautionHovered = Color.FromHex("#cc5b27");
public static readonly Color ButtonColorCautionPressed = Color.FromHex("#662e13");
public static readonly Color ButtonColorCautionDisabled = Color.FromHex("#33170a");
public static readonly Color ButtonColorCautionDefault = Color.FromHex("#ab3232");
public static readonly Color ButtonColorCautionHovered = Color.FromHex("#cf2f2f");
public static readonly Color ButtonColorCautionPressed = Color.FromHex("#3e6c45");
public static readonly Color ButtonColorCautionDisabled = Color.FromHex("#602a2a");
public static readonly Color ButtonColorGoodDefault = Color.FromHex("#006400");
public static readonly Color ButtonColorGoodHovered = Color.FromHex("#009600");
public static readonly Color ButtonColorGoodDefault = Color.FromHex("#3E6C45");
public static readonly Color ButtonColorGoodHovered = Color.FromHex("#31843E");
public static readonly Color ButtonColorPurpleDefault = Color.FromHex("#4a2eab");
public static readonly Color ButtonColorPurpleHovered = Color.FromHex("#654cbf");
@@ -118,24 +122,24 @@ namespace Content.Client.Stylesheets
public static readonly Color PointMagenta = Color.FromHex("#FF00FF");
// Context menu button colors
public static readonly Color ButtonColorContext = Color.FromHex("#1119");
public static readonly Color ButtonColorContext = Color.FromHex("#26292E99");
public static readonly Color ButtonColorContextHover = Color.FromHex("#6E8476");
public static readonly Color ButtonColorContextPressed = Color.FromHex("#879B8F");
public static readonly Color ButtonColorContextDisabled = Color.FromHex("#262E29");
public static readonly Color ButtonColorContextPressed = Color.FromHex("#878F9B");
public static readonly Color ButtonColorContextDisabled = Color.FromHex("#26292E");
// Examine button colors
public static readonly Color ExamineButtonColorContext = Color.Transparent;
public static readonly Color ExamineButtonColorContextHover = Color.FromHex("#6E8476");
public static readonly Color ExamineButtonColorContextPressed = Color.FromHex("#879B8F");
public static readonly Color ExamineButtonColorContextDisabled = Color.FromHex("#262E29");
public static readonly Color ExamineButtonColorContextPressed = Color.FromHex("#878F9B");
public static readonly Color ExamineButtonColorContextDisabled = Color.FromHex("#26292E");
// UI Panel colors
public static readonly Color PanelColorDark = Color.FromHex("#0f0f0f");
public static readonly Color PanelColorDark = Color.FromHex("#1B1B21");
// Fancy Tree elements
public static readonly Color FancyTreeEvenRowColor = Color.FromHex("#141414");
public static readonly Color FancyTreeOddRowColor = FancyTreeEvenRowColor * new Color(0.8f, 0.9f, 0.8f);
public static readonly Color FancyTreeSelectedRowColor = new Color(55, 80, 68);
public static readonly Color FancyTreeEvenRowColor = Color.FromHex("#31313B");
public static readonly Color FancyTreeOddRowColor = FancyTreeEvenRowColor * new Color(0.8f, 0.8f, 0.8f);
public static readonly Color FancyTreeSelectedRowColor = new Color(55, 55, 55);
//Used by the APC and SMES menus
public const string StyleClassPowerStateNone = "PowerStateNone";
@@ -173,22 +177,27 @@ namespace Content.Client.Stylesheets
var notoSansBold16 = resCache.NotoStack(variation: "Bold", size: 16);
var notoSansBold18 = resCache.NotoStack(variation: "Bold", size: 18);
var notoSansBold20 = resCache.NotoStack(variation: "Bold", size: 20);
var awesomeBigFuckingFont = resCache.NotoStack(variation: "Regular", size: 20);
var notoSansMono = resCache.GetFont("/EngineFonts/NotoSans/NotoSansMono-Regular.ttf", size: 12);
var windowHeaderTex = resCache.GetTexture("/Textures/Interface/Nano/window_header.png");
var windowHeader = new StyleBoxTexture
{
Texture = windowHeaderTex,
PatchMarginBottom = 3,
ExpandMarginBottom = 3,
ContentMarginBottomOverride = 0
ExpandMarginBottom = 2,
ContentMarginBottomOverride = 0,
Mode = StyleBoxTexture.StretchMode.Tile
};
var windowHeaderAlertTex = resCache.GetTexture("/Textures/Interface/Nano/window_header_alert.png");
var windowHeaderAlert = new StyleBoxTexture
{
Texture = windowHeaderAlertTex,
PatchMarginBottom = 3,
ExpandMarginBottom = 3,
ContentMarginBottomOverride = 0
ExpandMarginBottom = 2,
ContentMarginBottomOverride = 0,
Mode = StyleBoxTexture.StretchMode.Tile
};
var windowBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/gay_shit.png");
var windowBackground = new StyleBoxTexture
@@ -196,7 +205,7 @@ namespace Content.Client.Stylesheets
Texture = windowBackgroundTex,
Mode = StyleBoxTexture.StretchMode.Tile
};
windowBackground.SetPatchMargin(StyleBox.Margin.All, 2);
windowBackground.SetPatchMargin(StyleBox.Margin.All, 6);
windowBackground.SetExpandMargin(StyleBox.Margin.All, -1);
var borderedWindowBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/window_background_bordered.png");
@@ -204,7 +213,8 @@ namespace Content.Client.Stylesheets
{
Texture = borderedWindowBackgroundTex,
};
borderedWindowBackground.SetPatchMargin(StyleBox.Margin.All, 2);
borderedWindowBackground.SetPatchMargin(StyleBox.Margin.All, 3);
borderedWindowBackground.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
var fuckyWuckyBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/fucky_wucky.png");
var fuckyWuckyBackground = new StyleBoxTexture
@@ -217,6 +227,16 @@ namespace Content.Client.Stylesheets
fuckyWuckyBackground.SetExpandMargin(StyleBox.Margin.All, -4);
fuckyWuckyBackground.SetContentMarginOverride(StyleBox.Margin.All, 8);
var lobbyShadedBackground = new StyleBoxTexture
{
Texture = resCache.GetTexture("/Textures/Interface/Nano/shaded_lobby.png"),
Mode = StyleBoxTexture.StretchMode.Tile
};
lobbyShadedBackground.SetPatchMargin(StyleBox.Margin.All, 4);
lobbyShadedBackground.SetExpandMargin(StyleBox.Margin.All, -4);
lobbyShadedBackground.SetContentMarginOverride(StyleBox.Margin.All, 4);
var gayShitBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/gay_shit.png");
var gayShitBackground = new StyleBoxTexture
{
@@ -224,7 +244,7 @@ namespace Content.Client.Stylesheets
Mode = StyleBoxTexture.StretchMode.Tile
};
gayShitBackground.SetPatchMargin(StyleBox.Margin.All, 2);
gayShitBackground.SetPatchMargin(StyleBox.Margin.All, 6);
gayShitBackground.SetExpandMargin(StyleBox.Margin.All, -2);
var lobbyGayBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/lobby_gay.png");
@@ -242,7 +262,8 @@ namespace Content.Client.Stylesheets
{
Texture = borderedWindowBackgroundTex,
};
contextMenuBackground.SetPatchMargin(StyleBox.Margin.All, ContextMenuElement.ElementMargin);
contextMenuBackground.SetPatchMargin(StyleBox.Margin.All, 3);
contextMenuBackground.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
var invSlotBgTex = resCache.GetTexture("/Textures/Interface/Inventory/inv_slot_background.png");
var invSlotBg = new StyleBoxTexture
@@ -264,7 +285,7 @@ namespace Content.Client.Stylesheets
{
Texture = borderedTransparentWindowBackgroundTex,
};
borderedTransparentWindowBackground.SetPatchMargin(StyleBox.Margin.All, 2);
borderedTransparentWindowBackground.SetPatchMargin(StyleBox.Margin.All, 3);
var hotbarBackground = new StyleBoxTexture
{
@@ -286,7 +307,7 @@ namespace Content.Client.Stylesheets
{
Texture = buttonRectTex
};
buttonRect.SetPatchMargin(StyleBox.Margin.All, 2);
buttonRect.SetPatchMargin(StyleBox.Margin.All, 3);
buttonRect.SetPadding(StyleBox.Margin.All, 2);
buttonRect.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
buttonRect.SetContentMarginOverride(StyleBox.Margin.Horizontal, 2);
@@ -312,7 +333,7 @@ namespace Content.Client.Stylesheets
{
Texture = buttonRectActionMenuItemTex
};
buttonRectActionMenuItem.SetPatchMargin(StyleBox.Margin.All, 2);
buttonRectActionMenuItem.SetPatchMargin(StyleBox.Margin.All, 3);
buttonRectActionMenuItem.SetPadding(StyleBox.Margin.All, 2);
buttonRectActionMenuItem.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
buttonRectActionMenuItem.SetContentMarginOverride(StyleBox.Margin.Horizontal, 2);
@@ -387,7 +408,7 @@ namespace Content.Client.Stylesheets
{
Texture = chatSubBGTex,
};
chatSubBG.SetPatchMargin(StyleBox.Margin.All, 2);
chatSubBG.SetPatchMargin(StyleBox.Margin.All, 3);
var actionSearchBoxTex = resCache.GetTexture("/Textures/Interface/Nano/black_panel_dark_thin_border.png");
var actionSearchBox = new StyleBoxTexture
@@ -401,23 +422,44 @@ namespace Content.Client.Stylesheets
var tabContainerPanel = new StyleBoxTexture
{
Texture = tabContainerPanelTex,
// WD-EDIT start
Mode = StyleBoxTexture.StretchMode.Tile
// WD-EDIT end
};
tabContainerPanel.SetPatchMargin(StyleBox.Margin.All, 2);
tabContainerPanel.SetPatchMargin(StyleBox.Margin.All, 3);
// WD-EDIT start
tabContainerPanel.SetExpandMargin(StyleBox.Margin.All, -3);
// WD-EDIT end
var tabContainerBoxActive = new StyleBoxFlat {BackgroundColor = new Color(64, 80, 64)};
tabContainerBoxActive.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
var tabContainerBoxInactive = new StyleBoxFlat {BackgroundColor = new Color(32, 40, 32)};
tabContainerBoxInactive.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
var tabContainerBoxActive = new StyleBoxTexture
{
Texture = resCache.GetTexture("/Textures/Interface/Nano/button.svg.96dpi.png"),
Modulate = ButtonColorDefault
};
tabContainerBoxActive.SetPatchMargin(StyleBox.Margin.All, 10);
tabContainerBoxActive.SetPadding(StyleBox.Margin.All, 1);
tabContainerBoxActive.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
tabContainerBoxActive.SetContentMarginOverride(StyleBox.Margin.Horizontal, 14);
var tabContainerBoxInactive = new StyleBoxTexture
{
Texture = resCache.GetTexture("/Textures/Interface/Nano/button.svg.96dpi.png"),
Modulate = ButtonColorPressed
};
tabContainerBoxInactive.SetPatchMargin(StyleBox.Margin.All, 10);
tabContainerBoxInactive.SetPadding(StyleBox.Margin.All, 1);
tabContainerBoxInactive.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
tabContainerBoxInactive.SetContentMarginOverride(StyleBox.Margin.Horizontal, 14);
var progressBarBackground = new StyleBoxFlat
{
BackgroundColor = new Color(0.25f, 0.35f, 0.25f)
BackgroundColor = new Color(0.25f, 0.25f, 0.25f)
};
progressBarBackground.SetContentMarginOverride(StyleBox.Margin.Vertical, 14.5f);
var progressBarForeground = new StyleBoxFlat
{
BackgroundColor = new Color(0.25f, 0.50f, 0.25f)
BackgroundColor = new Color(0.25f, 0.25f, 0.25f)
};
progressBarForeground.SetContentMarginOverride(StyleBox.Margin.Vertical, 14.5f);
@@ -431,8 +473,8 @@ namespace Content.Client.Stylesheets
{
Texture = tooltipTexture,
};
tooltipBox.SetPatchMargin(StyleBox.Margin.All, 2);
tooltipBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 7);
tooltipBox.SetPatchMargin(StyleBox.Margin.All, 3);
tooltipBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 3);
// Whisper box
var whisperTexture = resCache.GetTexture("/Textures/Interface/Nano/whisper.png");
@@ -440,7 +482,7 @@ namespace Content.Client.Stylesheets
{
Texture = whisperTexture,
};
whisperBox.SetPatchMargin(StyleBox.Margin.All, 2);
whisperBox.SetPatchMargin(StyleBox.Margin.All, 3);
whisperBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 7);
// Placeholder
@@ -450,7 +492,7 @@ namespace Content.Client.Stylesheets
placeholder.SetExpandMargin(StyleBox.Margin.All, -5);
placeholder.Mode = StyleBoxTexture.StretchMode.Tile;
var itemListBackgroundSelected = new StyleBoxFlat {BackgroundColor = new Color(25, 25, 25)};
var itemListBackgroundSelected = new StyleBoxFlat {BackgroundColor = new Color(55, 55, 55)};
itemListBackgroundSelected.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
itemListBackgroundSelected.SetContentMarginOverride(StyleBox.Margin.Horizontal, 4);
var itemListItemBackgroundDisabled = new StyleBoxFlat {BackgroundColor = new Color(10, 10, 10)};
@@ -492,6 +534,10 @@ namespace Content.Client.Stylesheets
Mode = StyleBoxTexture.StretchMode.Tile
};
stripeBack.SetPatchMargin(StyleBox.Margin.All, 2);
stripeBack.SetPatchMargin(StyleBox.Margin.Top, 3);
stripeBack.SetPatchMargin(StyleBox.Margin.Bottom, 3);
// Slider
var sliderOutlineTex = resCache.GetTexture("/Textures/Interface/Nano/slider_outline.svg.96dpi.png");
var sliderFillTex = resCache.GetTexture("/Textures/Interface/Nano/slider_fill.svg.96dpi.png");
@@ -500,13 +546,13 @@ namespace Content.Client.Stylesheets
var sliderFillBox = new StyleBoxTexture
{
Texture = sliderFillTex,
Modulate = Color.FromHex("#141414")
Modulate = Color.FromHex("#050505")
};
var sliderBackBox = new StyleBoxTexture
{
Texture = sliderFillTex,
Modulate = Color.FromHex("#1B211D")
Modulate = Color.FromHex("#1b1b1b")
};
var sliderForeBox = new StyleBoxTexture
@@ -520,10 +566,10 @@ namespace Content.Client.Stylesheets
Texture = sliderGrabTex
};
sliderFillBox.SetPatchMargin(StyleBox.Margin.All, 12);
sliderBackBox.SetPatchMargin(StyleBox.Margin.All, 12);
sliderForeBox.SetPatchMargin(StyleBox.Margin.All, 12);
sliderGrabBox.SetPatchMargin(StyleBox.Margin.All, 12);
sliderFillBox.SetPatchMargin(StyleBox.Margin.All, 13);
sliderBackBox.SetPatchMargin(StyleBox.Margin.All, 13);
sliderForeBox.SetPatchMargin(StyleBox.Margin.All, 13);
sliderGrabBox.SetPatchMargin(StyleBox.Margin.All, 13);
var sliderFillGreen = new StyleBoxTexture(sliderFillBox) {Modulate = Color.LimeGreen};
var sliderFillRed = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Red};
@@ -589,6 +635,13 @@ namespace Content.Client.Stylesheets
{
new StyleProperty(PanelContainer.StylePropertyPanel, fuckyWuckyBackground),
}),
// Lobby shaded background.
new StyleRule(
new SelectorElement(null, new[] {StyleLobbyShadedBackground}, null, null),
new[]
{
new StyleProperty(PanelContainer.StylePropertyPanel, lobbyShadedBackground),
}),
// Panel background.
new StyleRule(
new SelectorElement(null, new[] {StyleClassGayShitBackground}, null, null),
@@ -1114,6 +1167,16 @@ namespace Content.Client.Stylesheets
new StyleProperty(Label.StylePropertyFontColor, NanoGold),
}),
// WD-EDIT start
// Fucking big Label
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelHeadingFuckingBigger}, null, null),
new[]
{
new StyleProperty(Label.StylePropertyFont, awesomeBigFuckingFont),
new StyleProperty(Label.StylePropertyFontColor, NanoGold),
}),
// WD-EDIT end
// Small Label
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelSubText}, null, null), new[]
{
@@ -1364,17 +1427,17 @@ namespace Content.Client.Stylesheets
new StyleRule(new SelectorElement(typeof(PanelContainer), new []{ ClassHighDivider}, null, null), new []
{
new StyleProperty(PanelContainer.StylePropertyPanel, new StyleBoxFlat { BackgroundColor = NanoGold, ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2}),
new StyleProperty(PanelContainer.StylePropertyPanel, new StyleBoxFlat { BackgroundColor = ButtonColorHovered, ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2}),
}),
Element<PanelContainer>().Class(ClassAngleRect)
.Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#141414")),
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#050505")),
Element<PanelContainer>().Class(ClassLowDivider)
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat
{
BackgroundColor = Color.FromHex("#303530"),
BackgroundColor = Color.FromHex("#303030"),
ContentMarginLeftOverride = 2,
ContentMarginBottomOverride = 2
}),
@@ -1398,16 +1461,16 @@ namespace Content.Client.Stylesheets
Element<PanelContainer>().Class("PanelBackgroundLight")
.Prop("panel", new StyleBoxTexture(BaseButtonOpenBoth) { Padding = default })
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#2F2F3B")),
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#2F2F2F")),
// Window Footer
Element<TextureRect>().Class("NTLogoDark")
.Prop(TextureRect.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Nano/ntlogo.svg.png"))
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#7A9082")),
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#909090")),
Element<Label>().Class("WindowFooterText")
.Prop(Label.StylePropertyFont, notoSans8)
.Prop(Label.StylePropertyFontColor, Color.FromHex("#7A9082")),
.Prop(Label.StylePropertyFontColor, Color.FromHex("#909090")),
Element<PanelContainer>().Class("PanelBackgroundAngledDark")
.Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
@@ -1490,7 +1553,7 @@ namespace Content.Client.Stylesheets
//PDA - Backgrounds
Element<PanelContainer>().Class("PdaContentBackground")
.Prop(PanelContainer.StylePropertyPanel, BaseButtonOpenBoth)
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#141414")),
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#050505")),
Element<PanelContainer>().Class("PdaBackground")
.Prop(PanelContainer.StylePropertyPanel, BaseButtonOpenBoth)
@@ -1498,13 +1561,13 @@ namespace Content.Client.Stylesheets
Element<PanelContainer>().Class("PdaBackgroundRect")
.Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#7A9082")),
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#909090")),
Element<PanelContainer>().Class("PdaBorderRect")
.Prop(PanelContainer.StylePropertyPanel, AngleBorderRect),
Element<PanelContainer>().Class("BackgroundDark")
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat(Color.FromHex("#141414"))),
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat(Color.FromHex("#050505"))),
//PDA - Buttons
Element<PdaSettingsButton>().Pseudo(ContainerButton.StylePseudoClassNormal)
@@ -1535,11 +1598,11 @@ namespace Content.Client.Stylesheets
//PDA - Text
Element<Label>().Class("PdaContentFooterText")
.Prop(Label.StylePropertyFont, notoSans10)
.Prop(Label.StylePropertyFontColor, Color.FromHex("#7A9082")),
.Prop(Label.StylePropertyFontColor, Color.FromHex("#909090")),
Element<Label>().Class("PdaWindowFooterText")
.Prop(Label.StylePropertyFont, notoSans10)
.Prop(Label.StylePropertyFontColor, Color.FromHex("#4D5D53")),
.Prop(Label.StylePropertyFontColor, Color.FromHex("#505050")),
// Fancy Tree
Element<ContainerButton>().Identifier(TreeItem.StyleIdentifierTreeButton)

View File

@@ -12,10 +12,10 @@ namespace Content.Client.Stylesheets
{
public static readonly Color SpaceRed = Color.FromHex("#960000");
public static readonly Color ButtonColorDefault = Color.FromHex("#232323");
public static readonly Color ButtonColorHovered = Color.FromHex("#2d2d2d");
public static readonly Color ButtonColorPressed = Color.FromHex("#0f0f0f");
public static readonly Color ButtonColorDisabled = Color.FromHex("#0f0f0f");
public static readonly Color ButtonColorDefault = Color.FromHex("#333333");
public static readonly Color ButtonColorHovered = Color.FromHex("#444444");
public static readonly Color ButtonColorPressed = Color.FromHex("#3e6c45");
public static readonly Color ButtonColorDisabled = Color.FromHex("#30313c");
public static readonly Color ButtonColorCautionDefault = Color.FromHex("#640000");
public static readonly Color ButtonColorCautionHovered = Color.FromHex("#960000");
@@ -26,15 +26,6 @@ namespace Content.Client.Stylesheets
public StyleSpace(IResourceCache resCache) : base(resCache)
{
var whiteRabbit = resCache.GetFont
(
new []
{
"/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"
},
10
);
var notoSans10 = resCache.GetFont
(
new []
@@ -64,7 +55,7 @@ namespace Content.Client.Stylesheets
var progressBarForeground = new StyleBoxFlat
{
BackgroundColor = new Color(0.25f, 0.50f, 0.25f)
BackgroundColor = new Color(0.25f, 0.25f, 0.25f)
};
progressBarForeground.SetContentMarginOverride(StyleBox.Margin.Vertical, 14.5f);
@@ -81,11 +72,11 @@ namespace Content.Client.Stylesheets
Stylesheet = new Stylesheet(BaseRules.Concat(new StyleRule[]
{
Element<Label>().Class(StyleClassLabelHeading)
.Prop(Label.StylePropertyFont, whiteRabbit)
.Prop(Label.StylePropertyFont, notoSansBold16)
.Prop(Label.StylePropertyFontColor, SpaceRed),
Element<Label>().Class(StyleClassLabelSubText)
.Prop(Label.StylePropertyFont, whiteRabbit)
.Prop(Label.StylePropertyFont, notoSans10)
.Prop(Label.StylePropertyFontColor, Color.DarkGray),
Element<PanelContainer>().Class(ClassHighDivider)

View File

@@ -21,7 +21,8 @@ public sealed class MenuButton : ContainerButton
private static readonly Color ColorRedHovered = Color.FromHex("#960000");
private static readonly Color ColorPressed = Color.FromHex("#464646");
private const float VertPad = 8f;
private const float HorPad = 8f;
private const float VerPad = 4f;
private Color NormalColor => HasStyleClass(StyleClassRedTopButton) ? ColorRedNormal : ColorNormal;
private Color HoveredColor => HasStyleClass(StyleClassRedTopButton) ? ColorRedHovered : ColorHovered;
@@ -50,11 +51,11 @@ public sealed class MenuButton : ContainerButton
IoCManager.InjectDependencies(this);
_buttonIcon = new TextureRect()
{
TextureScale = new Vector2(0.5f, 0.5f),
TextureScale = new Vector2(1f, 1f),
HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center,
VerticalExpand = true,
Margin = new Thickness(0, VertPad),
Margin = new Thickness(HorPad, VerPad),
ModulateSelfOverride = NormalColor,
Stretch = TextureRect.StretchMode.KeepCentered
};
@@ -67,7 +68,7 @@ public sealed class MenuButton : ContainerButton
};
_root = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Vertical,
Orientation = BoxContainer.LayoutOrientation.Horizontal,
Children =
{
_buttonIcon,

View File

@@ -1,6 +1,7 @@
using System.Numerics;
using Content.Client.UserInterface.Systems.Chat.Widgets;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
namespace Content.Client.UserInterface.Screens;

View File

@@ -27,8 +27,6 @@
<alerts:AlertsUI Name="Alerts" Access="Protected" />
</LayoutContainer>
<PanelContainer HorizontalExpand="True" MinWidth="300" StyleClasses="GayShitBackground">
<BoxContainer Orientation="Vertical" HorizontalExpand="True" SeparationOverride="10" Margin="10">
<menuBar:GameTopMenuBar Name="TopBar" HorizontalExpand="True" Access="Protected" />
<chat:ChatBox VerticalExpand="True" HorizontalExpand="True" Name="Chat" Access="Protected" MinSize="0 0"/>

View File

@@ -41,7 +41,7 @@ namespace Content.Client.UserInterface.Systems.Atmos.GasTank
var back = new StyleBoxTexture
{
Texture = panelTex,
Modulate = Color.FromHex("#141414"),
Modulate = Color.FromHex("#050505"),
};
back.SetPatchMargin(StyleBox.Margin.All, 10);

View File

@@ -302,8 +302,7 @@ public sealed class ChatUIController : UIController
chatSize = Vector2Utils.ParseVector2FromString(chatSizeRaw, ';');
//БЛЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯТЬ
if (chatSize.X <= 0 || chatSize.Y <= 0 || chatSize.X > 1000 || chatSize.Y > 1000)
if (chatSize.X <= 0 || chatSize.X > 1000 || chatSize.Y >= 0)
{
chatSize = Vector2Utils.ParseVector2FromString(WhiteCVars.DefaultChatSize.DefaultValue, ';');
_config.SetCVar(WhiteCVars.DefaultChatSize, WhiteCVars.DefaultChatSize.DefaultValue);

View File

@@ -7,11 +7,7 @@
HorizontalExpand="True"
VerticalExpand="True"
MinSize="465 225">
<PanelContainer HorizontalExpand="True" VerticalExpand="True">
<PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BackgroundColor="#141414AA" />
</PanelContainer.PanelOverride>
<PanelContainer HorizontalExpand="True" VerticalExpand="True" StyleClasses="FuckyWuckyBackground" >
<BoxContainer Orientation="Vertical" SeparationOverride="4" HorizontalExpand="True" VerticalExpand="True">
<OutputPanel Name="Contents" HorizontalExpand="True" VerticalExpand="True" Margin="2 2 2 2" >
<OutputPanel.StyleBoxOverride>

View File

@@ -8,18 +8,19 @@
xmlns:widgets="clr-namespace:Content.Client.UserInterface.Systems.MenuBar.Widgets"
Name = "MenuButtons"
VerticalExpand="False"
Orientation="Horizontal"
Orientation="Vertical"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
SeparationOverride="0"
>
<BoxContainer Orientation="Horizontal">
<ui:MenuButton
Name="EscapeButton"
Access="Internal"
Icon="{xe:Tex '/Textures/Interface/hamburger.svg.192dpi.png'}"
BoundKey = "{x:Static ic:EngineKeyFunctions.EscapeMenu}"
ToolTip="{Loc 'game-hud-open-escape-menu-button-tooltip'}"
MinSize="70 64"
MinSize="96 32"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonOpenRight}"
/>
@@ -29,7 +30,7 @@
Icon="{xe:Tex '/Textures/Interface/VerbIcons/information.svg.192dpi.png'}"
ToolTip="{Loc 'game-hud-open-guide-menu-button-tooltip'}"
BoundKey = "{x:Static is:ContentKeyFunctions.OpenGuidebook}"
MinSize="42 64"
MinSize="96 32"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
/>
@@ -39,7 +40,7 @@
Icon="{xe:Tex '/Textures/Interface/character.svg.192dpi.png'}"
ToolTip="{Loc 'game-hud-open-character-menu-button-tooltip'}"
BoundKey = "{x:Static is:ContentKeyFunctions.OpenCharacterMenu}"
MinSize="42 64"
MinSize="96 32"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
/>
@@ -49,19 +50,31 @@
Icon="{xe:Tex '/Textures/Interface/emotions.svg.192dpi.png'}"
ToolTip="{Loc 'game-hud-open-emotions-menu-button-tooltip'}"
BoundKey = "{x:Static is:ContentKeyFunctions.OpenEmotionsMenu}"
MinSize="42 64"
MinSize="96 32"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
/>
<ui:MenuButton
Name="InventoryButton"
Access="Internal"
Icon="{xe:Tex '/Textures/Interface/inventory.svg.192dpi.png'}"
BoundKey = "{x:Static is:ContentKeyFunctions.OpenInventoryMenu}"
ToolTip="{Loc 'game-hud-open-inventory-menu-button-tooltip'}"
MinSize="96 32"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonOpenLeft}"
/>
</BoxContainer>
<BoxContainer Orientation="Horizontal">
<ui:MenuButton
Name="CraftingButton"
Access="Internal"
Icon="{xe:Tex '/Textures/Interface/hammer.svg.192dpi.png'}"
BoundKey = "{x:Static is:ContentKeyFunctions.OpenCraftingMenu}"
ToolTip="{Loc 'game-hud-open-crafting-menu-button-tooltip'}"
MinSize="42 64"
MinSize="96 32"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
AppendStyleClass="{x:Static style:StyleBase.ButtonOpenRight}"
/>
<ui:MenuButton
Name="ActionButton"
@@ -69,7 +82,7 @@
Icon="{xe:Tex '/Textures/Interface/fist.svg.192dpi.png'}"
BoundKey = "{x:Static is:ContentKeyFunctions.OpenActionsMenu}"
ToolTip="{Loc 'game-hud-open-actions-menu-button-tooltip'}"
MinSize="42 64"
MinSize="96 32"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
/>
@@ -79,7 +92,7 @@
Icon="{xe:Tex '/Textures/Interface/gavel.svg.192dpi.png'}"
BoundKey = "{x:Static is:ContentKeyFunctions.OpenAdminMenu}"
ToolTip="{Loc 'game-hud-open-admin-menu-button-tooltip'}"
MinSize="42 64"
MinSize="96 32"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
/>
@@ -89,14 +102,14 @@
Icon="{xe:Tex '/Textures/Interface/sandbox.svg.192dpi.png'}"
BoundKey = "{x:Static is:ContentKeyFunctions.OpenSandboxWindow}"
ToolTip="{Loc 'game-hud-open-sandbox-menu-button-tooltip'}"
MinSize="42 64"
MinSize="96 32"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
/>
<ui:MenuButton
Name="MeatyOreButton"
Access="Internal"
MinSize="42 64"
MinSize="96 32"
HorizontalExpand="True"
Icon="{xe:Tex '/Textures/Interface/meatyore-shop-icon.png'}"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
@@ -109,8 +122,9 @@
Icon="{xe:Tex '/Textures/Interface/info.svg.192dpi.png'}"
BoundKey = "{x:Static is:ContentKeyFunctions.OpenAHelp}"
ToolTip="{Loc 'ui-options-function-open-a-help'}"
MinSize="42 64"
MinSize="96 32"
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonOpenLeft}"
/>
</BoxContainer>
</widgets:GameTopMenuBar>

View File

@@ -185,7 +185,8 @@ public sealed partial class GunSystem
container.AddChild(new TextureRect
{
Texture = texture,
ModulateSelfOverride = altColor ? colorGoneA : colorGoneB
ModulateSelfOverride = altColor ? colorGoneA : colorGoneB,
Margin = new(0, 0, -8, 0)
});
altColor ^= true;
@@ -196,7 +197,8 @@ public sealed partial class GunSystem
container.AddChild(new TextureRect
{
Texture = texture,
ModulateSelfOverride = altColor ? colorA : colorB
ModulateSelfOverride = altColor ? colorA : colorB,
Margin = new(0, 0, -8, 0)
});
altColor ^= true;
@@ -333,7 +335,7 @@ public sealed partial class GunSystem
}),
(_noMagazineLabel = new Label
{
Text = "No Magazine!",
Text = "Нет магазина!",
StyleClasses = {StyleNano.StyleClassItemStatus}
})
}
@@ -389,7 +391,8 @@ public sealed partial class GunSystem
{
Texture = texture,
ModulateSelfOverride = altColor ? colorGoneA : colorGoneB,
Stretch = TextureRect.StretchMode.KeepCentered
Stretch = TextureRect.StretchMode.KeepCentered,
Margin = new(0, 0, -8, 0)
});
altColor ^= true;
@@ -403,7 +406,8 @@ public sealed partial class GunSystem
{
Texture = texture,
ModulateSelfOverride = altColor ? colorA : colorB,
Stretch = TextureRect.StretchMode.KeepCentered
Stretch = TextureRect.StretchMode.KeepCentered,
Margin = new(0, 0, -8, 0)
});
altColor ^= true;
@@ -504,6 +508,7 @@ public sealed partial class GunSystem
Stretch = TextureRect.StretchMode.KeepCentered,
Texture = bulletTexture,
ModulateSelfOverride = color,
Margin = new(0, 0, -8, 0)
});
altColor ^= true;
container.AddChild(box);

View File

@@ -1,4 +1,5 @@
using System.Numerics;
using Content.Client.Gameplay;
using Content.Client.Items;
using Content.Client.Weapons.Ranged.Components;
using Content.Shared.Camera;
@@ -12,13 +13,13 @@ using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Input;
using Robust.Client.Player;
using Robust.Client.State;
using Robust.Shared.Animations;
using Robust.Shared.Input;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Spawners;
using Robust.Shared.Utility;
using SharedGunSystem = Content.Shared.Weapons.Ranged.Systems.SharedGunSystem;
using TimedDespawnComponent = Robust.Shared.Spawners.TimedDespawnComponent;
namespace Content.Client.Weapons.Ranged.Systems;
@@ -31,6 +32,7 @@ public sealed partial class GunSystem : SharedGunSystem
[Dependency] private readonly InputSystem _inputSystem = default!;
[Dependency] private readonly SharedCameraRecoilSystem _recoil = default!;
[Dependency] private readonly IComponentFactory _factory = default!;
[Dependency] private readonly IStateManager _state = default!;
[ValidatePrototypeId<EntityPrototype>]
public const string HitscanProto = "HitscanEffect";
@@ -184,9 +186,15 @@ public sealed partial class GunSystem : SharedGunSystem
// WD EDIT END
Log.Debug($"Sending shoot request tick {Timing.CurTick} / {Timing.CurTime}");
//Set the target entity that is directly clicked on.
EntityUid? shootingTarget = null;
if (_state.CurrentState is GameplayStateBase screen)
shootingTarget = screen.GetClickedEntity(mousePos);
EntityManager.RaisePredictiveEvent(new RequestShootEvent
{
Target = GetNetEntity(shootingTarget),
Coordinates = GetNetCoordinates(coordinates),
Gun = GetNetEntity(gunUid),
});

View File

@@ -49,7 +49,7 @@ namespace Content.Client.Wires.UI
var back = new StyleBoxTexture
{
Texture = panelTex,
Modulate = Color.FromHex("#141414")
Modulate = Color.FromHex("#050505")
};
back.SetPatchMargin(StyleBox.Margin.All, 10);

View File

@@ -0,0 +1,67 @@
using System.Linq;
using Content.Client.IconSmoothing;
using Content.Client.Interactable.Components;
using Content.Shared._White.Cult.Components;
using Robust.Client.GameObjects;
namespace Content.Client._White.Cult.Concealable;
public sealed class ConcealableVisualizer : VisualizerSystem<ConcealableComponent>
{
[Dependency] private readonly IconSmoothSystem _smooth = default!;
protected override void OnAppearanceChange(EntityUid uid, ConcealableComponent component, ref AppearanceChangeEvent args)
{
base.OnAppearanceChange(uid, component, ref args);
if (args.Sprite == null)
return;
if (!AppearanceSystem.TryGetData<bool>(uid, ConcealableAppearance.Concealed, out var concealed, args.Component))
return;
if (component.IconSmooth)
_smooth.SetEnabled(uid, concealed);
if (component.InteractionOutline)
{
if (concealed)
{
if (TryComp(uid, out InteractionOutlineComponent? outline))
{
outline.OnMouseLeave(uid);
RemComp<InteractionOutlineComponent>(uid);
}
}
else
EnsureComp<InteractionOutlineComponent>(uid);
}
if (concealed)
{
if (component.ConcealedSprite != null)
{
for (var i = 0; i < args.Sprite.AllLayers.Count(); i++)
{
args.Sprite.LayerSetRSI(i, component.ConcealedSprite.Value);
}
return;
}
args.Sprite.Color = args.Sprite.Color.WithAlpha(0f);
}
else
{
if (component.RevealedSprite != null)
{
for (var i = 0; i < args.Sprite.AllLayers.Count(); i++)
{
args.Sprite.LayerSetRSI(i, component.RevealedSprite.Value);
}
return;
}
args.Sprite.Color = args.Sprite.Color.WithAlpha(1f);
}
}
}

View File

@@ -1,4 +1,5 @@
using Content.Shared._White.Cult;
using Content.Shared._White.Cult.Components;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Player;
@@ -20,10 +21,15 @@ public sealed class ShowCultHudSystem : EntitySystem
SubscribeLocalEvent<CultistComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<CultistComponent, PlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<ShowCultHudComponent, ComponentInit>(OnComponentInit);
SubscribeLocalEvent<ShowCultHudComponent, ComponentRemove>(OnComponentRemoved);
SubscribeLocalEvent<ShowCultHudComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<ShowCultHudComponent, PlayerDetachedEvent>(OnPlayerDetached);
_overlay = new CultHudOverlay(EntityManager);
}
private void OnComponentInit(EntityUid uid, CultistComponent component, ComponentInit args)
private void OnComponentInit(EntityUid uid, ShowCultHudComponent component, ComponentInit args)
{
if (_player.LocalSession?.AttachedEntity != uid)
return;
@@ -32,7 +38,7 @@ public sealed class ShowCultHudSystem : EntitySystem
}
private void OnComponentRemoved(EntityUid uid, CultistComponent component, ComponentRemove args)
private void OnComponentRemoved(EntityUid uid, ShowCultHudComponent component, ComponentRemove args)
{
if (_player.LocalSession?.AttachedEntity != uid)
return;
@@ -41,7 +47,7 @@ public sealed class ShowCultHudSystem : EntitySystem
}
private void OnPlayerAttached(EntityUid uid, CultistComponent component, PlayerAttachedEvent args)
private void OnPlayerAttached(EntityUid uid, ShowCultHudComponent component, PlayerAttachedEvent args)
{
if (_player.LocalSession != args.Player)
return;
@@ -49,7 +55,7 @@ public sealed class ShowCultHudSystem : EntitySystem
_overlayManager.AddOverlay(_overlay);
}
private void OnPlayerDetached(EntityUid uid, CultistComponent component, PlayerDetachedEvent args)
private void OnPlayerDetached(EntityUid uid, ShowCultHudComponent component, PlayerDetachedEvent args)
{
if (_player.LocalSession != args.Player)
return;

View File

@@ -0,0 +1,45 @@
using Content.Client.Eui;
using Content.Client.Ghost.UI;
using Content.Shared._White.Cult.UI;
using JetBrains.Annotations;
using Robust.Client.Graphics;
namespace Content.Client._White.Cult.UI.ApocalypseRuneEui;
[UsedImplicitly]
public sealed class ApocalypseRuneEui : BaseEui
{
private readonly ApocalypseRuneMenu _menu;
public ApocalypseRuneEui()
{
_menu = new ApocalypseRuneMenu();
_menu.DenyButton.OnPressed += _ =>
{
SendMessage(new ApocalypseRuneDrawMessage(false));
_menu.Close();
};
_menu.AcceptButton.OnPressed += _ =>
{
SendMessage(new ApocalypseRuneDrawMessage(true));
_menu.Close();
};
}
public override void Opened()
{
IoCManager.Resolve<IClyde>().RequestWindowAttention();
_menu.OpenCentered();
}
public override void Closed()
{
base.Closed();
SendMessage(new ApocalypseRuneDrawMessage(false));
_menu.Close();
}
}

View File

@@ -0,0 +1,60 @@
using System.Numerics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Ghost.UI;
public sealed class ApocalypseRuneMenu : DefaultWindow
{
public readonly Button DenyButton;
public readonly Button AcceptButton;
public ApocalypseRuneMenu()
{
Title = Loc.GetString("apocalypse-rune-title");
Contents.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
{
new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
{
(new Label()
{
Text = Loc.GetString("apocalypse-rune-text")
}),
new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
Align = AlignMode.Center,
Children =
{
(AcceptButton = new Button
{
Text = Loc.GetString("apocalypse-rune-accept-button"),
}),
(new Control()
{
MinSize = new Vector2(20, 0)
}),
(DenyButton = new Button
{
Text = Loc.GetString("apocalypse-rune-deny-button"),
})
}
},
}
},
}
});
}
}

View File

@@ -32,6 +32,8 @@ public sealed class CultistFactoryBUI : BoundUserInterface
_radialContainer = new RadialContainer();
_radialContainer.Closed += Close;
if (State != null)
UpdateState(State);
}

View File

@@ -1,4 +1,5 @@
using Robust.Client.AutoGenerated;
using Content.Client.Lathe.UI;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
@@ -7,19 +8,21 @@ using Robust.Shared.Prototypes;
namespace Content.Client._White.Cult.UI.ListViewSelector;
[GenerateTypedNameReferences]
public partial class ListViewSelectorWindow : DefaultWindow
public sealed partial class ListViewSelectorWindow : DefaultWindow
{
public Action<string, int>? ItemSelected;
private readonly IPrototypeManager _prototypeManager;
public string TooltipText = string.Empty;
public ListViewSelectorWindow(IPrototypeManager prototypeManager)
{
RobustXamlLoader.Load(this);
_prototypeManager = prototypeManager;
}
public void PopulateList(List<string> items, bool isPrototypes)
public void PopulateList(List<EntProtoId> items, bool isPrototypes)
{
ItemsContainer.RemoveAllChildren();
@@ -27,16 +30,16 @@ public partial class ListViewSelectorWindow : DefaultWindow
{
var button = new Button();
var itemName = Loc.GetString($"ent-{item}");
var itemDesc = string.Empty;
if (isPrototypes)
{
if (_prototypeManager.TryIndex<EntityPrototype>(item, out var itemPrototype))
if (isPrototypes && _prototypeManager.TryIndex<EntityPrototype>(item, out var itemPrototype))
{
itemName = itemPrototype.Name;
}
itemDesc = itemPrototype.Description;
}
button.Text = itemName;
button.TooltipSupplier = _ => new RecipeTooltip(itemDesc);
button.OnPressed += _ => ItemSelected?.Invoke(item, items.IndexOf(item));

View File

@@ -0,0 +1,82 @@
using System.Linq;
using Content.Client.Construction;
using Content.Shared.Construction.Prototypes;
using Content.Shared.Popups;
using Robust.Client.Placement;
using Robust.Client.Utility;
using Robust.Shared.Map;
namespace Content.Client._White.Cult.UI.StructureRadial;
public sealed class CultPylonPlacementHijack : PlacementHijack
{
private readonly ConstructionSystem _constructionSystem;
private readonly IEntityManager _entMan;
private readonly ConstructionPrototype? _prototype;
private readonly EntityUid _player;
public override bool CanRotate { get; }
public CultPylonPlacementHijack(ConstructionPrototype? prototype, IEntityManager entMan, EntityUid player)
{
_prototype = prototype;
_entMan = entMan;
_player = player;
_constructionSystem = entMan.System<ConstructionSystem>();
CanRotate = prototype?.CanRotate ?? true;
}
/// <inheritdoc />
public override bool HijackPlacementRequest(EntityCoordinates coordinates)
{
if (_prototype == null)
return true;
if (CheckForStructure(coordinates))
{
var popup = _entMan.System<SharedPopupSystem>();
popup.PopupClient(Loc.GetString("cult-structure-craft-another-structure-nearby"), _player, _player);
return true;
}
_constructionSystem.ClearAllGhosts();
var dir = Manager.Direction;
_constructionSystem.SpawnGhost(_prototype, coordinates, dir);
return true;
}
private bool CheckForStructure(EntityCoordinates coordinates)
{
var lookupSystem = _entMan.System<EntityLookupSystem>();
var entities = lookupSystem.GetEntitiesInRange(coordinates, 10f);
foreach (var ent in entities)
{
if (!_entMan.TryGetComponent<MetaDataComponent>(ent, out var metadata))
continue;
if (metadata.EntityPrototype?.ID is "CultPylon")
return true;
}
return false;
}
/// <inheritdoc />
public override bool HijackDeletion(EntityUid entity)
{
if (IoCManager.Resolve<IEntityManager>().HasComponent<ConstructionGhostComponent>(entity))
{
_constructionSystem.ClearGhost(entity.GetHashCode());
}
return true;
}
/// <inheritdoc />
public override void StartHijack(PlacementManager manager)
{
base.StartHijack(manager);
manager.CurrentTextures = _prototype?.Layers.Select(sprite => sprite.DirFrame0()).ToList();
}
}

View File

@@ -86,43 +86,23 @@ public sealed class StructureCraftBoundUserInterface : BoundUserInterface
if (construct == null)
return;
var player = _player.LocalPlayer?.ControlledEntity;
var player = _player.LocalEntity;
if (player == null)
return;
if (construct.ID == "CultPylon" && CheckForStructure(player, id))
{
var popup = _entMan.System<SharedPopupSystem>();
popup.PopupClient(Loc.GetString("cult-structure-craft-another-structure-nearby"), player.Value, player.Value);
return;
}
PlacementHijack hijack;
if (construct.ID == "CultPylon")
{
hijack = new CultPylonPlacementHijack(construct, _entMan, player.Value);
}
else
{
var constructSystem = _systemManager.GetEntitySystem<ConstructionSystem>();
var hijack = new ConstructionPlacementHijack(constructSystem, construct);
hijack = new ConstructionPlacementHijack(constructSystem, construct);
}
_placement.BeginPlacing(newObj, hijack);
}
private bool CheckForStructure(EntityUid? uid, string id)
{
if (uid == null)
return false;
if (!_entMan.TryGetComponent<TransformComponent>(uid, out var transform))
return false;
var lookupSystem = _entMan.System<EntityLookupSystem>();
var entities = lookupSystem.GetEntitiesInRange(transform.Coordinates, 15f);
foreach (var ent in entities)
{
if (!_entMan.TryGetComponent<MetaDataComponent>(ent, out var metadata))
continue;
if (metadata.EntityPrototype?.ID == id)
return true;
}
return false;
}
}

View File

@@ -1,34 +1,25 @@
<Control xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:parallax="clr-namespace:Content.Client.Parallax"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
<parallax:ParallaxControl />
<Control HorizontalAlignment="Center" VerticalAlignment="Center">
<PanelContainer StyleClasses="AngleRect" />
<BoxContainer Orientation="Vertical" MinSize="200 200">
<BoxContainer Orientation="Horizontal">
<Label Margin="8 0 0 0" Text="{Loc 'queue-title'}"
StyleClasses="LabelHeading" VAlign="Center" />
xmlns:mainMenu="clr-namespace:Content.Client.MainMenu">
<mainMenu:BackgroundControl TexturePath="/Textures/Logo/logo-ru.png" Stretch="KeepAspectCentered" Name="Background"/>
<Control HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
<PanelContainer StyleClasses="LobbyShadedBackground" HorizontalAlignment="Right">
<BoxContainer Orientation="Horizontal" HorizontalExpand="True" HorizontalAlignment="Right">
<Button Name="QuitButton" Text="{Loc 'queue-quit'}"
HorizontalAlignment="Right" HorizontalExpand="True" />
<Button Name="PriorityJoinButton" Text="{Loc 'queue-priority-join'}"
HorizontalAlignment="Right" HorizontalExpand="True" />
</BoxContainer>
<controls:HighDivider />
<BoxContainer Orientation="Vertical" VerticalExpand="True" Margin="0 20 0 0">
<BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Vertical" VerticalExpand="True">
<Label Text="{Loc 'queue-position'}" Align="Center" />
<Label Name="QueuePosition" StyleClasses="LabelHeading" Align="Center" />
</BoxContainer>
<BoxContainer Orientation="Vertical" VerticalExpand="True" Margin="0 10 0 0">
<Label Text="{Loc 'queue-total'}" Align="Center" />
<Label Name="QueueTotal" StyleClasses="LabelHeading" Align="Center" />
</BoxContainer>
</BoxContainer>
</BoxContainer>
<BoxContainer Orientation="Horizontal" VerticalAlignment="Bottom" Margin="0 20 0 0">
<Button Name="PriorityJoinButton" Text="{Loc 'queue-priority-join'}" HorizontalExpand="True" StyleClasses="OpenRight" />
</PanelContainer>
<PanelContainer MinWidth="900" StyleClasses="LobbyShadedBackground" HorizontalAlignment="Center">
<BoxContainer Orientation="Horizontal" HorizontalExpand="True" HorizontalAlignment="Center" Margin="4 4 4 0">
<BoxContainer Orientation="Horizontal" VerticalExpand="True">
<Label Text="{Loc 'queue-position'}" Align="Center" StyleClasses="LabelHeadingFuckingBigger" Margin="0 0 24 0" />
<Label Name="QueuePosition" StyleClasses="LabelHeadingFuckingBigger" Align="Center" Margin="0 0 24 0" />
<Label Text="{Loc 'queue-of'}" Align="Center" StyleClasses="LabelHeadingFuckingBigger" Margin="0 0 24 0" />
<Label Name="QueueTotal" StyleClasses="LabelHeadingFuckingBigger" Align="Center" />
</BoxContainer>
</BoxContainer>
</PanelContainer>
</Control>
</Control>

View File

@@ -71,7 +71,7 @@
<Label Name="BloodSolutionVolume"/>
<PanelContainer VerticalExpand="True" MinSize="0 100">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
<gfx:StyleBoxFlat BackgroundColor="#212121" />
</PanelContainer.PanelOverride>
<ScrollContainer HorizontalExpand="True" MinSize="0 100">
<BoxContainer Name="BloodSolutionElements" Orientation="Vertical" Margin="4" HorizontalExpand="True"/>
@@ -84,7 +84,7 @@
<Label Name="ChemicalSolutionVolume"/>
<PanelContainer VerticalExpand="True" MinSize="0 100">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
<gfx:StyleBoxFlat BackgroundColor="#212121" />
</PanelContainer.PanelOverride>
<ScrollContainer HorizontalExpand="True" MinSize="0 100">
<BoxContainer Name="ChemicalSolutionElements" Orientation="Vertical" Margin="4" HorizontalExpand="True"/>

View File

@@ -55,6 +55,13 @@ public sealed class ChangelingRuleSystem : GameRuleSystem<ChangelingRuleComponen
SubscribeLocalEvent<RoundRestartCleanupEvent>(ClearUsedNames);
SubscribeLocalEvent<ChangelingRuleComponent, ObjectivesTextGetInfoEvent>(OnObjectivesTextGetInfo);
SubscribeLocalEvent<ChangelingRoleComponent, GetBriefingEvent>(OnGetBriefing);
}
private void OnGetBriefing(Entity<ChangelingRoleComponent> ent, ref GetBriefingEvent args)
{
args.Append(Loc.GetString("changeling-role-briefing-short"));
}
protected override void ActiveTick(
@@ -176,13 +183,6 @@ public sealed class ChangelingRuleSystem : GameRuleSystem<ChangelingRuleComponen
PrototypeId = changelingRule.ChangelingPrototypeId
}, mind);
var briefing = Loc.GetString("changeling-role-briefing-short");
_roleSystem.MindAddRole(mindId, new RoleBriefingComponent
{
Briefing = briefing
}, mind, true);
_roleSystem.MindPlaySound(mindId, changelingRule.GreetSoundNotification, mind);
SendChangelingBriefing(mindId);
changelingRule.ChangelingMinds.Add(mindId);

View File

@@ -4,6 +4,8 @@ using Content.Server.Administration.Systems;
using Content.Server.Bible.Components;
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Server.Borer;
using Content.Server.Carrying;
using Content.Server.Cuffs;
using Content.Server.DoAfter;
using Content.Server.Emp;
@@ -23,6 +25,7 @@ using Content.Server.Temperature.Systems;
using Content.Shared._White.Chaplain;
using Content.Shared._White.Overlays;
using Content.Shared.Actions;
using Content.Shared.Borer;
using Content.Shared.Changeling;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Cuffs.Components;
@@ -35,6 +38,7 @@ using Content.Shared.Hands.EntitySystems;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Markings;
using Content.Shared.Implants.Components;
using Content.Shared.Interaction;
using Content.Shared.Inventory;
using Content.Shared.Miracle.UI;
using Content.Shared.Mobs;
@@ -85,6 +89,8 @@ public sealed partial class ChangelingSystem
[Dependency] private readonly EmpSystem _empSystem = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly ContainerSystem _container = default!;
[Dependency] private readonly ServerBorerSystem _borer = default!;
[Dependency] private readonly CarryingSystem _carrying = default!;
private void InitializeAbilities()
{
@@ -377,6 +383,13 @@ public sealed partial class ChangelingSystem
var target = GetEntity(args.Target);
var user = GetEntity(args.Entity);
if (!Transform(user).Coordinates.InRange(EntityManager, _transform, Transform(target).Coordinates,
SharedInteractionSystem.InteractionRange))
{
_popup.PopupEntity(Loc.GetString("changeling-popup-transform-too-far"), user, user);
return;
}
if (!TryComp<ActorComponent>(uid, out var actorComponent))
return;
@@ -757,6 +770,8 @@ public sealed partial class ChangelingSystem
if (!TakeChemicals(uid, component, 5))
return;
BeforeTransform(args.User);
var polymorphEntity = _polymorph.PolymorphEntity(args.User, "MonkeyChangeling");
if (polymorphEntity == null)
@@ -883,6 +898,8 @@ public sealed partial class ChangelingSystem
if (!HasComp<HumanoidAppearanceComponent>(target) && !humanoidOverride)
return null;
BeforeTransform(target);
var polymorphEntity = _polymorph.PolymorphEntity(target, transformData.EntityPrototype.ID);
if (polymorphEntity == null)
@@ -927,6 +944,15 @@ public sealed partial class ChangelingSystem
return polymorphEntity;
}
private void BeforeTransform(EntityUid target)
{
if (TryComp(target, out BorerHostComponent? host) && host.BorerContainer.Count > 0)
_borer.GetOut(host.BorerContainer.ContainedEntities[0]);
if (TryComp(target, out BeingCarriedComponent? beingCarried))
_carrying.DropCarried(beingCarried.Carrier, target);
}
private void TransferComponents(EntityUid from, EntityUid to)
{
if (HasComp<BibleUserComponent>(from))

View File

@@ -0,0 +1,175 @@
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Database;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Events;
using Content.Shared.Mobs.Components;
using System.Diagnostics.CodeAnalysis;
using Content.Shared.Chemistry;
using Content.Shared.DoAfter;
namespace Content.Server.Chemistry.EntitySystems
{
public sealed partial class ChemistrySystem
{
[Dependency] private readonly ReactiveSystem _reactive = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
public void InitializePatch()
{
SubscribeLocalEvent<PatchComponent, PatchDoAfterEvent>(OnPatchDoAfter);
SubscribeLocalEvent<PatchComponent, AfterInteractEvent>(OnAfterInteract);
SubscribeLocalEvent<PatchComponent, UseInHandEvent>(OnUseInHand);
SubscribeLocalEvent<PatchComponent, SolutionContainerChangedEvent>(OnSolutionChange);
}
private void OnPatchDoAfter(Entity<PatchComponent> entity, ref PatchDoAfterEvent args)
{
if (args.Cancelled || args.Handled || args.Args.Target == null)
return;
TryDoInject(entity, args.Args.Target.Value, args.Args.User);
args.Handled = true;
}
private void PatchDoAfter(Entity<PatchComponent> patch, EntityUid target, EntityUid user)
{
var (uid, component) = patch;
// Dont need to start DoAfter if patch is empty
if (!_solutionContainers.TryGetSolution(uid, component.SolutionName, out var _, out var patchSolution) || patchSolution.Volume == 0)
{
_popup.PopupCursor(Loc.GetString("patch-component-empty-message"), user);
return;
}
// Create a pop-up for the user
_popup.PopupEntity(Loc.GetString("patch-component-injecting-user"), target, user);
var isTarget = user != target;
if (isTarget)
{
// Create a pop-up for the target
var userName = Identity.Entity(user, EntityManager);
_popup.PopupEntity(Loc.GetString("injector-component-injecting-target",
("user", userName)), user, target);
}
var actualDelay = MathHelper.Max(patch.Comp.Delay, TimeSpan.FromSeconds(1));
// Injections take 0.5 seconds longer per additional 5u
actualDelay += TimeSpan.FromSeconds(patchSolution.Volume.Float() / component.Delay.TotalSeconds - 0.5f);
_adminLogger.Add(LogType.ForceFeed, $"{_entMan.ToPrettyString(user):user} is attempting to put a patch on {_entMan.ToPrettyString(target):target}");
_doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, actualDelay, new PatchDoAfterEvent(), patch.Owner, target: target, used: patch.Owner)
{
BreakOnUserMove = true,
BreakOnDamage = true,
BreakOnTargetMove = true
});
}
/// <summary>
/// Actually difference between OnUseInHand and OnAfterInteract only in target
/// In OnUseInHand target is always = user. In OnAfterInteract target may be user or may not
/// </summary>
private void OnUseInHand(Entity<PatchComponent> entity, ref UseInHandEvent args)
{
if (args.Handled)
return;
if (args.User is not { Valid: true } target)
return;
PatchDoAfter(entity, target, args.User);
args.Handled = true;
}
private void OnAfterInteract(Entity<PatchComponent> entity, ref AfterInteractEvent args)
{
if (!args.CanReach || args.Handled)
return;
var (_, component) = entity;
if (!EligibleEntity(args.Target, _entMan, component))
return;
if (args.Target is not { Valid: true } target)
return;
var user = args.User;
PatchDoAfter(entity, target, user);
args.Handled = true;
}
private void OnSolutionChange(Entity<PatchComponent> entity, ref SolutionContainerChangedEvent args)
{
Dirty(entity);
}
private bool TryDoInject(Entity<PatchComponent> patch, EntityUid? target, EntityUid user)
{
var (uid, component) = patch;
string? msgFormat = null;
if (!EligibleEntity(target, _entMan, component))
return false;
if (!_solutionContainers.TryGetSolution(uid, component.SolutionName, out var patchSoln, out var patchSolution) || patchSolution.Volume == 0)
{
// TODO: Empty patch should stop the bleeding
_popup.PopupCursor(Loc.GetString("patch-component-empty-message"), user);
return true;
}
if (!_solutionContainers.TryGetInjectableSolution(target.Value, out var targetSoln, out var targetSolution))
{
_popup.PopupCursor(Loc.GetString("patch-cant-inject", ("target", Identity.Entity(target.Value, _entMan))), user);
return false;
}
if (patchSolution.Volume > targetSolution.AvailableVolume)
{
_popup.PopupCursor(Loc.GetString("patch-cant-inject-now"), user);
return false;
}
var removedSolution = _solutionContainers.SplitSolution(patchSoln.Value, patchSolution.Volume);
_popup.PopupCursor(Loc.GetString(msgFormat ?? "patch-component-inject-other-message", ("other", target)), user);
if (!targetSolution.CanAddSolution(removedSolution))
return true;
_reactive.DoEntityReaction(target.Value, removedSolution, ReactionMethod.Touch);
// Transfering only half of the solution via Injection method
removedSolution.ScaleSolution(0.5f);
_reactive.DoEntityReaction(target.Value, removedSolution, ReactionMethod.Injection);
_solutionContainers.TryAddSolution(targetSoln.Value, removedSolution);
QueueDel(patch);
_adminLogger.Add(LogType.ForceFeed, $"{_entMan.ToPrettyString(user):user} put a patch on {_entMan.ToPrettyString(target.Value):target} with a solution {SolutionContainerSystem.ToPrettyString(removedSolution):removedSolution} using a {_entMan.ToPrettyString(uid):using}");
return true;
}
static bool EligibleEntity([NotNullWhen(true)] EntityUid? entity, IEntityManager entMan, PatchComponent component)
{
// Using patch only on mobs
return component.OnlyMobs
? entMan.HasComponent<SolutionContainerManagerComponent>(entity) &&
entMan.HasComponent<MobStateComponent>(entity)
: entMan.HasComponent<SolutionContainerManagerComponent>(entity);
}
}
}

View File

@@ -22,5 +22,6 @@ public sealed partial class ChemistrySystem : EntitySystem
// Why ChemMaster duplicates reagentdispenser nobody knows.
InitializeHypospray();
InitializeMixing();
InitializePatch();
}
}

View File

@@ -24,6 +24,7 @@ public sealed class DoorSystem : SharedDoorSystem
[Dependency] private readonly DoorBoltSystem _bolts = default!;
[Dependency] private readonly AirtightSystem _airtightSystem = default!;
[Dependency] private readonly PryingSystem _pryingSystem = default!;
[Dependency] private readonly RunicDoorSystem _runicDoor = default!; // WD
public override void Initialize()
{
@@ -142,6 +143,9 @@ public sealed class DoorSystem : SharedDoorSystem
var otherUid = args.OtherEntity;
if (!_runicDoor.CanBumpOpen(uid, otherUid)) // WD
return;
if (Tags.HasTag(otherUid, "DoorBumpOpener"))
TryOpen(uid, door, otherUid, quiet: door.State == DoorState.Denying);
}
@@ -201,6 +205,9 @@ public sealed class DoorSystem : SharedDoorSystem
{
foreach (var other in PhysicsSystem.GetContactingEntities(uid, physics, approximate: true))
{
if (!_runicDoor.CanBumpOpen(uid, other)) // WD
continue;
if (Tags.HasTag(other, "DoorBumpOpener") && TryOpen(uid, door, other, quiet: true))
break;
}

View File

@@ -90,7 +90,7 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
if (CheckCommandLose())
{
// WD EDIT START
// Basically check for all in once gamemode
// Check for all in once gamemode
if (_gameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
_roundEnd.DoRoundEndBehavior(RoundEndBehavior.ShuttleCall, component.ShuttleCallTime);
else

View File

@@ -11,12 +11,26 @@ public sealed class ReturnToBodyEui : BaseEui
private readonly MindComponent _mind;
private readonly EntityUid _mindId;
private readonly EntityUid? _transferTo;
public ReturnToBodyEui(MindComponent mind, SharedMindSystem mindSystem)
{
_mind = mind;
_mindSystem = mindSystem;
}
// WD START
public ReturnToBodyEui(MindComponent mind, SharedMindSystem mindSystem, EntityUid mindId, EntityUid? transferTo)
{
_mind = mind;
_mindSystem = mindSystem;
_mindId = mindId;
_transferTo = transferTo;
}
// WD END
public override void HandleMessage(EuiMessageBase msg)
{
base.HandleMessage(msg);
@@ -28,6 +42,9 @@ public sealed class ReturnToBodyEui : BaseEui
return;
}
if (_transferTo != null) // WD
_mindSystem.TransferTo(_mindId, _transferTo, mind: _mind);
_mindSystem.UnVisit(_mind.Session);
Close();

View File

@@ -1,9 +1,12 @@
using System.Numerics;
using Content.Server._White.Other.ChangeThrowForceSystem;
using Content.Server.Damage.Components;
using Content.Server.Inventory;
using Content.Server.Pulling;
using Content.Server.Stack;
using Content.Server.Stunnable;
using Content.Shared._White.Cult.Systems;
using Content.Shared._White.MagGloves;
using Content.Shared.ActionBlocker;
using Content.Shared.Body.Part;
using Content.Shared.CombatMode;
@@ -39,6 +42,7 @@ namespace Content.Server.Hands.Systems
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly PullingSystem _pullingSystem = default!;
[Dependency] private readonly ThrowingSystem _throwingSystem = default!;
[Dependency] private readonly CultItemSystem _cultItem = default!;
public override void Initialize()
{
@@ -93,6 +97,9 @@ namespace Content.Server.Hands.Systems
if (args.Handled)
return;
if (HasComp<PreventDisarmComponent>(uid))
return;
// Break any pulls
if (TryComp(uid, out SharedPullerComponent? puller) && puller.Pulling is EntityUid pulled &&
TryComp(pulled, out SharedPullableComponent? pullable))
@@ -190,6 +197,11 @@ namespace Content.Server.Hands.Systems
!_actionBlockerSystem.CanThrow(player, throwEnt))
return false;
// WD EDIT START
if (HasComp<DamageOtherOnHitComponent>(throwEnt) && !_cultItem.CanThrow(player, throwEnt))
return false;
// WD EDIT END
if (_timing.CurTime < hands.NextThrowTime)
return false;
hands.NextThrowTime = _timing.CurTime + hands.ThrowCooldown;

View File

@@ -13,7 +13,10 @@ namespace Content.Server.Holosign
/// <summary>
/// How much charge a single use expends.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("chargeUse")]
public float ChargeUse = 50f;
[ViewVariables(VVAccess.ReadWrite), DataField]
public int Uses = 10;
[ViewVariables(VVAccess.ReadWrite), DataField]
public List<EntityUid?> Signs = new();
}
}

View File

@@ -1,16 +1,16 @@
using Content.Server.Popups;
using Content.Shared.Examine;
using Content.Shared.Coordinates.Helpers;
using Content.Server.Power.Components;
using Content.Server.PowerCell;
using Content.Shared.Interaction;
using Content.Shared.Storage;
using Content.Shared.Interaction.Events;
using Content.Shared.Popups;
namespace Content.Server.Holosign;
public sealed class HolosignSystem : EntitySystem
{
[Dependency] private readonly PowerCellSystem _powerCell = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
public override void Initialize()
@@ -18,19 +18,20 @@ public sealed class HolosignSystem : EntitySystem
base.Initialize();
SubscribeLocalEvent<HolosignProjectorComponent, BeforeRangedInteractEvent>(OnBeforeInteract);
SubscribeLocalEvent<HolosignProjectorComponent, ExaminedEvent>(OnExamine);
SubscribeLocalEvent<HolosignProjectorComponent, ComponentRemove>(OnComponentRemove);
SubscribeLocalEvent<HolosignProjectorComponent, UseInHandEvent>(OnUse);
}
private void OnExamine(EntityUid uid, HolosignProjectorComponent component, ExaminedEvent args)
{
// TODO: This should probably be using an itemstatus
// TODO: I'm too lazy to do this rn but it's literally copy-paste from emag.
_powerCell.TryGetBatteryFromSlot(uid, out var battery);
var charges = UsesRemaining(component, battery);
var maxCharges = MaxUses(component, battery);
var charges = UsesRemaining(component);
var maxCharges = component.Uses;
var activeholo = ActiveHolo(component);
using (args.PushGroup(nameof(HolosignProjectorComponent)))
{
args.PushMarkup(Loc.GetString("limited-charges-charges-remaining", ("charges", charges)));
args.PushMarkup(Loc.GetString("holoprojector-active-holo", ("activeholo", activeholo)));
if (charges > 0 && charges == maxCharges)
{
@@ -39,39 +40,58 @@ public sealed class HolosignSystem : EntitySystem
}
}
private void OnUse(EntityUid uid, HolosignProjectorComponent comp, UseInHandEvent args)
{
foreach (var sign in comp.Signs)
{
comp.Signs.Remove(sign);
QueueDel(sign);
}
_popupSystem.PopupEntity(Loc.GetString("holoprojector-delete-signs"), args.User, args.User, PopupType.Medium);
}
private void OnBeforeInteract(EntityUid uid, HolosignProjectorComponent component, BeforeRangedInteractEvent args)
{
if (component.Signs.Contains(args.Target)) // wd edit
{
QueueDel(args.Target);
component.Signs.Remove(args.Target);
return;
}
if (args.Handled
|| !args.CanReach // prevent placing out of range
|| HasComp<StorageComponent>(args.Target) // if it's a storage component like a bag, we ignore usage so it can be stored
|| !_powerCell.TryUseCharge(uid, component.ChargeUse) // if no battery or no charge, doesn't work
)
if (args.Handled || !args.CanReach)
return;
// places the holographic sign at the click location, snapped to grid.
// overlapping of the same holo on one tile remains allowed to allow holofan refreshes
if (component.Signs.Count >= component.Uses) // wd edit
{
_popupSystem.PopupEntity(Loc.GetString("holoprojector-uses-limit"), args.User, args.User, PopupType.Medium);
return;
}
var holoUid = EntityManager.SpawnEntity(component.SignProto, args.ClickLocation.SnapToGrid(EntityManager));
var xform = Transform(holoUid);
if (!xform.Anchored)
_transform.AnchorEntity(holoUid, xform); // anchor to prevent any tempering with (don't know what could even interact with it)
_transform.AnchorEntity(holoUid, xform);
args.Handled = true;
component.Signs.Add(holoUid); // WD EDIT
}
private int UsesRemaining(HolosignProjectorComponent component, BatteryComponent? battery = null)
private void OnComponentRemove(EntityUid uid, HolosignProjectorComponent comp, ComponentRemove args) // wd edit
{
if (battery == null ||
component.ChargeUse == 0f) return 0;
return (int) (battery.CurrentCharge / component.ChargeUse);
}
private int MaxUses(HolosignProjectorComponent component, BatteryComponent? battery = null)
foreach (var sign in comp.Signs)
{
if (battery == null ||
component.ChargeUse == 0f) return 0;
QueueDel(sign);
}
}
return (int) (battery.MaxCharge / component.ChargeUse);
private int UsesRemaining(HolosignProjectorComponent component)
{
return (component.Uses - component.Signs.Count); // wd edit
}
private int ActiveHolo(HolosignProjectorComponent component) // wd edit
{
return (component.Signs.Count); // wd edit
}
}

View File

@@ -46,11 +46,19 @@ namespace Content.Server.Inventory
return;
var enumerator = new InventorySlotEnumerator(source.Comp);
// WD EDIT START
List<(EntityUid, string)> items = new();
while (enumerator.NextItem(out var item, out var slot))
{
if (TryUnequip(source, slot.Name, true, true, inventory: source.Comp))
TryEquip(target, item, slot.Name , true, true, inventory: target.Comp);
}
items.Add((item, slot.Name));
}
foreach (var (item, name) in items)
{
TryUnequip(source, name, true, true, inventory: source.Comp);
TryEquip(target, item, name, true, true, inventory: target.Comp);
}
// WD EDIT END
}
}
}

View File

@@ -109,6 +109,7 @@ namespace Content.Server.Lathe
return;
var materialWhitelist = new List<ProtoId<MaterialPrototype>>();
var recipes = GetAvailableRecipes(uid, component, true);
foreach (var id in recipes)
{
if (!_proto.TryIndex(id, out var proto))
@@ -122,6 +123,18 @@ namespace Content.Server.Lathe
}
}
if (TryComp<MaterialStorageComponent>(args.Storage, out var materialStorageComponent) &&
materialStorageComponent.Whitelist?.Entities != null)
{
foreach (var id in materialStorageComponent.Whitelist.Entities)
{
if (!materialWhitelist.Contains(id))
{
materialWhitelist.Add(id);
}
}
}
var combined = args.Whitelist.Union(materialWhitelist).ToList();
args.Whitelist = combined;
}
@@ -165,7 +178,7 @@ namespace Content.Server.Lathe
? (int) (-amount * component.MaterialUseMultiplier)
: -amount;
var gridUid = HasComp<BluespaceSiloComponent>(uid) &&
var gridUid = HasComp<BluespaceStorageComponent>(uid) &&
TryComp<TransformComponent>(uid, out var transformComponent) ? transformComponent.GridUid : null;
var gridStorage =

View File

@@ -79,7 +79,7 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
volume = sheetsToExtract * volumePerSheet;
}
var gridUid = HasComp<BluespaceSiloComponent>(uid) &&
var gridUid = HasComp<BluespaceStorageComponent>(uid) &&
TryComp<TransformComponent>(uid, out var transformComponent)
? transformComponent.GridUid
: null;
@@ -109,18 +109,23 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
{
if (!Resolve(receiver, ref storage) || !Resolve(toInsert, ref material, ref composition, false))
return false;
if (TryComp<ApcPowerReceiverComponent>(receiver, out var power) && !power.Powered)
return false;
if (!base.TryInsertMaterialEntity(user, toInsert, receiver, storage, material, composition))
return false;
_audio.PlayPvs(storage.InsertingSound, receiver);
_popup.PopupEntity(Loc.GetString("machine-insert-item", ("user", user), ("machine", receiver),
("item", toInsert)), receiver);
QueueDel(toInsert);
// Logging
TryComp<StackComponent>(toInsert, out var stack);
var count = stack?.Count ?? 1;
_adminLogger.Add(LogType.Action, LogImpact.Low,
$"{ToPrettyString(user):player} inserted {count} {ToPrettyString(toInsert):inserted} into {ToPrettyString(receiver):receiver}");
return true;

View File

@@ -42,9 +42,19 @@ public sealed class ProjectileSystem : SharedProjectileSystem
// This is so entities that shouldn't get a collision are ignored.
if (args.OurFixtureId != ProjectileFixture || !args.OtherFixture.Hard
|| component.DamagedEntity || component is { Weapon: null, OnlyCollideWhenShot: true })
{
return;
}
var target = args.OtherEntity;
var collideAttemptEv = new ProjectileCollideAttemptEvent(uid, component, false);
RaiseLocalEvent(target, ref collideAttemptEv);
if (collideAttemptEv.Cancelled)
{
return;
}
// it's here so this check is only done once before possible hit
var attemptEv = new ProjectileReflectAttemptEvent(uid, component, false);
RaiseLocalEvent(target, ref attemptEv);

View File

@@ -3,6 +3,7 @@ using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Standing;
using Content.Shared.Throwing;
using Content.Shared._White.MagGloves;
using Robust.Shared.Physics.Components;
using Robust.Shared.Random;
@@ -31,8 +32,11 @@ public sealed class StandingStateSystem : EntitySystem
if (hand.HeldEntity is not EntityUid held)
continue;
if (!HasComp<KeepItemsOnFallComponent>(uid))
{
if (!_handsSystem.TryDrop(uid, hand, null, checkActionBlocker: false, handsComp: handsComp))
continue;
}
_throwingSystem.TryThrow(held,
_random.NextAngle().RotateVec(direction / dropAngle + worldRotation / 50),

View File

@@ -18,6 +18,7 @@ using Content.Shared.Popups;
using Content.Shared.Strip;
using Content.Shared.Strip.Components;
using Content.Shared.Verbs;
using Content.Shared._White.MagGloves;
using Robust.Server.GameObjects;
using Robust.Shared.Player;
using Robust.Shared.Utility;
@@ -71,6 +72,13 @@ namespace Content.Server.Strip
!TryComp<HandsComponent>(user, out var userHands))
return;
if ((args.Slot == "gloves" || args.IsHand) && TryComp(strippable, out PreventStrippingFromHandsAndGlovesComponent? mag))
{
var message = Loc.GetString("maggloves-cant-strip");
_popup.PopupEntity(message, user, user);
return;
}
if (args.IsHand)
{
StripHand(user, args.Slot, strippable, userHands);

View File

@@ -91,6 +91,8 @@ public sealed partial class GunSystem : SharedGunSystem
Audio.PlayPvs(clumsy.ClumsySound, gunUid);
PopupSystem.PopupEntity(Loc.GetString("gun-clumsy"), user.Value);
_adminLogger.Add(LogType.EntityDelete, LogImpact.Medium, $"{Loc.GetString("clumsy-gun-delete-log", ("prettyUser", ToPrettyString(user.Value)), ("prettyGun", ToPrettyString(gunUid)))}");
Del(gunUid);
userImpulse = false;
return;
}
@@ -213,14 +215,31 @@ public sealed partial class GunSystem : SharedGunSystem
var ray = new CollisionRay(from.Position, dir, hitscan.CollisionMask);
var rayCastResults =
Physics.IntersectRay(from.MapId, ray, hitscan.MaxLength, lastUser, false).ToList();
if (!rayCastResults.Any())
if (rayCastResults.Count == 0)
break;
var result = rayCastResults[0];
var hit = result.HitEntity;
lastHit = hit;
RayCastResults? result = null;
foreach (var castResults in rayCastResults)
{
var hitscanAttemptEv = new HitscanHitAttemptEvent(castResults.HitEntity, gun.Target);
RaiseLocalEvent(castResults.HitEntity, ref hitscanAttemptEv);
if (hitscanAttemptEv.Cancelled)
{
continue;
}
FireEffects(fromEffect, result.Distance, dir.Normalized().ToAngle(), hitscan, hit);
result = castResults;
break;
}
if (!result.HasValue)
{
return;
}
var hit = result.Value.HitEntity;
lastHit = hit;
FireEffects(fromEffect, result.Value.Distance, dir.Normalized().ToAngle(), hitscan, hit);
var ev = new HitScanReflectAttemptEvent(user, gunUid, hitscan.Reflective, dir, false);
RaiseLocalEvent(hit, ref ev);
@@ -294,8 +313,13 @@ public sealed partial class GunSystem : SharedGunSystem
private void ShootOrThrow(EntityUid uid, Vector2 mapDirection, Vector2 gunVelocity, GunComponent gun, EntityUid gunUid, EntityUid? user)
{
// Do a throw
if (!HasComp<ProjectileComponent>(uid))
if (TryComp(uid, out ProjectileComponent? projectile))
{
projectile.Target = gun.Target;
ShootProjectile(uid, mapDirection, gunVelocity, gunUid, user, gun.ProjectileSpeedModified);
return;
}
RemoveShootable(uid);
// TODO: Someone can probably yeet this a billion miles so need to pre-validate input somewhere up the call stack.
// WD EDIT START
@@ -305,14 +329,14 @@ public sealed partial class GunSystem : SharedGunSystem
var angle = EnsureComp<ThrowingAngleComponent>(uid);
angle.Angle = gun.Angle;
}
ThrowingSystem.TryThrow(uid, mapDirection.Normalized() * 7f * coefficient, gun.ProjectileSpeedModified, user);
ThrowingSystem.TryThrow(uid, mapDirection.Normalized() * 7f * coefficient, gun.ProjectileSpeedModified,
user);
if (gun.ForceThrowingAngle)
RemComp<ThrowingAngleComponent>(uid);
// WD EDIT END
return;
}
ShootProjectile(uid, mapDirection, gunVelocity, gunUid, user, gun.ProjectileSpeedModified);
// WD EDIT END
}
/// <summary>

View File

@@ -2,6 +2,7 @@ using Content.Server.Body.Systems;
using Content.Shared.Body.Organ;
using Content.Shared.Construction;
using Content.Shared._White.CheapSurgery;
using Content.Shared.Changeling;
namespace Content.Server._White.Construction.Completions;
@@ -20,7 +21,8 @@ public sealed partial class Surgery : IGraphAction
return;
}
if (entityManager.TryGetComponent<OrganComponent>(surgeryComponent.OrganUid, out var organComponent))
if (entityManager.TryGetComponent<OrganComponent>(surgeryComponent.OrganUid, out var organComponent) &&
!entityManager.HasComponent<ChangelingComponent>(uid))
bodySystem.RemoveOrgan(surgeryComponent.OrganUid, organComponent);
entityManager.RemoveComponent<ActiveSurgeryComponent>(uid);

View File

@@ -62,13 +62,14 @@ public sealed partial class CultRuleComponent : Component
public List<ConstructComponent> Constructs = new();
public CultWinCondition WinCondition;
public CultWinCondition WinCondition = CultWinCondition.CultDraw;
}
public enum CultWinCondition : byte
{
CultDraw,
CultWin,
CultFailure
CultFailure,
}
public sealed class CultNarsieSummoned : EntityEventArgs

View File

@@ -1,14 +1,15 @@
using System.Linq;
using Content.Server._Miracle.Components;
using Content.Server._Miracle.GulagSystem;
using Content.Server.Actions;
using Content.Server.Chat.Managers;
using Content.Server.GameTicking;
using Content.Server.GameTicking.Rules;
using Content.Server.NPC.Systems;
using Content.Server.Roles;
using Content.Server.Roles.Jobs;
using Content.Server.RoundEnd;
using Content.Server.Shuttles.Components;
using Content.Server.StationEvents.Components;
using Content.Server.Storage.EntitySystems;
using Content.Shared.Body.Systems;
using Content.Shared.Humanoid;
@@ -25,6 +26,7 @@ using Robust.Shared.Random;
using Content.Shared._White;
using Content.Shared._White.Chaplain;
using Content.Shared._White.Cult.Components;
using Content.Shared._White.Cult.Systems;
using Content.Shared.Mind;
using Robust.Shared.Audio.Systems;
@@ -47,6 +49,7 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
[Dependency] private readonly SharedMindSystem _mindSystem = default!;
[Dependency] private readonly ActionsSystem _actions = default!;
[Dependency] private readonly GulagSystem _gulag = default!;
[Dependency] private readonly BloodSpearSystem _bloodSpear = default!;
private ISawmill _sawmill = default!;
@@ -69,6 +72,13 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
SubscribeLocalEvent<CultistComponent, ComponentInit>(OnCultistComponentInit);
SubscribeLocalEvent<CultistComponent, ComponentRemove>(OnCultistComponentRemoved);
SubscribeLocalEvent<CultistComponent, MobStateChangedEvent>(OnCultistsStateChanged);
SubscribeLocalEvent<CultistRoleComponent, GetBriefingEvent>(OnGetBriefing);
}
private void OnGetBriefing(Entity<CultistRoleComponent> ent, ref GetBriefingEvent args)
{
args.Append(Loc.GetString("cult-role-briefing-short"));
}
private void OnCultistsStateChanged(EntityUid uid, CultistComponent component, MobStateChangedEvent ev)
@@ -130,7 +140,7 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
if (!TryComp<MobStateComponent>(owner, out var mobState))
continue;
if (_mobStateSystem.IsAlive(owner, mobState))
if (!_mobStateSystem.IsDead(owner, mobState))
{
aliveCultists++;
}
@@ -140,6 +150,9 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
return;
cultistsRule.WinCondition = CultWinCondition.CultFailure;
// Check for all in once gamemode
if (!GameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
_roundEndSystem.EndRound();
}
@@ -165,6 +178,8 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
}
UpdateCultistsAppearance(cultistsRule);
component.OriginalMind = (mindComponent.Mind.Value, Comp<MindComponent>(mindComponent.Mind.Value));
}
private void OnCultistComponentRemoved(EntityUid uid, CultistComponent component, ComponentRemove args)
@@ -177,6 +192,8 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
cultistsRule.CurrentCultists.Remove(component);
_bloodSpear.DetachSpearFromUser((uid, component));
foreach (var empower in component.SelectedEmpowers)
{
_actions.RemoveAction(uid, GetEntity(empower));
@@ -438,7 +455,7 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
PrototypeId = cultistRule.CultistRolePrototype
};
_roleSystem.MindAddRole(mindId, cultistComponent);
_roleSystem.MindAddRole(mindId, cultistComponent, mind);
EnsureComp<CultistComponent>(playerEntity);
_factionSystem.RemoveFaction(playerEntity, "NanoTrasen", false);
@@ -478,19 +495,27 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
_roundEndSystem.EndRound();
var query = EntityQueryEnumerator<MobStateComponent, MindContainerComponent, CultistComponent>();
var query =
EntityQueryEnumerator<MobStateComponent, MindContainerComponent, CultistComponent, TransformComponent>();
while (query.MoveNext(out var uid, out _, out var mindContainer, out _))
List<Entity<MindContainerComponent, TransformComponent>> cultists = new();
while (query.MoveNext(out var uid, out _, out var mindContainer, out _, out var transform))
{
if (!mindContainer.HasMind || mindContainer.Mind is null)
cultists.Add((uid, mindContainer, transform));
}
foreach (var ent in cultists)
{
if (ent.Comp1.Mind is null)
{
continue;
}
var reaper = Spawn(CultRuleComponent.ReaperPrototype, Transform(uid).Coordinates);
_mindSystem.TransferTo(mindContainer.Mind.Value, reaper);
var reaper = Spawn(CultRuleComponent.ReaperPrototype, ent.Comp2.Coordinates);
_mindSystem.TransferTo(ent.Comp1.Mind.Value, reaper);
_bodySystem.GibBody(uid);
_bodySystem.GibBody(ent);
}
}

View File

@@ -13,6 +13,7 @@ using Content.Shared.Popups;
using Content.Shared.Tag;
using Content.Shared._White.Cult;
using Content.Shared._White.Cult.Pylon;
using Content.Shared._White.Cult.Systems;
using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.Audio;
@@ -40,6 +41,8 @@ public sealed class PylonSystem : EntitySystem
[Dependency] private readonly BloodstreamSystem _blood = default!;
[Dependency] private readonly TurfSystem _turf = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly PointLightSystem _pointLight = default!;
[Dependency] private readonly PhysicsSystem _physics = default!;
public override void Initialize()
{
@@ -47,6 +50,15 @@ public sealed class PylonSystem : EntitySystem
SubscribeLocalEvent<SharedPylonComponent, InteractHandEvent>(OnInteract);
SubscribeLocalEvent<SharedPylonComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<SharedPylonComponent, ConcealEvent>(OnConceal);
}
private void OnConceal(Entity<SharedPylonComponent> ent, ref ConcealEvent args)
{
ent.Comp.Activated = !args.Conceal;
UpdateAppearance(ent, ent.Comp);
_pointLight.SetEnabled(ent, !args.Conceal);
_physics.SetCanCollide(ent, !args.Conceal);
}
private void OnInit(EntityUid uid, SharedPylonComponent component, ComponentInit args)
@@ -172,7 +184,7 @@ public sealed class PylonSystem : EntitySystem
if (player.AttachedEntity is not { Valid: true } playerEntity)
continue;
if (!EntityManager.TryGetComponent<CultistComponent>(playerEntity, out _))
if (!HasComp<CultistComponent>(playerEntity) && !HasComp<ConstructComponent>(playerEntity))
continue;
if (_mobStateSystem.IsDead(playerEntity))
@@ -221,12 +233,7 @@ public sealed class PylonSystem : EntitySystem
UpdateAppearance(uid, comp);
if (!TryComp<PointLightComponent>(uid, out var light))
return;
#pragma warning disable RA0002
light.Enabled = comp.Activated;
#pragma warning restore RA0002
_pointLight.SetEnabled(uid, comp.Activated);
var toggleMsg = Loc.GetString(comp.Activated ? "pylon-toggle-on" : "pylon-toggle-off");
_popupSystem.PopupEntity(toggleMsg, uid);

View File

@@ -1,6 +1,7 @@
using Content.Server.UserInterface;
using Content.Shared._White.Cult.UI;
using Robust.Server.GameObjects;
using Robust.Shared.Prototypes;
namespace Content.Shared._White.Cult;
@@ -11,5 +12,5 @@ public sealed partial class RuneDrawerProviderComponent : Component
public Enum UserInterfaceKey = ListViewSelectorUiKey.Key;
[DataField("runePrototypes")]
public List<string> RunePrototypes = new();
public List<EntProtoId> RunePrototypes = new();
}

View File

@@ -1,10 +1,12 @@
using System.Linq;
using System.Numerics;
using Content.Server.Body.Components;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Server.Emp;
using Content.Server.EUI;
using Content.Server._White.Cult.UI;
using Content.Shared._White.Chaplain;
using Content.Shared._White.Cult;
using Content.Shared.Chemistry.Components;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
@@ -17,12 +19,19 @@ using Content.Shared.Stacks;
using Content.Shared.StatusEffect;
using Content.Shared.Stunnable;
using Content.Shared._White.Cult.Actions;
using Content.Shared._White.Cult.Components;
using Content.Shared._White.Cult.Systems;
using Content.Shared._White.Cult.UI;
using Content.Shared.Actions;
using Content.Shared.Cuffs.Components;
using Content.Shared.DoAfter;
using Content.Shared.Maps;
using Content.Shared.Mindshield.Components;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using Robust.Shared.Player;
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
@@ -36,6 +45,13 @@ public partial class CultSystem
[Dependency] private readonly EuiManager _euiManager = default!;
[Dependency] private readonly InventorySystem _inventorySystem = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly MapSystem _mapSystem = default!;
[Dependency] private readonly TileSystem _tile = default!;
[Dependency] private readonly BloodSpearSystem _bloodSpear = default!;
[Dependency] private readonly PhysicsSystem _physics = default!;
private const string TileId = "CultFloor";
private const string ConcealedTileId = "CultFloorConcealed";
public void InitializeActions()
{
@@ -44,8 +60,10 @@ public partial class CultSystem
SubscribeLocalEvent<CultistComponent, CultShadowShacklesTargetActionEvent>(OnShadowShackles);
SubscribeLocalEvent<CultistComponent, CultElectromagneticPulseInstantActionEvent>(OnElectromagneticPulse);
SubscribeLocalEvent<CultistComponent, CultSummonCombatEquipmentTargetActionEvent>(OnSummonCombatEquipment);
SubscribeLocalEvent<CultistComponent, CultConcealPresenceWorldActionEvent>(OnConcealPresence);
SubscribeLocalEvent<CultistComponent, CultConcealInstantActionEvent>(OnConcealPresence);
SubscribeLocalEvent<CultistComponent, CultRevealInstantActionEvent>(OnConcealPresence);
SubscribeLocalEvent<CultistComponent, CultBloodRitesInstantActionEvent>(OnBloodRites);
SubscribeLocalEvent<CultistComponent, CultBloodSpearRecallInstantActionEvent>(OnBloodSpearRecall);
SubscribeLocalEvent<CultistComponent, CultTeleportTargetActionEvent>(OnTeleport);
SubscribeLocalEvent<CultistComponent, CultStunTargetActionEvent>(OnStunTarget);
SubscribeLocalEvent<CultistComponent, ActionGettingRemovedEvent>(OnActionRemoved);
@@ -74,9 +92,15 @@ public partial class CultSystem
private void OnStunTarget(EntityUid uid, CultistComponent component, CultStunTargetActionEvent args)
{
if (args.Target == uid || !TryComp<BloodstreamComponent>(args.Performer, out var bloodstream) ||
HasComp<HolyComponent>(args.Target) || !TryComp<StatusEffectsComponent>(args.Target, out var status))
!TryComp<StatusEffectsComponent>(args.Target, out var status))
return;
if (HasComp<HolyComponent>(args.Target))
{
_popupSystem.PopupEntity("Священная сила препятствует магии.", args.Performer, args.Performer);
return;
}
if (HasComp<MindShieldComponent>(args.Target))
{
_popupSystem.PopupEntity("Он имплантирован чипом защиты разума.", args.Performer, args.Performer);
@@ -94,14 +118,23 @@ public partial class CultSystem
private void OnTeleport(EntityUid uid, CultistComponent component, CultTeleportTargetActionEvent args)
{
if (!TryComp<BloodstreamComponent>(args.Performer, out var bloodstream) || !TryComp<ActorComponent>(uid, out var actor))
if (!TryComp<BloodstreamComponent>(args.Performer, out var bloodstream) ||
!TryComp<ActorComponent>(uid, out var actor))
return;
if (!TryComp<CultistComponent>(args.Target, out _) &&
!(TryComp<MobStateComponent>(args.Target, out var mobStateComponent) &&
mobStateComponent.CurrentState is not MobState.Alive))
if (HasComp<HolyComponent>(args.Target))
{
_popupSystem.PopupEntity("Цель должна быть культистом или лежать.", args.Performer, args.Performer);
_popupSystem.PopupEntity("Священная сила препятствует магии.", args.Performer, args.Performer);
return;
}
if (!HasComp<CultistComponent>(args.Target) && !HasComp<ConstructComponent>(args.Target) &&
(!TryComp<MobStateComponent>(args.Target, out var mobStateComponent) ||
mobStateComponent.CurrentState is MobState.Alive) &&
(!TryComp<CuffableComponent>(args.Target, out var cuffable) || cuffable.Container.Count == 0))
{
_popupSystem.PopupEntity("Цель должна быть культистом, быть связанной или лежать.", args.Performer,
args.Performer);
return;
}
@@ -147,25 +180,28 @@ public partial class CultSystem
totalBloodAmount += solutionContent.Quantity;
_bloodstreamSystem.TryModifyBloodLevel(uid, solutionContent.Quantity / 6f);
_bloodstreamSystem.TryModifyBloodLevel(uid, solutionContent.Quantity / 6f, bloodstreamComponent);
_solutionSystem.RemoveReagent((Entity<SolutionComponent>) solution, "Blood", FixedPoint2.MaxValue);
if (GetMissingBloodValue(bloodstreamComponent) == 0)
/*if (GetMissingBloodValue(bloodstreamComponent) == 0)
{
breakLoop = true;
}
}*/
}
}
if (totalBloodAmount == 0f)
{
return;
}
component.RitesBloodAmount += totalBloodAmount;
_audio.PlayPvs("/Audio/White/Cult/enter_blood.ogg", uid, AudioParams.Default);
_damageableSystem.TryChangeDamage(uid, new DamageSpecifier(bruteDamageGroup, -20));
_damageableSystem.TryChangeDamage(uid, new DamageSpecifier(burnDamageGroup, -20));
_popupSystem.PopupEntity(Loc.GetString("verb-blood-rites-message", ("blood", component.RitesBloodAmount)), uid,
uid);
args.Handled = true;
}
@@ -174,12 +210,165 @@ public partial class CultSystem
return bloodstreamComponent.BloodMaxVolume - bloodstreamComponent.BloodSolution!.Value.Comp.Solution.Volume;
}
private void OnConcealPresence(EntityUid uid, CultistComponent component, CultConcealPresenceWorldActionEvent args)
private void OnBloodSpearRecall(Entity<CultistComponent> ent, ref CultBloodSpearRecallInstantActionEvent args)
{
if (!TryComp<BloodstreamComponent>(args.Performer, out _))
if (ent.Comp.BloodSpear == null)
{
_bloodSpear.DetachSpearFromUser(ent);
return;
}
var spear = ent.Comp.BloodSpear.Value;
var xform = Transform(spear);
var coords = _transform.GetWorldPosition(xform);
var userCoords = _transform.GetWorldPosition(ent);
var distance = (userCoords - coords).Length();
if (distance > 10f)
{
_popupSystem.PopupEntity("Копьё слишком далеко!", ent, ent);
return;
}
TryComp<PhysicsComponent>(spear, out var physics);
_physics.SetBodyType(spear, BodyType.Dynamic, body: physics, xform: xform);
_transform.AttachToGridOrMap(spear, xform);
_transform.SetWorldPosition(xform, userCoords);
_handsSystem.TryPickupAnyHand(ent, spear, animate: false);
args.Handled = true;
}
private void OnConcealPresence(EntityUid uid, CultistComponent component, CultConcealPresenceInstantActionEvent args)
{
if (!TryComp<BloodstreamComponent>(args.Performer, out var bloodstream) ||
!TryComp<TransformComponent>(args.Performer, out var xform))
return;
var conceal = args is CultConcealInstantActionEvent;
var concealableQuery = GetEntityQuery<ConcealableComponent>();
var appearanceQuery = GetEntityQuery<AppearanceComponent>();
const float radius = 5f;
var entitiesInRange = _lookup.GetEntitiesInRange(_transform.GetMapCoordinates(xform), radius);
var success = false;
// Conceal/Reveal runes and structures
foreach (var ent in entitiesInRange)
{
if (!concealableQuery.TryGetComponent(ent, out var concealable) ||
!appearanceQuery.TryGetComponent(ent, out var appearance) ||
!EntityManager.MetaQuery.TryGetComponent(ent, out var meta))
continue;
if (concealable.Concealed == conceal)
continue;
_appearanceSystem.SetData(ent, ConcealableAppearance.Concealed, conceal, appearance);
concealable.Concealed = conceal;
RaiseLocalEvent(ent, new ConcealEvent(conceal));
if (concealable.ChangeMeta)
{
if (conceal)
{
_metaDataSystem.SetEntityName(ent, concealable.ConcealedName, meta);
_metaDataSystem.SetEntityDescription(ent, concealable.ConcealedDesc, meta);
}
else
{
_metaDataSystem.SetEntityName(ent, concealable.RevealedName, meta);
_metaDataSystem.SetEntityDescription(ent, concealable.RevealedDesc, meta);
}
}
Dirty(ent, concealable, meta);
success = true;
}
var gridUid = xform.GridUid;
var pos = xform.Coordinates;
var cultTileDef = (ContentTileDefinition) _tileDefinition[TileId];
var concealedTileDef = (ContentTileDefinition) _tileDefinition[ConcealedTileId];
// Conceal/Reveal tiles
if (TryComp(gridUid, out MapGridComponent? mapGrid))
{
var tileRefs = _mapSystem.GetLocalTilesIntersecting(gridUid.Value, mapGrid,
new Box2(pos.Position + new Vector2(-radius, -radius), pos.Position + new Vector2(radius, radius)));
foreach (var tile in tileRefs)
{
var tilePos = _turf.GetTileCenter(tile);
if (!pos.InRange(EntityManager, _transform, tilePos, radius))
continue;
if (conceal)
{
if (tile.Tile.TypeId != cultTileDef.TileId)
continue;
_tile.ReplaceTile(tile, concealedTileDef);
success = true;
}
else
{
if (tile.Tile.TypeId != concealedTileDef.TileId)
continue;
_tile.ReplaceTile(tile, cultTileDef);
success = true;
}
}
}
if (success)
{
_audio.PlayPvs(conceal ? "/Audio/White/Cult/smoke.ogg" : "/Audio/White/Cult/enter_blood.ogg", uid,
AudioParams.Default.WithMaxDistance(2f));
_bloodstreamSystem.TryModifyBloodLevel(uid, -2, bloodstream, createPuddle: false);
args.Handled = true;
}
var spellQuery = GetEntityQuery<ConcealPresenceSpellComponent>();
var actionQuery = GetEntityQuery<InstantActionComponent>();
// Alter spell concealing/revealing state
foreach (var empower in component.SelectedEmpowers)
{
if (empower == null)
continue;
var ent = GetEntity(empower.Value);
if (!spellQuery.TryGetComponent(ent, out var spell) ||
!actionQuery.TryGetComponent(ent, out var action))
continue;
if (conceal)
{
spell.Revealing = true;
action.Icon = spell.RevealIcon;
action.Event = spell.RevealEvent;
}
else
{
spell.Revealing = false;
action.Icon = spell.ConcealIcon;
action.Event = spell.ConcealEvent;
}
Dirty(ent, action);
}
}
private void OnSummonCombatEquipment(
EntityUid uid,
CultistComponent component,
@@ -300,7 +489,7 @@ public partial class CultSystem
var xform = Transform(args.Performer).Coordinates;
var dagger = _entityManager.SpawnEntity(RitualDaggerPrototypeId, xform);
_bloodstreamSystem.TryModifyBloodLevel(args.Performer, -20, bloodstreamComponent, false);
_bloodstreamSystem.TryModifyBloodLevel(args.Performer, -10, bloodstreamComponent, false);
_handsSystem.TryPickupAnyHand(args.Performer, dagger);
args.Handled = true;
}

View File

@@ -10,10 +10,12 @@ using Content.Server.Hands.Systems;
using Content.Server.Weapons.Ranged.Systems;
using Content.Server._White.Cult.GameRule;
using Content.Server._White.Cult.Runes.Comps;
using Content.Server._White.Cult.UI;
using Content.Server.Bible.Components;
using Content.Server.Chemistry.Components;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Server.Fluids.Components;
using Content.Server.Ghost;
using Content.Shared._White.Chaplain;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Cuffs.Components;
@@ -36,10 +38,13 @@ using Content.Shared._White.Cult.Components;
using Content.Shared._White.Cult.Runes;
using Content.Shared._White.Cult.UI;
using Content.Shared.Cuffs;
using Content.Shared.GameTicking;
using Content.Shared.Mindshield.Components;
using Content.Shared.Pulling;
using Content.Shared.UserInterface;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Components;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Map;
using Robust.Shared.Physics.Events;
@@ -92,7 +97,8 @@ public sealed partial class CultSystem : EntitySystem
SubscribeLocalEvent<CultEmpowerComponent, ActivateInWorldEvent>(OnActiveInWorld);
// UI
SubscribeLocalEvent<RuneDrawerProviderComponent, UseInHandEvent>(OnRuneDrawerUseInHand);
SubscribeLocalEvent<RuneDrawerProviderComponent, ActivatableUIOpenAttemptEvent>(OnRuneDrawAttempt);
SubscribeLocalEvent<RuneDrawerProviderComponent, BeforeActivatableUIOpenEvent>(BeforeRuneDraw);
SubscribeLocalEvent<RuneDrawerProviderComponent, ListViewItemSelectedMessage>(OnRuneSelected);
SubscribeLocalEvent<CultTeleportRuneProviderComponent, TeleportRunesListWindowItemSelectedMessage>(
OnTeleportRuneSelected);
@@ -107,6 +113,8 @@ public sealed partial class CultSystem : EntitySystem
SubscribeLocalEvent<CultRuneBaseComponent, CultEraseEvent>(OnErase);
SubscribeLocalEvent<CultRuneBaseComponent, StartCollideEvent>(HandleCollision);
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundRestart);
InitializeBuffSystem();
InitializeNarsie();
InitializeSoulShard();
@@ -134,30 +142,30 @@ public sealed partial class CultSystem : EntitySystem
private readonly SoundPathSpecifier _magic = new("/Audio/White/Cult/magic.ogg");
private readonly SoundPathSpecifier _apocRuneStartDrawing = new("/Audio/White/Cult/startdraw.ogg");
private readonly SoundPathSpecifier _apocRuneEndDrawing = new("/Audio/White/Cult/finisheddraw.ogg");
private readonly SoundPathSpecifier _narsie40Sec = new("/Audio/White/Cult/40sec.ogg");
private Entity<AudioComponent>? _narsieSummonningAudio = null;
private void OnRoundRestart(RoundRestartCleanupEvent ev)
{
CultRuneReviveComponent.ChargesLeft = 3;
}
/*
* Rune draw start ----
*/
private void OnRuneDrawerUseInHand(EntityUid uid, RuneDrawerProviderComponent component, UseInHandEvent args)
private void OnRuneDrawAttempt(Entity<RuneDrawerProviderComponent> ent, ref ActivatableUIOpenAttemptEvent args)
{
if (!_ui.TryGetUi(uid, component.UserInterfaceKey, out _))
return;
if (!TryComp<ActorComponent>(args.User, out var actorComponent))
return;
if (!HasComp<CultistComponent>(args.User))
return;
if (_ui.TryGetUi(uid, ListViewSelectorUiKey.Key, out var bui))
{
_ui.SetUiState(bui, new ListViewBUIState(component.RunePrototypes, false));
_ui.OpenUi(bui, actorComponent.PlayerSession);
args.Cancel();
}
private void BeforeRuneDraw(Entity<RuneDrawerProviderComponent> ent, ref BeforeActivatableUIOpenEvent args)
{
if (_ui.TryGetUi(ent, ListViewSelectorUiKey.Key, out var bui))
_ui.SetUiState(bui, new ListViewBUIState(ent.Comp.RunePrototypes, true));
}
private void OnRuneSelected(EntityUid uid, RuneDrawerProviderComponent component, ListViewItemSelectedMessage args)
@@ -185,16 +193,20 @@ public sealed partial class CultSystem : EntitySystem
if (HasComp<CultBuffComponent>(whoCalled))
_timeToDraw /= 2;
if (runePrototype == ApocalypseRunePrototypeId)
{
_timeToDraw = 120.0f;
_chat.DispatchGlobalAnnouncement(Loc.GetString("cult-started-drawing-rune-end"), "CULT", true,
_apocRuneStartDrawing, colorOverride: Color.DarkRed);
}
if (!IsAllowedToDraw(whoCalled))
return false;
if (runePrototype == ApocalypseRunePrototypeId)
{
if (!_mindSystem.TryGetMind(whoCalled, out _, out var mind) ||
mind.Session is not { } playerSession)
return false;
_euiManager.OpenEui(new ApocalypseRuneEui(whoCalled, _entityManager), playerSession);
return true;
}
var ev = new CultDrawEvent
{
Rune = runePrototype
@@ -769,7 +781,7 @@ public sealed partial class CultSystem : EntitySystem
_chat.DispatchGlobalAnnouncement(Loc.GetString("cult-ritual-started"), "CULT", false,
colorOverride: Color.DarkRed);
_audio.PlayGlobal(_narsie40Sec, Filter.Broadcast(), false, AudioParams.Default.WithLoop(true).WithVolume(0.15f));
_narsieSummonningAudio = _audio.PlayGlobal(_narsie40Sec, Filter.Broadcast(), false, AudioParams.Default.WithLoop(true).WithVolume(0.15f));
return true;
}
@@ -778,6 +790,8 @@ public sealed partial class CultSystem : EntitySystem
{
_doAfterAlreadyStarted = false;
_audio.Stop(_narsieSummonningAudio?.Owner, _narsieSummonningAudio?.Comp);
if (args.Cancelled)
{
_chat.DispatchGlobalAnnouncement(Loc.GetString("cult-ritual-prevented"), "CULT", false,
@@ -790,13 +804,13 @@ public sealed partial class CultSystem : EntitySystem
if (transform == null)
return;
_entityManager.SpawnEntity(NarsiePrototypeId, transform.Value);
_chat.DispatchGlobalAnnouncement(Loc.GetString("cult-narsie-summoned"), "CULT", true, _apocRuneEndDrawing,
colorOverride: Color.DarkRed);
var ev = new CultNarsieSummoned();
RaiseLocalEvent(ev);
_entityManager.SpawnEntity(NarsiePrototypeId, transform.Value);
//_chat.DispatchGlobalAnnouncement(Loc.GetString("cult-narsie-summoned"), "CULT", true, _apocRuneEndDrawing,
// colorOverride: Color.DarkRed);
}
/*
@@ -852,6 +866,27 @@ public sealed partial class CultSystem : EntitySystem
CultRuneReviveComponent.ChargesLeft--;
_entityManager.EventBus.RaiseLocalEvent(target, new RejuvenateEvent());
EntityUid? transferTo = null;
if (!_mindSystem.TryGetMind(target, out var mindId, out var mind))
{
if (!TryComp<CultistComponent>(target, out var cultist) || cultist.OriginalMind == null)
return true;
(mindId, mind) = cultist.OriginalMind.Value;
transferTo = target;
}
if (mind.Session is not { } playerSession)
return true;
// notify them they're being revived.
if (mind.CurrentEntity != target)
{
_euiManager.OpenEui(new ReturnToBodyEui(mind, _mindSystem, mindId, transferTo), playerSession);
}
return true;
}
@@ -1258,6 +1293,8 @@ public sealed partial class CultSystem : EntitySystem
return;
}
var damage = 10;
if (rune == ApocalypseRunePrototypeId)
{
if (!_entityManager.TryGetComponent(uid, out TransformComponent? transComp))
@@ -1265,6 +1302,7 @@ public sealed partial class CultSystem : EntitySystem
return;
}
damage = 40;
var pos = transComp.MapPosition;
var x = (int) pos.X;
var y = (int) pos.Y;
@@ -1273,7 +1311,7 @@ public sealed partial class CultSystem : EntitySystem
"CULT", true, _apocRuneEndDrawing, colorOverride: Color.DarkRed);
}
var damageSpecifier = new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>("Slash"), 10);
var damageSpecifier = new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>("Slash"), damage);
_damageableSystem.TryChangeDamage(uid, damageSpecifier, true, false);
_xform.AttachToGridOrMap(_entityManager.SpawnEntity(rune, transform.Value));

View File

@@ -2,6 +2,7 @@ using System.Linq;
using Content.Server.Body.Components;
using Content.Shared._White.Cult;
using Content.Shared._White.Cult.Components;
using Content.Shared._White.Cult.UI;
using Content.Shared.DoAfter;
using Content.Shared.Verbs;
using Robust.Shared.Player;
@@ -16,6 +17,7 @@ public sealed partial class CultSystem
SubscribeLocalEvent<CultistComponent, CultEmpowerSelectedBuiMessage>(OnCultistEmpowerSelected);
SubscribeLocalEvent<CultistComponent, CultEmpowerRemoveBuiMessage>(OnCultistEmpowerRemove);
SubscribeLocalEvent<CultistComponent, SpellCreatedEvent>(OnSpellCreated);
SubscribeLocalEvent<CultistComponent, CultistFactoryItemSelectedMessage>(OnBloodRitesSelected);
}
private void OnCultistEmpowerRemove(Entity<CultistComponent> ent, ref CultEmpowerRemoveBuiMessage args)
@@ -28,7 +30,7 @@ public sealed partial class CultSystem
private void OnSpellCreated(EntityUid ent, CultistComponent comp, SpellCreatedEvent args)
{
if (args.Cancelled || comp.SelectedEmpowers.Count >= 1)
if (args.Cancelled || comp.SelectedEmpowers.Count >= 2)
return;
var action = CultistComponent.CultistActions.FirstOrDefault(x => x.Equals(args.Spell));
@@ -55,7 +57,7 @@ public sealed partial class CultSystem
if (action == null)
return;
if (comp.SelectedEmpowers.Count >= 1)
if (comp.SelectedEmpowers.Count >= 2)
{
_popupSystem.PopupEntity(Loc.GetString("verb-spell-create-too-much"), ent, ent);
return;
@@ -98,8 +100,24 @@ public sealed partial class CultSystem
}
};
var bloodRitesVerb = new Verb
{
Text = Loc.GetString("verb-blood-rites-text"),
Message = Loc.GetString("verb-blood-rites-message", ("blood", ent.Comp.RitesBloodAmount)),
Category = VerbCategory.Cult,
Act = () =>
{
if (!_ui.TryGetUi(ent, BloodRitesUi.Key, out var bui))
return;
_ui.SetUiState(bui, new CultistFactoryBUIState(ent.Comp.BloodRites));
_ui.OpenUi(bui, actor.PlayerSession);
}
};
args.Verbs.Add(createSpellVerb);
args.Verbs.Add(removeSpellVerb);
args.Verbs.Add(bloodRitesVerb);
}
private void RemoveSpell(Entity<CultistComponent> ent, ICommonSession session)
@@ -112,4 +130,36 @@ public sealed partial class CultSystem
_ui.TryOpen(ent, CultEmpowerRemoveUiKey.Key, session);
}
private void OnBloodRitesSelected(Entity<CultistComponent> ent, ref CultistFactoryItemSelectedMessage args)
{
if (!_prototypeManager.TryIndex<CultistFactoryProductionPrototype>(args.Item, out var prototype))
return;
if (ent.Comp.RitesBloodAmount < prototype.BloodCost)
{
var message = Loc.GetString("verb-blood-rites-no-blood", ("required", prototype.BloodCost),
("blood", ent.Comp.RitesBloodAmount));
_popupSystem.PopupEntity(message, ent, ent);
return;
}
var success = false;
foreach (var item in prototype.Item)
{
var entity = Spawn(item, Transform(ent).Coordinates);
if (_handsSystem.TryPickupAnyHand(ent, entity))
{
success = true;
continue;
}
_popupSystem.PopupEntity(Loc.GetString("verb-blood-rites-no-hand"), ent, ent);
QueueDel(entity);
break;
}
if (success)
ent.Comp.RitesBloodAmount -= prototype.BloodCost;
}
}

View File

@@ -1,13 +1,19 @@
using Content.Server.Doors.Systems;
using Content.Server.Cuffs;
using Content.Server.Doors.Systems;
using Content.Shared._White.Chaplain;
using Content.Shared.Doors;
using Content.Shared.Humanoid;
using Content.Shared.Stunnable;
using Content.Shared._White.Cult;
using Content.Shared._White.Cult.Components;
using Content.Shared._White.Cult.Systems;
using Content.Shared.Cuffs.Components;
using Content.Shared.Doors.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.Weapons.Melee.Components;
using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Systems;
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
@@ -19,6 +25,9 @@ public sealed class RunicDoorSystem : EntitySystem
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly OccluderSystem _occluder = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly CuffableSystem _cuffable = default!;
public override void Initialize()
{
@@ -27,6 +36,31 @@ public sealed class RunicDoorSystem : EntitySystem
SubscribeLocalEvent<RunicDoorComponent, BeforeDoorOpenedEvent>(OnBeforeDoorOpened);
SubscribeLocalEvent<RunicDoorComponent, BeforeDoorClosedEvent>(OnBeforeDoorClosed);
SubscribeLocalEvent<RunicDoorComponent, AttackedEvent>(OnGetAttacked);
SubscribeLocalEvent<RunicDoorComponent, ConcealEvent>(OnConceal);
}
private void OnConceal(Entity<RunicDoorComponent> ent, ref ConcealEvent args)
{
if (!TryComp(ent, out MetaDataComponent? meta))
return;
if (TryComp(ent, out PhysicsComponent? physics))
_occluder.SetEnabled(ent, args.Conceal && physics.CanCollide, meta: meta);
if (TryComp(ent, out DoorComponent? door))
{
door.Occludes = args.Conceal;
Dirty(ent, door, meta);
}
if (!TryComp(ent, out MeleeSoundComponent? meleeSound) || meleeSound.SoundGroups == null)
return;
meleeSound.SoundGroups["Brute"] = args.Conceal
? new SoundPathSpecifier("/Audio/Weapons/smash.ogg")
: new SoundCollectionSpecifier("GlassSmash");
Dirty(ent, meleeSound, meta);
}
private void OnGetAttacked(Entity<RunicDoorComponent> ent, ref AttackedEvent args)
@@ -79,7 +113,8 @@ public sealed class RunicDoorSystem : EntitySystem
_doorSystem.Deny(airlock);
if (!HasComp<HumanoidAppearanceComponent>(user) || HasComp<HolyComponent>(user))
if (!HasComp<HumanoidAppearanceComponent>(user) || HasComp<HolyComponent>(user) ||
TryComp(airlock, out ConcealableComponent? concealable) && concealable.Concealed)
return false;
var direction = Transform(user).MapPosition.Position - Transform(airlock).MapPosition.Position;
@@ -90,4 +125,11 @@ public sealed class RunicDoorSystem : EntitySystem
_stunSystem.TryParalyze(user, TimeSpan.FromSeconds(3), true);
return false;
}
public bool CanBumpOpen(EntityUid uid, EntityUid otherUid)
{
return !HasComp<RunicDoorComponent>(uid) || !HasComp<ConstructComponent>(otherUid) &&
(!HasComp<CultistComponent>(otherUid) || !_mobState.IsAlive(otherUid) ||
TryComp(otherUid, out CuffableComponent? cuffable) && _cuffable.GetAllCuffs(cuffable).Count > 0);
}
}

View File

@@ -5,6 +5,7 @@ using Content.Shared.Interaction;
using Content.Shared.Popups;
using Content.Shared._White.Cult;
using Content.Shared._White.Cult.Structures;
using Content.Shared._White.Cult.Systems;
using Content.Shared._White.Cult.UI;
using Robust.Server.GameObjects;
using Robust.Shared.Audio.Systems;
@@ -28,6 +29,7 @@ public sealed class CultistFactorySystem : EntitySystem
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly PhysicsSystem _physics = default!;
private const string RitualDaggerPrototypeId = "RitualDagger";
@@ -42,6 +44,12 @@ public sealed class CultistFactorySystem : EntitySystem
SubscribeLocalEvent<CultistFactoryComponent, InteractUsingEvent>(TryToggleAnchor);
SubscribeLocalEvent<CultistFactoryComponent, CultAnchorDoAfterEvent>(OnAnchorDoAfter);
SubscribeLocalEvent<CultistFactoryComponent, ExaminedEvent>(OnExamine);
SubscribeLocalEvent<CultistFactoryComponent, ConcealEvent>(OnConceal);
}
private void OnConceal(Entity<CultistFactoryComponent> ent, ref ConcealEvent args)
{
_physics.SetCanCollide(ent, !args.Conceal);
}
public override void Update(float frameTime)

View File

@@ -0,0 +1,61 @@
using Content.Server.Chat.Systems;
using Content.Server.DoAfter;
using Content.Server.EUI;
using Content.Shared._White.Cult.Runes;
using Content.Shared._White.Cult.UI;
using Content.Shared.DoAfter;
using Content.Shared.Eui;
using Robust.Server.Audio;
using Robust.Shared.Audio;
namespace Content.Server._White.Cult.UI;
public sealed class ApocalypseRuneEui : BaseEui
{
private readonly SoundPathSpecifier _apocRuneStartDrawing = new("/Audio/White/Cult/startdraw.ogg");
private const string ApocalypseRunePrototypeId = "ApocalypseRune";
private readonly EntityUid _whoCalled;
private readonly IEntityManager _entityManager;
public ApocalypseRuneEui(EntityUid whoCalled, IEntityManager entityManager)
{
_whoCalled = whoCalled;
_entityManager = entityManager;
}
public override void HandleMessage(EuiMessageBase msg)
{
base.HandleMessage(msg);
if (msg is not ApocalypseRuneDrawMessage {Accepted: true})
{
Close();
return;
}
var ev = new CultDrawEvent
{
Rune = ApocalypseRunePrototypeId
};
var argsDoAfterEvent = new DoAfterArgs(_entityManager, _whoCalled, 120f, ev, _whoCalled)
{
BreakOnUserMove = true,
NeedHand = true
};
if (!_entityManager.System<DoAfterSystem>().TryStartDoAfter(argsDoAfterEvent))
{
Close();
return;
}
_entityManager.System<ChatSystem>().DispatchGlobalAnnouncement(Loc.GetString("cult-started-drawing-rune-end"),
"CULT", true, _apocRuneStartDrawing, colorOverride: Color.DarkRed);
_entityManager.System<AudioSystem>().PlayPvs("/Audio/White/Cult/butcher.ogg", _whoCalled,
AudioParams.Default.WithMaxDistance(2f));
Close();
}
}

View File

@@ -1,3 +1,4 @@
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Prototypes;
@@ -12,6 +13,9 @@ namespace Content.Server.Abilities.Felinid
[DataField("hairballPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string HairballPrototype = "Hairball";
[DataField]
public SoundSpecifier MouseEatingSound = new SoundCollectionSpecifier("eating");
public EntityUid? HairballAction;
public EntityUid? EatMouseAction;

View File

@@ -137,7 +137,7 @@ namespace Content.Server.Abilities.Felinid
Del(component.PotentialTarget.Value);
component.PotentialTarget = null;
_audio.PlayPvs("/Audio/Items/eatfood.ogg", uid, AudioParams.Default.WithVariation(0.15f));
_audio.PlayPvs(component.MouseEatingSound, uid, AudioParams.Default.WithVariation(0.15f));
_hungerSystem.ModifyHunger(uid, 70f, hunger);

View File

@@ -0,0 +1,116 @@
using Content.Server.Emp;
using Content.Server.Power.Components;
using Content.Shared.Examine;
using Content.Shared.Inventory.Events;
using Content.Shared._White.MagGloves;
using Content.Shared.Popups;
using Robust.Shared.Containers;
using Robust.Shared.Timing;
namespace Content.Server._White.MagGloves;
/// <summary>
/// This handles...
/// </summary>
public sealed class MagneticGlovesSystem : EntitySystem
{
[Dependency] private readonly SharedContainerSystem _sharedContainer = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
/// <inheritdoc/>
public override void Initialize()
{
SubscribeLocalEvent<MagneticGlovesComponent, GotEquippedEvent>(OnGotEquipped);
SubscribeLocalEvent<MagneticGlovesComponent, GotUnequippedEvent>(OnGotUnequipped);
SubscribeLocalEvent<MagneticGlovesComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<MagneticGlovesComponent, EmpPulseEvent>(OnEmp);
}
public override void Update(float frameTime)
{
var query = EntityQueryEnumerator<MagneticGlovesComponent>();
while (query.MoveNext(out var uid, out var gloves))
{
if (_gameTiming.CurTime > gloves.GlovesLastActivation + gloves.GlovesActiveTime && gloves.Enabled)
{
RaiseLocalEvent(uid, new ToggleMagneticGlovesEvent());
}
}
}
public void OnEmp(EntityUid uid, MagneticGlovesComponent component, EmpPulseEvent args)
{
if (component.Enabled)
{
RaiseLocalEvent(uid, new ToggleMagneticGlovesEvent());
}
}
public void OnGotUnequipped(EntityUid uid, MagneticGlovesComponent component, GotUnequippedEvent args)
{
if (args.Slot == "gloves")
{
ToggleGloves(args.Equipee, component, false, uid);
}
if (component.Enabled)
{
_popup.PopupEntity(Loc.GetString("maggloves-deactivated"), uid, args.Equipee);
RaiseLocalEvent(uid, new ToggleMagneticGlovesEvent());
}
}
public void OnGotEquipped(EntityUid uid, MagneticGlovesComponent component, GotEquippedEvent args)
{
if (args.Slot == "gloves")
{
ToggleGloves(args.Equipee, component, true, uid);
}
}
public void ToggleGloves(EntityUid owner, MagneticGlovesComponent component, bool active, EntityUid uid)
{
if (!active)
{
RemComp<KeepItemsOnFallComponent>(owner);
if (TryComp<MagneticGlovesAdvancedComponent>(uid, out var adv))
{
RemComp<PreventDisarmComponent>(owner);
RemComp<PreventStrippingFromHandsAndGlovesComponent>(owner);
}
}
else if (component.Enabled)
{
EnsureComp<KeepItemsOnFallComponent>(owner);
if (TryComp<MagneticGlovesAdvancedComponent>(uid, out var adv))
{
EnsureComp<PreventDisarmComponent>(owner);
EnsureComp<PreventStrippingFromHandsAndGlovesComponent>(owner);
}
}
}
public void OnExamined(EntityUid uid, MagneticGlovesComponent component, ExaminedEvent args)
{
if (!args.IsInDetailsRange)
return;
var message = Loc.GetString("maggloves-ready-in") + " " + component.GlovesReadyAt.Subtract(_gameTiming.CurTime).TotalSeconds.ToString("0");
if (component.GlovesReadyAt < _gameTiming.CurTime)
{
message = Loc.GetString("maggloves-ready");
}
if (component.Enabled)
{
message = Loc.GetString("maggloves-enabled-till") + " " + (component.GlovesLastActivation
.Add(component.GlovesActiveTime).Subtract(_gameTiming.CurTime).TotalSeconds.ToString("0"));
}
args.PushMarkup(message);
}
}

View File

@@ -67,7 +67,7 @@ public sealed class CritSystem : EntitySystem
args.BonusDamage = new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>("Slash"),
damage - args.BaseDamage.GetTotal());
_popup.PopupEntity($@"Crit! {damage}", args.User, PopupType.MediumCaution);
_popup.PopupEntity($"Crit! {damage}", args.User, args.User, PopupType.MediumCaution);
}
}

View File

@@ -123,10 +123,10 @@ public abstract class SharedTentacleGun : EntitySystem
foreach (var activeItem in _handsSystem.EnumerateHeld(args.Embedded))
{
if(!TryComp<PhysicsComponent>(activeItem, out var physicsComponent))
return;
continue;
var coords = Transform(args.Embedded).Coordinates;
_handsSystem.TryDrop(args.Embedded, coords);
_handsSystem.TryDrop(args.Embedded, activeItem, coords);
var force = physicsComponent.Mass * 2.5f / 2;
@@ -137,7 +137,7 @@ public abstract class SharedTentacleGun : EntitySystem
private bool PullMob(ProjectileEmbedEvent args)
{
var stunTime = _random.Next(TimeSpan.FromSeconds(2), TimeSpan.FromSeconds(5));
var stunTime = _random.Next(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(3));
if (!_stunSystem.TryParalyze(args.Embedded, stunTime, true))
return false;

View File

@@ -0,0 +1,42 @@
using Content.Shared.DoAfter;
using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Chemistry.Components;
[Serializable, NetSerializable]
public sealed partial class PatchDoAfterEvent : SimpleDoAfterEvent
{
}
/// <summary>
/// Implements draw/inject behavior for droppers and syringes.
/// </summary>
/// <remarks>
/// Can optionally support both
/// injection and drawing or just injection. Can inject/draw reagents from solution
/// containers, and can directly inject into a mobs bloodstream.
/// </remarks>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class PatchComponent : Component
{
[ViewVariables, AutoNetworkedField]
public FixedPoint2 CurrentVolume;
[ViewVariables, AutoNetworkedField]
public FixedPoint2 TotalVolume;
[DataField("solutionName")]
public string SolutionName = "patch";
[DataField("onlyMobs")]
public bool OnlyMobs = true;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("delay")]
public TimeSpan Delay = TimeSpan.FromSeconds(5);
}

View File

@@ -1,4 +1,5 @@
using System.Linq;
using Content.Shared._White.Cult.Components;
using Content.Shared.Examine;
using Content.Shared.Hands.Components;
using Content.Shared.IdentityManagement;
@@ -7,12 +8,15 @@ using Content.Shared.Inventory.VirtualItem;
using Content.Shared.Localizations;
using Robust.Shared.Input.Binding;
using Robust.Shared.Map;
using Robust.Shared.Network;
using Robust.Shared.Player;
namespace Content.Shared.Hands.EntitySystems;
public abstract partial class SharedHandsSystem : EntitySystem
{
[Dependency] private readonly INetManager _net = default!; // WD
private void InitializeInteractions()
{
SubscribeAllEvent<RequestSetHandEvent>(HandleSetHand);
@@ -95,7 +99,17 @@ public abstract partial class SharedHandsSystem : EntitySystem
private bool DropPressed(ICommonSession? session, EntityCoordinates coords, EntityUid netEntity)
{
if (TryComp(session?.AttachedEntity, out HandsComponent? hands) && hands.ActiveHand != null)
// WD EDIT START
{
if (HasComp<BoltBarrageComponent>(hands.ActiveHandEntity))
{
if (_net.IsServer)
QueueDel(hands.ActiveHandEntity.Value);
return false;
}
TryDrop(session.AttachedEntity.Value, hands.ActiveHand, coords, handsComp: hands);
}
// WD EDIT END
// always send to server.
return false;

View File

@@ -56,6 +56,7 @@ namespace Content.Shared.Input
public static readonly BoundKeyFunction ZoomOut = "ZoomOut";
public static readonly BoundKeyFunction ZoomIn = "ZoomIn";
public static readonly BoundKeyFunction ResetZoom = "ResetZoom";
public static readonly BoundKeyFunction LieDown = "LieDown"; // WD EDIT
public static readonly BoundKeyFunction ArcadeUp = "ArcadeUp";
public static readonly BoundKeyFunction ArcadeDown = "ArcadeDown";

Some files were not shown because too many files have changed in this diff Show More