diff --git a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs index 4857a36ac9..4957782a8a 100644 --- a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs +++ b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs @@ -35,8 +35,6 @@ namespace Content.Client.Administration.UI.CustomControls private readonly Font _fontOverride; - private PlayerInfo? _selectedPlayer; - public PlayerListControl() { _entManager = IoCManager.Resolve(); diff --git a/Content.Client/Clothing/ClientClothingSystem.cs b/Content.Client/Clothing/ClientClothingSystem.cs index 9f318a8647..b74b13a175 100644 --- a/Content.Client/Clothing/ClientClothingSystem.cs +++ b/Content.Client/Clothing/ClientClothingSystem.cs @@ -186,7 +186,7 @@ public sealed class ClientClothingSystem : ClothingSystem State = state }; - layers = [layer]; + layers = new List { layer }; return true; } diff --git a/Content.Client/Decals/Overlays/DecalOverlay.cs b/Content.Client/Decals/Overlays/DecalOverlay.cs index 59fd98ec0f..6157a29e84 100644 --- a/Content.Client/Decals/Overlays/DecalOverlay.cs +++ b/Content.Client/Decals/Overlays/DecalOverlay.cs @@ -15,7 +15,7 @@ namespace Content.Client.Decals.Overlays { private readonly Dictionary _cachedTextures = new(64); - private readonly List<(uint Id, Decal Decal)> _decals = []; + private readonly List<(uint Id, Decal Decal)> _decals = new(); protected override void Draw(in OverlayDrawArgs args) { diff --git a/Content.Client/Doors/AirlockSystem.cs b/Content.Client/Doors/AirlockSystem.cs index 4753287cb7..30aca58b7e 100644 --- a/Content.Client/Doors/AirlockSystem.cs +++ b/Content.Client/Doors/AirlockSystem.cs @@ -14,14 +14,14 @@ public sealed class AirlockSystem : SharedAirlockSystem public override void Initialize() { base.Initialize(); + SubscribeLocalEvent(OnBeforeDoorClosed); SubscribeLocalEvent(OnComponentStartup); SubscribeLocalEvent(OnAppearanceChange); } - protected override void OnBeforeDoorClosed(EntityUid uid, AirlockComponent airlock, BeforeDoorClosedEvent args) + // А нужен ли ты блять + private void OnBeforeDoorClosed(EntityUid uid, AirlockComponent airlock, BeforeDoorClosedEvent args) { - base.OnBeforeDoorClosed(uid, airlock, args); - if (_appearanceSystem.TryGetData(uid, DoorVisuals.BoltLights, out var boltLights) && boltLights) { args.Cancel(); diff --git a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs index 158c23891c..b6f1be499a 100644 --- a/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs @@ -107,7 +107,7 @@ namespace Content.Client.Preferences.UI private readonly List _speciesList; private readonly List _antagPreferences; private readonly List _traitPreferences; - private List _bodyTypesList = []; + private List _bodyTypesList = new(); private SpriteView _previewSpriteView => CSpriteView; private Button _previewRotateLeftButton => CSpriteRotateLeft; @@ -439,7 +439,7 @@ namespace Content.Client.Preferences.UI IsDirty = true; }; - _jobPriorities = []; + _jobPriorities = new List(); _jobCategories = new Dictionary(); _requirements = IoCManager.Resolve(); _requirements.Updated += UpdateRoleRequirements; @@ -451,7 +451,7 @@ namespace Content.Client.Preferences.UI _tabContainer.SetTabTitle(2, Loc.GetString("humanoid-profile-editor-antags-tab")); - _antagPreferences = []; + _antagPreferences = new List(); foreach (var antag in prototypeManager.EnumeratePrototypes().OrderBy(a => Loc.GetString(a.Name))) { @@ -479,7 +479,7 @@ namespace Content.Client.Preferences.UI #region Traits var traits = prototypeManager.EnumeratePrototypes().OrderBy(t => Loc.GetString(t.Name)).ToList(); - _traitPreferences = []; + _traitPreferences = new List(); _tabContainer.SetTabTitle(3, Loc.GetString("humanoid-profile-editor-traits-tab")); if (traits.Count > 0) diff --git a/Content.Client/UserInterface/Systems/Bwoink/AHelpUIController.cs b/Content.Client/UserInterface/Systems/Bwoink/AHelpUIController.cs index 8a6234f0b8..9239b956ec 100644 --- a/Content.Client/UserInterface/Systems/Bwoink/AHelpUIController.cs +++ b/Content.Client/UserInterface/Systems/Bwoink/AHelpUIController.cs @@ -192,7 +192,8 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged _bwoinkSystem?.Send(userId, textMessage, playSound); + UIHelper.SendMessageAction = (userId, textMessage, playSound) => + _bwoinkSystem?.Send(userId, textMessage, isAdmin, playSound); UIHelper.InputTextChanged += (channel, text) => _bwoinkSystem?.SendInputTextUpdated(channel, text.Length > 0); UIHelper.OnClose += () => { SetAHelpPressed(false); }; UIHelper.OnOpen += () => { SetAHelpPressed(true); }; diff --git a/Content.Client/_White/Jukebox/JukeboxMenu.xaml.cs b/Content.Client/_White/Jukebox/JukeboxMenu.xaml.cs index 1f171b226a..a7838706a4 100644 --- a/Content.Client/_White/Jukebox/JukeboxMenu.xaml.cs +++ b/Content.Client/_White/Jukebox/JukeboxMenu.xaml.cs @@ -17,8 +17,8 @@ public sealed partial class JukeboxMenu : DefaultWindow private readonly EntityUid _jukeboxEntity; private readonly JukeboxComponent _component; - private readonly List _defaultSongsEntries = []; - private readonly List _tapeSongsEntries = []; + private readonly List _defaultSongsEntries = new() { }; + private readonly List _tapeSongsEntries = new() { }; public JukeboxMenu(EntityUid jukeboxEntity, JukeboxComponent component) { diff --git a/Content.Client/_White/Radials/RadialSystem.cs b/Content.Client/_White/Radials/RadialSystem.cs index 4355bda1e8..1099d624f5 100644 --- a/Content.Client/_White/Radials/RadialSystem.cs +++ b/Content.Client/_White/Radials/RadialSystem.cs @@ -17,223 +17,226 @@ using Robust.Shared.Utility; namespace Content.Client._White.Radials; - [UsedImplicitly] - public sealed class RadialSystem : SharedRadialSystem +[UsedImplicitly] +public sealed class RadialSystem : SharedRadialSystem +{ + [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly ExamineSystem _examineSystem = default!; + [Dependency] private readonly TagSystem _tagSystem = default!; + [Dependency] private readonly IStateManager _stateManager = default!; + [Dependency] private readonly EntityLookupSystem _entityLookup = default!; + [Dependency] private readonly IPlayerManager _playerManager = default!; + [Dependency] private readonly TransformSystem _transform = default!; + + /// + /// When a user right clicks somewhere, how large is the box we use to get entities for the context menu? + /// + public const float EntityMenuLookupSize = 0.25f; + + [Dependency] private readonly IEyeManager _eyeManager = default!; + + /// + /// These flags determine what entities the user can see on the context menu. + /// + public MenuVisibility Visibility; + + public Action? OnRadialsResponse; + + public override void Initialize() { - [Dependency] private readonly PopupSystem _popupSystem = default!; - [Dependency] private readonly ExamineSystem _examineSystem = default!; - [Dependency] private readonly TagSystem _tagSystem = default!; - [Dependency] private readonly IStateManager _stateManager = default!; - [Dependency] private readonly EntityLookupSystem _entityLookup = default!; - [Dependency] private readonly IPlayerManager _playerManager = default!; + base.Initialize(); - /// - /// When a user right clicks somewhere, how large is the box we use to get entities for the context menu? - /// - public const float EntityMenuLookupSize = 0.25f; + SubscribeNetworkEvent(HandleRadialsResponse); + } - [Dependency] private readonly IEyeManager _eyeManager = default!; + /// + /// Get all of the entities in an area for displaying on the context menu. + /// + public bool TryGetEntityMenuEntities(MapCoordinates targetPos, [NotNullWhen(true)] out List? result) + { + result = null; - /// - /// These flags determine what entities the user can see on the context menu. - /// - public MenuVisibility Visibility; + if (_stateManager.CurrentState is not GameplayStateBase gameScreenBase) + return false; - public Action? OnRadialsResponse; + var player = _playerManager.LocalEntity; + if (player == null) + return false; - public override void Initialize() + // If FOV drawing is disabled, we will modify the visibility option to ignore visiblity checks. + var visibility = _eyeManager.CurrentEye.DrawFov + ? Visibility + : Visibility | MenuVisibility.NoFov; + + // Get entities + List entities; + + // Do we have to do FoV checks? + if ((visibility & MenuVisibility.NoFov) == 0) { - base.Initialize(); + var entitiesUnderMouse = gameScreenBase.GetClickableEntities(targetPos).ToHashSet(); - SubscribeNetworkEvent(HandleRadialsResponse); + bool Predicate(EntityUid e) => e == player || entitiesUnderMouse.Contains(e); + + // first check the general location. + if (!_examineSystem.CanExamine(player.Value, targetPos, Predicate)) + return false; + + TryComp(player.Value, out ExaminerComponent? examiner); + + // Then check every entity + entities = new(); + foreach (var ent in _entityLookup.GetEntitiesInRange(targetPos, EntityMenuLookupSize)) + { + if (_examineSystem.CanExamine(player.Value, targetPos, Predicate, ent, examiner)) + entities.Add(ent); + } + } + else + { + entities = _entityLookup.GetEntitiesInRange(targetPos, EntityMenuLookupSize).ToList(); } - /// - /// Get all of the entities in an area for displaying on the context menu. - /// - public bool TryGetEntityMenuEntities(MapCoordinates targetPos, [NotNullWhen(true)] out List? result) + if (entities.Count == 0) + return false; + + if (visibility == MenuVisibility.All) { - result = null; - - if (_stateManager.CurrentState is not GameplayStateBase gameScreenBase) - return false; - - var player = _playerManager.LocalPlayer?.ControlledEntity; - if (player == null) - return false; - - // If FOV drawing is disabled, we will modify the visibility option to ignore visiblity checks. - var visibility = _eyeManager.CurrentEye.DrawFov - ? Visibility - : Visibility | MenuVisibility.NoFov; - - - // Get entities - List entities; - - // Do we have to do FoV checks? - if ((visibility & MenuVisibility.NoFov) == 0) - { - var entitiesUnderMouse = gameScreenBase.GetClickableEntities(targetPos).ToHashSet(); - bool Predicate(EntityUid e) => e == player || entitiesUnderMouse.Contains(e); - - // first check the general location. - if (!_examineSystem.CanExamine(player.Value, targetPos, Predicate)) - return false; - - TryComp(player.Value, out ExaminerComponent? examiner); - - // Then check every entity - entities = new(); - foreach (var ent in _entityLookup.GetEntitiesInRange(targetPos, EntityMenuLookupSize)) - { - if (_examineSystem.CanExamine(player.Value, targetPos, Predicate, ent, examiner)) - entities.Add(ent); - } - } - else - { - entities = _entityLookup.GetEntitiesInRange(targetPos, EntityMenuLookupSize).ToList(); - } - - if (entities.Count == 0) - return false; - - if (visibility == MenuVisibility.All) - { - result = entities; - return true; - } - - // remove any entities in containers - if ((visibility & MenuVisibility.InContainer) == 0) - { - for (var i = entities.Count - 1; i >= 0; i--) - { - var entity = entities[i]; - - if (ContainerSystem.IsInSameOrTransparentContainer(player.Value, entity)) - continue; - - entities.RemoveSwap(i); - } - } - - // remove any invisible entities - if ((visibility & MenuVisibility.Invisible) == 0) - { - var spriteQuery = GetEntityQuery(); - var tagQuery = GetEntityQuery(); - - for (var i = entities.Count - 1; i >= 0; i--) - { - var entity = entities[i]; - - if (!spriteQuery.TryGetComponent(entity, out var spriteComponent) || - !spriteComponent.Visible || - _tagSystem.HasTag(entity, "HideContextMenu", tagQuery)) - { - entities.RemoveSwap(i); - } - } - } - - // Remove any entities that do not have LOS - if ((visibility & MenuVisibility.NoFov) == 0) - { - var xformQuery = GetEntityQuery(); - var playerPos = xformQuery.GetComponent(player.Value).MapPosition; - - for (var i = entities.Count - 1; i >= 0; i--) - { - var entity = entities[i]; - - if (!ExamineSystemShared.InRangeUnOccluded( - playerPos, - xformQuery.GetComponent(entity).MapPosition, - ExamineSystemShared.ExamineRange, - null)) - { - entities.RemoveSwap(i); - } - } - } - - if (entities.Count == 0) - return false; - result = entities; return true; } - /// - /// Asks the server to send back a list of server-side verbs, for the given verb type. - /// - public SortedSet GetRadials(EntityUid target, EntityUid user, Type type, bool force = false) + // remove any entities in containers + if ((visibility & MenuVisibility.InContainer) == 0) { - return GetRadials(target, user, new List() { type }, force); - } - - /// - /// Ask the server to send back a list of server-side verbs, and for now return an incomplete list of verbs - /// (only those defined locally). - /// - public SortedSet GetRadials(EntityUid target, EntityUid user, List verbTypes, - bool force = false) - { - if (!IsClientSide(target)) + for (var i = entities.Count - 1; i >= 0; i--) { - RaiseNetworkEvent(new RequestServerRadialsEvent(GetNetEntity(target), verbTypes, adminRequest: force)); + var entity = entities[i]; + + if (ContainerSystem.IsInSameOrTransparentContainer(player.Value, entity)) + continue; + + entities.RemoveSwap(i); } - - // Some admin menu interactions will try get verbs for entities that have not yet been sent to the player. - if (!Exists(target)) - return new(); - - return GetLocalRadials(target, user, verbTypes, force); } - /// - /// Execute actions associated with the given verb. - /// - /// - /// Unless this is a client-exclusive verb, this will also tell the server to run the same verb. - /// - public void ExecuteRadial(EntityUid target, Radial radial) + // remove any invisible entities + if ((visibility & MenuVisibility.Invisible) == 0) { - var user = _playerManager.LocalPlayer?.ControlledEntity; - if (user == null) - return; + var spriteQuery = GetEntityQuery(); + var tagQuery = GetEntityQuery(); - // is this verb actually valid? - if (radial.Disabled) + for (var i = entities.Count - 1; i >= 0; i--) { - // maybe send an informative pop-up message. - if (!string.IsNullOrWhiteSpace(radial.Message)) - _popupSystem.PopupEntity(radial.Message, user.Value); + var entity = entities[i]; - return; + if (!spriteQuery.TryGetComponent(entity, out var spriteComponent) || + !spriteComponent.Visible || + _tagSystem.HasTag(entity, "HideContextMenu", tagQuery)) + { + entities.RemoveSwap(i); + } } - - if (radial.ClientExclusive || IsClientSide(target)) - ExecuteRadial(radial, user.Value, target); - else - EntityManager.RaisePredictiveEvent(new ExecuteRadialEvent(GetNetEntity(target), radial)); } - private void HandleRadialsResponse(RadialsResponseEvent msg) + // Remove any entities that do not have LOS + if ((visibility & MenuVisibility.NoFov) == 0) { - OnRadialsResponse?.Invoke(msg); + var playerPos = _transform.GetMapCoordinates(player.Value); + + for (var i = entities.Count - 1; i >= 0; i--) + { + var entity = entities[i]; + + if (!_examineSystem.InRangeUnOccluded( + playerPos, + _transform.GetMapCoordinates(entity), + ExamineSystemShared.ExamineRange, + null)) + { + entities.RemoveSwap(i); + } + } } + + if (entities.Count == 0) + return false; + + result = entities; + return true; } - [Flags] - public enum MenuVisibility + /// + /// Asks the server to send back a list of server-side verbs, for the given verb type. + /// + public SortedSet GetRadials(EntityUid target, EntityUid user, Type type, bool force = false) { - // What entities can a user see on the entity menu? - Default = 0, // They can only see entities in FoV. - NoFov = 1 << 0, // They ignore FoV restrictions - InContainer = 1 << 1, // They can see through containers. - Invisible = 1 << 2, // They can see entities without sprites and the "HideContextMenu" tag is ignored. - All = NoFov | InContainer | Invisible + return GetRadials(target, user, new List() { type }, force); } + + /// + /// Ask the server to send back a list of server-side verbs, and for now return an incomplete list of verbs + /// (only those defined locally). + /// + public SortedSet GetRadials( + EntityUid target, + EntityUid user, + List verbTypes, + bool force = false) + { + if (!IsClientSide(target)) + { + RaiseNetworkEvent(new RequestServerRadialsEvent(GetNetEntity(target), verbTypes, adminRequest: force)); + } + + // Some admin menu interactions will try get verbs for entities that have not yet been sent to the player. + if (!Exists(target)) + return new(); + + return GetLocalRadials(target, user, verbTypes, force); + } + + /// + /// Execute actions associated with the given verb. + /// + /// + /// Unless this is a client-exclusive verb, this will also tell the server to run the same verb. + /// + public void ExecuteRadial(EntityUid target, Radial radial) + { + var user = _playerManager.LocalEntity; + if (user == null) + return; + + // is this verb actually valid? + if (radial.Disabled) + { + // maybe send an informative pop-up message. + if (!string.IsNullOrWhiteSpace(radial.Message)) + _popupSystem.PopupEntity(radial.Message, user.Value); + + return; + } + + if (radial.ClientExclusive || IsClientSide(target)) + ExecuteRadial(radial, user.Value, target); + else + EntityManager.RaisePredictiveEvent(new ExecuteRadialEvent(GetNetEntity(target), radial)); + } + + private void HandleRadialsResponse(RadialsResponseEvent msg) + { + OnRadialsResponse?.Invoke(msg); + } +} + +[Flags] +public enum MenuVisibility +{ + // What entities can a user see on the entity menu? + Default = 0, // They can only see entities in FoV. + NoFov = 1 << 0, // They ignore FoV restrictions + InContainer = 1 << 1, // They can see through containers. + Invisible = 1 << 2, // They can see entities without sprites and the "HideContextMenu" tag is ignored. + All = NoFov | InContainer | Invisible +} \ No newline at end of file diff --git a/Content.Server/Changeling/ChangelingRuleComponent.cs b/Content.Server/Changeling/ChangelingRuleComponent.cs index 25c705edf9..086182ed74 100644 --- a/Content.Server/Changeling/ChangelingRuleComponent.cs +++ b/Content.Server/Changeling/ChangelingRuleComponent.cs @@ -7,7 +7,7 @@ namespace Content.Server.Changeling; [RegisterComponent, Access(typeof(ChangelingRuleSystem))] public sealed partial class ChangelingRuleComponent : Component { - public readonly List ChangelingMinds = []; + public readonly List ChangelingMinds = new() { }; [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] public string ChangelingPrototypeId = "Changeling"; diff --git a/Content.Server/Fluids/EntitySystems/PuddleDebugDebugOverlaySystem.cs b/Content.Server/Fluids/EntitySystems/PuddleDebugDebugOverlaySystem.cs index 859f2d80a6..713195e831 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleDebugDebugOverlaySystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleDebugDebugOverlaySystem.cs @@ -16,8 +16,8 @@ public sealed class PuddleDebugDebugOverlaySystem : SharedPuddleDebugOverlaySyst [Dependency] private readonly SharedTransformSystem _transform = default!; [Dependency] private readonly SharedMapSystem _map = default!; - private readonly HashSet _playerObservers = []; - private List> _grids = []; + private readonly HashSet _playerObservers = new() { }; + private List> _grids = new() { }; public bool ToggleObserver(ICommonSession observer) { diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs index e3481f98da..6563d13609 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs @@ -66,13 +66,13 @@ public sealed partial class PuddleSystem : SharedPuddleSystem [ValidatePrototypeId] private const string CopperBlood = "CopperBlood"; - private static string[] _standoutReagents = [Blood, Slime, CopperBlood]; + private static string[] _standoutReagents = {Blood, Slime, CopperBlood}; public static readonly float PuddleVolume = 1000; // Using local deletion queue instead of the standard queue so that we can easily "undelete" if a puddle // loses & then gains reagents in a single tick. - private HashSet _deletionQueue = []; + private HashSet _deletionQueue = new() { }; private EntityQuery _puddleQuery; diff --git a/Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs index 545db6b4f1..35472a568f 100644 --- a/Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs +++ b/Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs @@ -42,13 +42,13 @@ public sealed partial class ThiefRuleComponent : Component /// Things that will be given to thieves /// [DataField] - public List StarterItems = ["ToolboxThief", "ClothingHandsChameleonThief"]; + public List StarterItems = new() { "ToolboxThief", "ClothingHandsChameleonThief" }; /// /// All Thieves created by this rule /// [DataField] - public List ThievesMinds = []; + public List ThievesMinds = new() { }; /// /// Max Thiefs created by rule on roundstart diff --git a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs index f339a5a5de..b761f7a649 100644 --- a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs +++ b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs @@ -39,7 +39,7 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem private EntityQuery _metaQuery; private EntityQuery _xformQuery; - private readonly HashSet> _consoles = []; + private readonly HashSet> _consoles = new() { }; public override void Initialize() { diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index 43bc0b0860..49306e87f8 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -70,8 +70,8 @@ public sealed partial class ShuttleSystem /// private const int FTLProximityIterations = 3; - private readonly HashSet _lookupEnts = []; - private readonly HashSet _immuneEnts = []; + private readonly HashSet _lookupEnts = new() { }; + private readonly HashSet _immuneEnts = new() { }; private EntityQuery _bodyQuery; private EntityQuery _buckleQuery; diff --git a/Content.Server/Spreader/SpreaderSystem.cs b/Content.Server/Spreader/SpreaderSystem.cs index 269d35d12f..8f22e74fdd 100644 --- a/Content.Server/Spreader/SpreaderSystem.cs +++ b/Content.Server/Spreader/SpreaderSystem.cs @@ -31,7 +31,7 @@ public sealed class SpreaderSystem : EntitySystem /// Remaining number of updates per grid & prototype. /// // TODO PERFORMANCE Assign each prototype to an index and convert dictionary to array - private readonly Dictionary> _gridUpdates = []; + private readonly Dictionary> _gridUpdates = new() { }; public const float SpreadCooldownSeconds = 1; @@ -57,7 +57,7 @@ public sealed class SpreaderSystem : EntitySystem private void SetupPrototypes() { - _prototypeUpdates = []; + _prototypeUpdates = new Dictionary { }; foreach (var proto in _prototype.EnumeratePrototypes()) { _prototypeUpdates.Add(proto.ID, proto.UpdatesPerSecond); @@ -185,9 +185,9 @@ public sealed class SpreaderSystem : EntitySystem { // TODO remove occupiedTiles -- its currently unused and just slows this method down. DebugTools.Assert(_prototype.HasIndex(prototype)); - freeTiles = []; - occupiedTiles = []; - neighbors = []; + freeTiles = new ValueList<(MapGridComponent, TileRef)> { }; + occupiedTiles = new ValueList { }; + neighbors = new ValueList { }; if (!TryComp(comp.GridUid, out var grid)) return; diff --git a/Content.Server/_White/Cult/GameRule/CultRuleComponent.cs b/Content.Server/_White/Cult/GameRule/CultRuleComponent.cs index 167306cd48..310e56f27e 100644 --- a/Content.Server/_White/Cult/GameRule/CultRuleComponent.cs +++ b/Content.Server/_White/Cult/GameRule/CultRuleComponent.cs @@ -44,7 +44,7 @@ public sealed partial class CultRuleComponent : Component public int PentagramThreshold = 8; [DataField(customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List StartingItems = []; + public List StartingItems = new() { }; [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] public string CultistRolePrototype = "Cultist"; @@ -56,9 +56,9 @@ public sealed partial class CultRuleComponent : Component public EntityUid? CultTarget; - public List CurrentCultists = []; + public List CurrentCultists = new() { }; - public List Constructs = []; + public List Constructs = new() { }; public CultWinCondition WinCondition; } diff --git a/Content.Server/_White/Jukebox/JukeboxSystem.cs b/Content.Server/_White/Jukebox/JukeboxSystem.cs index 814593908b..f056610b33 100644 --- a/Content.Server/_White/Jukebox/JukeboxSystem.cs +++ b/Content.Server/_White/Jukebox/JukeboxSystem.cs @@ -16,7 +16,7 @@ public sealed class JukeboxSystem : EntitySystem [Dependency] private readonly SharedHandsSystem _handsSystem = default!; [Dependency] private readonly PvsOverrideSystem _pvsOverrideSystem = default!; - private readonly List _playingJukeboxes = []; + private readonly List _playingJukeboxes = new() { }; private const float UpdateTimerDefaultTime = 1f; private float _updateTimer; diff --git a/Content.Shared/Chemistry/EntitySystems/SharedInjectorSystem.cs b/Content.Shared/Chemistry/EntitySystems/SharedInjectorSystem.cs index 1705c55b76..ada23b624f 100644 --- a/Content.Shared/Chemistry/EntitySystems/SharedInjectorSystem.cs +++ b/Content.Shared/Chemistry/EntitySystems/SharedInjectorSystem.cs @@ -16,7 +16,7 @@ public abstract class SharedInjectorSystem : EntitySystem /// /// Default transfer amounts for the set-transfer verb. /// - public static readonly FixedPoint2[] TransferAmounts = [1, 5, 10, 15]; + public static readonly FixedPoint2[] TransferAmounts = { 1, 5, 10, 15 }; [Dependency] protected readonly SharedPopupSystem Popup = default!; [Dependency] protected readonly SharedSolutionContainerSystem SolutionContainers = default!; diff --git a/Content.Shared/Fluids/SharedPuddleSystem.Evaporation.cs b/Content.Shared/Fluids/SharedPuddleSystem.Evaporation.cs index 78836e9f2f..bf841e861b 100644 --- a/Content.Shared/Fluids/SharedPuddleSystem.Evaporation.cs +++ b/Content.Shared/Fluids/SharedPuddleSystem.Evaporation.cs @@ -11,9 +11,9 @@ public abstract partial class SharedPuddleSystem [ValidatePrototypeId] private const string HolyWater = "Holywater"; - public static readonly string[] EvaporationReagents = [Water, HolyWater]; + public static readonly string[] EvaporationReagents = { Water, HolyWater }; - public bool CanFullyEvaporate(Solution solution) +public bool CanFullyEvaporate(Solution solution) { return solution.GetTotalPrototypeQuantity(EvaporationReagents) == solution.Volume; } diff --git a/Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs b/Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs index 448fe1beac..033e0c48ce 100644 --- a/Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs +++ b/Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs @@ -106,7 +106,7 @@ public sealed partial class SpeciesPrototype : IPrototype public SpeciesNaming Naming { get; private set; } = SpeciesNaming.FirstLast; [DataField] - public List Sexes { get; private set; } = [Sex.Male, Sex.Female]; + public List Sexes { get; private set; } = new() { Sex.Male, Sex.Female }; /// /// Characters younger than this are too young to be hired by Nanotrasen. diff --git a/Content.Shared/Preferences/HumanoidCharacterProfile.cs b/Content.Shared/Preferences/HumanoidCharacterProfile.cs index 1778d1b0a2..3a89f8e5d2 100644 --- a/Content.Shared/Preferences/HumanoidCharacterProfile.cs +++ b/Content.Shared/Preferences/HumanoidCharacterProfile.cs @@ -87,8 +87,8 @@ namespace Content.Shared.Preferences /// Copy constructor private HumanoidCharacterProfile(HumanoidCharacterProfile other) : this(other, - new Dictionary(other.JobPriorities), [..other.AntagPreferences], - [..other.TraitPreferences]) + new Dictionary(other.JobPriorities), new List(other.AntagPreferences), + new List(other.TraitPreferences)) { } @@ -114,7 +114,7 @@ namespace Content.Shared.Preferences IReadOnlyList traitPreferences) : this(name, clownName, mimeName, borgName, flavortext, species, age, sex, voice, gender, bodyType, appearance, clothing, backpack, spawnPriority, new Dictionary(jobPriorities), - preferenceUnavailable, [..antagPreferences], [..traitPreferences]) + preferenceUnavailable, new List(antagPreferences), new List(traitPreferences)) { } diff --git a/Content.Shared/_White/Jukebox/JukeboxComponentsAndStuff.cs b/Content.Shared/_White/Jukebox/JukeboxComponentsAndStuff.cs index fcd9af367c..8d187a8d5d 100644 --- a/Content.Shared/_White/Jukebox/JukeboxComponentsAndStuff.cs +++ b/Content.Shared/_White/Jukebox/JukeboxComponentsAndStuff.cs @@ -29,7 +29,7 @@ public sealed partial class JukeboxComponent : Component public Container TapeContainer = default!; [DataField] - public List DefaultTapes = []; + public List DefaultTapes = new() { }; [ViewVariables(VVAccess.ReadOnly)] public Container DefaultSongsContainer = default!; @@ -104,7 +104,7 @@ public sealed class JukeboxStopPlaying : EntityEventArgs public sealed class JukeboxSongUploadRequest : EntityEventArgs { public string SongName = string.Empty; - public List SongBytes = []; + public List SongBytes = new() { }; public NetEntity TapeCreatorUid = default!; } diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml index 45f4d8c320..1139e498a3 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml @@ -67,7 +67,6 @@ ClothingShoesBootsCowboyBrown: 1 ClothingShoesBootsCowboyBlack: 1 ClothingShoesBootsCowboyWhite: 1 - ClothingMaskNeckGaiterRed: 2 emaggedInventory: ClothingShoesBling: 1 ClothingShoesBootsCowboyFancy: 1 diff --git a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml index ef784d14d5..c095335c84 100644 --- a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml +++ b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml @@ -519,16 +519,6 @@ tags: - WhitelistChameleon -- type: entity - parent: ClothingMaskNeckGaiter - id: ClothingMaskNeckGaiterRed - name: red neck gaiter - components: - - type: Sprite - sprite: Clothing/Mask/neckgaiterred.rsi - - type: Clothing - sprite: Clothing/Mask/neckgaiterred.rsi - - type: entity parent: ClothingMaskClownBase id: ClothingMaskSexyClown diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml index 05c48a9184..851fcaa12d 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml @@ -229,32 +229,7 @@ components: - type: Stack lingering: true -- type: entity - parent: BaseHealingItem - id: Tourniquet - name: tourniquet - description: Stops bleeding! Hopefully. - components: - - type: Tag - tags: - - SecBeltEquip - - type: Sprite - state: tourniquet - - type: Healing - damageContainers: - - Biological - damage: - groups: - Brute: 5 # Tourniquets HURT! - types: - Asphyxiation: 5 # Essentially Stopping all blood reaching a part of your body - bloodlossModifier: -10 # Tourniquets stop bleeding - delay: 0.5 - healingBeginSound: - path: "/Audio/Items/Medical/brutepack_begin.ogg" - healingEndSound: - path: "/Audio/Items/Medical/brutepack_end.ogg" - + - type: entity parent: BaseHealingItem id: Tourniquet diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml index 302ac893b3..efce0fec57 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml @@ -5,9 +5,6 @@ id: BaseToolSurgery abstract: true components: - - type: Tag - tags: - - SurgeryTool - type: Sprite - type: StaticPrice price: 20 diff --git a/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml b/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml index 2320764d9f..7c605c139c 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml @@ -20,14 +20,14 @@ - type: Sprite sprite: Objects/Misc/glowstick.rsi layers: - - map: [ enum.ExpendableLightVisualLayers.Base ] - state: glowstick_base - - map: [ enum.ExpendableLightVisualLayers.Glow ] - state: glowstick_glow - visible: false - shader: unshaded - - map: [ enum.ExpendableLightVisualLayers.Overlay ] - state: glowstick_unlit + - map: [ enum.ExpendableLightVisualLayers.Base ] + state: glowstick_base + - map: [ enum.ExpendableLightVisualLayers.Glow ] + state: glowstick_glow + visible: false + shader: unshaded + - map: [ enum.ExpendableLightVisualLayers.Overlay ] + state: glowstick_unlit - type: Item sprite: Objects/Misc/glowstick.rsi heldPrefix: unlit @@ -62,7 +62,7 @@ endValue: 1.5 - type: Tag tags: - - Trash + - Trash - type: entity name: red glowstick @@ -305,4 +305,4 @@ minValue: 10.0 maxValue: 25.0 isLooped: true - enabled: true + enabled: true \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/fireaxe_cabinet.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/fireaxe_cabinet.yml index 1ccb75c77c..9c77d00aa2 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/fireaxe_cabinet.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/fireaxe_cabinet.yml @@ -3,11 +3,9 @@ name: fire axe cabinet description: There is a small label that reads "For Emergency use only" along with details for safe use of the axe. As if. components: - - type: Damageable # adding destructible causes the entity inside to be deleted when the cabinet is destroyed :( - damageContainer: StructuralInorganic - type: Damageable damageContainer: Inorganic - damageModifierSet: Glass + damageModifierSet: StructuralInorganic - type: Destructible thresholds: - trigger: diff --git a/Resources/Prototypes/White/Entities/Structures/Wallmounts/consoles.yml b/Resources/Prototypes/White/Entities/Structures/Wallmounts/consoles.yml index 00d4758e98..e56ff8c55e 100644 --- a/Resources/Prototypes/White/Entities/Structures/Wallmounts/consoles.yml +++ b/Resources/Prototypes/White/Entities/Structures/Wallmounts/consoles.yml @@ -284,14 +284,14 @@ - type: AccessReader access: [ [ "Command" ] ] - type: ActivatableUI - key: enum.NewsWriteUiKey.Key + key: enum.NewsWriterUiKey.Key - type: ActivatableUIRequiresVision - type: Transform anchored: true - type: UserInterface interfaces: - - key: enum.NewsWriteUiKey.Key - type: NewsWriteBoundUserInterface + - key: enum.NewsWriterUiKey.Key + type: NewsWriterBoundUserInterface # Radar console - type: entity diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 2997be7448..577816bf8a 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -1181,9 +1181,6 @@ - type: Tag id: SuitEVA -- type: Tag - id: SurgeryTool - - type: Tag id: SurveillanceCameraMonitorCircuitboard diff --git a/Resources/Textures/Clothing/OuterClothing/Suits/syndicate.rsi/meta.json b/Resources/Textures/Clothing/OuterClothing/Suits/syndicate.rsi/meta.json index 0e4ac30c37..7a8e06c85c 100644 --- a/Resources/Textures/Clothing/OuterClothing/Suits/syndicate.rsi/meta.json +++ b/Resources/Textures/Clothing/OuterClothing/Suits/syndicate.rsi/meta.json @@ -14,10 +14,6 @@ "name": "equipped-OUTERCLOTHING", "directions": 4 }, - { - "name": "equipped-HELMET-hamster", - "directions": 4 - }, { "name": "inhand-left", "directions": 4 diff --git a/Resources/Textures/White/Fluff/DOOMMAX/cap_cap.rsi/meta.json b/Resources/Textures/White/Fluff/DOOMMAX/cap_cap.rsi/meta.json index d5293ab5e0..3a0d34465d 100644 --- a/Resources/Textures/White/Fluff/DOOMMAX/cap_cap.rsi/meta.json +++ b/Resources/Textures/White/Fluff/DOOMMAX/cap_cap.rsi/meta.json @@ -1,11 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", -<<<<<<<< HEAD:Resources/Textures/White/Fluff/DOOMMAX/cap_cap.rsi/meta.json "copyright": "Made by Gargarien for DOOMMAX", -======== - "copyright": "Sprited by Hülle#2562 (Discord), resprite by icekot8", ->>>>>>>> ae3d745430e3c5250d19553429e7cda2b8050d10:Resources/Textures/Clothing/Head/Hats/beret_medic.rsi/meta.json "size": { "x": 32, "y": 32 diff --git a/Resources/Textures/White/Fluff/HSKveez/hardsuit.rsi/meta.json b/Resources/Textures/White/Fluff/HSKveez/hardsuit.rsi/meta.json index b9587f8b8f..84385d543f 100644 --- a/Resources/Textures/White/Fluff/HSKveez/hardsuit.rsi/meta.json +++ b/Resources/Textures/White/Fluff/HSKveez/hardsuit.rsi/meta.json @@ -11,11 +11,7 @@ "name": "icon" }, { -<<<<<<<< HEAD:Resources/Textures/White/Fluff/HSKveez/hardsuit.rsi/meta.json "name": "equipped-OUTERCLOTHING", -======== - "name": "equipped-INNERCLOTHING", ->>>>>>>> ae3d745430e3c5250d19553429e7cda2b8050d10:Resources/Textures/Clothing/Uniforms/Jumpsuit/qmformal.rsi/meta.json "directions": 4 }, { diff --git a/Resources/Textures/White/Fluff/Vtergot/strictgloves.rsi/meta.json b/Resources/Textures/White/Fluff/Vtergot/strictgloves.rsi/meta.json index cae1e9a611..157ef1fa73 100644 --- a/Resources/Textures/White/Fluff/Vtergot/strictgloves.rsi/meta.json +++ b/Resources/Textures/White/Fluff/Vtergot/strictgloves.rsi/meta.json @@ -11,11 +11,7 @@ "name": "icon" }, { -<<<<<<<< HEAD:Resources/Textures/White/Fluff/Vtergot/strictgloves.rsi/meta.json "name": "equipped-HAND", -======== - "name": "equipped-BELT", ->>>>>>>> ae3d745430e3c5250d19553429e7cda2b8050d10:Resources/Textures/Clothing/Belt/emt.rsi/meta.json "directions": 4 }, {