* Moved pen slot to separate component * Moved it all to more generic item slot class * Add sounds * Item slots now supports many slots * Some clean-up * Refactored slots a bit * Moving ID card out * Moving pda to system * Moving PDA owner to ECS * Moved PDA flashlight to separate component * Toggle lights work through events * Fixing UI * Moving uplink to separate component * Continue moving uplink to separate component * More cleaning * Removing pda shared * Nuked shared pda component * Fixed flashlight * Pen slot now showed in UI * Light toggle now shows correctly in UI * Small refactoring of item slots * Added contained entity * Fixed tests * Finished with PDA * Moving PDA uplink to separate window * Adding-removing uplink should show new button * Working on a better debug * Debug command to add uplink * Uplink send state to UI * Almost working UI * Uplink correcty updates when you buy-sell items * Ups * Moved localization to separate file * Minor fixes * Removed item slots methods events * Removed PDA owner name * Removed one uplink event * Deleted all uplink events * Removed flashlight events * Update Content.Shared/Traitor/Uplink/UplinkVisuals.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Update Content.Server/Containers/ItemSlot/ItemSlotsSystem.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Update Content.Server/Containers/ItemSlot/ItemSlotsSystem.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Update Content.Server/GameTicking/Presets/PresetTraitorDeathMatch.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Item slots system review * Flashlight review * PDA to XAML * Move UplinkMenu to seperate class, fix WeightedColors methods * Move UI to XAML * Moved events to entity id * Address review * Removed uplink extensions * Minor fix * Moved item slots to shared * My bad Robust... * Fixed pda sound * Fixed pda tests * Fixed pda test again Co-authored-by: Alexander Evgrashin <evgrashin.adl@gmail.com> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Visne <vincefvanwijk@gmail.com>
115 lines
3.8 KiB
C#
115 lines
3.8 KiB
C#
using Content.Server.Administration.Managers;
|
|
using Content.Server.Afk;
|
|
using Content.Server.AI.Utility;
|
|
using Content.Server.AI.Utility.Considerations;
|
|
using Content.Server.AI.WorldState;
|
|
using Content.Server.Chat.Managers;
|
|
using Content.Server.Connection;
|
|
using Content.Server.Database;
|
|
using Content.Server.EUI;
|
|
using Content.Server.GameTicking;
|
|
using Content.Server.Holiday.Interfaces;
|
|
using Content.Server.IoC;
|
|
using Content.Server.NodeContainer.NodeGroups;
|
|
using Content.Server.PDA.Managers;
|
|
using Content.Server.Preferences.Managers;
|
|
using Content.Server.Sandbox;
|
|
using Content.Server.Speech;
|
|
using Content.Server.Voting.Managers;
|
|
using Content.Shared.Actions;
|
|
using Content.Shared.Alert;
|
|
using Content.Shared.Kitchen;
|
|
using Robust.Server.Player;
|
|
using Robust.Shared.ContentPack;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.IoC;
|
|
using Robust.Shared.Log;
|
|
using Robust.Shared.Timing;
|
|
|
|
namespace Content.Server.Entry
|
|
{
|
|
public class EntryPoint : GameServer
|
|
{
|
|
private EuiManager _euiManager = default!;
|
|
private IVoteManager _voteManager = default!;
|
|
|
|
/// <inheritdoc />
|
|
public override void Init()
|
|
{
|
|
base.Init();
|
|
|
|
var factory = IoCManager.Resolve<IComponentFactory>();
|
|
|
|
factory.DoAutoRegistrations();
|
|
|
|
foreach (var ignoreName in IgnoredComponents.List)
|
|
{
|
|
factory.RegisterIgnore(ignoreName);
|
|
}
|
|
|
|
ServerContentIoC.Register();
|
|
|
|
foreach (var callback in TestingCallbacks)
|
|
{
|
|
var cast = (ServerModuleTestingCallbacks) callback;
|
|
cast.ServerBeforeIoC?.Invoke();
|
|
}
|
|
|
|
IoCManager.BuildGraph();
|
|
factory.GenerateNetIds();
|
|
|
|
_euiManager = IoCManager.Resolve<EuiManager>();
|
|
_voteManager = IoCManager.Resolve<IVoteManager>();
|
|
|
|
IoCManager.Resolve<IChatManager>().Initialize();
|
|
|
|
var playerManager = IoCManager.Resolve<IPlayerManager>();
|
|
|
|
var logManager = IoCManager.Resolve<ILogManager>();
|
|
logManager.GetSawmill("Storage").Level = LogLevel.Info;
|
|
logManager.GetSawmill("db.ef").Level = LogLevel.Info;
|
|
|
|
IoCManager.Resolve<IConnectionManager>().Initialize();
|
|
IoCManager.Resolve<IServerDbManager>().Init();
|
|
IoCManager.Resolve<IServerPreferencesManager>().Init();
|
|
IoCManager.Resolve<INodeGroupFactory>().Initialize();
|
|
IoCManager.Resolve<IAccentManager>().Initialize();
|
|
_voteManager.Initialize();
|
|
}
|
|
|
|
public override void PostInit()
|
|
{
|
|
base.PostInit();
|
|
|
|
IoCManager.Resolve<ISandboxManager>().Initialize();
|
|
IoCManager.Resolve<RecipeManager>().Initialize();
|
|
IoCManager.Resolve<AlertManager>().Initialize();
|
|
IoCManager.Resolve<ActionManager>().Initialize();
|
|
IoCManager.Resolve<BlackboardManager>().Initialize();
|
|
IoCManager.Resolve<ConsiderationsManager>().Initialize();
|
|
IoCManager.Resolve<IUplinkManager>().Initialize();
|
|
IoCManager.Resolve<IAdminManager>().Initialize();
|
|
IoCManager.Resolve<INpcBehaviorManager>().Initialize();
|
|
IoCManager.Resolve<IAfkManager>().Initialize();
|
|
_euiManager.Initialize();
|
|
|
|
IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<GameTicker>().PostInitialize();
|
|
}
|
|
|
|
public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs)
|
|
{
|
|
base.Update(level, frameEventArgs);
|
|
|
|
switch (level)
|
|
{
|
|
case ModUpdateLevel.PostEngine:
|
|
{
|
|
_euiManager.SendUpdates();
|
|
_voteManager.Update();
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|