Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/sunrise_public/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Feb 5, 2025
2 parents 10feb3e + 6682cfa commit e340522
Show file tree
Hide file tree
Showing 492 changed files with 205,895 additions and 200,473 deletions.
46 changes: 38 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,34 @@ on:

jobs:
build:
if: false
runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: sudo apt-get install -y python3-paramiko python3-lxml
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install Dependencies
run: pip install pyyaml requests

- uses: actions/[email protected]
with:
submodules: 'recursive'

- name: Checkout SunrisePrivate
uses: actions/checkout@v2
with:
repository: ${{ secrets.SUNRISE_PRIVATE_REPO_URL }}
path: SunrisePrivate
ssh-key: ${{ secrets.SUNRISE_SSH_KEY }}

- name: Move SunrisePrivate files
run: python3 Tools/_sunrise/move_sunrise_private.py
env:
SUNRISE_SSH_KEY: ${{ secrets.SUNRISE_SSH_KEY }}
SUNRISE_PRIVATE_REPO_URL: ${{ secrets.SUNRISE_PRIVATE_REPO_URL }}

- name: Setup .NET Core
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -46,13 +64,25 @@ jobs:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }}

- name: Publish changelog (Discord)
- name: Publish discord changelog (SUNRISE)
run: Tools/actions_changelogs_since_last_run.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }}
DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK_SUNRISE }}

- name: Publish changelog (RSS)
run: Tools/actions_changelog_rss.py
- name: Publish discord changelog (LUST)
run: Tools/actions_changelogs_since_last_run.py
env:
CHANGELOG_RSS_KEY: ${{ secrets.CHANGELOG_RSS_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK_LUST }}

- name: Publish discord changelog (FISH)
run: Tools/actions_changelogs_since_last_run.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK_FISH }}

# - name: Publish changelog (RSS)
# run: Tools/actions_changelog_rss.py
# env:
# CHANGELOG_RSS_KEY: ${{ secrets.CHANGELOG_RSS_KEY }}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "RobustToolbox"]
path = RobustToolbox
url = https://github.com/space-wizards/RobustToolbox.git
branch = master
branch = master
11 changes: 11 additions & 0 deletions Content.Client/Entry/EntryPoint.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Client._Sunrise.Entry;
using Content.Client._Sunrise.ServersHub;
using Content.Client.Administration.Managers;
using Content.Client.Changelog;
Expand Down Expand Up @@ -25,6 +26,8 @@
using Content.Shared.Ame.Components;
using Content.Shared.Gravity;
using Content.Shared.Localizations;
using Content.Sunrise.Interfaces.Client;
using Content.Sunrise.Interfaces.Shared;
using Robust.Client;
using Robust.Client.Graphics;
using Robust.Client.Input;
Expand Down Expand Up @@ -141,6 +144,10 @@ public override void Init()

_serversHubManager.Initialize(); // Sunrise-Hub

// Sunrise-Sponsors-Start
SunriseClientEntry.Init();
// Sunrise-Sponsors-End

//AUTOSCALING default Setup!
_configManager.SetCVar("interface.resolutionAutoScaleUpperCutoffX", 1080);
_configManager.SetCVar("interface.resolutionAutoScaleUpperCutoffY", 720);
Expand Down Expand Up @@ -177,6 +184,10 @@ public override void PostInit()
_documentParsingManager.Initialize();
_titleWindowManager.Initialize();

// Sunrise-Sponsors-Start
SunriseClientEntry.PostInit();
// Sunrise-Sponsors-End

_baseClient.RunLevelChanged += (_, args) =>
{
if (args.NewLevel == ClientRunLevel.Initialize)
Expand Down
10 changes: 6 additions & 4 deletions Content.Client/IoC/ClientContentIoC.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Client._Sunrise.ServersHub;
using Content.Client._Sunrise.IoC;
using Content.Client._Sunrise.ServersHub;
using Content.Client.Administration.Managers;
using Content.Client.Changelog;
using Content.Client.Chat.Managers;
Expand Down Expand Up @@ -61,9 +62,10 @@ public static void Register()
collection.Register<SharedPlayerRateLimitManager, PlayerRateLimitManager>();
collection.Register<TitleWindowManager>();

// Sunrise

collection.Register<ServersHubManager>(); // Sunrise-Hub
// Sunrise-Start
collection.Register<ServersHubManager>();
SunriseClientContentIoC.Register();
// Sunrise-End
}
}
}
12 changes: 12 additions & 0 deletions Content.Client/_Sunrise/Entry/SunriseClientEntry.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Content.Client._Sunrise.Entry;

public sealed class SunriseClientEntry
{
public static void Init()
{
}

public static void PostInit()
{
}
}
11 changes: 11 additions & 0 deletions Content.Client/_Sunrise/IoC/SunriseClientContentIoC.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


namespace Content.Client._Sunrise.IoC;

internal static class SunriseClientContentIoC
{
public static void Register()
{

}
}
13 changes: 13 additions & 0 deletions Content.Server/Entry/EntryPoint.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Server._Sunrise.Entry;
using Content.Server._Sunrise.GuideGenerator;
using Content.Server._Sunrise.ServersHub;
using Content.Server._Sunrise.TTS;
Expand Down Expand Up @@ -29,6 +30,8 @@
using Content.Shared.CCVar;
using Content.Shared.Kitchen;
using Content.Shared.Localizations;
using Content.Sunrise.Interfaces.Server;
using Content.Sunrise.Interfaces.Shared;
using Robust.Server;
using Robust.Server.ServerStatus;
using Robust.Shared.Configuration;
Expand All @@ -53,6 +56,7 @@ public sealed class EntryPoint : GameServer
private IServerDbManager? _dbManager;
private IWatchlistWebhookManager _watchlistWebhookManager = default!;
private IConnectionManager? _connectionManager;
private ISharedSponsorsManager? _sponsorsManager; // Sunrise-Sponsors

/// <inheritdoc />
public override void Init()
Expand Down Expand Up @@ -119,6 +123,11 @@ public override void Init()

IoCManager.Resolve<ServersHubManager>().Initialize(); // Sunrise-Hub

// Sunrise-Sponsors-Start
SunriseServerEntry.Init();
IoCManager.Instance!.TryResolveType(out _sponsorsManager);
// Sunrise-Sponsors-End

_voteManager.Initialize();
_updateManager.Initialize();
_playTimeTracking.Initialize();
Expand Down Expand Up @@ -172,6 +181,9 @@ public override void PostInit()
IoCManager.Resolve<IBanManager>().Initialize();
IoCManager.Resolve<IConnectionManager>().PostInit();
IoCManager.Resolve<MultiServerKickManager>().Initialize();
// Sunrise-Sponsors-Start
SunriseServerEntry.PostInit();
// Sunrise-Sponsors-End
}
}

Expand All @@ -194,6 +206,7 @@ public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs)
_watchlistWebhookManager.Update();
_connectionManager?.Update();
_serversHubManager.Update(); // Sunrise-Edit
_sponsorsManager?.Update(); // Sunrise-Edit
break;
}
}
Expand Down
6 changes: 5 additions & 1 deletion Content.Server/IoC/ServerContentIoC.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Server._Sunrise.IoC;
using Content.Server._Sunrise.ServersHub;
using Content.Server._Sunrise.TTS;
using Content.Server.Administration;
Expand Down Expand Up @@ -80,7 +81,10 @@ public static void Register()
IoCManager.Register<ConnectionManager>();
IoCManager.Register<MultiServerKickManager>();

IoCManager.Register<ServersHubManager>(); // Sunrise-Hub
// Sunrise-Start
IoCManager.Register<ServersHubManager>();
SunriseServerContentIoC.Register();
// Sunrise-End
}
}
}
7 changes: 3 additions & 4 deletions Content.Server/Store/Conditions/BuyerAntagCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ public sealed partial class BuyerAntagCondition : ListingCondition
public override bool Condition(ListingConditionArgs args)
{
var ent = args.EntityManager;
var minds = ent.System<SharedMindSystem>();

if (!minds.TryGetMind(args.Buyer, out var mindId, out var mind))
return true;
if (!ent.HasComponent<MindComponent>(args.Buyer))
return true; // inanimate objects don't have minds

var roleSystem = ent.System<SharedRoleSystem>();
var roles = roleSystem.MindGetAllRoleInfo(mindId);
var roles = roleSystem.MindGetAllRoleInfo(args.Buyer);

if (Blacklist != null)
{
Expand Down
8 changes: 3 additions & 5 deletions Content.Server/Store/Conditions/BuyerDepartmentCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ public override bool Condition(ListingConditionArgs args)
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();

var ent = args.EntityManager;
var minds = ent.System<SharedMindSystem>();

// this is for things like surplus crate
if (!minds.TryGetMind(args.Buyer, out var mindId, out _))
return true;
if (!ent.TryGetComponent<MindComponent>(args.Buyer, out var _))
return true; // inanimate objects don't have minds

var jobs = ent.System<SharedJobSystem>();
jobs.MindTryGetJob(mindId, out var job);
jobs.MindTryGetJob(args.Buyer, out var job);

if (Blacklist != null && job != null)
{
Expand Down
8 changes: 3 additions & 5 deletions Content.Server/Store/Conditions/BuyerJobCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ public sealed partial class BuyerJobCondition : ListingCondition
public override bool Condition(ListingConditionArgs args)
{
var ent = args.EntityManager;
var minds = ent.System<SharedMindSystem>();

// this is for things like surplus crate
if (!minds.TryGetMind(args.Buyer, out var mindId, out _))
return true;
if (!ent.TryGetComponent<MindComponent>(args.Buyer, out var _))
return true; // inanimate objects don't have minds

var jobs = ent.System<SharedJobSystem>();
jobs.MindTryGetJob(mindId, out var job);
jobs.MindTryGetJob(args.Buyer, out var job);

if (Blacklist != null)
{
Expand Down
6 changes: 5 additions & 1 deletion Content.Server/Store/Conditions/BuyerSpeciesCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Shared.Store;
using Content.Shared.Humanoid.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
using Content.Shared.Mind;

namespace Content.Server.Store.Conditions;

Expand All @@ -27,7 +28,10 @@ public override bool Condition(ListingConditionArgs args)
{
var ent = args.EntityManager;

if (!ent.TryGetComponent<HumanoidAppearanceComponent>(args.Buyer, out var appearance))
if (!ent.TryGetComponent<MindComponent>(args.Buyer, out var mind))
return true; // needed to obtain body entityuid to check for humanoid appearance

if (!ent.TryGetComponent<HumanoidAppearanceComponent>(mind.OwnedEntity, out var appearance))
return true; // inanimate or non-humanoid entities should be handled elsewhere, main example being surplus crates

if (Blacklist != null)
Expand Down
8 changes: 6 additions & 2 deletions Content.Server/Store/Systems/StoreSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
using System.Linq;
using Content.Shared.Mind;

namespace Content.Server.Store.Systems;

Expand Down Expand Up @@ -69,10 +70,13 @@ private void OnStoreOpenAttempt(EntityUid uid, StoreComponent component, Activat
if (!component.OwnerOnly)
return;

component.AccountOwner ??= args.User;
if (!_mind.TryGetMind(args.User, out var mind, out _))
return;

component.AccountOwner ??= mind;
DebugTools.Assert(component.AccountOwner != null);

if (component.AccountOwner == args.User)
if (component.AccountOwner == mind)
return;

_popup.PopupEntity(Loc.GetString("store-not-account-owner", ("store", uid)), uid, args.User);
Expand Down
12 changes: 9 additions & 3 deletions Content.Server/Traitor/Uplink/UplinkSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Implants;
using Content.Shared.Inventory;
using Content.Shared.Mind;
using Content.Shared.PDA;
using Content.Shared.Store;
using Content.Shared.Store.Components;
Expand All @@ -20,6 +21,7 @@ public sealed class UplinkSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly StoreSystem _store = default!;
[Dependency] private readonly SharedSubdermalImplantSystem _subdermalImplant = default!;
[Dependency] private readonly SharedMindSystem _mind = default!;
[Dependency] private readonly TagSystem _tagSystem = default!;

[ValidatePrototypeId<CurrencyPrototype>]
Expand Down Expand Up @@ -63,19 +65,23 @@ public bool AddUplink(
/// </summary>
public void SetUplink(EntityUid user, EntityUid uplink, FixedPoint2 balance, bool giveDiscounts)
{
if (!_mind.TryGetMind(user, out var mind, out _))
return;

var store = EnsureComp<StoreComponent>(uplink);
store.AccountOwner = user;

store.AccountOwner = mind;

store.Balance.Clear();
_store.TryAddCurrency(new Dictionary<string, FixedPoint2> { { TelecrystalCurrencyPrototype, balance } },
uplink,
store);

var uplinkInitializedEvent = new StoreInitializedEvent(
TargetUser: user,
TargetUser: mind,
Store: uplink,
UseDiscounts: giveDiscounts,
Listings: _store.GetAvailableListings(user, uplink, store)
Listings: _store.GetAvailableListings(mind, uplink, store)
.ToArray());
RaiseLocalEvent(ref uplinkInitializedEvent);
}
Expand Down
12 changes: 12 additions & 0 deletions Content.Server/_Sunrise/Entry/SunriseServerEntry.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Content.Server._Sunrise.Entry;

public sealed class SunriseServerEntry
{
public static void Init()
{
}

public static void PostInit()
{
}
}
11 changes: 11 additions & 0 deletions Content.Server/_Sunrise/IoC/SunriseServerContentIoC.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


namespace Content.Server._Sunrise.IoC;

internal static class SunriseServerContentIoC
{
public static void Register()
{

}
}
Loading

0 comments on commit e340522

Please sign in to comment.