Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Repo] Corvax #20

Merged
merged 86 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
d461efd
Station goals
DEATHB4DEFEAT Jan 14, 2023
e9e5a75
Locale
DEATHB4DEFEAT Jan 14, 2023
d855d84
Fuck it, add everything else (chat is broke)
DEATHB4DEFEAT Jan 14, 2023
552f15f
Merge branch 'master' of https://github.com/Park-station/Parkstation …
DEATHB4DEFEAT Jan 19, 2023
430559d
Merge branch 'master' of https://github.com/Park-station/Parkstation …
DEATHB4DEFEAT Jan 25, 2023
dcf5965
Remove Corvax TTS
DEATHB4DEFEAT Jan 25, 2023
88ed341
remove unnecessary things
DEATHB4DEFEAT Jan 25, 2023
5456c75
fix
DEATHB4DEFEAT Jan 25, 2023
ac8bf95
Remove SponsorSystem and Loadouts
DEATHB4DEFEAT Jan 28, 2023
a8e1024
Merge branch 'master' of https://github.com/Park-station/Parkstation …
DEATHB4DEFEAT Jan 28, 2023
27e3a49
lots of cleanup
DEATHB4DEFEAT Jan 28, 2023
2918976
Slime and XenoQueen TypingIndicators
DEATHB4DEFEAT Jan 28, 2023
7196933
why doesnt this work..
DEATHB4DEFEAT Feb 3, 2023
136d4c5
Merge branch 'master' of https://github.com/Park-station/Parkstation …
DEATHB4DEFEAT Feb 3, 2023
31dd347
Merge branch 'master' of https://github.com/Park-station/Parkstation …
DEATHB4DEFEAT Feb 26, 2023
964ede5
Remove gendered last names
DEATHB4DEFEAT Mar 10, 2023
f6a53a9
Undo pacifist diona
DEATHB4DEFEAT Mar 10, 2023
d7fa904
Add hijack traitor objective
Morb0 Mar 2, 2023
8883a44
Add colored chat names (#844)
Morb0 Feb 20, 2023
6c2b838
Merge branch 'master' of https://github.com/Park-station/Parkstation …
DEATHB4DEFEAT Mar 10, 2023
9b56571
[Resprite] Singularity stuff (#320)
Morb0 Jul 26, 2022
fb22c18
[Resprite] Syndicate EVA (#694)
nomad0260 Jan 4, 2023
59d76b2
[Resprite] Paramed hardsuit (#706)
nomad0260 Jan 6, 2023
85d1ea4
[Resprite] ERT
nomad0260 Jan 15, 2023
26a1e0a
debug
DEATHB4DEFEAT Mar 10, 2023
f1fd9c0
Merge branch 'master' of https://github.com/Park-station/Parkstation …
DEATHB4DEFEAT Mar 17, 2023
8b33538
merge remote branch 'master' of https://github.com/Park-Station/Parks…
DEATHB4DEFEAT Mar 30, 2023
d09d6fc
Merge branch 'master' into corvax
DEATHB4DEFEAT Apr 15, 2023
4cbb560
works
DEATHB4DEFEAT Apr 15, 2023
df7b148
[Resprite] Intercom (#897)
Morb0 Mar 18, 2023
15bc0e6
Shotgun more sounds
Morb0 Mar 21, 2023
3262e53
Discord linking
Morb0 Apr 7, 2023
a4801cf
Add field with auth url (#975)
Morb0 Apr 9, 2023
5744d77
Add lobby arts (#976)
DEATHB4DEFEAT Apr 15, 2023
c61a320
Psychologist stamp
fedKotikeD Mar 24, 2023
4085b23
loc
DEATHB4DEFEAT Apr 15, 2023
72ac7b1
fixing the things
DEATHB4DEFEAT Apr 15, 2023
f4c178b
Merge branch 'master' of https://github.com/Park-station/Parkstation …
DEATHB4DEFEAT Apr 16, 2023
42a9fe1
Merge branch 'master' into corvax
DEATHB4DEFEAT Apr 30, 2023
bea6a94
Revert "Add colored chat names (#844)"
DEATHB4DEFEAT Apr 30, 2023
43d4de4
Improve station goals system
DEATHB4DEFEAT Apr 30, 2023
2935acd
Bunch of resprites (#996)
Morb0 Apr 19, 2023
f96e1d0
Update lamp plushie sprite (#1006)
lzk228 Apr 22, 2023
17021b3
[Add] Captain's and HoP's clothing (#1030)
JerryImMouse May 2, 2023
a28c3da
remove extra localization files (fix plants)
DEATHB4DEFEAT May 3, 2023
8749233
yaml linter fix
DEATHB4DEFEAT May 4, 2023
8da8553
Revert "Add hijack traitor objective"
DEATHB4DEFEAT May 7, 2023
b208c48
Revert "[Resprite] Paramed hardsuit (#706)"
DEATHB4DEFEAT May 7, 2023
56307cb
goal cvar
DEATHB4DEFEAT May 7, 2023
3c1d3d1
Merge branch 'master' into corvax
DEATHB4DEFEAT Jun 25, 2023
09fb337
review
DEATHB4DEFEAT Jun 25, 2023
d30b8f4
Merge branch 'master' of https://github.com/Park-station/Parkstation …
DEATHB4DEFEAT Aug 16, 2023
1395817
remove unwanted lobby screens
DEATHB4DEFEAT Aug 16, 2023
db24325
what
DEATHB4DEFEAT Aug 16, 2023
08d635e
fix the oracle having a stroke whenever it barks
DEATHB4DEFEAT Aug 24, 2023
f7d1f75
fix moth typing indicator
DEATHB4DEFEAT Aug 24, 2023
cb2feeb
fix funky rsi metas
DEATHB4DEFEAT Aug 24, 2023
999afbf
fix moth typing indicator
DEATHB4DEFEAT Aug 24, 2023
a633e30
barking doesn't shatter the fabric of reality
DEATHB4DEFEAT Aug 24, 2023
61a1b4d
typing indicator also doesn't shatter reality but who cares
DEATHB4DEFEAT Aug 24, 2023
b4a1c16
fix central command stamps on station goals
DEATHB4DEFEAT Aug 24, 2023
b5498b3
more station goals
DEATHB4DEFEAT Aug 25, 2023
2cd00c9
Merge branch 'master' into corvax
DEATHB4DEFEAT Aug 25, 2023
46d176e
fix station goal paper formatting
DEATHB4DEFEAT Aug 25, 2023
e92f196
remove bank goal
DEATHB4DEFEAT Aug 25, 2023
de8aac4
add date/station to station goals
DEATHB4DEFEAT Aug 25, 2023
1abadc0
Diagonal wall resprite (#1130)
SonicHDC Jun 16, 2023
0a63511
Added directional sprites for lamps (#1047)
SonicHDC May 12, 2023
024a6fe
[Resprite] Ammo machine redisign (#873)
SonicHDC Mar 17, 2023
56450f2
[Resprite] Cans (#1365)
Morb0 Aug 24, 2023
a9e9905
[Resprite] ERT helmets (#1352)
Morb0 Aug 20, 2023
1648e41
[Resprite] Atmospheric backpacks (#1235)
lzk228 Jul 28, 2023
58d9fc5
[Resprite] Meson & thermal glasses icon (#1225)
Morb0 Jul 27, 2023
d3162cc
Coats, cloaks and captain mask resprite (#1134)
mhamsterr Jun 20, 2023
162b895
Mailing resprite (#1117)
SonicHDC Jul 2, 2023
5668cdf
[Resprite] Better tanks (#1095)
SonicHDC Jun 29, 2023
c38c115
[Resprite] Uranium windows (#1089)
DEATHB4DEFEAT Aug 25, 2023
6ace299
[Resprite] Ore & hydro bag inhand (#1059)
lzk228 May 11, 2023
1746263
[Resprite] Chairs (#887)
Morb0 Mar 16, 2023
44900f8
remove extra locale from cherry picks
DEATHB4DEFEAT Aug 25, 2023
5724532
fix banana lamp
DEATHB4DEFEAT Aug 25, 2023
0a5da39
fix advertisements
DEATHB4DEFEAT Aug 25, 2023
e1f2537
[Resprite] Fax and gas canisters (#659)
RomanMinaev Dec 22, 2022
8def667
[Resprite] Melee weapon (#883)
DEATHB4DEFEAT Aug 29, 2023
f45e4ef
fix chat again
DEATHB4DEFEAT Aug 29, 2023
488a774
enable queue
DEATHB4DEFEAT Aug 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Content.Client/Administration/UI/AdminMenuWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public sealed partial class AdminMenuWindow : DefaultWindow

public AdminMenuWindow()
{
MinSize = new Vector2(500, 250);
MinSize = new Vector2(600, 250); // Corvax-Resize
Title = Loc.GetString("admin-menu-title");
RobustXamlLoader.Load(this);
MasterTabContainer.SetTabTitle(0, Loc.GetString("admin-menu-admin-tab"));
Expand Down
53 changes: 44 additions & 9 deletions Content.Client/Chat/TypingIndicator/TypingIndicatorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public sealed class TypingIndicatorSystem : SharedTypingIndicatorSystem
private readonly TimeSpan _typingTimeout = TimeSpan.FromSeconds(2);
private TimeSpan _lastTextChange;
private bool _isClientTyping;
private bool _isClientChatFocused; // Corvax-TypingIndicator

public override void Initialize()
{
Expand All @@ -30,7 +31,10 @@ public void ClientChangedChatText()
return;

// client typed something - show typing indicator
ClientUpdateTyping(true);
// Corvax-TypingIndicator-Start
_isClientTyping = true;
ClientUpdateTyping();
// Corvax-TypingIndicator-End
_lastTextChange = _time.CurTime;
}

Expand All @@ -41,9 +45,26 @@ public void ClientSubmittedChatText()
return;

// client submitted text - hide typing indicator
ClientUpdateTyping(false);
// Corvax-TypingIndicator-Start
_isClientTyping = false;
_isClientChatFocused = false;
ClientUpdateTyping();
// Corvax-TypingIndicator-End
}

// Corvax-TypingIndicator-Start
public void ClientChangedChatFocus(bool isFocused)
{
// don't update it if player don't want to show typing
if (!_cfg.GetCVar(CCVars.ChatShowTypingIndicator))
return;

// client submitted text - hide typing indicator
_isClientChatFocused = isFocused;
ClientUpdateTyping();
}
// Corvax-TypingIndicator-End

public override void Update(float frameTime)
{
base.Update(frameTime);
Expand All @@ -55,31 +76,45 @@ public override void Update(float frameTime)
if (dif > _typingTimeout)
{
// client didn't typed anything for a long time - hide indicator
ClientUpdateTyping(false);
// Corvax-TypingIndicator-Start
_isClientTyping = false;
ClientUpdateTyping();
// Corvax-TypingIndicator-End
}
}
}

private void ClientUpdateTyping(bool isClientTyping)
private void ClientUpdateTyping() // Corvax-TypingIndicator
{
if (_isClientTyping == isClientTyping)
return;
_isClientTyping = isClientTyping;
// Corvax-TypingIndicator-Start
// if (_isClientTyping == isClientTyping)
// return;
// _isClientTyping = isClientTyping;
// Corvax-TypingIndicator-End

// check if player controls any pawn
if (_playerManager.LocalPlayer?.ControlledEntity == null)
return;

// Corvax-TypingIndicator-Start
var state = TypingIndicatorState.None;
if (_isClientChatFocused)
state = _isClientTyping ? TypingIndicatorState.Typing : TypingIndicatorState.Idle;
// Corvax-TypingIndicator-End

// send a networked event to server
RaiseNetworkEvent(new TypingChangedEvent(isClientTyping));
RaiseNetworkEvent(new TypingChangedEvent(state)); // Corvax-TypingIndicator
}

private void OnShowTypingChanged(bool showTyping)
{
// hide typing indicator immediately if player don't want to show it anymore
if (!showTyping)
{
ClientUpdateTyping(false);
// Corvax-TypingIndicator-Start
_isClientTyping = false;
ClientUpdateTyping();
// Corvax-TypingIndicator-End
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected override void OnAppearanceChange(EntityUid uid, TypingIndicatorCompone
return;
}

AppearanceSystem.TryGetData<bool>(uid, TypingIndicatorVisuals.IsTyping, out var isTyping, args.Component);
// args.Component.TryGetData(TypingIndicatorVisuals.IsTyping, out bool isTyping); // Corvax-TypingIndicator
var layerExists = args.Sprite.LayerMapTryGet(TypingIndicatorLayers.Base, out var layer);
if (!layerExists)
layer = args.Sprite.LayerMapReserveBlank(TypingIndicatorLayers.Base);
Expand All @@ -29,6 +29,19 @@ protected override void OnAppearanceChange(EntityUid uid, TypingIndicatorCompone
args.Sprite.LayerSetState(layer, proto.TypingState);
args.Sprite.LayerSetShader(layer, proto.Shader);
args.Sprite.LayerSetOffset(layer, proto.Offset);
args.Sprite.LayerSetVisible(layer, isTyping);
// args.Sprite.LayerSetVisible(layer, isTyping); // Corvax-TypingIndicator
// Corvax-TypingIndicator-Start
args.Component.TryGetData(TypingIndicatorVisuals.State, out TypingIndicatorState state);
args.Sprite.LayerSetVisible(layer, state != TypingIndicatorState.None);
switch (state)
{
case TypingIndicatorState.Idle:
args.Sprite.LayerSetState(layer, proto.IdleState);
break;
case TypingIndicatorState.Typing:
args.Sprite.LayerSetState(layer, proto.TypingState);
break;
}
// Corvax-TypingIndicator-End
}
}
28 changes: 28 additions & 0 deletions Content.Client/Corvax/DiscordAuth/DiscordAuthGui.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Control xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
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">
<BoxContainer Orientation="Horizontal">
<Label Margin="8 0 0 0" Text="{Loc 'discord-auth-title'}"
StyleClasses="LabelHeading" VAlign="Center" />
<Button Name="QuitButton" Text="{Loc 'discord-auth-quit-btn'}"
HorizontalAlignment="Right" HorizontalExpand="True" />
</BoxContainer>
<controls:HighDivider />
<BoxContainer Orientation="Vertical" Margin="50 20 50 20">
<Label Text="{Loc 'discord-auth-info'}" Align="Center" />
<Label Text="{Loc 'discord-auth-warn'}" Margin="0 5 0 0" Align="Center" StyleClasses="LabelSubText" />
</BoxContainer>
<BoxContainer Orientation="Horizontal" VerticalAlignment="Bottom" Margin="10 0 0 0">
<Label Text="{Loc 'discord-auth-link'}" Align="Center" />
<Label Text=" " />
<LineEdit Name="UrlEdit" HorizontalExpand="True" Editable="False"></LineEdit>
</BoxContainer>
<Button Name="OpenUrlButton" Text="{Loc 'discord-auth-browser-btn'}" HorizontalExpand="True" StyleClasses="OpenRight" />
</BoxContainer>
</Control>
</Control>
35 changes: 35 additions & 0 deletions Content.Client/Corvax/DiscordAuth/DiscordAuthGui.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.Corvax.DiscordAuth;

[GenerateTypedNameReferences]
public sealed partial class DiscordAuthGui : Control
{
[Dependency] private readonly DiscordAuthManager _discordAuthManager = default!;
[Dependency] private readonly IClientConsoleHost _consoleHost = default!;

public DiscordAuthGui()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);

QuitButton.OnPressed += (_) =>
{
_consoleHost.ExecuteCommand("quit");
};

UrlEdit.Text = _discordAuthManager.AuthUrl;
OpenUrlButton.OnPressed += (_) =>
{
if (_discordAuthManager.AuthUrl != string.Empty)
{
IoCManager.Resolve<IUriOpener>().OpenUri(_discordAuthManager.AuthUrl);
}
};
}
}
30 changes: 30 additions & 0 deletions Content.Client/Corvax/DiscordAuth/DiscordAuthManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System.Threading;
using Content.Shared.Corvax.DiscordAuth;
using Robust.Client.State;
using Robust.Shared.Network;
using Timer = Robust.Shared.Timing.Timer;

namespace Content.Client.Corvax.DiscordAuth;

public sealed class DiscordAuthManager
{
[Dependency] private readonly IClientNetManager _netManager = default!;
[Dependency] private readonly IStateManager _stateManager = default!;

public string AuthUrl { get; private set; } = string.Empty;

public void Initialize()
{
_netManager.RegisterNetMessage<MsgDiscordAuthCheck>();
_netManager.RegisterNetMessage<MsgDiscordAuthRequired>(OnDiscordAuthRequired);
}

private void OnDiscordAuthRequired(MsgDiscordAuthRequired message)
{
if (_stateManager.CurrentState is not DiscordAuthState)
{
AuthUrl = message.AuthUrl;
_stateManager.RequestStateChange<DiscordAuthState>();
}
}
}
34 changes: 34 additions & 0 deletions Content.Client/Corvax/DiscordAuth/DiscordAuthState.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System.Threading;
using Content.Shared.Corvax.DiscordAuth;
using Robust.Client.State;
using Robust.Client.UserInterface;
using Robust.Shared.Network;
using Timer = Robust.Shared.Timing.Timer;

namespace Content.Client.Corvax.DiscordAuth;

public sealed class DiscordAuthState : State
{
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
[Dependency] private readonly IClientNetManager _netManager = default!;

private DiscordAuthGui? _gui;
private readonly CancellationTokenSource _checkTimerCancel = new();

protected override void Startup()
{
_gui = new DiscordAuthGui();
_userInterfaceManager.StateRoot.AddChild(_gui);

Timer.SpawnRepeating(TimeSpan.FromSeconds(5), () =>
{
_netManager.ClientSendMessage(new MsgDiscordAuthCheck());
}, _checkTimerCancel.Token);
}

protected override void Shutdown()
{
_checkTimerCancel.Cancel();
_gui!.Dispose();
}
}
26 changes: 26 additions & 0 deletions Content.Client/Corvax/JoinQueue/JoinQueueManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Content.Shared.Corvax.JoinQueue;
using Robust.Client.State;
using Robust.Shared.Network;

namespace Content.Client.Corvax.JoinQueue;

public sealed class JoinQueueManager
{
[Dependency] private readonly IClientNetManager _netManager = default!;
[Dependency] private readonly IStateManager _stateManager = default!;

public void Initialize()
{
_netManager.RegisterNetMessage<MsgQueueUpdate>(OnQueueUpdate);
}

private void OnQueueUpdate(MsgQueueUpdate msg)
{
if (_stateManager.CurrentState is not QueueState)
{
_stateManager.RequestStateChange<QueueState>();
}

((QueueState) _stateManager.CurrentState).OnQueueUpdate(msg);
}
}
31 changes: 31 additions & 0 deletions Content.Client/Corvax/JoinQueue/QueueGui.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<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" />
<Button Name="QuitButton" Text="{Loc 'queue-quit'}"
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>
</Control>
</Control>
31 changes: 31 additions & 0 deletions Content.Client/Corvax/JoinQueue/QueueGui.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Content.Shared.CCVar;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Configuration;

namespace Content.Client.Corvax.JoinQueue;

[GenerateTypedNameReferences]
public sealed partial class QueueGui : Control
{
[Dependency] private readonly IConfigurationManager _cfg = default!;

public event Action? QuitPressed;

public QueueGui()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);

QuitButton.OnPressed += (_) => QuitPressed?.Invoke();
}

public void UpdateInfo(int total, int position)
{
QueueTotal.Text = total.ToString();
QueuePosition.Text = position.ToString();
}
}
Loading
Loading