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

Endrbranch2 #1210

Closed
wants to merge 79 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
baa0ae9
Add support for both Delta-V and Wizden patrons in terms of name colo…
redmushie Apr 26, 2024
2b1da6b
Use file-scoped namespaces, fix error in LoadPatronUsernames
redmushie Apr 26, 2024
380e40f
Add comment indicating significance of if-statement ordering
redmushie Apr 26, 2024
76297b6
Change Wizden patron to SS14 patron
redmushie Apr 26, 2024
41ffc5e
Merge branch 'master' into feature/patron-colors
redmushie Apr 26, 2024
e3d0e04
Fix contents of PatronUsernames.yml
redmushie Apr 26, 2024
a55c397
Add more Delta-V markers, minor docs fixes
redmushie Apr 26, 2024
9a2a153
Add a few more docs
redmushie Apr 26, 2024
2f8b235
Comment out example in PatronUsernames.yml and make it more example-y
redmushie Apr 26, 2024
b0c2f2c
Add extra Delta-V marker and remove unused method in CreditsWindow
redmushie Apr 26, 2024
de46e31
Re-add uncommented example YAML entry, as otherwise YAML parsing fails
redmushie Apr 26, 2024
2d19e78
Merge branch 'master' into feature/patron-colors
redmushie Apr 28, 2024
65adf0e
Merge branch 'master' into feature/patron-colors
redmushie Apr 29, 2024
5bdc72d
Merge branch 'master' into feature/patron-colors
redmushie Apr 30, 2024
a76a7f4
Merge branch 'master' into feature/patron-colors
redmushie May 1, 2024
f779fb1
Update PULL_REQUEST_TEMPLATE.md
GeneralGaws May 2, 2024
24b2ddb
миссклик
GeneralGaws May 2, 2024
6769503
Merge branch 'master' into feature/patron-colors
redmushie May 2, 2024
fd3e763
качая сборку эндера....
GeneralGaws May 3, 2024
39cc4fe
Merge branch 'master' into feature/patron-colors
redmushie May 4, 2024
486d452
Merge branch 'master' into feature/patron-colors
redmushie May 5, 2024
034fbf1
Merge branch 'master' into feature/patron-colors
redmushie May 8, 2024
373826f
Merge branch 'DeltaV-Station:master' into master
GeneralGaws May 8, 2024
fa147c2
Fff (#10)
GeneralGaws May 8, 2024
63628e0
фикс ПРа thievery
GeneralGaws May 9, 2024
bb600ea
Merge branch 'DeltaV-Station:master' into master
GeneralGaws May 9, 2024
19bc144
timers for roles
EndrAnimet May 9, 2024
71465ba
Fills
EndrAnimet May 9, 2024
88e6a8c
Merge branch 'DeltaV-Station:master' into master
GeneralGaws May 9, 2024
ea84acd
реверт theivery
GeneralGaws May 9, 2024
64c156a
Merge branch 'master' into feature/patron-colors
redmushie May 9, 2024
8953484
Corvax sprites
EndrAnimet May 9, 2024
b071a4d
Corvax translate
EndrAnimet May 9, 2024
046ff52
fix
EndrAnimet May 9, 2024
8ec947e
Merge pull request #11 from EndrAnimet/endrbranch2
EndrAnimet May 9, 2024
20f613d
fixPrinter
EndrAnimet May 9, 2024
6ef5796
Merge pull request #13 from EndrAnimet/endrbranch2
EndrAnimet May 9, 2024
34f085b
Merge branch 'DeltaV-Station:master' into master
GeneralGaws May 10, 2024
8e1ee24
Merge branch 'DeltaV-Station:master' into aaa
GeneralGaws May 10, 2024
98c7518
socks
EndrAnimet May 10, 2024
4577436
fix
EndrAnimet May 10, 2024
21526ae
fix1
EndrAnimet May 10, 2024
d68fbce
fix3
EndrAnimet May 10, 2024
8e81a98
fix4
EndrAnimet May 10, 2024
2d7d8c0
fix5
EndrAnimet May 10, 2024
9e27612
Merge pull request #14 from EndrAnimet/endrbranch2
EndrAnimet May 10, 2024
1a04f36
Bestenlung
EndrAnimet May 10, 2024
345b8fe
GameCards
EndrAnimet May 10, 2024
b0e2473
FixSocks
EndrAnimet May 10, 2024
50fa432
FixSocks0
EndrAnimet May 10, 2024
07d0d21
Merge PR #15 (BL, GameCards, fix)
EndrAnimet May 10, 2024
52f6129
Shadowkin
EndrAnimet May 10, 2024
832618d
Merge PR #16 (baff shadowkins)
EndrAnimet May 10, 2024
bd96be9
ShadowkinHead
EndrAnimet May 10, 2024
8c933e9
Merge PR #17 (sprites for shadowkin ears in hats)
EndrAnimet May 10, 2024
d284359
FixShadowkin
EndrAnimet May 11, 2024
8328b09
Merge PR #18 (delete Respirator for Shadowkins)
EndrAnimet May 11, 2024
d8297ed
boosty
EndrAnimet May 14, 2024
a5c9cea
Add files via upload
EndrAnimet May 14, 2024
0f2f7fd
Update manifest.yml
EndrAnimet May 14, 2024
96b39cc
Merge PR #20 (Boosty, Logo)
EndrAnimet May 15, 2024
46c20a8
patrons-system
EndrAnimet May 15, 2024
aada60f
Merge branch 'pr/1138'
EndrAnimet May 15, 2024
7f63827
Merge branch 'pr/1138' into endrbranch2
EndrAnimet May 15, 2024
75fc19e
Merge branch 'pr/21' into endrbranch2
EndrAnimet May 15, 2024
e714407
Merge pull request #22 from EndrAnimet/endrbranch2
EndrAnimet May 15, 2024
c1137f8
Merge branch 'DeltaV-Station:master' into master
EndrAnimet May 15, 2024
e19171a
Merge remote-tracking branch 'upstream/master' into endrbranch2
EndrAnimet May 15, 2024
bcf9e6c
fix
EndrAnimet May 15, 2024
3aa4b7f
fix-hands
EndrAnimet May 15, 2024
5e8ca25
CorvaxReSprite
EndrAnimet May 15, 2024
785d695
CorvaxReSprite
EndrAnimet May 15, 2024
010f55c
remove plasmaman & loadout for brigmed
EndrAnimet May 15, 2024
640c932
Merge branch 'endrbranch2' into aaa
EndrAnimet May 15, 2024
152a148
Merge branch 'DeltaV-Station:master' into backup
GeneralGaws May 15, 2024
d51896e
CorvaxLoadouts
EndrAnimet May 15, 2024
cdaa186
Merge branch 'backup' into endrbranch2
EndrAnimet May 16, 2024
ae2e2ba
loadouts
EndrAnimet May 16, 2024
a582ee7
ghost's skins
EndrAnimet May 16, 2024
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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
44 changes: 6 additions & 38 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,11 @@
<!-- Please read these guidelines before opening your PR: https://docs.spacestation14.io/en/getting-started/pr-guideline -->
<!-- The text between the arrows are comments - they will not be visible on your PR. -->

## About the PR
<!-- What did you change in this PR? -->
## О чем PR

## Why / Balance
<!-- Why was it changed? Link any discussions or issues here. Please discuss how this would affect game balance. -->
## Почему

## Technical details
<!-- If this is a code change, summarize at high level how your new code works. This makes it easier to review. -->
## Технические детали

## Media
<!--
PRs which make ingame changes (adding clothing, items, new features, etc) are required to have media attached that showcase the changes.
Small fixes/refactors are exempt.
Any media may be used in SS14 progress reports, with clear credit given.
## Медиа

If you're unsure whether your PR will require media, ask a maintainer.

Check the box below to confirm that you have in fact seen this (put an X in the brackets, like [X]):
-->

- [ ] I have added screenshots/videos to this PR showcasing its changes ingame, **or** this PR does not require an ingame showcase

## Breaking changes
<!--
List any breaking changes, including namespace, public class/method/field changes, prototype renames; and provide instructions for fixing them. This will be pasted in #codebase-changes.
-->

**Changelog**
<!--
Make players aware of new features and changes that could affect how they play the game by adding a Changelog entry. Please read the Changelog guidelines located at: https://docs.spacestation14.io/en/getting-started/pr-guideline#changelog
-->

<!--
Make sure to take this Changelog template out of the comment block in order for it to show up.
:cl:
- add: Added fun!
- remove: Removed fun!
- tweak: Changed fun!
- fix: Fixed fun!
-->
- [ ] Я добавил скриншот/видео, показывающее изменения в игре **или** PR не нуждается в показе
- [ ] Я проверил изменения на предмет багов
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"omnisharp.analyzeOpenDocumentsOnly": true,
"dotnet.defaultSolution": "SpaceStation14.sln"
"dotnet.defaultSolution": "SpaceStation14.sln",
"dotnet.preferCSharpExtension": true
}
37 changes: 7 additions & 30 deletions Content.Client/Credits/CreditsWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Numerics;
using Content.Client.Stylesheets;
using Content.Shared.CCVar;
using Content.Shared.Patron;
using Robust.Client.AutoGenerated;
using Robust.Client.Credits;
using Robust.Client.ResourceManagement;
Expand All @@ -27,18 +28,15 @@ public sealed partial class CreditsWindow : DefaultWindow
[Dependency] private readonly IResourceManager _resourceManager = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;

private static readonly Dictionary<string, int> PatronTierPriority = new()
{
["Central Commander"] = 1,
["Captain"] = 2,
["Assistant"] = 3
};
private PatronManager _patronManager = new PatronManager(); // Delta-V

public CreditsWindow()
{
IoCManager.InjectDependencies(this);
RobustXamlLoader.Load(this);

_patronManager.Load(_resourceManager); // Delta-V

TabContainer.SetTabTitle(Ss14ContributorsTab, Loc.GetString("credits-window-ss14contributorslist-tab"));
TabContainer.SetTabTitle(PatronsTab, Loc.GetString("credits-window-patrons-tab"));
TabContainer.SetTabTitle(LicensesTab, Loc.GetString("credits-window-licenses-tab"));
Expand All @@ -65,7 +63,7 @@ private void PopulateLicenses(BoxContainer licensesContainer)

private void PopulatePatrons(BoxContainer patronsContainer)
{
var patrons = LoadPatrons();
var patrons = _patronManager.Patrons!;

// Do not show "become a patron" button on Steam builds
// since Patreon violates Valve's rules about alternative storefronts.
Expand All @@ -84,15 +82,15 @@ private void PopulatePatrons(BoxContainer patronsContainer)
}

var first = true;
foreach (var tier in patrons.GroupBy(p => p.Tier).OrderBy(p => PatronTierPriority[p.Key]))
foreach (var tier in patrons.GroupBy(p => p.Tier).OrderBy(p => p.Key.Priority))
{
if (!first)
{
patronsContainer.AddChild(new Control {MinSize = new Vector2(0, 10)});
}

first = false;
patronsContainer.AddChild(new Label {StyleClasses = {StyleBase.StyleClassLabelHeading}, Text = $"{tier.Key}"});
patronsContainer.AddChild(new Label {StyleClasses = {StyleBase.StyleClassLabelHeading}, Text = $"{tier.Key.Name}"});

var msg = string.Join(", ", tier.OrderBy(p => p.Name).Select(p => p.Name));

Expand All @@ -103,16 +101,6 @@ private void PopulatePatrons(BoxContainer patronsContainer)
}
}

private IEnumerable<PatronEntry> LoadPatrons()
{
var yamlStream = _resourceManager.ContentFileReadYaml(new ("/Credits/Patrons.yml"));
var sequence = (YamlSequenceNode) yamlStream.Documents[0].RootNode;

return sequence
.Cast<YamlMappingNode>()
.Select(m => new PatronEntry(m["Name"].AsString(), m["Tier"].AsString()));
}

private void PopulateContributors(BoxContainer ss14ContributorsContainer)
{
Button contributeButton;
Expand Down Expand Up @@ -169,16 +157,5 @@ void AddSection(string title, string path, bool markup = false)
contributeButton.Visible = false;
}

private sealed class PatronEntry
{
public string Name { get; }
public string Tier { get; }

public PatronEntry(string name, string tier)
{
Name = name;
Tier = tier;
}
}
}
}
1 change: 1 addition & 0 deletions Content.Client/Entry/EntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public override void Init()
_prototypeManager.RegisterIgnore("nukeopsRole");
_prototypeManager.RegisterIgnore("ghostRoleRaffleDecider");
_prototypeManager.RegisterIgnore("candyFlavor"); // Delta-V
_prototypeManager.RegisterIgnore("stationGoal");

_componentFactory.GenerateNetIds();
_adminManager.Initialize();
Expand Down
4 changes: 2 additions & 2 deletions Content.PatreonParser/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Globalization;
using System.Globalization;
using System.Text.Json;
using System.Text.Json.Serialization;
using Content.PatreonParser;
Expand All @@ -7,7 +7,7 @@
using static System.Environment;

var repository = new DirectoryInfo(Directory.GetCurrentDirectory()).Parent!.Parent!.Parent!.Parent!;
var patronsPath = Path.Combine(repository.FullName, "Resources/Credits/Patrons.yml");
var patronsPath = Path.Combine(repository.FullName, "Resources/Patrons.yml");
if (!File.Exists(patronsPath))
{
Console.WriteLine($"File {patronsPath} not found.");
Expand Down
22 changes: 20 additions & 2 deletions Content.Server/Chat/Managers/ChatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
using Content.Shared.Chat;
using Content.Shared.Database;
using Content.Shared.Mind;
using Content.Shared.Patron;
using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Shared.ContentPack;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Replays;
Expand Down Expand Up @@ -45,6 +47,7 @@ internal sealed partial class ChatManager : IChatManager
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IResourceManager _resourceManager = default!; // Delta-V

/// <summary>
/// The maximum length a player-sent message can be sent
Expand All @@ -55,6 +58,7 @@ internal sealed partial class ChatManager : IChatManager
private bool _adminOocEnabled = true;

private readonly Dictionary<NetUserId, ChatUser> _players = new();
private PatronManager _patronManager = new PatronManager(); // Delta-V

public void Initialize()
{
Expand All @@ -65,6 +69,7 @@ public void Initialize()
_configurationManager.OnValueChanged(CCVars.AdminOocEnabled, OnAdminOocEnabledChanged, true);

_playerManager.PlayerStatusChanged += PlayerStatusChanged;
_patronManager.Load(_resourceManager); // Delta-V
}

private void OnOocEnabledChanged(bool val)
Expand Down Expand Up @@ -244,10 +249,23 @@ private void SendOOC(ICommonSession player, string message)
var prefs = _preferencesManager.GetPreferences(player.UserId);
colorOverride = prefs.AdminOOCColor;
}
if ( _netConfigManager.GetClientCVar(player.Channel, CCVars.ShowOocPatronColor) && player.Channel.UserData.PatronTier is { } patron && PatronOocColors.TryGetValue(patron, out var patronColor))

// Delta-V: Begin
Patron? deltaVPatron = _patronManager.GetPatronByName(player.Name);
if (_netConfigManager.GetClientCVar(player.Channel, CCVars.ShowOocPatronColor))
{
wrappedMessage = Loc.GetString("chat-manager-send-ooc-patron-wrap-message", ("patronColor", patronColor),("playerName", player.Name), ("message", FormattedMessage.EscapeText(message)));
// Delta-V patron name coloring takes precedence over SS14 patron name coloring.
if (deltaVPatron != null)
{
// Delta-V patron.
wrappedMessage = Loc.GetString("chat-manager-send-ooc-patron-wrap-message", ("patronColor", deltaVPatron.Tier.Color), ("playerName", player.Name), ("message", FormattedMessage.EscapeText(message)));
} else if (player.Channel.UserData.PatronTier is { } patron && PatronOocColors.TryGetValue(patron, out var patronColor))
{
// SS14 patron.
wrappedMessage = Loc.GetString("chat-manager-send-ooc-patron-wrap-message", ("patronColor", patronColor), ("playerName", player.Name), ("message", FormattedMessage.EscapeText(message)));
}
}
// Delta-V: End

//TODO: player.Name color, this will need to change the structure of the MsgChatMessage
ChatMessageToAll(ChatChannel.OOC, message, wrappedMessage, EntityUid.Invalid, hideChat: false, recordReplay: true, colorOverride: colorOverride, author: player.UserId);
Expand Down
13 changes: 13 additions & 0 deletions Content.Server/Corvax/GameTicking/RoundEndedEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Content.Server.Corvax.GameTicking;

public sealed class RoundEndedEvent : EntityEventArgs
{
public int RoundId { get; }
public TimeSpan RoundDuration { get; }

public RoundEndedEvent(int roundId, TimeSpan roundDuration)
{
RoundId = roundId;
RoundDuration = roundDuration;
}
}
11 changes: 11 additions & 0 deletions Content.Server/Corvax/GameTicking/RoundStartedEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Content.Server.Corvax.GameTicking;

public sealed class RoundStartedEvent : EntityEventArgs
{
public int RoundId { get; }

public RoundStartedEvent(int roundId)
{
RoundId = roundId;
}
}
55 changes: 55 additions & 0 deletions Content.Server/Corvax/StationGoal/StationGoalCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System.Linq;
using Content.Server.Administration;
using Content.Shared.Administration;
using Robust.Shared.Console;
using Robust.Shared.Prototypes;

namespace Content.Server.Corvax.StationGoal
{
[AdminCommand(AdminFlags.Fun)]
public sealed class StationGoalCommand : IConsoleCommand
{
public string Command => "sendstationgoal";
public string Description => Loc.GetString("send-station-goal-command-description");
public string Help => Loc.GetString("send-station-goal-command-help-text", ("command", Command));

public void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
shell.WriteError(Loc.GetString("shell-need-exactly-one-argument"));
return;
}

var protoId = args[0];
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
if (!prototypeManager.TryIndex<StationGoalPrototype>(protoId, out var proto))
{
shell.WriteError(Loc.GetString("send-station-goal-command-error-no-goal-proto", ("id", protoId)));
return;
}

var stationGoalPaper = IoCManager.Resolve<IEntityManager>().System<StationGoalPaperSystem>();
if (!stationGoalPaper.SendStationGoal(proto))
{
shell.WriteError(Loc.GetString("send-station-goal-command-error-couldnt-fax"));
return;
}
}

public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{
if (args.Length == 1)
{
var options = IoCManager.Resolve<IPrototypeManager>()
.EnumeratePrototypes<StationGoalPrototype>()
.OrderBy(p => p.ID)
.Select(p => new CompletionOption(p.ID));

return CompletionResult.FromHintOptions(options, Loc.GetString("send-station-goal-command-arg-id"));
}

return CompletionResult.Empty;
}
}
}
10 changes: 10 additions & 0 deletions Content.Server/Corvax/StationGoal/StationGoalPaperComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Content.Server.Corvax.StationGoal
{
/// <summary>
/// Paper with a written station goal in it.
/// </summary>
[RegisterComponent]
public sealed partial class StationGoalPaperComponent : Component
{
}
}
Loading
Loading