Skip to content

Commit

Permalink
Revert "Анимированный фон в лобби (AdventureTimeSS14#306)"
Browse files Browse the repository at this point in the history
This reverts commit 1610ec9.
  • Loading branch information
Darkiich committed Oct 3, 2024
1 parent c5d145e commit 698c49f
Show file tree
Hide file tree
Showing 26 changed files with 16 additions and 1,395 deletions.
111 changes: 0 additions & 111 deletions Content.Client/ADT/UI/AnimatedBackground/AnimatedBackgroundControl.cs

This file was deleted.

6 changes: 5 additions & 1 deletion Content.Client/Lobby/LobbyState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,11 @@ private void UpdateLobbyBackground()
{
if (_gameTicker.LobbyBackground != null)
{
Lobby!.Background.SetRSI(_resourceCache.GetResource<RSIResource>(_gameTicker.LobbyBackground).RSI); // ADT Tweak
Lobby!.Background.Texture = _resourceCache.GetResource<TextureResource>(_gameTicker.LobbyBackground );
}
else
{
Lobby!.Background.Texture = null;
}
else
{
Expand Down
8 changes: 3 additions & 5 deletions Content.Client/Lobby/UI/LobbyGui.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
xmlns:style="clr-namespace:Content.Client.Stylesheets"
xmlns:lobbyUi="clr-namespace:Content.Client.Lobby.UI"
xmlns:info="clr-namespace:Content.Client.Info"
xmlns:widgets="clr-namespace:Content.Client.UserInterface.Systems.Chat.Widgets"
xmlns:ui="clr-namespace:Content.Client.ADT.UI"
xmlns:animatedBackground="clr-namespace:Content.Client.ADT.UI.AnimatedBackground">
xmlns:widgets="clr-namespace:Content.Client.UserInterface.Systems.Chat.Widgets">
<!-- Background -->
<animatedBackground:AnimatedBackgroundControl Access="Public" Name="Background" VerticalExpand="True" HorizontalExpand="True"
Stretch="KeepAspectCovered" />
<TextureRect Access="Public" VerticalExpand="True" HorizontalExpand="True" Name="Background"
Stretch="KeepAspectCovered" />
<BoxContainer Name="MainContainer" VerticalExpand="True" HorizontalExpand="True" Orientation="Horizontal"
Margin="10 10 10 10" SeparationOverride="2">
<SplitContainer State="Auto" HorizontalExpand="True">
Expand Down
15 changes: 8 additions & 7 deletions Content.Server/GameTicking/GameTicker.LobbyBackground.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Content.Server.GameTicking.Prototypes;
using Robust.Shared.Random;
using Content.Shared.ADT;
using Robust.Shared.Utility;
using System.Linq;

Expand All @@ -12,19 +11,21 @@ public sealed partial class GameTicker
public string? LobbyBackground { get; private set; }

[ViewVariables]
private List<string>? _lobbyBackgrounds; // ADT Tweak
private List<ResPath>? _lobbyBackgrounds;

private static readonly string[] WhitelistedBackgroundExtensions = new string[] {"png", "jpg", "jpeg", "webp"};

private void InitializeLobbyBackground()
{
_lobbyBackgrounds = _prototypeManager.EnumeratePrototypes<AnimatedLobbyScreenPrototype>() // ADT Tweak
.Select(x => x.Path)
_lobbyBackgrounds = _prototypeManager.EnumeratePrototypes<LobbyBackgroundPrototype>()
.Select(x => x.Background)
.Where(x => WhitelistedBackgroundExtensions.Contains(x.Extension))
.ToList();

RandomizeLobbyBackground();
}

private void RandomizeLobbyBackground()
{
LobbyBackground = _lobbyBackgrounds!.Any() ? _robustRandom.Pick(_lobbyBackgrounds!) : null; // ADT Tweak
private void RandomizeLobbyBackground() {
LobbyBackground = _lobbyBackgrounds!.Any() ? _robustRandom.Pick(_lobbyBackgrounds!).ToString() : null;
}
}

This file was deleted.

35 changes: 0 additions & 35 deletions Resources/Prototypes/ADT/lobbyscreensanimated.yml

This file was deleted.

Binary file not shown.
19 changes: 0 additions & 19 deletions Resources/Textures/ADT/LobbyScreens/backgrounds/3.rsi/meta.json

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Loading

0 comments on commit 698c49f

Please sign in to comment.