- add: new tiles and another ui tweaks (#11)
* - fix: audio crash * - tweak: main menu * connect gui * some shaders here * tiles
@@ -1,5 +1,6 @@
|
||||
using Content.Client._White.JoinQueue;
|
||||
using Content.Client._White.Jukebox;
|
||||
using Content.Client._White.Overlays;
|
||||
using Content.Client._White.Reputation;
|
||||
using Content.Client._White.Sponsors;
|
||||
using Content.Client._White.Stalin;
|
||||
@@ -178,6 +179,8 @@ namespace Content.Client.Entry
|
||||
_overlayManager.AddOverlay(new SingularityOverlay());
|
||||
_overlayManager.AddOverlay(new FlashOverlay());
|
||||
_overlayManager.AddOverlay(new RadiationPulseOverlay());
|
||||
_overlayManager.AddOverlay(new GrainOverlay());
|
||||
_overlayManager.AddOverlay(new AtmOverlay());
|
||||
_chatManager.Initialize();
|
||||
_clientPreferencesManager.Initialize();
|
||||
_euiManager.Initialize();
|
||||
|
||||
@@ -1,70 +1,96 @@
|
||||
<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 />
|
||||
|
||||
<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" />
|
||||
|
||||
<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" />
|
||||
|
||||
<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>
|
||||
|
||||
</Control>
|
||||
<!-- Bottom window for tips -->
|
||||
<PanelContainer Name="LoginTips" StyleClasses="AngleRect" Margin="0 10" MaxWidth="600" VerticalExpand="True" VerticalAlignment="Bottom">
|
||||
<BoxContainer Orientation="Vertical" VerticalExpand="True">
|
||||
<controls:StripeBack>
|
||||
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Label Name="LoginTipTitle" Text="Tip" StyleClasses="LabelHeading" Align="Center"/>
|
||||
</BoxContainer>
|
||||
</controls:StripeBack>
|
||||
<BoxContainer Orientation="Vertical" Margin="5 5 5 5" >
|
||||
<RichTextLabel Name="LoginTip" VerticalExpand="True" />
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
|
||||
</Control>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System.Linq;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Dataset;
|
||||
@@ -7,133 +6,130 @@ using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Client.Launcher
|
||||
namespace Content.Client.Launcher;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class LauncherConnectingGui : Control
|
||||
{
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class LauncherConnectingGui : Control
|
||||
private const float RedialWaitTimeSeconds = 15f;
|
||||
private readonly LauncherConnecting _state;
|
||||
private readonly IRobustRandom _random;
|
||||
private readonly IPrototypeManager _prototype;
|
||||
private readonly IConfigurationManager _cfg;
|
||||
|
||||
private float _redialWaitTime = RedialWaitTimeSeconds;
|
||||
|
||||
public LauncherConnectingGui(LauncherConnecting state, IRobustRandom random,
|
||||
IPrototypeManager prototype, IConfigurationManager config)
|
||||
{
|
||||
private const float RedialWaitTimeSeconds = 15f;
|
||||
private readonly LauncherConnecting _state;
|
||||
private readonly IRobustRandom _random;
|
||||
private readonly IPrototypeManager _prototype;
|
||||
private readonly IConfigurationManager _cfg;
|
||||
_state = state;
|
||||
_random = random;
|
||||
_prototype = prototype;
|
||||
_cfg = config;
|
||||
|
||||
private float _redialWaitTime = RedialWaitTimeSeconds;
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
public LauncherConnectingGui(LauncherConnecting state, IRobustRandom random,
|
||||
IPrototypeManager prototype, IConfigurationManager config)
|
||||
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
|
||||
|
||||
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
|
||||
|
||||
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 += _ =>
|
||||
{
|
||||
_state = state;
|
||||
_random = random;
|
||||
_prototype = prototype;
|
||||
_cfg = config;
|
||||
if (!_state.Redial())
|
||||
_state.RetryConnect();
|
||||
};
|
||||
RetryButton.OnPressed += _ => _state.RetryConnect();
|
||||
ExitButton.OnPressed += _ => _state.Exit();
|
||||
|
||||
RobustXamlLoader.Load(this);
|
||||
var addr = state.Address;
|
||||
if (addr != null)
|
||||
ConnectingAddress.Text = addr;
|
||||
|
||||
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
|
||||
state.PageChanged += OnPageChanged;
|
||||
state.ConnectFailReasonChanged += ConnectFailReasonChanged;
|
||||
state.ConnectionStateChanged += ConnectionStateChanged;
|
||||
|
||||
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
|
||||
ConnectionStateChanged(state.ConnectionState);
|
||||
|
||||
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 += _ =>
|
||||
{
|
||||
if (!_state.Redial())
|
||||
_state.RetryConnect();
|
||||
};
|
||||
RetryButton.OnPressed += _ => _state.RetryConnect();
|
||||
ExitButton.OnPressed += _ => _state.Exit();
|
||||
// Redial flag setup
|
||||
var edim = IoCManager.Resolve<ExtendedDisconnectInformationManager>();
|
||||
edim.LastNetDisconnectedArgsChanged += LastNetDisconnectedArgsChanged;
|
||||
LastNetDisconnectedArgsChanged(edim.LastNetDisconnectedArgs);
|
||||
}
|
||||
|
||||
var addr = state.Address;
|
||||
if (addr != null)
|
||||
ConnectingAddress.Text = addr;
|
||||
private void ConnectFailReasonChanged(string? reason)
|
||||
{
|
||||
ConnectFailReason.SetMessage(reason == null
|
||||
? ""
|
||||
: Loc.GetString("connecting-fail-reason", ("reason", reason)));
|
||||
}
|
||||
|
||||
state.PageChanged += OnPageChanged;
|
||||
state.ConnectFailReasonChanged += ConnectFailReasonChanged;
|
||||
state.ConnectionStateChanged += ConnectionStateChanged;
|
||||
private void LastNetDisconnectedArgsChanged(NetDisconnectedArgs? args)
|
||||
{
|
||||
var redialFlag = args?.RedialFlag ?? false;
|
||||
RedialButton.Visible = redialFlag;
|
||||
ReconnectButton.Visible = !redialFlag;
|
||||
}
|
||||
|
||||
ConnectionStateChanged(state.ConnectionState);
|
||||
private void ChangeLoginTip()
|
||||
{
|
||||
var tipsDataset = _cfg.GetCVar(CCVars.LoginTipsDataset);
|
||||
var loginTipsEnabled = _prototype.TryIndex<DatasetPrototype>(tipsDataset, out var tips);
|
||||
|
||||
// Redial flag setup
|
||||
var edim = IoCManager.Resolve<ExtendedDisconnectInformationManager>();
|
||||
edim.LastNetDisconnectedArgsChanged += LastNetDisconnectedArgsChanged;
|
||||
LastNetDisconnectedArgsChanged(edim.LastNetDisconnectedArgs);
|
||||
//LoginTips.Visible = loginTipsEnabled;
|
||||
if (!loginTipsEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
private void ConnectFailReasonChanged(string? reason)
|
||||
var tipList = tips!.Values;
|
||||
|
||||
if (tipList.Count == 0)
|
||||
return;
|
||||
|
||||
var randomIndex = _random.Next(tipList.Count);
|
||||
var tip = tipList[randomIndex];
|
||||
//LoginTip.SetMessage(tip);
|
||||
|
||||
//LoginTipTitle.Text = Loc.GetString("connecting-window-tip", ("numberTip", randomIndex));
|
||||
}
|
||||
|
||||
protected override void FrameUpdate(FrameEventArgs args)
|
||||
{
|
||||
base.FrameUpdate(args);
|
||||
_redialWaitTime -= args.DeltaSeconds;
|
||||
if (_redialWaitTime <= 0)
|
||||
{
|
||||
ConnectFailReason.SetMessage(reason == null
|
||||
? ""
|
||||
: Loc.GetString("connecting-fail-reason", ("reason", reason)));
|
||||
RedialButton.Disabled = false;
|
||||
RedialButton.Text = Loc.GetString("connecting-redial");
|
||||
}
|
||||
|
||||
private void LastNetDisconnectedArgsChanged(NetDisconnectedArgs? args)
|
||||
else
|
||||
{
|
||||
var redialFlag = args?.RedialFlag ?? false;
|
||||
RedialButton.Visible = redialFlag;
|
||||
ReconnectButton.Visible = !redialFlag;
|
||||
}
|
||||
|
||||
private void ChangeLoginTip()
|
||||
{
|
||||
var tipsDataset = _cfg.GetCVar(CCVars.LoginTipsDataset);
|
||||
var loginTipsEnabled = _prototype.TryIndex<DatasetPrototype>(tipsDataset, out var tips);
|
||||
|
||||
LoginTips.Visible = loginTipsEnabled;
|
||||
if (!loginTipsEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var tipList = tips!.Values;
|
||||
|
||||
if (tipList.Count == 0)
|
||||
return;
|
||||
|
||||
var randomIndex = _random.Next(tipList.Count);
|
||||
var tip = tipList[randomIndex];
|
||||
LoginTip.SetMessage(tip);
|
||||
|
||||
LoginTipTitle.Text = Loc.GetString("connecting-window-tip", ("numberTip", randomIndex));
|
||||
}
|
||||
|
||||
protected override void FrameUpdate(FrameEventArgs args)
|
||||
{
|
||||
base.FrameUpdate(args);
|
||||
_redialWaitTime -= args.DeltaSeconds;
|
||||
if (_redialWaitTime <= 0)
|
||||
{
|
||||
RedialButton.Disabled = false;
|
||||
RedialButton.Text = Loc.GetString("connecting-redial");
|
||||
}
|
||||
else
|
||||
{
|
||||
RedialButton.Disabled = true;
|
||||
RedialButton.Text = Loc.GetString("connecting-redial-wait", ("time", _redialWaitTime.ToString("00.000")));
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPageChanged(LauncherConnecting.Page page)
|
||||
{
|
||||
ConnectingStatus.Visible = page == LauncherConnecting.Page.Connecting;
|
||||
ConnectFail.Visible = page == LauncherConnecting.Page.ConnectFailed;
|
||||
Disconnected.Visible = page == LauncherConnecting.Page.Disconnected;
|
||||
|
||||
if (page == LauncherConnecting.Page.Disconnected)
|
||||
DisconnectReason.Text = _state.LastDisconnectReason;
|
||||
}
|
||||
|
||||
private void ConnectionStateChanged(ClientConnectionState state)
|
||||
{
|
||||
ConnectStatus.Text = Loc.GetString($"connecting-state-{state}");
|
||||
RedialButton.Disabled = true;
|
||||
RedialButton.Text = Loc.GetString("connecting-redial-wait", ("time", _redialWaitTime.ToString("00.000")));
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPageChanged(LauncherConnecting.Page page)
|
||||
{
|
||||
ConnectingStatus.Visible = page == LauncherConnecting.Page.Connecting;
|
||||
ConnectFail.Visible = page == LauncherConnecting.Page.ConnectFailed;
|
||||
Disconnected.Visible = page == LauncherConnecting.Page.Disconnected;
|
||||
|
||||
if (page == LauncherConnecting.Page.Disconnected)
|
||||
DisconnectReason.Text = _state.LastDisconnectReason;
|
||||
}
|
||||
|
||||
private void ConnectionStateChanged(ClientConnectionState state)
|
||||
{
|
||||
ConnectStatus.Text = Loc.GetString($"connecting-state-{state}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ using System.Text.RegularExpressions;
|
||||
using Content.Client.MainMenu.UI;
|
||||
using Content.Client.UserInterface.Systems.EscapeMenu;
|
||||
using Robust.Client;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared;
|
||||
@@ -23,7 +22,6 @@ namespace Content.Client.MainMenu
|
||||
[Dependency] private readonly IClientNetManager _netManager = default!;
|
||||
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
|
||||
[Dependency] private readonly IGameController _controllerProxy = default!;
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
|
||||
|
||||
private MainMenuControl _mainMenuControl = default!;
|
||||
@@ -35,7 +33,7 @@ namespace Content.Client.MainMenu
|
||||
/// <inheritdoc />
|
||||
protected override void Startup()
|
||||
{
|
||||
_mainMenuControl = new MainMenuControl(_resourceCache, _configurationManager);
|
||||
_mainMenuControl = new MainMenuControl(_configurationManager);
|
||||
_userInterfaceManager.StateRoot.AddChild(_mainMenuControl);
|
||||
|
||||
_mainMenuControl.QuitButton.OnPressed += QuitButtonPressed;
|
||||
|
||||
@@ -1,45 +1,38 @@
|
||||
<Control xmlns="https://spacestation14.io"
|
||||
xmlns:pllax="clr-namespace:Content.Client.Parallax"
|
||||
xmlns:clog="clr-namespace:Content.Client.Changelog">
|
||||
<pllax:ParallaxControl />
|
||||
|
||||
<TextureRect Access="Public" TexturePath="/Textures/Ohio/ohfuck.png" VerticalExpand="True" HorizontalExpand="True" Name="Background" Stretch="KeepAspectCovered"/>
|
||||
|
||||
<LayoutContainer>
|
||||
<BoxContainer Name="VBox"
|
||||
Orientation="Vertical"
|
||||
StyleIdentifier="mainMenuVBox">
|
||||
<TextureRect Name="Logo"
|
||||
Stretch="KeepCentered" />
|
||||
<BoxContainer Orientation="Horizontal"
|
||||
SeparationOverride="4">
|
||||
<Label Text="{Loc 'main-menu-username-label'}" />
|
||||
<LineEdit Name="UsernameBox"
|
||||
Access="Public"
|
||||
PlaceHolder="{Loc 'main-menu-username-text'}"
|
||||
HorizontalExpand="True" />
|
||||
|
||||
<BoxContainer Name="VBox" Orientation="Vertical" StyleIdentifier="MainMenuBox" MinWidth="300" >
|
||||
|
||||
<Label Name="Title" Text="GREEN MIRACLE" Align="Center" />
|
||||
|
||||
<Control MinSize="0 4" />
|
||||
|
||||
<BoxContainer Orientation="Horizontal" SeparationOverride="4">
|
||||
|
||||
<LineEdit Name="UsernameBox" Access="Public" PlaceHolder="{Loc 'main-menu-username-text'}" HorizontalExpand="True" />
|
||||
|
||||
</BoxContainer>
|
||||
<LineEdit Name="AddressBox"
|
||||
Access="Public"
|
||||
Text="localhost"
|
||||
PlaceHolder="server address:port"
|
||||
HorizontalExpand="True" />
|
||||
<Button Name="DirectConnectButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'main-menu-direct-connect-button'}"
|
||||
TextAlign="Center"
|
||||
StyleIdentifier="mainMenu" />
|
||||
|
||||
<Control MinSize="0 2" />
|
||||
<Button Name="OptionsButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'main-menu-options-button'}"
|
||||
TextAlign="Center"
|
||||
StyleIdentifier="mainMenu" />
|
||||
<Button Name="QuitButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'main-menu-quit-button'}"
|
||||
TextAlign="Center"
|
||||
StyleIdentifier="mainMenu" />
|
||||
<clog:ChangelogButton
|
||||
Name="ChangelogButton"
|
||||
Access="Public"/>
|
||||
|
||||
<LineEdit Name="AddressBox" Access="Public" Text="localhost" PlaceHolder="server address:port" HorizontalExpand="True" />
|
||||
|
||||
<Control MinSize="0 2" />
|
||||
|
||||
<Button Name="DirectConnectButton" Access="Public" Text="{Loc 'main-menu-direct-connect-button'}" TextAlign="Center" />
|
||||
|
||||
<Button Name="OptionsButton" Access="Public" Text="{Loc 'main-menu-options-button'}" TextAlign="Center" />
|
||||
|
||||
<clog:ChangelogButton Name="ChangelogButton" Access="Public" />
|
||||
|
||||
<Button Name="QuitButton" Access="Public" Text="{Loc 'main-menu-quit-button'}" TextAlign="Center" />
|
||||
|
||||
</BoxContainer>
|
||||
|
||||
</LayoutContainer>
|
||||
|
||||
</Control>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
@@ -11,19 +10,15 @@ namespace Content.Client.MainMenu.UI;
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class MainMenuControl : Control
|
||||
{
|
||||
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
|
||||
public MainMenuControl(IConfigurationManager configMan)
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
|
||||
|
||||
LayoutContainer.SetAnchorPreset(VBox, LayoutContainer.LayoutPreset.TopRight);
|
||||
LayoutContainer.SetMarginRight(VBox, -25);
|
||||
LayoutContainer.SetMarginTop(VBox, 30);
|
||||
LayoutContainer.SetGrowHorizontal(VBox, LayoutContainer.GrowDirection.Begin);
|
||||
|
||||
var logoTexture = resCache.GetResource<TextureResource>("/Textures/Logo/logo.png");
|
||||
Logo.Texture = logoTexture;
|
||||
LayoutContainer.SetAnchorPreset(VBox, LayoutContainer.LayoutPreset.Center);
|
||||
LayoutContainer.SetGrowHorizontal(VBox, LayoutContainer.GrowDirection.Both);
|
||||
LayoutContainer.SetGrowVertical(VBox, LayoutContainer.GrowDirection.Both);
|
||||
|
||||
var currentUserName = configMan.GetCVar(CVars.PlayerName);
|
||||
UsernameBox.Text = currentUserName;
|
||||
|
||||
37
Content.Client/_White/Overlays/ATMOverlay.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Client._White.Overlays;
|
||||
|
||||
public sealed class AtmOverlay : Overlay
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototype = default!;
|
||||
|
||||
private readonly ShaderInstance _shader;
|
||||
|
||||
public AtmOverlay()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
_shader = _prototype.Index<ShaderPrototype>("ATM").Instance().Duplicate();
|
||||
}
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.WorldSpace;
|
||||
|
||||
public override bool RequestScreenTexture => true;
|
||||
|
||||
protected override void Draw(in OverlayDrawArgs args)
|
||||
{
|
||||
if (ScreenTexture is null)
|
||||
return;
|
||||
|
||||
var worldHandle = args.WorldHandle;
|
||||
|
||||
_shader.SetParameter("SCREEN_TEXTURE", ScreenTexture);
|
||||
|
||||
worldHandle.UseShader(_shader);
|
||||
worldHandle.DrawRect(args.WorldBounds, Color.White);
|
||||
worldHandle.UseShader(null);
|
||||
}
|
||||
}
|
||||
38
Content.Client/_White/Overlays/GrainOverlay.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Client._White.Overlays;
|
||||
|
||||
public sealed class GrainOverlay : Overlay
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototype = default!;
|
||||
|
||||
private readonly ShaderInstance _shader;
|
||||
|
||||
public GrainOverlay()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
_shader = _prototype.Index<ShaderPrototype>("Grain").Instance().Duplicate();
|
||||
}
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.WorldSpace;
|
||||
|
||||
public override bool RequestScreenTexture => true;
|
||||
|
||||
protected override void Draw(in OverlayDrawArgs args)
|
||||
{
|
||||
if (ScreenTexture is null)
|
||||
return;
|
||||
|
||||
var worldHandle = args.WorldHandle;
|
||||
|
||||
_shader.SetParameter("SCREEN_TEXTURE", ScreenTexture);
|
||||
_shader.SetParameter("strength", 40.0f);
|
||||
|
||||
worldHandle.UseShader(_shader);
|
||||
worldHandle.DrawRect(args.WorldBounds, Color.White);
|
||||
worldHandle.UseShader(null);
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,11 @@ public sealed class OnDeath : EntitySystem
|
||||
}
|
||||
|
||||
var newStream = _audio.PlayEntity(HeartSounds, uid, uid, AudioParams.Default.WithLoop(true));
|
||||
_playingStreams[uid] = newStream.Value.Entity;
|
||||
|
||||
if (newStream.HasValue)
|
||||
{
|
||||
_playingStreams[uid] = newStream.Value.Entity;
|
||||
}
|
||||
}
|
||||
|
||||
private void StopPlayingStream(EntityUid uid)
|
||||
|
||||
@@ -1,20 +1,34 @@
|
||||
### Connecting dialog when you start up the game
|
||||
|
||||
connecting-title = Space Station 14
|
||||
connecting-exit = Выйти
|
||||
connecting-retry = Повторить
|
||||
connecting-reconnect = Переподключиться
|
||||
connecting-redial = Перезапустить
|
||||
connecting-redial-wait = Пожалуйста подождите: { TOSTRING($time, "G3") }
|
||||
connecting-in-progress = Подключение к серверу...
|
||||
connecting-disconnected = Отключен от сервера:
|
||||
connecting-tip = Не умирай!
|
||||
connecting-version = версия 0.1
|
||||
connecting-fail-reason =
|
||||
Не удалось подключиться к серверу:
|
||||
{ $reason }
|
||||
connecting-state-NotConnecting = Не подключен
|
||||
connecting-state-ResolvingHost = Определение хоста
|
||||
connecting-state-EstablishingConnection = Установка соединения
|
||||
connecting-title = Green Miracle
|
||||
|
||||
connecting-exit = Exit
|
||||
|
||||
connecting-retry = Retry
|
||||
|
||||
connecting-reconnect = Reconnect
|
||||
|
||||
connecting-redial = Relaunch
|
||||
|
||||
connecting-redial-wait = Please wait: { TOSTRING($time, "G3") }
|
||||
|
||||
connecting-in-progress = Connecting to server...
|
||||
|
||||
connecting-disconnected = Disconnected from server:
|
||||
|
||||
connecting-tip = OH FUCK!
|
||||
|
||||
connecting-version = 1.0
|
||||
|
||||
connecting-fail-reason = Failed to connect to server:
|
||||
{ $reason }
|
||||
|
||||
connecting-state-NotConnecting = Not connecting
|
||||
|
||||
connecting-state-ResolvingHost = Resolving host
|
||||
|
||||
connecting-state-EstablishingConnection = Establishing connection
|
||||
|
||||
connecting-state-Handshake = Handshake
|
||||
connecting-state-Connected = Подключен
|
||||
|
||||
connecting-state-Connected = Connected
|
||||
|
||||
@@ -109,3 +109,13 @@
|
||||
id: SaturationScale
|
||||
kind: source
|
||||
path: "/Textures/Shaders/White/saturationscale.swsl"
|
||||
|
||||
- type: shader
|
||||
id: Grain
|
||||
kind: source
|
||||
path: "/Textures/Shaders/Ohio/grain.swsl"
|
||||
|
||||
- type: shader
|
||||
id: ATM
|
||||
kind: source
|
||||
path: "/Textures/Shaders/Ohio/atm.swsl"
|
||||
|
||||
BIN
Resources/Textures/Ohio/ohfuck.png
Normal file
|
After Width: | Height: | Size: 374 KiB |
23
Resources/Textures/Shaders/Ohio/atm.swsl
Normal file
@@ -0,0 +1,23 @@
|
||||
uniform sampler2D SCREEN_TEXTURE;
|
||||
|
||||
highp float random(highp float seed){
|
||||
return fract(543.2543 * sin(seed * 3525.46));
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
highp vec2 uv = UV;
|
||||
|
||||
highp float particles = random(TIME * 0.5 + uv.x * uv.y);
|
||||
|
||||
highp vec3 atmosphereColor = vec3(uv.x, uv.y, 0.5);
|
||||
|
||||
highp vec3 finalColor = atmosphereColor * 0.6;
|
||||
|
||||
finalColor += texture(SCREEN_TEXTURE, uv - vec2(0.01, 0.01)).rgb * 0.2;
|
||||
|
||||
finalColor *= vec3(particles);
|
||||
|
||||
finalColor *= vec3(1.0, 1.0, 1.0);
|
||||
|
||||
COLOR = vec4(finalColor, 0.01);
|
||||
}
|
||||
18
Resources/Textures/Shaders/Ohio/grain.swsl
Normal file
@@ -0,0 +1,18 @@
|
||||
light_mode unshaded;
|
||||
|
||||
uniform sampler2D SCREEN_TEXTURE;
|
||||
uniform highp float strength;
|
||||
|
||||
void fragment()
|
||||
{
|
||||
highp vec2 uv = UV;
|
||||
highp vec4 color = texture(SCREEN_TEXTURE, uv);
|
||||
|
||||
highp float x = (uv.x + 4.0 ) * (uv.y + 4.0 ) * (TIME * 10.0);
|
||||
|
||||
highp vec4 grain = vec4(mod((mod(x, 13.0) + 1.0) * (mod(x, 123.0) + 1.0), 0.01) - 0.005) * strength;
|
||||
|
||||
grain = color * (1.0 - grain);
|
||||
|
||||
COLOR = grain;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 758 B |
|
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 851 B After Width: | Height: | Size: 581 B |
|
Before Width: | Height: | Size: 615 B After Width: | Height: | Size: 638 B |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 603 B |
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 405 B |
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 833 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 416 B |
|
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 632 B |
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 432 B |
|
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 522 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 854 B |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 498 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 887 B |
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 567 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 739 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 595 B |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 595 B |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 579 B |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 606 B |
|
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 598 B After Width: | Height: | Size: 619 B |
|
Before Width: | Height: | Size: 821 B After Width: | Height: | Size: 625 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 870 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 762 B |
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 480 B |
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 452 B |
BIN
Resources/Textures/Tiles/white diagonal.png
Normal file
|
After Width: | Height: | Size: 653 B |
|
Before Width: | Height: | Size: 598 B After Width: | Height: | Size: 621 B |
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 576 B |
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 909 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 455 B |
|
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 778 B |
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 466 B |
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 457 B |
|
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 596 B |
|
Before Width: | Height: | Size: 762 B After Width: | Height: | Size: 680 B |
|
Before Width: | Height: | Size: 782 B After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 1.0 KiB |