Я скучаю так очень, забери меня срочно
This commit is contained in:
@@ -35,8 +35,6 @@ namespace Content.Client.Administration.UI.CustomControls
|
||||
|
||||
private readonly Font _fontOverride;
|
||||
|
||||
private PlayerInfo? _selectedPlayer;
|
||||
|
||||
public PlayerListControl()
|
||||
{
|
||||
_entManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
@@ -186,7 +186,7 @@ public sealed class ClientClothingSystem : ClothingSystem
|
||||
State = state
|
||||
};
|
||||
|
||||
layers = [layer];
|
||||
layers = new List<PrototypeLayerData> { layer };
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Content.Client.Decals.Overlays
|
||||
{
|
||||
private readonly Dictionary<string, (Texture Texture, bool SnapCardinals)> _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)
|
||||
{
|
||||
|
||||
@@ -14,14 +14,14 @@ public sealed class AirlockSystem : SharedAirlockSystem
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<AirlockComponent, BeforeDoorClosedEvent>(OnBeforeDoorClosed);
|
||||
SubscribeLocalEvent<AirlockComponent, ComponentStartup>(OnComponentStartup);
|
||||
SubscribeLocalEvent<AirlockComponent, AppearanceChangeEvent>(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<bool>(uid, DoorVisuals.BoltLights, out var boltLights) && boltLights)
|
||||
{
|
||||
args.Cancel();
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace Content.Client.Preferences.UI
|
||||
private readonly List<SpeciesPrototype> _speciesList;
|
||||
private readonly List<AntagPreferenceSelector> _antagPreferences;
|
||||
private readonly List<TraitPreferenceSelector> _traitPreferences;
|
||||
private List<BodyTypePrototype> _bodyTypesList = [];
|
||||
private List<BodyTypePrototype> _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<JobPrioritySelector>();
|
||||
_jobCategories = new Dictionary<string, BoxContainer>();
|
||||
_requirements = IoCManager.Resolve<JobRequirementsManager>();
|
||||
_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<AntagPreferenceSelector>();
|
||||
|
||||
foreach (var antag in prototypeManager.EnumeratePrototypes<AntagPrototype>().OrderBy(a => Loc.GetString(a.Name)))
|
||||
{
|
||||
@@ -479,7 +479,7 @@ namespace Content.Client.Preferences.UI
|
||||
#region Traits
|
||||
|
||||
var traits = prototypeManager.EnumeratePrototypes<TraitPrototype>().OrderBy(t => Loc.GetString(t.Name)).ToList();
|
||||
_traitPreferences = [];
|
||||
_traitPreferences = new List<TraitPreferenceSelector>();
|
||||
_tabContainer.SetTabTitle(3, Loc.GetString("humanoid-profile-editor-traits-tab"));
|
||||
|
||||
if (traits.Count > 0)
|
||||
|
||||
@@ -192,7 +192,8 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
|
||||
UIHelper = isAdmin ? new AdminAHelpUIHandler(ownerUserId) : new UserAHelpUIHandler(ownerUserId);
|
||||
UIHelper.DiscordRelayChanged(_discordRelayActive);
|
||||
|
||||
UIHelper.SendMessageAction = (userId, textMessage, playSound) => _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); };
|
||||
|
||||
@@ -17,8 +17,8 @@ public sealed partial class JukeboxMenu : DefaultWindow
|
||||
private readonly EntityUid _jukeboxEntity;
|
||||
private readonly JukeboxComponent _component;
|
||||
|
||||
private readonly List<JukeboxSongEntry> _defaultSongsEntries = [];
|
||||
private readonly List<JukeboxSongEntry> _tapeSongsEntries = [];
|
||||
private readonly List<JukeboxSongEntry> _defaultSongsEntries = new() { };
|
||||
private readonly List<JukeboxSongEntry> _tapeSongsEntries = new() { };
|
||||
|
||||
public JukeboxMenu(EntityUid jukeboxEntity, JukeboxComponent component)
|
||||
{
|
||||
|
||||
@@ -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!;
|
||||
|
||||
/// <summary>
|
||||
/// When a user right clicks somewhere, how large is the box we use to get entities for the context menu?
|
||||
/// </summary>
|
||||
public const float EntityMenuLookupSize = 0.25f;
|
||||
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
|
||||
/// <summary>
|
||||
/// These flags determine what entities the user can see on the context menu.
|
||||
/// </summary>
|
||||
public MenuVisibility Visibility;
|
||||
|
||||
public Action<RadialsResponseEvent>? 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();
|
||||
|
||||
/// <summary>
|
||||
/// When a user right clicks somewhere, how large is the box we use to get entities for the context menu?
|
||||
/// </summary>
|
||||
public const float EntityMenuLookupSize = 0.25f;
|
||||
SubscribeNetworkEvent<RadialsResponseEvent>(HandleRadialsResponse);
|
||||
}
|
||||
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
/// <summary>
|
||||
/// Get all of the entities in an area for displaying on the context menu.
|
||||
/// </summary>
|
||||
public bool TryGetEntityMenuEntities(MapCoordinates targetPos, [NotNullWhen(true)] out List<EntityUid>? result)
|
||||
{
|
||||
result = null;
|
||||
|
||||
/// <summary>
|
||||
/// These flags determine what entities the user can see on the context menu.
|
||||
/// </summary>
|
||||
public MenuVisibility Visibility;
|
||||
if (_stateManager.CurrentState is not GameplayStateBase gameScreenBase)
|
||||
return false;
|
||||
|
||||
public Action<RadialsResponseEvent>? 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<EntityUid> entities;
|
||||
|
||||
// Do we have to do FoV checks?
|
||||
if ((visibility & MenuVisibility.NoFov) == 0)
|
||||
{
|
||||
base.Initialize();
|
||||
var entitiesUnderMouse = gameScreenBase.GetClickableEntities(targetPos).ToHashSet();
|
||||
|
||||
SubscribeNetworkEvent<RadialsResponseEvent>(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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all of the entities in an area for displaying on the context menu.
|
||||
/// </summary>
|
||||
public bool TryGetEntityMenuEntities(MapCoordinates targetPos, [NotNullWhen(true)] out List<EntityUid>? 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<EntityUid> 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<SpriteComponent>();
|
||||
var tagQuery = GetEntityQuery<TagComponent>();
|
||||
|
||||
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<TransformComponent>();
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Asks the server to send back a list of server-side verbs, for the given verb type.
|
||||
/// </summary>
|
||||
public SortedSet<Radial> 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>() { type }, force);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
public SortedSet<Radial> GetRadials(EntityUid target, EntityUid user, List<Type> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Execute actions associated with the given verb.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Unless this is a client-exclusive verb, this will also tell the server to run the same verb.
|
||||
/// </remarks>
|
||||
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<SpriteComponent>();
|
||||
var tagQuery = GetEntityQuery<TagComponent>();
|
||||
|
||||
// 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
|
||||
/// <summary>
|
||||
/// Asks the server to send back a list of server-side verbs, for the given verb type.
|
||||
/// </summary>
|
||||
public SortedSet<Radial> 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>() { type }, force);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
public SortedSet<Radial> GetRadials(
|
||||
EntityUid target,
|
||||
EntityUid user,
|
||||
List<Type> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Execute actions associated with the given verb.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Unless this is a client-exclusive verb, this will also tell the server to run the same verb.
|
||||
/// </remarks>
|
||||
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
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.Changeling;
|
||||
[RegisterComponent, Access(typeof(ChangelingRuleSystem))]
|
||||
public sealed partial class ChangelingRuleComponent : Component
|
||||
{
|
||||
public readonly List<EntityUid> ChangelingMinds = [];
|
||||
public readonly List<EntityUid> ChangelingMinds = new() { };
|
||||
|
||||
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<AntagPrototype>))]
|
||||
public string ChangelingPrototypeId = "Changeling";
|
||||
|
||||
@@ -16,8 +16,8 @@ public sealed class PuddleDebugDebugOverlaySystem : SharedPuddleDebugOverlaySyst
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
|
||||
private readonly HashSet<ICommonSession> _playerObservers = [];
|
||||
private List<Entity<MapGridComponent>> _grids = [];
|
||||
private readonly HashSet<ICommonSession> _playerObservers = new() { };
|
||||
private List<Entity<MapGridComponent>> _grids = new() { };
|
||||
|
||||
public bool ToggleObserver(ICommonSession observer)
|
||||
{
|
||||
|
||||
@@ -66,13 +66,13 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
|
||||
[ValidatePrototypeId<ReagentPrototype>]
|
||||
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<EntityUid> _deletionQueue = [];
|
||||
private HashSet<EntityUid> _deletionQueue = new() { };
|
||||
|
||||
private EntityQuery<PuddleComponent> _puddleQuery;
|
||||
|
||||
|
||||
@@ -42,13 +42,13 @@ public sealed partial class ThiefRuleComponent : Component
|
||||
/// Things that will be given to thieves
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public List<EntProtoId> StarterItems = ["ToolboxThief", "ClothingHandsChameleonThief"];
|
||||
public List<EntProtoId> StarterItems = new() { "ToolboxThief", "ClothingHandsChameleonThief" };
|
||||
|
||||
/// <summary>
|
||||
/// All Thieves created by this rule
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public List<EntityUid> ThievesMinds = [];
|
||||
public List<EntityUid> ThievesMinds = new() { };
|
||||
|
||||
/// <summary>
|
||||
/// Max Thiefs created by rule on roundstart
|
||||
|
||||
@@ -39,7 +39,7 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem
|
||||
private EntityQuery<MetaDataComponent> _metaQuery;
|
||||
private EntityQuery<TransformComponent> _xformQuery;
|
||||
|
||||
private readonly HashSet<Entity<ShuttleConsoleComponent>> _consoles = [];
|
||||
private readonly HashSet<Entity<ShuttleConsoleComponent>> _consoles = new() { };
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
@@ -70,8 +70,8 @@ public sealed partial class ShuttleSystem
|
||||
/// </summary>
|
||||
private const int FTLProximityIterations = 3;
|
||||
|
||||
private readonly HashSet<EntityUid> _lookupEnts = [];
|
||||
private readonly HashSet<EntityUid> _immuneEnts = [];
|
||||
private readonly HashSet<EntityUid> _lookupEnts = new() { };
|
||||
private readonly HashSet<EntityUid> _immuneEnts = new() { };
|
||||
|
||||
private EntityQuery<BodyComponent> _bodyQuery;
|
||||
private EntityQuery<BuckleComponent> _buckleQuery;
|
||||
|
||||
@@ -31,7 +31,7 @@ public sealed class SpreaderSystem : EntitySystem
|
||||
/// Remaining number of updates per grid & prototype.
|
||||
/// </summary>
|
||||
// TODO PERFORMANCE Assign each prototype to an index and convert dictionary to array
|
||||
private readonly Dictionary<EntityUid, Dictionary<string, int>> _gridUpdates = [];
|
||||
private readonly Dictionary<EntityUid, Dictionary<string, int>> _gridUpdates = new() { };
|
||||
|
||||
public const float SpreadCooldownSeconds = 1;
|
||||
|
||||
@@ -57,7 +57,7 @@ public sealed class SpreaderSystem : EntitySystem
|
||||
|
||||
private void SetupPrototypes()
|
||||
{
|
||||
_prototypeUpdates = [];
|
||||
_prototypeUpdates = new Dictionary<string, int> { };
|
||||
foreach (var proto in _prototype.EnumeratePrototypes<EdgeSpreaderPrototype>())
|
||||
{
|
||||
_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<Vector2i> { };
|
||||
neighbors = new ValueList<EntityUid> { };
|
||||
|
||||
if (!TryComp<MapGridComponent>(comp.GridUid, out var grid))
|
||||
return;
|
||||
|
||||
@@ -44,7 +44,7 @@ public sealed partial class CultRuleComponent : Component
|
||||
public int PentagramThreshold = 8;
|
||||
|
||||
[DataField(customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>))]
|
||||
public List<string> StartingItems = [];
|
||||
public List<string> StartingItems = new() { };
|
||||
|
||||
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<AntagPrototype>))]
|
||||
public string CultistRolePrototype = "Cultist";
|
||||
@@ -56,9 +56,9 @@ public sealed partial class CultRuleComponent : Component
|
||||
|
||||
public EntityUid? CultTarget;
|
||||
|
||||
public List<CultistComponent> CurrentCultists = [];
|
||||
public List<CultistComponent> CurrentCultists = new() { };
|
||||
|
||||
public List<ConstructComponent> Constructs = [];
|
||||
public List<ConstructComponent> Constructs = new() { };
|
||||
|
||||
public CultWinCondition WinCondition;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public sealed class JukeboxSystem : EntitySystem
|
||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||
[Dependency] private readonly PvsOverrideSystem _pvsOverrideSystem = default!;
|
||||
|
||||
private readonly List<JukeboxComponent> _playingJukeboxes = [];
|
||||
private readonly List<JukeboxComponent> _playingJukeboxes = new() { };
|
||||
|
||||
private const float UpdateTimerDefaultTime = 1f;
|
||||
private float _updateTimer;
|
||||
|
||||
@@ -16,7 +16,7 @@ public abstract class SharedInjectorSystem : EntitySystem
|
||||
/// <summary>
|
||||
/// Default transfer amounts for the set-transfer verb.
|
||||
/// </summary>
|
||||
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!;
|
||||
|
||||
@@ -11,9 +11,9 @@ public abstract partial class SharedPuddleSystem
|
||||
[ValidatePrototypeId<ReagentPrototype>]
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public sealed partial class SpeciesPrototype : IPrototype
|
||||
public SpeciesNaming Naming { get; private set; } = SpeciesNaming.FirstLast;
|
||||
|
||||
[DataField]
|
||||
public List<Sex> Sexes { get; private set; } = [Sex.Male, Sex.Female];
|
||||
public List<Sex> Sexes { get; private set; } = new() { Sex.Male, Sex.Female };
|
||||
|
||||
/// <summary>
|
||||
/// Characters younger than this are too young to be hired by Nanotrasen.
|
||||
|
||||
@@ -87,8 +87,8 @@ namespace Content.Shared.Preferences
|
||||
|
||||
/// <summary>Copy constructor</summary>
|
||||
private HumanoidCharacterProfile(HumanoidCharacterProfile other) : this(other,
|
||||
new Dictionary<string, JobPriority>(other.JobPriorities), [..other.AntagPreferences],
|
||||
[..other.TraitPreferences])
|
||||
new Dictionary<string, JobPriority>(other.JobPriorities), new List<string>(other.AntagPreferences),
|
||||
new List<string>(other.TraitPreferences))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace Content.Shared.Preferences
|
||||
IReadOnlyList<string> traitPreferences)
|
||||
: this(name, clownName, mimeName, borgName, flavortext, species, age, sex, voice, gender, bodyType,
|
||||
appearance, clothing, backpack, spawnPriority, new Dictionary<string, JobPriority>(jobPriorities),
|
||||
preferenceUnavailable, [..antagPreferences], [..traitPreferences])
|
||||
preferenceUnavailable, new List<string>(antagPreferences), new List<string>(traitPreferences))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public sealed partial class JukeboxComponent : Component
|
||||
public Container TapeContainer = default!;
|
||||
|
||||
[DataField]
|
||||
public List<string> DefaultTapes = [];
|
||||
public List<string> 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<byte> SongBytes = [];
|
||||
public List<byte> SongBytes = new() { };
|
||||
public NetEntity TapeCreatorUid = default!;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
ClothingShoesBootsCowboyBrown: 1
|
||||
ClothingShoesBootsCowboyBlack: 1
|
||||
ClothingShoesBootsCowboyWhite: 1
|
||||
ClothingMaskNeckGaiterRed: 2
|
||||
emaggedInventory:
|
||||
ClothingShoesBling: 1
|
||||
ClothingShoesBootsCowboyFancy: 1
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
id: BaseToolSurgery
|
||||
abstract: true
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- SurgeryTool
|
||||
- type: Sprite
|
||||
- type: StaticPrice
|
||||
price: 20
|
||||
|
||||
@@ -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
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1181,9 +1181,6 @@
|
||||
- type: Tag
|
||||
id: SuitEVA
|
||||
|
||||
- type: Tag
|
||||
id: SurgeryTool
|
||||
|
||||
- type: Tag
|
||||
id: SurveillanceCameraMonitorCircuitboard
|
||||
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
"name": "equipped-OUTERCLOTHING",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "equipped-HELMET-hamster",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-left",
|
||||
"directions": 4
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user