# Conflicts: # Content.Client/Clothing/ClientClothingSystem.cs # Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs # Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs # Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml # Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml.cs # Content.Server/Administration/Commands/AdminWhoCommand.cs # Content.Server/Bed/Sleep/SleepingSystem.cs # Content.Server/Body/Components/BloodstreamComponent.cs # Content.Server/Body/Components/RespiratorComponent.cs # Content.Server/Body/Systems/InternalsSystem.cs # Content.Server/Body/Systems/RespiratorSystem.cs # Content.Server/Chat/Managers/IChatManager.cs # Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs # Content.Server/DeviceNetwork/Systems/DeviceNetworkSystem.cs # Content.Server/Electrocution/ElectrocutionSystem.cs # Content.Server/Holosign/HolosignProjectorComponent.cs # Content.Server/Holosign/HolosignSystem.cs # Content.Server/Remotes/DoorRemoteSystem.cs # Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs # Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs # Content.Server/Store/Systems/StoreSystem.Ui.cs # Content.Server/VendingMachines/VendingMachineSystem.cs # Content.Server/VoiceMask/VoiceMaskSystem.Equip.cs # Content.Server/VoiceMask/VoiceMaskSystem.cs # Content.Server/VoiceMask/VoiceMaskerComponent.cs # Content.Server/Zombies/ZombieSystem.cs # Content.Shared/Bed/Sleep/SleepEmitSoundComponent.cs # Content.Shared/Cuffs/SharedCuffableSystem.cs # Content.Shared/VoiceMask/SharedVoiceMaskSystem.cs # Resources/Locale/en-US/escape-menu/ui/options-menu.ftl # Resources/Maps/bagel.yml # Resources/Maps/box.yml # Resources/Maps/centcomm.yml # Resources/Maps/cluster.yml # Resources/Maps/europa.yml # Resources/Maps/marathon.yml # Resources/Maps/meta.yml # Resources/Maps/omega.yml # Resources/Maps/origin.yml # Resources/Maps/packed.yml # Resources/Maps/reach.yml # Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml # Resources/Prototypes/Catalog/Fills/Lockers/security.yml # Resources/Prototypes/Catalog/VendingMachines/Inventories/medidrobe.yml # Resources/Prototypes/Entities/Clothing/Hands/colored.yml # Resources/Prototypes/Entities/Clothing/Neck/mantles.yml # Resources/Prototypes/Entities/Clothing/OuterClothing/wintercoats.yml # Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml # Resources/Prototypes/Entities/Objects/Misc/land_mine.yml # Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml # Resources/Prototypes/Entities/Objects/Weapons/Melee/armblade.yml # Resources/Prototypes/Entities/Structures/Decoration/curtains.yml # Resources/Prototypes/Entities/Structures/Doors/Airlocks/highsec.yml # Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml # Resources/Prototypes/Entities/Structures/Holographic/projections.yml # Resources/Prototypes/Entities/Structures/Machines/lathe.yml # Resources/Prototypes/Maps/marathon.yml # Resources/Prototypes/Maps/packed.yml # Resources/Prototypes/Recipes/Lathes/security.yml # Resources/Prototypes/Roles/Jobs/Engineering/atmospheric_technician.yml # Resources/Prototypes/Roles/Jobs/Security/detective.yml # Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml # Resources/Prototypes/Roles/Jobs/Security/security_cadet.yml # Resources/Prototypes/Roles/Jobs/Security/security_officer.yml # Resources/Prototypes/Roles/Jobs/Security/warden.yml # Resources/Textures/Clothing/OuterClothing/Armor/lingarmor.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Coats/labcoat.rsi/equipped-OUTERCLOTHING.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat.rsi/icon-open.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat.rsi/icon.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat.rsi/inhand-left.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat.rsi/inhand-right.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat.rsi/open-equipped-OUTERCLOTHING.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat.rsi/open-inhand-left.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat.rsi/open-inhand-right.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_chem.rsi/equipped-OUTERCLOTHING.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_chem.rsi/icon-open.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_chem.rsi/icon.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_chem.rsi/inhand-left.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_chem.rsi/inhand-right.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_chem.rsi/open-equipped-OUTERCLOTHING.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_chem.rsi/open-inhand-left.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_chem.rsi/open-inhand-right.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_cmo.rsi/equipped-OUTERCLOTHING.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_cmo.rsi/icon-open.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_cmo.rsi/icon.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_cmo.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_cmo.rsi/open-equipped-OUTERCLOTHING.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_sci.rsi/equipped-OUTERCLOTHING-body-slim.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_sci.rsi/open-equipped-OUTERCLOTHING-body-slim.png # Resources/Textures/Clothing/OuterClothing/Hardsuits/cybersun.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Hardsuits/lingspacesuit.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Hardsuits/paramed.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Hardsuits/spatio.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Hardsuits/syndiecommander.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Hardsuits/syndieelite.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Misc/nunrobe.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Misc/plaguedoctorsuit.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/Suits/atmos_firesuit.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coat.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatatmos.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatbar.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatcap.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatcargo.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatce.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatcentcom.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatchem.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatclown.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatcmo.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatengi.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatgen.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coathop.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coathos.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coathydro.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatjani.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatmed.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatmime.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatminer.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatnomi.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatparamed.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatqm.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatrd.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatrobo.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatsci.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatsec.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatviro.rsi/meta.json # Resources/Textures/Clothing/OuterClothing/WinterCoats/coatwarden.rsi/meta.json # Resources/Textures/Clothing/Shoes/Boots/combatboots.rsi/meta.json # Resources/Textures/Clothing/Shoes/Specific/bling.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpskirt/atmosf.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpskirt/centcomformaldress.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpskirt/hosformaldress.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpskirt/operative_s.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpsuit/atmos.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpsuit/centcomformal.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpsuit/hosformal.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpsuit/journalist.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpsuit/operative.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpsuit/psychologist.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpsuit/reporter.rsi/meta.json # Resources/Textures/Interface/Alerts/essence_counter.rsi/essence0.png # Resources/Textures/Interface/Alerts/essence_counter.rsi/essence16.png # Resources/Textures/Objects/Storage/boxes.rsi/meta.json # Resources/Textures/Structures/Doors/Airlocks/Glass/atmospherics.rsi/meta.json # Resources/Textures/Structures/Doors/Airlocks/Standard/atmospherics.rsi/meta.json # Resources/Textures/Structures/Doors/Airlocks/highsec/highsec.rsi/meta.json
248 lines
11 KiB
C#
248 lines
11 KiB
C#
using Content.Client._White.JoinQueue;
|
|
using Content.Client._White.Jukebox;
|
|
using Content.Client._White.Overlays;
|
|
using Content.Client._White.Reputation;
|
|
using Content.Client._White.Sponsors;
|
|
using Content.Client._White.Stalin;
|
|
using Content.Client._White.TTS;
|
|
using Content.Client.Administration.Managers;
|
|
using Content.Client.Changelog;
|
|
using Content.Client.Chat.Managers;
|
|
using Content.Client.Eui;
|
|
using Content.Client.Flash;
|
|
using Content.Client.Fullscreen;
|
|
using Content.Client.GhostKick;
|
|
using Content.Client.Guidebook;
|
|
using Content.Client.Info;
|
|
using Content.Client.Input;
|
|
using Content.Client.IoC;
|
|
using Content.Client.Launcher;
|
|
using Content.Client.MainMenu;
|
|
using Content.Client.Parallax.Managers;
|
|
using Content.Client.Players.PlayTimeTracking;
|
|
using Content.Client.Preferences;
|
|
using Content.Client.Radiation.Overlays;
|
|
using Content.Client.Replay;
|
|
using Content.Client.Screenshot;
|
|
using Content.Client.Singularity;
|
|
using Content.Client.Stylesheets;
|
|
using Content.Client.Viewport;
|
|
using Content.Client.Voting;
|
|
using Content.Shared.Ame.Components;
|
|
using Content.Shared.Gravity;
|
|
using Content.Shared.Localizations;
|
|
using Robust.Client;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Client.Input;
|
|
using Robust.Client.Replays.Loading;
|
|
using Robust.Client.State;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Shared;
|
|
using Robust.Shared.Configuration;
|
|
using Robust.Shared.ContentPack;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Replays;
|
|
|
|
namespace Content.Client.Entry
|
|
{
|
|
public sealed class EntryPoint : GameClient
|
|
{
|
|
[Dependency] private readonly IBaseClient _baseClient = default!;
|
|
[Dependency] private readonly IGameController _gameController = default!;
|
|
[Dependency] private readonly IStateManager _stateManager = default!;
|
|
[Dependency] private readonly IComponentFactory _componentFactory = default!;
|
|
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
|
[Dependency] private readonly IClientAdminManager _adminManager = default!;
|
|
[Dependency] private readonly IParallaxManager _parallaxManager = default!;
|
|
[Dependency] private readonly IConfigurationManager _configManager = default!;
|
|
[Dependency] private readonly IStylesheetManager _stylesheetManager = default!;
|
|
[Dependency] private readonly IScreenshotHook _screenshotHook = default!;
|
|
[Dependency] private readonly FullscreenHook _fullscreenHook = default!;
|
|
[Dependency] private readonly ChangelogManager _changelogManager = default!;
|
|
[Dependency] private readonly RulesManager _rulesManager = default!;
|
|
[Dependency] private readonly ViewportManager _viewportManager = default!;
|
|
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
|
|
[Dependency] private readonly IInputManager _inputManager = default!;
|
|
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
|
[Dependency] private readonly IChatManager _chatManager = default!;
|
|
[Dependency] private readonly IClientPreferencesManager _clientPreferencesManager = default!;
|
|
[Dependency] private readonly EuiManager _euiManager = default!;
|
|
[Dependency] private readonly IVoteManager _voteManager = default!;
|
|
[Dependency] private readonly DocumentParsingManager _documentParsingManager = default!;
|
|
[Dependency] private readonly GhostKickManager _ghostKick = default!;
|
|
[Dependency] private readonly ExtendedDisconnectInformationManager _extendedDisconnectInformation = default!;
|
|
[Dependency] private readonly JobRequirementsManager _jobRequirements = default!;
|
|
[Dependency] private readonly ContentLocalizationManager _contentLoc = default!;
|
|
[Dependency] private readonly ContentReplayPlaybackManager _playbackMan = default!;
|
|
[Dependency] private readonly IResourceManager _resourceManager = default!;
|
|
[Dependency] private readonly IReplayLoadManager _replayLoad = default!;
|
|
[Dependency] private readonly ILogManager _logManager = default!;
|
|
[Dependency] private readonly ContentReplayPlaybackManager _replayMan = default!;
|
|
|
|
//WD-EDIT
|
|
[Dependency] private readonly SponsorsManager _sponsorsManager = default!;
|
|
[Dependency] private readonly JoinQueueManager _queueManager = default!;
|
|
[Dependency] private readonly StalinManager _stalinManager = default!;
|
|
[Dependency] private readonly ClientJukeboxSongsSyncManager _jukeboxSyncManager = default!;
|
|
[Dependency] private readonly TTSManager _ttsManager = default!;
|
|
[Dependency] private readonly ReputationManager _reputationManager = default!;
|
|
//WD-EDIT
|
|
|
|
public override void Init()
|
|
{
|
|
ClientContentIoC.Register();
|
|
|
|
foreach (var callback in TestingCallbacks)
|
|
{
|
|
var cast = (ClientModuleTestingCallbacks) callback;
|
|
cast.ClientBeforeIoC?.Invoke();
|
|
}
|
|
|
|
IoCManager.BuildGraph();
|
|
IoCManager.InjectDependencies(this);
|
|
|
|
_contentLoc.Initialize();
|
|
_componentFactory.DoAutoRegistrations();
|
|
_componentFactory.IgnoreMissingComponents();
|
|
|
|
// Do not add to these, they are legacy.
|
|
_componentFactory.RegisterClass<SharedGravityGeneratorComponent>();
|
|
_componentFactory.RegisterClass<SharedAmeControllerComponent>();
|
|
// Do not add to the above, they are legacy
|
|
|
|
_prototypeManager.RegisterIgnore("utilityQuery");
|
|
_prototypeManager.RegisterIgnore("utilityCurvePreset");
|
|
_prototypeManager.RegisterIgnore("accent");
|
|
_prototypeManager.RegisterIgnore("gasReaction");
|
|
_prototypeManager.RegisterIgnore("seed"); // Seeds prototypes are server-only.
|
|
_prototypeManager.RegisterIgnore("objective");
|
|
_prototypeManager.RegisterIgnore("holiday");
|
|
_prototypeManager.RegisterIgnore("htnCompound");
|
|
_prototypeManager.RegisterIgnore("htnPrimitive");
|
|
_prototypeManager.RegisterIgnore("gameMap");
|
|
_prototypeManager.RegisterIgnore("gameMapPool");
|
|
_prototypeManager.RegisterIgnore("lobbyBackground");
|
|
_prototypeManager.RegisterIgnore("gamePreset");
|
|
_prototypeManager.RegisterIgnore("noiseChannel");
|
|
_prototypeManager.RegisterIgnore("spaceBiome");
|
|
_prototypeManager.RegisterIgnore("worldgenConfig");
|
|
_prototypeManager.RegisterIgnore("gameRule");
|
|
_prototypeManager.RegisterIgnore("worldSpell");
|
|
_prototypeManager.RegisterIgnore("entitySpell");
|
|
_prototypeManager.RegisterIgnore("instantSpell");
|
|
_prototypeManager.RegisterIgnore("roundAnnouncement");
|
|
_prototypeManager.RegisterIgnore("wireLayout");
|
|
_prototypeManager.RegisterIgnore("alertLevels");
|
|
_prototypeManager.RegisterIgnore("nukeopsRole");
|
|
|
|
//WD-EDIT
|
|
_prototypeManager.RegisterIgnore("loadout");
|
|
//WD-EDIT
|
|
|
|
_componentFactory.GenerateNetIds();
|
|
_adminManager.Initialize();
|
|
_screenshotHook.Initialize();
|
|
_fullscreenHook.Initialize();
|
|
_changelogManager.Initialize();
|
|
_rulesManager.Initialize();
|
|
_viewportManager.Initialize();
|
|
_ghostKick.Initialize();
|
|
_extendedDisconnectInformation.Initialize();
|
|
_jobRequirements.Initialize();
|
|
_playbackMan.Initialize();
|
|
|
|
//WD-EDIT
|
|
_stalinManager.Initialize();
|
|
//WD-EDIT
|
|
|
|
//AUTOSCALING default Setup!
|
|
_configManager.SetCVar("interface.resolutionAutoScaleUpperCutoffX", 1080);
|
|
_configManager.SetCVar("interface.resolutionAutoScaleUpperCutoffY", 720);
|
|
_configManager.SetCVar("interface.resolutionAutoScaleLowerCutoffX", 520);
|
|
_configManager.SetCVar("interface.resolutionAutoScaleLowerCutoffY", 240);
|
|
_configManager.SetCVar("interface.resolutionAutoScaleMinimum", 0.5f);
|
|
}
|
|
|
|
public override void PostInit()
|
|
{
|
|
base.PostInit();
|
|
|
|
_stylesheetManager.Initialize();
|
|
|
|
// Setup key contexts
|
|
ContentContexts.SetupContexts(_inputManager.Contexts);
|
|
|
|
_parallaxManager.LoadDefaultParallax();
|
|
|
|
_overlayManager.AddOverlay(new SingularityOverlay());
|
|
_overlayManager.AddOverlay(new FlashOverlay());
|
|
_overlayManager.AddOverlay(new RadiationPulseOverlay());
|
|
// _overlayManager.AddOverlay(new GrainOverlay());
|
|
// _overlayManager.AddOverlay(new AtmOverlay());
|
|
_chatManager.Initialize();
|
|
_clientPreferencesManager.Initialize();
|
|
_euiManager.Initialize();
|
|
_voteManager.Initialize();
|
|
_userInterfaceManager.SetDefaultTheme("SS14DefaultTheme");
|
|
_userInterfaceManager.SetActiveTheme(_configManager.GetCVar(CVars.InterfaceTheme));
|
|
_documentParsingManager.Initialize();
|
|
|
|
//WD-EDIT
|
|
_sponsorsManager.Initialize();
|
|
_queueManager.Initialize();
|
|
_jukeboxSyncManager.Initialize();
|
|
_ttsManager.Initialize();
|
|
_reputationManager.Initialize();
|
|
//WD-EDIT
|
|
|
|
_baseClient.RunLevelChanged += (_, args) =>
|
|
{
|
|
if (args.NewLevel == ClientRunLevel.Initialize)
|
|
{
|
|
SwitchToDefaultState(args.OldLevel == ClientRunLevel.Connected ||
|
|
args.OldLevel == ClientRunLevel.InGame);
|
|
}
|
|
};
|
|
|
|
// Disable engine-default viewport since we use our own custom viewport control.
|
|
_userInterfaceManager.MainViewport.Visible = false;
|
|
|
|
SwitchToDefaultState();
|
|
}
|
|
|
|
private void SwitchToDefaultState(bool disconnected = false)
|
|
{
|
|
// Fire off into state dependent on launcher or not.
|
|
|
|
// Check if we're loading a replay via content bundle!
|
|
if (_configManager.GetCVar(CVars.LaunchContentBundle)
|
|
&& _resourceManager.ContentFileExists(
|
|
ReplayConstants.ReplayZipFolder.ToRootedPath() / ReplayConstants.FileMeta))
|
|
{
|
|
_logManager.GetSawmill("entry").Info("Loading content bundle replay from VFS!");
|
|
|
|
var reader = new ReplayFileReaderResources(
|
|
_resourceManager,
|
|
ReplayConstants.ReplayZipFolder.ToRootedPath());
|
|
|
|
_replayMan.LastLoad = (null, ReplayConstants.ReplayZipFolder.ToRootedPath());
|
|
_replayLoad.LoadAndStartReplay(reader);
|
|
}
|
|
else if (_gameController.LaunchState.FromLauncher)
|
|
{
|
|
_stateManager.RequestStateChange<LauncherConnecting>();
|
|
var state = (LauncherConnecting) _stateManager.CurrentState;
|
|
|
|
if (disconnected)
|
|
{
|
|
state.SetDisconnected();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
_stateManager.RequestStateChange<MainScreen>();
|
|
}
|
|
}
|
|
}
|
|
}
|