Skip to content

Commit

Permalink
ghost sponsor update (#864)
Browse files Browse the repository at this point in the history
* ghost sponsor update

* gamemode fix's
  • Loading branch information
Rxup authored Oct 27, 2024
1 parent d19b5a7 commit b5e913c
Show file tree
Hide file tree
Showing 19 changed files with 288 additions and 140 deletions.
2 changes: 1 addition & 1 deletion Content.Client/Backmen/SponsorManager/UI/SponsorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected override void Opened()
GhostTheme.AddItem(Loc.GetString("sponsor-win-manager-ghost-default"), id: -1);
foreach (var (themePrototype,id) in _ghostThemePrototypes.Select((x,i)=>(x,i)))
{
GhostTheme.AddItem(Loc.GetString($"sponsor-win-manager-ghost-{themePrototype.ID}"), id);
GhostTheme.AddItem(Loc.GetString(themePrototype.Name), id);
if (selectedGhost == themePrototype.ID)
{
selectedInt = id;
Expand Down
14 changes: 4 additions & 10 deletions Content.Client/Backmen/Sponsors/SponsorsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,10 @@ private void OnUpdate(MsgSponsorInfo message)
Reset();

#if DEBUG
Prototypes.Add("tier1");
Prototypes.Add("tier2");
Prototypes.Add("tier01");
Prototypes.Add("tier02");
Prototypes.Add("tier03");
Prototypes.Add("tier04");
Prototypes.Add("tier05");
Prototypes.Add("tier06");
Prototypes.Add("tier07");
Prototypes.Add("tier08");
foreach (var ghostProto in IoCManager.Resolve<Robust.Shared.Prototypes.IPrototypeManager>().EnumeratePrototypes<Shared.Backmen.GhostTheme.GhostThemePrototype>())
{
Prototypes.Add(ghostProto.ID);
}
#endif

if (message.Info == null)
Expand Down
24 changes: 5 additions & 19 deletions Content.Server/Backmen/GhostTheme/GhostThemeSystem.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
using System.Linq;
using Content.Corvax.Interfaces.Server;
using Content.Corvax.Interfaces.Shared;
using Content.Server.Mind;
using Content.Corvax.Interfaces.Shared;
using Content.Shared.Backmen.GhostTheme;
using Content.Shared.GameTicking;
using Content.Shared.Ghost;
using Content.Shared.Players;
using Robust.Server.Configuration;
using Robust.Shared;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager;
using Robust.Shared.Timing;

#pragma warning disable CS0618 // Type or member is obsolete

Expand All @@ -39,16 +31,10 @@ private void OnPlayerAttached(EntityUid uid, GhostComponent component, PlayerAtt
if (!_sponsorsMgr.TryGetServerPrototypes(args.Player.UserId, out var items))
{
items = new List<string>();
items.Add("tier1");
items.Add("tier2");
items.Add("tier01");
items.Add("tier02");
items.Add("tier03");
items.Add("tier04");
items.Add("tier05");
items.Add("tier06");
items.Add("tier07");
items.Add("tier08");
foreach (var ghostProto in IoCManager.Resolve<IPrototypeManager>().EnumeratePrototypes<GhostThemePrototype>())
{
items.Add(ghostProto.ID);
}
}
if (!items.Contains(prefGhost))
{
Expand Down
Loading

0 comments on commit b5e913c

Please sign in to comment.