mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 10:51:14 +03:00
* pcmasterrace * RMC screech port + i guess it works more * i made a magic commit that mostly duplicates the flash system but different TM * it just works nya * final touchups * Revert "pcmasterrace" This reverts commit b75e9265610924c3a1a30761e5e050cb6ee63bc8. * there, support for more :godo: * Update Content.Shared/Screech/SharedScreechSystem.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * all feedback except the big one * i lied * mfw code * fix * le shader temp * vfx * Revert "le shader temp" This reverts commit 0180a8c1a6ffe82f0ae8d151c07d0794c3eb4984. * Update Content.Client/Effects/ScreechShockWaveSystem.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Shared/Screech/ScreechShockWaveComponent.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Effects/ScreechShockWaveSystem.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * rwrw * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Shared/Screech/ScreechSystem.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * :godo: * Update Content.Client/Overlays/ScreechShockWaveOverlay.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Update Content.Client/Effects/ScreechShockWaveSystem.cs Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> * Effects * sexy * lang * scub * nya * e * fixed shader * entity effects * FNAF IS THIS WHERE U WANNA BE??????? * Update Resources/Locale/en-US/screech/screech.ftl Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> * Update Content.Shared/Screech/NoiseProtection.cs Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> * weeeee * scar whyyyyy * Update Content.Shared/Screech/ScreechSystem.cs Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> * Update Content.Shared/Screech/ScreechSystem.cs Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> * Update Content.Shared/Screech/ScreechSystem.cs Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> * e * they've got allen wrenches gerbil feeders toilet seat electric heaters * cleanup * datafield ig * Revert "datafield ig" This reverts commit dd0d9421452f156b0b1ebc527ac9b142d657ae50. * comments --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: nomdéraisonnablementlong <you@example.com> Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com> Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Co-authored-by: ScarKy0 <scarky0@onet.eu>
245 lines
11 KiB
C#
245 lines
11 KiB
C#
using Content.Client.Administration.Managers;
|
|
using Content.Client.Changelog;
|
|
using Content.Client.Chat.Managers;
|
|
using Content.Client.DebugMon;
|
|
using Content.Client.Eui;
|
|
using Content.Client.FeedbackPopup;
|
|
using Content.Client.Fullscreen;
|
|
using Content.Client.GameTicking.Managers;
|
|
using Content.Client.GhostKick;
|
|
using Content.Client.Guidebook;
|
|
using Content.Client.Input;
|
|
using Content.Client.IoC;
|
|
using Content.Client.Launcher;
|
|
using Content.Client.Lobby;
|
|
using Content.Client.MainMenu;
|
|
using Content.Client.Overlays;
|
|
using Content.Client.Parallax.Managers;
|
|
using Content.Client.Players.PlayTimeTracking;
|
|
using Content.Client.Playtime;
|
|
using Content.Client.Radiation.Overlays;
|
|
using Content.Client.Replay;
|
|
using Content.Client.Screenshot;
|
|
using Content.Client.Singularity;
|
|
using Content.Client.Stylesheets;
|
|
using Content.Client.UserInterface;
|
|
using Content.Client.Viewport;
|
|
using Content.Client.Voting;
|
|
using Content.Shared.Ame.Components;
|
|
using Content.Shared.FeedbackSystem;
|
|
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;
|
|
using Robust.Shared.Timing;
|
|
|
|
namespace Content.Client.Entry
|
|
{
|
|
public sealed partial class EntryPoint : GameClient
|
|
{
|
|
[Dependency] private IBaseClient _baseClient = default!;
|
|
[Dependency] private IGameController _gameController = default!;
|
|
[Dependency] private IStateManager _stateManager = default!;
|
|
[Dependency] private IComponentFactory _componentFactory = default!;
|
|
[Dependency] private IPrototypeManager _prototypeManager = default!;
|
|
[Dependency] private IClientAdminManager _adminManager = default!;
|
|
[Dependency] private IParallaxManager _parallaxManager = default!;
|
|
[Dependency] private IConfigurationManager _configManager = default!;
|
|
[Dependency] private IStylesheetManager _stylesheetManager = default!;
|
|
[Dependency] private IScreenshotHook _screenshotHook = default!;
|
|
[Dependency] private FullscreenHook _fullscreenHook = default!;
|
|
[Dependency] private ChangelogManager _changelogManager = default!;
|
|
[Dependency] private ViewportManager _viewportManager = default!;
|
|
[Dependency] private IUserInterfaceManager _userInterfaceManager = default!;
|
|
[Dependency] private IInputManager _inputManager = default!;
|
|
[Dependency] private IOverlayManager _overlayManager = default!;
|
|
[Dependency] private IChatManager _chatManager = default!;
|
|
[Dependency] private IClientPreferencesManager _clientPreferencesManager = default!;
|
|
[Dependency] private EuiManager _euiManager = default!;
|
|
[Dependency] private IVoteManager _voteManager = default!;
|
|
[Dependency] private DocumentParsingManager _documentParsingManager = default!;
|
|
[Dependency] private GhostKickManager _ghostKick = default!;
|
|
[Dependency] private ExtendedDisconnectInformationManager _extendedDisconnectInformation = default!;
|
|
[Dependency] private JobRequirementsManager _jobRequirements = default!;
|
|
[Dependency] private ContentLocalizationManager _contentLoc = default!;
|
|
[Dependency] private ContentReplayPlaybackManager _playbackMan = default!;
|
|
[Dependency] private IResourceManager _resourceManager = default!;
|
|
[Dependency] private IReplayLoadManager _replayLoad = default!;
|
|
[Dependency] private ILogManager _logManager = default!;
|
|
[Dependency] private DebugMonitorManager _debugMonitorManager = default!;
|
|
[Dependency] private TitleWindowManager _titleWindowManager = default!;
|
|
[Dependency] private IEntitySystemManager _entitySystemManager = default!;
|
|
[Dependency] private ClientsidePlaytimeTrackingManager _clientsidePlaytimeManager = default!;
|
|
[Dependency] private ClientFeedbackManager _feedbackManager = null!;
|
|
|
|
public override void PreInit()
|
|
{
|
|
ClientContentIoC.Register(Dependencies);
|
|
|
|
foreach (var callback in TestingCallbacks)
|
|
{
|
|
var cast = (ClientModuleTestingCallbacks) callback;
|
|
cast.ClientBeforeIoC?.Invoke();
|
|
}
|
|
}
|
|
|
|
public override void Init()
|
|
{
|
|
Dependencies.BuildGraph();
|
|
Dependencies.InjectDependencies(this);
|
|
|
|
_contentLoc.Initialize();
|
|
_componentFactory.DoAutoRegistrations();
|
|
_componentFactory.IgnoreMissingComponents();
|
|
|
|
// Do not add to these, they are legacy.
|
|
_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("gamePreset");
|
|
_prototypeManager.RegisterIgnore("noiseChannel");
|
|
_prototypeManager.RegisterIgnore("playerConnectionWhitelist");
|
|
_prototypeManager.RegisterIgnore("spaceBiome");
|
|
_prototypeManager.RegisterIgnore("gameRule");
|
|
_prototypeManager.RegisterIgnore("worldSpell");
|
|
_prototypeManager.RegisterIgnore("entitySpell");
|
|
_prototypeManager.RegisterIgnore("instantSpell");
|
|
_prototypeManager.RegisterIgnore("roundAnnouncement");
|
|
_prototypeManager.RegisterIgnore("wireLayout");
|
|
_prototypeManager.RegisterIgnore("alertLevels");
|
|
_prototypeManager.RegisterIgnore("nukeopsRole");
|
|
_prototypeManager.RegisterIgnore("ghostRoleRaffleDecider");
|
|
_prototypeManager.RegisterIgnore("codewordGenerator");
|
|
_prototypeManager.RegisterIgnore("codewordFaction");
|
|
|
|
_componentFactory.GenerateNetIds();
|
|
_adminManager.Initialize();
|
|
_screenshotHook.Initialize();
|
|
_fullscreenHook.Initialize();
|
|
_changelogManager.Initialize();
|
|
_viewportManager.Initialize();
|
|
_ghostKick.Initialize();
|
|
_extendedDisconnectInformation.Initialize();
|
|
_jobRequirements.Initialize();
|
|
_playbackMan.Initialize();
|
|
_clientsidePlaytimeManager.Initialize();
|
|
|
|
//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 RadiationPulseOverlay());
|
|
_overlayManager.AddOverlay(new ScreechShockWaveOverlay());
|
|
_chatManager.Initialize();
|
|
_clientPreferencesManager.Initialize();
|
|
_euiManager.Initialize();
|
|
_voteManager.Initialize();
|
|
_userInterfaceManager.SetDefaultTheme("SS14DefaultTheme");
|
|
_userInterfaceManager.SetActiveTheme(_configManager.GetCVar(CVars.InterfaceTheme));
|
|
_documentParsingManager.Initialize();
|
|
_titleWindowManager.Initialize();
|
|
_feedbackManager.Initialize();
|
|
|
|
_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());
|
|
|
|
_playbackMan.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>();
|
|
}
|
|
}
|
|
|
|
public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs)
|
|
{
|
|
if (level == ModUpdateLevel.FramePreEngine)
|
|
{
|
|
_debugMonitorManager.FrameUpdate();
|
|
}
|
|
|
|
if (level == ModUpdateLevel.PreEngine)
|
|
{
|
|
if (_baseClient.RunLevel is ClientRunLevel.InGame or ClientRunLevel.SinglePlayerGame)
|
|
{
|
|
var updateSystem = _entitySystemManager.GetEntitySystem<BuiPreTickUpdateSystem>();
|
|
updateSystem.RunUpdates();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|