Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

upstream #25

Merged
merged 49 commits into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
fa733a8
Add wedding clothing.
Lemirda Mar 27, 2024
6ad76a8
balaclava
Lemirda Mar 28, 2024
8619a2b
Merge pull request #10 from Lemirda/master-andromeda
Lemirda Mar 30, 2024
c73cc27
Merge pull request #8 from Lemirda/master-andromeda
Lemirda Mar 30, 2024
f57248b
Merge pull request #7 from Lemirda/master-andromeda
Lemirda Mar 30, 2024
2c1e3f0
ПОШЛА НАХУЙ ЧУРКА
Lemirda Mar 30, 2024
7c83386
Remove AdminNotifySystem in Nukeops gamerule and warning only "CanHos…
Lemirda Mar 30, 2024
a53490e
Merge pull request #16 from Lemirda/master-andromeda
Lemirda Mar 31, 2024
8dcaab4
Merge pull request #14 from Lemirda/master-andromeda
Lemirda Mar 31, 2024
3ea3bc6
Merge pull request #13 from Lemirda/master-andromeda
Lemirda Mar 31, 2024
5fc4978
Фикс чертей
NIKforest Mar 31, 2024
d9fb69d
Delete fuck system dragon delete
Lemirda Mar 31, 2024
3f6d122
link discord
Lemirda Apr 1, 2024
3cad6f5
Fix antag system for sponsors
Lemirda Apr 3, 2024
fc43653
Баф чертей
NIKforest Apr 3, 2024
c7cdbad
Merge pull request #103 from Lemirda/master-andromeda
13lackHawk Apr 4, 2024
bb1ea0a
full localizaton craft
Lemirda Apr 6, 2024
dd67200
antag fixes and some new stuff
13lackHawk Apr 6, 2024
9ecd6ac
Merge pull request #105 from Lemirda/craft-localization
13lackHawk Apr 6, 2024
882cffa
add tracking admins system
Lemirda Apr 7, 2024
db20192
tag a-13
Lemirda Apr 7, 2024
df60ee6
Merge pull request #101 from Lemirda/github-actions
13lackHawk Apr 7, 2024
6155ea0
Merge pull request #99 from Lemirda/task-hawk
13lackHawk Apr 7, 2024
3ce1251
Merge pull request #107 from Lemirda/master-andromeda
13lackHawk Apr 7, 2024
622447e
Create Consumable
NIKforest Apr 7, 2024
1f9c85e
Delete Resources/Textures/Andromeda/Objects/Consumable
NIKforest Apr 7, 2024
bc104ed
Спрайт оливье
NIKforest Apr 7, 2024
1b53cd8
Delete Resources/Textures/Andromeda/Objects/Consumable/olivie.rsi dir…
NIKforest Apr 7, 2024
f07fd73
ъ
NIKforest Apr 7, 2024
2256dbc
Спрайт оливье
NIKforest Apr 7, 2024
a0be6ec
Рецепты/оливье
NIKforest Apr 7, 2024
46c2d0f
Create Blya
NIKforest Apr 7, 2024
b5c1ef7
Add files via upload
NIKforest Apr 7, 2024
e12c376
Merge pull request #22 from Lemirda/master-andromeda
Lemirda Apr 8, 2024
a095edb
fix meta
Lemirda Apr 8, 2024
c01ac28
Merge pull request #21 from NIKforest/master-andromeda
Lemirda Apr 8, 2024
f35a673
fix pull request propera
Lemirda Apr 8, 2024
c3aca41
sindimat
Lemirda Apr 8, 2024
050cacc
fix part 2
Lemirda Apr 8, 2024
2bc9593
Mega update round system + fix nukeops (cringe code, warning!!!)
Lemirda Apr 12, 2024
949fbe0
fix govno system
Lemirda Apr 12, 2024
a50d09d
fix part 2 (micro fix)
Lemirda Apr 12, 2024
7a5de10
fix localization
Lemirda Apr 12, 2024
7d0dbae
smol tweaks
13lackHawk Apr 13, 2024
3a22a37
Revert "smol tweaks"
13lackHawk Apr 13, 2024
dbbc337
Merge branch 'master-andromeda' of https://github.com/13lackHawk/spac…
13lackHawk Apr 13, 2024
df2cfa0
mne pohui ya snova sdelayu eto
13lackHawk Apr 13, 2024
ce8f600
Merge pull request #109 from Lemirda/master-andromeda
13lackHawk Apr 13, 2024
6cd1e11
Merge pull request #108 from Lemirda/player-suggestions
13lackHawk Apr 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
contact_links:
- name: Предложение
url: https://discord.com/invite/CPacm3dfrA
url: https://discord.gg/CuWu6kSznf #A-13
about: Свои предложения можете оставлять в соответствующем канале Discord.
- name: Сообщить об уязвимости
url: https://discord.com/invite/CPacm3dfrA
url: https://discord.gg/CuWu6kSznf #A-13
about: Пожалуйста, сообщайте о серьезных эксплойтах и уязвимостях безопасности lemird (634710558364663819) или 13lackhawk (236910741146304515) в Discord.
19 changes: 0 additions & 19 deletions .github/workflows/conflict-labeler.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Content.Client/Launcher/LauncherConnectingGui.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public LauncherConnectingGui(LauncherConnecting state, IRobustRandom random,
ChangeLoginTip();
ReconnectButton.OnPressed += ReconnectButtonPressed;
RetryButton.OnPressed += ReconnectButtonPressed;
DiscordButton.OnPressed += _ => IoCManager.Resolve<IUriOpener>().OpenUri("https://discord.gg/CPacm3dfrA"); // A-13
DiscordButton.OnPressed += _ => IoCManager.Resolve<IUriOpener>().OpenUri("https://discord.gg/CuWu6kSznf"); // A-13
ExitButton.OnPressed += _ => _state.Exit();

var addr = state.Address;
Expand Down
2 changes: 1 addition & 1 deletion Content.Docfx/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

## Links

[Website](https://spacestation14.io/) | [Discord](https://discord.gg/t2jac3p) | [Forum](https://forum.spacestation14.io/) | [Steam](https://store.steampowered.com/app/1255460/Space_Station_14/) | [Standalone Download](https://spacestation14.io/about/nightlies/)
[Website](https://spacestation14.io/) | [Discord](https://discord.gg/CuWu6kSznf) | [Forum](https://forum.spacestation14.io/) | [Steam](https://store.steampowered.com/app/1255460/Space_Station_14/) | [Standalone Download](https://spacestation14.io/about/nightlies/)
15 changes: 13 additions & 2 deletions Content.Server/Administration/Managers/AdminManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
using Robust.Shared.Toolshed;
using Robust.Shared.Toolshed.Errors;
using Robust.Shared.Utility;

using Content.Server.Andromeda.AdministrationNotifications.GameTicking; //A-13 AdminNotifications

namespace Content.Server.Administration.Managers
{
public sealed partial class AdminManager : IAdminManager, IPostInjectInit, IConGroupControllerImplementation
{
[Dependency] private readonly IEntityManager _entityManager = default!; //A-13 AdminNotifications
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IServerDbManager _dbManager = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
Expand Down Expand Up @@ -342,7 +343,7 @@ private void PlayerStatusChanged(object? sender, SessionStatusEventArgs e)
}
else if (e.NewStatus == SessionStatus.Disconnected)
{
if (_admins.Remove(e.Session, out var reg ) && _cfg.GetCVar(CCVars.AdminAnnounceLogout))
if (_admins.TryGetValue(e.Session, out var reg ) && _cfg.GetCVar(CCVars.AdminAnnounceLogout)) //A-13 AdminNotifications
{
if (reg.Data.Stealth)
{
Expand All @@ -355,6 +356,12 @@ private void PlayerStatusChanged(object? sender, SessionStatusEventArgs e)
_chat.SendAdminAnnouncement(Loc.GetString("admin-manager-admin-logout-message",
("name", e.Session.Name)));
}
//A-13 AdminNotifications start
var logoutEvent = new AdminLoggedOutEvent(e.Session);
_entityManager.EventBus.RaiseEvent(EventSource.Local, logoutEvent);

_admins.Remove(e.Session);
//A-13 AdminNotifications end
}
}
}
Expand Down Expand Up @@ -398,6 +405,10 @@ private async void LoginAdminMaybe(ICommonSession session)
_chat.SendAdminAnnouncement(Loc.GetString("admin-manager-admin-login-message",
("name", session.Name)));
}
//A-13 AdminNotifications start
var loginEvent = new AdminLoggedInEvent(session);
_entityManager.EventBus.RaiseEvent(EventSource.Local, loginEvent);
//A-13 AdminNotifications end
}

SendPermsChangedEvent(session);
Expand Down
11 changes: 11 additions & 0 deletions Content.Server/Administration/Systems/AdminNotifySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
using Robust.Shared.Audio.Systems;
using Content.Server.Administration;
using Content.Server.Administration.Managers;
using Content.Server.Guardian; //A-13 Fix AdminNotifySystem
using Content.Server.GameTicking.Rules.Components; //A-13 Fix AdminNotifySystem
using System.Linq; //A-13 Fix AdminNotifySystem

namespace Content.Server.Administration.Systems;

Expand All @@ -30,6 +33,14 @@ private void OnMobStateChanged(MobStateChangedEvent ev)
if (!TryComp(ev.Target, out ActorComponent? actorComponent))
return;

//A-13 Fix AdminNotifySystem start
if (!HasComp<CanHostGuardianComponent>(ev.Target))
return;

if (EntityQuery<NukeopsRuleComponent>().Any())
return;
//A-13 Fix AdminNotifySystem end

if (actorComponent.PlayerSession.AttachedEntity == null || ev.NewMobState == MobState.Alive)
return;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using Content.Shared.Administration;
using Robust.Shared;
using Robust.Shared.Configuration;
using Robust.Shared.Player;
using System.Net.Http;
using System.Text.Json;
using System.Text;
using Content.Server.Discord;
using Content.Shared.CCVar;
using Content.Shared.Andromeda.CCVar;
using Content.Server.Andromeda.AdministrationNotifications.GameTicking;

namespace Content.Server.Andromeda.AdministrationNotifications
{

public sealed class AdminNotificationsSystem : EntitySystem
{
[Dependency] private readonly IConfigurationManager _config = default!;
private ISawmill _sawmill = default!;
private readonly HttpClient _httpClient = new();
private string _webhookUrl = String.Empty;
private int _adminCount = 0;

public override void Initialize()
{
_sawmill = Logger.GetSawmill("admin_notifications");
SubscribeLocalEvent<AdminLoggedInEvent>(OnAdminLoggedIn);
SubscribeLocalEvent<AdminLoggedOutEvent>(OnAdminLoggedOut);
_config.OnValueChanged(AndromedaCCVars.DiscordAdminWebhook, value => _webhookUrl = value, true);
}

private async void SendDiscordMessage(WebhookPayload payload)
{
var request = await _httpClient.PostAsync(_webhookUrl,
new StringContent(JsonSerializer.Serialize(payload), Encoding.UTF8, "application/json"));

_sawmill.Debug($"Вебхук Discord в формате json: {JsonSerializer.Serialize(payload)}");

var content = await request.Content.ReadAsStringAsync();
if (!request.IsSuccessStatusCode)
{
_sawmill.Error($"Discord вернул неверный код статуса при публикации сообщения: {request.StatusCode}\nResponse: {content}");
return;
}
}

private void OnAdminLoggedIn(AdminLoggedInEvent e)
{
_adminCount++;
SendAdminStatusUpdate(e.Session, "вошёл", 0x00FF00);
}

private void OnAdminLoggedOut(AdminLoggedOutEvent e)
{
_adminCount--;
SendAdminStatusUpdate(e.Session, "вышел", 0xFF0000);
}

private void SendAdminStatusUpdate(ICommonSession session, string action, int color)
{
if (String.IsNullOrEmpty(_webhookUrl))
return;

var message = $"{session.Name} {action}. Всего администраторов онлайн: {_adminCount}";

var payload = new WebhookPayload
{
Username = "Отчёт входов админов",
Embeds = new List<WebhookEmbed>
{
new()
{
Description = message,
Color = color,
},
},
};

SendDiscordMessage(payload);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Robust.Shared.Player;

namespace Content.Server.Andromeda.AdministrationNotifications.GameTicking;

public sealed class AdminLoggedInEvent : EntityEventArgs
{
public ICommonSession Session { get; }

public AdminLoggedInEvent(ICommonSession session)
{
Session = session;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Robust.Shared.Player;

namespace Content.Server.Andromeda.AdministrationNotifications.GameTicking;

public sealed class AdminLoggedOutEvent : EntityEventArgs
{
public ICommonSession Session { get; }

public AdminLoggedOutEvent(ICommonSession session)
{
Session = session;
}
}
Loading
Loading