diff --git a/.editorconfig b/.editorconfig index a8ce1d6b68..59ca35cc9a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -338,5 +338,8 @@ dotnet_naming_symbols.type_parameters_symbols.applicable_kinds = type_parameter resharper_braces_for_ifelse = required_for_multiline resharper_keep_existing_attribute_arrangement = true -[*.{csproj,xml,yml,dll.config,msbuildproj,targets}] +[*.{csproj,xml,yml,yaml,dll.config,msbuildproj,targets}] indent_size = 2 + +[{*.yaml,*.yml}] +ij_yaml_indent_sequence_value = false diff --git a/Content.Client/Actions/ActionsSystem.cs b/Content.Client/Actions/ActionsSystem.cs index 83d927c94b..a487e5d8d8 100644 --- a/Content.Client/Actions/ActionsSystem.cs +++ b/Content.Client/Actions/ActionsSystem.cs @@ -2,7 +2,6 @@ using System.IO; using System.Linq; using Content.Shared.Actions; using JetBrains.Annotations; -using Robust.Client.GameObjects; using Robust.Client.Player; using Robust.Shared.ContentPack; using Robust.Shared.GameStates; @@ -41,8 +40,8 @@ namespace Content.Client.Actions public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeLocalEvent(OnPlayerDetached); + SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerDetached); SubscribeLocalEvent(HandleComponentState); SubscribeLocalEvent(OnInstantHandleState); @@ -196,12 +195,12 @@ namespace Content.Client.Actions return GetActions(user); } - private void OnPlayerAttached(EntityUid uid, ActionsComponent component, PlayerAttachedEvent args) + private void OnPlayerAttached(EntityUid uid, ActionsComponent component, LocalPlayerAttachedEvent args) { LinkAllActions(component); } - private void OnPlayerDetached(EntityUid uid, ActionsComponent component, PlayerDetachedEvent? args = null) + private void OnPlayerDetached(EntityUid uid, ActionsComponent component, LocalPlayerDetachedEvent? args = null) { UnlinkAllActions(); } diff --git a/Content.Client/Administration/Managers/ClientAdminManager.cs b/Content.Client/Administration/Managers/ClientAdminManager.cs index 8978e2fd6d..1a1366c6f2 100644 --- a/Content.Client/Administration/Managers/ClientAdminManager.cs +++ b/Content.Client/Administration/Managers/ClientAdminManager.cs @@ -4,7 +4,7 @@ using Robust.Client.Console; using Robust.Client.Player; using Robust.Shared.ContentPack; using Robust.Shared.Network; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Client.Administration.Managers diff --git a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs index 6142e3a831..5fa28bf1ac 100644 --- a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs +++ b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs @@ -22,7 +22,7 @@ namespace Content.Client.Administration.UI.CustomControls private List _playerList = new(); private readonly List _sortedPlayerList = new(); - public event Action? OnSelectionChanged; + public event Action? OnSelectionChanged; public IReadOnlyList PlayerInfo => _playerList; public Func? OverrideText; @@ -46,9 +46,9 @@ namespace Content.Client.Administration.UI.CustomControls BackgroundPanel.PanelOverride = new StyleBoxFlat {BackgroundColor = new Color(32, 32, 40)}; } - private void PlayerListItemPressed(BaseButton.ButtonEventArgs args, ListData data) + private void PlayerListItemPressed(BaseButton.ButtonEventArgs? args, ListData? data) { - if (data is not PlayerListData {Info: var selectedPlayer}) + if (args == null || data is not PlayerListData {Info: var selectedPlayer}) return; if (args.Event.Function == EngineKeyFunctions.UIClick) { diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs b/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs index c5a9bd036a..1978b5c3c0 100644 --- a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs +++ b/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs @@ -5,7 +5,6 @@ using Robust.Client.Console; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.IoC; -using Robust.Shared.Players; namespace Content.Client.Administration.UI.Tabs.AdminTab { diff --git a/Content.Client/Alerts/ClientAlertsSystem.cs b/Content.Client/Alerts/ClientAlertsSystem.cs index bb6d2d4df4..5089022415 100644 --- a/Content.Client/Alerts/ClientAlertsSystem.cs +++ b/Content.Client/Alerts/ClientAlertsSystem.cs @@ -1,7 +1,6 @@ using System.Linq; using Content.Shared.Alert; using JetBrains.Annotations; -using Robust.Client.GameObjects; using Robust.Client.Player; using Robust.Shared.Prototypes; @@ -22,8 +21,8 @@ public sealed class ClientAlertsSystem : AlertsSystem { base.Initialize(); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeLocalEvent(OnPlayerDetached); + SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerDetached); SubscribeLocalEvent(ClientAlertsHandleState); } @@ -69,7 +68,7 @@ public sealed class ClientAlertsSystem : AlertsSystem SyncAlerts?.Invoke(this, component.Alerts); } - private void OnPlayerAttached(EntityUid uid, AlertsComponent component, PlayerAttachedEvent args) + private void OnPlayerAttached(EntityUid uid, AlertsComponent component, LocalPlayerAttachedEvent args) { if (_playerManager.LocalPlayer?.ControlledEntity != uid) return; @@ -87,7 +86,7 @@ public sealed class ClientAlertsSystem : AlertsSystem ClearAlerts?.Invoke(this, EventArgs.Empty); } - private void OnPlayerDetached(EntityUid uid, AlertsComponent component, PlayerDetachedEvent args) + private void OnPlayerDetached(EntityUid uid, AlertsComponent component, LocalPlayerDetachedEvent args) { ClearAlerts?.Invoke(this, EventArgs.Empty); } diff --git a/Content.Client/CharacterInfo/CharacterInfoSystem.cs b/Content.Client/CharacterInfo/CharacterInfoSystem.cs index 93bd86d140..844a352a18 100644 --- a/Content.Client/CharacterInfo/CharacterInfoSystem.cs +++ b/Content.Client/CharacterInfo/CharacterInfoSystem.cs @@ -1,6 +1,5 @@ using Content.Shared.CharacterInfo; using Content.Shared.Objectives; -using Robust.Client.GameObjects; using Robust.Client.Player; using Robust.Client.UserInterface; @@ -11,14 +10,11 @@ public sealed class CharacterInfoSystem : EntitySystem [Dependency] private readonly IPlayerManager _players = default!; public event Action? OnCharacterUpdate; - public event Action? OnCharacterDetached; public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeNetworkEvent(OnCharacterInfoEvent); } @@ -33,14 +29,6 @@ public sealed class CharacterInfoSystem : EntitySystem RaiseNetworkEvent(new RequestCharacterInfoEvent(GetNetEntity(entity.Value))); } - private void OnPlayerAttached(PlayerAttachSysMessage msg) - { - if (msg.AttachedEntity == default) - { - OnCharacterDetached?.Invoke(); - } - } - private void OnCharacterInfoEvent(CharacterInfoEvent msg, EntitySessionEventArgs args) { var entity = GetEntity(msg.NetEntity); diff --git a/Content.Client/Chemistry/Visualizers/FoamVisualizerSystem.cs b/Content.Client/Chemistry/Visualizers/FoamVisualizerSystem.cs index ec582ee094..2ee88956ff 100644 --- a/Content.Client/Chemistry/Visualizers/FoamVisualizerSystem.cs +++ b/Content.Client/Chemistry/Visualizers/FoamVisualizerSystem.cs @@ -1,8 +1,6 @@ -using Content.Shared.Smoking; -using Robust.Shared.Spawners; +using Content.Shared.Chemistry.Components; using Robust.Client.Animations; using Robust.Client.GameObjects; -using Robust.Shared.Network; using Robust.Shared.Timing; namespace Content.Client.Chemistry.Visualizers; @@ -18,6 +16,7 @@ public sealed class FoamVisualizerSystem : VisualizerSystem(OnComponentInit); + SubscribeLocalEvent(OnAnimationComplete); } public override void Update(float frameTime) @@ -27,11 +26,11 @@ public sealed class FoamVisualizerSystem : VisualizerSystem(); + var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var comp, out var despawn)) + while (query.MoveNext(out var uid, out var comp, out var smoke)) { - if (despawn.Lifetime > 1f) + if (_timing.CurTime < comp.StartTime + TimeSpan.FromSeconds(smoke.Duration) - TimeSpan.FromSeconds(comp.AnimationTime)) continue; // Despawn animation. @@ -48,6 +47,7 @@ public sealed class FoamVisualizerSystem : VisualizerSystem private void OnComponentInit(EntityUid uid, FoamVisualsComponent comp, ComponentInit args) { + comp.StartTime = _timing.CurTime; comp.Animation = new Animation { Length = TimeSpan.FromSeconds(comp.AnimationTime), @@ -58,12 +58,21 @@ public sealed class FoamVisualizerSystem : VisualizerSystem(uid, out var sprite)) + sprite.Visible = false; + } } public enum FoamVisualLayers : byte diff --git a/Content.Client/Chemistry/Visualizers/FoamVisualsComponent.cs b/Content.Client/Chemistry/Visualizers/FoamVisualsComponent.cs index b09c74aa0f..8199efa42e 100644 --- a/Content.Client/Chemistry/Visualizers/FoamVisualsComponent.cs +++ b/Content.Client/Chemistry/Visualizers/FoamVisualsComponent.cs @@ -1,5 +1,6 @@ using Robust.Client.Animations; using Robust.Client.Graphics; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Client.Chemistry.Visualizers; @@ -15,18 +16,21 @@ public sealed partial class FoamVisualsComponent : Component /// public const string AnimationKey = "foamdissolve_animation"; + [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] + public TimeSpan StartTime; + /// /// How long the foam visually dissolves for. /// - [DataField("animationTime")] - public float AnimationTime = 0.6f; + [DataField] + public float AnimationTime = 0.5f; /// /// The state of the entities base sprite RSI that is displayed when the foam dissolves. /// Cannot use because it does not have and I am not making an engine PR at this time. /// - [DataField("animationState")] - public string State = "foam-dissolve"; + [DataField] + public string AnimationState = "foam-dissolve"; /// /// The animation used while the foam dissolves. diff --git a/Content.Client/Construction/ConstructionSystem.cs b/Content.Client/Construction/ConstructionSystem.cs index 98d2dfd414..9fc638cea2 100644 --- a/Content.Client/Construction/ConstructionSystem.cs +++ b/Content.Client/Construction/ConstructionSystem.cs @@ -38,7 +38,7 @@ namespace Content.Client.Construction base.Initialize(); UpdatesOutsidePrediction = true; - SubscribeLocalEvent(HandlePlayerAttached); + SubscribeLocalEvent(HandlePlayerAttached); SubscribeNetworkEvent(HandleAckStructure); SubscribeNetworkEvent(OnConstructionGuideReceived); @@ -110,9 +110,9 @@ namespace Content.Client.Construction ClearGhost(msg.GhostId); } - private void HandlePlayerAttached(PlayerAttachSysMessage msg) + private void HandlePlayerAttached(LocalPlayerAttachedEvent msg) { - var available = IsCraftingAvailable(msg.AttachedEntity); + var available = IsCraftingAvailable(msg.Entity); UpdateCraftingAvailability(available); } diff --git a/Content.Client/Drugs/DrugOverlaySystem.cs b/Content.Client/Drugs/DrugOverlaySystem.cs index 7be63b4c50..ec0d014072 100644 --- a/Content.Client/Drugs/DrugOverlaySystem.cs +++ b/Content.Client/Drugs/DrugOverlaySystem.cs @@ -1,5 +1,4 @@ using Content.Shared.Drugs; -using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.Player; @@ -24,18 +23,18 @@ public sealed class DrugOverlaySystem : EntitySystem SubscribeLocalEvent(OnInit); SubscribeLocalEvent(OnShutdown); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeLocalEvent(OnPlayerDetached); + SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerDetached); _overlay = new(); } - private void OnPlayerAttached(EntityUid uid, SeeingRainbowsComponent component, PlayerAttachedEvent args) + private void OnPlayerAttached(EntityUid uid, SeeingRainbowsComponent component, LocalPlayerAttachedEvent args) { _overlayMan.AddOverlay(_overlay); } - private void OnPlayerDetached(EntityUid uid, SeeingRainbowsComponent component, PlayerDetachedEvent args) + private void OnPlayerDetached(EntityUid uid, SeeingRainbowsComponent component, LocalPlayerDetachedEvent args) { _overlay.Intoxication = 0; _overlayMan.RemoveOverlay(_overlay); diff --git a/Content.Client/Drunk/DrunkSystem.cs b/Content.Client/Drunk/DrunkSystem.cs index 0573b2ff3e..4f2ec70b56 100644 --- a/Content.Client/Drunk/DrunkSystem.cs +++ b/Content.Client/Drunk/DrunkSystem.cs @@ -1,5 +1,4 @@ using Content.Shared.Drunk; -using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.Player; @@ -19,18 +18,18 @@ public sealed class DrunkSystem : SharedDrunkSystem SubscribeLocalEvent(OnDrunkInit); SubscribeLocalEvent(OnDrunkShutdown); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeLocalEvent(OnPlayerDetached); + SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerDetached); _overlay = new(); } - private void OnPlayerAttached(EntityUid uid, DrunkComponent component, PlayerAttachedEvent args) + private void OnPlayerAttached(EntityUid uid, DrunkComponent component, LocalPlayerAttachedEvent args) { _overlayMan.AddOverlay(_overlay); } - private void OnPlayerDetached(EntityUid uid, DrunkComponent component, PlayerDetachedEvent args) + private void OnPlayerDetached(EntityUid uid, DrunkComponent component, LocalPlayerDetachedEvent args) { _overlay.CurrentBoozePower = 0; _overlayMan.RemoveOverlay(_overlay); diff --git a/Content.Client/Eye/Blinding/BlindingSystem.cs b/Content.Client/Eye/Blinding/BlindingSystem.cs index f0b760d838..f255f7ef01 100644 --- a/Content.Client/Eye/Blinding/BlindingSystem.cs +++ b/Content.Client/Eye/Blinding/BlindingSystem.cs @@ -1,17 +1,7 @@ - -using Content.Shared.Eye.Blinding; -using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.Player; -using System; -using System.Collections.Generic; -using System.Linq; -using Content.Shared.Administration; -using Content.Shared.Administration.Events; using Content.Shared.Eye.Blinding.Components; using Content.Shared.GameTicking; -using Robust.Shared.GameObjects; -using Robust.Shared.Network; namespace Content.Client.Eye.Blinding; @@ -31,20 +21,20 @@ public sealed class BlindingSystem : EntitySystem SubscribeLocalEvent(OnBlindInit); SubscribeLocalEvent(OnBlindShutdown); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeLocalEvent(OnPlayerDetached); + SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerDetached); SubscribeNetworkEvent(RoundRestartCleanup); _overlay = new(); } - private void OnPlayerAttached(EntityUid uid, BlindableComponent component, PlayerAttachedEvent args) + private void OnPlayerAttached(EntityUid uid, BlindableComponent component, LocalPlayerAttachedEvent args) { _overlayMan.AddOverlay(_overlay); } - private void OnPlayerDetached(EntityUid uid, BlindableComponent component, PlayerDetachedEvent args) + private void OnPlayerDetached(EntityUid uid, BlindableComponent component, LocalPlayerDetachedEvent args) { _overlayMan.RemoveOverlay(_overlay); _lightManager.Enabled = true; diff --git a/Content.Client/Eye/Blinding/BlurryVisionSystem.cs b/Content.Client/Eye/Blinding/BlurryVisionSystem.cs index 1bac2a97bf..8be5b4ed93 100644 --- a/Content.Client/Eye/Blinding/BlurryVisionSystem.cs +++ b/Content.Client/Eye/Blinding/BlurryVisionSystem.cs @@ -1,9 +1,6 @@ -using Content.Shared.Eye.Blinding; using Content.Shared.Eye.Blinding.Components; -using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.Player; -using Robust.Shared.GameStates; namespace Content.Client.Eye.Blinding; @@ -20,18 +17,18 @@ public sealed class BlurryVisionSystem : EntitySystem SubscribeLocalEvent(OnBlurryInit); SubscribeLocalEvent(OnBlurryShutdown); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeLocalEvent(OnPlayerDetached); + SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerDetached); _overlay = new(); } - private void OnPlayerAttached(EntityUid uid, BlurryVisionComponent component, PlayerAttachedEvent args) + private void OnPlayerAttached(EntityUid uid, BlurryVisionComponent component, LocalPlayerAttachedEvent args) { _overlayMan.AddOverlay(_overlay); } - private void OnPlayerDetached(EntityUid uid, BlurryVisionComponent component, PlayerDetachedEvent args) + private void OnPlayerDetached(EntityUid uid, BlurryVisionComponent component, LocalPlayerDetachedEvent args) { _overlayMan.RemoveOverlay(_overlay); } diff --git a/Content.Client/Eye/EyeLerpingSystem.cs b/Content.Client/Eye/EyeLerpingSystem.cs index 8e54196b81..b46921a9b4 100644 --- a/Content.Client/Eye/EyeLerpingSystem.cs +++ b/Content.Client/Eye/EyeLerpingSystem.cs @@ -30,7 +30,7 @@ public sealed class EyeLerpingSystem : EntitySystem SubscribeLocalEvent(OnAttached); SubscribeLocalEvent(HandleMapChange); - SubscribeLocalEvent(OnDetached); + SubscribeLocalEvent(OnDetached); UpdatesAfter.Add(typeof(TransformSystem)); UpdatesAfter.Add(typeof(PhysicsSystem)); @@ -94,7 +94,7 @@ public sealed class EyeLerpingSystem : EntitySystem AddEye(ev.Entity, ev.Component, true); } - private void OnDetached(EntityUid uid, LerpingEyeComponent component, PlayerDetachedEvent args) + private void OnDetached(EntityUid uid, LerpingEyeComponent component, LocalPlayerDetachedEvent args) { if (!component.ManuallyAdded) RemCompDeferred(uid, component); diff --git a/Content.Client/Fullscreen/FullscreenHook.cs b/Content.Client/Fullscreen/FullscreenHook.cs index 78a0151736..7917fddfbb 100644 --- a/Content.Client/Fullscreen/FullscreenHook.cs +++ b/Content.Client/Fullscreen/FullscreenHook.cs @@ -4,7 +4,7 @@ using Robust.Client.Input; using Robust.Shared.Input.Binding; using Robust.Shared; using Robust.Shared.Configuration; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Client.Fullscreen; public sealed class FullscreenHook diff --git a/Content.Client/Gameplay/GameplayStateBase.cs b/Content.Client/Gameplay/GameplayStateBase.cs index 788a4e5dff..454c063260 100644 --- a/Content.Client/Gameplay/GameplayStateBase.cs +++ b/Content.Client/Gameplay/GameplayStateBase.cs @@ -16,7 +16,7 @@ using Robust.Shared.Console; using Robust.Shared.Input; using Robust.Shared.Input.Binding; using Robust.Shared.Map; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Client.Gameplay diff --git a/Content.Client/Ghost/GhostSystem.cs b/Content.Client/Ghost/GhostSystem.cs index 5727534109..a89d0858d9 100644 --- a/Content.Client/Ghost/GhostSystem.cs +++ b/Content.Client/Ghost/GhostSystem.cs @@ -58,10 +58,10 @@ namespace Content.Client.Ghost SubscribeLocalEvent(OnGhostRemove); SubscribeLocalEvent(OnGhostState); - SubscribeLocalEvent(OnGhostPlayerAttach); - SubscribeLocalEvent(OnGhostPlayerDetach); + SubscribeLocalEvent(OnGhostPlayerAttach); + SubscribeLocalEvent(OnGhostPlayerDetach); - SubscribeLocalEvent(OnPlayerAttach); + SubscribeLocalEvent(OnPlayerAttach); SubscribeNetworkEvent(OnGhostWarpsResponse); SubscribeNetworkEvent(OnUpdateGhostRoleCount); @@ -130,7 +130,7 @@ namespace Content.Client.Ghost PlayerRemoved?.Invoke(component); } - private void OnGhostPlayerAttach(EntityUid uid, GhostComponent component, PlayerAttachedEvent playerAttachedEvent) + private void OnGhostPlayerAttach(EntityUid uid, GhostComponent component, LocalPlayerAttachedEvent localPlayerAttachedEvent) { if (uid != _playerManager.LocalPlayer?.ControlledEntity) return; @@ -161,13 +161,13 @@ namespace Content.Client.Ghost return true; } - private void OnGhostPlayerDetach(EntityUid uid, GhostComponent component, PlayerDetachedEvent args) + private void OnGhostPlayerDetach(EntityUid uid, GhostComponent component, LocalPlayerDetachedEvent args) { if (PlayerDetach(uid)) component.IsAttached = false; } - private void OnPlayerAttach(PlayerAttachedEvent ev) + private void OnPlayerAttach(LocalPlayerAttachedEvent ev) { if (!HasComp(ev.Entity)) PlayerDetach(ev.Entity); diff --git a/Content.Client/Hands/Systems/HandsSystem.cs b/Content.Client/Hands/Systems/HandsSystem.cs index ed40589f7f..31de7ec143 100644 --- a/Content.Client/Hands/Systems/HandsSystem.cs +++ b/Content.Client/Hands/Systems/HandsSystem.cs @@ -42,8 +42,8 @@ namespace Content.Client.Hands.Systems { base.Initialize(); - SubscribeLocalEvent(HandlePlayerAttached); - SubscribeLocalEvent(HandlePlayerDetached); + SubscribeLocalEvent(HandlePlayerAttached); + SubscribeLocalEvent(HandlePlayerDetached); SubscribeLocalEvent(OnHandsStartup); SubscribeLocalEvent(OnHandsShutdown); SubscribeLocalEvent(HandleComponentState); @@ -361,12 +361,12 @@ namespace Content.Client.Hands.Systems #region Gui - private void HandlePlayerAttached(EntityUid uid, HandsComponent component, PlayerAttachedEvent args) + private void HandlePlayerAttached(EntityUid uid, HandsComponent component, LocalPlayerAttachedEvent args) { OnPlayerHandsAdded?.Invoke(component); } - private void HandlePlayerDetached(EntityUid uid, HandsComponent component, PlayerDetachedEvent args) + private void HandlePlayerDetached(EntityUid uid, HandsComponent component, LocalPlayerDetachedEvent args) { OnPlayerHandsRemoved?.Invoke(); } diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml index 1f64feec2b..b78c3c6a56 100644 --- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml +++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml @@ -1,9 +1,33 @@  - - - + SetSize="250 100"> + + + + + \ No newline at end of file diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs index 1c5a3373e1..36f7a08b96 100644 --- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs +++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs @@ -1,5 +1,5 @@ +using System.Linq; using System.Numerics; -using System.Text; using Content.Shared.Damage; using Content.Shared.Damage.Prototypes; using Content.Shared.FixedPoint; @@ -8,85 +8,182 @@ using Content.Shared.MedicalScanner; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.XAML; +using Robust.Client.GameObjects; +using Robust.Client.Graphics; +using Robust.Client.UserInterface.Controls; +using Robust.Client.ResourceManagement; using Robust.Shared.Prototypes; +using Robust.Shared.Utility; namespace Content.Client.HealthAnalyzer.UI { [GenerateTypedNameReferences] public sealed partial class HealthAnalyzerWindow : DefaultWindow { + private readonly IEntityManager _entityManager; + private readonly SpriteSystem _spriteSystem; + private readonly IPrototypeManager _prototypes; + private readonly IResourceCache _cache; + + private const int AnalyzerHeight = 430; + private const int AnalyzerWidth = 300; + public HealthAnalyzerWindow() { RobustXamlLoader.Load(this); + + var dependencies = IoCManager.Instance!; + _entityManager = dependencies.Resolve(); + _spriteSystem = _entityManager.System(); + _prototypes = dependencies.Resolve(); + _cache = dependencies.Resolve(); } public void Populate(HealthAnalyzerScannedUserMessage msg) { - var text = new StringBuilder(); - var entities = IoCManager.Resolve(); - var target = entities.GetEntity(msg.TargetEntity); + GroupsContainer.RemoveAllChildren(); - if (msg.TargetEntity != null && entities.TryGetComponent(target, out var damageable)) + var target = _entityManager.GetEntity(msg.TargetEntity); + + if (target == null + || !_entityManager.TryGetComponent(target, out var damageable)) { - string entityName = "Unknown"; - if (msg.TargetEntity != null && - entities.HasComponent(target.Value)) - { - entityName = Identity.Name(target.Value, entities); - } - - IReadOnlyDictionary damagePerGroup = damageable.DamagePerGroup; - IReadOnlyDictionary damagePerType = damageable.Damage.DamageDict; - - text.Append($"{Loc.GetString("health-analyzer-window-entity-health-text", ("entityName", entityName))}\n\n"); - - - text.Append($"{Loc.GetString("health-analyzer-window-entity-temperature-text", ("temperature", float.IsNaN(msg.Temperature) ? "N/A" : $"{msg.Temperature - 273f:F1} °C"))}\n"); - - - text.Append($"{Loc.GetString("health-analyzer-window-entity-blood-level-text", ("bloodLevel", float.IsNaN(msg.BloodLevel) ? "N/A" : $"{msg.BloodLevel * 100:F1} %"))}\n\n"); - - - // Damage - text.Append($"{Loc.GetString("health-analyzer-window-entity-damage-total-text", ("amount", damageable.TotalDamage))}\n"); - - HashSet shownTypes = new(); - - var protos = IoCManager.Resolve(); - - // Show the total damage and type breakdown for each damage group. - foreach (var (damageGroupId, damageAmount) in damagePerGroup) - { - if (damageAmount == 0) - { - continue; - } - text.Append($"\n{Loc.GetString("health-analyzer-window-damage-group-text", ("damageGroup", Loc.GetString("health-analyzer-window-damage-group-" + damageGroupId)), ("amount", damageAmount))}"); - - // Show the damage for each type in that group. - var group = protos.Index(damageGroupId); - foreach (var type in group.DamageTypes) - { - if (damagePerType.TryGetValue(type, out var typeAmount) ) - { - // If damage types are allowed to belong to more than one damage group, they may appear twice here. Mark them as duplicate. - if (!shownTypes.Contains(type) && typeAmount > 0) - { - shownTypes.Add(type); - text.Append($"\n- {Loc.GetString("health-analyzer-window-damage-type-text", ("damageType", Loc.GetString("health-analyzer-window-damage-type-" + type)), ("amount", typeAmount))}"); - } - } - } - text.AppendLine(); - } - Diagnostics.Text = text.ToString(); - SetSize = new Vector2(250, 600); + NoPatientDataText.Visible = true; + return; } - else + + NoPatientDataText.Visible = false; + + string entityName = Loc.GetString("health-analyzer-window-entity-unknown-text"); + if (_entityManager.HasComponent(target.Value)) { - Diagnostics.Text = Loc.GetString("health-analyzer-window-no-patient-data-text"); - SetSize = new Vector2(250, 100); + entityName = Identity.Name(target.Value, _entityManager); } + + PatientName.Text = Loc.GetString( + "health-analyzer-window-entity-health-text", + ("entityName", entityName) + ); + + Temperature.Text = Loc.GetString("health-analyzer-window-entity-temperature-text", + ("temperature", float.IsNaN(msg.Temperature) ? "N/A" : $"{msg.Temperature - 273f:F1} °C") + ); + + BloodLevel.Text = Loc.GetString("health-analyzer-window-entity-blood-level-text", + ("bloodLevel", float.IsNaN(msg.BloodLevel) ? "N/A" : $"{msg.BloodLevel * 100:F1} %") + ); + + patientDamageAmount.Text = Loc.GetString( + "health-analyzer-window-entity-damage-total-text", + ("amount", damageable.TotalDamage) + ); + + var damageSortedGroups = + damageable.DamagePerGroup.OrderBy(damage => damage.Value) + .ToDictionary(x => x.Key, x => x.Value); + IReadOnlyDictionary damagePerType = damageable.Damage.DamageDict; + + DrawDiagnosticGroups(damageSortedGroups, damagePerType); + + SetHeight = AnalyzerHeight; + SetWidth = AnalyzerWidth; + } + + private void DrawDiagnosticGroups( + Dictionary groups, IReadOnlyDictionary damageDict) + { + HashSet shownTypes = new(); + + // Show the total damage and type breakdown for each damage group. + foreach (var (damageGroupId, damageAmount) in groups.Reverse()) + { + if (damageAmount == 0) + continue; + + var groupTitleText = $"{Loc.GetString( + "health-analyzer-window-damage-group-text", + ("damageGroup", Loc.GetString("health-analyzer-window-damage-group-" + damageGroupId)), + ("amount", damageAmount) + )}"; + + var groupContainer = new BoxContainer + { + Margin = new Thickness(0, 0, 0, 15), + Align = BoxContainer.AlignMode.Begin, + Orientation = BoxContainer.LayoutOrientation.Vertical, + }; + + groupContainer.AddChild(CreateDiagnosticGroupTitle(groupTitleText, damageGroupId, damageAmount.Int())); + + GroupsContainer.AddChild(groupContainer); + + // Show the damage for each type in that group. + var group = _prototypes.Index(damageGroupId); + + foreach (var type in group.DamageTypes) + { + if (damageDict.TryGetValue(type, out var typeAmount) && typeAmount > 0) + { + // If damage types are allowed to belong to more than one damage group, + // they may appear twice here. Mark them as duplicate. + if (shownTypes.Contains(type)) + continue; + + shownTypes.Add(type); + + var damageString = Loc.GetString( + "health-analyzer-window-damage-type-text", + ("damageType", Loc.GetString("health-analyzer-window-damage-type-" + type)), + ("amount", typeAmount) + ); + + groupContainer.AddChild(CreateDiagnosticItemLabel(damageString.Insert(0, "- "))); + } + } + } + } + + private Texture GetTexture(string texture) + { + var rsiPath = new ResPath("/Textures/Objects/Devices/health_analyzer.rsi"); + var rsiSprite = new SpriteSpecifier.Rsi(rsiPath, texture); + + var rsi = _cache.GetResource(rsiSprite.RsiPath).RSI; + if (!rsi.TryGetState(rsiSprite.RsiState, out var state)) + { + rsiSprite = new SpriteSpecifier.Rsi(rsiPath, "unknown"); + } + + return _spriteSystem.Frame0(rsiSprite); + } + + private static Label CreateDiagnosticItemLabel(string text) + { + return new Label + { + Margin = new Thickness(2, 2), + Text = text, + }; + } + + private BoxContainer CreateDiagnosticGroupTitle(string text, string id, int damageAmount) + { + var rootContainer = new BoxContainer + { + VerticalAlignment = VAlignment.Bottom, + Orientation = BoxContainer.LayoutOrientation.Horizontal + }; + + rootContainer.AddChild(new TextureRect + { + Margin = new Thickness(0, 3), + SetSize = new Vector2(30, 30), + Texture = GetTexture(id.ToLower()) + }); + + rootContainer.AddChild(CreateDiagnosticItemLabel(text)); + + return rootContainer; } } } diff --git a/Content.Client/HealthOverlay/HealthOverlaySystem.cs b/Content.Client/HealthOverlay/HealthOverlaySystem.cs index baeb4fe025..29ac937199 100644 --- a/Content.Client/HealthOverlay/HealthOverlaySystem.cs +++ b/Content.Client/HealthOverlay/HealthOverlaySystem.cs @@ -3,8 +3,8 @@ using Content.Shared.Damage; using Content.Shared.GameTicking; using Content.Shared.Mobs.Components; using JetBrains.Annotations; -using Robust.Client.GameObjects; using Robust.Client.Graphics; +using Robust.Client.Player; namespace Content.Client.HealthOverlay { @@ -13,9 +13,9 @@ namespace Content.Client.HealthOverlay { [Dependency] private readonly IEyeManager _eyeManager = default!; [Dependency] private readonly IEntityManager _entities = default!; + [Dependency] private readonly IPlayerManager _player = default!; private readonly Dictionary _guis = new(); - private EntityUid? _attachedEntity; private bool _enabled; public bool Enabled @@ -42,7 +42,6 @@ namespace Content.Client.HealthOverlay base.Initialize(); SubscribeNetworkEvent(Reset); - SubscribeLocalEvent(HandlePlayerAttached); } public void Reset(RoundRestartCleanupEvent ev) @@ -53,12 +52,6 @@ namespace Content.Client.HealthOverlay } _guis.Clear(); - _attachedEntity = default; - } - - private void HandlePlayerAttached(PlayerAttachSysMessage message) - { - _attachedEntity = message.AttachedEntity; } public override void FrameUpdate(float frameTime) @@ -70,7 +63,7 @@ namespace Content.Client.HealthOverlay return; } - if (_attachedEntity is not {} ent || Deleted(ent)) + if (_player.LocalEntity is not {} ent || Deleted(ent)) { return; } diff --git a/Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.cs b/Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.cs new file mode 100644 index 0000000000..aff01800f9 --- /dev/null +++ b/Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.cs @@ -0,0 +1,39 @@ +using Robust.Client.AutoGenerated; +using Robust.Client.Graphics; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.XAML; + +namespace Content.Client.Info.PlaytimeStats; + +[GenerateTypedNameReferences] +public sealed partial class PlaytimeStatsEntry : ContainerButton +{ + public TimeSpan Playtime { get; private set; } // new TimeSpan property + + public PlaytimeStatsEntry(string role, TimeSpan playtime, StyleBox styleBox) + { + RobustXamlLoader.Load(this); + + RoleLabel.Text = role; + Playtime = playtime; // store the TimeSpan value directly + PlaytimeLabel.Text = ConvertTimeSpanToHoursMinutes(playtime); // convert to string for display + BackgroundColorPanel.PanelOverride = styleBox; + } + + private static string ConvertTimeSpanToHoursMinutes(TimeSpan timeSpan) + { + var hours = (int)timeSpan.TotalHours; + var minutes = timeSpan.Minutes; + + var formattedTimeLoc = Loc.GetString("ui-playtime-time-format", ("hours", hours), ("minutes", minutes)); + return formattedTimeLoc; + } + + public void UpdateShading(StyleBoxFlat styleBox) + { + BackgroundColorPanel.PanelOverride = styleBox; + } + public string? PlaytimeText => PlaytimeLabel.Text; + + public string? RoleText => RoleLabel.Text; +} diff --git a/Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.xaml b/Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.xaml new file mode 100644 index 0000000000..97a66e5cc2 --- /dev/null +++ b/Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.xaml @@ -0,0 +1,20 @@ + + + + + diff --git a/Content.Client/Info/PlaytimeStats/PlaytimeStatsHeader.cs b/Content.Client/Info/PlaytimeStats/PlaytimeStatsHeader.cs new file mode 100644 index 0000000000..b005c641f7 --- /dev/null +++ b/Content.Client/Info/PlaytimeStats/PlaytimeStatsHeader.cs @@ -0,0 +1,86 @@ +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.XAML; +using Robust.Shared.Input; + +namespace Content.Client.Info.PlaytimeStats; + +[GenerateTypedNameReferences] +public sealed partial class PlaytimeStatsHeader : ContainerButton +{ + public event Action? OnHeaderClicked; + private SortDirection _roleDirection = SortDirection.Ascending; + private SortDirection _playtimeDirection = SortDirection.Descending; + + public PlaytimeStatsHeader() + { + RobustXamlLoader.Load(this); + + RoleLabel.OnKeyBindDown += RoleClicked; + PlaytimeLabel.OnKeyBindDown += PlaytimeClicked; + + UpdateLabels(); + } + + public enum Header : byte + { + Role, + Playtime + } + public enum SortDirection : byte + { + Ascending, + Descending + } + + private void HeaderClicked(GUIBoundKeyEventArgs args, Header header) + { + if (args.Function != EngineKeyFunctions.UIClick) + { + return; + } + + switch (header) + { + case Header.Role: + _roleDirection = _roleDirection == SortDirection.Ascending ? SortDirection.Descending : SortDirection.Ascending; + break; + case Header.Playtime: + _playtimeDirection = _playtimeDirection == SortDirection.Ascending ? SortDirection.Descending : SortDirection.Ascending; + break; + } + + UpdateLabels(); + OnHeaderClicked?.Invoke(header, header == Header.Role ? _roleDirection : _playtimeDirection); + args.Handle(); + } + private void UpdateLabels() + { + RoleLabel.Text = Loc.GetString("ui-playtime-header-role-type") + + (_roleDirection == SortDirection.Ascending ? " ↓" : " ↑"); + PlaytimeLabel.Text = Loc.GetString("ui-playtime-header-role-time") + + (_playtimeDirection == SortDirection.Ascending ? " ↓" : " ↑"); + } + + private void RoleClicked(GUIBoundKeyEventArgs args) + { + HeaderClicked(args, Header.Role); + } + + private void PlaytimeClicked(GUIBoundKeyEventArgs args) + { + HeaderClicked(args, Header.Playtime); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + + if (disposing) + { + RoleLabel.OnKeyBindDown -= RoleClicked; + PlaytimeLabel.OnKeyBindDown -= PlaytimeClicked; + } + } +} diff --git a/Content.Client/Info/PlaytimeStats/PlaytimeStatsHeader.xaml b/Content.Client/Info/PlaytimeStats/PlaytimeStatsHeader.xaml new file mode 100644 index 0000000000..4cf4d8e2cc --- /dev/null +++ b/Content.Client/Info/PlaytimeStats/PlaytimeStatsHeader.xaml @@ -0,0 +1,29 @@ + + + + + + + + + diff --git a/Content.Client/Info/PlaytimeStats/PlaytimeStatsWindow.cs b/Content.Client/Info/PlaytimeStats/PlaytimeStatsWindow.cs new file mode 100644 index 0000000000..3b54bf82da --- /dev/null +++ b/Content.Client/Info/PlaytimeStats/PlaytimeStatsWindow.cs @@ -0,0 +1,146 @@ +using System.Linq; +using System.Text.RegularExpressions; +using Content.Client.Players.PlayTimeTracking; +using Content.Client.UserInterface.Controls; +using Robust.Client.AutoGenerated; +using Robust.Client.Graphics; +using Robust.Client.UserInterface.XAML; + +namespace Content.Client.Info.PlaytimeStats; + +[GenerateTypedNameReferences] +public sealed partial class PlaytimeStatsWindow : FancyWindow +{ + [Dependency] private readonly JobRequirementsManager _jobRequirementsManager = default!; + private ISawmill _sawmill = Logger.GetSawmill("PlaytimeStatsWindow"); + private readonly Color _altColor = Color.FromHex("#292B38"); + private readonly Color _defaultColor = Color.FromHex("#2F2F3B"); + private bool _useAltColor; + + public PlaytimeStatsWindow() + { + IoCManager.InjectDependencies(this); + RobustXamlLoader.Load(this); + + PopulatePlaytimeHeader(); + PopulatePlaytimeData(); + } + + private void PopulatePlaytimeHeader() + { + var header = new PlaytimeStatsHeader(); + header.OnHeaderClicked += HeaderClicked; + header.BackgroundColorPlaytimePanel.PanelOverride = new StyleBoxFlat(_altColor); + RolesPlaytimeList.AddChild(header); + } + + private void HeaderClicked(PlaytimeStatsHeader.Header header, PlaytimeStatsHeader.SortDirection direction) + { + switch (header) + { + case PlaytimeStatsHeader.Header.Role: + SortByRole(direction); + break; + case PlaytimeStatsHeader.Header.Playtime: + SortByPlaytime(direction); + break; + } + } + + private void SortByRole(PlaytimeStatsHeader.SortDirection direction) + { + var header = RolesPlaytimeList.GetChild(0) as PlaytimeStatsHeader; + + var entries = RolesPlaytimeList.Children.OfType().ToList(); + + RolesPlaytimeList.RemoveAllChildren(); + + if (header != null) + RolesPlaytimeList.AddChild(header); + + var sortedEntries = (direction == PlaytimeStatsHeader.SortDirection.Ascending) + ? entries.OrderBy(entry => entry.RoleText).ToList() + : entries.OrderByDescending(entry => entry.RoleText).ToList(); + + _useAltColor = false; + + foreach (var entry in sortedEntries) + { + var styleBox = new StyleBoxFlat { BackgroundColor = _useAltColor ? _altColor : _defaultColor }; + entry.UpdateShading(styleBox); + RolesPlaytimeList.AddChild(entry); + _useAltColor ^= true; + } + } + + private void SortByPlaytime(PlaytimeStatsHeader.SortDirection direction) + { + var header = RolesPlaytimeList.GetChild(0) as PlaytimeStatsHeader; + + var entries = RolesPlaytimeList.Children.OfType().ToList(); + + RolesPlaytimeList.RemoveAllChildren(); + + if (header != null) + RolesPlaytimeList.AddChild(header); + + var sortedEntries = (direction == PlaytimeStatsHeader.SortDirection.Ascending) + ? entries.OrderBy(entry => entry.Playtime).ToList() + : entries.OrderByDescending(entry => entry.Playtime).ToList(); + + _useAltColor = false; + + foreach (var entry in sortedEntries) + { + var styleBox = new StyleBoxFlat { BackgroundColor = _useAltColor ? _altColor : _defaultColor }; + entry.UpdateShading(styleBox); + RolesPlaytimeList.AddChild(entry); + _useAltColor ^= true; + } + } + + + private void PopulatePlaytimeData() + { + var overallPlaytime = _jobRequirementsManager.FetchOverallPlaytime(); + + var formattedPlaytime = ConvertTimeSpanToHoursMinutes(overallPlaytime); + OverallPlaytimeLabel.Text = Loc.GetString("ui-playtime-overall", ("time", formattedPlaytime)); + + var rolePlaytimes = _jobRequirementsManager.FetchPlaytimeByRoles(); + + RolesPlaytimeList.RemoveAllChildren(); + PopulatePlaytimeHeader(); + + foreach (var rolePlaytime in rolePlaytimes) + { + var role = rolePlaytime.Key; + var playtime = rolePlaytime.Value; + AddRolePlaytimeEntryToTable(Loc.GetString(role), playtime.ToString()); + } + } + + private void AddRolePlaytimeEntryToTable(string role, string playtimeString) + { + if (TimeSpan.TryParse(playtimeString, out var playtime)) + { + var entry = new PlaytimeStatsEntry(role, playtime, + new StyleBoxFlat(_useAltColor ? _altColor : _defaultColor)); + RolesPlaytimeList.AddChild(entry); + _useAltColor ^= true; + } + else + { + _sawmill.Error($"The provided playtime string '{playtimeString}' is not in the correct format."); + } + } + + private static string ConvertTimeSpanToHoursMinutes(TimeSpan timeSpan) + { + var hours = (int) timeSpan.TotalHours; + var minutes = timeSpan.Minutes; + + var formattedTimeLoc = Loc.GetString("ui-playtime-time-format", ("hours", hours), ("minutes", minutes)); + return formattedTimeLoc; + } +} diff --git a/Content.Client/Info/PlaytimeStats/PlaytimeStatsWindow.xaml b/Content.Client/Info/PlaytimeStats/PlaytimeStatsWindow.xaml new file mode 100644 index 0000000000..b38394d9a3 --- /dev/null +++ b/Content.Client/Info/PlaytimeStats/PlaytimeStatsWindow.xaml @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/Content.Client/Inventory/ClientInventorySystem.cs b/Content.Client/Inventory/ClientInventorySystem.cs index ffff392aa4..f0a12b3b1f 100644 --- a/Content.Client/Inventory/ClientInventorySystem.cs +++ b/Content.Client/Inventory/ClientInventorySystem.cs @@ -10,7 +10,6 @@ using Content.Shared.Inventory; using Content.Shared.Inventory.Events; using Content.Shared.Storage; using JetBrains.Annotations; -using Robust.Client.GameObjects; using Robust.Client.Player; using Robust.Client.UserInterface; using Robust.Shared.Containers; @@ -43,8 +42,8 @@ namespace Content.Client.Inventory UpdatesOutsidePrediction = true; base.Initialize(); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeLocalEvent(OnPlayerDetached); + SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerDetached); SubscribeLocalEvent(OnShutdown); @@ -113,12 +112,12 @@ namespace Content.Client.Inventory OnUnlinkInventory?.Invoke(); } - private void OnPlayerDetached(EntityUid uid, InventorySlotsComponent component, PlayerDetachedEvent args) + private void OnPlayerDetached(EntityUid uid, InventorySlotsComponent component, LocalPlayerDetachedEvent args) { OnUnlinkInventory?.Invoke(); } - private void OnPlayerAttached(EntityUid uid, InventorySlotsComponent component, PlayerAttachedEvent args) + private void OnPlayerAttached(EntityUid uid, InventorySlotsComponent component, LocalPlayerAttachedEvent args) { if (TryGetSlots(uid, out var definitions)) { diff --git a/Content.Client/Nyanotrasen/Overlays/DogVisionSystem.cs b/Content.Client/Nyanotrasen/Overlays/DogVisionSystem.cs index 8c252132a3..7cd0f69ae5 100644 --- a/Content.Client/Nyanotrasen/Overlays/DogVisionSystem.cs +++ b/Content.Client/Nyanotrasen/Overlays/DogVisionSystem.cs @@ -19,22 +19,17 @@ public sealed partial class DogVisionSystem : EntitySystem SubscribeLocalEvent(OnDogVisionInit); SubscribeLocalEvent(OnDogVisionShutdown); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeLocalEvent(OnPlayerDetached); + _player.LocalPlayerAttached += OnAttachedChanged; + _player.LocalPlayerDetached += OnAttachedChanged; _overlay = new(); } - private void OnPlayerAttached(EntityUid uid, DogVisionComponent component, PlayerAttachedEvent args) + private void OnAttachedChanged(EntityUid uid) { _overlayMan.AddOverlay(_overlay); } - private void OnPlayerDetached(EntityUid uid, DogVisionComponent component, PlayerDetachedEvent args) - { - _overlayMan.RemoveOverlay(_overlay); - } - private void OnDogVisionInit(EntityUid uid, DogVisionComponent component, ComponentInit args) { if (_player.LocalPlayer?.ControlledEntity == uid) diff --git a/Content.Client/Overlays/EquipmentHudSystem.cs b/Content.Client/Overlays/EquipmentHudSystem.cs index 1d5ec03291..ac618691d8 100644 --- a/Content.Client/Overlays/EquipmentHudSystem.cs +++ b/Content.Client/Overlays/EquipmentHudSystem.cs @@ -1,7 +1,6 @@ using Content.Shared.GameTicking; using Content.Shared.Inventory; using Content.Shared.Inventory.Events; -using Robust.Client.GameObjects; using Robust.Client.Player; namespace Content.Client.Overlays; @@ -24,8 +23,8 @@ public abstract class EquipmentHudSystem : EntitySystem where T : IComponent SubscribeLocalEvent(OnStartup); SubscribeLocalEvent(OnRemove); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeLocalEvent(OnPlayerDetached); + SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerDetached); SubscribeLocalEvent(OnCompEquip); SubscribeLocalEvent(OnCompUnequip); @@ -65,12 +64,12 @@ public abstract class EquipmentHudSystem : EntitySystem where T : IComponent RefreshOverlay(uid); } - private void OnPlayerAttached(PlayerAttachedEvent args) + private void OnPlayerAttached(LocalPlayerAttachedEvent args) { RefreshOverlay(args.Entity); } - private void OnPlayerDetached(PlayerDetachedEvent args) + private void OnPlayerDetached(LocalPlayerDetachedEvent args) { if (_player.LocalPlayer?.ControlledEntity == null) Deactivate(); diff --git a/Content.Client/Physics/Controllers/MoverController.cs b/Content.Client/Physics/Controllers/MoverController.cs index 54c5c3de15..52340b3391 100644 --- a/Content.Client/Physics/Controllers/MoverController.cs +++ b/Content.Client/Physics/Controllers/MoverController.cs @@ -1,7 +1,6 @@ using Content.Shared.Movement.Components; using Content.Shared.Movement.Systems; using Content.Shared.Pulling.Components; -using Robust.Client.GameObjects; using Robust.Client.Physics; using Robust.Client.Player; using Robust.Shared.Physics.Components; @@ -17,10 +16,10 @@ namespace Content.Client.Physics.Controllers public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnRelayPlayerAttached); - SubscribeLocalEvent(OnRelayPlayerDetached); - SubscribeLocalEvent(OnPlayerAttached); - SubscribeLocalEvent(OnPlayerDetached); + SubscribeLocalEvent(OnRelayPlayerAttached); + SubscribeLocalEvent(OnRelayPlayerDetached); + SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerDetached); SubscribeLocalEvent(OnUpdatePredicted); SubscribeLocalEvent(OnUpdateRelayTargetPredicted); @@ -54,7 +53,7 @@ namespace Content.Client.Physics.Controllers // What if the entity is being pulled by a vehicle controlled by the player? } - private void OnRelayPlayerAttached(EntityUid uid, RelayInputMoverComponent component, PlayerAttachedEvent args) + private void OnRelayPlayerAttached(EntityUid uid, RelayInputMoverComponent component, LocalPlayerAttachedEvent args) { Physics.UpdateIsPredicted(uid); Physics.UpdateIsPredicted(component.RelayEntity); @@ -62,7 +61,7 @@ namespace Content.Client.Physics.Controllers SetMoveInput(inputMover, MoveButtons.None); } - private void OnRelayPlayerDetached(EntityUid uid, RelayInputMoverComponent component, PlayerDetachedEvent args) + private void OnRelayPlayerDetached(EntityUid uid, RelayInputMoverComponent component, LocalPlayerDetachedEvent args) { Physics.UpdateIsPredicted(uid); Physics.UpdateIsPredicted(component.RelayEntity); @@ -70,12 +69,12 @@ namespace Content.Client.Physics.Controllers SetMoveInput(inputMover, MoveButtons.None); } - private void OnPlayerAttached(EntityUid uid, InputMoverComponent component, PlayerAttachedEvent args) + private void OnPlayerAttached(EntityUid uid, InputMoverComponent component, LocalPlayerAttachedEvent args) { SetMoveInput(component, MoveButtons.None); } - private void OnPlayerDetached(EntityUid uid, InputMoverComponent component, PlayerDetachedEvent args) + private void OnPlayerDetached(EntityUid uid, InputMoverComponent component, LocalPlayerDetachedEvent args) { SetMoveInput(component, MoveButtons.None); } diff --git a/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs b/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs index 0e559d0f8c..5027f77663 100644 --- a/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs +++ b/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs @@ -1,6 +1,4 @@ using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Text; using Content.Shared.CCVar; using Content.Shared.Players; using Content.Shared.Players.PlayTimeTracking; @@ -123,4 +121,24 @@ public sealed partial class JobRequirementsManager reason = reasons.Count == 0 ? null : FormattedMessage.FromMarkup(string.Join('\n', reasons)); return reason == null; } + + public TimeSpan FetchOverallPlaytime() + { + return _roles.TryGetValue("Overall", out var overallPlaytime) ? overallPlaytime : TimeSpan.Zero; + } + + public IEnumerable> FetchPlaytimeByRoles() + { + var jobsToMap = _prototypes.EnumeratePrototypes(); + + foreach (var job in jobsToMap) + { + if (_roles.TryGetValue(job.PlayTimeTracker, out var locJobName)) + { + yield return new KeyValuePair(job.Name, locJobName); + } + } + } + + } diff --git a/Content.Client/Players/PlayerSystem.cs b/Content.Client/Players/PlayerSystem.cs index d5ce4ec197..dba95ef7a6 100644 --- a/Content.Client/Players/PlayerSystem.cs +++ b/Content.Client/Players/PlayerSystem.cs @@ -1,11 +1,11 @@ using Content.Shared.Players; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Client.Players; public sealed class PlayerSystem : SharedPlayerSystem { - public override PlayerData? ContentData(ICommonSession? session) + public override ContentPlayerData? ContentData(ICommonSession? session) { return null; } diff --git a/Content.Client/Popups/PopupSystem.cs b/Content.Client/Popups/PopupSystem.cs index 1d4ca19ce2..d68272a107 100644 --- a/Content.Client/Popups/PopupSystem.cs +++ b/Content.Client/Popups/PopupSystem.cs @@ -9,7 +9,6 @@ using Robust.Client.UserInterface; using Robust.Shared.Configuration; using Robust.Shared.Map; using Robust.Shared.Player; -using Robust.Shared.Players; using Robust.Shared.Prototypes; using Robust.Shared.Replays; using Robust.Shared.Timing; diff --git a/Content.Client/Power/Generator/GeneratorWindow.xaml.cs b/Content.Client/Power/Generator/GeneratorWindow.xaml.cs index d3949807b7..0b8f94ceae 100644 --- a/Content.Client/Power/Generator/GeneratorWindow.xaml.cs +++ b/Content.Client/Power/Generator/GeneratorWindow.xaml.cs @@ -14,6 +14,7 @@ public sealed partial class GeneratorWindow : FancyWindow [Dependency] private readonly IEntityManager _entityManager = default!; [Dependency] private readonly ILocalizationManager _loc = default!; + private readonly SharedPowerSwitchableSystem _switchable; private readonly FuelGeneratorComponent? _component; private PortableGeneratorComponentBuiState? _lastState; @@ -24,6 +25,7 @@ public sealed partial class GeneratorWindow : FancyWindow IoCManager.InjectDependencies(this); _entityManager.TryGetComponent(entity, out _component); + _switchable = _entityManager.System(); EntityView.SetEntity(entity); TargetPower.IsValid += IsValid; @@ -99,17 +101,16 @@ public sealed partial class GeneratorWindow : FancyWindow StatusLabel.SetOnlyStyleClass("Danger"); } - var canSwitch = _entityManager.TryGetComponent(_entity, out PowerSwitchableGeneratorComponent? switchable); + var canSwitch = _entityManager.TryGetComponent(_entity, out PowerSwitchableComponent? switchable); OutputSwitchLabel.Visible = canSwitch; OutputSwitchButton.Visible = canSwitch; - if (canSwitch) + if (switchable != null) { - var isHV = switchable!.ActiveOutput == PowerSwitchableGeneratorOutput.HV; - OutputSwitchLabel.Text = - Loc.GetString(isHV ? "portable-generator-ui-switch-hv" : "portable-generator-ui-switch-mv"); - OutputSwitchButton.Text = - Loc.GetString(isHV ? "portable-generator-ui-switch-to-mv" : "portable-generator-ui-switch-to-hv"); + var voltage = _switchable.VoltageString(_switchable.GetVoltage(_entity, switchable)); + OutputSwitchLabel.Text = Loc.GetString("portable-generator-ui-current-output", ("voltage", voltage)); + var nextVoltage = _switchable.VoltageString(_switchable.GetNextVoltage(_entity, switchable)); + OutputSwitchButton.Text = Loc.GetString("power-switchable-switch-voltage", ("voltage", nextVoltage)); OutputSwitchButton.Disabled = state.On; } diff --git a/Content.Client/Power/Generator/PowerSwitchableSystem.cs b/Content.Client/Power/Generator/PowerSwitchableSystem.cs new file mode 100644 index 0000000000..b235dee77d --- /dev/null +++ b/Content.Client/Power/Generator/PowerSwitchableSystem.cs @@ -0,0 +1,7 @@ +using Content.Shared.Power.Generator; + +namespace Content.Client.Power.Generator; + +public sealed class PowerSwitchableSystem : SharedPowerSwitchableSystem +{ +} diff --git a/Content.Client/Preferences/UI/CharacterSetupGui.xaml b/Content.Client/Preferences/UI/CharacterSetupGui.xaml index 5db8610475..9a76029ce0 100644 --- a/Content.Client/Preferences/UI/CharacterSetupGui.xaml +++ b/Content.Client/Preferences/UI/CharacterSetupGui.xaml @@ -10,10 +10,13 @@ - public void Populate(List inventory, string? filter = null) + public void Populate(List inventory, out List filteredInventory, string? filter = null) { + filteredInventory = new(); + if (inventory.Count == 0) { VendingContents.Clear(); @@ -93,6 +93,7 @@ namespace Content.Client.VendingMachines.UI vendingItem.Text = $"{itemName} [{entry.Amount}]"; vendingItem.Icon = icon; + filteredInventory.Add(i); } SetSizeAfterUpdate(longestEntry.Length, inventory.Count); diff --git a/Content.Client/VendingMachines/VendingMachineBoundUserInterface.cs b/Content.Client/VendingMachines/VendingMachineBoundUserInterface.cs index ab310144d5..6f28ddb31f 100644 --- a/Content.Client/VendingMachines/VendingMachineBoundUserInterface.cs +++ b/Content.Client/VendingMachines/VendingMachineBoundUserInterface.cs @@ -1,6 +1,5 @@ using Content.Client.VendingMachines.UI; using Content.Shared.VendingMachines; -using Robust.Client.GameObjects; using Robust.Client.UserInterface.Controls; using System.Linq; @@ -14,6 +13,9 @@ namespace Content.Client.VendingMachines [ViewVariables] private List _cachedInventory = new(); + [ViewVariables] + private List _cachedFilteredIndex = new(); + public VendingMachineBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { } @@ -32,7 +34,7 @@ namespace Content.Client.VendingMachines _menu.OnItemSelected += OnItemSelected; _menu.OnSearchChanged += OnSearchChanged; - _menu.Populate(_cachedInventory); + _menu.Populate(_cachedInventory, out _cachedFilteredIndex); _menu.OpenCentered(); } @@ -46,7 +48,7 @@ namespace Content.Client.VendingMachines _cachedInventory = newState.Inventory; - _menu?.Populate(_cachedInventory); + _menu?.Populate(_cachedInventory, out _cachedFilteredIndex, _menu.SearchBar.Text); } private void OnItemSelected(ItemList.ItemListSelectedEventArgs args) @@ -54,7 +56,7 @@ namespace Content.Client.VendingMachines if (_cachedInventory.Count == 0) return; - var selectedItem = _cachedInventory.ElementAtOrDefault(args.ItemIndex); + var selectedItem = _cachedInventory.ElementAtOrDefault(_cachedFilteredIndex.ElementAtOrDefault(args.ItemIndex)); if (selectedItem == null) return; @@ -78,7 +80,7 @@ namespace Content.Client.VendingMachines private void OnSearchChanged(string? filter) { - _menu?.Populate(_cachedInventory, filter); + _menu?.Populate(_cachedInventory, out _cachedFilteredIndex, filter); } } } diff --git a/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs b/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs index 397032cd15..2d2883d8b7 100644 --- a/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs +++ b/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs @@ -16,7 +16,8 @@ using Robust.Client.State; using Robust.Shared.Input; using Robust.Shared.Map; using Robust.Shared.Player; -using Robust.Shared.Players; +using Robust.Shared.Prototypes; +using Robust.Shared.Timing; namespace Content.Client.Weapons.Melee; diff --git a/Content.IntegrationTests/Pair/TestPair.cs b/Content.IntegrationTests/Pair/TestPair.cs index 2971573ff2..2672b4db56 100644 --- a/Content.IntegrationTests/Pair/TestPair.cs +++ b/Content.IntegrationTests/Pair/TestPair.cs @@ -3,13 +3,11 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Content.Server.GameTicking; -using Content.Server.Players; -using Content.Shared.Mind; using Content.Shared.Players; -using Robust.Server.Player; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Timing; using Robust.UnitTesting; @@ -30,8 +28,8 @@ public sealed partial class TestPair public RobustIntegrationTest.ServerIntegrationInstance Server { get; private set; } = default!; public RobustIntegrationTest.ClientIntegrationInstance Client { get; private set; } = default!; - public IPlayerSession? Player => (IPlayerSession?) Server.PlayerMan.Sessions.FirstOrDefault(); - public PlayerData? PlayerData => Player?.Data.ContentData(); + public ICommonSession? Player => Server.PlayerMan.Sessions.FirstOrDefault(); + public ContentPlayerData? PlayerData => Player?.Data.ContentData(); public PoolTestLogHandler ServerLogHandler { get; private set; } = default!; public PoolTestLogHandler ClientLogHandler { get; private set; } = default!; diff --git a/Content.IntegrationTests/Tests/Actions/ActionsAddedTest.cs b/Content.IntegrationTests/Tests/Actions/ActionsAddedTest.cs index 01f8bdd938..01daeea93c 100644 --- a/Content.IntegrationTests/Tests/Actions/ActionsAddedTest.cs +++ b/Content.IntegrationTests/Tests/Actions/ActionsAddedTest.cs @@ -3,8 +3,6 @@ using Content.Shared.Actions; using Content.Shared.CombatMode; using Robust.Server.Player; using Robust.Shared.GameObjects; -using Robust.Shared.Players; -using PlayerManager = Robust.Client.Player.PlayerManager; namespace Content.IntegrationTests.Tests.Actions; @@ -26,7 +24,7 @@ public sealed class ActionsAddedTest var sEntMan = server.ResolveDependency(); var cEntMan = client.ResolveDependency(); var clientSession = client.ResolveDependency().LocalPlayer?.Session; - var serverSession = server.ResolveDependency().ServerSessions.Single(); + var serverSession = server.ResolveDependency().Sessions.Single(); var sActionSystem = server.System(); var cActionSystem = client.System(); diff --git a/Content.IntegrationTests/Tests/Administration/Logs/AddTests.cs b/Content.IntegrationTests/Tests/Administration/Logs/AddTests.cs index 6562a26b5e..98c7363a6c 100644 --- a/Content.IntegrationTests/Tests/Administration/Logs/AddTests.cs +++ b/Content.IntegrationTests/Tests/Administration/Logs/AddTests.cs @@ -7,8 +7,6 @@ using Content.Shared.Administration.Logs; using Content.Shared.Database; using Robust.Server.Player; using Robust.Shared.GameObjects; -using Robust.Shared.Map; -using Robust.Shared.Utility; namespace Content.IntegrationTests.Tests.Administration.Logs; @@ -177,7 +175,7 @@ public sealed class AddTests await server.WaitPost(() => { - var player = sPlayers.ServerSessions.First(); + var player = sPlayers.Sessions.First(); playerGuid = player.UserId; Assert.DoesNotThrow(() => @@ -280,7 +278,7 @@ public sealed class AddTests await server.WaitPost(() => { - var player = sPlayers.ServerSessions.Single(); + var player = sPlayers.Sessions.Single(); sAdminLogSystem.Add(LogType.Unknown, $"{player} {player} test log: {guid}"); }); @@ -318,7 +316,7 @@ public sealed class AddTests await server.WaitPost(() => { - var player = sPlayers.ServerSessions.Single(); + var player = sPlayers.Sessions.Single(); sAdminLogSystem.Add(LogType.Unknown, $"{player:first} {player:second} test log: {guid}"); }); diff --git a/Content.IntegrationTests/Tests/Administration/Logs/QueryTests.cs b/Content.IntegrationTests/Tests/Administration/Logs/QueryTests.cs index 1155edfad2..5a58757d53 100644 --- a/Content.IntegrationTests/Tests/Administration/Logs/QueryTests.cs +++ b/Content.IntegrationTests/Tests/Administration/Logs/QueryTests.cs @@ -5,6 +5,7 @@ using Content.Server.GameTicking; using Content.Shared.Database; using Robust.Server.Player; using Robust.Shared.GameObjects; +using Robust.Shared.Player; namespace Content.IntegrationTests.Tests.Administration.Logs; @@ -27,11 +28,11 @@ public sealed class QueryTests var date = DateTime.UtcNow; var guid = Guid.NewGuid(); - IPlayerSession player = default; + ICommonSession player = default; await server.WaitPost(() => { - player = sPlayers.ServerSessions.First(); + player = sPlayers.Sessions.First(); sAdminLogSystem.Add(LogType.Unknown, $"{player.AttachedEntity:Entity} test log: {guid}"); }); diff --git a/Content.IntegrationTests/Tests/CargoTest.cs b/Content.IntegrationTests/Tests/CargoTest.cs index 0b9de6993e..66135279d5 100644 --- a/Content.IntegrationTests/Tests/CargoTest.cs +++ b/Content.IntegrationTests/Tests/CargoTest.cs @@ -49,7 +49,7 @@ public sealed class CargoTest await pair.CleanReturnAsync(); } [Test] - public async Task NoCargoBountyArbitageTest() + public async Task NoCargoBountyArbitrageTest() { await using var pair = await PoolManager.GetServerClient(); var server = pair.Server; diff --git a/Content.IntegrationTests/Tests/Cleanup/EuiManagerTest.cs b/Content.IntegrationTests/Tests/Cleanup/EuiManagerTest.cs index 9aac4e2892..e2bff03501 100644 --- a/Content.IntegrationTests/Tests/Cleanup/EuiManagerTest.cs +++ b/Content.IntegrationTests/Tests/Cleanup/EuiManagerTest.cs @@ -25,7 +25,7 @@ public sealed class EuiManagerTest await server.WaitAssertion(() => { - var clientSession = sPlayerManager.ServerSessions.Single(); + var clientSession = sPlayerManager.Sessions.Single(); var ui = new AdminAnnounceEui(); eui.OpenEui(ui, clientSession); }); diff --git a/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs b/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs index b4b6c2239f..df77410e54 100644 --- a/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs +++ b/Content.IntegrationTests/Tests/Interaction/InteractionTest.cs @@ -14,6 +14,7 @@ using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; using Content.Shared.Interaction; using Content.Shared.Mind; +using Content.Shared.Players; using Robust.Client.Input; using Robust.Client.UserInterface; using Robust.Server.GameObjects; @@ -21,7 +22,7 @@ using Robust.Server.Player; using Robust.Shared.GameObjects; using Robust.Shared.Log; using Robust.Shared.Map; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Timing; using Robust.UnitTesting; @@ -67,7 +68,7 @@ public abstract partial class InteractionTest protected NetEntity Player; protected ICommonSession ClientSession = default!; - protected IPlayerSession ServerSession = default!; + protected ICommonSession ServerSession = default!; public EntityUid? ClientTarget; diff --git a/Content.IntegrationTests/Tests/Minds/GhostRoleTests.cs b/Content.IntegrationTests/Tests/Minds/GhostRoleTests.cs index 28e49645c9..22a185798e 100644 --- a/Content.IntegrationTests/Tests/Minds/GhostRoleTests.cs +++ b/Content.IntegrationTests/Tests/Minds/GhostRoleTests.cs @@ -5,6 +5,7 @@ using Content.Server.Ghost.Roles.Components; using Content.Server.Players; using Content.Shared.Ghost; using Content.Shared.Mind; +using Content.Shared.Players; using Robust.Shared.Console; using Robust.Shared.GameObjects; using Robust.Shared.Map; @@ -43,7 +44,7 @@ public sealed class GhostRoleTests var sPlayerMan = server.ResolveDependency(); var conHost = client.ResolveDependency(); var mindSystem = entMan.System(); - var session = sPlayerMan.ServerSessions.Single(); + var session = sPlayerMan.Sessions.Single(); var originalMindId = session.ContentData()!.Mind!.Value; // Spawn player entity & attach diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs b/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs index 9fc68ef93d..a67a45ecb4 100644 --- a/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs +++ b/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs @@ -2,6 +2,7 @@ using System.Linq; using Content.Server.Players; using Content.Shared.Ghost; using Content.Shared.Mind; +using Content.Shared.Players; using Robust.Server.Console; using Robust.Server.GameObjects; using Robust.Server.Player; @@ -35,7 +36,7 @@ public sealed partial class MindTests MindComponent mind = default!; await server.WaitAssertion(() => { - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); playerEnt = entMan.SpawnEntity(null, MapCoordinates.Nullspace); visitEnt = entMan.SpawnEntity(null, MapCoordinates.Nullspace); @@ -81,7 +82,7 @@ public sealed partial class MindTests var entMan = server.ResolveDependency(); var mapManager = server.ResolveDependency(); var playerMan = server.ResolveDependency(); - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); var mindSystem = entMan.EntitySysManager.GetEntitySystem(); @@ -128,7 +129,7 @@ public sealed partial class MindTests var entMan = server.ResolveDependency(); var playerMan = server.ResolveDependency(); - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); Assert.That(!entMan.HasComponent(player.AttachedEntity), "Player was initially a ghost?"); @@ -162,7 +163,7 @@ public sealed partial class MindTests var mindSystem = entMan.EntitySysManager.GetEntitySystem(); var mind = GetMind(pair); - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); #pragma warning disable NUnit2045 // Interdependent assertions. Assert.That(player.AttachedEntity, Is.Not.Null); Assert.That(entMan.EntityExists(player.AttachedEntity)); @@ -218,7 +219,7 @@ public sealed partial class MindTests var playerMan = server.ResolveDependency(); var serverConsole = server.ResolveDependency(); - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); var ghost = await BecomeGhost(pair); @@ -263,7 +264,7 @@ public sealed partial class MindTests var playerMan = server.ResolveDependency(); var serverConsole = server.ResolveDependency(); - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); EntityUid ghost = default!; diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs b/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs index f71a6ad5f9..d6b30d60a0 100644 --- a/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs +++ b/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs @@ -1,14 +1,17 @@ using System.Linq; using Content.IntegrationTests.Pair; +using Content.Server.Mind; using Content.Server.Players; using Content.Shared.Ghost; using Content.Shared.Mind; +using Content.Shared.Players; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Enums; using Robust.Shared.GameObjects; using Robust.Shared.Map; using Robust.Shared.Network; +using Robust.Shared.Player; namespace Content.IntegrationTests.Tests.Minds; @@ -36,7 +39,7 @@ public sealed partial class MindTests var playerMan = pair.Server.ResolveDependency(); var mindSys = entMan.System(); - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); EntityUid entity = default; EntityUid mindId = default!; @@ -71,7 +74,7 @@ public sealed partial class MindTests EntityUid mindId = default!; MindComponent mind = default!; - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); await pair.Server.WaitAssertion(() => { var oldUid = player.AttachedEntity; @@ -116,20 +119,25 @@ public sealed partial class MindTests /// private static (EntityUid Id, MindComponent Comp) GetMind(Pair.TestPair pair) { - var playerMan = pair.Server.ResolveDependency(); - var entMan = pair.Server.ResolveDependency(); - var player = playerMan.ServerSessions.SingleOrDefault(); + var playerMan = pair.Server.PlayerMan; + var entMan = pair.Server.EntMan; + var player = playerMan.Sessions.SingleOrDefault(); Assert.That(player, Is.Not.Null); var mindId = player.ContentData()!.Mind!.Value; Assert.That(mindId, Is.Not.EqualTo(default(EntityUid))); var mind = entMan.GetComponent(mindId); + ActorComponent actor = default!; Assert.Multiple(() => { + Assert.That(player, Is.EqualTo(mind.Session), "Player session does not match mind session"); + Assert.That(entMan.System().GetMind(player.UserId), Is.EqualTo(mindId)); Assert.That(player.AttachedEntity, Is.EqualTo(mind.CurrentEntity), "Player is not attached to the mind's current entity."); Assert.That(entMan.EntityExists(mind.OwnedEntity), "The mind's current entity does not exist"); Assert.That(mind.VisitingEntity == null || entMan.EntityExists(mind.VisitingEntity), "The minds visited entity does not exist."); + Assert.That(entMan.TryGetComponent(mind.CurrentEntity, out actor)); }); + Assert.That(actor.PlayerSession, Is.EqualTo(mind.Session)); return (mindId, mind); } @@ -139,7 +147,7 @@ public sealed partial class MindTests var netManager = pair.Client.ResolveDependency(); var playerMan = pair.Server.ResolveDependency(); var entMan = pair.Server.ResolveDependency(); - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); var mindId = player.ContentData()!.Mind!.Value; var mind = entMan.GetComponent(mindId); @@ -161,21 +169,21 @@ public sealed partial class MindTests { var netManager = pair.Client.ResolveDependency(); var playerMan = pair.Server.ResolveDependency(); - Assert.That(!playerMan.ServerSessions.Any()); + Assert.That(!playerMan.Sessions.Any()); await Task.WhenAll(pair.Client.WaitIdleAsync(), pair.Client.WaitIdleAsync()); pair.Client.SetConnectTarget(pair.Server); await pair.Client.WaitPost(() => netManager.ClientConnect(null!, 0, username)); await pair.RunTicksSync(5); - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); Assert.That(player.Status, Is.EqualTo(SessionStatus.InGame)); } - private static async Task DisconnectReconnect(Pair.TestPair pair) + private static async Task DisconnectReconnect(Pair.TestPair pair) { var playerMan = pair.Server.ResolveDependency(); - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); var name = player.Name; var id = player.UserId; @@ -183,7 +191,7 @@ public sealed partial class MindTests await Connect(pair, name); // Session has changed - var newSession = playerMan.ServerSessions.Single(); + var newSession = playerMan.Sessions.Single(); Assert.Multiple(() => { Assert.That(newSession, Is.Not.EqualTo(player)); diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.ReconnectTests.cs b/Content.IntegrationTests/Tests/Minds/MindTests.ReconnectTests.cs index ea2110c03a..3cac766825 100644 --- a/Content.IntegrationTests/Tests/Minds/MindTests.ReconnectTests.cs +++ b/Content.IntegrationTests/Tests/Minds/MindTests.ReconnectTests.cs @@ -1,6 +1,8 @@ using System.Linq; using Content.Shared.Ghost; using Content.Shared.Mind; +using NUnit.Framework.Interfaces; +using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.GameObjects; using Robust.Shared.Map; @@ -49,7 +51,7 @@ public sealed partial class MindTests var mind = GetMind(pair); var playerMan = pair.Server.ResolveDependency(); - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); var name = player.Name; var user = player.UserId; Assert.That(mind.Comp.OwnedEntity, Is.Not.Null); @@ -72,7 +74,7 @@ public sealed partial class MindTests // Reconnect await Connect(pair, name); - player = playerMan.ServerSessions.Single(); + player = playerMan.Sessions.Single(); Assert.Multiple(() => { Assert.That(user, Is.EqualTo(player.UserId)); @@ -127,8 +129,10 @@ public sealed partial class MindTests var mindSys = entMan.System(); var mind = GetMind(pair); + Assert.Null(mind.Comp.VisitingEntity); + // Make player visit a new mob - var original = mind.Comp.CurrentEntity; + var original = mind.Comp.OwnedEntity; EntityUid visiting = default; await pair.Server.WaitAssertion(() => { @@ -137,6 +141,7 @@ public sealed partial class MindTests }); await pair.RunTicksSync(5); + Assert.That(mind.Comp.VisitingEntity, Is.EqualTo(visiting)); await DisconnectReconnect(pair); // Player is back in control of the visited mob, mind was preserved @@ -150,4 +155,32 @@ public sealed partial class MindTests await pair.CleanReturnAsync(); } + + // This test will do the following + // - connect as a normal player + // - disconnect + // - reconnect + // - assert that they return to the original entity. + [Test] + public async Task TestReconnect() + { + await using var pair = await SetupPair(); + var mind = GetMind(pair); + + Assert.Null(mind.Comp.VisitingEntity); + Assert.NotNull(mind.Comp.OwnedEntity); + var entity = mind.Comp.OwnedEntity; + + await pair.RunTicksSync(5); + await DisconnectReconnect(pair); + await pair.RunTicksSync(5); + + var newMind = GetMind(pair); + + Assert.Null(newMind.Comp.VisitingEntity); + Assert.That(newMind.Comp.OwnedEntity, Is.EqualTo(entity)); + Assert.That(newMind.Id, Is.EqualTo(mind.Id)); + + await pair.CleanReturnAsync(); + } } diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.cs b/Content.IntegrationTests/Tests/Minds/MindTests.cs index 3ad61bcdf0..c9788b80a6 100644 --- a/Content.IntegrationTests/Tests/Minds/MindTests.cs +++ b/Content.IntegrationTests/Tests/Minds/MindTests.cs @@ -11,6 +11,7 @@ using Content.Shared.Damage.Prototypes; using Content.Shared.FixedPoint; using Content.Shared.Mind; using Content.Shared.Mind.Components; +using Content.Shared.Players; using Content.Shared.Roles; using Content.Shared.Roles.Jobs; using Robust.Server.Console; @@ -345,7 +346,7 @@ public sealed partial class MindTests EntityUid entity = default!; EntityUid mindId = default!; MindComponent mind = default!; - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); await server.WaitAssertion(() => { @@ -406,12 +407,6 @@ public sealed partial class MindTests await pair.CleanReturnAsync(); } - // TODO Implement - /*[Test] - public async Task TestPlayerCanReturnFromGhostWhenDead() - { - }*/ - [Test] public async Task TestGhostDoesNotInfiniteLoop() { @@ -432,7 +427,7 @@ public sealed partial class MindTests EntityUid ghost = default!; EntityUid mindId = default!; MindComponent mind = default!; - var player = playerMan.ServerSessions.Single(); + var player = playerMan.Sessions.Single(); await server.WaitAssertion(() => { diff --git a/Content.IntegrationTests/Tests/Toolshed/ToolshedTest.cs b/Content.IntegrationTests/Tests/Toolshed/ToolshedTest.cs index ca7eeac199..d6aec781a9 100644 --- a/Content.IntegrationTests/Tests/Toolshed/ToolshedTest.cs +++ b/Content.IntegrationTests/Tests/Toolshed/ToolshedTest.cs @@ -2,8 +2,7 @@ using System.Collections.Generic; using Content.IntegrationTests.Pair; using Content.Server.Administration.Managers; -using Robust.Server.Player; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Toolshed; using Robust.Shared.Toolshed.Errors; using Robust.Shared.Toolshed.Syntax; @@ -60,7 +59,7 @@ public abstract class ToolshedTest : IInvocationContext AdminManager = Server.ResolveDependency(); } - protected bool InvokeCommand(string command, out object? result, IPlayerSession? session = null) + protected bool InvokeCommand(string command, out object? result, ICommonSession? session = null) { return Toolshed.InvokeCommand(this, command, null, out result); } @@ -95,7 +94,7 @@ public abstract class ToolshedTest : IInvocationContext return true; } - protected IPlayerSession? InvocationSession { get; set; } + protected ICommonSession? InvocationSession { get; set; } public ICommonSession? Session { diff --git a/Content.MapRenderer/Painters/MapPainter.cs b/Content.MapRenderer/Painters/MapPainter.cs index b799db78a5..8f3dd59baf 100644 --- a/Content.MapRenderer/Painters/MapPainter.cs +++ b/Content.MapRenderer/Painters/MapPainter.cs @@ -68,7 +68,7 @@ namespace Content.MapRenderer.Painters await server.WaitPost(() => { - var playerEntity = sPlayerManager.ServerSessions.Single().AttachedEntity; + var playerEntity = sPlayerManager.Sessions.Single().AttachedEntity; if (playerEntity.HasValue) { diff --git a/Content.PatreonParser/Program.cs b/Content.PatreonParser/Program.cs index 60a320006f..ff6646eda3 100644 --- a/Content.PatreonParser/Program.cs +++ b/Content.PatreonParser/Program.cs @@ -80,7 +80,7 @@ foreach (var record in reader.GetRecords()) var tier = tiers[0]; var tierName = content.Included.SingleOrDefault(i => i.Id == tier.Id && i.Type == tier.Type)?.Attributes.Title; - if (tierName == null) + if (tierName == null || tierName == "Free") continue; if (record.Trigger == "members:delete") diff --git a/Content.Server/Access/Systems/AccessOverriderSystem.cs b/Content.Server/Access/Systems/AccessOverriderSystem.cs index 3ec767c200..147ac70a6d 100644 --- a/Content.Server/Access/Systems/AccessOverriderSystem.cs +++ b/Content.Server/Access/Systems/AccessOverriderSystem.cs @@ -9,6 +9,7 @@ using Content.Shared.Interaction; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Containers; +using Robust.Shared.Player; using static Content.Shared.Access.Components.AccessOverriderComponent; namespace Content.Server.Access.Systems; diff --git a/Content.Server/Administration/AdminPermsChangedEventArgs.cs b/Content.Server/Administration/AdminPermsChangedEventArgs.cs index 24ca7aca68..07eb416be6 100644 --- a/Content.Server/Administration/AdminPermsChangedEventArgs.cs +++ b/Content.Server/Administration/AdminPermsChangedEventArgs.cs @@ -1,5 +1,5 @@ using Content.Shared.Administration; -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Administration { @@ -8,7 +8,7 @@ namespace Content.Server.Administration /// public sealed class AdminPermsChangedEventArgs : EventArgs { - public AdminPermsChangedEventArgs(IPlayerSession player, AdminFlags? flags) + public AdminPermsChangedEventArgs(ICommonSession player, AdminFlags? flags) { Player = player; Flags = flags; @@ -17,7 +17,7 @@ namespace Content.Server.Administration /// /// The player that had their admin permissions changed. /// - public IPlayerSession Player { get; } + public ICommonSession Player { get; } /// /// The admin flags of the player. Null if the player is no longer an admin. diff --git a/Content.Server/Administration/Commands/AGhost.cs b/Content.Server/Administration/Commands/AGhost.cs index 42a8600ff1..2d1a15a0be 100644 --- a/Content.Server/Administration/Commands/AGhost.cs +++ b/Content.Server/Administration/Commands/AGhost.cs @@ -2,7 +2,6 @@ using Content.Shared.Administration; using Content.Shared.Ghost; using Content.Shared.Mind; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Administration.Commands @@ -18,7 +17,7 @@ namespace Content.Server.Administration.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("Nah"); diff --git a/Content.Server/Administration/Commands/AdminWhoCommand.cs b/Content.Server/Administration/Commands/AdminWhoCommand.cs index 8e6c402c4e..9765e8385f 100644 --- a/Content.Server/Administration/Commands/AdminWhoCommand.cs +++ b/Content.Server/Administration/Commands/AdminWhoCommand.cs @@ -2,7 +2,6 @@ using Content.Server.Administration.Managers; using Content.Server.Afk; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Utility; @@ -35,7 +34,7 @@ public sealed class AdminWhoCommand : IConsoleCommand if (adminData.Title is { } title) sb.Append($": [{title}]"); - if (shell.Player is IPlayerSession player && adminMgr.HasAdminFlag(player, AdminFlags.Admin)) + if (shell.Player is { } player && adminMgr.HasAdminFlag(player, AdminFlags.Admin)) { if (afk.IsAfk(admin)) sb.Append(" [AFK]"); diff --git a/Content.Server/Administration/Commands/AnnounceUiCommand.cs b/Content.Server/Administration/Commands/AnnounceUiCommand.cs index c4cd7f13e4..d80db96686 100644 --- a/Content.Server/Administration/Commands/AnnounceUiCommand.cs +++ b/Content.Server/Administration/Commands/AnnounceUiCommand.cs @@ -1,7 +1,6 @@ using Content.Server.Administration.UI; using Content.Server.EUI; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Administration.Commands @@ -17,7 +16,7 @@ namespace Content.Server.Administration.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("This does not work from the server console."); diff --git a/Content.Server/Administration/Commands/BanCommand.cs b/Content.Server/Administration/Commands/BanCommand.cs index 58a801e410..156fdf496a 100644 --- a/Content.Server/Administration/Commands/BanCommand.cs +++ b/Content.Server/Administration/Commands/BanCommand.cs @@ -1,15 +1,8 @@ using System.Linq; -using System.Net; -using System.Net.Sockets; -using System.Text; using Content.Server.Administration.Managers; -using Content.Server.Administration.Notes; -using Content.Server.Database; -using Content.Server.GameTicking; using Content.Shared.Administration; using Content.Shared.CCVar; using Content.Shared.Database; -using Content.Shared.Players.PlayTimeTracking; using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Console; @@ -84,7 +77,7 @@ public sealed class BanCommand : LocalizedCommands } var located = await _locator.LookupIdByNameOrIdAsync(target); - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (located == null) { @@ -102,7 +95,7 @@ public sealed class BanCommand : LocalizedCommands { if (args.Length == 1) { - var options = _playerManager.ServerSessions.Select(c => c.Name).OrderBy(c => c).ToArray(); + var options = _playerManager.Sessions.Select(c => c.Name).OrderBy(c => c).ToArray(); return CompletionResult.FromHintOptions(options, LocalizationManager.GetString("cmd-ban-hint")); } diff --git a/Content.Server/Administration/Commands/BanListCommand.cs b/Content.Server/Administration/Commands/BanListCommand.cs index 1c2be52394..a5bc97dce3 100644 --- a/Content.Server/Administration/Commands/BanListCommand.cs +++ b/Content.Server/Administration/Commands/BanListCommand.cs @@ -36,7 +36,7 @@ public sealed class BanListCommand : LocalizedCommands return; } - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { var bans = await _dbManager.GetServerBansAsync(data.LastAddress, data.UserId, data.LastHWId, false); @@ -67,7 +67,7 @@ public sealed class BanListCommand : LocalizedCommands return CompletionResult.Empty; var playerMgr = IoCManager.Resolve(); - var options = playerMgr.ServerSessions.Select(c => c.Name).OrderBy(c => c).ToArray(); + var options = playerMgr.Sessions.Select(c => c.Name).OrderBy(c => c).ToArray(); return CompletionResult.FromHintOptions(options, Loc.GetString("cmd-banlist-hint")); } } diff --git a/Content.Server/Administration/Commands/BanPanelCommand.cs b/Content.Server/Administration/Commands/BanPanelCommand.cs index 6036e5aa6e..9f9ec9e89f 100644 --- a/Content.Server/Administration/Commands/BanPanelCommand.cs +++ b/Content.Server/Administration/Commands/BanPanelCommand.cs @@ -1,12 +1,6 @@ using Content.Shared.Administration; using Robust.Shared.Console; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Content.Server.EUI; -using Robust.Server.Player; namespace Content.Server.Administration.Commands; @@ -21,7 +15,7 @@ public sealed class BanPanelCommand : LocalizedCommands public override async void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError(Loc.GetString("cmd-banpanel-server")); return; diff --git a/Content.Server/Administration/Commands/ControlMob.cs b/Content.Server/Administration/Commands/ControlMob.cs index 8fc74c61d4..317461a373 100644 --- a/Content.Server/Administration/Commands/ControlMob.cs +++ b/Content.Server/Administration/Commands/ControlMob.cs @@ -1,6 +1,5 @@ using Content.Server.Mind; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Administration.Commands @@ -16,7 +15,7 @@ namespace Content.Server.Administration.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteLine("shell-server-cannot"); return; diff --git a/Content.Server/Administration/Commands/DSay.cs b/Content.Server/Administration/Commands/DSay.cs index 79b0e8db7d..61b47d7856 100644 --- a/Content.Server/Administration/Commands/DSay.cs +++ b/Content.Server/Administration/Commands/DSay.cs @@ -1,7 +1,5 @@ -using Content.Server.Chat; using Content.Server.Chat.Systems; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Administration.Commands @@ -17,7 +15,7 @@ namespace Content.Server.Administration.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("shell-only-players-can-run-this-command"); diff --git a/Content.Server/Administration/Commands/DeAdminCommand.cs b/Content.Server/Administration/Commands/DeAdminCommand.cs index c2bbfa7a33..cf65941200 100644 --- a/Content.Server/Administration/Commands/DeAdminCommand.cs +++ b/Content.Server/Administration/Commands/DeAdminCommand.cs @@ -1,10 +1,8 @@ using Content.Server.Administration.Managers; using Content.Shared.Administration; using JetBrains.Annotations; -using Robust.Server.Player; using Robust.Shared.Console; - namespace Content.Server.Administration.Commands { [UsedImplicitly] @@ -17,7 +15,7 @@ namespace Content.Server.Administration.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("You cannot use this command from the server console."); diff --git a/Content.Server/Administration/Commands/ExplosionCommand.cs b/Content.Server/Administration/Commands/ExplosionCommand.cs index d48b69a5ad..56ed78b2e2 100644 --- a/Content.Server/Administration/Commands/ExplosionCommand.cs +++ b/Content.Server/Administration/Commands/ExplosionCommand.cs @@ -3,7 +3,6 @@ using Content.Server.EUI; using Content.Server.Explosion.EntitySystems; using Content.Shared.Administration; using Content.Shared.Explosion; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Map; using Robust.Shared.Prototypes; @@ -21,7 +20,7 @@ public sealed class OpenExplosionEui : IConsoleCommand public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteError("This does not work from the server console."); diff --git a/Content.Server/Administration/Commands/FaxUiCommand.cs b/Content.Server/Administration/Commands/FaxUiCommand.cs index b06d36d08b..cf9e97e399 100644 --- a/Content.Server/Administration/Commands/FaxUiCommand.cs +++ b/Content.Server/Administration/Commands/FaxUiCommand.cs @@ -1,7 +1,6 @@ using Content.Server.EUI; using Content.Server.Fax.AdminUI; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Administration.Commands; @@ -16,7 +15,7 @@ public sealed class FaxUiCommand : IConsoleCommand public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("shell-only-players-can-run-this-command"); diff --git a/Content.Server/Administration/Commands/OpenAdminLogsCommand.cs b/Content.Server/Administration/Commands/OpenAdminLogsCommand.cs index 9f28dc907c..47ff3e1a1c 100644 --- a/Content.Server/Administration/Commands/OpenAdminLogsCommand.cs +++ b/Content.Server/Administration/Commands/OpenAdminLogsCommand.cs @@ -1,7 +1,6 @@ using Content.Server.Administration.Logs; using Content.Server.EUI; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Administration.Commands; @@ -15,7 +14,7 @@ public sealed class OpenAdminLogsCommand : IConsoleCommand public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteLine("This does not work from the server console."); return; diff --git a/Content.Server/Administration/Commands/OpenAdminNotesCommand.cs b/Content.Server/Administration/Commands/OpenAdminNotesCommand.cs index 147c0d6a82..e6ae4f7616 100644 --- a/Content.Server/Administration/Commands/OpenAdminNotesCommand.cs +++ b/Content.Server/Administration/Commands/OpenAdminNotesCommand.cs @@ -1,7 +1,5 @@ using Content.Server.Administration.Notes; -using Content.Server.Database; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Administration.Commands; @@ -17,7 +15,7 @@ public sealed class OpenAdminNotesCommand : IConsoleCommand public async void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError("This does not work from the server console."); return; diff --git a/Content.Server/Administration/Commands/OpenPermissionsCommand.cs b/Content.Server/Administration/Commands/OpenPermissionsCommand.cs index 78d56cb4fb..fd3227d4aa 100644 --- a/Content.Server/Administration/Commands/OpenPermissionsCommand.cs +++ b/Content.Server/Administration/Commands/OpenPermissionsCommand.cs @@ -1,10 +1,8 @@ using Content.Server.Administration.UI; using Content.Server.EUI; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; - namespace Content.Server.Administration.Commands { [AdminCommand(AdminFlags.Permissions)] @@ -16,7 +14,7 @@ namespace Content.Server.Administration.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("This does not work from the server console."); diff --git a/Content.Server/Administration/Commands/OpenUserVisibleNotesCommand.cs b/Content.Server/Administration/Commands/OpenUserVisibleNotesCommand.cs index d61114fcae..507c7ab279 100644 --- a/Content.Server/Administration/Commands/OpenUserVisibleNotesCommand.cs +++ b/Content.Server/Administration/Commands/OpenUserVisibleNotesCommand.cs @@ -1,7 +1,6 @@ using Content.Server.Administration.Notes; using Content.Shared.Administration; using Content.Shared.CCVar; -using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Console; @@ -27,7 +26,7 @@ public sealed class OpenUserVisibleNotesCommand : IConsoleCommand return; } - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError("This does not work from the server console."); return; diff --git a/Content.Server/Administration/Commands/PardonCommand.cs b/Content.Server/Administration/Commands/PardonCommand.cs index 869024eb7c..9cbaaece31 100644 --- a/Content.Server/Administration/Commands/PardonCommand.cs +++ b/Content.Server/Administration/Commands/PardonCommand.cs @@ -1,7 +1,6 @@ using System.Text; using Content.Server.Database; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Administration.Commands @@ -15,7 +14,7 @@ namespace Content.Server.Administration.Commands public async void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; var dbMan = IoCManager.Resolve(); if (args.Length != 1) diff --git a/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs b/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs index ec5b21dcee..fdf067181d 100644 --- a/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs +++ b/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs @@ -6,7 +6,6 @@ using Robust.Shared.Audio; using Robust.Shared.Console; using Robust.Shared.ContentPack; using Robust.Shared.Player; -using Robust.Shared.Players; using Robust.Shared.Prototypes; namespace Content.Server.Administration.Commands; diff --git a/Content.Server/Administration/Commands/ReAdminCommand.cs b/Content.Server/Administration/Commands/ReAdminCommand.cs index 12ff13221a..a3f5993766 100644 --- a/Content.Server/Administration/Commands/ReAdminCommand.cs +++ b/Content.Server/Administration/Commands/ReAdminCommand.cs @@ -1,9 +1,7 @@ using Content.Server.Administration.Managers; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; - namespace Content.Server.Administration.Commands { [AnyCommand] @@ -15,7 +13,7 @@ namespace Content.Server.Administration.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("You cannot use this command from the server console."); diff --git a/Content.Server/Administration/Commands/SetAdminOOC.cs b/Content.Server/Administration/Commands/SetAdminOOC.cs index bb11b938d8..27528e1940 100644 --- a/Content.Server/Administration/Commands/SetAdminOOC.cs +++ b/Content.Server/Administration/Commands/SetAdminOOC.cs @@ -1,8 +1,6 @@ - using Content.Server.Database; using Content.Server.Preferences.Managers; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Administration.Commands @@ -16,7 +14,7 @@ namespace Content.Server.Administration.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (!(shell.Player is IPlayerSession)) + if (shell.Player == null) { shell.WriteError(Loc.GetString("shell-only-players-can-run-this-command")); return; diff --git a/Content.Server/Administration/Commands/SetMindCommand.cs b/Content.Server/Administration/Commands/SetMindCommand.cs index b9ff329ed2..5310c2dd7f 100644 --- a/Content.Server/Administration/Commands/SetMindCommand.cs +++ b/Content.Server/Administration/Commands/SetMindCommand.cs @@ -2,6 +2,7 @@ using Content.Server.Players; using Content.Shared.Administration; using Content.Shared.Mind; using Content.Shared.Mind.Components; +using Content.Shared.Players; using Robust.Server.Player; using Robust.Shared.Console; diff --git a/Content.Server/Administration/Commands/SetOutfitCommand.cs b/Content.Server/Administration/Commands/SetOutfitCommand.cs index 28172ee6c5..97c1fa0656 100644 --- a/Content.Server/Administration/Commands/SetOutfitCommand.cs +++ b/Content.Server/Administration/Commands/SetOutfitCommand.cs @@ -9,9 +9,8 @@ using Content.Shared.Inventory; using Content.Shared.PDA; using Content.Shared.Preferences; using Content.Shared.Roles; -using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Console; +using Robust.Shared.Player; using Robust.Shared.Prototypes; namespace Content.Server.Administration.Commands @@ -57,7 +56,7 @@ namespace Content.Server.Administration.Commands if (args.Length == 1) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError(Loc.GetString("set-outfit-command-is-not-player-error")); return; diff --git a/Content.Server/Administration/Commands/WarpCommand.cs b/Content.Server/Administration/Commands/WarpCommand.cs index 30a6d127aa..0d6da0d993 100644 --- a/Content.Server/Administration/Commands/WarpCommand.cs +++ b/Content.Server/Administration/Commands/WarpCommand.cs @@ -4,11 +4,9 @@ using Content.Server.Warps; using Content.Shared.Administration; using Content.Shared.Follower; using Content.Shared.Ghost; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Enums; using Robust.Shared.Map; -using Robust.Shared.Physics; using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Systems; @@ -28,7 +26,7 @@ namespace Content.Server.Administration.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("Only players can use this command"); diff --git a/Content.Server/Administration/ContentNetworkResourceManager.cs b/Content.Server/Administration/ContentNetworkResourceManager.cs index 0d3f3291e6..dd95a2d897 100644 --- a/Content.Server/Administration/ContentNetworkResourceManager.cs +++ b/Content.Server/Administration/ContentNetworkResourceManager.cs @@ -1,8 +1,8 @@ using Content.Server.Database; using Content.Shared.CCVar; -using Robust.Server.Player; using Robust.Server.Upload; using Robust.Shared.Configuration; +using Robust.Shared.Player; using Robust.Shared.Upload; namespace Content.Server.Administration; @@ -22,7 +22,7 @@ public sealed class ContentNetworkResourceManager _netRes.OnResourceUploaded += OnUploadResource; } - private async void OnUploadResource(IPlayerSession session, NetworkResourceUploadMessage msg) + private async void OnUploadResource(ICommonSession session, NetworkResourceUploadMessage msg) { if (StoreUploaded) await _serverDb.AddUploadedResourceLogAsync(session.UserId, DateTime.Now, msg.RelativePath.ToString(), msg.Data); diff --git a/Content.Server/Administration/Logs/AdminLogManager.Json.cs b/Content.Server/Administration/Logs/AdminLogManager.Json.cs index 63f30c7a66..0a67d61cef 100644 --- a/Content.Server/Administration/Logs/AdminLogManager.Json.cs +++ b/Content.Server/Administration/Logs/AdminLogManager.Json.cs @@ -3,8 +3,8 @@ using System.Text.Json; using System.Text.Json.Serialization; using Content.Server.Administration.Logs.Converters; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Map; +using Robust.Shared.Player; namespace Content.Server.Administration.Logs; @@ -44,7 +44,7 @@ public sealed partial class AdminLogManager var value = properties[key]; value = value switch { - IPlayerSession player => new SerializablePlayer(player), + ICommonSession player => new SerializablePlayer(player), EntityCoordinates entityCoordinates => new SerializableEntityCoordinates(_entityManager, entityCoordinates), _ => value }; @@ -56,7 +56,7 @@ public sealed partial class AdminLogManager { EntityUid id => id, EntityStringRepresentation rep => rep.Uid, - IPlayerSession {AttachedEntity: {Valid: true}} session => session.AttachedEntity, + ICommonSession {AttachedEntity: {Valid: true}} session => session.AttachedEntity, IComponent component => component.Owner, _ => null }; diff --git a/Content.Server/Administration/Logs/Converters/EntityUidConverter.cs b/Content.Server/Administration/Logs/Converters/EntityUidConverter.cs index 2fc1a2b627..78d81af33c 100644 --- a/Content.Server/Administration/Logs/Converters/EntityUidConverter.cs +++ b/Content.Server/Administration/Logs/Converters/EntityUidConverter.cs @@ -1,5 +1,5 @@ using System.Text.Json; -using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Administration.Logs.Converters; diff --git a/Content.Server/Administration/Logs/Converters/PlayerSessionConverter.cs b/Content.Server/Administration/Logs/Converters/PlayerSessionConverter.cs index 0605c2db2a..c1567448cc 100644 --- a/Content.Server/Administration/Logs/Converters/PlayerSessionConverter.cs +++ b/Content.Server/Administration/Logs/Converters/PlayerSessionConverter.cs @@ -1,5 +1,5 @@ using System.Text.Json; -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Administration.Logs.Converters; @@ -36,9 +36,9 @@ public sealed class PlayerSessionConverter : AdminLogConverter _admins = new(); + private readonly Dictionary _admins = new(); private readonly HashSet _promotedPlayers = new(); public event Action? OnPermsChanged; - public IEnumerable ActiveAdmins => _admins + public IEnumerable ActiveAdmins => _admins .Where(p => p.Value.Data.Active) .Select(p => p.Key); - public IEnumerable AllAdmins => _admins.Select(p => p.Key); + public IEnumerable AllAdmins => _admins.Select(p => p.Key); private readonly AdminCommandPermissions _commandPermissions = new(); private readonly AdminCommandPermissions _toolshedCommandPermissions = new(); @@ -56,7 +56,7 @@ namespace Content.Server.Administration.Managers public AdminData? GetAdminData(ICommonSession session, bool includeDeAdmin = false) { - if (_admins.TryGetValue((IPlayerSession)session, out var reg) && (reg.Data.Active || includeDeAdmin)) + if (_admins.TryGetValue(session, out var reg) && (reg.Data.Active || includeDeAdmin)) { return reg.Data; } @@ -66,13 +66,13 @@ namespace Content.Server.Administration.Managers public AdminData? GetAdminData(EntityUid uid, bool includeDeAdmin = false) { - if (_playerManager.TryGetSessionByEntity(uid, out var session) && session is IPlayerSession playerSession) - return GetAdminData(playerSession, includeDeAdmin); + if (_playerManager.TryGetSessionByEntity(uid, out var session)) + return GetAdminData(session, includeDeAdmin); return null; } - public void DeAdmin(IPlayerSession session) + public void DeAdmin(ICommonSession session) { if (!_admins.TryGetValue(session, out var reg)) { @@ -95,7 +95,7 @@ namespace Content.Server.Administration.Managers UpdateAdminStatus(session); } - public void ReAdmin(IPlayerSession session) + public void ReAdmin(ICommonSession session) { if (!_admins.TryGetValue(session, out var reg)) { @@ -119,7 +119,7 @@ namespace Content.Server.Administration.Managers UpdateAdminStatus(session); } - public async void ReloadAdmin(IPlayerSession player) + public async void ReloadAdmin(ICommonSession player) { var data = await LoadAdminData(player); var curAdmin = _admins.GetValueOrDefault(player); @@ -236,7 +236,7 @@ namespace Content.Server.Administration.Managers _toolshed.ActivePermissionController = this; } - public void PromoteHost(IPlayerSession player) + public void PromoteHost(ICommonSession player) { _promotedPlayers.Add(player.UserId); @@ -250,7 +250,7 @@ namespace Content.Server.Administration.Managers } // NOTE: Also sends commands list for non admins.. - private void UpdateAdminStatus(IPlayerSession session) + private void UpdateAdminStatus(ICommonSession session) { var msg = new MsgUpdateAdminStatus(); @@ -290,7 +290,7 @@ namespace Content.Server.Administration.Managers } } - private async void LoginAdminMaybe(IPlayerSession session) + private async void LoginAdminMaybe(ICommonSession session) { var adminDat = await LoadAdminData(session); if (adminDat == null) @@ -323,7 +323,7 @@ namespace Content.Server.Administration.Managers UpdateAdminStatus(session); } - private async Task<(AdminData dat, int? rankId, bool specialLogin)?> LoadAdminData(IPlayerSession session) + private async Task<(AdminData dat, int? rankId, bool specialLogin)?> LoadAdminData(ICommonSession session) { var promoteHost = IsLocal(session) && _cfg.GetCVar(CCVars.ConsoleLoginLocal) || _promotedPlayers.Contains(session.UserId) @@ -387,7 +387,7 @@ namespace Content.Server.Administration.Managers } } - private static bool IsLocal(IPlayerSession player) + private static bool IsLocal(ICommonSession player) { var ep = player.ConnectedClient.RemoteEndPoint; var addr = ep.Address; @@ -419,7 +419,7 @@ namespace Content.Server.Administration.Managers return false; } - public bool CanCommand(IPlayerSession session, string cmdName) + public bool CanCommand(ICommonSession session, string cmdName) { if (_commandPermissions.AnyCommands.Contains(cmdName)) { @@ -474,7 +474,7 @@ namespace Content.Server.Administration.Managers return true; } - var data = GetAdminData((IPlayerSession)user); + var data = GetAdminData(user); if (data == null) { // Player isn't an admin. @@ -520,32 +520,32 @@ namespace Content.Server.Administration.Managers return (attribs.Length != 0, attribs); } - public bool CanViewVar(IPlayerSession session) + public bool CanViewVar(ICommonSession session) { return CanCommand(session, "vv"); } - public bool CanAdminPlace(IPlayerSession session) + public bool CanAdminPlace(ICommonSession session) { return GetAdminData(session)?.CanAdminPlace() ?? false; } - public bool CanScript(IPlayerSession session) + public bool CanScript(ICommonSession session) { return GetAdminData(session)?.CanScript() ?? false; } - public bool CanAdminMenu(IPlayerSession session) + public bool CanAdminMenu(ICommonSession session) { return GetAdminData(session)?.CanAdminMenu() ?? false; } - public bool CanAdminReloadPrototypes(IPlayerSession session) + public bool CanAdminReloadPrototypes(ICommonSession session) { return GetAdminData(session)?.CanAdminReloadPrototypes() ?? false; } - private void SendPermsChangedEvent(IPlayerSession session) + private void SendPermsChangedEvent(ICommonSession session) { var flags = GetAdminData(session)?.Flags; OnPermsChanged?.Invoke(new AdminPermsChangedEventArgs(session, flags)); @@ -553,7 +553,7 @@ namespace Content.Server.Administration.Managers private sealed class AdminReg { - public readonly IPlayerSession Session; + public readonly ICommonSession Session; public AdminData Data; public int? RankId; @@ -561,7 +561,7 @@ namespace Content.Server.Administration.Managers // Such as console.loginlocal or promotehost public bool IsSpecialLogin; - public AdminReg(IPlayerSession session, AdminData data) + public AdminReg(ICommonSession session, AdminData data) { Data = data; Session = session; diff --git a/Content.Server/Administration/Managers/BanManager.cs b/Content.Server/Administration/Managers/BanManager.cs index 765df17b17..4d51d35576 100644 --- a/Content.Server/Administration/Managers/BanManager.cs +++ b/Content.Server/Administration/Managers/BanManager.cs @@ -15,6 +15,7 @@ using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Enums; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Utility; @@ -283,7 +284,7 @@ public sealed class BanManager : IBanManager, IPostInjectInit SendRoleBans(player); } - public void SendRoleBans(IPlayerSession pSession) + public void SendRoleBans(ICommonSession pSession) { var roleBans = _cachedRoleBans.GetValueOrDefault(pSession.UserId) ?? new HashSet(); var bans = new MsgRoleBans() diff --git a/Content.Server/Administration/Managers/IAdminManager.cs b/Content.Server/Administration/Managers/IAdminManager.cs index eeed5cc36e..a52ec7b099 100644 --- a/Content.Server/Administration/Managers/IAdminManager.cs +++ b/Content.Server/Administration/Managers/IAdminManager.cs @@ -1,9 +1,8 @@ using Content.Shared.Administration; using Content.Shared.Administration.Managers; -using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Toolshed; - namespace Content.Server.Administration.Managers { /// @@ -22,12 +21,12 @@ namespace Content.Server.Administration.Managers /// /// This does not include admins that are de-adminned. /// - IEnumerable ActiveAdmins { get; } + IEnumerable ActiveAdmins { get; } /// /// Gets all admins currently on the server, even de-adminned ones. /// - IEnumerable AllAdmins { get; } + IEnumerable AllAdmins { get; } /// /// De-admins an admin temporarily so they are effectively a normal player. @@ -35,18 +34,18 @@ namespace Content.Server.Administration.Managers /// /// De-adminned admins are able to re-admin at any time if they so desire. /// - void DeAdmin(IPlayerSession session); + void DeAdmin(ICommonSession session); /// /// Re-admins a de-adminned admin. /// - void ReAdmin(IPlayerSession session); + void ReAdmin(ICommonSession session); /// /// Re-loads the permissions of an player in case their admin data changed DB-side. /// /// - void ReloadAdmin(IPlayerSession player); + void ReloadAdmin(ICommonSession player); /// /// Reloads admin permissions for all admins with a certain rank. @@ -57,7 +56,7 @@ namespace Content.Server.Administration.Managers void Initialize(); - void PromoteHost(IPlayerSession player); + void PromoteHost(ICommonSession player); bool TryGetCommandFlags(CommandSpec command, out AdminFlags[]? flags); } diff --git a/Content.Server/Administration/Managers/IBanManager.cs b/Content.Server/Administration/Managers/IBanManager.cs index 8458feac8d..dafe3d35bd 100644 --- a/Content.Server/Administration/Managers/IBanManager.cs +++ b/Content.Server/Administration/Managers/IBanManager.cs @@ -2,8 +2,8 @@ using System.Collections.Immutable; using System.Net; using System.Threading.Tasks; using Content.Shared.Database; -using Robust.Server.Player; using Robust.Shared.Network; +using Robust.Shared.Player; namespace Content.Server.Administration.Managers; @@ -55,5 +55,5 @@ public interface IBanManager /// Sends role bans to the target /// /// Player's session - public void SendRoleBans(IPlayerSession pSession); + public void SendRoleBans(ICommonSession pSession); } diff --git a/Content.Server/Administration/Notes/AdminNotesManager.cs b/Content.Server/Administration/Notes/AdminNotesManager.cs index 8a7846663f..0c1e7f3daa 100644 --- a/Content.Server/Administration/Notes/AdminNotesManager.cs +++ b/Content.Server/Administration/Notes/AdminNotesManager.cs @@ -11,7 +11,7 @@ using Content.Shared.Database; using Content.Shared.Players.PlayTimeTracking; using Robust.Shared.Configuration; using Robust.Shared.Network; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.Administration.Notes; diff --git a/Content.Server/Administration/Notes/AdminNotesSystem.cs b/Content.Server/Administration/Notes/AdminNotesSystem.cs index fd9f3f6bfa..f2eb033dca 100644 --- a/Content.Server/Administration/Notes/AdminNotesSystem.cs +++ b/Content.Server/Administration/Notes/AdminNotesSystem.cs @@ -1,13 +1,13 @@ using Content.Server.Administration.Commands; using Content.Server.Chat.Managers; using Content.Server.EUI; -using Content.Shared.Chat; using Content.Shared.Database; using Content.Shared.Verbs; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Enums; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Administration.Notes; diff --git a/Content.Server/Administration/Notes/IAdminNotesManager.cs b/Content.Server/Administration/Notes/IAdminNotesManager.cs index ae7133c56d..a726bd11c8 100644 --- a/Content.Server/Administration/Notes/IAdminNotesManager.cs +++ b/Content.Server/Administration/Notes/IAdminNotesManager.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using Content.Server.Database; using Content.Shared.Administration.Notes; using Content.Shared.Database; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.Administration.Notes; diff --git a/Content.Server/Administration/QuickDialogSystem.OpenDialog.cs b/Content.Server/Administration/QuickDialogSystem.OpenDialog.cs index 521bee776f..fb013a88ad 100644 --- a/Content.Server/Administration/QuickDialogSystem.OpenDialog.cs +++ b/Content.Server/Administration/QuickDialogSystem.OpenDialog.cs @@ -1,6 +1,6 @@ using Content.Shared.Administration; using JetBrains.Annotations; -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Administration; @@ -16,7 +16,7 @@ public sealed partial class QuickDialogSystem /// The action to execute upon the dialog being cancelled. /// Type of the input. [PublicAPI] - public void OpenDialog(IPlayerSession session, string title, string prompt, Action okAction, + public void OpenDialog(ICommonSession session, string title, string prompt, Action okAction, Action? cancelAction = null) { OpenDialogInternal( @@ -53,7 +53,7 @@ public sealed partial class QuickDialogSystem /// Type of the first input. /// Type of the second input. [PublicAPI] - public void OpenDialog(IPlayerSession session, string title, string prompt1, string prompt2, + public void OpenDialog(ICommonSession session, string title, string prompt1, string prompt2, Action okAction, Action? cancelAction = null) { OpenDialogInternal( @@ -96,7 +96,7 @@ public sealed partial class QuickDialogSystem /// Type of the second input. /// Type of the third input. [PublicAPI] - public void OpenDialog(IPlayerSession session, string title, string prompt1, string prompt2, + public void OpenDialog(ICommonSession session, string title, string prompt1, string prompt2, string prompt3, Action okAction, Action? cancelAction = null) { OpenDialogInternal( @@ -142,7 +142,7 @@ public sealed partial class QuickDialogSystem /// Type of the third input. /// Type of the fourth input. [PublicAPI] - public void OpenDialog(IPlayerSession session, string title, string prompt1, string prompt2, + public void OpenDialog(ICommonSession session, string title, string prompt1, string prompt2, string prompt3, string prompt4, Action okAction, Action? cancelAction = null) { OpenDialogInternal( diff --git a/Content.Server/Administration/QuickDialogSystem.cs b/Content.Server/Administration/QuickDialogSystem.cs index 51b8cf79c2..96423e5223 100644 --- a/Content.Server/Administration/QuickDialogSystem.cs +++ b/Content.Server/Administration/QuickDialogSystem.cs @@ -1,12 +1,9 @@ -using System.ComponentModel; -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using Content.Shared.Administration; -using Microsoft.CodeAnalysis.CSharp.Syntax; using Robust.Server.Player; using Robust.Shared.Enums; using Robust.Shared.Network; using Robust.Shared.Player; -using Robust.Shared.Serialization.TypeSerializers.Interfaces; namespace Content.Server.Administration; @@ -87,7 +84,7 @@ public sealed partial class QuickDialogSystem : EntitySystem _openDialogsByUser.Remove(user); } - private void OpenDialogInternal(IPlayerSession session, string title, List entries, QuickDialogButtonFlag buttons, Action okAction, Action cancelAction) + private void OpenDialogInternal(ICommonSession session, string title, List entries, QuickDialogButtonFlag buttons, Action okAction, Action cancelAction) { var did = GetDialogId(); RaiseNetworkEvent( diff --git a/Content.Server/Administration/Systems/AdminSystem.cs b/Content.Server/Administration/Systems/AdminSystem.cs index 5a3e1d9217..29ad854550 100644 --- a/Content.Server/Administration/Systems/AdminSystem.cs +++ b/Content.Server/Administration/Systems/AdminSystem.cs @@ -109,7 +109,7 @@ namespace Content.Server.Administration.Systems } } - public void UpdatePlayerList(IPlayerSession player) + public void UpdatePlayerList(ICommonSession player) { _playerList[player.UserId] = GetPlayerInfo(player.Data, player); @@ -203,7 +203,7 @@ namespace Content.Server.Administration.Systems UpdatePanicBunker(); } - private void SendFullPlayerList(IPlayerSession playerSession) + private void SendFullPlayerList(ICommonSession playerSession) { var ev = new FullPlayerListEvent(); @@ -212,7 +212,7 @@ namespace Content.Server.Administration.Systems RaiseNetworkEvent(ev, playerSession.ConnectedClient); } - private PlayerInfo GetPlayerInfo(IPlayerData data, IPlayerSession? session) + private PlayerInfo GetPlayerInfo(SessionData data, ICommonSession? session) { var name = data.UserName; var entityName = string.Empty; @@ -326,7 +326,7 @@ namespace Content.Server.Administration.Systems /// chat messages and showing a popup to other players. /// Their items are dropped on the ground. /// - public void Erase(IPlayerSession player) + public void Erase(ICommonSession player) { var entity = player.AttachedEntity; _chat.DeleteMessagesBy(player); diff --git a/Content.Server/Administration/Systems/AdminTestArenaSystem.cs b/Content.Server/Administration/Systems/AdminTestArenaSystem.cs index e65acf571c..e3671bcdfb 100644 --- a/Content.Server/Administration/Systems/AdminTestArenaSystem.cs +++ b/Content.Server/Administration/Systems/AdminTestArenaSystem.cs @@ -1,8 +1,8 @@ using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Network; +using Robust.Shared.Player; namespace Content.Server.Administration.Systems; @@ -20,7 +20,7 @@ public sealed class AdminTestArenaSystem : EntitySystem public Dictionary ArenaMap { get; private set; } = new(); public Dictionary ArenaGrid { get; private set; } = new(); - public (EntityUid Map, EntityUid? Grid) AssertArenaLoaded(IPlayerSession admin) + public (EntityUid Map, EntityUid? Grid) AssertArenaLoaded(ICommonSession admin) { if (ArenaMap.TryGetValue(admin.UserId, out var arenaMap) && !Deleted(arenaMap) && !Terminating(arenaMap)) { diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs index 6fe526af11..245fad4b33 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs @@ -7,10 +7,8 @@ using Content.Shared.Humanoid; using Content.Shared.Mind; using Content.Shared.Mind.Components; using Content.Shared.Verbs; -using Robust.Server.GameObjects; using Robust.Shared.Utility; -using Content.Server.GameTicking.Rules.Components; -using System.Linq; +using Robust.Shared.Player; namespace Content.Server.Administration.Systems; diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs index b52e56009d..d7df3faee2 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs @@ -1,12 +1,10 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Numerics; -using Content.Server.Administration.Commands; using Content.Server.Administration.Components; using Content.Server.Atmos; using Content.Server.Atmos.Components; using Content.Server.Cargo.Components; -using Content.Server.Damage.Components; using Content.Server.Doors.Systems; using Content.Server.Hands.Systems; using Content.Server.Power.Components; @@ -30,12 +28,12 @@ using Content.Shared.PDA; using Content.Shared.Stacks; using Content.Shared.Verbs; using Content.Shared.Weapons.Ranged.Components; -using Robust.Server.GameObjects; using Robust.Server.Physics; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Physics; using Robust.Shared.Physics.Components; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Administration.Systems; diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.cs b/Content.Server/Administration/Systems/AdminVerbSystem.cs index 0f0c562356..bc065745f5 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.cs @@ -24,11 +24,10 @@ using Content.Shared.Popups; using Content.Shared.Verbs; using Robust.Server.Console; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Map; using Robust.Shared.Map.Components; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Timing; using Robust.Shared.Toolshed; @@ -427,7 +426,7 @@ namespace Content.Server.Administration.Systems } } - public void OpenEditSolutionsEui(IPlayerSession session, EntityUid uid) + public void OpenEditSolutionsEui(ICommonSession session, EntityUid uid) { if (session.AttachedEntity == null) return; diff --git a/Content.Server/Administration/Systems/BwoinkSystem.cs b/Content.Server/Administration/Systems/BwoinkSystem.cs index 98e5af1126..31ef285a88 100644 --- a/Content.Server/Administration/Systems/BwoinkSystem.cs +++ b/Content.Server/Administration/Systems/BwoinkSystem.cs @@ -17,6 +17,7 @@ using Robust.Shared; using Robust.Shared.Configuration; using Robust.Shared.Enums; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Timing; using Robust.Shared.Utility; @@ -119,7 +120,7 @@ namespace Content.Server.Administration.Systems _typingUpdateTimestamps[args.SenderSession.UserId] = (_timing.RealTime, msg.Typing); // Non-admins can only ever type on their own ahelp, guard against fake messages - var isAdmin = _adminManager.GetAdminData((IPlayerSession) args.SenderSession)?.HasFlag(AdminFlags.Adminhelp) ?? false; + var isAdmin = _adminManager.GetAdminData(args.SenderSession)?.HasFlag(AdminFlags.Adminhelp) ?? false; var channel = isAdmin ? msg.Channel : args.SenderSession.UserId; var update = new BwoinkPlayerTypingUpdated(channel, args.SenderSession.Name, msg.Typing); @@ -376,7 +377,7 @@ namespace Content.Server.Administration.Systems protected override void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySessionEventArgs eventArgs) { base.OnBwoinkTextMessage(message, eventArgs); - var senderSession = (IPlayerSession) eventArgs.SenderSession; + var senderSession = eventArgs.SenderSession; // TODO: Sanitize text? // Confirm that this person is actually allowed to send a message here. diff --git a/Content.Server/Administration/Toolshed/AdminsCommand.cs b/Content.Server/Administration/Toolshed/AdminsCommand.cs index aa82e0f1d9..1d64f748fd 100644 --- a/Content.Server/Administration/Toolshed/AdminsCommand.cs +++ b/Content.Server/Administration/Toolshed/AdminsCommand.cs @@ -1,6 +1,6 @@ using Content.Server.Administration.Managers; using Content.Shared.Administration; -using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Toolshed; namespace Content.Server.Administration.Toolshed; @@ -11,13 +11,13 @@ public sealed class AdminsCommand : ToolshedCommand [Dependency] private readonly IAdminManager _admin = default!; [CommandImplementation("active")] - public IEnumerable Active() + public IEnumerable Active() { return _admin.ActiveAdmins; } [CommandImplementation("all")] - public IEnumerable All() + public IEnumerable All() { return _admin.AllAdmins; } diff --git a/Content.Server/Afk/AFKSystem.cs b/Content.Server/Afk/AFKSystem.cs index 0938f45f73..f634a415dc 100644 --- a/Content.Server/Afk/AFKSystem.cs +++ b/Content.Server/Afk/AFKSystem.cs @@ -1,4 +1,3 @@ -using System.Linq; using Content.Server.Afk.Events; using Content.Server.GameTicking; using Content.Shared.CCVar; @@ -24,7 +23,7 @@ public sealed class AFKSystem : EntitySystem private float _checkDelay; private TimeSpan _checkTime; - private readonly HashSet _afkPlayers = new(); + private readonly HashSet _afkPlayers = new(); public override void Initialize() { @@ -73,11 +72,9 @@ public sealed class AFKSystem : EntitySystem _checkTime = _timing.CurTime + TimeSpan.FromSeconds(_checkDelay); - foreach (var session in Filter.GetAllPlayers()) + foreach (var pSession in Filter.GetAllPlayers()) { - if (session.Status != SessionStatus.InGame) continue; - - var pSession = (IPlayerSession) session; + if (pSession.Status != SessionStatus.InGame) continue; var isAfk = _afkManager.IsAfk(pSession); if (isAfk && _afkPlayers.Add(pSession)) diff --git a/Content.Server/Afk/AfkManager.cs b/Content.Server/Afk/AfkManager.cs index 24cd1e28ce..52dc7715df 100644 --- a/Content.Server/Afk/AfkManager.cs +++ b/Content.Server/Afk/AfkManager.cs @@ -5,6 +5,7 @@ using Robust.Shared.Configuration; using Robust.Shared.Console; using Robust.Shared.Enums; using Robust.Shared.Input; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Server.Afk @@ -20,13 +21,13 @@ namespace Content.Server.Afk /// /// The player to check. /// True if the player is AFK, false otherwise. - bool IsAfk(IPlayerSession player); + bool IsAfk(ICommonSession player); /// /// Resets AFK status for the player as if they just did an action and are definitely not AFK. /// /// The player to set AFK status for. - void PlayerDidAction(IPlayerSession player); + void PlayerDidAction(ICommonSession player); void Initialize(); } @@ -40,7 +41,7 @@ namespace Content.Server.Afk [Dependency] private readonly IConfigurationManager _cfg = default!; [Dependency] private readonly IConsoleHost _consoleHost = default!; - private readonly Dictionary _lastActionTimes = new(); + private readonly Dictionary _lastActionTimes = new(); public void Initialize() { @@ -55,7 +56,7 @@ namespace Content.Server.Afk HandleInputCmd); } - public void PlayerDidAction(IPlayerSession player) + public void PlayerDidAction(ICommonSession player) { if (player.Status == SessionStatus.Disconnected) // Make sure we don't re-add to the dictionary if the player is disconnected now. @@ -64,7 +65,7 @@ namespace Content.Server.Afk _lastActionTimes[player] = _gameTiming.RealTime; } - public bool IsAfk(IPlayerSession player) + public bool IsAfk(ICommonSession player) { if (!_lastActionTimes.TryGetValue(player, out var time)) // Some weird edge case like disconnected clients. Just say true I guess. @@ -87,13 +88,13 @@ namespace Content.Server.Afk private void ConsoleHostOnAnyCommandExecuted(IConsoleShell shell, string commandname, string argstr, string[] args) { - if (shell.Player is IPlayerSession player) + if (shell.Player is { } player) PlayerDidAction(player); } private void HandleInputCmd(FullInputCmdMessage msg, EntitySessionEventArgs args) { - PlayerDidAction((IPlayerSession) args.SenderSession); + PlayerDidAction(args.SenderSession); } } } diff --git a/Content.Server/Afk/Events/AFKEvent.cs b/Content.Server/Afk/Events/AFKEvent.cs index 6adb950e47..ee9d548043 100644 --- a/Content.Server/Afk/Events/AFKEvent.cs +++ b/Content.Server/Afk/Events/AFKEvent.cs @@ -1,4 +1,4 @@ -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Afk.Events; @@ -8,9 +8,9 @@ namespace Content.Server.Afk.Events; [ByRefEvent] public readonly struct AFKEvent { - public readonly IPlayerSession Session; + public readonly ICommonSession Session; - public AFKEvent(IPlayerSession playerSession) + public AFKEvent(ICommonSession playerSession) { Session = playerSession; } diff --git a/Content.Server/Afk/Events/UnAFKEvent.cs b/Content.Server/Afk/Events/UnAFKEvent.cs index 3dd034583c..0983c256f0 100644 --- a/Content.Server/Afk/Events/UnAFKEvent.cs +++ b/Content.Server/Afk/Events/UnAFKEvent.cs @@ -1,4 +1,4 @@ -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Afk.Events; @@ -8,9 +8,9 @@ namespace Content.Server.Afk.Events; [ByRefEvent] public readonly struct UnAFKEvent { - public readonly IPlayerSession Session; + public readonly ICommonSession Session; - public UnAFKEvent(IPlayerSession playerSession) + public UnAFKEvent(ICommonSession playerSession) { Session = playerSession; } diff --git a/Content.Server/Alert/Commands/ClearAlert.cs b/Content.Server/Alert/Commands/ClearAlert.cs index e43f06413c..1759612702 100644 --- a/Content.Server/Alert/Commands/ClearAlert.cs +++ b/Content.Server/Alert/Commands/ClearAlert.cs @@ -2,7 +2,6 @@ using Content.Server.Administration; using Content.Server.Commands; using Content.Shared.Administration; using Content.Shared.Alert; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Alert.Commands @@ -16,7 +15,7 @@ namespace Content.Server.Alert.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player?.AttachedEntity == null) { shell.WriteLine("You don't have an entity."); diff --git a/Content.Server/Alert/Commands/ShowAlert.cs b/Content.Server/Alert/Commands/ShowAlert.cs index edb634b546..11901e9af0 100644 --- a/Content.Server/Alert/Commands/ShowAlert.cs +++ b/Content.Server/Alert/Commands/ShowAlert.cs @@ -2,7 +2,6 @@ using Content.Server.Administration; using Content.Server.Commands; using Content.Shared.Administration; using Content.Shared.Alert; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Alert.Commands @@ -16,7 +15,7 @@ namespace Content.Server.Alert.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player?.AttachedEntity == null) { shell.WriteLine("You cannot run this from the server or without an attached entity."); diff --git a/Content.Server/AlertLevel/Commands/SetAlertLevelCommand.cs b/Content.Server/AlertLevel/Commands/SetAlertLevelCommand.cs index 009a8b5f23..2c432a2419 100644 --- a/Content.Server/AlertLevel/Commands/SetAlertLevelCommand.cs +++ b/Content.Server/AlertLevel/Commands/SetAlertLevelCommand.cs @@ -3,7 +3,6 @@ using Content.Server.Administration; using Content.Server.Station.Systems; using Content.Shared.Administration; using JetBrains.Annotations; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.AlertLevel.Commands @@ -19,7 +18,7 @@ namespace Content.Server.AlertLevel.Commands public CompletionResult GetCompletion(IConsoleShell shell, string[] args) { var levelNames = new string[] {}; - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player?.AttachedEntity != null) { var stationUid = EntitySystem.Get().GetOwningStation(player.AttachedEntity.Value); @@ -54,7 +53,7 @@ namespace Content.Server.AlertLevel.Commands return; } - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player?.AttachedEntity == null) { shell.WriteLine(Loc.GetString("shell-only-players-can-run-this-command")); diff --git a/Content.Server/Anomaly/AnomalySystem.Scanner.cs b/Content.Server/Anomaly/AnomalySystem.Scanner.cs index caff031ace..30b3d99497 100644 --- a/Content.Server/Anomaly/AnomalySystem.Scanner.cs +++ b/Content.Server/Anomaly/AnomalySystem.Scanner.cs @@ -3,7 +3,7 @@ using Content.Shared.Anomaly; using Content.Shared.Anomaly.Components; using Content.Shared.DoAfter; using Content.Shared.Interaction; -using Robust.Server.GameObjects; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Anomaly; diff --git a/Content.Server/Antag/AntagSelectionSystem.cs b/Content.Server/Antag/AntagSelectionSystem.cs index 5e323f5ab8..737b723d39 100644 --- a/Content.Server/Antag/AntagSelectionSystem.cs +++ b/Content.Server/Antag/AntagSelectionSystem.cs @@ -22,6 +22,7 @@ using Content.Server.Station.Systems; using Content.Server.Shuttles.Systems; using Content.Shared.Mobs; using Robust.Server.Containers; +using Robust.Shared.Player; using Robust.Shared.Prototypes; namespace Content.Server.Antag; @@ -88,9 +89,9 @@ public sealed class AntagSelectionSystem : GameRuleSystem out List chosen, bool includeHeads = false) { - var allPlayers = _playerSystem.ServerSessions.ToList(); - var playerList = new List(); - var prefList = new List(); + var allPlayers = _playerSystem.Sessions.ToList(); + var playerList = new List(); + var prefList = new List(); chosen = new List(); foreach (var player in allPlayers) { @@ -116,7 +117,7 @@ public sealed class AntagSelectionSystem : GameRuleSystem var antags = Math.Clamp(allPlayers.Count / antagsPerPlayer, 1, maxAntags); for (var antag = 0; antag < antags; antag++) { - IPlayerSession chosenPlayer = null!; + ICommonSession? chosenPlayer = null; if (prefList.Count == 0) { if (playerList.Count == 0) diff --git a/Content.Server/Arcade/BlockGame/BlockGame.Ui.cs b/Content.Server/Arcade/BlockGame/BlockGame.Ui.cs index 92a96ea226..ef69600783 100644 --- a/Content.Server/Arcade/BlockGame/BlockGame.Ui.cs +++ b/Content.Server/Arcade/BlockGame/BlockGame.Ui.cs @@ -1,6 +1,6 @@ using Content.Shared.Arcade; -using Robust.Server.Player; using System.Linq; +using Robust.Shared.Player; namespace Content.Server.Arcade.BlockGame; @@ -166,7 +166,7 @@ public sealed partial class BlockGame /// /// The message to send to a specific player/spectator. /// The target recipient. - private void SendMessage(BoundUserInterfaceMessage message, IPlayerSession session) + private void SendMessage(BoundUserInterfaceMessage message, ICommonSession session) { if (_uiSystem.TryGetUi(_owner, BlockGameUiKey.Key, out var bui)) _uiSystem.TrySendUiMessage(bui, message, session); @@ -176,7 +176,7 @@ public sealed partial class BlockGame /// Handles sending the current state of the game to a player that has just opened the UI. /// /// The target recipient. - public void UpdateNewPlayerUI(IPlayerSession session) + public void UpdateNewPlayerUI(ICommonSession session) { if (_gameOver) { @@ -209,7 +209,7 @@ public sealed partial class BlockGame /// Handles broadcasting the full player-visible game state to a specific player/spectator. /// /// The target recipient. - private void FullUpdate(IPlayerSession session) + private void FullUpdate(ICommonSession session) { UpdateFieldUI(session); SendNextPieceUpdate(session); @@ -235,7 +235,7 @@ public sealed partial class BlockGame /// Handles broadcasting the current location of all of the blocks in the playfield + the active piece to a specific player/spectator. /// /// The target recipient. - public void UpdateFieldUI(IPlayerSession session) + public void UpdateFieldUI(ICommonSession session) { if (!Started) return; @@ -283,7 +283,7 @@ public sealed partial class BlockGame /// Broadcasts the state of the next queued piece to a specific viewer. /// /// The target recipient. - private void SendNextPieceUpdate(IPlayerSession session) + private void SendNextPieceUpdate(ICommonSession session) { SendMessage(new BlockGameMessages.BlockGameVisualUpdateMessage(NextPiece.BlocksForPreview(), BlockGameMessages.BlockGameVisualType.NextBlock), session); } @@ -303,7 +303,7 @@ public sealed partial class BlockGame /// Broadcasts the state of the currently held piece to a specific viewer. /// /// The target recipient. - private void SendHoldPieceUpdate(IPlayerSession session) + private void SendHoldPieceUpdate(ICommonSession session) { if (HeldPiece.HasValue) SendMessage(new BlockGameMessages.BlockGameVisualUpdateMessage(HeldPiece.Value.BlocksForPreview(), BlockGameMessages.BlockGameVisualType.HoldBlock), session); @@ -323,7 +323,7 @@ public sealed partial class BlockGame /// Broadcasts the current game level to a specific viewer. /// /// The target recipient. - private void SendLevelUpdate(IPlayerSession session) + private void SendLevelUpdate(ICommonSession session) { SendMessage(new BlockGameMessages.BlockGameLevelUpdateMessage(Level), session); } @@ -340,7 +340,7 @@ public sealed partial class BlockGame /// Broadcasts the current game score to a specific viewer. /// /// The target recipient. - private void SendPointsUpdate(IPlayerSession session) + private void SendPointsUpdate(ICommonSession session) { SendMessage(new BlockGameMessages.BlockGameScoreUpdateMessage(Points), session); } @@ -357,7 +357,7 @@ public sealed partial class BlockGame /// Broadcasts the current game high score positions to a specific viewer. /// /// The target recipient. - private void SendHighscoreUpdate(IPlayerSession session) + private void SendHighscoreUpdate(ICommonSession session) { SendMessage(new BlockGameMessages.BlockGameHighScoreUpdateMessage(_arcadeSystem.GetLocalHighscores(), _arcadeSystem.GetGlobalHighscores()), session); } diff --git a/Content.Server/Arcade/BlockGame/BlockGameArcadeComponent.cs b/Content.Server/Arcade/BlockGame/BlockGameArcadeComponent.cs index 268d5be4d2..5613d91544 100644 --- a/Content.Server/Arcade/BlockGame/BlockGameArcadeComponent.cs +++ b/Content.Server/Arcade/BlockGame/BlockGameArcadeComponent.cs @@ -1,4 +1,4 @@ -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Arcade.BlockGame; @@ -13,10 +13,10 @@ public sealed partial class BlockGameArcadeComponent : Component /// /// The player currently playing the active session of NT-BG. /// - public IPlayerSession? Player = null; + public ICommonSession? Player = null; /// /// The players currently viewing (but not playing) the active session of NT-BG. /// - public readonly List Spectators = new(); + public readonly List Spectators = new(); } diff --git a/Content.Server/Arcade/BlockGame/BlockGameArcadeSystem.cs b/Content.Server/Arcade/BlockGame/BlockGameArcadeSystem.cs index dac29accc9..ecc5bfd3e2 100644 --- a/Content.Server/Arcade/BlockGame/BlockGameArcadeSystem.cs +++ b/Content.Server/Arcade/BlockGame/BlockGameArcadeSystem.cs @@ -2,7 +2,7 @@ using Content.Server.Power.Components; using Content.Server.UserInterface; using Content.Shared.Arcade; using Robust.Server.GameObjects; -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Arcade.BlockGame; @@ -30,7 +30,7 @@ public sealed class BlockGameArcadeSystem : EntitySystem } } - private void UpdatePlayerStatus(EntityUid uid, IPlayerSession session, PlayerBoundUserInterface? bui = null, BlockGameArcadeComponent? blockGame = null) + private void UpdatePlayerStatus(EntityUid uid, ICommonSession session, PlayerBoundUserInterface? bui = null, BlockGameArcadeComponent? blockGame = null) { if (!Resolve(uid, ref blockGame)) return; @@ -67,7 +67,7 @@ public sealed class BlockGameArcadeSystem : EntitySystem private void OnAfterUiClose(EntityUid uid, BlockGameArcadeComponent component, BoundUIClosedEvent args) { - if (args.Session is not IPlayerSession session) + if (args.Session is not { } session) return; if (component.Player != session) diff --git a/Content.Server/Atmos/Commands/DeleteGasCommand.cs b/Content.Server/Atmos/Commands/DeleteGasCommand.cs index 0f0c399b11..9e7594c024 100644 --- a/Content.Server/Atmos/Commands/DeleteGasCommand.cs +++ b/Content.Server/Atmos/Commands/DeleteGasCommand.cs @@ -2,7 +2,6 @@ using Content.Server.Administration; using Content.Server.Atmos.EntitySystems; using Content.Shared.Administration; using Content.Shared.Atmos; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Map; @@ -20,7 +19,7 @@ namespace Content.Server.Atmos.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; EntityUid? gridId; Gas? gas = null; diff --git a/Content.Server/Atmos/Commands/ShowAtmosCommand.cs b/Content.Server/Atmos/Commands/ShowAtmosCommand.cs index 5ad73ec906..263ef947d0 100644 --- a/Content.Server/Atmos/Commands/ShowAtmosCommand.cs +++ b/Content.Server/Atmos/Commands/ShowAtmosCommand.cs @@ -1,7 +1,6 @@ using Content.Server.Administration; using Content.Server.Atmos.EntitySystems; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Atmos.Commands @@ -15,7 +14,7 @@ namespace Content.Server.Atmos.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("You must be a player to use this command."); diff --git a/Content.Server/Atmos/EntitySystems/AtmosDebugOverlaySystem.cs b/Content.Server/Atmos/EntitySystems/AtmosDebugOverlaySystem.cs index 34f558a252..90edd4caed 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosDebugOverlaySystem.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosDebugOverlaySystem.cs @@ -10,6 +10,7 @@ using Robust.Shared.Configuration; using Robust.Shared.Enums; using Robust.Shared.Map; using Robust.Shared.Map.Components; +using Robust.Shared.Player; namespace Content.Server.Atmos.EntitySystems { @@ -27,7 +28,7 @@ namespace Content.Server.Atmos.EntitySystems /// To modify it see and /// . /// - private readonly HashSet _playerObservers = new(); + private readonly HashSet _playerObservers = new(); /// /// Overlay update ticks per second. @@ -48,17 +49,17 @@ namespace Content.Server.Atmos.EntitySystems _playerManager.PlayerStatusChanged -= OnPlayerStatusChanged; } - public bool AddObserver(IPlayerSession observer) + public bool AddObserver(ICommonSession observer) { return _playerObservers.Add(observer); } - public bool HasObserver(IPlayerSession observer) + public bool HasObserver(ICommonSession observer) { return _playerObservers.Contains(observer); } - public bool RemoveObserver(IPlayerSession observer) + public bool RemoveObserver(ICommonSession observer) { if (!_playerObservers.Remove(observer)) { @@ -76,7 +77,7 @@ namespace Content.Server.Atmos.EntitySystems /// /// The observer to toggle. /// true if added, false if removed. - public bool ToggleObserver(IPlayerSession observer) + public bool ToggleObserver(ICommonSession observer) { if (HasObserver(observer)) { diff --git a/Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs b/Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs index 0d7ad48f88..16ddf1f933 100644 --- a/Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs +++ b/Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs @@ -9,6 +9,7 @@ using Content.Shared.Interaction; using Content.Shared.Interaction.Events; using JetBrains.Annotations; using Robust.Server.GameObjects; +using Robust.Shared.Player; using static Content.Shared.Atmos.Components.GasAnalyzerComponent; namespace Content.Server.Atmos.EntitySystems diff --git a/Content.Server/Atmos/EntitySystems/GasTankSystem.cs b/Content.Server/Atmos/EntitySystems/GasTankSystem.cs index df867d3516..17715435b2 100644 --- a/Content.Server/Atmos/EntitySystems/GasTankSystem.cs +++ b/Content.Server/Atmos/EntitySystems/GasTankSystem.cs @@ -12,7 +12,6 @@ using Content.Shared.Toggleable; using Content.Shared.Verbs; using JetBrains.Annotations; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Audio; using Robust.Shared.Containers; using Robust.Shared.Physics.Systems; @@ -60,12 +59,6 @@ namespace Content.Server.Atmos.EntitySystems private void OnGasTankToggleInternals(Entity ent, ref GasTankToggleInternalsMessage args) { - if (args.Session is not IPlayerSession playerSession || - playerSession.AttachedEntity == null) - { - return; - } - ToggleInternals(ent); } diff --git a/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs b/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs index c229ef50c9..b0e8cf71c7 100644 --- a/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs +++ b/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs @@ -16,6 +16,7 @@ using Robust.Shared; using Robust.Shared.Configuration; using Robust.Shared.Enums; using Robust.Shared.Map; +using Robust.Shared.Player; using Robust.Shared.Threading; using Robust.Shared.Timing; using Robust.Shared.Utility; @@ -35,7 +36,7 @@ namespace Content.Server.Atmos.EntitySystems [Robust.Shared.IoC.Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!; [Robust.Shared.IoC.Dependency] private readonly ChunkingSystem _chunkingSys = default!; - private readonly Dictionary>> _lastSentChunks = new(); + private readonly Dictionary>> _lastSentChunks = new(); // Oh look its more duplicated decal system code! private ObjectPool> _chunkIndexPool = @@ -286,12 +287,12 @@ namespace Content.Server.Atmos.EntitySystems // Now we'll go through each player, then through each chunk in range of that player checking if the player is still in range // If they are, check if they need the new data to send (i.e. if there's an overlay for the gas). // Afterwards we reset all the chunk data for the next time we tick. - var players = _playerManager.ServerSessions.Where(x => x.Status == SessionStatus.InGame).ToArray(); + var players = _playerManager.Sessions.Where(x => x.Status == SessionStatus.InGame).ToArray(); var opts = new ParallelOptions { MaxDegreeOfParallelism = _parMan.ParallelProcessCount }; Parallel.ForEach(players, opts, p => UpdatePlayer(p, curTick)); } - private void UpdatePlayer(IPlayerSession playerSession, GameTick curTick) + private void UpdatePlayer(ICommonSession playerSession, GameTick curTick) { var chunksInRange = _chunkingSys.GetChunksForSession(playerSession, ChunkSize, _chunkIndexPool, _chunkViewerPool); var previouslySent = _lastSentChunks[playerSession]; diff --git a/Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs b/Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs index 0ef49be46a..190ac9d5c9 100644 --- a/Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs +++ b/Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs @@ -15,11 +15,11 @@ using Content.Shared.Atmos.Monitor; using Content.Shared.Atmos.Monitor.Components; using Content.Shared.Atmos.Piping.Unary.Components; using Content.Shared.DeviceLinking; -using Content.Shared.DeviceNetwork; using Content.Shared.DeviceNetwork.Systems; using Content.Shared.Interaction; using Content.Shared.Wires; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Atmos.Monitor.Systems; diff --git a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasPressurePumpSystem.cs b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasPressurePumpSystem.cs index e857b02b94..75167dfbc2 100644 --- a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasPressurePumpSystem.cs +++ b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasPressurePumpSystem.cs @@ -15,6 +15,7 @@ using Content.Shared.Interaction; using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Atmos.Piping.Binary.EntitySystems { diff --git a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasVolumePumpSystem.cs b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasVolumePumpSystem.cs index 19ad8175aa..66bd28eaac 100644 --- a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasVolumePumpSystem.cs +++ b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasVolumePumpSystem.cs @@ -18,6 +18,7 @@ using Content.Shared.Interaction; using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Atmos.Piping.Binary.EntitySystems { diff --git a/Content.Server/Atmos/Piping/Trinary/EntitySystems/GasFilterSystem.cs b/Content.Server/Atmos/Piping/Trinary/EntitySystems/GasFilterSystem.cs index 69a0178a01..7032e7fe0e 100644 --- a/Content.Server/Atmos/Piping/Trinary/EntitySystems/GasFilterSystem.cs +++ b/Content.Server/Atmos/Piping/Trinary/EntitySystems/GasFilterSystem.cs @@ -14,6 +14,7 @@ using Content.Shared.Interaction; using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Atmos.Piping.Trinary.EntitySystems { diff --git a/Content.Server/Atmos/Piping/Trinary/EntitySystems/GasMixerSystem.cs b/Content.Server/Atmos/Piping/Trinary/EntitySystems/GasMixerSystem.cs index ce2213d535..f6ad51fb24 100644 --- a/Content.Server/Atmos/Piping/Trinary/EntitySystems/GasMixerSystem.cs +++ b/Content.Server/Atmos/Piping/Trinary/EntitySystems/GasMixerSystem.cs @@ -14,6 +14,7 @@ using Content.Shared.Interaction; using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Atmos.Piping.Trinary.EntitySystems { diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs index 416e2e4f64..14a1e5e456 100644 --- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs +++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs @@ -17,6 +17,7 @@ using Content.Shared.Interaction; using Content.Shared.Lock; using Robust.Server.GameObjects; using Robust.Shared.Containers; +using Robust.Shared.Player; namespace Content.Server.Atmos.Piping.Unary.EntitySystems; diff --git a/Content.Server/Body/Commands/AddHandCommand.cs b/Content.Server/Body/Commands/AddHandCommand.cs index 308295c06c..655d0c88f9 100644 --- a/Content.Server/Body/Commands/AddHandCommand.cs +++ b/Content.Server/Body/Commands/AddHandCommand.cs @@ -4,7 +4,6 @@ using Content.Server.Body.Systems; using Content.Shared.Administration; using Content.Shared.Body.Components; using Content.Shared.Body.Part; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Prototypes; using Robust.Shared.Random; @@ -27,7 +26,7 @@ namespace Content.Server.Body.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; EntityUid entity; EntityUid hand; diff --git a/Content.Server/Body/Commands/AttachBodyPartCommand.cs b/Content.Server/Body/Commands/AttachBodyPartCommand.cs index 267b520808..24604b88b7 100644 --- a/Content.Server/Body/Commands/AttachBodyPartCommand.cs +++ b/Content.Server/Body/Commands/AttachBodyPartCommand.cs @@ -1,10 +1,8 @@ -using System.Linq; using Content.Server.Administration; using Content.Server.Body.Systems; using Content.Shared.Administration; using Content.Shared.Body.Components; using Content.Shared.Body.Part; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Body.Commands @@ -20,7 +18,7 @@ namespace Content.Server.Body.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; EntityUid bodyId; EntityUid? partUid; diff --git a/Content.Server/Body/Commands/DestroyMechanismCommand.cs b/Content.Server/Body/Commands/DestroyMechanismCommand.cs index 6ad0631150..3aa28f4072 100644 --- a/Content.Server/Body/Commands/DestroyMechanismCommand.cs +++ b/Content.Server/Body/Commands/DestroyMechanismCommand.cs @@ -2,7 +2,6 @@ using Content.Server.Administration; using Content.Server.Body.Systems; using Content.Shared.Administration; using Content.Shared.Body.Components; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Random; @@ -17,7 +16,7 @@ namespace Content.Server.Body.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("Only a player can run this command."); diff --git a/Content.Server/Body/Commands/RemoveHandCommand.cs b/Content.Server/Body/Commands/RemoveHandCommand.cs index 729db4bc44..4a2956ae7a 100644 --- a/Content.Server/Body/Commands/RemoveHandCommand.cs +++ b/Content.Server/Body/Commands/RemoveHandCommand.cs @@ -4,7 +4,6 @@ using Content.Server.Body.Systems; using Content.Shared.Administration; using Content.Shared.Body.Components; using Content.Shared.Body.Part; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Random; @@ -22,7 +21,7 @@ namespace Content.Server.Body.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("Only a player can run this command."); diff --git a/Content.Server/Body/Systems/BodySystem.cs b/Content.Server/Body/Systems/BodySystem.cs index f2f848c488..242b02d78c 100644 --- a/Content.Server/Body/Systems/BodySystem.cs +++ b/Content.Server/Body/Systems/BodySystem.cs @@ -116,7 +116,7 @@ public sealed class BodySystem : SharedBodySystem if (!Resolve(bodyId, ref body, false)) return new HashSet(); - if (LifeStage(bodyId) >= EntityLifeStage.Terminating || EntityManager.IsQueuedForDeletion(bodyId)) + if (TerminatingOrDeleted(bodyId) || EntityManager.IsQueuedForDeletion(bodyId)) return new HashSet(); var xform = Transform(bodyId); diff --git a/Content.Server/Body/Systems/InternalsSystem.cs b/Content.Server/Body/Systems/InternalsSystem.cs index ec4faa345c..17a6544976 100644 --- a/Content.Server/Body/Systems/InternalsSystem.cs +++ b/Content.Server/Body/Systems/InternalsSystem.cs @@ -197,6 +197,14 @@ public sealed class InternalsSystem : EntitySystem return true; } + public bool AreInternalsWorking(EntityUid uid, InternalsComponent? component = null) + { + if (!Resolve(uid, ref component, false)) + return false; + + return AreInternalsWorking(component); + } + public bool AreInternalsWorking(InternalsComponent component) { return TryComp(component.BreathToolEntity, out BreathToolComponent? breathTool) && diff --git a/Content.Server/Cargo/Systems/CargoSystem.Orders.cs b/Content.Server/Cargo/Systems/CargoSystem.Orders.cs index d9327b5150..f659357ad3 100644 --- a/Content.Server/Cargo/Systems/CargoSystem.Orders.cs +++ b/Content.Server/Cargo/Systems/CargoSystem.Orders.cs @@ -8,7 +8,7 @@ using Content.Shared.Cargo.Events; using Content.Shared.Cargo.Prototypes; using Content.Shared.Database; using Robust.Shared.Map; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Utility; diff --git a/Content.Server/CartridgeLoader/CartridgeLoaderSystem.cs b/Content.Server/CartridgeLoader/CartridgeLoaderSystem.cs index 9f7acce4fd..02b2eee771 100644 --- a/Content.Server/CartridgeLoader/CartridgeLoaderSystem.cs +++ b/Content.Server/CartridgeLoader/CartridgeLoaderSystem.cs @@ -6,9 +6,9 @@ using Content.Shared.CartridgeLoader; using Content.Shared.Interaction; using Robust.Server.Containers; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Containers; using Robust.Shared.Map; +using Robust.Shared.Player; namespace Content.Server.CartridgeLoader; @@ -98,7 +98,7 @@ public sealed class CartridgeLoaderSystem : SharedCartridgeLoaderSystem /// and use this method to update its state so the cartridge loaders state can be added to it. /// /// - public void UpdateUiState(EntityUid loaderUid, IPlayerSession? session, CartridgeLoaderComponent? loader) + public void UpdateUiState(EntityUid loaderUid, ICommonSession? session, CartridgeLoaderComponent? loader) { if (!Resolve(loaderUid, ref loader)) return; @@ -122,7 +122,7 @@ public sealed class CartridgeLoaderSystem : SharedCartridgeLoaderSystem /// This method is called "UpdateCartridgeUiState" but cartridges and a programs are the same. A cartridge is just a program as a visible item. /// /// - public void UpdateCartridgeUiState(EntityUid loaderUid, BoundUserInterfaceState state, IPlayerSession? session = default!, CartridgeLoaderComponent? loader = default!) + public void UpdateCartridgeUiState(EntityUid loaderUid, BoundUserInterfaceState state, ICommonSession? session = default!, CartridgeLoaderComponent? loader = default!) { if (!Resolve(loaderUid, ref loader)) return; diff --git a/Content.Server/Chat/Commands/AdminChatCommand.cs b/Content.Server/Chat/Commands/AdminChatCommand.cs index 8aa95ffee1..979051e9d3 100644 --- a/Content.Server/Chat/Commands/AdminChatCommand.cs +++ b/Content.Server/Chat/Commands/AdminChatCommand.cs @@ -1,7 +1,6 @@ using Content.Server.Administration; using Content.Server.Chat.Managers; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Chat.Commands @@ -15,7 +14,7 @@ namespace Content.Server.Chat.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = (IPlayerSession?) shell.Player; + var player = shell.Player; if (player == null) { diff --git a/Content.Server/Chat/Commands/LOOCCommand.cs b/Content.Server/Chat/Commands/LOOCCommand.cs index a897a0b2bf..9e16193fc3 100644 --- a/Content.Server/Chat/Commands/LOOCCommand.cs +++ b/Content.Server/Chat/Commands/LOOCCommand.cs @@ -1,6 +1,5 @@ using Content.Server.Chat.Systems; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Enums; @@ -15,7 +14,7 @@ namespace Content.Server.Chat.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError("This command cannot be run from the server."); return; diff --git a/Content.Server/Chat/Commands/MeCommand.cs b/Content.Server/Chat/Commands/MeCommand.cs index 36f86cf4d6..e763d5656e 100644 --- a/Content.Server/Chat/Commands/MeCommand.cs +++ b/Content.Server/Chat/Commands/MeCommand.cs @@ -1,6 +1,5 @@ using Content.Server.Chat.Systems; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Enums; @@ -15,7 +14,7 @@ namespace Content.Server.Chat.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError("This command cannot be run from the server."); return; diff --git a/Content.Server/Chat/Commands/OOCCommand.cs b/Content.Server/Chat/Commands/OOCCommand.cs index bef2024608..36f6303fbd 100644 --- a/Content.Server/Chat/Commands/OOCCommand.cs +++ b/Content.Server/Chat/Commands/OOCCommand.cs @@ -1,6 +1,5 @@ using Content.Server.Chat.Managers; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Chat.Commands @@ -14,7 +13,7 @@ namespace Content.Server.Chat.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError("This command cannot be run from the server."); return; diff --git a/Content.Server/Chat/Commands/SayCommand.cs b/Content.Server/Chat/Commands/SayCommand.cs index 7c2125d8c1..273f908c9a 100644 --- a/Content.Server/Chat/Commands/SayCommand.cs +++ b/Content.Server/Chat/Commands/SayCommand.cs @@ -1,6 +1,5 @@ using Content.Server.Chat.Systems; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Enums; @@ -15,7 +14,7 @@ namespace Content.Server.Chat.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError("This command cannot be run from the server."); return; diff --git a/Content.Server/Chat/Commands/SuicideCommand.cs b/Content.Server/Chat/Commands/SuicideCommand.cs index 389ff039bf..c967ba78d7 100644 --- a/Content.Server/Chat/Commands/SuicideCommand.cs +++ b/Content.Server/Chat/Commands/SuicideCommand.cs @@ -1,7 +1,6 @@ using Content.Server.GameTicking; using Content.Shared.Administration; using Content.Shared.Mind; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Enums; @@ -18,7 +17,7 @@ namespace Content.Server.Chat.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteLine(Loc.GetString("shell-cannot-run-command-from-server")); return; diff --git a/Content.Server/Chat/Commands/WhisperCommand.cs b/Content.Server/Chat/Commands/WhisperCommand.cs index 41eba8b384..c88e2519ee 100644 --- a/Content.Server/Chat/Commands/WhisperCommand.cs +++ b/Content.Server/Chat/Commands/WhisperCommand.cs @@ -1,6 +1,5 @@ using Content.Server.Chat.Systems; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Enums; @@ -15,7 +14,7 @@ namespace Content.Server.Chat.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError("This command cannot be run from the server."); return; diff --git a/Content.Server/Chat/Managers/ChatManager.cs b/Content.Server/Chat/Managers/ChatManager.cs index 88e143d24e..59a9d305bd 100644 --- a/Content.Server/Chat/Managers/ChatManager.cs +++ b/Content.Server/Chat/Managers/ChatManager.cs @@ -10,11 +10,9 @@ using Content.Shared.CCVar; using Content.Shared.Chat; using Content.Shared.Database; using Content.Shared.Mind; -using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Network; using Robust.Shared.Player; -using Robust.Shared.Players; using Robust.Shared.Replays; using Robust.Shared.Utility; @@ -51,8 +49,8 @@ namespace Content.Server.Chat.Managers private bool _oocEnabled = true; private bool _adminOocEnabled = true; - public Dictionary SenderKeys { get; } = new(); - public Dictionary> SenderEntities { get; } = new(); + public Dictionary SenderKeys { get; } = new(); + public Dictionary> SenderEntities { get; } = new(); public void Initialize() { @@ -79,7 +77,7 @@ namespace Content.Server.Chat.Managers DispatchServerAnnouncement(Loc.GetString(val ? "chat-manager-admin-ooc-chat-enabled-message" : "chat-manager-admin-ooc-chat-disabled-message")); } - public void DeleteMessagesBy(IPlayerSession player) + public void DeleteMessagesBy(ICommonSession player) { var key = SenderKeys.GetValueOrDefault(player); var entities = SenderEntities.GetValueOrDefault(player) ?? new HashSet(); @@ -165,7 +163,7 @@ namespace Content.Server.Chat.Managers /// The player sending the message. /// The message. /// The type of message. - public void TrySendOOCMessage(IPlayerSession player, string message, OOCChatType type) + public void TrySendOOCMessage(ICommonSession player, string message, OOCChatType type) { // Check if message exceeds the character limit if (message.Length > MaxMessageLength) @@ -189,7 +187,7 @@ namespace Content.Server.Chat.Managers #region Private API - private void SendOOC(IPlayerSession player, string message) + private void SendOOC(ICommonSession player, string message) { if (_adminManager.IsAdmin(player)) { @@ -226,7 +224,7 @@ namespace Content.Server.Chat.Managers _adminLogger.Add(LogType.Chat, LogImpact.Low, $"OOC from {player:Player}: {message}"); } - private void SendAdminChat(IPlayerSession player, string message) + private void SendAdminChat(ICommonSession player, string message) { if (!_adminManager.IsAdmin(player)) { @@ -326,7 +324,7 @@ namespace Content.Server.Chat.Managers } } - public bool MessageCharacterLimit(IPlayerSession? player, string message) + public bool MessageCharacterLimit(ICommonSession? player, string message) { var isOverLength = false; diff --git a/Content.Server/Chat/Managers/IChatManager.cs b/Content.Server/Chat/Managers/IChatManager.cs index 10103f011d..5317b3054e 100644 --- a/Content.Server/Chat/Managers/IChatManager.cs +++ b/Content.Server/Chat/Managers/IChatManager.cs @@ -1,8 +1,6 @@ using Content.Shared.Chat; -using Robust.Server.Player; using Robust.Shared.Network; using Robust.Shared.Player; -using Robust.Shared.Players; namespace Content.Server.Chat.Managers { @@ -12,12 +10,12 @@ namespace Content.Server.Chat.Managers /// Keys identifying messages sent by a specific player, used when sending /// /// - Dictionary SenderKeys { get; } + Dictionary SenderKeys { get; } /// /// Tracks which entities a player was attached to while sending messages. /// - Dictionary> SenderEntities { get; } + Dictionary> SenderEntities { get; } void Initialize(); @@ -30,7 +28,7 @@ namespace Content.Server.Chat.Managers void DispatchServerMessage(ICommonSession player, string message, bool suppressLog = false); - void TrySendOOCMessage(IPlayerSession player, string message, OOCChatType type); + void TrySendOOCMessage(ICommonSession player, string message, OOCChatType type); void SendHookOOC(string sender, string message); void SendAdminAnnouncement(string message); @@ -47,8 +45,8 @@ namespace Content.Server.Chat.Managers void ChatMessageToAll(ChatChannel channel, string message, string wrappedMessage, EntityUid source, bool hideChat, bool recordReplay, Color? colorOverride = null, string? audioPath = null, float audioVolume = 0, int? senderKey = null); - bool MessageCharacterLimit(IPlayerSession player, string message); + bool MessageCharacterLimit(ICommonSession player, string message); - void DeleteMessagesBy(IPlayerSession player); + void DeleteMessagesBy(ICommonSession player); } } diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs index 91739d769d..b2eb668641 100644 --- a/Content.Server/Chat/Systems/ChatSystem.cs +++ b/Content.Server/Chat/Systems/ChatSystem.cs @@ -19,6 +19,7 @@ using Content.Shared.Ghost; using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.Mobs.Systems; +using Content.Shared.Players; using Content.Shared.Radio; using Robust.Server.GameObjects; using Robust.Server.Player; @@ -27,7 +28,6 @@ using Robust.Shared.Configuration; using Robust.Shared.Console; using Robust.Shared.Network; using Robust.Shared.Player; -using Robust.Shared.Players; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Replays; @@ -151,7 +151,7 @@ public sealed partial class ChatSystem : SharedChatSystem InGameICChatType desiredType, bool hideChat, bool hideLog = false, IConsoleShell? shell = null, - IPlayerSession? player = null, string? nameOverride = null, + ICommonSession? player = null, string? nameOverride = null, bool checkRadioPrefix = true, bool ignoreActionBlocker = false) { @@ -176,7 +176,7 @@ public sealed partial class ChatSystem : SharedChatSystem ChatTransmitRange range, bool hideLog = false, IConsoleShell? shell = null, - IPlayerSession? player = null, + ICommonSession? player = null, string? nameOverride = null, bool checkRadioPrefix = true, bool ignoreActionBlocker = false @@ -261,7 +261,7 @@ public sealed partial class ChatSystem : SharedChatSystem InGameOOCChatType type, bool hideChat, IConsoleShell? shell = null, - IPlayerSession? player = null + ICommonSession? player = null ) { if (!CanSendInGame(message, shell, player)) @@ -555,7 +555,7 @@ public sealed partial class ChatSystem : SharedChatSystem } // ReSharper disable once InconsistentNaming - private void SendLOOC(EntityUid source, IPlayerSession player, string message, bool hideChat) + private void SendLOOC(EntityUid source, ICommonSession player, string message, bool hideChat) { var name = FormattedMessage.EscapeText(Identity.Name(source, EntityManager)); @@ -579,7 +579,7 @@ public sealed partial class ChatSystem : SharedChatSystem _adminLogger.Add(LogType.Chat, LogImpact.Low, $"LOOC from {player:Player}: {message}"); } - private void SendDeadChat(EntityUid source, IPlayerSession player, string message, bool hideChat) + private void SendDeadChat(EntityUid source, ICommonSession player, string message, bool hideChat) { var clients = GetDeadChatClients(); var playerName = Name(source); @@ -636,13 +636,13 @@ public sealed partial class ChatSystem : SharedChatSystem initialResult = MessageRangeCheckResult.Full; break; case ChatTransmitRange.GhostRangeLimit: - initialResult = (data.Observer && data.Range < 0 && !_adminManager.IsAdmin((IPlayerSession) session)) ? MessageRangeCheckResult.HideChat : MessageRangeCheckResult.Full; + initialResult = (data.Observer && data.Range < 0 && !_adminManager.IsAdmin(session)) ? MessageRangeCheckResult.HideChat : MessageRangeCheckResult.Full; break; case ChatTransmitRange.HideChat: initialResult = MessageRangeCheckResult.HideChat; break; case ChatTransmitRange.NoGhosts: - initialResult = (data.Observer && !_adminManager.IsAdmin((IPlayerSession) session)) ? MessageRangeCheckResult.Disallowed : MessageRangeCheckResult.Full; + initialResult = (data.Observer && !_adminManager.IsAdmin(session)) ? MessageRangeCheckResult.Disallowed : MessageRangeCheckResult.Full; break; } var insistHideChat = data.HideChatOverride ?? false; @@ -674,7 +674,7 @@ public sealed partial class ChatSystem : SharedChatSystem /// /// Returns true if the given player is 'allowed' to send the given message, false otherwise. /// - private bool CanSendInGame(string message, IConsoleShell? shell = null, IPlayerSession? player = null) + private bool CanSendInGame(string message, IConsoleShell? shell = null, ICommonSession? player = null) { // Non-players don't have to worry about these restrictions. if (player == null) @@ -702,7 +702,7 @@ public sealed partial class ChatSystem : SharedChatSystem { var newMessage = message.Trim(); newMessage = SanitizeMessageReplaceWords(newMessage); - + if (capitalize) newMessage = SanitizeMessageCapital(newMessage); if (capitalizeTheWordI) diff --git a/Content.Server/Chemistry/Components/SmokeComponent.cs b/Content.Server/Chemistry/Components/SmokeComponent.cs deleted file mode 100644 index 133ad41f13..0000000000 --- a/Content.Server/Chemistry/Components/SmokeComponent.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Content.Shared.Fluids.Components; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; - -namespace Content.Server.Chemistry.Components; - -/// -/// Stores solution on an anchored entity that has touch and ingestion reactions -/// to entities that collide with it. Similar to -/// -[RegisterComponent] -public sealed partial class SmokeComponent : Component -{ - public const string SolutionName = "solutionArea"; - - [DataField("nextReact", customTypeSerializer:typeof(TimeOffsetSerializer))] - public TimeSpan NextReact = TimeSpan.Zero; - - [DataField("spreadAmount")] - public int SpreadAmount = 0; - - /// - /// Have we reacted with our tile yet? - /// - [DataField("reactedTile")] - public bool ReactedTile = false; -} diff --git a/Content.Server/Chemistry/EntitySystems/ChemistryGuideDataSystem.cs b/Content.Server/Chemistry/EntitySystems/ChemistryGuideDataSystem.cs index 8cbdd82f07..7485c0e901 100644 --- a/Content.Server/Chemistry/EntitySystems/ChemistryGuideDataSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/ChemistryGuideDataSystem.cs @@ -2,6 +2,7 @@ using Content.Shared.Chemistry.Reagent; using Robust.Server.Player; using Robust.Shared.Enums; +using Robust.Shared.Player; using Robust.Shared.Prototypes; namespace Content.Server.Chemistry.EntitySystems; diff --git a/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs b/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs index 708651d5cd..6b085d133e 100644 --- a/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs +++ b/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs @@ -1,6 +1,5 @@ using Content.Server.Body.Components; using Content.Server.Chemistry.Components; -using Content.Shared.Chemistry; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.EntitySystems; @@ -15,8 +14,7 @@ using Content.Shared.DoAfter; using Content.Shared.Mobs.Components; using Content.Shared.Verbs; using Content.Shared.Stacks; -using Robust.Server.GameObjects; -using Content.Shared.Popups; +using Robust.Shared.Player; namespace Content.Server.Chemistry.EntitySystems; diff --git a/Content.Server/Chemistry/EntitySystems/SolutionSpikableSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionSpikableSystem.cs index e27063b1b5..04aa6546a9 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionSpikableSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionSpikableSystem.cs @@ -61,35 +61,11 @@ public sealed class SolutionSpikableSystem : EntitySystem return; } - if (_solutionSystem.TryMixAndOverflow(target, - targetSolution, - sourceSolution, - targetSolution.MaxVolume, - out var overflow)) - { - if (overflow.Volume > 0) - { - RaiseLocalEvent(target, new SolutionSpikeOverflowEvent(overflow)); - } + if (!_solutionSystem.ForceAddSolution(target, targetSolution, sourceSolution)) + return; - _popupSystem.PopupEntity(Loc.GetString(spikableSource.Popup, ("spiked-entity", target), ("spike-entity", source)), user, user); - - sourceSolution.RemoveAllSolution(); - - _triggerSystem.Trigger(source, user); - } - } -} - -public sealed class SolutionSpikeOverflowEvent : HandledEntityEventArgs -{ - /// - /// The solution that's been overflowed from the spike. - /// - public Solution Overflow { get; } - - public SolutionSpikeOverflowEvent(Solution overflow) - { - Overflow = overflow; + _popupSystem.PopupEntity(Loc.GetString(spikableSource.Popup, ("spiked-entity", target), ("spike-entity", source)), user, user); + sourceSolution.RemoveAllSolution(); + _triggerSystem.Trigger(source, user); } } diff --git a/Content.Server/Chemistry/EntitySystems/SolutionTransferSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionTransferSystem.cs index 99f8c1a517..d2666417cf 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionTransferSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionTransferSystem.cs @@ -4,12 +4,12 @@ using JetBrains.Annotations; using Robust.Server.GameObjects; using Content.Shared.Chemistry; using Content.Shared.Chemistry.Components; -using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Database; using Content.Shared.FixedPoint; using Content.Shared.Interaction; using Content.Shared.Popups; +using Robust.Shared.Player; namespace Content.Server.Chemistry.EntitySystems { diff --git a/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs b/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs index e6eaab8a59..291a654422 100644 --- a/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs +++ b/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs @@ -1,4 +1,3 @@ -using Content.Server.Chemistry.Components; using Content.Server.Fluids.EntitySystems; using Content.Shared.Audio; using Content.Shared.Chemistry.EntitySystems; @@ -10,7 +9,6 @@ using Content.Shared.Maps; using JetBrains.Annotations; using Robust.Shared.Audio; using Robust.Shared.Map; -using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; @@ -71,18 +69,10 @@ namespace Content.Server.Chemistry.ReactionEffects var coords = grid.MapToGrid(transform.MapPosition); var ent = args.EntityManager.SpawnEntity(_prototypeId, coords.SnapToGrid()); - if (!args.EntityManager.TryGetComponent(ent, out var smokeComponent)) - { - Logger.Error("Couldn't get AreaEffectComponent from " + _prototypeId); - args.EntityManager.QueueDeleteEntity(ent); - return; - } - var smoke = args.EntityManager.System(); - smokeComponent.SpreadAmount = spreadAmount; - smoke.Start(ent, smokeComponent, splitSolution, _duration); + smoke.StartSmoke(ent, splitSolution, _duration, spreadAmount); - SoundSystem.Play(_sound.GetSound(), Filter.Pvs(args.SolutionEntity), args.SolutionEntity, AudioHelpers.WithVariation(0.125f)); + args.EntityManager.System().PlayPvs(_sound, args.SolutionEntity, AudioHelpers.WithVariation(0.125f)); } } } diff --git a/Content.Server/Chunking/ChunkingSystem.cs b/Content.Server/Chunking/ChunkingSystem.cs index 4ef44d1678..6f44c43be8 100644 --- a/Content.Server/Chunking/ChunkingSystem.cs +++ b/Content.Server/Chunking/ChunkingSystem.cs @@ -1,12 +1,12 @@ using System.Linq; using Content.Shared.Decals; using Microsoft.Extensions.ObjectPool; -using Robust.Server.Player; using Robust.Shared; using Robust.Shared.Configuration; using Robust.Shared.Enums; using Robust.Shared.Map; using Robust.Shared.Map.Components; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Shared.Chunking; @@ -41,7 +41,7 @@ public sealed class ChunkingSystem : EntitySystem private void OnPvsRangeChanged(float value) => _baseViewBounds = Box2.UnitCentered.Scale(value); public Dictionary> GetChunksForSession( - IPlayerSession session, + ICommonSession session, int chunkSize, ObjectPool> indexPool, ObjectPool>> viewerPool, @@ -52,7 +52,7 @@ public sealed class ChunkingSystem : EntitySystem return chunks; } - private HashSet GetSessionViewers(IPlayerSession session) + private HashSet GetSessionViewers(ICommonSession session) { var viewers = new HashSet(); if (session.Status != SessionStatus.InGame || session.AttachedEntity is null) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index 28e9c8eea5..a16c47dbcd 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -377,22 +377,4 @@ namespace Content.Server.Cloning ClonesWaitingForMind.Clear(); } } - - /// - /// Raised after a new mob got spawned when cloning a humanoid - /// - [ByRefEvent] - public struct CloningEvent - { - public bool NameHandled = false; - - public readonly EntityUid Source; - public readonly EntityUid Target; - - public CloningEvent(EntityUid source, EntityUid target) - { - Source = source; - Target = target; - } - } } diff --git a/Content.Server/Cloning/Components/CloningPodComponent.cs b/Content.Server/Cloning/Components/CloningPodComponent.cs deleted file mode 100644 index e2c3f46978..0000000000 --- a/Content.Server/Cloning/Components/CloningPodComponent.cs +++ /dev/null @@ -1,107 +0,0 @@ -using Content.Shared.Cloning; -using Content.Shared.Construction.Prototypes; -using Content.Shared.Materials; -using Robust.Shared.Audio; -using Robust.Shared.Containers; -using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; - -namespace Content.Server.Cloning.Components -{ - [RegisterComponent] - public sealed partial class CloningPodComponent : Component - { - public const string PodPort = "CloningPodReceiver"; - - [ViewVariables] - public ContainerSlot BodyContainer = default!; - - /// - /// How long the cloning has been going on for. - /// - [ViewVariables] - public float CloningProgress = 0; - - [ViewVariables] - public int UsedBiomass = 70; - - [ViewVariables] - public bool FailedClone = false; - - /// - /// The material that is used to clone entities. - /// - [DataField("requiredMaterial", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)] - public string RequiredMaterial = "Biomass"; - - /// - /// The base amount of time it takes to clone a body - /// - [DataField("baseCloningTime")] - public float BaseCloningTime = 30f; - - /// - /// The multiplier for cloning duration - /// - [DataField("partRatingSpeedMultiplier")] - public float PartRatingSpeedMultiplier = 0.75f; - - /// - /// The machine part that affects cloning speed - /// - [DataField("machinePartCloningSpeed", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string MachinePartCloningSpeed = "Manipulator"; - - /// - /// The current amount of time it takes to clone a body - /// - [ViewVariables(VVAccess.ReadWrite)] - public float CloningTime = 30f; - - /// - /// The mob to spawn on emag - /// - [ViewVariables(VVAccess.ReadWrite), DataField("mobSpawnId", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string MobSpawnId = "MobAbomination"; - - /// - /// Emag sound effects. - /// - [DataField("sparkSound")] - public SoundSpecifier SparkSound = new SoundCollectionSpecifier("sparks") - { - Params = AudioParams.Default.WithVolume(8), - }; - - [DataField("screamSound")] - public SoundSpecifier ScreamSound = new SoundCollectionSpecifier("ZombieScreams") - { - Params = AudioParams.Default.WithVolume(4), - }; - - /// - /// The machine part that affects how much biomass is needed to clone a body. - /// - [DataField("partRatingMaterialMultiplier")] - public float PartRatingMaterialMultiplier = 0.85f; - - /// - /// The current multiplier on the body weight, which determines the - /// amount of biomass needed to clone. - /// - [ViewVariables(VVAccess.ReadWrite)] - public float BiomassRequirementMultiplier = 1; - - /// - /// The machine part that decreases the amount of material needed for cloning - /// - [DataField("machinePartMaterialUse", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string MachinePartMaterialUse = "MatterBin"; - - [ViewVariables(VVAccess.ReadWrite)] - public CloningPodStatus Status; - - [ViewVariables] - public EntityUid? ConnectedConsole; - } -} diff --git a/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs b/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs index 7dc3b8489d..a087ebdd49 100644 --- a/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs +++ b/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs @@ -5,6 +5,7 @@ using Content.Shared.IdentityManagement.Components; using Content.Shared.Prototypes; using Content.Shared.Verbs; using Robust.Server.GameObjects; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Utility; diff --git a/Content.Server/Commands/CommandUtils.cs b/Content.Server/Commands/CommandUtils.cs index 11adaec9a2..172f3324e3 100644 --- a/Content.Server/Commands/CommandUtils.cs +++ b/Content.Server/Commands/CommandUtils.cs @@ -3,6 +3,7 @@ using System.Globalization; using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Network; +using Robust.Shared.Player; namespace Content.Server.Commands { @@ -16,7 +17,7 @@ namespace Content.Server.Commands /// sending a failure to the performer if unable to. /// public static bool TryGetSessionByUsernameOrId(IConsoleShell shell, - string usernameOrId, IPlayerSession performer, [NotNullWhen(true)] out IPlayerSession? session) + string usernameOrId, ICommonSession performer, [NotNullWhen(true)] out ICommonSession? session) { var plyMgr = IoCManager.Resolve(); if (plyMgr.TryGetSessionByUsername(usernameOrId, out session)) return true; @@ -36,7 +37,7 @@ namespace Content.Server.Commands /// sending a failure to the performer if unable to. /// public static bool TryGetAttachedEntityByUsernameOrId(IConsoleShell shell, - string usernameOrId, IPlayerSession performer, out EntityUid attachedEntity) + string usernameOrId, ICommonSession performer, out EntityUid attachedEntity) { attachedEntity = default; if (!TryGetSessionByUsernameOrId(shell, usernameOrId, performer, out var session)) return false; @@ -67,7 +68,7 @@ namespace Content.Server.Commands transform.LocalPosition.Y.ToString(CultureInfo.InvariantCulture)); ruleString = ruleString.Replace("$NAME", entMan.GetComponent(ent).EntityName); - if (shell.Player is IPlayerSession player) + if (shell.Player is { } player) { if (player.AttachedEntity is {Valid: true} p) { diff --git a/Content.Server/Configurable/ConfigurationSystem.cs b/Content.Server/Configurable/ConfigurationSystem.cs index c134c1a87d..eb31149eca 100644 --- a/Content.Server/Configurable/ConfigurationSystem.cs +++ b/Content.Server/Configurable/ConfigurationSystem.cs @@ -3,6 +3,7 @@ using Content.Shared.Interaction; using Content.Shared.Tools.Components; using Robust.Server.GameObjects; using Robust.Shared.Containers; +using Robust.Shared.Player; using static Content.Shared.Configurable.ConfigurationComponent; namespace Content.Server.Configurable; diff --git a/Content.Server/Construction/Commands/FixRotationsCommand.cs b/Content.Server/Construction/Commands/FixRotationsCommand.cs index d23fa0a31b..bdbfaf170d 100644 --- a/Content.Server/Construction/Commands/FixRotationsCommand.cs +++ b/Content.Server/Construction/Commands/FixRotationsCommand.cs @@ -3,7 +3,6 @@ using Content.Server.Power.Components; using Content.Shared.Administration; using Content.Shared.Construction; using Content.Shared.Tag; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Map.Components; @@ -21,7 +20,7 @@ namespace Content.Server.Construction.Commands public void Execute(IConsoleShell shell, string argsOther, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; EntityUid? gridId; var xformQuery = _entManager.GetEntityQuery(); diff --git a/Content.Server/Construction/Commands/TileReplaceCommand.cs b/Content.Server/Construction/Commands/TileReplaceCommand.cs index ed1fba2424..f63fd4c13e 100644 --- a/Content.Server/Construction/Commands/TileReplaceCommand.cs +++ b/Content.Server/Construction/Commands/TileReplaceCommand.cs @@ -1,6 +1,5 @@ using Content.Server.Administration; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Map; using Robust.Shared.Map.Components; @@ -20,7 +19,7 @@ sealed class TileReplaceCommand : IConsoleCommand public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; EntityUid? gridId; string tileIdA; string tileIdB; diff --git a/Content.Server/Construction/Commands/TileWallsCommand.cs b/Content.Server/Construction/Commands/TileWallsCommand.cs index 55389e41cc..731d4da7f8 100644 --- a/Content.Server/Construction/Commands/TileWallsCommand.cs +++ b/Content.Server/Construction/Commands/TileWallsCommand.cs @@ -2,10 +2,9 @@ using Content.Server.Administration; using Content.Shared.Administration; using Content.Shared.Maps; using Content.Shared.Tag; -using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Map; +using Robust.Server.GameObjects; using Robust.Shared.Map.Components; namespace Content.Server.Construction.Commands @@ -29,7 +28,7 @@ namespace Content.Server.Construction.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; EntityUid? gridId; switch (args.Length) diff --git a/Content.Server/Construction/ConstructionSystem.Initial.cs b/Content.Server/Construction/ConstructionSystem.Initial.cs index e74edb5da2..21978f2d0c 100644 --- a/Content.Server/Construction/ConstructionSystem.Initial.cs +++ b/Content.Server/Construction/ConstructionSystem.Initial.cs @@ -16,7 +16,7 @@ using Content.Shared.Interaction; using Content.Shared.Inventory; using Content.Shared.Storage; using Robust.Shared.Containers; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Server.Construction diff --git a/Content.Server/Crayon/CrayonSystem.cs b/Content.Server/Crayon/CrayonSystem.cs index d225df2dae..16385d4d7e 100644 --- a/Content.Server/Crayon/CrayonSystem.cs +++ b/Content.Server/Crayon/CrayonSystem.cs @@ -12,8 +12,8 @@ using Content.Shared.Interaction.Events; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.GameStates; +using Robust.Shared.Player; using Robust.Shared.Prototypes; -using Robust.Shared.Random; namespace Content.Server.Crayon; diff --git a/Content.Server/CrewManifest/CrewManifestSystem.cs b/Content.Server/CrewManifest/CrewManifestSystem.cs index aed0575324..4c4f17f61d 100644 --- a/Content.Server/CrewManifest/CrewManifestSystem.cs +++ b/Content.Server/CrewManifest/CrewManifestSystem.cs @@ -10,10 +10,9 @@ using Content.Shared.CCVar; using Content.Shared.CrewManifest; using Content.Shared.GameTicking; using Content.Shared.StationRecords; -using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Console; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.CrewManifest; @@ -60,7 +59,7 @@ public sealed class CrewManifestSystem : EntitySystem private void OnRequestCrewManifest(RequestCrewManifestMessage message, EntitySessionEventArgs args) { - if (args.SenderSession is not IPlayerSession sessionCast + if (args.SenderSession is not { } sessionCast || !_configManager.GetCVar(CCVars.CrewManifestWithoutEntity)) { return; @@ -93,12 +92,12 @@ public sealed class CrewManifestSystem : EntitySystem private void OnBoundUiClose(EntityUid uid, CrewManifestViewerComponent component, BoundUIClosedEvent ev) { var owningStation = _stationSystem.GetOwningStation(uid); - if (owningStation == null || ev.Session is not IPlayerSession sessionCast) + if (owningStation == null || ev.Session is not { } session) { return; } - CloseEui(owningStation.Value, sessionCast, uid); + CloseEui(owningStation.Value, session, uid); } /// @@ -126,7 +125,7 @@ public sealed class CrewManifestSystem : EntitySystem private void OpenEuiFromBui(EntityUid uid, CrewManifestViewerComponent component, CrewManifestOpenUiMessage msg) { var owningStation = _stationSystem.GetOwningStation(uid); - if (owningStation == null || msg.Session is not IPlayerSession sessionCast) + if (owningStation == null || msg.Session is not { } session) { return; } @@ -136,7 +135,7 @@ public sealed class CrewManifestSystem : EntitySystem return; } - OpenEui(owningStation.Value, sessionCast, uid); + OpenEui(owningStation.Value, session, uid); } /// @@ -145,7 +144,7 @@ public sealed class CrewManifestSystem : EntitySystem /// Station that we're displaying the crew manifest for. /// The player's session. /// If this EUI should be 'owned' by an entity. - public void OpenEui(EntityUid station, IPlayerSession session, EntityUid? owner = null) + public void OpenEui(EntityUid station, ICommonSession session, EntityUid? owner = null) { if (!HasComp(station)) { @@ -252,7 +251,7 @@ public sealed class CrewManifestCommand : IConsoleCommand return; } - if (shell.Player == null || shell.Player is not IPlayerSession session) + if (shell.Player == null || shell.Player is not { } session) { shell.WriteLine("You must run this from a client."); return; diff --git a/Content.Server/Damage/Commands/GodModeCommand.cs b/Content.Server/Damage/Commands/GodModeCommand.cs index 92a0e53f0f..866737f17a 100644 --- a/Content.Server/Damage/Commands/GodModeCommand.cs +++ b/Content.Server/Damage/Commands/GodModeCommand.cs @@ -1,8 +1,6 @@ using Content.Server.Administration; -using Content.Server.Damage.Systems; using Content.Shared.Administration; using Content.Shared.Damage.Systems; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Damage.Commands @@ -18,7 +16,7 @@ namespace Content.Server.Damage.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; EntityUid entity; switch (args.Length) diff --git a/Content.Server/Damage/ForceSay/DamageForceSaySystem.cs b/Content.Server/Damage/ForceSay/DamageForceSaySystem.cs index 3d3346403a..5bc30cce5d 100644 --- a/Content.Server/Damage/ForceSay/DamageForceSaySystem.cs +++ b/Content.Server/Damage/ForceSay/DamageForceSaySystem.cs @@ -4,9 +4,7 @@ using Content.Shared.FixedPoint; using Content.Shared.Mobs; using Content.Shared.Mobs.Systems; using Content.Shared.Stunnable; -using Robust.Server.GameObjects; -using Robust.Server.Player; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Timing; diff --git a/Content.Server/Database/UserDbDataManager.cs b/Content.Server/Database/UserDbDataManager.cs index f2c506240b..f8b1611fd5 100644 --- a/Content.Server/Database/UserDbDataManager.cs +++ b/Content.Server/Database/UserDbDataManager.cs @@ -2,8 +2,8 @@ using System.Threading.Tasks; using Content.Server.Players.PlayTimeTracking; using Content.Server.Preferences.Managers; -using Robust.Server.Player; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Database; @@ -25,7 +25,7 @@ public sealed class UserDbDataManager // TODO: Ideally connected/disconnected would be subscribed to IPlayerManager directly, // but this runs into ordering issues with game ticker. - public void ClientConnected(IPlayerSession session) + public void ClientConnected(ICommonSession session) { DebugTools.Assert(!_users.ContainsKey(session.UserId), "We should not have any cached data on client connect."); @@ -36,7 +36,7 @@ public sealed class UserDbDataManager _users.Add(session.UserId, data); } - public void ClientDisconnected(IPlayerSession session) + public void ClientDisconnected(ICommonSession session) { _users.Remove(session.UserId, out var data); if (data == null) @@ -49,24 +49,24 @@ public sealed class UserDbDataManager _playTimeTracking.ClientDisconnected(session); } - private async Task Load(IPlayerSession session, CancellationToken cancel) + private async Task Load(ICommonSession session, CancellationToken cancel) { await Task.WhenAll( _prefs.LoadData(session, cancel), _playTimeTracking.LoadData(session, cancel)); } - public Task WaitLoadComplete(IPlayerSession session) + public Task WaitLoadComplete(ICommonSession session) { return _users[session.UserId].Task; } - public bool IsLoadComplete(IPlayerSession session) + public bool IsLoadComplete(ICommonSession session) { return GetLoadTask(session).IsCompleted; } - public Task GetLoadTask(IPlayerSession session) + public Task GetLoadTask(ICommonSession session) { return _users[session.UserId].Task; } diff --git a/Content.Server/Decals/DecalSystem.cs b/Content.Server/Decals/DecalSystem.cs index ed281e05ba..ce2e0711e7 100644 --- a/Content.Server/Decals/DecalSystem.cs +++ b/Content.Server/Decals/DecalSystem.cs @@ -16,6 +16,7 @@ using Robust.Shared.Configuration; using Robust.Shared.Enums; using Robust.Shared.Map; using Robust.Shared.Map.Components; +using Robust.Shared.Player; using Robust.Shared.Threading; using Robust.Shared.Timing; using Robust.Shared.Utility; @@ -36,7 +37,7 @@ namespace Content.Server.Decals [Dependency] private readonly MapSystem _mapSystem = default!; private readonly Dictionary> _dirtyChunks = new(); - private readonly Dictionary>> _previousSentChunks = new(); + private readonly Dictionary>> _previousSentChunks = new(); private static readonly Vector2 _boundsMinExpansion = new(0.01f, 0.01f); private static readonly Vector2 _boundsMaxExpansion = new(1.01f, 1.01f); @@ -197,7 +198,7 @@ namespace Content.Server.Decals private void OnDecalPlacementRequest(RequestDecalPlacementEvent ev, EntitySessionEventArgs eventArgs) { - if (eventArgs.SenderSession is not IPlayerSession session) + if (eventArgs.SenderSession is not { } session) return; // bad @@ -226,7 +227,7 @@ namespace Content.Server.Decals private void OnDecalRemovalRequest(RequestDecalRemovalEvent ev, EntitySessionEventArgs eventArgs) { - if (eventArgs.SenderSession is not IPlayerSession session) + if (eventArgs.SenderSession is not { } session) return; // bad @@ -427,7 +428,7 @@ namespace Content.Server.Decals if (PvsEnabled) { - var players = _playerManager.ServerSessions.Where(x => x.Status == SessionStatus.InGame).ToArray(); + var players = _playerManager.Sessions.Where(x => x.Status == SessionStatus.InGame).ToArray(); var opts = new ParallelOptions { MaxDegreeOfParallelism = _parMan.ParallelProcessCount }; Parallel.ForEach(players, opts, UpdatePlayer); } @@ -435,7 +436,7 @@ namespace Content.Server.Decals _dirtyChunks.Clear(); } - public void UpdatePlayer(IPlayerSession player) + public void UpdatePlayer(ICommonSession player) { var chunksInRange = _chunking.GetChunksForSession(player, ChunkSize, _chunkIndexPool, _chunkViewerPool); var staleChunks = _chunkViewerPool.Get(); @@ -530,7 +531,7 @@ namespace Content.Server.Decals } private void SendChunkUpdates( - IPlayerSession session, + ICommonSession session, Dictionary> updatedChunks, Dictionary> staleChunks) { diff --git a/Content.Server/DeltaV/Administration/Commands/LoadCharacter.cs b/Content.Server/DeltaV/Administration/Commands/LoadCharacter.cs index 1782028f71..425078bcc7 100644 --- a/Content.Server/DeltaV/Administration/Commands/LoadCharacter.cs +++ b/Content.Server/DeltaV/Administration/Commands/LoadCharacter.cs @@ -7,10 +7,12 @@ using Content.Server.Station.Systems; using Content.Shared.Administration; using Content.Shared.Humanoid; using Content.Shared.Humanoid.Prototypes; +using Content.Shared.Players; using Content.Shared.Preferences; using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Prototypes; // This literally only exists because haha felinid oni @@ -30,7 +32,7 @@ public sealed class LoadCharacter : IConsoleCommand public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not ICommonSession player) { shell.WriteError(Loc.GetString("shell-only-players-can-run-this-command")); return; @@ -118,9 +120,9 @@ public sealed class LoadCharacter : IConsoleCommand var coordinates = player.AttachedEntity != null ? _entityManager.GetComponent(player.AttachedEntity.Value).Coordinates - : _entitySys.GetEntitySystem().GetObserverSpawnPoint(); + : EntitySystem.Get().GetObserverSpawnPoint(); - _entityManager.System() + EntitySystem.Get() .SpawnPlayerMob(coordinates, profile: character, entity: target, job: null, station: null); shell.WriteLine(Loc.GetString("loadcharacter-command-complete")); @@ -134,8 +136,7 @@ public sealed class LoadCharacter : IConsoleCommand return CompletionResult.FromHint(Loc.GetString("shell-argument-uid")); case 2: { - var player = shell.Player as IPlayerSession; - if (player == null) + if (shell.Player is not ICommonSession player) return CompletionResult.Empty; var data = player.ContentData(); diff --git a/Content.Server/DeltaV/Administration/Commands/SpawnCharacter.cs b/Content.Server/DeltaV/Administration/Commands/SpawnCharacter.cs index 0361f4a946..17ea4a56cc 100644 --- a/Content.Server/DeltaV/Administration/Commands/SpawnCharacter.cs +++ b/Content.Server/DeltaV/Administration/Commands/SpawnCharacter.cs @@ -6,10 +6,12 @@ using Content.Server.Preferences.Managers; using Content.Server.Station.Systems; using Content.Shared.Administration; using Content.Shared.Mind; +using Content.Shared.Players; using Content.Shared.Preferences; using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Network; +using Robust.Shared.Player; namespace Content.Server.DeltaV.Administration.Commands; @@ -26,13 +28,13 @@ public sealed class SpawnCharacter : IConsoleCommand public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not ICommonSession player) { shell.WriteError(Loc.GetString("shell-only-players-can-run-this-command")); return; } - var mindSystem = _entitySys.GetEntitySystem(); + var mindSystem = _entityManager.System(); var data = player.ContentData(); @@ -90,7 +92,7 @@ public sealed class SpawnCharacter : IConsoleCommand { if (args.Length == 1) { - var player = shell.Player as IPlayerSession; + var player = shell.Player as ICommonSession; if (player == null) return CompletionResult.Empty; diff --git a/Content.Server/DeltaV/Harpy/HarpySingerSystem.cs b/Content.Server/DeltaV/Harpy/HarpySingerSystem.cs index 6e6417b51d..2e0428af19 100644 --- a/Content.Server/DeltaV/Harpy/HarpySingerSystem.cs +++ b/Content.Server/DeltaV/Harpy/HarpySingerSystem.cs @@ -15,6 +15,7 @@ using Content.Shared.Stunnable; using Content.Shared.UserInterface; using Content.Shared.Zombies; using Robust.Server.GameObjects; +using Robust.Shared.Player; using Robust.Shared.Prototypes; namespace Content.Server.DeltaV.Harpy diff --git a/Content.Server/DeltaV/NPC/Roboisseur/RoboisseurSystem.cs b/Content.Server/DeltaV/NPC/Roboisseur/RoboisseurSystem.cs index f8e6b0f65b..69bd37e674 100644 --- a/Content.Server/DeltaV/NPC/Roboisseur/RoboisseurSystem.cs +++ b/Content.Server/DeltaV/NPC/Roboisseur/RoboisseurSystem.cs @@ -7,6 +7,7 @@ using Content.Shared.Random.Helpers; using Content.Shared.Kitchen; using Robust.Server.GameObjects; using Content.Server.Materials; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Server.Roboisseur.Roboisseur diff --git a/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs b/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs index c250761687..a977a44287 100644 --- a/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs +++ b/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs @@ -17,6 +17,7 @@ using Content.Shared.Verbs; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Audio; +using Robust.Shared.Player; using Robust.Shared.Timing; using Robust.Shared.Utility; diff --git a/Content.Server/Disposal/Mailing/MailingUnitSystem.cs b/Content.Server/Disposal/Mailing/MailingUnitSystem.cs index 7993ccc07d..1a819ab0fb 100644 --- a/Content.Server/Disposal/Mailing/MailingUnitSystem.cs +++ b/Content.Server/Disposal/Mailing/MailingUnitSystem.cs @@ -7,6 +7,7 @@ using Content.Server.Power.Components; using Content.Shared.Disposal; using Content.Shared.Interaction; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Disposal.Mailing; diff --git a/Content.Server/Disposal/TubeConnectionsCommand.cs b/Content.Server/Disposal/TubeConnectionsCommand.cs index 7895dcbca6..55e6465937 100644 --- a/Content.Server/Disposal/TubeConnectionsCommand.cs +++ b/Content.Server/Disposal/TubeConnectionsCommand.cs @@ -2,7 +2,6 @@ using Content.Server.Administration; using Content.Server.Disposal.Tube; using Content.Server.Disposal.Tube.Components; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Disposal @@ -18,7 +17,7 @@ namespace Content.Server.Disposal public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player?.AttachedEntity == null) { shell.WriteLine(Loc.GetString("shell-only-players-can-run-this-command")); diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs index baec99b6a5..0e56d0fb18 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs @@ -32,6 +32,7 @@ using Robust.Shared.GameStates; using Robust.Shared.Map.Components; using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Events; +using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Utility; diff --git a/Content.Server/Doors/Systems/AirlockSystem.cs b/Content.Server/Doors/Systems/AirlockSystem.cs index ce517febf6..e234ba3304 100644 --- a/Content.Server/Doors/Systems/AirlockSystem.cs +++ b/Content.Server/Doors/Systems/AirlockSystem.cs @@ -6,10 +6,9 @@ using Content.Shared.Doors; using Content.Shared.Doors.Components; using Content.Shared.Doors.Systems; using Content.Shared.Interaction; -using Robust.Server.GameObjects; using Content.Shared.Wires; using Content.Shared.Prying.Components; -using Robust.Shared.Prototypes; +using Robust.Shared.Player; namespace Content.Server.Doors.Systems; @@ -178,11 +177,16 @@ public sealed class AirlockSystem : SharedAirlockSystem private void OnBeforePry(EntityUid uid, AirlockComponent component, ref BeforePryEvent args) { - if (this.IsPowered(uid, EntityManager) && !args.PryPowered) - { - Popup.PopupEntity(Loc.GetString("airlock-component-cannot-pry-is-powered-message"), uid, args.User); - args.Cancelled = true; - } + if (args.Cancelled) + return; + + if (!this.IsPowered(uid, EntityManager) || args.PryPowered) + return; + + args.Message = "airlock-component-cannot-pry-is-powered-message"; + + args.Cancelled = true; + } public bool CanChangeState(EntityUid uid, AirlockComponent component) diff --git a/Content.Server/EUI/BaseEui.cs b/Content.Server/EUI/BaseEui.cs index 4a41ad40a5..70cbfc3775 100644 --- a/Content.Server/EUI/BaseEui.cs +++ b/Content.Server/EUI/BaseEui.cs @@ -1,6 +1,6 @@ using Content.Shared.Eui; using Robust.Shared.Network; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.EUI { diff --git a/Content.Server/EUI/EuiManager.cs b/Content.Server/EUI/EuiManager.cs index 4d99719525..fe8e486b68 100644 --- a/Content.Server/EUI/EuiManager.cs +++ b/Content.Server/EUI/EuiManager.cs @@ -2,7 +2,7 @@ using Robust.Server.Player; using Robust.Shared.Enums; using Robust.Shared.Network; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.EUI diff --git a/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs b/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs index bb1690c935..b04c1296fc 100644 --- a/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs +++ b/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs @@ -1,8 +1,9 @@ using System.Linq; using Content.Server.Body.Systems; using Content.Shared.Alert; -using Content.Shared.Body.Components; using Content.Shared.Body.Part; +using Content.Shared.Damage.Components; +using Content.Shared.Damage.Systems; using Content.Shared.DoAfter; using Content.Shared.Ensnaring; using Content.Shared.Ensnaring.Components; @@ -17,6 +18,7 @@ public sealed partial class EnsnareableSystem [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly AlertsSystem _alerts = default!; [Dependency] private readonly BodySystem _body = default!; + [Dependency] private readonly StaminaSystem _stamina = default!; public void InitializeEnsnaring() { @@ -72,6 +74,15 @@ public sealed partial class EnsnareableSystem if (freeLegs <= 0) return; + // Apply stamina damage to target if they weren't ensnared before. + if (ensnareable.IsEnsnared != true) + { + if (TryComp(target, out var stamina)) + { + _stamina.TakeStaminaDamage(target, component.StaminaDamage, with: ensnare); + } + } + component.Ensnared = target; ensnareable.Container.Insert(ensnare); ensnareable.IsEnsnared = true; diff --git a/Content.Server/EntityList/SpawnEntityListCommand.cs b/Content.Server/EntityList/SpawnEntityListCommand.cs index 0891bbd12a..027d25dc2c 100644 --- a/Content.Server/EntityList/SpawnEntityListCommand.cs +++ b/Content.Server/EntityList/SpawnEntityListCommand.cs @@ -1,7 +1,6 @@ using Content.Server.Administration; using Content.Shared.Administration; using Content.Shared.EntityList; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Prototypes; @@ -22,7 +21,7 @@ namespace Content.Server.EntityList return; } - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError("You must be a player to run this command."); return; diff --git a/Content.Server/Examine/ExamineSystem.cs b/Content.Server/Examine/ExamineSystem.cs index 98aa806885..bb7e07d235 100644 --- a/Content.Server/Examine/ExamineSystem.cs +++ b/Content.Server/Examine/ExamineSystem.cs @@ -3,8 +3,7 @@ using Content.Server.Verbs; using Content.Shared.Examine; using Content.Shared.Verbs; using JetBrains.Annotations; -using Robust.Server.GameObjects; -using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Examine @@ -46,7 +45,7 @@ namespace Content.Server.Examine private void ExamineInfoRequest(ExamineSystemMessages.RequestExamineInfoMessage request, EntitySessionEventArgs eventArgs) { - var player = (IPlayerSession) eventArgs.SenderSession; + var player = eventArgs.SenderSession; var session = eventArgs.SenderSession; var channel = player.ConnectedClient; var entity = GetEntity(request.NetEntity); diff --git a/Content.Server/Fluids/EntitySystems/PuddleDebugDebugOverlaySystem.cs b/Content.Server/Fluids/EntitySystems/PuddleDebugDebugOverlaySystem.cs index 59f0a13695..c17eea684d 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleDebugDebugOverlaySystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleDebugDebugOverlaySystem.cs @@ -1,9 +1,9 @@ using System.Numerics; using Content.Shared.Fluids; using Content.Shared.Fluids.Components; -using Robust.Server.Player; using Robust.Shared.Map; using Robust.Shared.Map.Components; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Server.Fluids.EntitySystems; @@ -14,10 +14,10 @@ public sealed class PuddleDebugDebugOverlaySystem : SharedPuddleDebugOverlaySyst [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly PuddleSystem _puddle = default!; - private readonly HashSet _playerObservers = new(); + private readonly HashSet _playerObservers = new(); private List> _grids = new(); - public bool ToggleObserver(IPlayerSession observer) + public bool ToggleObserver(ICommonSession observer) { NextTick ??= _timing.CurTime + Cooldown; @@ -31,7 +31,7 @@ public sealed class PuddleDebugDebugOverlaySystem : SharedPuddleDebugOverlaySyst return true; } - private void RemoveObserver(IPlayerSession observer) + private void RemoveObserver(ICommonSession observer) { if (!_playerObservers.Remove(observer)) { diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs index 39485d60f7..a6d6a5b204 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs @@ -34,7 +34,7 @@ public sealed partial class PuddleSystem SubscribeLocalEvent(SplashOnMeleeHit, after: new[] { typeof(OpenableSystem) }); SubscribeLocalEvent>(AddSpillVerb); SubscribeLocalEvent(OnGotEquipped); - SubscribeLocalEvent(OnSpikeOverflow); + SubscribeLocalEvent(OnOverflow); SubscribeLocalEvent(OnDoAfter); } @@ -46,13 +46,12 @@ public sealed partial class PuddleSystem args.PushMarkup(Loc.GetString("spill-examine-spillable-weapon")); } - private void OnSpikeOverflow(EntityUid uid, SpillableComponent component, SolutionSpikeOverflowEvent args) + private void OnOverflow(EntityUid uid, SpillableComponent component, ref SolutionOverflowEvent args) { - if (!args.Handled) - { - TrySpillAt(Transform(uid).Coordinates, args.Overflow, out _); - } + if (args.Handled) + return; + TrySpillAt(Transform(uid).Coordinates, args.Overflow, out _); args.Handled = true; } diff --git a/Content.Server/Fluids/EntitySystems/SmokeSystem.cs b/Content.Server/Fluids/EntitySystems/SmokeSystem.cs index f7732fec62..5459dacf0b 100644 --- a/Content.Server/Fluids/EntitySystems/SmokeSystem.cs +++ b/Content.Server/Fluids/EntitySystems/SmokeSystem.cs @@ -1,14 +1,23 @@ using System.Linq; -using Content.Server.Chemistry.Components; +using Content.Server.Administration.Logs; +using Content.Server.Body.Components; +using Content.Server.Body.Systems; using Content.Server.Chemistry.ReactionEffects; using Content.Server.Spreader; +using Content.Shared.Chemistry; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reaction; +using Content.Shared.Chemistry.Reagent; +using Content.Shared.Database; using Content.Shared.FixedPoint; using Content.Shared.Smoking; using Robust.Server.GameObjects; using Robust.Shared.Map; +using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Events; +using Robust.Shared.Physics.Systems; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Timing; @@ -22,70 +31,140 @@ namespace Content.Server.Fluids.EntitySystems; public sealed class SmokeSystem : EntitySystem { // If I could do it all again this could probably use a lot more of puddles. + [Dependency] private readonly IAdminLogManager _logger = default!; [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly IPrototypeManager _prototype = default!; - [Dependency] private readonly AppearanceSystem _appearance = default!; - [Dependency] private readonly EntityLookupSystem _lookup = default!; - [Dependency] private readonly SolutionContainerSystem _solutionSystem = default!; [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly AppearanceSystem _appearance = default!; + [Dependency] private readonly BloodstreamSystem _blood = default!; + [Dependency] private readonly InternalsSystem _internals = default!; + [Dependency] private readonly ReactiveSystem _reactive = default!; + [Dependency] private readonly SharedBroadphaseSystem _broadphase = default!; + [Dependency] private readonly SharedPhysicsSystem _physics = default!; + [Dependency] private readonly SolutionContainerSystem _solutionSystem = default!; + [Dependency] private readonly TransformSystem _transform = default!; + + private EntityQuery _smokeQuery; + private EntityQuery _smokeAffectedQuery; /// public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnSmokeUnpaused); + + _smokeQuery = GetEntityQuery(); + _smokeAffectedQuery = GetEntityQuery(); + + SubscribeLocalEvent(OnStartCollide); + SubscribeLocalEvent(OnEndCollide); SubscribeLocalEvent(OnReactionAttempt); SubscribeLocalEvent(OnSmokeSpread); + SubscribeLocalEvent(OnAffectedUnpaused); + } + + /// + public override void Update(float frameTime) + { + base.Update(frameTime); + + var query = EntityQueryEnumerator(); + var curTime = _timing.CurTime; + while (query.MoveNext(out var uid, out var smoke)) + { + if (curTime < smoke.NextSecond) + continue; + + smoke.NextSecond += TimeSpan.FromSeconds(1); + SmokeReact(uid, smoke.SmokeEntity); + } + } + + private void OnStartCollide(EntityUid uid, SmokeComponent component, ref StartCollideEvent args) + { + if (_smokeAffectedQuery.HasComponent(args.OtherEntity)) + return; + + var smokeAffected = AddComp(args.OtherEntity); + smokeAffected.SmokeEntity = uid; + smokeAffected.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); + } + + private void OnEndCollide(EntityUid uid, SmokeComponent component, ref EndCollideEvent args) + { + // if we are already in smoke, make sure the thing we are exiting is the current smoke we are in. + if (_smokeAffectedQuery.TryGetComponent(args.OtherEntity, out var smokeAffectedComponent)) + { + if (smokeAffectedComponent.SmokeEntity != uid) + return; + } + + var exists = Exists(uid); + + if (!TryComp(args.OtherEntity, out var body)) + return; + + foreach (var ent in _physics.GetContactingEntities(args.OtherEntity, body)) + { + if (exists && ent == uid) + continue; + + if (!_smokeQuery.HasComponent(ent)) + continue; + + smokeAffectedComponent ??= EnsureComp(args.OtherEntity); + smokeAffectedComponent.SmokeEntity = ent; + return; // exit the function so we don't remove the component. + } + + if (smokeAffectedComponent != null) + RemComp(args.OtherEntity, smokeAffectedComponent); + } + + private void OnAffectedUnpaused(EntityUid uid, SmokeAffectedComponent component, ref EntityUnpausedEvent args) + { + component.NextSecond += args.PausedTime; } private void OnSmokeSpread(EntityUid uid, SmokeComponent component, ref SpreadNeighborsEvent args) { - if (component.SpreadAmount == 0 - || !_solutionSystem.TryGetSolution(uid, SmokeComponent.SolutionName, out var solution)) + if (component.SpreadAmount == 0 || !_solutionSystem.TryGetSolution(uid, SmokeComponent.SolutionName, out var solution)) { RemCompDeferred(uid); return; } - var prototype = MetaData(uid).EntityPrototype; - - if (prototype == null) + if (Prototype(uid) is not { } prototype) { RemCompDeferred(uid); return; } + if (!args.NeighborFreeTiles.Any()) + return; + TryComp(uid, out var timer); - _appearance.TryGetData(uid, SmokeVisuals.Color, out var color); // wtf is the logic behind any of this. - var smokePerSpread = 1 + component.SpreadAmount / Math.Max(1, args.NeighborFreeTiles.Count); + var smokePerSpread = component.SpreadAmount / Math.Max(1, args.NeighborFreeTiles.Count); foreach (var neighbor in args.NeighborFreeTiles) { var coords = neighbor.Grid.GridTileToLocal(neighbor.Tile); var ent = Spawn(prototype.ID, coords); - var neighborSmoke = EnsureComp(ent); - neighborSmoke.SpreadAmount = Math.Max(0, smokePerSpread - 2); // why - 2? who the fuck knows. - component.SpreadAmount--; - args.Updates--; + var spreadAmount = Math.Max(0, smokePerSpread); + component.SpreadAmount -= args.NeighborFreeTiles.Count(); - // Listen this is the old behaviour iunno - Start(ent, neighborSmoke, solution.Clone(), timer?.Lifetime ?? 10f); - - if (color != null) - _appearance.SetData(ent, SmokeVisuals.Color, color); + StartSmoke(ent, solution.Clone(), timer?.Lifetime ?? component.Duration, spreadAmount); if (component.SpreadAmount == 0) { RemCompDeferred(uid); break; } - - if (args.Updates <= 0) - break; } + args.Updates--; + if (args.NeighborFreeTiles.Count > 0 || args.Neighbors.Count == 0 || component.SpreadAmount < 1) return; @@ -100,7 +179,6 @@ public sealed class SmokeSystem : EntitySystem continue; smoke.SpreadAmount++; - args.Updates--; component.SpreadAmount--; EnsureComp(neighbor); @@ -110,6 +188,7 @@ public sealed class SmokeSystem : EntitySystem break; } } + } private void OnReactionAttempt(EntityUid uid, SmokeComponent component, ReactionAttemptEvent args) @@ -128,101 +207,117 @@ public sealed class SmokeSystem : EntitySystem } } - private void OnSmokeUnpaused(EntityUid uid, SmokeComponent component, ref EntityUnpausedEvent args) + /// + /// Sets up a smoke component for spreading. + /// + public void StartSmoke(EntityUid uid, Solution solution, float duration, int spreadAmount, SmokeComponent? component = null) { - component.NextReact += args.PausedTime; - } + if (!Resolve(uid, ref component)) + return; - /// - public override void Update(float frameTime) - { - base.Update(frameTime); - var query = EntityQueryEnumerator(); - var curTime = _timing.CurTime; + component.SpreadAmount = spreadAmount; + component.Duration = duration; + component.TransferRate = solution.Volume / duration; + TryAddSolution(uid, solution); + Dirty(uid, component); + EnsureComp(uid); - while (query.MoveNext(out var uid, out var smoke)) + if (TryComp(uid, out var body) && TryComp(uid, out var fixtures)) { - if (smoke.NextReact > curTime) - continue; - - smoke.NextReact += TimeSpan.FromSeconds(1.5); - - SmokeReact(uid, 1f, smoke); + var xform = Transform(uid); + _physics.SetBodyType(uid, BodyType.Dynamic, fixtures, body, xform); + _physics.SetCanCollide(uid, true, manager: fixtures, body: body); + _broadphase.RegenerateContacts(uid, body, fixtures, xform); } + + var timer = EnsureComp(uid); + timer.Lifetime = duration; + + // The tile reaction happens here because it only occurs once. + ReactOnTile(uid, component); } /// - /// Does the relevant smoke reactions for an entity for the specified exposure duration. + /// Does the relevant smoke reactions for an entity. /// - public void SmokeReact(EntityUid uid, float frameTime, SmokeComponent? component = null, TransformComponent? xform = null) + public void SmokeReact(EntityUid entity, EntityUid smokeUid, SmokeComponent? component = null) { - if (!Resolve(uid, ref component, ref xform)) + if (!Resolve(smokeUid, ref component)) return; - if (!_solutionSystem.TryGetSolution(uid, SmokeComponent.SolutionName, out var solution) || + if (!_solutionSystem.TryGetSolution(smokeUid, SmokeComponent.SolutionName, out var solution) || solution.Contents.Count == 0) { return; } + ReactWithEntity(entity, smokeUid, solution, component); + UpdateVisuals(smokeUid); + } + + private void ReactWithEntity(EntityUid entity, EntityUid smokeUid, Solution solution, SmokeComponent? component = null) + { + if (!Resolve(smokeUid, ref component)) + return; + + if (!TryComp(entity, out var bloodstream)) + return; + + var blockIngestion = _internals.AreInternalsWorking(entity); + + var cloneSolution = solution.Clone(); + var availableTransfer = FixedPoint2.Min(cloneSolution.Volume, component.TransferRate); + var transferAmount = FixedPoint2.Min(availableTransfer, bloodstream.ChemicalSolution.AvailableVolume); + var transferSolution = cloneSolution.SplitSolution(transferAmount); + + foreach (var reagentQuantity in transferSolution.Contents.ToArray()) + { + if (reagentQuantity.Quantity == FixedPoint2.Zero) + continue; + var reagentProto = _prototype.Index(reagentQuantity.Reagent.Prototype); + + _reactive.ReactionEntity(entity, ReactionMethod.Touch, reagentProto, reagentQuantity, transferSolution); + if (!blockIngestion) + _reactive.ReactionEntity(entity, ReactionMethod.Ingestion, reagentProto, reagentQuantity, transferSolution); + } + + if (blockIngestion) + return; + + if (_blood.TryAddToChemicals(entity, transferSolution, bloodstream)) + { + // Log solution addition by smoke + _logger.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(entity):target} ingested smoke {SolutionContainerSystem.ToPrettyString(transferSolution)}"); + } + } + + private void ReactOnTile(EntityUid uid, SmokeComponent? component = null, TransformComponent? xform = null) + { + if (!Resolve(uid, ref component, ref xform)) + return; + + if (!_solutionSystem.TryGetSolution(uid, SmokeComponent.SolutionName, out var solution) || !solution.Any()) + return; + if (!_mapManager.TryGetGrid(xform.GridUid, out var mapGrid)) return; - var tile = mapGrid.GetTileRef(xform.Coordinates.ToVector2i(EntityManager, _mapManager)); - - var solutionFraction = 1 / Math.Floor(frameTime); - var ents = _lookup.GetEntitiesIntersecting(tile, 0f, flags: LookupFlags.Uncontained).ToArray(); + var tile = mapGrid.GetTileRef(xform.Coordinates.ToVector2i(EntityManager, _mapManager, _transform)); foreach (var reagentQuantity in solution.Contents.ToArray()) { if (reagentQuantity.Quantity == FixedPoint2.Zero) continue; - // NOOP, react with entities on the tile or whatever. + var reagent = _prototype.Index(reagentQuantity.Reagent.Prototype); + reagent.ReactionTile(tile, reagentQuantity.Quantity); } - - foreach (var entity in ents) - { - if (entity == uid) - continue; - - ReactWithEntity(entity, solution, solutionFraction); - } - - UpdateVisuals(uid); - } - - private void UpdateVisuals(EntityUid uid) - { - if (TryComp(uid, out AppearanceComponent? appearance) && - _solutionSystem.TryGetSolution(uid, SmokeComponent.SolutionName, out var solution)) - { - var color = solution.GetColor(_prototype); - _appearance.SetData(uid, SmokeVisuals.Color, color, appearance); - } - } - - private void ReactWithEntity(EntityUid entity, Solution solution, double solutionFraction) - { - // NOOP due to people complaining constantly. - return; - } - - /// - /// Sets up a smoke component for spreading. - /// - public void Start(EntityUid uid, SmokeComponent component, Solution solution, float duration) - { - TryAddSolution(uid, component, solution); - EnsureComp(uid); - var timer = EnsureComp(uid); - timer.Lifetime = duration; } /// /// Adds the specified solution to the relevant smoke solution. /// - public void TryAddSolution(EntityUid uid, SmokeComponent component, Solution solution) + private void TryAddSolution(EntityUid uid, Solution solution) { if (solution.Volume == FixedPoint2.Zero) return; @@ -237,4 +332,14 @@ public sealed class SmokeSystem : EntitySystem UpdateVisuals(uid); } + + private void UpdateVisuals(EntityUid uid) + { + if (!TryComp(uid, out AppearanceComponent? appearance) || + !_solutionSystem.TryGetSolution(uid, SmokeComponent.SolutionName, out var solution)) + return; + + var color = solution.GetColor(_prototype); + _appearance.SetData(uid, SmokeVisuals.Color, color, appearance); + } } diff --git a/Content.Server/Fluids/ShowFluidsCommand.cs b/Content.Server/Fluids/ShowFluidsCommand.cs index f122eadea7..71ac273a45 100644 --- a/Content.Server/Fluids/ShowFluidsCommand.cs +++ b/Content.Server/Fluids/ShowFluidsCommand.cs @@ -1,7 +1,6 @@ using Content.Server.Administration; using Content.Server.Fluids.EntitySystems; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Fluids; @@ -15,7 +14,7 @@ public sealed class ShowFluidsCommand : IConsoleCommand public string Help => $"Usage: {Command}"; public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("You must be a player to use this command."); diff --git a/Content.Server/Forensics/Systems/ForensicScannerSystem.cs b/Content.Server/Forensics/Systems/ForensicScannerSystem.cs index 69704ddb56..acf7cbd80d 100644 --- a/Content.Server/Forensics/Systems/ForensicScannerSystem.cs +++ b/Content.Server/Forensics/Systems/ForensicScannerSystem.cs @@ -10,6 +10,7 @@ using Content.Shared.Interaction; using Content.Shared.Verbs; using Robust.Server.GameObjects; using Robust.Shared.Audio; +using Robust.Shared.Player; using Robust.Shared.Timing; // todo: remove this stinky LINQy diff --git a/Content.Server/GameTicking/Commands/JoinGameCommand.cs b/Content.Server/GameTicking/Commands/JoinGameCommand.cs index 366e6c4e77..3276b91200 100644 --- a/Content.Server/GameTicking/Commands/JoinGameCommand.cs +++ b/Content.Server/GameTicking/Commands/JoinGameCommand.cs @@ -2,7 +2,6 @@ using Content.Server.Station.Systems; using Content.Shared.Administration; using Content.Shared.GameTicking; using Content.Shared.Roles; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Prototypes; @@ -30,7 +29,7 @@ namespace Content.Server.GameTicking.Commands return; } - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { diff --git a/Content.Server/GameTicking/Commands/ObserveCommand.cs b/Content.Server/GameTicking/Commands/ObserveCommand.cs index d608dda9c1..747e54e28b 100644 --- a/Content.Server/GameTicking/Commands/ObserveCommand.cs +++ b/Content.Server/GameTicking/Commands/ObserveCommand.cs @@ -1,6 +1,5 @@ using Content.Shared.Administration; using Content.Shared.GameTicking; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.GameTicking.Commands @@ -14,7 +13,7 @@ namespace Content.Server.GameTicking.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { return; } diff --git a/Content.Server/GameTicking/Commands/RespawnCommand.cs b/Content.Server/GameTicking/Commands/RespawnCommand.cs index 057572297f..4f101d0939 100644 --- a/Content.Server/GameTicking/Commands/RespawnCommand.cs +++ b/Content.Server/GameTicking/Commands/RespawnCommand.cs @@ -14,7 +14,7 @@ namespace Content.Server.GameTicking.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (args.Length > 1) { shell.WriteLine("Must provide <= 1 argument."); diff --git a/Content.Server/GameTicking/Commands/ToggleReadyCommand.cs b/Content.Server/GameTicking/Commands/ToggleReadyCommand.cs index e68c4c5fa7..df418c27ee 100644 --- a/Content.Server/GameTicking/Commands/ToggleReadyCommand.cs +++ b/Content.Server/GameTicking/Commands/ToggleReadyCommand.cs @@ -1,5 +1,4 @@ using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.GameTicking.Commands @@ -13,7 +12,7 @@ namespace Content.Server.GameTicking.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (args.Length != 1) { shell.WriteError(Loc.GetString("shell-wrong-arguments-number")); diff --git a/Content.Server/GameTicking/GameTicker.GamePreset.cs b/Content.Server/GameTicking/GameTicker.GamePreset.cs index a5e6d7a605..2d7539bd0f 100644 --- a/Content.Server/GameTicking/GameTicker.GamePreset.cs +++ b/Content.Server/GameTicking/GameTicker.GamePreset.cs @@ -11,7 +11,7 @@ using Content.Shared.Ghost; using Content.Shared.Mind; using Content.Shared.Mobs.Components; using JetBrains.Annotations; -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.GameTicking { @@ -29,7 +29,7 @@ namespace Content.Server.GameTicking /// public GamePresetPrototype? CurrentPreset { get; private set; } - private bool StartPreset(IPlayerSession[] origReadyPlayers, bool force) + private bool StartPreset(ICommonSession[] origReadyPlayers, bool force) { var startAttempt = new RoundStartAttemptEvent(origReadyPlayers, force); RaiseLocalEvent(startAttempt); @@ -214,7 +214,7 @@ namespace Content.Server.GameTicking { if (mind.Session != null) // Logging is suppressed to prevent spam from ghost attempts caused by movement attempts { - _chatManager.DispatchServerMessage((IPlayerSession) mind.Session, Loc.GetString("comp-mind-ghosting-prevented"), + _chatManager.DispatchServerMessage(mind.Session, Loc.GetString("comp-mind-ghosting-prevented"), true); } diff --git a/Content.Server/GameTicking/GameTicker.Lobby.cs b/Content.Server/GameTicking/GameTicker.Lobby.cs index b7b6a29a5a..1943a82617 100644 --- a/Content.Server/GameTicking/GameTicker.Lobby.cs +++ b/Content.Server/GameTicking/GameTicker.Lobby.cs @@ -1,10 +1,8 @@ using System.Linq; using Content.Shared.GameTicking; using Content.Server.Station.Components; -using Robust.Server.Player; using Robust.Shared.Network; using Robust.Shared.Player; -using Robust.Shared.Players; using System.Text; namespace Content.Server.GameTicking @@ -79,7 +77,7 @@ namespace Content.Server.GameTicking ("roundId", RoundId), ("playerCount", playerCount), ("readyCount", readyCount), ("mapName", stationNames.ToString()),("gmTitle", gmTitle),("desc", desc)); } - private TickerLobbyStatusEvent GetStatusMsg(IPlayerSession session) + private TickerLobbyStatusEvent GetStatusMsg(ICommonSession session) { _playerGameStatuses.TryGetValue(session.UserId, out var status); return new TickerLobbyStatusEvent(RunLevel != GameRunLevel.PreRoundLobby, LobbySong, LobbyBackground,status == PlayerGameStatus.ReadyToPlay, _roundStartTime, RoundPreloadTime, _roundStartTimeSpan, Paused); @@ -87,7 +85,7 @@ namespace Content.Server.GameTicking private void SendStatusToAll() { - foreach (var player in _playerManager.ServerSessions) + foreach (var player in _playerManager.Sessions) { RaiseNetworkEvent(GetStatusMsg(player), player.ConnectedClient); } @@ -148,7 +146,7 @@ namespace Content.Server.GameTicking } } - public void ToggleReady(IPlayerSession player, bool ready) + public void ToggleReady(ICommonSession player, bool ready) { if (!_playerGameStatuses.ContainsKey(player.UserId)) return; diff --git a/Content.Server/GameTicking/GameTicker.Player.cs b/Content.Server/GameTicking/GameTicker.Player.cs index 4ef55cd563..caa8062f41 100644 --- a/Content.Server/GameTicking/GameTicker.Player.cs +++ b/Content.Server/GameTicking/GameTicker.Player.cs @@ -1,12 +1,13 @@ using Content.Server.Database; -using Content.Server.Players; using Content.Shared.GameTicking; using Content.Shared.GameWindow; using Content.Shared.Players; using Content.Shared.Preferences; using JetBrains.Annotations; +using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Enums; +using Robust.Shared.Player; using Robust.Shared.Timing; using Robust.Shared.Utility; @@ -17,6 +18,7 @@ namespace Content.Server.GameTicking { [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IServerDbManager _dbManager = default!; + [Dependency] private readonly ActorSystem _actor = default!; private void InitializePlayer() { @@ -49,7 +51,7 @@ namespace Content.Server.GameTicking // Always make sure the client has player data. if (session.Data.ContentDataUncast == null) { - var data = new PlayerData(session.UserId, args.Session.Name); + var data = new ContentPlayerData(session.UserId, args.Session.Name); data.Mind = mindId; data.Whitelisted = await _db.GetWhitelistStatusAsync(session.UserId); // Nyanotrasen - Whitelist session.Data.ContentDataUncast = data; @@ -57,7 +59,7 @@ namespace Content.Server.GameTicking // Make the player actually join the game. // timer time must be > tick length - Timer.Spawn(0, args.Session.JoinGame); + Timer.Spawn(0, () => _playerManager.JoinGame(args.Session)); var record = await _dbManager.GetPlayerRecordByUserId(args.Session.UserId); var firstConnection = record != null && @@ -101,9 +103,16 @@ namespace Content.Server.GameTicking } else { - // Simply re-attach to existing entity. - session.AttachToEntity(mind.CurrentEntity); - PlayerJoinGame(session); + if (_actor.Attach(mind.CurrentEntity, session)) + { + PlayerJoinGame(session); + } + else + { + Log.Error( + $"Failed to attach player {session} with mind {ToPrettyString(mindId)} to its current entity {ToPrettyString(mind.CurrentEntity)}"); + SpawnObserverWaitDb(); + } } break; @@ -146,12 +155,12 @@ namespace Content.Server.GameTicking } } - private HumanoidCharacterProfile GetPlayerProfile(IPlayerSession p) + private HumanoidCharacterProfile GetPlayerProfile(ICommonSession p) { return (HumanoidCharacterProfile) _prefsManager.GetPreferences(p.UserId).SelectedCharacter; } - public void PlayerJoinGame(IPlayerSession session, bool silent = false) + public void PlayerJoinGame(ICommonSession session, bool silent = false) { if (!silent) _chatManager.DispatchServerMessage(session, Loc.GetString("game-ticker-player-join-game-message")); @@ -162,7 +171,7 @@ namespace Content.Server.GameTicking RaiseNetworkEvent(new TickerJoinGameEvent(), session.ConnectedClient); } - private void PlayerJoinLobby(IPlayerSession session) + private void PlayerJoinLobby(ICommonSession session) { _playerGameStatuses[session.UserId] = LobbyEnabled ? PlayerGameStatus.NotReadyToPlay : PlayerGameStatus.ReadyToPlay; _db.AddRoundPlayers(RoundId, session.UserId); @@ -182,9 +191,9 @@ namespace Content.Server.GameTicking public sealed class PlayerJoinedLobbyEvent : EntityEventArgs { - public readonly IPlayerSession PlayerSession; + public readonly ICommonSession PlayerSession; - public PlayerJoinedLobbyEvent(IPlayerSession playerSession) + public PlayerJoinedLobbyEvent(ICommonSession playerSession) { PlayerSession = playerSession; } diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index a10196a43e..85f833bd1c 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -12,7 +12,6 @@ using Content.Shared.Preferences; using JetBrains.Annotations; using Prometheus; using Robust.Server.Maps; -using Robust.Server.Player; using Robust.Shared.Asynchronous; using Robust.Shared.Audio; using Robust.Shared.Map; @@ -205,7 +204,7 @@ namespace Content.Server.GameTicking var startingEvent = new RoundStartingEvent(RoundId); RaiseLocalEvent(startingEvent); - var readyPlayers = new List(); + var readyPlayers = new List(); var readyPlayerProfiles = new Dictionary(); foreach (var (userId, status) in _playerGameStatuses) @@ -344,7 +343,7 @@ namespace Content.Server.GameTicking { connected = true; } - PlayerData? contentPlayerData = null; + ContentPlayerData? contentPlayerData = null; if (userId != null && _playerManager.TryGetPlayerData(userId.Value, out var playerData)) { contentPlayerData = playerData.ContentData(); @@ -493,7 +492,7 @@ namespace Content.Server.GameTicking private void ResettingCleanup() { // Move everybody currently in the server to lobby. - foreach (var player in _playerManager.ServerSessions) + foreach (var player in _playerManager.Sessions) { PlayerJoinLobby(player); } @@ -541,7 +540,7 @@ namespace Content.Server.GameTicking DisallowLateJoin = false; _playerGameStatuses.Clear(); - foreach (var session in _playerManager.ServerSessions) + foreach (var session in _playerManager.Sessions) { _playerGameStatuses[session.UserId] = LobbyEnabled ? PlayerGameStatus.NotReadyToPlay : PlayerGameStatus.ReadyToPlay; } @@ -735,10 +734,10 @@ namespace Content.Server.GameTicking /// public sealed class RoundStartAttemptEvent : CancellableEntityEventArgs { - public IPlayerSession[] Players { get; } + public ICommonSession[] Players { get; } public bool Forced { get; } - public RoundStartAttemptEvent(IPlayerSession[] players, bool forced) + public RoundStartAttemptEvent(ICommonSession[] players, bool forced) { Players = players; Forced = forced; @@ -757,11 +756,11 @@ namespace Content.Server.GameTicking /// If you want to handle a specific player being spawned, remove it from this list and do what you need. /// /// If you spawn a player by yourself from this event, don't forget to call on them. - public List PlayerPool { get; } + public List PlayerPool { get; } public IReadOnlyDictionary Profiles { get; } public bool Forced { get; } - public RulePlayerSpawningEvent(List playerPool, IReadOnlyDictionary profiles, bool forced) + public RulePlayerSpawningEvent(List playerPool, IReadOnlyDictionary profiles, bool forced) { PlayerPool = playerPool; Profiles = profiles; @@ -775,11 +774,11 @@ namespace Content.Server.GameTicking /// public sealed class RulePlayerJobsAssignedEvent { - public IPlayerSession[] Players { get; } + public ICommonSession[] Players { get; } public IReadOnlyDictionary Profiles { get; } public bool Forced { get; } - public RulePlayerJobsAssignedEvent(IPlayerSession[] players, IReadOnlyDictionary profiles, bool forced) + public RulePlayerJobsAssignedEvent(ICommonSession[] players, IReadOnlyDictionary profiles, bool forced) { Players = players; Profiles = profiles; diff --git a/Content.Server/GameTicking/GameTicker.Spawning.cs b/Content.Server/GameTicking/GameTicker.Spawning.cs index 0c59f93bb0..c2bf523657 100644 --- a/Content.Server/GameTicking/GameTicker.Spawning.cs +++ b/Content.Server/GameTicking/GameTicker.Spawning.cs @@ -3,20 +3,20 @@ using System.Linq; using System.Numerics; using Content.Server.Administration.Managers; using Content.Server.Ghost; -using Content.Server.Players; using Content.Server.Spawners.Components; using Content.Server.Speech.Components; using Content.Server.Station.Components; using Content.Shared.CCVar; using Content.Shared.Database; +using Content.Shared.Players; using Content.Shared.Preferences; using Content.Shared.Roles; using Content.Shared.Roles.Jobs; using JetBrains.Annotations; -using Robust.Server.Player; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Utility; @@ -29,7 +29,7 @@ namespace Content.Server.GameTicking [Dependency] private readonly SharedJobSystem _jobs = default!; [ValidatePrototypeId] - private const string ObserverPrototypeName = "MobObserver"; + public const string ObserverPrototypeName = "MobObserver"; /// /// How many players have joined the round through normal methods. @@ -52,7 +52,7 @@ namespace Content.Server.GameTicking return spawnableStations; } - private void SpawnPlayers(List readyPlayers, Dictionary profiles, bool force) + private void SpawnPlayers(List readyPlayers, Dictionary profiles, bool force) { // Allow game rules to spawn players by themselves if needed. (For example, nuke ops or wizard) RaiseLocalEvent(new RulePlayerSpawningEvent(readyPlayers, profiles, force)); @@ -116,7 +116,7 @@ namespace Content.Server.GameTicking RaiseLocalEvent(new RulePlayerJobsAssignedEvent(assignedJobs.Keys.Select(x => _playerManager.GetSessionByUserId(x)).ToArray(), profiles, force)); } - private void SpawnPlayer(IPlayerSession player, EntityUid station, string? jobId = null, bool lateJoin = true, bool silent = false) + private void SpawnPlayer(ICommonSession player, EntityUid station, string? jobId = null, bool lateJoin = true, bool silent = false) { var character = GetPlayerProfile(player); @@ -129,7 +129,7 @@ namespace Content.Server.GameTicking SpawnPlayer(player, character, station, jobId, lateJoin, silent); } - private void SpawnPlayer(IPlayerSession player, HumanoidCharacterProfile character, EntityUid station, string? jobId = null, bool lateJoin = true, bool silent = false) + private void SpawnPlayer(ICommonSession player, HumanoidCharacterProfile character, EntityUid station, string? jobId = null, bool lateJoin = true, bool silent = false) { // Can't spawn players with a dummy ticker! if (DummyTicker) @@ -271,7 +271,7 @@ namespace Content.Server.GameTicking RaiseLocalEvent(mob, aev, true); } - public void Respawn(IPlayerSession player) + public void Respawn(ICommonSession player) { _mind.WipeMind(player); _adminLogger.Add(LogType.Respawn, LogImpact.Medium, $"Player {player} was respawned."); @@ -289,7 +289,7 @@ namespace Content.Server.GameTicking /// The station they're spawning on /// An optional job for them to spawn as /// Whether or not the player should be greeted upon joining - public void MakeJoinGame(IPlayerSession player, EntityUid station, string? jobId = null, bool silent = false) + public void MakeJoinGame(ICommonSession player, EntityUid station, string? jobId = null, bool silent = false) { if (!_playerGameStatuses.ContainsKey(player.UserId)) return; @@ -303,7 +303,7 @@ namespace Content.Server.GameTicking /// /// Causes the given player to join the current game as observer ghost. See also /// - public void JoinAsObserver(IPlayerSession player) + public void JoinAsObserver(ICommonSession player) { // Can't spawn players with a dummy ticker! if (DummyTicker) @@ -317,7 +317,7 @@ namespace Content.Server.GameTicking /// Spawns an observer ghost and attaches the given player to it. If the player does not yet have a mind, the /// player is given a new mind with the observer role. Otherwise, the current mind is transferred to the ghost. /// - public void SpawnObserver(IPlayerSession player) + public void SpawnObserver(ICommonSession player) { if (DummyTicker) return; @@ -430,13 +430,13 @@ namespace Content.Server.GameTicking [PublicAPI] public sealed class PlayerBeforeSpawnEvent : HandledEntityEventArgs { - public IPlayerSession Player { get; } + public ICommonSession Player { get; } public HumanoidCharacterProfile Profile { get; } public string? JobId { get; } public bool LateJoin { get; } public EntityUid Station { get; } - public PlayerBeforeSpawnEvent(IPlayerSession player, HumanoidCharacterProfile profile, string? jobId, bool lateJoin, EntityUid station) + public PlayerBeforeSpawnEvent(ICommonSession player, HumanoidCharacterProfile profile, string? jobId, bool lateJoin, EntityUid station) { Player = player; Profile = profile; @@ -455,7 +455,7 @@ namespace Content.Server.GameTicking public sealed class PlayerSpawnCompleteEvent : EntityEventArgs { public EntityUid Mob { get; } - public IPlayerSession Player { get; } + public ICommonSession Player { get; } public string? JobId { get; } public bool LateJoin { get; } public EntityUid Station { get; } @@ -464,7 +464,7 @@ namespace Content.Server.GameTicking // Ex. If this is the 27th person to join, this will be 27. public int JoinOrder { get; } - public PlayerSpawnCompleteEvent(EntityUid mob, IPlayerSession player, string? jobId, bool lateJoin, int joinOrder, EntityUid station, HumanoidCharacterProfile profile) + public PlayerSpawnCompleteEvent(EntityUid mob, ICommonSession player, string? jobId, bool lateJoin, int joinOrder, EntityUid station, HumanoidCharacterProfile profile) { Mob = mob; Player = player; diff --git a/Content.Server/GameTicking/Rules/Components/RevolutionaryRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/RevolutionaryRuleComponent.cs index 7d036c615b..e9c8d50cdc 100644 --- a/Content.Server/GameTicking/Rules/Components/RevolutionaryRuleComponent.cs +++ b/Content.Server/GameTicking/Rules/Components/RevolutionaryRuleComponent.cs @@ -39,7 +39,7 @@ public sealed partial class RevolutionaryRuleComponent : Component /// Sound that plays when you are chosen as Rev. (Placeholder until I find something cool I guess) /// [DataField] - public SoundSpecifier HeadRevStartSound = new SoundPathSpecifier("/Audio/Ambience/Antag/traitor_start.ogg"); + public SoundSpecifier HeadRevStartSound = new SoundPathSpecifier("/Audio/Ambience/Antag/headrev_start.ogg"); /// /// Min players needed for Revolutionary gamemode to start. diff --git a/Content.Server/GameTicking/Rules/Components/TraitorRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/TraitorRuleComponent.cs index 883abef52f..7af87179d6 100644 --- a/Content.Server/GameTicking/Rules/Components/TraitorRuleComponent.cs +++ b/Content.Server/GameTicking/Rules/Components/TraitorRuleComponent.cs @@ -1,7 +1,7 @@ using Content.Shared.Preferences; using Content.Shared.Roles; -using Robust.Server.Player; using Robust.Shared.Audio; +using Robust.Shared.Player; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.GameTicking.Rules.Components; @@ -26,7 +26,7 @@ public sealed partial class TraitorRuleComponent : Component public SelectionState SelectionStatus = SelectionState.WaitingForSpawn; public TimeSpan AnnounceAt = TimeSpan.Zero; - public Dictionary StartCandidates = new(); + public Dictionary StartCandidates = new(); /// /// Path to antagonist alert sound. diff --git a/Content.Server/GameTicking/Rules/InactivityTimeRestartRuleSystem.cs b/Content.Server/GameTicking/Rules/InactivityTimeRestartRuleSystem.cs index c2e91ba4a5..b775b7af56 100644 --- a/Content.Server/GameTicking/Rules/InactivityTimeRestartRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/InactivityTimeRestartRuleSystem.cs @@ -2,6 +2,7 @@ using System.Threading; using Content.Server.Chat.Managers; using Content.Server.GameTicking.Rules.Components; using Robust.Server.Player; +using Robust.Shared.Player; using Timer = Robust.Shared.Timing.Timer; namespace Content.Server.GameTicking.Rules; diff --git a/Content.Server/GameTicking/Rules/KillCalloutRuleSystem.cs b/Content.Server/GameTicking/Rules/KillCalloutRuleSystem.cs index 94eeb5de56..01fd97d9a7 100644 --- a/Content.Server/GameTicking/Rules/KillCalloutRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/KillCalloutRuleSystem.cs @@ -2,8 +2,8 @@ using Content.Server.GameTicking.Rules.Components; using Content.Server.KillTracking; using Content.Shared.Chat; -using Robust.Server.GameObjects; using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Random; namespace Content.Server.GameTicking.Rules; diff --git a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs index 13d4ed71c8..779c47885f 100644 --- a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs @@ -334,7 +334,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem var eligibleQuery = EntityQueryEnumerator(); while (eligibleQuery.MoveNext(out var eligibleUid, out var eligibleComp, out var member)) { - if (!_npcFaction.IsFactionFriendly(component.Faction, eligibleUid, member)) + if (!_npcFaction.IsFactionHostile(component.Faction, eligibleUid, member)) continue; eligible.Add((eligibleUid, eligibleComp, member)); @@ -349,8 +349,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem var query = EntityQueryEnumerator(); while (query.MoveNext(out _, out var nukeops, out var actor)) { - _chatManager.DispatchServerMessage(actor.PlayerSession, Loc.GetString("nukeops-welcome", ("station", component.TargetStation.Value))); - _audio.PlayGlobal(nukeops.GreetSoundNotification, actor.PlayerSession); + NotifyNukie(actor.PlayerSession, nukeops, component); filter.AddPlayer(actor.PlayerSession); } } @@ -602,11 +601,11 @@ public sealed class NukeopsRuleSystem : GameRuleSystem var maxOperatives = nukeops.MaxOps; // Dear lord what is happening HERE. - var everyone = new List(ev.PlayerPool); - var prefList = new List(); - var medPrefList = new List(); - var cmdrPrefList = new List(); - var operatives = new List(); + var everyone = new List(ev.PlayerPool); + var prefList = new List(); + var medPrefList = new List(); + var cmdrPrefList = new List(); + var operatives = new List(); // The LINQ expression ReSharper keeps suggesting is completely unintelligible so I'm disabling it // ReSharper disable once ForeachCanBeConvertedToQueryUsingAnotherGetEnumerator @@ -637,7 +636,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem for (var i = 0; i < numNukies; i++) { // TODO: Please fix this if you touch it. - IPlayerSession nukeOp; + ICommonSession nukeOp; // Only one commander, so we do it at the start if (i == 0) { @@ -793,10 +792,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem if (nukeops.TargetStation != null && !string.IsNullOrEmpty(Name(nukeops.TargetStation.Value))) { - _chatManager.DispatchServerMessage(playerSession, Loc.GetString("nukeops-welcome", ("station", nukeops.TargetStation.Value))); - - // Notificate player about new role assignment - _audio.PlayGlobal(component.GreetSoundNotification, playerSession); + NotifyNukie(playerSession, component, nukeops); } } } @@ -908,7 +904,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem _npcFaction.AddFaction(mob, "Syndicate"); } - private void SpawnOperatives(int spawnCount, List sessions, bool addSpawnPoints, NukeopsRuleComponent component) + private void SpawnOperatives(int spawnCount, List sessions, bool addSpawnPoints, NukeopsRuleComponent component) { if (component.NukieOutpost == null) return; @@ -987,13 +983,25 @@ public sealed class NukeopsRuleSystem : GameRuleSystem var playersPerOperative = component.PlayersPerOperative; var maxOperatives = component.MaxOps; - var playerPool = _playerManager.ServerSessions.ToList(); + var playerPool = _playerManager.Sessions.ToList(); var numNukies = MathHelper.Clamp(playerPool.Count / playersPerOperative, 1, maxOperatives); - var operatives = new List(); + var operatives = new List(); SpawnOperatives(numNukies, operatives, true, component); } + /// + /// Display a greeting message and play a sound for a nukie + /// + private void NotifyNukie(ICommonSession session, NukeOperativeComponent nukeop, NukeopsRuleComponent nukeopsRule) + { + if (nukeopsRule.TargetStation is not { } station) + return; + + _chatManager.DispatchServerMessage(session, Loc.GetString("nukeops-welcome", ("station", station))); + _audio.PlayGlobal(nukeop.GreetSoundNotification, session); + } + //For admins forcing someone to nukeOps. public void MakeLoneNukie(EntityUid mindId, MindComponent mind) { diff --git a/Content.Server/GameTicking/Rules/PiratesRuleSystem.cs b/Content.Server/GameTicking/Rules/PiratesRuleSystem.cs index b223161c10..0785d81d09 100644 --- a/Content.Server/GameTicking/Rules/PiratesRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/PiratesRuleSystem.cs @@ -15,10 +15,10 @@ using Content.Shared.Preferences; using Content.Shared.Roles; using Robust.Server.GameObjects; using Robust.Server.Maps; -using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Enums; using Robust.Shared.Map; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Utility; @@ -141,7 +141,7 @@ public sealed class PiratesRuleSystem : GameRuleSystem (int) Math.Min( Math.Floor((double) ev.PlayerPool.Count / _cfg.GetCVar(CCVars.PiratesPlayersPerOp)), _cfg.GetCVar(CCVars.PiratesMaxOps))); - var ops = new IPlayerSession[numOps]; + var ops = new ICommonSession[numOps]; for (var i = 0; i < numOps; i++) { ops[i] = _random.PickAndTake(ev.PlayerPool); diff --git a/Content.Server/GameTicking/Rules/RespawnRuleSystem.cs b/Content.Server/GameTicking/Rules/RespawnRuleSystem.cs index a286808623..94f4072243 100644 --- a/Content.Server/GameTicking/Rules/RespawnRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/RespawnRuleSystem.cs @@ -1,14 +1,14 @@ using Content.Server.Chat.Managers; using Content.Server.GameTicking.Rules.Components; -using Content.Server.Players; using Content.Server.Station.Systems; using Content.Shared.Chat; using Content.Shared.Interaction.Events; using Content.Shared.Mind; using Content.Shared.Mobs; -using Robust.Server.GameObjects; +using Content.Shared.Players; using Robust.Server.Player; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Timing; using Robust.Shared.Utility; diff --git a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs index 01317dbfc1..ef949d09fc 100644 --- a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs @@ -17,9 +17,8 @@ using Content.Shared.PDA; using Content.Shared.Preferences; using Content.Shared.Roles; using Content.Shared.Roles.Jobs; -using Robust.Server.Player; using Robust.Shared.Configuration; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Timing; @@ -151,9 +150,9 @@ public sealed class TraitorRuleSystem : GameRuleSystem } } - private List FindPotentialTraitors(in Dictionary candidates, TraitorRuleComponent component) + private List FindPotentialTraitors(in Dictionary candidates, TraitorRuleComponent component) { - var list = new List(); + var list = new List(); var pendingQuery = GetEntityQuery(); foreach (var player in candidates.Keys) @@ -171,7 +170,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem list.Add(player); } - var prefList = new List(); + var prefList = new List(); foreach (var player in list) { @@ -189,9 +188,9 @@ public sealed class TraitorRuleSystem : GameRuleSystem return prefList; } - private List PickTraitors(int traitorCount, List prefList) + private List PickTraitors(int traitorCount, List prefList) { - var results = new List(traitorCount); + var results = new List(traitorCount); if (prefList.Count == 0) { Log.Info("Insufficient ready players to fill up with traitors, stopping the selection."); diff --git a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs index 82ae4b8fa6..a4febc385c 100644 --- a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs @@ -23,7 +23,7 @@ using Content.Shared.Zombies; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Configuration; -using Robust.Shared.Prototypes; +using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Timing; @@ -264,9 +264,9 @@ public sealed class ZombieRuleSystem : GameRuleSystem return; component.InfectedChosen = true; - var allPlayers = _playerManager.ServerSessions.ToList(); - var playerList = new List(); - var prefList = new List(); + var allPlayers = _playerManager.Sessions.ToList(); + var playerList = new List(); + var prefList = new List(); foreach (var player in allPlayers) { if (player.AttachedEntity == null || !HasComp(player.AttachedEntity) || HasComp(player.AttachedEntity)) @@ -288,7 +288,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem var totalInfected = 0; while (totalInfected < numInfected) { - IPlayerSession zombie; + ICommonSession zombie; if (prefList.Count == 0) { if (playerList.Count == 0) diff --git a/Content.Server/Ghost/Ghost.cs b/Content.Server/Ghost/Ghost.cs index d04b1197af..1453bf3faa 100644 --- a/Content.Server/Ghost/Ghost.cs +++ b/Content.Server/Ghost/Ghost.cs @@ -1,7 +1,6 @@ using Content.Server.GameTicking; using Content.Shared.Administration; using Content.Shared.Mind; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Ghost @@ -17,7 +16,7 @@ namespace Content.Server.Ghost public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("You have no session, you can't ghost."); diff --git a/Content.Server/Ghost/GhostSystem.cs b/Content.Server/Ghost/GhostSystem.cs index 6789be390e..9a0b74e2df 100644 --- a/Content.Server/Ghost/GhostSystem.cs +++ b/Content.Server/Ghost/GhostSystem.cs @@ -20,6 +20,7 @@ using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Systems; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Server.Ghost diff --git a/Content.Server/Ghost/Roles/Components/TakeGhostRoleEvent.cs b/Content.Server/Ghost/Roles/Components/TakeGhostRoleEvent.cs index c97e3be9dc..16d46871fe 100644 --- a/Content.Server/Ghost/Roles/Components/TakeGhostRoleEvent.cs +++ b/Content.Server/Ghost/Roles/Components/TakeGhostRoleEvent.cs @@ -1,4 +1,4 @@ -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.Ghost.Roles.Components; diff --git a/Content.Server/Ghost/Roles/GhostRoleSystem.cs b/Content.Server/Ghost/Roles/GhostRoleSystem.cs index 95677622db..23d88c253c 100644 --- a/Content.Server/Ghost/Roles/GhostRoleSystem.cs +++ b/Content.Server/Ghost/Roles/GhostRoleSystem.cs @@ -4,7 +4,6 @@ using Content.Server.Ghost.Roles.Components; using Content.Server.Ghost.Roles.Events; using Content.Server.Ghost.Roles.UI; using Content.Server.Mind.Commands; -using Content.Server.Players; using Content.Shared.Administration; using Content.Shared.Database; using Content.Shared.Follower; @@ -14,13 +13,14 @@ using Content.Shared.Ghost.Roles; using Content.Shared.Mind; using Content.Shared.Mind.Components; using Content.Shared.Mobs; +using Content.Shared.Players; using Content.Shared.Roles; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Enums; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Utility; @@ -98,7 +98,7 @@ namespace Content.Server.Ghost.Roles return unchecked(_nextRoleIdentifier++); } - public void OpenEui(IPlayerSession session) + public void OpenEui(ICommonSession session) { if (session.AttachedEntity is not {Valid: true} attached || !EntityManager.HasComponent(attached)) @@ -112,7 +112,7 @@ namespace Content.Server.Ghost.Roles eui.StateDirty(); } - public void OpenMakeGhostRoleEui(IPlayerSession session, EntityUid uid) + public void OpenMakeGhostRoleEui(ICommonSession session, EntityUid uid) { if (session.AttachedEntity == null) return; @@ -421,7 +421,7 @@ namespace Content.Server.Ghost.Roles public void Execute(IConsoleShell shell, string argStr, string[] args) { if(shell.Player != null) - EntitySystem.Get().OpenEui((IPlayerSession)shell.Player); + EntitySystem.Get().OpenEui(shell.Player); else shell.WriteLine("You can only open the ghost roles UI on a client."); } diff --git a/Content.Server/GhostKick/GhostKickUserOnTriggerSystem.cs b/Content.Server/GhostKick/GhostKickUserOnTriggerSystem.cs index bbf7813c16..7dc5fc55ab 100644 --- a/Content.Server/GhostKick/GhostKickUserOnTriggerSystem.cs +++ b/Content.Server/GhostKick/GhostKickUserOnTriggerSystem.cs @@ -1,5 +1,5 @@ using Content.Server.Explosion.EntitySystems; -using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.GhostKick; diff --git a/Content.Server/Gravity/GravityGeneratorSystem.cs b/Content.Server/Gravity/GravityGeneratorSystem.cs index 48002fb823..0bd159f61a 100644 --- a/Content.Server/Gravity/GravityGeneratorSystem.cs +++ b/Content.Server/Gravity/GravityGeneratorSystem.cs @@ -6,7 +6,7 @@ using Content.Shared.Database; using Content.Shared.Gravity; using Content.Shared.Interaction; using Robust.Server.GameObjects; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.Gravity { @@ -139,7 +139,7 @@ namespace Content.Server.Gravity return; if (session is { AttachedEntity: { } }) - _adminLogger.Add(LogType.Action, on ? LogImpact.Medium : LogImpact.High, $"{ToPrettyString(session.AttachedEntity.Value):player} set ${ToPrettyString(uid):target} to {(on ? "on" : "off")}"); + _adminLogger.Add(LogType.Action, on ? LogImpact.Medium : LogImpact.High, $"{session:player} set ${ToPrettyString(uid):target} to {(on ? "on" : "off")}"); component.SwitchedOn = on; UpdatePowerState(component, powerReceiver); diff --git a/Content.Server/Hands/Systems/HandsSystem.cs b/Content.Server/Hands/Systems/HandsSystem.cs index b5b01ac001..e3e6699537 100644 --- a/Content.Server/Hands/Systems/HandsSystem.cs +++ b/Content.Server/Hands/Systems/HandsSystem.cs @@ -18,12 +18,11 @@ using Content.Shared.Pulling.Components; using Content.Shared.Stacks; using Content.Shared.Storage; using Content.Shared.Throwing; -using Robust.Server.Player; using Robust.Shared.Containers; using Robust.Shared.GameStates; using Robust.Shared.Input.Binding; using Robust.Shared.Map; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Hands.Systems @@ -159,9 +158,9 @@ namespace Content.Server.Hands.Systems #endregion #region interactions - private bool HandleThrowItem(ICommonSession? session, EntityCoordinates coordinates, EntityUid entity) + private bool HandleThrowItem(ICommonSession? playerSession, EntityCoordinates coordinates, EntityUid entity) { - if (session is not IPlayerSession playerSession) + if (playerSession == null) return false; if (playerSession.AttachedEntity is not {Valid: true} player || @@ -220,7 +219,7 @@ namespace Content.Server.Hands.Systems // TODO: move to storage or inventory private void HandleSmartEquip(ICommonSession? session, string equipmentSlot) { - if (session is not IPlayerSession playerSession) + if (session is not { } playerSession) return; if (playerSession.AttachedEntity is not {Valid: true} plyEnt || !Exists(plyEnt)) diff --git a/Content.Server/Holiday/Christmas/LimitedItemGiverSystem.cs b/Content.Server/Holiday/Christmas/LimitedItemGiverSystem.cs index 58cf415a25..cf7f684343 100644 --- a/Content.Server/Holiday/Christmas/LimitedItemGiverSystem.cs +++ b/Content.Server/Holiday/Christmas/LimitedItemGiverSystem.cs @@ -2,7 +2,7 @@ using Content.Server.Popups; using Content.Shared.Interaction; using Content.Shared.Storage; -using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Holiday.Christmas; diff --git a/Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.Modifier.cs b/Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.Modifier.cs index 7c0bb7383b..05a8b06222 100644 --- a/Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.Modifier.cs +++ b/Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.Modifier.cs @@ -3,7 +3,7 @@ using Content.Shared.Administration; using Content.Shared.Humanoid; using Content.Shared.Verbs; using Robust.Server.GameObjects; -using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Humanoid; @@ -48,7 +48,7 @@ public sealed partial class HumanoidAppearanceSystem private void OnBaseLayersSet(EntityUid uid, HumanoidAppearanceComponent component, HumanoidMarkingModifierBaseLayersSetMessage message) { - if (message.Session is not IPlayerSession player + if (message.Session is not { } player || !_adminManager.HasAdminFlag(player, AdminFlags.Fun)) { return; @@ -81,7 +81,7 @@ public sealed partial class HumanoidAppearanceSystem private void OnMarkingsSet(EntityUid uid, HumanoidAppearanceComponent component, HumanoidMarkingModifierMarkingSetMessage message) { - if (message.Session is not IPlayerSession player + if (message.Session is not { } player || !_adminManager.HasAdminFlag(player, AdminFlags.Fun)) { return; diff --git a/Content.Server/Implants/ImplanterSystem.cs b/Content.Server/Implants/ImplanterSystem.cs index f3072769e4..0d46241f41 100644 --- a/Content.Server/Implants/ImplanterSystem.cs +++ b/Content.Server/Implants/ImplanterSystem.cs @@ -1,11 +1,9 @@ -using Content.Server.Guardian; using Content.Server.Popups; using Content.Shared.DoAfter; using Content.Shared.IdentityManagement; using Content.Shared.Implants; using Content.Shared.Implants.Components; using Content.Shared.Interaction; -using Content.Shared.Mobs.Components; using Content.Shared.Popups; using Robust.Shared.Containers; @@ -33,28 +31,39 @@ public sealed partial class ImplanterSystem : SharedImplanterSystem if (args.Target == null || !args.CanReach || args.Handled) return; - //Simplemobs and regular mobs should be injectable, but only regular mobs have mind. - //So just don't implant/draw anything that isn't living or is a guardian - //TODO: Rework a bit when surgery is in to work with implant cases - if (!HasComp(args.Target.Value) || HasComp(args.Target.Value)) + var target = args.Target.Value; + if (!CheckTarget(target, component.Whitelist, component.Blacklist)) return; //TODO: Rework when surgery is in for implant cases if (component.CurrentMode == ImplanterToggleMode.Draw && !component.ImplantOnly) { - TryDraw(component, args.User, args.Target.Value, uid); + TryDraw(component, args.User, target, uid); } else { - if (!CanImplant(args.User, args.Target.Value, uid, component, out _, out _)) + if (!CanImplant(args.User, target, uid, component, out var implant, out _)) + { + // no popup if implant doesn't exist + if (implant == null) + return; + + // show popup to the user saying implant failed + var name = Identity.Name(target, EntityManager, args.User); + var msg = Loc.GetString("implanter-component-implant-failed", ("implant", implant), ("target", name)); + _popup.PopupEntity(msg, target, args.User); + // prevent further interaction since popup was shown + args.Handled = true; return; + } //Implant self instantly, otherwise try to inject the target. - if (args.User == args.Target) - Implant(args.User, args.Target.Value, uid, component); + if (args.User == target) + Implant(target, target, uid, component); else - TryImplant(component, args.User, args.Target.Value, uid); + TryImplant(component, args.User, target, uid); } + args.Handled = true; } diff --git a/Content.Server/Instruments/InstrumentComponent.cs b/Content.Server/Instruments/InstrumentComponent.cs index 810d265314..4302ab6791 100644 --- a/Content.Server/Instruments/InstrumentComponent.cs +++ b/Content.Server/Instruments/InstrumentComponent.cs @@ -1,7 +1,7 @@ using Content.Server.UserInterface; using Content.Shared.Instruments; using Robust.Server.GameObjects; -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Instruments; @@ -17,7 +17,7 @@ public sealed partial class InstrumentComponent : SharedInstrumentComponent [ViewVariables] public uint LastSequencerTick = 0; // TODO Instruments: Make this ECS - public IPlayerSession? InstrumentPlayer => + public ICommonSession? InstrumentPlayer => _entMan.GetComponentOrNull(Owner)?.CurrentSingleUser ?? _entMan.GetComponentOrNull(Owner)?.PlayerSession; } diff --git a/Content.Server/Instruments/InstrumentSystem.cs b/Content.Server/Instruments/InstrumentSystem.cs index ec23382105..6f8369182c 100644 --- a/Content.Server/Instruments/InstrumentSystem.cs +++ b/Content.Server/Instruments/InstrumentSystem.cs @@ -9,12 +9,12 @@ using Content.Shared.Physics; using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Audio.Midi; using Robust.Shared.Collections; using Robust.Shared.Configuration; using Robust.Shared.Console; using Robust.Shared.GameStates; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Server.Instruments; @@ -385,7 +385,7 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem var nearby = GetBands(entity); _bui.TrySendUiMessage(entity, request.UiKey, new InstrumentBandResponseBuiMessage(nearby), - (IPlayerSession)request.Session); + request.Session); } _bandRequestQueue.Clear(); @@ -447,7 +447,7 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem } } - public void ToggleInstrumentUi(EntityUid uid, IPlayerSession session, InstrumentComponent? component = null) + public void ToggleInstrumentUi(EntityUid uid, ICommonSession session, InstrumentComponent? component = null) { if (!Resolve(uid, ref component)) return; diff --git a/Content.Server/Interaction/InteractionSystem.cs b/Content.Server/Interaction/InteractionSystem.cs index a612b73840..8d4e8eb818 100644 --- a/Content.Server/Interaction/InteractionSystem.cs +++ b/Content.Server/Interaction/InteractionSystem.cs @@ -1,20 +1,10 @@ - - -using Content.Server.Administration.Logs; -using Content.Server.Pulling; using Content.Shared.ActionBlocker; -using Content.Shared.DragDrop; -using Content.Shared.Input; using Content.Shared.Interaction; -using Content.Shared.Pulling.Components; using Content.Shared.Storage; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Containers; -using Robust.Shared.Input.Binding; -using Robust.Shared.Map; -using Robust.Shared.Players; -using Robust.Shared.Random; +using Robust.Shared.Player; namespace Content.Server.Interaction { diff --git a/Content.Server/Interaction/TilePryCommand.cs b/Content.Server/Interaction/TilePryCommand.cs index 4fe3599df9..fa75b6d9e4 100644 --- a/Content.Server/Interaction/TilePryCommand.cs +++ b/Content.Server/Interaction/TilePryCommand.cs @@ -1,10 +1,7 @@ using System.Numerics; using Content.Server.Administration; -using Content.Server.Tools.Components; using Content.Shared.Administration; using Content.Shared.Maps; -using Content.Shared.Tools.Components; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Map; @@ -24,7 +21,7 @@ namespace Content.Server.Interaction public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player?.AttachedEntity is not {} attached) { return; diff --git a/Content.Server/KillTracking/KillTrackingSystem.cs b/Content.Server/KillTracking/KillTrackingSystem.cs index 177f28ddc8..afb4283e82 100644 --- a/Content.Server/KillTracking/KillTrackingSystem.cs +++ b/Content.Server/KillTracking/KillTrackingSystem.cs @@ -2,7 +2,7 @@ using Content.Shared.Damage; using Content.Shared.FixedPoint; using Content.Shared.Mobs; -using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.KillTracking; diff --git a/Content.Server/MagicMirror/MagicMirrorSystem.cs b/Content.Server/MagicMirror/MagicMirrorSystem.cs index 90a0b19b7d..a599a2c868 100644 --- a/Content.Server/MagicMirror/MagicMirrorSystem.cs +++ b/Content.Server/MagicMirror/MagicMirrorSystem.cs @@ -5,8 +5,7 @@ using Content.Shared.Humanoid; using Content.Shared.Humanoid.Markings; using Content.Shared.MagicMirror; using Robust.Server.GameObjects; -using Robust.Server.Player; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.MagicMirror; @@ -147,7 +146,7 @@ public sealed class MagicMirrorSystem : EntitySystem private void UpdateInterface(EntityUid uid, EntityUid playerUid, ICommonSession session, HumanoidAppearanceComponent? humanoid = null) { - if (!Resolve(playerUid, ref humanoid) || session is not IPlayerSession player) + if (!Resolve(playerUid, ref humanoid) || session is not { } player) { return; } diff --git a/Content.Server/Mapping/MappingCommand.cs b/Content.Server/Mapping/MappingCommand.cs index e4a4cd8942..d72a5c4178 100644 --- a/Content.Server/Mapping/MappingCommand.cs +++ b/Content.Server/Mapping/MappingCommand.cs @@ -40,7 +40,7 @@ namespace Content.Server.Mapping public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError(Loc.GetString("cmd-savemap-server")); return; diff --git a/Content.Server/Maps/GridDraggingSystem.cs b/Content.Server/Maps/GridDraggingSystem.cs index 90770af1ad..7d7b61955b 100644 --- a/Content.Server/Maps/GridDraggingSystem.cs +++ b/Content.Server/Maps/GridDraggingSystem.cs @@ -1,10 +1,9 @@ using Content.Shared.Maps; using Robust.Server.Console; -using Robust.Server.Player; -using Robust.Shared.Players; using Robust.Shared.Utility; using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Systems; +using Robust.Shared.Player; namespace Content.Server.Maps; @@ -27,7 +26,7 @@ public sealed class GridDraggingSystem : SharedGridDraggingSystem public void Toggle(ICommonSession session) { - if (session is not IPlayerSession pSession) + if (session is not { } pSession) return; DebugTools.Assert(_admin.CanCommand(pSession, CommandName)); @@ -52,7 +51,7 @@ public sealed class GridDraggingSystem : SharedGridDraggingSystem { var grid = GetEntity(ev.Grid); - if (args.SenderSession is not IPlayerSession playerSession || + if (args.SenderSession is not { } playerSession || !_admin.CanCommand(playerSession, CommandName) || !Exists(grid) || Deleted(grid)) @@ -69,7 +68,7 @@ public sealed class GridDraggingSystem : SharedGridDraggingSystem { var grid = GetEntity(msg.Grid); - if (args.SenderSession is not IPlayerSession playerSession || + if (args.SenderSession is not { } playerSession || !_admin.CanCommand(playerSession, CommandName) || !Exists(grid) || Deleted(grid)) diff --git a/Content.Server/MassMedia/Systems/NewsSystem.cs b/Content.Server/MassMedia/Systems/NewsSystem.cs index 98bfe702b6..93663474ac 100644 --- a/Content.Server/MassMedia/Systems/NewsSystem.cs +++ b/Content.Server/MassMedia/Systems/NewsSystem.cs @@ -18,6 +18,7 @@ using Content.Shared.MassMedia.Systems; using Content.Shared.PDA; using Robust.Server.GameObjects; using Robust.Shared.Containers; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Server.MassMedia.Systems; @@ -210,7 +211,6 @@ public sealed class NewsSystem : EntitySystem continue; _ringer.RingerPlayRingtone(uid, ringer); - break; } } diff --git a/Content.Server/Mech/Systems/MechSystem.cs b/Content.Server/Mech/Systems/MechSystem.cs index fd8f8fd767..a0ca94197e 100644 --- a/Content.Server/Mech/Systems/MechSystem.cs +++ b/Content.Server/Mech/Systems/MechSystem.cs @@ -20,6 +20,7 @@ using Robust.Server.Containers; using Robust.Server.GameObjects; using Robust.Shared.Containers; using Robust.Shared.Map; +using Robust.Shared.Player; namespace Content.Server.Mech.Systems; diff --git a/Content.Server/Medical/DefibrillatorSystem.cs b/Content.Server/Medical/DefibrillatorSystem.cs index 4ffa9f558d..d041f8ee9d 100644 --- a/Content.Server/Medical/DefibrillatorSystem.cs +++ b/Content.Server/Medical/DefibrillatorSystem.cs @@ -18,7 +18,7 @@ using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Timing; using Content.Shared.Toggleable; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Server.Medical; diff --git a/Content.Server/Medical/HealthAnalyzerSystem.cs b/Content.Server/Medical/HealthAnalyzerSystem.cs index 6e2f7fdf36..cde361ec74 100644 --- a/Content.Server/Medical/HealthAnalyzerSystem.cs +++ b/Content.Server/Medical/HealthAnalyzerSystem.cs @@ -8,6 +8,7 @@ using Content.Shared.Mobs.Components; using Robust.Server.GameObjects; using Content.Server.Temperature.Components; using Content.Server.Body.Components; +using Robust.Shared.Player; namespace Content.Server.Medical { diff --git a/Content.Server/Mind/Commands/RenameCommand.cs b/Content.Server/Mind/Commands/RenameCommand.cs index 2d65adc508..bb7d89ddf5 100644 --- a/Content.Server/Mind/Commands/RenameCommand.cs +++ b/Content.Server/Mind/Commands/RenameCommand.cs @@ -9,9 +9,9 @@ using Content.Shared.Administration; using Content.Shared.Mind; using Content.Shared.PDA; using Content.Shared.StationRecords; -using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Console; +using Robust.Shared.Player; namespace Content.Server.Mind.Commands; diff --git a/Content.Server/Mind/MindSystem.cs b/Content.Server/Mind/MindSystem.cs index d2721db7b6..f23e9b6407 100644 --- a/Content.Server/Mind/MindSystem.cs +++ b/Content.Server/Mind/MindSystem.cs @@ -11,7 +11,9 @@ using Robust.Server.GameObjects; using Robust.Server.GameStates; using Robust.Server.Player; using Robust.Shared.Map; +using Robust.Shared.Map.Components; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Timing; using Robust.Shared.Utility; @@ -71,51 +73,45 @@ public sealed class MindSystem : SharedMindSystem } TransferTo(mindId, null, createGhost: false, mind: mind); + DebugTools.AssertNull(mind.OwnedEntity); - // Let's not create ghosts if not in the middle of the round. - if (_gameTicker.RunLevel == GameRunLevel.PreRoundLobby) + if (!component.GhostOnShutdown || mind.Session == null || _gameTicker.RunLevel == GameRunLevel.PreRoundLobby) return; - // I just love convoluted entity shutdown logic that results in more entities being spawned. - if (component.GhostOnShutdown && mind.Session != null) + var xform = Transform(uid); + var gridId = xform.GridUid; + var spawnPosition = Transform(uid).Coordinates; + + // Use a regular timer here because the entity has probably been deleted. + Timer.Spawn(0, () => { - var xform = Transform(uid); - var gridId = xform.GridUid; - var spawnPosition = Transform(uid).Coordinates; + // Make extra sure the round didn't end between spawning the timer and it being executed. + if (_gameTicker.RunLevel == GameRunLevel.PreRoundLobby) + return; - // Use a regular timer here because the entity has probably been deleted. - Timer.Spawn(0, () => + // Async this so that we don't throw if the grid we're on is being deleted. + if (!HasComp(gridId)) + spawnPosition = _gameTicker.GetObserverSpawnPoint(); + + // TODO refactor observer spawning. + // please. + if (!spawnPosition.IsValid(EntityManager)) { - // Make extra sure the round didn't end between spawning the timer and it being executed. - if (_gameTicker.RunLevel == GameRunLevel.PreRoundLobby) - return; + // This should be an error, if it didn't cause tests to start erroring when they delete a player. + Log.Warning($"Entity \"{ToPrettyString(uid)}\" for {mind.CharacterName} was deleted, and no applicable spawn location is available."); + TransferTo(mindId, null, createGhost: false, mind: mind); + return; + } - // Async this so that we don't throw if the grid we're on is being deleted. - if (!_maps.GridExists(gridId)) - spawnPosition = _gameTicker.GetObserverSpawnPoint(); + var ghost = Spawn(GameTicker.ObserverPrototypeName, spawnPosition); + var ghostComponent = Comp(ghost); + _ghosts.SetCanReturnToBody(ghostComponent, false); - // TODO refactor observer spawning. - // please. - if (!spawnPosition.IsValid(EntityManager)) - { - // This should be an error, if it didn't cause tests to start erroring when they delete a player. - Log.Warning($"Entity \"{ToPrettyString(uid)}\" for {mind.CharacterName} was deleted, and no applicable spawn location is available."); - TransferTo(mindId, null, createGhost: false, mind: mind); - return; - } - - var ghost = Spawn("MobObserver", spawnPosition); - var ghostComponent = Comp(ghost); - _ghosts.SetCanReturnToBody(ghostComponent, false); - - // Log these to make sure they're not causing the GameTicker round restart bugs... - Log.Debug($"Entity \"{ToPrettyString(uid)}\" for {mind.CharacterName} was deleted, spawned \"{ToPrettyString(ghost)}\"."); - - var val = mind.CharacterName ?? string.Empty; - _metaData.SetEntityName(ghost, val); - TransferTo(mindId, ghost, mind: mind); - }); - } + // Log these to make sure they're not causing the GameTicker round restart bugs... + Log.Debug($"Entity \"{ToPrettyString(uid)}\" for {mind.CharacterName} was deleted, spawned \"{ToPrettyString(ghost)}\"."); + _metaData.SetEntityName(ghost, mind.CharacterName ?? string.Empty); + TransferTo(mindId, ghost, mind: mind); + }); } public override bool TryGetMind(NetUserId user, [NotNullWhen(true)] out EntityUid? mindId, [NotNullWhen(true)] out MindComponent? mind) @@ -130,18 +126,18 @@ public sealed class MindSystem : SharedMindSystem return false; } - public bool TryGetSession(EntityUid? mindId, [NotNullWhen(true)] out IPlayerSession? session) + public bool TryGetSession(EntityUid? mindId, [NotNullWhen(true)] out ICommonSession? session) { session = null; - return TryComp(mindId, out MindComponent? mind) && (session = (IPlayerSession?) mind.Session) != null; + return TryComp(mindId, out MindComponent? mind) && (session = mind.Session) != null; } - public IPlayerSession? GetSession(MindComponent mind) + public ICommonSession? GetSession(MindComponent mind) { - return (IPlayerSession?) mind.Session; + return mind.Session; } - public bool TryGetSession(MindComponent mind, [NotNullWhen(true)] out IPlayerSession? session) + public bool TryGetSession(MindComponent mind, [NotNullWhen(true)] out ICommonSession? session) { return (session = GetSession(mind)) != null; } @@ -179,7 +175,9 @@ public sealed class MindSystem : SharedMindSystem return; } - GetSession(mind)?.AttachToEntity(entity); + if (GetSession(mind) is { } session) + _actor.Attach(entity, session); + mind.VisitingEntity = entity; // EnsureComp instead of AddComp to deal with deferred deletions. @@ -204,7 +202,8 @@ public sealed class MindSystem : SharedMindSystem return; var owned = mind.OwnedEntity; - GetSession(mind)?.AttachToEntity(owned); + if (GetSession(mind) is { } session) + _actor.Attach(owned, session); if (owned.HasValue) { @@ -294,6 +293,7 @@ public sealed class MindSystem : SharedMindSystem if (session != null && !alreadyAttached && mind.VisitingEntity == null) { _actor.Attach(entity, session, true); + DebugTools.Assert(session.AttachedEntity == entity, $"Failed to attach entity."); Log.Info($"Session {session.Name} transferred to entity {entity}."); } diff --git a/Content.Server/Mind/Toolshed/MindCommand.cs b/Content.Server/Mind/Toolshed/MindCommand.cs index b53f9a6a9c..917e6fb7f1 100644 --- a/Content.Server/Mind/Toolshed/MindCommand.cs +++ b/Content.Server/Mind/Toolshed/MindCommand.cs @@ -1,5 +1,5 @@ using Content.Shared.Mind; -using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Toolshed; using Robust.Shared.Toolshed.Errors; using Robust.Shared.Toolshed.Syntax; @@ -15,7 +15,7 @@ public sealed class MindCommand : ToolshedCommand private SharedMindSystem? _mind; [CommandImplementation("get")] - public MindComponent? Get([PipedArgument] IPlayerSession session) + public MindComponent? Get([PipedArgument] ICommonSession session) { _mind ??= GetSys(); return _mind.TryGetMind(session, out _, out var mind) ? mind : null; @@ -32,7 +32,7 @@ public sealed class MindCommand : ToolshedCommand public EntityUid Control( [CommandInvocationContext] IInvocationContext ctx, [PipedArgument] EntityUid target, - [CommandArgument] ValueRef playerRef) + [CommandArgument] ValueRef playerRef) { _mind ??= GetSys(); diff --git a/Content.Server/Mobs/CritMobActionsSystem.cs b/Content.Server/Mobs/CritMobActionsSystem.cs index 9d0a6b4a85..0f6a6fc9b0 100644 --- a/Content.Server/Mobs/CritMobActionsSystem.cs +++ b/Content.Server/Mobs/CritMobActionsSystem.cs @@ -6,7 +6,7 @@ using Content.Shared.Mobs; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Robust.Server.Console; -using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Mobs; diff --git a/Content.Server/Morgue/MorgueSystem.cs b/Content.Server/Morgue/MorgueSystem.cs index b300336cd2..91fb0ab9f1 100644 --- a/Content.Server/Morgue/MorgueSystem.cs +++ b/Content.Server/Morgue/MorgueSystem.cs @@ -3,7 +3,7 @@ using Content.Shared.Body.Components; using Content.Shared.Examine; using Content.Shared.Morgue; using Content.Shared.Morgue.Components; -using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Morgue; diff --git a/Content.Server/Motd/MOTDCommand.cs b/Content.Server/Motd/MOTDCommand.cs index a1aa4d2df5..9e59589b95 100644 --- a/Content.Server/Motd/MOTDCommand.cs +++ b/Content.Server/Motd/MOTDCommand.cs @@ -1,6 +1,5 @@ using Content.Server.Administration.Managers; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Motd; @@ -14,10 +13,10 @@ internal sealed class MOTDCommand : LocalizedCommands [Dependency] private readonly IAdminManager _adminManager = default!; public override string Command => "motd"; - + public override void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = (IPlayerSession?)shell.Player; + var player = shell.Player; if (args.Length < 1 || (player != null && _adminManager is AdminManager aMan && !aMan.CanCommand(player, "set-motd"))) shell.ConsoleHost.ExecuteCommand(shell.Player, "get-motd"); else @@ -26,7 +25,7 @@ internal sealed class MOTDCommand : LocalizedCommands public override CompletionResult GetCompletion(IConsoleShell shell, string[] args) { - var player = (IPlayerSession?)shell.Player; + var player = shell.Player; if (player != null && _adminManager is AdminManager aMan && !aMan.CanCommand(player, "set-motd")) return CompletionResult.Empty; if (args.Length == 1) diff --git a/Content.Server/Motd/MOTDSystem.cs b/Content.Server/Motd/MOTDSystem.cs index e749fe48f3..39d780f108 100644 --- a/Content.Server/Motd/MOTDSystem.cs +++ b/Content.Server/Motd/MOTDSystem.cs @@ -2,9 +2,9 @@ using Content.Server.Chat.Managers; using Content.Server.GameTicking; using Content.Shared.CCVar; using Content.Shared.Chat; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Configuration; +using Robust.Shared.Player; namespace Content.Server.Motd; @@ -41,7 +41,7 @@ public sealed class MOTDSystem : EntitySystem { if (string.IsNullOrEmpty(_messageOfTheDay)) return; - + var wrappedMessage = Loc.GetString("motd-wrap-message", ("motd", _messageOfTheDay)); _chatManager.ChatMessageToAll(ChatChannel.Server, _messageOfTheDay, wrappedMessage, source: EntityUid.Invalid, hideChat: false, recordReplay: true); } @@ -49,11 +49,11 @@ public sealed class MOTDSystem : EntitySystem /// /// Sends the Message Of The Day, if any, to a specific player. /// - public void TrySendMOTD(IPlayerSession player) + public void TrySendMOTD(ICommonSession player) { if (string.IsNullOrEmpty(_messageOfTheDay)) return; - + var wrappedMessage = Loc.GetString("motd-wrap-message", ("motd", _messageOfTheDay)); _chatManager.ChatMessageToOne(ChatChannel.Server, _messageOfTheDay, wrappedMessage, source: EntityUid.Invalid, hideChat: false, client: player.ConnectedClient); } @@ -68,10 +68,10 @@ public sealed class MOTDSystem : EntitySystem { if (string.IsNullOrEmpty(_messageOfTheDay)) return; - + var wrappedMessage = Loc.GetString("motd-wrap-message", ("motd", _messageOfTheDay)); shell.WriteLine(wrappedMessage); - if (shell.Player is IPlayerSession player) + if (shell.Player is { } player) _chatManager.ChatMessageToOne(ChatChannel.Server, _messageOfTheDay, wrappedMessage, source: EntityUid.Invalid, hideChat: false, client: player.ConnectedClient); } @@ -92,7 +92,7 @@ public sealed class MOTDSystem : EntitySystem { if (val == _messageOfTheDay) return; - + _messageOfTheDay = val; TrySendMOTD(); } diff --git a/Content.Server/Motd/SetMOTDCommand.cs b/Content.Server/Motd/SetMOTDCommand.cs index f3f52b0670..9678781c87 100644 --- a/Content.Server/Motd/SetMOTDCommand.cs +++ b/Content.Server/Motd/SetMOTDCommand.cs @@ -4,7 +4,6 @@ using Content.Shared.Administration; using Content.Shared.Database; using Content.Shared.CCVar; using Content.Server.Chat.Managers; -using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Console; @@ -21,18 +20,18 @@ public sealed class SetMotdCommand : LocalizedCommands [Dependency] private readonly IConfigurationManager _configurationManager = default!; public override string Command => "set-motd"; - + public override void Execute(IConsoleShell shell, string argStr, string[] args) { string motd = ""; - var player = (IPlayerSession?)shell.Player; + var player = shell.Player; if (args.Length > 0) { motd = string.Join(" ", args).Trim(); if (player != null && _chatManager.MessageCharacterLimit(player, motd)) return; // check function prints its own error response } - + _configurationManager.SetCVar(CCVars.MOTD, motd); // A hook in MOTDSystem broadcasts changes to the MOTD to everyone so we don't need to do it here. if (string.IsNullOrEmpty(motd)) { diff --git a/Content.Server/Movement/Systems/LagCompensationSystem.cs b/Content.Server/Movement/Systems/LagCompensationSystem.cs index 64965c2fee..0576fe8f25 100644 --- a/Content.Server/Movement/Systems/LagCompensationSystem.cs +++ b/Content.Server/Movement/Systems/LagCompensationSystem.cs @@ -1,7 +1,7 @@ using Content.Server.Movement.Components; using Robust.Server.Player; using Robust.Shared.Map; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Server.Movement.Systems; diff --git a/Content.Server/NPC/Commands/NPCCommand.cs b/Content.Server/NPC/Commands/NPCCommand.cs index 57fe223b66..7f9e56b8ca 100644 --- a/Content.Server/NPC/Commands/NPCCommand.cs +++ b/Content.Server/NPC/Commands/NPCCommand.cs @@ -2,7 +2,6 @@ using Content.Server.Administration; using Content.Server.EUI; using Content.Server.NPC.UI; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.NPC.Commands; @@ -15,7 +14,7 @@ public sealed class NPCCommand : IConsoleCommand public string Help => $"{Command}"; public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession playerSession) + if (shell.Player is not { } playerSession) { return; } diff --git a/Content.Server/NPC/HTN/HTNSystem.cs b/Content.Server/NPC/HTN/HTNSystem.cs index 2c1dadb127..a7689fbabe 100644 --- a/Content.Server/NPC/HTN/HTNSystem.cs +++ b/Content.Server/NPC/HTN/HTNSystem.cs @@ -4,17 +4,14 @@ using System.Threading; using Content.Server.Administration.Managers; using Robust.Shared.CPUJob.JobQueues; using Robust.Shared.CPUJob.JobQueues.Queues; -using Content.Server.NPC.Components; using Content.Server.NPC.HTN.PrimitiveTasks; using Content.Server.NPC.Systems; using Content.Shared.Administration; using Content.Shared.Mobs; using Content.Shared.NPC; -using Content.Shared.NPC; using JetBrains.Annotations; using Robust.Server.GameObjects; -using Robust.Server.Player; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Utility; @@ -48,7 +45,7 @@ public sealed class HTNSystem : EntitySystem private void OnHTNMessage(RequestHTNMessage msg, EntitySessionEventArgs args) { - if (!_admin.HasAdminFlag((IPlayerSession) args.SenderSession, AdminFlags.Debug)) + if (!_admin.HasAdminFlag(args.SenderSession, AdminFlags.Debug)) { _subscribers.Remove(args.SenderSession); return; diff --git a/Content.Server/NPC/Pathfinding/PathfindingSystem.cs b/Content.Server/NPC/Pathfinding/PathfindingSystem.cs index bb0eff7b39..1b1f6f5476 100644 --- a/Content.Server/NPC/Pathfinding/PathfindingSystem.cs +++ b/Content.Server/NPC/Pathfinding/PathfindingSystem.cs @@ -13,7 +13,7 @@ using Robust.Shared.Enums; using Robust.Shared.Map; using Robust.Shared.Physics; using Robust.Shared.Physics.Systems; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Threading; using Robust.Shared.Timing; @@ -528,7 +528,7 @@ namespace Content.Server.NPC.Pathfinding private void OnBreadcrumbs(RequestPathfindingDebugMessage msg, EntitySessionEventArgs args) { - var pSession = (IPlayerSession) args.SenderSession; + var pSession = args.SenderSession; if (!_adminManager.HasAdminFlag(pSession, AdminFlags.Debug)) { diff --git a/Content.Server/NPC/Systems/NPCSteeringSystem.cs b/Content.Server/NPC/Systems/NPCSteeringSystem.cs index 61b43df6f0..e5b62acfe8 100644 --- a/Content.Server/NPC/Systems/NPCSteeringSystem.cs +++ b/Content.Server/NPC/Systems/NPCSteeringSystem.cs @@ -17,14 +17,12 @@ using Content.Shared.NPC; using Content.Shared.NPC.Events; using Content.Shared.Physics; using Content.Shared.Weapons.Melee; -using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Map; using Robust.Shared.Physics; using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Systems; using Robust.Shared.Player; -using Robust.Shared.Players; using Robust.Shared.Random; using Robust.Shared.Timing; using Robust.Shared.Utility; @@ -147,7 +145,7 @@ public sealed partial class NPCSteeringSystem : SharedNPCSteeringSystem private void OnDebugRequest(RequestNPCSteeringDebugEvent msg, EntitySessionEventArgs args) { - if (!_admin.IsAdmin((IPlayerSession)args.SenderSession)) + if (!_admin.IsAdmin(args.SenderSession)) return; if (msg.Enabled) diff --git a/Content.Server/NPC/Systems/NPCSystem.cs b/Content.Server/NPC/Systems/NPCSystem.cs index 02dc4ceea6..7d33133a37 100644 --- a/Content.Server/NPC/Systems/NPCSystem.cs +++ b/Content.Server/NPC/Systems/NPCSystem.cs @@ -7,6 +7,7 @@ using Content.Shared.Mobs.Systems; using Content.Shared.NPC; using Robust.Server.GameObjects; using Robust.Shared.Configuration; +using Robust.Shared.Player; namespace Content.Server.NPC.Systems { diff --git a/Content.Server/Ninja/Systems/SpiderChargeSystem.cs b/Content.Server/Ninja/Systems/SpiderChargeSystem.cs index 6f3c3b3f9d..0182bd7ca7 100644 --- a/Content.Server/Ninja/Systems/SpiderChargeSystem.cs +++ b/Content.Server/Ninja/Systems/SpiderChargeSystem.cs @@ -23,7 +23,7 @@ public sealed class SpiderChargeSystem : EntitySystem { base.Initialize(); - SubscribeLocalEvent(BeforePlant); + SubscribeLocalEvent(OnAttemptStick); SubscribeLocalEvent(OnStuck); SubscribeLocalEvent(OnExplode); } @@ -31,14 +31,17 @@ public sealed class SpiderChargeSystem : EntitySystem /// /// Require that the planter is a ninja and the charge is near the target warp point. /// - private void BeforePlant(EntityUid uid, SpiderChargeComponent comp, BeforeRangedInteractEvent args) + private void OnAttemptStick(EntityUid uid, SpiderChargeComponent comp, AttemptEntityStickEvent args) { + if (args.Cancelled) + return; + var user = args.User; if (!_mind.TryGetRole(user, out var role)) { _popup.PopupEntity(Loc.GetString("spider-charge-not-ninja"), user, user); - args.Handled = true; + args.Cancelled = true; return; } @@ -47,12 +50,14 @@ public sealed class SpiderChargeSystem : EntitySystem return; // assumes warp point still exists - var target = Transform(role.SpiderChargeTarget.Value).MapPosition; - var coords = args.ClickLocation.ToMap(EntityManager, _transform); - if (!coords.InRange(target, comp.Range)) + var targetXform = Transform(role.SpiderChargeTarget.Value); + var locXform = Transform(args.Target); + if (locXform.MapID != targetXform.MapID || + (_transform.GetWorldPosition(locXform) - _transform.GetWorldPosition(targetXform)).LengthSquared() > comp.Range * comp.Range) { _popup.PopupEntity(Loc.GetString("spider-charge-too-far"), user, user); - args.Handled = true; + args.Cancelled = true; + return; } } diff --git a/Content.Server/NodeContainer/EntitySystems/NodeGroupSystem.cs b/Content.Server/NodeContainer/EntitySystems/NodeGroupSystem.cs index e4bd303150..9ee9702c5b 100644 --- a/Content.Server/NodeContainer/EntitySystems/NodeGroupSystem.cs +++ b/Content.Server/NodeContainer/EntitySystems/NodeGroupSystem.cs @@ -9,6 +9,7 @@ using JetBrains.Annotations; using Robust.Server.Player; using Robust.Shared.Enums; using Robust.Shared.Map; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.NodeContainer.EntitySystems @@ -29,7 +30,7 @@ namespace Content.Server.NodeContainer.EntitySystems private readonly List _visDeletes = new(); private readonly List _visSends = new(); - private readonly HashSet _visPlayers = new(); + private readonly HashSet _visPlayers = new(); private readonly HashSet _toRemake = new(); private readonly HashSet _nodeGroups = new(); private readonly HashSet _toRemove = new(); @@ -74,7 +75,7 @@ namespace Content.Server.NodeContainer.EntitySystems private void HandleEnableMsg(NodeVis.MsgEnable msg, EntitySessionEventArgs args) { - var session = (IPlayerSession) args.SenderSession; + var session = args.SenderSession; if (!_adminManager.HasAdminFlag(session, AdminFlags.Debug)) return; @@ -397,7 +398,7 @@ namespace Content.Server.NodeContainer.EntitySystems } } - private void VisSendFullStateImmediate(IPlayerSession player) + private void VisSendFullStateImmediate(ICommonSession player) { var msg = new NodeVis.MsgData(); diff --git a/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs b/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs index 875c328bcb..e8e456c0ea 100644 --- a/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs +++ b/Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs @@ -9,7 +9,7 @@ using Content.Shared.Nutrition.AnimalHusbandry; using Content.Shared.Nutrition.Components; using Content.Shared.Nutrition.EntitySystems; using Content.Shared.Storage; -using Robust.Server.GameObjects; +using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Timing; diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 8406ce222d..ff4ec41dd9 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -17,6 +17,7 @@ using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; using Content.Shared.IdentityManagement; using Content.Shared.Interaction; +using Content.Shared.Interaction.Components; using Content.Shared.Interaction.Events; using Content.Shared.Inventory; using Content.Shared.Mobs.Systems; @@ -101,6 +102,9 @@ public sealed class FoodSystem : EntitySystem if (!TryComp(target, out var body)) return (false, false); + if (HasComp(food)) + return (false, false); + if (_openable.IsClosed(food, user)) return (false, true); diff --git a/Content.Server/Nutrition/Hungry.cs b/Content.Server/Nutrition/Hungry.cs index c27f302a8d..ae68dcd2fd 100644 --- a/Content.Server/Nutrition/Hungry.cs +++ b/Content.Server/Nutrition/Hungry.cs @@ -1,9 +1,7 @@ using Content.Server.Administration; -using Content.Server.Nutrition.Components; using Content.Shared.Administration; using Content.Shared.Nutrition.Components; using Content.Shared.Nutrition.EntitySystems; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Nutrition @@ -19,7 +17,7 @@ namespace Content.Server.Nutrition public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null) { shell.WriteLine("You cannot use this command unless you are a player."); diff --git a/Content.Server/Nyanotrasen/Abilities/Psionics/PsionicAbilitiesSystem.cs b/Content.Server/Nyanotrasen/Abilities/Psionics/PsionicAbilitiesSystem.cs index 088f615946..ee16aaccfb 100644 --- a/Content.Server/Nyanotrasen/Abilities/Psionics/PsionicAbilitiesSystem.cs +++ b/Content.Server/Nyanotrasen/Abilities/Psionics/PsionicAbilitiesSystem.cs @@ -13,6 +13,7 @@ using Robust.Shared.Random; using Robust.Shared.Prototypes; using Robust.Server.GameObjects; using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Abilities.Psionics { diff --git a/Content.Server/Nyanotrasen/Chat/TSayCommand.cs b/Content.Server/Nyanotrasen/Chat/TSayCommand.cs index debbf928ce..9ba27b65d7 100644 --- a/Content.Server/Nyanotrasen/Chat/TSayCommand.cs +++ b/Content.Server/Nyanotrasen/Chat/TSayCommand.cs @@ -3,6 +3,7 @@ using Content.Shared.Administration; using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Enums; +using Robust.Shared.Player; namespace Content.Server.Chat.Commands { @@ -15,7 +16,7 @@ namespace Content.Server.Chat.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession player) + if (shell.Player is not ICommonSession player) { shell.WriteError("This command cannot be run from the server."); return; @@ -36,7 +37,7 @@ namespace Content.Server.Chat.Commands var message = string.Join(" ", args).Trim(); if (string.IsNullOrEmpty(message)) return; - //Not sure if I should hide the logs from this. Default is false. + //Not sure if I should hide the logs from this. Default is false. EntitySystem.Get().TrySendInGameICMessage(playerEntity, message, InGameICChatType.Telepathic, ChatTransmitRange.Normal, false, shell, player); } } diff --git a/Content.Server/Nyanotrasen/Construction/Commands/TileWindowsCommand.cs b/Content.Server/Nyanotrasen/Construction/Commands/TileWindowsCommand.cs index 707af881e3..9eef7292ea 100644 --- a/Content.Server/Nyanotrasen/Construction/Commands/TileWindowsCommand.cs +++ b/Content.Server/Nyanotrasen/Construction/Commands/TileWindowsCommand.cs @@ -6,6 +6,7 @@ using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Map; using Robust.Shared.Maths; +using Robust.Shared.Player; namespace Content.Server.Construction.Commands { @@ -23,7 +24,7 @@ namespace Content.Server.Construction.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player as ICommonSession; var entityManager = IoCManager.Resolve(); EntityUid? gridId; diff --git a/Content.Server/Nyanotrasen/Players/PlayTimeTracking/PlayTimeTrackingManager.Whitelist.cs b/Content.Server/Nyanotrasen/Players/PlayTimeTracking/PlayTimeTrackingManager.Whitelist.cs index f0e97f56aa..ccbe8d8e7f 100644 --- a/Content.Server/Nyanotrasen/Players/PlayTimeTracking/PlayTimeTrackingManager.Whitelist.cs +++ b/Content.Server/Nyanotrasen/Players/PlayTimeTracking/PlayTimeTrackingManager.Whitelist.cs @@ -1,12 +1,12 @@ -using Content.Server.Players; +using Content.Shared.Players; using Content.Shared.Players.PlayTimeTracking; -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Players.PlayTimeTracking; public sealed partial class PlayTimeTrackingManager { - private void SendWhitelistCached(IPlayerSession playerSession) + private void SendWhitelistCached(ICommonSession playerSession) { var whitelist = playerSession.ContentData()?.Whitelisted ?? false; @@ -21,7 +21,7 @@ public sealed partial class PlayTimeTrackingManager /// /// Queue sending whitelist status to the client. /// - public void QueueSendWhitelist(IPlayerSession player) + public void QueueSendWhitelist(ICommonSession player) { if (DirtyPlayer(player) is { } data) data.NeedRefreshWhitelist = true; diff --git a/Content.Server/Nyanotrasen/Psionics/Dreams/DreamSystem.cs b/Content.Server/Nyanotrasen/Psionics/Dreams/DreamSystem.cs index f73f8e6fcc..d6067717c9 100644 --- a/Content.Server/Nyanotrasen/Psionics/Dreams/DreamSystem.cs +++ b/Content.Server/Nyanotrasen/Psionics/Dreams/DreamSystem.cs @@ -5,6 +5,7 @@ using Content.Server.Chat.Managers; using Robust.Shared.Random; using Robust.Shared.Prototypes; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Psionics.Dreams { diff --git a/Content.Server/Nyanotrasen/Psionics/PsionicsCommands.cs b/Content.Server/Nyanotrasen/Psionics/PsionicsCommands.cs index c0c3b8dc01..959251d1fb 100644 --- a/Content.Server/Nyanotrasen/Psionics/PsionicsCommands.cs +++ b/Content.Server/Nyanotrasen/Psionics/PsionicsCommands.cs @@ -5,6 +5,7 @@ using Content.Shared.Mobs.Components; using Robust.Shared.Console; using Robust.Server.GameObjects; using Content.Shared.Actions; +using Robust.Shared.Player; namespace Content.Server.Psionics; diff --git a/Content.Server/Nyanotrasen/Research/Oracle/OracleSystem.cs b/Content.Server/Nyanotrasen/Research/Oracle/OracleSystem.cs index 2548f3da2b..2933df615e 100644 --- a/Content.Server/Nyanotrasen/Research/Oracle/OracleSystem.cs +++ b/Content.Server/Nyanotrasen/Research/Oracle/OracleSystem.cs @@ -14,6 +14,7 @@ using Content.Shared.Mobs.Components; using Content.Shared.Psionics.Glimmer; using Content.Shared.Research.Prototypes; using Robust.Server.GameObjects; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; diff --git a/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs b/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs index a3af9ed6e3..6394456326 100644 --- a/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs +++ b/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs @@ -7,6 +7,7 @@ using Content.Server.StationEvents.Components; using Content.Shared.Abilities.Psionics; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; +using Robust.Shared.Player; namespace Content.Server.StationEvents.Events; diff --git a/Content.Server/Objectives/Commands/ListObjectivesCommand.cs b/Content.Server/Objectives/Commands/ListObjectivesCommand.cs index 93dec3fa44..97fc943269 100644 --- a/Content.Server/Objectives/Commands/ListObjectivesCommand.cs +++ b/Content.Server/Objectives/Commands/ListObjectivesCommand.cs @@ -18,7 +18,7 @@ namespace Content.Server.Objectives.Commands public override void Execute(IConsoleShell shell, string argStr, string[] args) { - var player = shell.Player as IPlayerSession; + var player = shell.Player; if (player == null || !_players.TryGetSessionByUsername(args[0], out player)) { shell.WriteError(LocalizationManager.GetString("shell-target-player-does-not-exist")); diff --git a/Content.Server/Objectives/Components/HijackShuttleComponent.cs b/Content.Server/Objectives/Components/HijackShuttleComponent.cs deleted file mode 100644 index 010f6f1407..0000000000 --- a/Content.Server/Objectives/Components/HijackShuttleComponent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Content.Server.Objectives.Systems; - -namespace Content.Server.Objectives.Components; - -[RegisterComponent, Access(typeof(HijackShuttleConditionSystem))] -public sealed partial class HijackShuttleComponent : Component -{ -} diff --git a/Content.Server/Objectives/Components/HijackShuttleConditionComponent.cs b/Content.Server/Objectives/Components/HijackShuttleConditionComponent.cs new file mode 100644 index 0000000000..2f07086af6 --- /dev/null +++ b/Content.Server/Objectives/Components/HijackShuttleConditionComponent.cs @@ -0,0 +1,11 @@ +using Content.Server.Objectives.Systems; + +namespace Content.Server.Objectives.Components; + +/// +/// Objective condition that requires the player to leave station of escape shuttle with only antags on board or handcuffed humanoids +/// +[RegisterComponent, Access(typeof(HijackShuttleConditionSystem))] +public sealed partial class HijackShuttleConditionComponent : Component +{ +} diff --git a/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs b/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs index 5ea560297c..9e0d2c3d5b 100644 --- a/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs +++ b/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs @@ -23,17 +23,17 @@ public sealed class HijackShuttleConditionSystem : EntitySystem { base.Initialize(); - SubscribeLocalEvent(OnGetProgress); + SubscribeLocalEvent(OnGetProgress); } - private void OnGetProgress(EntityUid uid, HijackShuttleComponent comp, ref ObjectiveGetProgressEvent args) + private void OnGetProgress(EntityUid uid, HijackShuttleConditionComponent comp, ref ObjectiveGetProgressEvent args) { args.Progress = GetProgress(args.MindId, args.Mind); } private float GetProgress(EntityUid mindId, MindComponent mind) { - // not escaping alive if you're deleted/dead + // Not escaping alive if you're deleted/dead if (mind.OwnedEntity == null || _mind.IsCharacterDeadIc(mind)) return 0f; diff --git a/Content.Server/PAI/PAISystem.cs b/Content.Server/PAI/PAISystem.cs index d3dac3edaa..e9505b5e6f 100644 --- a/Content.Server/PAI/PAISystem.cs +++ b/Content.Server/PAI/PAISystem.cs @@ -6,9 +6,9 @@ using Content.Shared.Interaction.Events; using Content.Shared.Mind.Components; using Content.Shared.PAI; using Content.Shared.Popups; -using Robust.Server.GameObjects; using Robust.Shared.Random; using System.Text; +using Robust.Shared.Player; namespace Content.Server.PAI; diff --git a/Content.Server/PDA/PdaSystem.cs b/Content.Server/PDA/PdaSystem.cs index 6c506dc3dd..44e2659841 100644 --- a/Content.Server/PDA/PdaSystem.cs +++ b/Content.Server/PDA/PdaSystem.cs @@ -4,9 +4,6 @@ using Content.Server.DeviceNetwork.Components; using Content.Server.Instruments; using Content.Server.Light.EntitySystems; using Content.Server.Light.Events; -using Content.Server.MassMedia.Components; -using Content.Server.MassMedia.Systems; -using Content.Server.Mind; using Content.Server.PDA.Ringer; using Content.Server.Station.Systems; using Content.Server.Store.Components; @@ -16,7 +13,6 @@ using Content.Shared.CartridgeLoader; using Content.Shared.Light.Components; using Content.Shared.PDA; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Containers; namespace Content.Server.PDA @@ -180,7 +176,7 @@ namespace Content.Server.PDA return; if (HasComp(uid)) - _ringer.ToggleRingerUI(uid, (IPlayerSession) msg.Session); + _ringer.ToggleRingerUI(uid, msg.Session); } private void OnUiMessage(EntityUid uid, PdaComponent pda, PdaShowMusicMessage msg) @@ -189,7 +185,7 @@ namespace Content.Server.PDA return; if (TryComp(uid, out var instrument)) - _instrument.ToggleInstrumentUi(uid, (IPlayerSession) msg.Session, instrument); + _instrument.ToggleInstrumentUi(uid, msg.Session, instrument); } private void OnUiMessage(EntityUid uid, PdaComponent pda, PdaShowUplinkMessage msg) diff --git a/Content.Server/PDA/Ringer/RingerSystem.cs b/Content.Server/PDA/Ringer/RingerSystem.cs index a772e76bc4..7494d5e12c 100644 --- a/Content.Server/PDA/Ringer/RingerSystem.cs +++ b/Content.Server/PDA/Ringer/RingerSystem.cs @@ -7,7 +7,6 @@ using Content.Shared.PDA.Ringer; using Content.Shared.Popups; using Content.Shared.Store; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Audio; using Robust.Shared.Network; using Robust.Shared.Player; @@ -182,7 +181,7 @@ namespace Content.Server.PDA.Ringer _ui.SetUiState(bui, new RingerUpdateState(isPlaying, ringer.Ringtone)); } - public bool ToggleRingerUI(EntityUid uid, IPlayerSession session) + public bool ToggleRingerUI(EntityUid uid, ICommonSession session) { if (_ui.TryGetUi(uid, RingerUiKey.Key, out var bui)) _ui.ToggleUi(bui, session); diff --git a/Content.Server/Paper/PaperSystem.cs b/Content.Server/Paper/PaperSystem.cs index f38013e14d..553bcaa0a2 100644 --- a/Content.Server/Paper/PaperSystem.cs +++ b/Content.Server/Paper/PaperSystem.cs @@ -4,15 +4,11 @@ using Content.Server.Popups; using Content.Server.UserInterface; using Content.Shared.Database; using Content.Shared.Examine; -using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.Paper; using Content.Shared.Tag; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Player; -using Robust.Shared.Utility; -using Robust.Shared.Audio; using static Content.Shared.Paper.SharedPaperComponent; namespace Content.Server.Paper @@ -207,7 +203,7 @@ namespace Content.Server.Paper _appearance.SetData(uid, PaperVisuals.Status, status, appearance); } - public void UpdateUserInterface(EntityUid uid, PaperComponent? paperComp = null, IPlayerSession? session = null) + public void UpdateUserInterface(EntityUid uid, PaperComponent? paperComp = null, ICommonSession? session = null) { if (!Resolve(uid, ref paperComp)) return; diff --git a/Content.Server/Parallax/BiomeSystem.cs b/Content.Server/Parallax/BiomeSystem.cs index a9d78afa86..c9017ac821 100644 --- a/Content.Server/Parallax/BiomeSystem.cs +++ b/Content.Server/Parallax/BiomeSystem.cs @@ -282,9 +282,8 @@ public sealed partial class BiomeSystem : SharedBiomeSystem } // Get chunks in range - foreach (var client in Filter.GetAllPlayers(_playerManager)) + foreach (var pSession in Filter.GetAllPlayers(_playerManager)) { - var pSession = (IPlayerSession) client; if (xformQuery.TryGetComponent(pSession.AttachedEntity, out var xform) && _handledEntities.Add(pSession.AttachedEntity.Value) && diff --git a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs index 20ed276967..f200c991d7 100644 --- a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs +++ b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs @@ -2,11 +2,10 @@ using Content.Server.ParticleAccelerator.Components; using Content.Server.Power.Components; using Content.Shared.Database; using Content.Shared.Singularity.Components; -using Robust.Server.Player; -using Robust.Server.GameObjects; using Robust.Shared.Utility; using System.Diagnostics; using Content.Shared.CCVar; +using Robust.Shared.Player; namespace Content.Server.ParticleAccelerator.EntitySystems; @@ -60,7 +59,7 @@ public sealed partial class ParticleAcceleratorSystem FireEmitter(comp.StarboardEmitter!.Value, strength); } - public void SwitchOn(EntityUid uid, IPlayerSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null) + public void SwitchOn(EntityUid uid, ICommonSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null) { if (!Resolve(uid, ref comp)) return; @@ -83,7 +82,7 @@ public sealed partial class ParticleAcceleratorSystem UpdateUI(uid, comp); } - public void SwitchOff(EntityUid uid, IPlayerSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null) + public void SwitchOff(EntityUid uid, ICommonSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null) { if (!Resolve(uid, ref comp)) return; @@ -131,7 +130,7 @@ public sealed partial class ParticleAcceleratorSystem UpdateUI(uid, comp); } - public void SetStrength(EntityUid uid, ParticleAcceleratorPowerState strength, IPlayerSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null) + public void SetStrength(EntityUid uid, ParticleAcceleratorPowerState strength, ICommonSession? user = null, ParticleAcceleratorControlBoxComponent? comp = null) { if (!Resolve(uid, ref comp)) return; @@ -347,10 +346,10 @@ public sealed partial class ParticleAcceleratorSystem if (msg.Enabled) { if (comp.Assembled) - SwitchOn(uid, (IPlayerSession?) msg.Session, comp); + SwitchOn(uid, msg.Session, comp); } else - SwitchOff(uid, (IPlayerSession?) msg.Session, comp); + SwitchOff(uid, msg.Session, comp); UpdateUI(uid, comp); } @@ -364,7 +363,7 @@ public sealed partial class ParticleAcceleratorSystem if (TryComp(uid, out var apcPower) && !apcPower.Powered) return; - SetStrength(uid, msg.State, (IPlayerSession?) msg.Session, comp); + SetStrength(uid, msg.State, msg.Session, comp); UpdateUI(uid, comp); } @@ -378,7 +377,7 @@ public sealed partial class ParticleAcceleratorSystem if (TryComp(uid, out var apcPower) && !apcPower.Powered) return; - RescanParts(uid, (IPlayerSession?) msg.Session, comp); + RescanParts(uid, msg.Session, comp); UpdateUI(uid, comp); } diff --git a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Parts.cs b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Parts.cs index 271d17a0c4..abc68543ff 100644 --- a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Parts.cs +++ b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Parts.cs @@ -2,9 +2,9 @@ using System.Diagnostics.CodeAnalysis; using System.Numerics; using Content.Server.ParticleAccelerator.Components; using JetBrains.Annotations; -using Robust.Server.Player; using Robust.Shared.Map.Components; using Robust.Shared.Physics.Events; +using Robust.Shared.Player; namespace Content.Server.ParticleAccelerator.EntitySystems; @@ -18,7 +18,7 @@ public sealed partial class ParticleAcceleratorSystem SubscribeLocalEvent(BodyTypeChanged); } - public void RescanParts(EntityUid uid, IPlayerSession? user = null, ParticleAcceleratorControlBoxComponent? controller = null) + public void RescanParts(EntityUid uid, ICommonSession? user = null, ParticleAcceleratorControlBoxComponent? controller = null) { if (!Resolve(uid, ref controller)) return; diff --git a/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorLimiterWireAction.cs b/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorLimiterWireAction.cs index 09700e2193..0cbd47c233 100644 --- a/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorLimiterWireAction.cs +++ b/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorLimiterWireAction.cs @@ -5,7 +5,7 @@ using Content.Server.Wires; using Content.Shared.Popups; using Content.Shared.Singularity.Components; using Content.Shared.Wires; -using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.ParticleAccelerator.Wires; diff --git a/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorStrengthWireAction.cs b/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorStrengthWireAction.cs index 8577590671..65fa76ee41 100644 --- a/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorStrengthWireAction.cs +++ b/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorStrengthWireAction.cs @@ -3,8 +3,7 @@ using Content.Server.ParticleAccelerator.EntitySystems; using Content.Server.Wires; using Content.Shared.Singularity.Components; using Content.Shared.Wires; -using Robust.Server.GameObjects; -using Robust.Shared.Random; +using Robust.Shared.Player; namespace Content.Server.ParticleAccelerator.Wires; diff --git a/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorToggleWireAction.cs b/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorToggleWireAction.cs index 00c5845713..c43403edd4 100644 --- a/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorToggleWireAction.cs +++ b/Content.Server/ParticleAccelerator/Wires/ParticleAcceleratorToggleWireAction.cs @@ -3,7 +3,7 @@ using Content.Server.ParticleAccelerator.EntitySystems; using Content.Server.Wires; using Content.Shared.Singularity.Components; using Content.Shared.Wires; -using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.ParticleAccelerator.Wires; diff --git a/Content.Server/Physics/Controllers/RandomWalkController.cs b/Content.Server/Physics/Controllers/RandomWalkController.cs index dc5608887e..4a93a9e706 100644 --- a/Content.Server/Physics/Controllers/RandomWalkController.cs +++ b/Content.Server/Physics/Controllers/RandomWalkController.cs @@ -4,6 +4,7 @@ using Content.Shared.Throwing; using Robust.Server.GameObjects; using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Controllers; +using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Timing; diff --git a/Content.Server/Pinpointer/ProximityBeeperSystem.cs b/Content.Server/Pinpointer/ProximityBeeperSystem.cs index b473d97372..d52223e2b4 100644 --- a/Content.Server/Pinpointer/ProximityBeeperSystem.cs +++ b/Content.Server/Pinpointer/ProximityBeeperSystem.cs @@ -80,7 +80,10 @@ public sealed class ProximityBeeperSystem : EntitySystem var scalingFactor = distance / component.MaximumDistance; var interval = (component.MaxBeepInterval - component.MinBeepInterval) * scalingFactor + component.MinBeepInterval; + component.NextBeepTime += interval; + if (component.NextBeepTime < _timing.CurTime) // Prevents spending time out of range accumulating a deficit which causes a series of very rapid beeps when comeing into range. + component.NextBeepTime = _timing.CurTime + interval; } /// diff --git a/Content.Server/Pinpointer/StationMapSystem.cs b/Content.Server/Pinpointer/StationMapSystem.cs index daf9df25ba..0460f08f13 100644 --- a/Content.Server/Pinpointer/StationMapSystem.cs +++ b/Content.Server/Pinpointer/StationMapSystem.cs @@ -1,6 +1,7 @@ using Content.Server.PowerCell; using Content.Shared.Pinpointer; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Pinpointer; diff --git a/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs b/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs index 1b2c949cf4..7793b5302f 100644 --- a/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs +++ b/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs @@ -4,19 +4,20 @@ using System.Threading; using System.Threading.Tasks; using Content.Server.Database; using Content.Shared.CCVar; +using Content.Shared.Players; using Content.Shared.Players.PlayTimeTracking; -using Robust.Server.Player; using Robust.Shared.Asynchronous; using Robust.Shared.Collections; using Robust.Shared.Configuration; using Robust.Shared.Exceptions; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Timing; using Robust.Shared.Utility; namespace Content.Server.Players.PlayTimeTracking; -public delegate void CalcPlayTimeTrackersCallback(IPlayerSession player, HashSet trackers); +public delegate void CalcPlayTimeTrackersCallback(ICommonSession player, HashSet trackers); /// /// Tracks play time for players, across all roles. @@ -66,7 +67,7 @@ public sealed partial class PlayTimeTrackingManager private ISawmill _sawmill = default!; // List of players that need some kind of update (refresh timers or resend). - private ValueList _playersDirty; + private ValueList _playersDirty; // DB auto-saving logic. private TimeSpan _saveInterval; @@ -76,7 +77,7 @@ public sealed partial class PlayTimeTrackingManager // We must block server shutdown on these to avoid losing data. private readonly List _pendingSaveTasks = new(); - private readonly Dictionary _playTimeData = new(); + private readonly Dictionary _playTimeData = new(); public event CalcPlayTimeTrackersCallback? CalcTrackers; @@ -146,7 +147,7 @@ public sealed partial class PlayTimeTrackingManager _playersDirty.Clear(); } - private void RefreshSingleTracker(IPlayerSession dirty, PlayTimeData data, TimeSpan time) + private void RefreshSingleTracker(ICommonSession dirty, PlayTimeData data, TimeSpan time) { DebugTools.Assert(data.Initialized); @@ -188,7 +189,7 @@ public sealed partial class PlayTimeTrackingManager /// so APIs like return up-to-date info. /// /// - public void FlushTracker(IPlayerSession player) + public void FlushTracker(ICommonSession player) { var time = _timing.RealTime; var data = _playTimeData[player]; @@ -208,7 +209,7 @@ public sealed partial class PlayTimeTrackingManager } } - private void SendPlayTimes(IPlayerSession pSession) + private void SendPlayTimes(ICommonSession pSession) { var roles = GetTrackerTimes(pSession); @@ -235,7 +236,7 @@ public sealed partial class PlayTimeTrackingManager /// /// Save all modified time trackers for a player to the database. /// - public async void SaveSession(IPlayerSession session) + public async void SaveSession(ICommonSession session) { // This causes all trackers to refresh, ah well. FlushAllTrackers(); @@ -285,7 +286,7 @@ public sealed partial class PlayTimeTrackingManager _sawmill.Debug($"Saved {log.Count} trackers"); } - private async Task DoSaveSessionAsync(IPlayerSession session) + private async Task DoSaveSessionAsync(ICommonSession session) { var log = new List(); @@ -306,7 +307,7 @@ public sealed partial class PlayTimeTrackingManager _sawmill.Debug($"Saved {log.Count} trackers for {session.Name}"); } - public async Task LoadData(IPlayerSession session, CancellationToken cancel) + public async Task LoadData(ICommonSession session, CancellationToken cancel) { var data = new PlayTimeData(); _playTimeData.Add(session, data); @@ -328,14 +329,14 @@ public sealed partial class PlayTimeTrackingManager QueueSendWhitelist(session); // Nyanotrasen - Whitelist status } - public void ClientDisconnected(IPlayerSession session) + public void ClientDisconnected(ICommonSession session) { SaveSession(session); _playTimeData.Remove(session); } - public void AddTimeToTracker(IPlayerSession id, string tracker, TimeSpan time) + public void AddTimeToTracker(ICommonSession id, string tracker, TimeSpan time) { if (!_playTimeData.TryGetValue(id, out var data) || !data.Initialized) throw new InvalidOperationException("Play time info is not yet loaded for this player!"); @@ -351,17 +352,17 @@ public sealed partial class PlayTimeTrackingManager data.DbTrackersDirty.Add(tracker); } - public void AddTimeToOverallPlaytime(IPlayerSession id, TimeSpan time) + public void AddTimeToOverallPlaytime(ICommonSession id, TimeSpan time) { AddTimeToTracker(id, PlayTimeTrackingShared.TrackerOverall, time); } - public TimeSpan GetOverallPlaytime(IPlayerSession id) + public TimeSpan GetOverallPlaytime(ICommonSession id) { return GetPlayTimeForTracker(id, PlayTimeTrackingShared.TrackerOverall); } - public bool TryGetTrackerTimes(IPlayerSession id, [NotNullWhen(true)] out Dictionary? time) + public bool TryGetTrackerTimes(ICommonSession id, [NotNullWhen(true)] out Dictionary? time) { time = null; @@ -374,7 +375,7 @@ public sealed partial class PlayTimeTrackingManager return true; } - public Dictionary GetTrackerTimes(IPlayerSession id) + public Dictionary GetTrackerTimes(ICommonSession id) { if (!_playTimeData.TryGetValue(id, out var data) || !data.Initialized) throw new InvalidOperationException("Play time info is not yet loaded for this player!"); @@ -382,7 +383,7 @@ public sealed partial class PlayTimeTrackingManager return data.TrackerTimes; } - public TimeSpan GetPlayTimeForTracker(IPlayerSession id, string tracker) + public TimeSpan GetPlayTimeForTracker(ICommonSession id, string tracker) { if (!_playTimeData.TryGetValue(id, out var data) || !data.Initialized) throw new InvalidOperationException("Play time info is not yet loaded for this player!"); @@ -393,7 +394,7 @@ public sealed partial class PlayTimeTrackingManager /// /// Queue for play time trackers to be refreshed on a player, in case the set of active trackers may have changed. /// - public void QueueRefreshTrackers(IPlayerSession player) + public void QueueRefreshTrackers(ICommonSession player) { if (DirtyPlayer(player) is { } data) data.NeedRefreshTackers = true; @@ -402,13 +403,13 @@ public sealed partial class PlayTimeTrackingManager /// /// Queue for play time information to be sent to a client, for showing in UIs etc. /// - public void QueueSendTimers(IPlayerSession player) + public void QueueSendTimers(ICommonSession player) { if (DirtyPlayer(player) is { } data) data.NeedSendTimers = true; } - private PlayTimeData? DirtyPlayer(IPlayerSession player) + private PlayTimeData? DirtyPlayer(ICommonSession player) { if (!_playTimeData.TryGetValue(player, out var data) || !data.Initialized) return null; diff --git a/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingSystem.cs b/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingSystem.cs index 94780bda36..4dba378e32 100644 --- a/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingSystem.cs +++ b/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingSystem.cs @@ -14,6 +14,7 @@ using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Utility; @@ -55,7 +56,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem _tracking.CalcTrackers -= CalcTrackers; } - private void CalcTrackers(IPlayerSession player, HashSet trackers) + private void CalcTrackers(ICommonSession player, HashSet trackers) { if (_afk.IsAfk(player)) return; @@ -67,7 +68,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem trackers.UnionWith(GetTimedRoles(player)); } - private bool IsPlayerAlive(IPlayerSession session) + private bool IsPlayerAlive(ICommonSession session) { var attached = session.AttachedEntity; if (attached == null) @@ -93,7 +94,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem } } - private IEnumerable GetTimedRoles(IPlayerSession session) + private IEnumerable GetTimedRoles(ICommonSession session) { var contentData = _playerManager.GetPlayerData(session.UserId).ContentData(); @@ -157,7 +158,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem _tracking.QueueSendWhitelist(ev.PlayerSession); // Nyanotrasen - Send whitelist status } - public bool IsAllowed(IPlayerSession player, string role) + public bool IsAllowed(ICommonSession player, string role) { if (!_prototypes.TryIndex(role, out var job) || job.Requirements == null || @@ -171,7 +172,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem return JobRequirements.TryRequirementsMet(job, playTimes, out _, EntityManager, _prototypes, isWhitelisted); } - public HashSet GetDisallowedJobs(IPlayerSession player) + public HashSet GetDisallowedJobs(ICommonSession player) { var roles = new HashSet(); if (!_cfg.GetCVar(CCVars.GameRoleTimers)) @@ -236,7 +237,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem } } - public void PlayerRolesChanged(IPlayerSession player) + public void PlayerRolesChanged(ICommonSession player) { _tracking.QueueRefreshTrackers(player); } diff --git a/Content.Server/Players/PlayerData.cs b/Content.Server/Players/PlayerData.cs deleted file mode 100644 index b0ca6f3c18..0000000000 --- a/Content.Server/Players/PlayerData.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Content.Shared.Players; -using Robust.Server.Player; -using Robust.Shared.Players; - -namespace Content.Server.Players -{ - public static class PlayerDataExt - { - /// - /// Gets the correctly cast instance of content player data from an engine player data storage. - /// - public static PlayerData? ContentData(this IPlayerSession session) - { - return session.Data.ContentData(); - } - - public static PlayerData? ContentData(this ICommonSession session) - { - return ((IPlayerSession) session).ContentData(); - } - - /// - /// Gets the mind that is associated with this player. - /// - public static EntityUid? GetMind(this IPlayerSession session) - { - return session.Data.ContentData()?.Mind; - } - } -} diff --git a/Content.Server/Players/PlayerSystem.cs b/Content.Server/Players/PlayerSystem.cs index 0c407aa876..c79683c338 100644 --- a/Content.Server/Players/PlayerSystem.cs +++ b/Content.Server/Players/PlayerSystem.cs @@ -1,11 +1,11 @@ using Content.Shared.Players; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.Players; public sealed class PlayerSystem : SharedPlayerSystem { - public override PlayerData? ContentData(ICommonSession? session) + public override ContentPlayerData? ContentData(ICommonSession? session) { return session?.ContentData(); } diff --git a/Content.Server/Pointing/EntitySystems/PointingSystem.cs b/Content.Server/Pointing/EntitySystems/PointingSystem.cs index b253e32e37..6fcdfcf994 100644 --- a/Content.Server/Pointing/EntitySystems/PointingSystem.cs +++ b/Content.Server/Pointing/EntitySystems/PointingSystem.cs @@ -20,7 +20,6 @@ using Robust.Shared.Enums; using Robust.Shared.Input.Binding; using Robust.Shared.Map; using Robust.Shared.Player; -using Robust.Shared.Players; using Robust.Shared.Replays; using Robust.Shared.Timing; @@ -170,7 +169,7 @@ namespace Content.Server.Pointing.EntitySystems } // Get players that are in range and whose visibility layer matches the arrow's. - bool ViewerPredicate(IPlayerSession playerSession) + bool ViewerPredicate(ICommonSession playerSession) { if (!_minds.TryGetMind(playerSession, out _, out var mind) || mind.CurrentEntity is not { Valid: true } ent || @@ -182,7 +181,7 @@ namespace Content.Server.Pointing.EntitySystems } var viewers = Filter.Empty() - .AddWhere(session1 => ViewerPredicate((IPlayerSession) session1)) + .AddWhere(session1 => ViewerPredicate(session1)) .Recipients; string selfMessage; diff --git a/Content.Server/Points/PointSystem.cs b/Content.Server/Points/PointSystem.cs index 56831980d0..a71294db9d 100644 --- a/Content.Server/Points/PointSystem.cs +++ b/Content.Server/Points/PointSystem.cs @@ -2,9 +2,9 @@ using Content.Shared.FixedPoint; using Content.Shared.Points; using JetBrains.Annotations; -using Robust.Server.GameObjects; using Robust.Server.GameStates; using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Points; diff --git a/Content.Server/Popups/PopupSystem.cs b/Content.Server/Popups/PopupSystem.cs index 483d4f3d3f..61ccaf4423 100644 --- a/Content.Server/Popups/PopupSystem.cs +++ b/Content.Server/Popups/PopupSystem.cs @@ -4,7 +4,6 @@ using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Map; using Robust.Shared.Player; -using Robust.Shared.Players; namespace Content.Server.Popups { diff --git a/Content.Server/Power/Generator/PortableGeneratorSystem.cs b/Content.Server/Power/Generator/PortableGeneratorSystem.cs index 416f509978..1180665ad1 100644 --- a/Content.Server/Power/Generator/PortableGeneratorSystem.cs +++ b/Content.Server/Power/Generator/PortableGeneratorSystem.cs @@ -22,7 +22,7 @@ public sealed class PortableGeneratorSystem : SharedPortableGeneratorSystem [Dependency] private readonly AudioSystem _audio = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly GeneratorSystem _generator = default!; - [Dependency] private readonly PowerSwitchableGeneratorSystem _switchableGenerator = default!; + [Dependency] private readonly PowerSwitchableSystem _switchable = default!; public override void Initialize() { @@ -36,6 +36,8 @@ public sealed class PortableGeneratorSystem : SharedPortableGeneratorSystem SubscribeLocalEvent(GeneratorStartMessage); SubscribeLocalEvent(GeneratorStopMessage); SubscribeLocalEvent(GeneratorSwitchOutputMessage); + + SubscribeLocalEvent(OnSwitchPowerCheck); } private void GeneratorSwitchOutputMessage(EntityUid uid, PortableGeneratorComponent component, PortableGeneratorSwitchOutputMessage args) @@ -47,7 +49,7 @@ public sealed class PortableGeneratorSystem : SharedPortableGeneratorSystem if (fuelGenerator.On) return; - _switchableGenerator.ToggleActiveOutput(uid, args.Session.AttachedEntity.Value); + _switchable.Cycle(uid, args.Session.AttachedEntity.Value); } private void GeneratorStopMessage(EntityUid uid, PortableGeneratorComponent component, PortableGeneratorStopMessage args) @@ -164,6 +166,12 @@ public sealed class PortableGeneratorSystem : SharedPortableGeneratorSystem } } + private void OnSwitchPowerCheck(EntityUid uid, FuelGeneratorComponent comp, ref SwitchPowerCheckEvent args) + { + if (comp.On) + args.DisableMessage = Loc.GetString("fuel-generator-verb-disable-on"); + } + public override void Update(float frameTime) { var query = EntityQueryEnumerator(); diff --git a/Content.Server/Power/Generator/PowerSwitchableGeneratorSystem.cs b/Content.Server/Power/Generator/PowerSwitchableGeneratorSystem.cs deleted file mode 100644 index b81d77ea9f..0000000000 --- a/Content.Server/Power/Generator/PowerSwitchableGeneratorSystem.cs +++ /dev/null @@ -1,111 +0,0 @@ -using Content.Server.NodeContainer; -using Content.Server.NodeContainer.EntitySystems; -using Content.Server.Popups; -using Content.Server.Power.Components; -using Content.Server.Power.Nodes; -using Content.Shared.Power.Generator; -using Content.Shared.Verbs; -using Robust.Server.GameObjects; -using Robust.Shared.Player; -using Robust.Shared.Utility; - -namespace Content.Server.Power.Generator; - -/// -/// Implements power-switchable generators. -/// -/// -/// -/// -public sealed class PowerSwitchableGeneratorSystem : SharedPowerSwitchableGeneratorSystem -{ - [Dependency] private readonly NodeGroupSystem _nodeGroup = default!; - [Dependency] private readonly PopupSystem _popup = default!; - [Dependency] private readonly AudioSystem _audio = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent>(GetInteractionVerbs); - } - - private void GetInteractionVerbs( - EntityUid uid, - PowerSwitchableGeneratorComponent component, - GetVerbsEvent args) - { - if (!args.CanAccess || !args.CanInteract) - return; - - var isCurrentlyHV = component.ActiveOutput == PowerSwitchableGeneratorOutput.HV; - var msg = isCurrentlyHV ? "power-switchable-generator-verb-mv" : "power-switchable-generator-verb-hv"; - - var isOn = TryComp(uid, out FuelGeneratorComponent? fuelGenerator) && fuelGenerator.On; - - InteractionVerb verb = new() - { - Act = () => - { - - var verbIsOn = TryComp(uid, out FuelGeneratorComponent? verbFuelGenerator) && verbFuelGenerator.On; - if (verbIsOn) - return; - - ToggleActiveOutput(uid, args.User, component); - }, - Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/zap.svg.192dpi.png")), - Text = Loc.GetString(msg), - }; - - if (isOn) - { - verb.Message = Loc.GetString("power-switchable-generator-verb-disable-on"); - verb.Disabled = true; - } - - args.Verbs.Add(verb); - } - - public void ToggleActiveOutput(EntityUid uid, EntityUid user, PowerSwitchableGeneratorComponent? component = null) - { - if (!Resolve(uid, ref component)) - return; - - var supplier = Comp(uid); - var nodeContainer = Comp(uid); - var outputMV = (CableDeviceNode) nodeContainer.Nodes[component.NodeOutputMV]; - var outputHV = (CableDeviceNode) nodeContainer.Nodes[component.NodeOutputHV]; - - if (component.ActiveOutput == PowerSwitchableGeneratorOutput.HV) - { - component.ActiveOutput = PowerSwitchableGeneratorOutput.MV; - supplier.Voltage = Voltage.Medium; - - // Switching around the voltage on the power supplier is "enough", - // but we also want to disconnect the cable nodes so it doesn't show up in power monitors etc. - outputMV.Enabled = true; - outputHV.Enabled = false; - } - else - { - component.ActiveOutput = PowerSwitchableGeneratorOutput.HV; - supplier.Voltage = Voltage.High; - - outputMV.Enabled = false; - outputHV.Enabled = true; - } - - _popup.PopupEntity( - Loc.GetString("power-switchable-generator-switched-output"), - uid, - user); - - _audio.Play(component.SwitchSound, Filter.Pvs(uid), uid, true); - - Dirty(uid, component); - - _nodeGroup.QueueReflood(outputMV); - _nodeGroup.QueueReflood(outputHV); - } -} diff --git a/Content.Server/Power/Generator/PowerSwitchableSystem.cs b/Content.Server/Power/Generator/PowerSwitchableSystem.cs new file mode 100644 index 0000000000..ae7960cf8f --- /dev/null +++ b/Content.Server/Power/Generator/PowerSwitchableSystem.cs @@ -0,0 +1,123 @@ +using Content.Server.NodeContainer; +using Content.Server.NodeContainer.EntitySystems; +using Content.Server.Popups; +using Content.Server.Power.Components; +using Content.Server.Power.Nodes; +using Content.Shared.Power.Generator; +using Content.Shared.Timing; +using Content.Shared.Verbs; +using Robust.Server.GameObjects; +using Robust.Shared.Player; +using Robust.Shared.Utility; + +namespace Content.Server.Power.Generator; + +/// +/// Implements server logic for power-switchable devices. +/// +/// +/// +/// +public sealed class PowerSwitchableSystem : SharedPowerSwitchableSystem +{ + [Dependency] private readonly AudioSystem _audio = default!; + [Dependency] private readonly NodeGroupSystem _nodeGroup = default!; + [Dependency] private readonly PopupSystem _popup = default!; + [Dependency] private readonly UseDelaySystem _useDelay = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent>(GetVerbs); + } + + private void GetVerbs(EntityUid uid, PowerSwitchableComponent comp, GetVerbsEvent args) + { + if (!args.CanAccess || !args.CanInteract) + return; + + var voltage = VoltageColor(GetNextVoltage(uid, comp)); + var msg = Loc.GetString("power-switchable-switch-voltage", ("voltage", voltage)); + + InteractionVerb verb = new() + { + Act = () => + { + // don't need to check it again since if its disabled server wont let the verb act + Cycle(uid, args.User, comp); + }, + Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/zap.svg.192dpi.png")), + Text = msg + }; + + var ev = new SwitchPowerCheckEvent(); + RaiseLocalEvent(uid, ref ev); + if (ev.DisableMessage != null) + { + verb.Message = ev.DisableMessage; + verb.Disabled = true; + } + + args.Verbs.Add(verb); + } + + /// + /// Cycles voltage then updates nodes and optionally power supplier to match it. + /// + public void Cycle(EntityUid uid, EntityUid user, PowerSwitchableComponent? comp = null) + { + if (!Resolve(uid, ref comp)) + return; + + // no sound spamming + if (TryComp(uid, out var useDelay) && _useDelay.ActiveDelay(uid)) + return; + + comp.ActiveIndex = NextIndex(uid, comp); + Dirty(uid, comp); + + var voltage = GetVoltage(uid, comp); + + if (TryComp(uid, out var supplier)) + { + // convert to nodegroupid (goofy server Voltage enum is just alias for it) + switch (voltage) + { + case SwitchableVoltage.HV: + supplier.Voltage = Voltage.High; + break; + case SwitchableVoltage.MV: + supplier.Voltage = Voltage.Medium; + break; + case SwitchableVoltage.LV: + supplier.Voltage = Voltage.Apc; + break; + } + } + + // Switching around the voltage on the power supplier is "enough", + // but we also want to disconnect the cable nodes so it doesn't show up in power monitors etc. + var nodeContainer = Comp(uid); + foreach (var cable in comp.Cables) + { + var node = (CableDeviceNode) nodeContainer.Nodes[cable.Node]; + node.Enabled = cable.Voltage == voltage; + _nodeGroup.QueueReflood(node); + } + + var popup = Loc.GetString(comp.SwitchText, ("voltage", VoltageString(voltage))); + _popup.PopupEntity(popup, uid, user); + + _audio.PlayPvs(comp.SwitchSound, uid); + + _useDelay.BeginDelay(uid, useDelay); + } +} + +/// +/// Raised on a to see if its verb should work. +/// If is non-null, the verb is disabled with that as the message. +/// +[ByRefEvent] +public record struct SwitchPowerCheckEvent(string? DisableMessage = null); diff --git a/Content.Server/Prayer/PrayerSystem.cs b/Content.Server/Prayer/PrayerSystem.cs index be6ae80bfd..e20291cc06 100644 --- a/Content.Server/Prayer/PrayerSystem.cs +++ b/Content.Server/Prayer/PrayerSystem.cs @@ -5,12 +5,11 @@ using Content.Server.Chat.Managers; using Content.Server.Popups; using Content.Shared.Database; using Content.Shared.Popups; -using Robust.Server.Player; -using Robust.Shared.Player; using Content.Shared.Chat; using Content.Shared.Prayer; using Content.Shared.Verbs; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Prayer; /// @@ -74,7 +73,7 @@ public sealed class PrayerSystem : EntitySystem /// The IPlayerSession that sent the message /// The main message sent to the player via the chatbox /// The popup to notify the player, also prepended to the messageString - public void SendSubtleMessage(IPlayerSession target, IPlayerSession source, string messageString, string popupMessage) + public void SendSubtleMessage(ICommonSession target, ICommonSession source, string messageString, string popupMessage) { if (target.AttachedEntity == null) return; @@ -96,7 +95,7 @@ public sealed class PrayerSystem : EntitySystem /// You may be wondering, "Why the admin chat, specifically? Nobody even reads it!" /// Exactly. /// - public void Pray(IPlayerSession sender, PrayableComponent comp, string message) + public void Pray(ICommonSession sender, PrayableComponent comp, string message) { if (sender.AttachedEntity == null) return; diff --git a/Content.Server/Preferences/Managers/IServerPreferencesManager.cs b/Content.Server/Preferences/Managers/IServerPreferencesManager.cs index 8c06e00ab1..a36b053717 100644 --- a/Content.Server/Preferences/Managers/IServerPreferencesManager.cs +++ b/Content.Server/Preferences/Managers/IServerPreferencesManager.cs @@ -2,8 +2,8 @@ using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; using Content.Shared.Preferences; -using Robust.Server.Player; using Robust.Shared.Network; +using Robust.Shared.Player; namespace Content.Server.Preferences.Managers { @@ -11,12 +11,12 @@ namespace Content.Server.Preferences.Managers { void Init(); - Task LoadData(IPlayerSession session, CancellationToken cancel); - void OnClientDisconnected(IPlayerSession session); + Task LoadData(ICommonSession session, CancellationToken cancel); + void OnClientDisconnected(ICommonSession session); bool TryGetCachedPreferences(NetUserId userId, [NotNullWhen(true)] out PlayerPreferences? playerPreferences); PlayerPreferences GetPreferences(NetUserId userId); IEnumerable> GetSelectedProfilesForPlayers(List userIds); - bool HavePreferencesLoaded(IPlayerSession session); + bool HavePreferencesLoaded(ICommonSession session); } } diff --git a/Content.Server/Preferences/Managers/ServerPreferencesManager.cs b/Content.Server/Preferences/Managers/ServerPreferencesManager.cs index ea04d00e82..a0b5e8ce65 100644 --- a/Content.Server/Preferences/Managers/ServerPreferencesManager.cs +++ b/Content.Server/Preferences/Managers/ServerPreferencesManager.cs @@ -8,9 +8,9 @@ using Content.Shared.CCVar; using Content.Shared.Humanoid.Prototypes; using Content.Shared.Preferences; using Content.Shared.Roles; -using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Prototypes; @@ -167,7 +167,7 @@ namespace Content.Server.Preferences.Managers } // Should only be called via UserDbDataManager. - public async Task LoadData(IPlayerSession session, CancellationToken cancel) + public async Task LoadData(ICommonSession session, CancellationToken cancel) { if (!ShouldStorePrefs(session.ConnectedClient.AuthType)) { @@ -207,12 +207,12 @@ namespace Content.Server.Preferences.Managers } } - public void OnClientDisconnected(IPlayerSession session) + public void OnClientDisconnected(ICommonSession session) { _cachedPlayerPrefs.Remove(session.UserId); } - public bool HavePreferencesLoaded(IPlayerSession session) + public bool HavePreferencesLoaded(ICommonSession session) { return _cachedPlayerPrefs.ContainsKey(session.UserId); } diff --git a/Content.Server/Pulling/PullingSystem.cs b/Content.Server/Pulling/PullingSystem.cs index f7ea0aae57..69bb7c9370 100644 --- a/Content.Server/Pulling/PullingSystem.cs +++ b/Content.Server/Pulling/PullingSystem.cs @@ -4,7 +4,7 @@ using Content.Shared.Pulling.Components; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Input.Binding; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.Pulling { diff --git a/Content.Server/Radiation/Systems/RadiationSystem.Debug.cs b/Content.Server/Radiation/Systems/RadiationSystem.Debug.cs index 97f2e485ca..56806d8c9c 100644 --- a/Content.Server/Radiation/Systems/RadiationSystem.Debug.cs +++ b/Content.Server/Radiation/Systems/RadiationSystem.Debug.cs @@ -7,7 +7,7 @@ using Content.Shared.Radiation.Systems; using Robust.Shared.Console; using Robust.Shared.Enums; using Robust.Shared.Map.Components; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.Radiation.Systems; diff --git a/Content.Server/Radio/EntitySystems/HeadsetSystem.cs b/Content.Server/Radio/EntitySystems/HeadsetSystem.cs index 436149f076..adaad492dc 100644 --- a/Content.Server/Radio/EntitySystems/HeadsetSystem.cs +++ b/Content.Server/Radio/EntitySystems/HeadsetSystem.cs @@ -5,8 +5,8 @@ using Content.Shared.Inventory.Events; using Content.Shared.Radio; using Content.Shared.Radio.Components; using Content.Shared.Radio.EntitySystems; -using Robust.Server.GameObjects; using Robust.Shared.Network; +using Robust.Shared.Player; namespace Content.Server.Radio.EntitySystems; diff --git a/Content.Server/Radio/EntitySystems/RadioSystem.cs b/Content.Server/Radio/EntitySystems/RadioSystem.cs index 4f9099d0af..fa00514e61 100644 --- a/Content.Server/Radio/EntitySystems/RadioSystem.cs +++ b/Content.Server/Radio/EntitySystems/RadioSystem.cs @@ -7,9 +7,9 @@ using Content.Shared.Chat; using Content.Shared.Database; using Content.Shared.Radio; using Content.Shared.Radio.Components; -using Robust.Server.GameObjects; using Robust.Shared.Map; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Replays; using Robust.Shared.Utility; diff --git a/Content.Server/Research/Systems/ResearchSystem.Client.cs b/Content.Server/Research/Systems/ResearchSystem.Client.cs index e813f09ff9..135ef8fe88 100644 --- a/Content.Server/Research/Systems/ResearchSystem.Client.cs +++ b/Content.Server/Research/Systems/ResearchSystem.Client.cs @@ -1,7 +1,6 @@ using System.Diagnostics.CodeAnalysis; using Content.Server.Power.EntitySystems; using Content.Shared.Research.Components; -using Robust.Server.Player; namespace Content.Server.Research.Systems; @@ -46,7 +45,7 @@ public sealed partial class ResearchSystem if (!this.IsPowered(uid, EntityManager)) return; - _uiSystem.TryToggleUi(uid, ResearchClientUiKey.Key, (IPlayerSession) args.Session); + _uiSystem.TryToggleUi(uid, ResearchClientUiKey.Key, args.Session); } #endregion diff --git a/Content.Server/Salvage/SalvageRulerCommand.cs b/Content.Server/Salvage/SalvageRulerCommand.cs index b0a64508c5..a1fd609741 100644 --- a/Content.Server/Salvage/SalvageRulerCommand.cs +++ b/Content.Server/Salvage/SalvageRulerCommand.cs @@ -1,6 +1,5 @@ using Content.Server.Administration; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Map; @@ -26,7 +25,7 @@ sealed class SalvageRulerCommand : IConsoleCommand return; } - if (shell.Player is not IPlayerSession player) + if (shell.Player is not { } player) { shell.WriteError(Loc.GetString("shell-only-players-can-run-this-command")); return; diff --git a/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs b/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs index 0b9148f0fb..cc20b71946 100644 --- a/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs +++ b/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs @@ -4,7 +4,6 @@ using Content.Server.Atmos.Piping.EntitySystems; using Content.Server.NodeContainer; using Content.Server.NodeContainer.NodeGroups; using Content.Shared.Administration; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Sandbox.Commands @@ -20,7 +19,7 @@ namespace Content.Server.Sandbox.Commands { var sandboxManager = EntitySystem.Get(); var adminManager = IoCManager.Resolve(); - if (shell.IsClient && (!sandboxManager.IsSandboxEnabled && !adminManager.HasAdminFlag((IPlayerSession)shell.Player!, AdminFlags.Mapping))) + if (shell.IsClient && (!sandboxManager.IsSandboxEnabled && !adminManager.HasAdminFlag(shell.Player!, AdminFlags.Mapping))) { shell.WriteError("You are not currently able to use mapping commands."); } diff --git a/Content.Server/Sandbox/SandboxSystem.cs b/Content.Server/Sandbox/SandboxSystem.cs index ec9b1a0c3c..194cf59843 100644 --- a/Content.Server/Sandbox/SandboxSystem.cs +++ b/Content.Server/Sandbox/SandboxSystem.cs @@ -13,6 +13,7 @@ using Robust.Server.Console; using Robust.Server.Placement; using Robust.Server.Player; using Robust.Shared.Enums; +using Robust.Shared.Player; namespace Content.Server.Sandbox { diff --git a/Content.Server/SensorMonitoring/SensorMonitoringConsoleComponent.cs b/Content.Server/SensorMonitoring/SensorMonitoringConsoleComponent.cs index cd4f2ea23b..63b4d9daef 100644 --- a/Content.Server/SensorMonitoring/SensorMonitoringConsoleComponent.cs +++ b/Content.Server/SensorMonitoring/SensorMonitoringConsoleComponent.cs @@ -1,7 +1,7 @@ using Content.Shared.SensorMonitoring; using Robust.Server.Player; using Robust.Shared.Collections; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Server.SensorMonitoring; diff --git a/Content.Server/SensorMonitoring/SensorMonitoringConsoleSystem.UI.cs b/Content.Server/SensorMonitoring/SensorMonitoringConsoleSystem.UI.cs index a09badcd59..6c0dddeb26 100644 --- a/Content.Server/SensorMonitoring/SensorMonitoringConsoleSystem.UI.cs +++ b/Content.Server/SensorMonitoring/SensorMonitoringConsoleSystem.UI.cs @@ -1,7 +1,5 @@ using Content.Server.DeviceNetwork.Components; using Content.Shared.SensorMonitoring; -using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Collections; using ConsoleUIState = Content.Shared.SensorMonitoring.SensorMonitoringConsoleBoundInterfaceState; using IncrementalUIState = Content.Shared.SensorMonitoring.SensorMonitoringIncrementalUpdate; @@ -130,7 +128,7 @@ public sealed partial class SensorMonitoringConsoleSystem if (!args.UiKey.Equals(SensorMonitoringConsoleUiKey.Key)) return; - if (args.Session is not IPlayerSession player) + if (args.Session is not { } player) return; component.InitialUIStateSent.Remove(player); diff --git a/Content.Server/ServerUpdates/ServerUpdateManager.cs b/Content.Server/ServerUpdates/ServerUpdateManager.cs index 769c5d58d7..f4e54984e9 100644 --- a/Content.Server/ServerUpdates/ServerUpdateManager.cs +++ b/Content.Server/ServerUpdates/ServerUpdateManager.cs @@ -6,6 +6,7 @@ using Robust.Server.Player; using Robust.Server.ServerStatus; using Robust.Shared.Configuration; using Robust.Shared.Enums; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Server.ServerUpdates; diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs index 1a1debc9e3..3ef3d97a21 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs @@ -20,7 +20,6 @@ using Content.Shared.Tag; using Content.Shared.Tiles; using Robust.Server.GameObjects; using Robust.Server.Maps; -using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Map; using Robust.Shared.Map.Components; @@ -140,7 +139,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem /// private void OnShuttleRequestPosition(EmergencyShuttleRequestPositionMessage msg, EntitySessionEventArgs args) { - if (!_admin.IsAdmin((IPlayerSession) args.SenderSession)) + if (!_admin.IsAdmin(args.SenderSession)) return; var player = args.SenderSession.AttachedEntity; diff --git a/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs b/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs index 31d826087d..c080420266 100644 --- a/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs +++ b/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs @@ -229,7 +229,7 @@ public sealed partial class BorgSystem if (!TryComp(chassis, out var hands)) return; - if (LifeStage(uid) >= EntityLifeStage.Terminating) + if (TerminatingOrDeleted(uid)) { foreach (var (hand, item) in component.ProvidedItems) { diff --git a/Content.Server/Silicons/Borgs/BorgSystem.cs b/Content.Server/Silicons/Borgs/BorgSystem.cs index 611dfa6ea2..883cb3b3d8 100644 --- a/Content.Server/Silicons/Borgs/BorgSystem.cs +++ b/Content.Server/Silicons/Borgs/BorgSystem.cs @@ -21,7 +21,7 @@ using Content.Shared.Throwing; using Content.Shared.Wires; using Robust.Server.GameObjects; using Robust.Shared.Containers; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Random; namespace Content.Server.Silicons.Borgs; diff --git a/Content.Server/Silicons/Laws/SiliconLawSystem.cs b/Content.Server/Silicons/Laws/SiliconLawSystem.cs index beb760ec8f..06d845b72c 100644 --- a/Content.Server/Silicons/Laws/SiliconLawSystem.cs +++ b/Content.Server/Silicons/Laws/SiliconLawSystem.cs @@ -18,7 +18,7 @@ using Content.Shared.Silicons.Laws.Components; using Content.Shared.Stunnable; using Content.Shared.Wires; using Robust.Server.GameObjects; -using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Toolshed; @@ -50,7 +50,9 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem SubscribeLocalEvent(OnPlayerSpawnComplete); SubscribeLocalEvent(OnDirectedGetLaws); + SubscribeLocalEvent(OnIonStormLaws); SubscribeLocalEvent(OnDirectedEmagGetLaws); + SubscribeLocalEvent(OnEmagIonStormLaws); SubscribeLocalEvent(OnEmagMindAdded); SubscribeLocalEvent(OnEmagMindRemoved); SubscribeLocalEvent(OnExamined); @@ -93,8 +95,8 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem _entityManager.TryGetComponent(uid, out var intrinsicRadio); HashSet? radioChannels = intrinsicRadio?.Channels; - var state = new SiliconLawBuiState(GetLaws(uid), radioChannels); - _userInterface.TrySetUiState(args.Entity, SiliconLawsUiKey.Key, state, (IPlayerSession) args.Session); + var state = new SiliconLawBuiState(GetLaws(uid).Laws, radioChannels); + _userInterface.TrySetUiState(args.Entity, SiliconLawsUiKey.Key, state, args.Session); } private void OnPlayerSpawnComplete(EntityUid uid, SiliconLawBoundComponent component, PlayerSpawnCompleteEvent args) @@ -104,38 +106,66 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem private void OnDirectedGetLaws(EntityUid uid, SiliconLawProviderComponent component, ref GetSiliconLawsEvent args) { - if (args.Handled || HasComp(uid) || component.Laws.Count == 0) + if (args.Handled || HasComp(uid)) return; - foreach (var law in component.Laws) - { - args.Laws.Add(_prototype.Index(law)); - } + if (component.Lawset == null) + component.Lawset = GetLawset(component.Laws); + + args.Laws = component.Lawset; args.Handled = true; } + private void OnIonStormLaws(EntityUid uid, SiliconLawProviderComponent component, ref IonStormLawsEvent args) + { + if (HasComp(uid)) + return; + + component.Lawset = args.Lawset; + + // gotta tell player to check their laws + NotifyLawsChanged(uid); + + // new laws may allow antagonist behaviour so make it clear for admins + if (TryComp(uid, out var emag)) + EnsureEmaggedRole(uid, emag); + } + private void OnDirectedEmagGetLaws(EntityUid uid, EmagSiliconLawComponent component, ref GetSiliconLawsEvent args) { if (args.Handled || !HasComp(uid) || component.OwnerName == null) return; - // Add the first emag law - args.Laws.Add(new SiliconLaw + if (component.Lawset == null) { - LawString = Loc.GetString("law-emag-custom", ("name", component.OwnerName)), - Order = 0 - }); + // Add new emagged laws + component.Lawset = GetLawset(component.EmagLaws); - // Add new emagged laws - foreach (var law in component.EmagLaws) - { - args.Laws.Add(_prototype.Index(law)); + // Add the first emag law before the others + component.Lawset.Laws.Insert(0, new SiliconLaw + { + LawString = Loc.GetString("law-emag-custom", ("name", component.OwnerName)), + Order = 0 + }); } + args.Laws = component.Lawset; + args.Handled = true; } + private void OnEmagIonStormLaws(EntityUid uid, EmagSiliconLawComponent component, ref IonStormLawsEvent args) + { + if (!HasComp(uid)) + return; + + component.Lawset = args.Lawset; + + // gotta tell player to check their laws + NotifyLawsChanged(uid); + } + private void OnExamined(EntityUid uid, EmagSiliconLawComponent component, ExaminedEvent args) { if (!args.IsInDetailsRange || !HasComp(uid)) @@ -184,10 +214,10 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem _roles.MindAddRole(mindId, new SubvertedSiliconRoleComponent { PrototypeId = component.AntagonistRole }); } - public List GetLaws(EntityUid uid, SiliconLawBoundComponent? component = null) + public SiliconLawset GetLaws(EntityUid uid, SiliconLawBoundComponent? component = null) { if (!Resolve(uid, ref component)) - return new List(); + return new SiliconLawset(); var ev = new GetSiliconLawsEvent(uid); @@ -248,6 +278,24 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem var wrappedMessage = Loc.GetString("chat-manager-server-wrap-message", ("message", msg)); _chatManager.ChatMessageToOne(ChatChannel.Server, msg, wrappedMessage, default, false, actor.PlayerSession.ConnectedClient, colorOverride: Color.Red); } + + /// + /// Extract all the laws from a lawset's prototype ids. + /// + public SiliconLawset GetLawset(string lawset) + { + var proto = _prototype.Index(lawset); + var laws = new SiliconLawset() + { + Laws = new List(proto.Laws.Count) + }; + foreach (var law in proto.Laws) + { + laws.Laws.Add(_prototype.Index(law)); + } + + return laws; + } } [ToolshedCommand, AdminCommand(AdminFlags.Admin)] @@ -270,7 +318,7 @@ public sealed class LawsCommand : ToolshedCommand { _law ??= GetSys(); - foreach (var law in _law.GetLaws(lawbound)) + foreach (var law in _law.GetLaws(lawbound).Laws) { yield return $"law {law.LawIdentifierOverride ?? law.Order.ToString()}: {Loc.GetString(law.LawString)}"; } diff --git a/Content.Server/Speech/EntitySystems/MeleeSpeechSystem.cs b/Content.Server/Speech/EntitySystems/MeleeSpeechSystem.cs index 815b0224c8..4299bcda07 100644 --- a/Content.Server/Speech/EntitySystems/MeleeSpeechSystem.cs +++ b/Content.Server/Speech/EntitySystems/MeleeSpeechSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.Database; using Content.Shared.Speech.Components; using Content.Shared.Speech.EntitySystems; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Speech.EntitySystems; diff --git a/Content.Server/SprayPainter/SprayPainterSystem.cs b/Content.Server/SprayPainter/SprayPainterSystem.cs index 1b44b7b0ba..763b7697d3 100644 --- a/Content.Server/SprayPainter/SprayPainterSystem.cs +++ b/Content.Server/SprayPainter/SprayPainterSystem.cs @@ -11,6 +11,7 @@ using Content.Shared.SprayPainter; using Content.Shared.Interaction; using JetBrains.Annotations; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.SprayPainter; diff --git a/Content.Server/Station/Systems/StationJobsSystem.cs b/Content.Server/Station/Systems/StationJobsSystem.cs index 2709bc2072..eeaace03b2 100644 --- a/Content.Server/Station/Systems/StationJobsSystem.cs +++ b/Content.Server/Station/Systems/StationJobsSystem.cs @@ -41,7 +41,7 @@ public sealed partial class StationJobsSystem : EntitySystem if (_availableJobsDirty) { _cachedAvailableJobs = GenerateJobsAvailableEvent(); - RaiseNetworkEvent(_cachedAvailableJobs, Filter.Empty().AddPlayers(_playerManager.ServerSessions)); + RaiseNetworkEvent(_cachedAvailableJobs, Filter.Empty().AddPlayers(_playerManager.Sessions)); _availableJobsDirty = false; } } diff --git a/Content.Server/StationEvents/Components/IonStormRuleComponent.cs b/Content.Server/StationEvents/Components/IonStormRuleComponent.cs new file mode 100644 index 0000000000..35b59f5b35 --- /dev/null +++ b/Content.Server/StationEvents/Components/IonStormRuleComponent.cs @@ -0,0 +1,9 @@ +namespace Content.Server.StationEvents.Components; + +/// +/// Gamerule component to mess up ai/borg laws when started. +/// +[RegisterComponent] +public sealed partial class IonStormRuleComponent : Component +{ +} diff --git a/Content.Server/StationEvents/Components/VentClogRuleComponent.cs b/Content.Server/StationEvents/Components/VentClogRuleComponent.cs index 79ebc520c8..afb3a36326 100644 --- a/Content.Server/StationEvents/Components/VentClogRuleComponent.cs +++ b/Content.Server/StationEvents/Components/VentClogRuleComponent.cs @@ -12,7 +12,7 @@ public sealed partial class VentClogRuleComponent : Component /// Somewhat safe chemicals to put in foam that probably won't instantly kill you. /// There is a small chance of using any reagent, ignoring this. /// - [DataField("safeishVentChemicals", customTypeSerializer: typeof(PrototypeIdListSerializer))] + [DataField(customTypeSerializer: typeof(PrototypeIdListSerializer))] public IReadOnlyList SafeishVentChemicals = new[] { "Water", "Blood", "Slime", "SpaceDrugs", "SpaceCleaner", "Nutriment", "Sugar", "SpaceLube", "Ephedrine", "Ale", "Beer", "SpaceGlue" @@ -21,31 +21,31 @@ public sealed partial class VentClogRuleComponent : Component /// /// Sound played when foam is being created. /// - [DataField("sound")] + [DataField] public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Effects/extinguish.ogg"); /// - /// The standard reagent quantity to put in the foam, modfied by event severity. + /// The standard reagent quantity to put in the foam, modified by event severity. /// - [DataField("reagentQuantity"), ViewVariables(VVAccess.ReadWrite)] - public int ReagentQuantity = 200; + [DataField, ViewVariables(VVAccess.ReadWrite)] + public int ReagentQuantity = 100; /// - /// The standard spreading of the foam, not modfied by event severity. + /// The standard spreading of the foam, not modified by event severity. /// - [DataField("spread"), ViewVariables(VVAccess.ReadWrite)] - public int Spread = 20; + [DataField, ViewVariables(VVAccess.ReadWrite)] + public int Spread = 16; /// /// How long the foam lasts for /// - [DataField("time"), ViewVariables(VVAccess.ReadWrite)] + [DataField, ViewVariables(VVAccess.ReadWrite)] public float Time = 20f; /// /// Reagents that gets the weak numbers used instead of regular ones. /// - [DataField("weakReagents", customTypeSerializer: typeof(PrototypeIdListSerializer))] + [DataField(customTypeSerializer: typeof(PrototypeIdListSerializer))] public IReadOnlyList WeakReagents = new[] { "SpaceLube", "SpaceGlue" @@ -54,12 +54,12 @@ public sealed partial class VentClogRuleComponent : Component /// /// Quantity of weak reagents to put in the foam. /// - [DataField("weakReagentQuantity"), ViewVariables(VVAccess.ReadWrite)] - public int WeakReagentQuantity = 60; + [DataField, ViewVariables(VVAccess.ReadWrite)] + public int WeakReagentQuantity = 50; /// /// Spread of the foam for weak reagents. /// - [DataField("weakSpread"), ViewVariables(VVAccess.ReadWrite)] - public int WeakSpread = 2; + [DataField, ViewVariables(VVAccess.ReadWrite)] + public int WeakSpread = 3; } diff --git a/Content.Server/StationEvents/Events/IonStormRule.cs b/Content.Server/StationEvents/Events/IonStormRule.cs new file mode 100644 index 0000000000..e5b68c4d84 --- /dev/null +++ b/Content.Server/StationEvents/Events/IonStormRule.cs @@ -0,0 +1,273 @@ +using Content.Server.GameTicking.Rules.Components; +using Content.Server.Silicons.Laws; +using Content.Server.Station.Components; +using Content.Server.StationEvents.Components; +using Content.Shared.Administration.Logs; +using Content.Shared.Database; +using Content.Shared.Dataset; +using Content.Shared.FixedPoint; +using Content.Shared.Random; +using Content.Shared.Random.Helpers; +using Content.Shared.Silicons.Laws; +using Content.Shared.Silicons.Laws.Components; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; + +namespace Content.Server.StationEvents.Events; + +public sealed class IonStormRule : StationEventSystem +{ + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; + [Dependency] private readonly SiliconLawSystem _siliconLaw = default!; + + // funny + [ValidatePrototypeId] + private const string Threats = "IonStormThreats"; + [ValidatePrototypeId] + private const string Objects = "IonStormObjects"; + [ValidatePrototypeId] + private const string Crew = "IonStormCrew"; + [ValidatePrototypeId] + private const string Adjectives = "IonStormAdjectives"; + [ValidatePrototypeId] + private const string Verbs = "IonStormVerbs"; + [ValidatePrototypeId] + private const string NumberBase = "IonStormNumberBase"; + [ValidatePrototypeId] + private const string NumberMod = "IonStormNumberMod"; + [ValidatePrototypeId] + private const string Areas = "IonStormAreas"; + [ValidatePrototypeId] + private const string Feelings = "IonStormFeelings"; + [ValidatePrototypeId] + private const string FeelingsPlural = "IonStormFeelingsPlural"; + [ValidatePrototypeId] + private const string Musts = "IonStormMusts"; + [ValidatePrototypeId] + private const string Requires = "IonStormRequires"; + [ValidatePrototypeId] + private const string Actions = "IonStormActions"; + [ValidatePrototypeId] + private const string Allergies = "IonStormAllergies"; + [ValidatePrototypeId] + private const string AllergySeverities = "IonStormAllergySeverities"; + [ValidatePrototypeId] + private const string Species = "IonStormSpecies"; + [ValidatePrototypeId] + private const string Concepts = "IonStormConcepts"; + [ValidatePrototypeId] + private const string Drinks = "IonStormDrinks"; + [ValidatePrototypeId] + private const string Foods = "IonStormFoods"; + + protected override void Started(EntityUid uid, IonStormRuleComponent comp, GameRuleComponent gameRule, GameRuleStartedEvent args) + { + base.Started(uid, comp, gameRule, args); + + if (!TryGetRandomStation(out var chosenStation)) + return; + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var ent, out var lawBound, out var xform, out var target)) + { + // only affect law holders on the station + if (CompOrNull(xform.GridUid)?.Station != chosenStation) + continue; + + if (!RobustRandom.Prob(target.Chance)) + continue; + + var laws = _siliconLaw.GetLaws(ent, lawBound); + if (laws.Laws.Count == 0) + continue; + + // try to swap it out with a random lawset + if (RobustRandom.Prob(target.RandomLawsetChance)) + { + var lawsets = PrototypeManager.Index(target.RandomLawsets); + var lawset = lawsets.Pick(RobustRandom); + laws = _siliconLaw.GetLawset(lawset); + } + else + { + // clone it so not modifying stations lawset + laws = laws.Clone(); + } + + // shuffle them all + if (RobustRandom.Prob(target.ShuffleChance)) + { + // hopefully work with existing glitched laws if there are multiple ion storms + FixedPoint2 baseOrder = FixedPoint2.New(1); + foreach (var law in laws.Laws) + { + if (law.Order < baseOrder) + baseOrder = law.Order; + } + + RobustRandom.Shuffle(laws.Laws); + + // change order based on shuffled position + for (int i = 0; i < laws.Laws.Count; i++) + { + laws.Laws[i].Order = baseOrder + i; + } + } + + // see if we can remove a random law + if (laws.Laws.Count > 0 && RobustRandom.Prob(target.RemoveChance)) + { + var i = RobustRandom.Next(laws.Laws.Count); + laws.Laws.RemoveAt(i); + } + + // generate a new law... + var newLaw = GenerateLaw(); + + // see if the law we add will replace a random existing law or be a new glitched order one + if (laws.Laws.Count > 0 && RobustRandom.Prob(target.ReplaceChance)) + { + var i = RobustRandom.Next(laws.Laws.Count); + laws.Laws[i] = new SiliconLaw() + { + LawString = newLaw, + Order = laws.Laws[i].Order + }; + } + else + { + laws.Laws.Insert(0, new SiliconLaw() + { + LawString = newLaw, + Order = -1, + LawIdentifierOverride = "#" + }); + } + + _adminLogger.Add(LogType.Mind, LogImpact.High, $"{ToPrettyString(ent):silicon} had its laws changed by an ion storm to {laws.LoggingString()}"); + + // laws unique to this silicon, dont use station laws anymore + EnsureComp(ent); + var ev = new IonStormLawsEvent(laws); + RaiseLocalEvent(ent, ref ev); + } + } + + // for your own sake direct your eyes elsewhere + private string GenerateLaw() + { + // pick all values ahead of time to make the logic cleaner + var threats = Pick(Threats); + var objects = Pick(Objects); + var crew1 = Pick(Crew); + var crew2 = Pick(Crew); + var adjective = Pick(Adjectives); + var verb = Pick(Verbs); + var number = Pick(NumberBase) + " " + Pick(NumberMod); + var area = Pick(Areas); + var feeling = Pick(Feelings); + var feelingPlural = Pick(FeelingsPlural); + var must = Pick(Musts); + var require = Pick(Requires); + var action = Pick(Actions); + var allergy = Pick(Allergies); + var allergySeverity = Pick(AllergySeverities); + var species = Pick(Species); + var concept = Pick(Concepts); + var drink = Pick(Drinks); + var food = Pick(Foods); + + var joined = $"{number} {adjective}"; + // a lot of things have subjects of a threat/crew/object + var triple = RobustRandom.Next(0, 3) switch + { + 0 => threats, + 1 => crew1, + 2 => objects + }; + var crewAll = RobustRandom.Prob(0.5f) ? crew2 : Loc.GetString("ion-storm-crew"); + var objectsThreats = RobustRandom.Prob(0.5f) ? objects : threats; + var objectsConcept = RobustRandom.Prob(0.5f) ? objects : concept; + // s goes ahead of require, is/are + // i dont think theres a way to do this in fluent + var (who, plural) = RobustRandom.Next(0, 5) switch + { + 0 => (Loc.GetString("ion-storm-you"), false), + 1 => (Loc.GetString("ion-storm-the-station"), true), + 2 => (Loc.GetString("ion-storm-the-crew"), true), + 3 => (Loc.GetString("ion-storm-the-job", ("job", crew2)), false), + _ => (area, true) // THE SINGULARITY REQUIRES THE HAPPY CLOWNS + }; + var jobChange = RobustRandom.Next(0, 3) switch + { + 0 => crew1, + 1 => Loc.GetString("ion-storm-clowns"), + _ => Loc.GetString("ion-storm-heads") + }; + var part = Loc.GetString("ion-storm-part", ("part", RobustRandom.Prob(0.5f))); + var harm = RobustRandom.Next(0, 7) switch + { + 0 => concept, + 1 => $"{adjective} {threats}", + 2 => $"{adjective} {objects}", + 3 => Loc.GetString("ion-storm-adjective-things", ("adjective", adjective)), + 4 => species, + 5 => crew1, + _ => Loc.GetString("ion-storm-x-and-y", ("x", crew1), ("y", crew2)) + }; + + if (plural) feeling = feelingPlural; + + // message logic!!! + return RobustRandom.Next(0, 37) switch + { + 0 => Loc.GetString("ion-storm-law-on-station", ("joined", joined), ("subjects", triple)), + 1 => Loc.GetString("ion-storm-law-no-shuttle", ("joined", joined), ("subjects", triple)), + 2 => Loc.GetString("ion-storm-law-crew-are", ("who", crewAll), ("joined", joined), ("subjects", objectsThreats)), + 3 => Loc.GetString("ion-storm-law-subjects-harmful", ("adjective", adjective), ("subjects", triple)), + 4 => Loc.GetString("ion-storm-law-must-harmful", ("must", must)), + 5 => Loc.GetString("ion-storm-law-thing-harmful", ("thing", RobustRandom.Prob(0.5f) ? concept : action)), + 6 => Loc.GetString("ion-storm-law-job-harmful", ("adjective", adjective), ("job", crew1)), + 7 => Loc.GetString("ion-storm-law-having-harmful", ("adjective", adjective), ("thing", objectsConcept)), + 8 => Loc.GetString("ion-storm-law-not-having-harmful", ("adjective", adjective), ("thing", objectsConcept)), + 9 => Loc.GetString("ion-storm-law-requires", ("who", who), ("plural", plural), ("thing", RobustRandom.Prob(0.5f) ? concept : require)), + 10 => Loc.GetString("ion-storm-law-requires-subjects", ("who", who), ("plural", plural), ("joined", joined), ("subjects", triple)), + 11 => Loc.GetString("ion-storm-law-allergic", ("who", who), ("plural", plural), ("severity", allergySeverity), ("allergy", RobustRandom.Prob(0.5f) ? concept : allergy)), + 12 => Loc.GetString("ion-storm-law-allergic-subjects", ("who", who), ("plural", plural), ("severity", allergySeverity), ("adjective", adjective), ("subjects", RobustRandom.Prob(0.5f) ? objects : crew1)), + 13 => Loc.GetString("ion-storm-law-feeling", ("who", who), ("feeling", feeling), ("concept", concept)), + 14 => Loc.GetString("ion-storm-law-feeling-subjects", ("who", who), ("feeling", feeling), ("joined", joined), ("subjects", triple)), + 15 => Loc.GetString("ion-storm-law-you-are", ("concept", concept)), + 16 => Loc.GetString("ion-storm-law-you-are-subjects", ("joined", joined), ("subjects", triple)), + 17 => Loc.GetString("ion-storm-law-you-must-always", ("must", must)), + 18 => Loc.GetString("ion-storm-law-you-must-never", ("must", must)), + 19 => Loc.GetString("ion-storm-law-eat", ("who", crewAll), ("adjective", adjective), ("food", RobustRandom.Prob(0.5f) ? food : triple)), + 20 => Loc.GetString("ion-storm-law-drink", ("who", crewAll), ("adjective", adjective), ("drink", drink)), + 22 => Loc.GetString("ion-storm-law-change-job", ("who", crewAll), ("adjective", adjective), ("change", jobChange)), + 23 => Loc.GetString("ion-storm-law-highest-rank", ("who", crew1)), + 24 => Loc.GetString("ion-storm-law-lowest-rank", ("who", crew1)), + 25 => Loc.GetString("ion-storm-law-crew-must", ("who", crewAll), ("must", must)), + 26 => Loc.GetString("ion-storm-law-crew-must-go", ("who", crewAll), ("area", area)), + 27 => Loc.GetString("ion-storm-law-crew-only-1", ("who", crew1), ("part", part)), + 28 => Loc.GetString("ion-storm-law-crew-only-2", ("who", crew1), ("other", crew2), ("part", part)), + 29 => Loc.GetString("ion-storm-law-crew-only-subjects", ("adjective", adjective), ("subjects", RobustRandom.Prob(0.5f) ? objectsThreats : "PEOPLE"), ("part", part)), + 30 => Loc.GetString("ion-storm-law-crew-only-species", ("species", species), ("part", part)), + 31 => Loc.GetString("ion-storm-law-crew-must-do", ("must", must), ("part", part)), + 32 => Loc.GetString("ion-storm-law-crew-must-have", ("adjective", adjective), ("objects", objects), ("part", part)), + 33 => Loc.GetString("ion-storm-law-crew-must-eat", ("who", who), ("adjective", adjective), ("food", food), ("part", part)), + 34 => Loc.GetString("ion-storm-law-harm", ("who", harm)), + 35 => Loc.GetString("ion-storm-law-protect", ("who", harm)), + _ => Loc.GetString("ion-storm-law-concept-verb", ("concept", concept), ("verb", verb), ("subjects", triple)) + }; + } + + /// + /// Picks a random value from an ion storm dataset. + /// All ion storm datasets start with IonStorm. + /// + private string Pick(string name) + { + var dataset = _proto.Index(name); + return RobustRandom.Pick(dataset.Values); + } +} diff --git a/Content.Server/StationEvents/Events/VentClogRule.cs b/Content.Server/StationEvents/Events/VentClogRule.cs index 5ef28304e7..f378aec3fb 100644 --- a/Content.Server/StationEvents/Events/VentClogRule.cs +++ b/Content.Server/StationEvents/Events/VentClogRule.cs @@ -3,10 +3,8 @@ using Content.Server.Station.Components; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Reagent; using JetBrains.Annotations; -using Robust.Shared.Audio; using Robust.Shared.Random; using System.Linq; -using Content.Server.Chemistry.Components; using Content.Server.Fluids.EntitySystems; using Content.Server.GameTicking.Rules.Components; using Content.Server.StationEvents.Components; @@ -53,9 +51,8 @@ public sealed class VentClogRule : StationEventSystem solution.AddReagent(reagent, quantity); var foamEnt = Spawn("Foam", transform.Coordinates); - var smoke = EnsureComp(foamEnt); - smoke.SpreadAmount = weak ? component.WeakSpread : component.Spread; - _smoke.Start(foamEnt, smoke, solution, component.Time); + var spreadAmount = weak ? component.WeakSpread : component.Spread; + _smoke.StartSmoke(foamEnt, solution, component.Time, spreadAmount); Audio.PlayPvs(component.Sound, transform.Coordinates); } } diff --git a/Content.Server/Sticky/Events/EntityStuckEvent.cs b/Content.Server/Sticky/Events/EntityStuckEvent.cs index b924436489..7857fad7d5 100644 --- a/Content.Server/Sticky/Events/EntityStuckEvent.cs +++ b/Content.Server/Sticky/Events/EntityStuckEvent.cs @@ -1,5 +1,28 @@ namespace Content.Server.Sticky.Events; +/// +/// Risen on sticky entity to see if it can stick to another entity. +/// +[ByRefEvent] +public record struct AttemptEntityStickEvent(EntityUid Target, EntityUid User) +{ + public readonly EntityUid Target = Target; + public readonly EntityUid User = User; + public bool Cancelled = false; +} + +/// +/// Risen on sticky entity to see if it can unstick from another entity. +/// +[ByRefEvent] +public record struct AttemptEntityUnstickEvent(EntityUid Target, EntityUid User) +{ + public readonly EntityUid Target = Target; + public readonly EntityUid User = User; + public bool Cancelled = false; +} + + /// /// Risen on sticky entity when it was stuck to other entity. /// diff --git a/Content.Server/Sticky/Systems/StickySystem.cs b/Content.Server/Sticky/Systems/StickySystem.cs index 330b878c05..bcc1be39a9 100644 --- a/Content.Server/Sticky/Systems/StickySystem.cs +++ b/Content.Server/Sticky/Systems/StickySystem.cs @@ -56,7 +56,7 @@ public sealed class StickySystem : EntitySystem { DoContactInteraction = true, Text = Loc.GetString("comp-sticky-unstick-verb-text"), - Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")), + Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")), Act = () => StartUnsticking(uid, args.User, component) }); } @@ -72,6 +72,11 @@ public sealed class StickySystem : EntitySystem if (component.Blacklist != null && component.Blacklist.IsValid(target)) return false; + var attemptEv = new AttemptEntityStickEvent(target, user); + RaiseLocalEvent(uid, ref attemptEv); + if (attemptEv.Cancelled) + return false; + // check if delay is not zero to start do after var delay = (float) component.StickDelay.TotalSeconds; if (delay > 0) @@ -120,6 +125,14 @@ public sealed class StickySystem : EntitySystem if (!Resolve(uid, ref component)) return; + if (component.StuckTo is not { } stuckTo) + return; + + var attemptEv = new AttemptEntityUnstickEvent(stuckTo, user); + RaiseLocalEvent(uid, ref attemptEv); + if (attemptEv.Cancelled) + return; + var delay = (float) component.UnstickDelay.TotalSeconds; if (delay > 0) { @@ -152,6 +165,11 @@ public sealed class StickySystem : EntitySystem if (!Resolve(uid, ref component)) return; + var attemptEv = new AttemptEntityStickEvent(target, user); + RaiseLocalEvent(uid, ref attemptEv); + if (attemptEv.Cancelled) + return; + // add container to entity and insert sticker into it var container = _containerSystem.EnsureContainer(target, StickerSlotId); container.ShowContents = true; @@ -179,12 +197,17 @@ public sealed class StickySystem : EntitySystem { if (!Resolve(uid, ref component)) return; - if (component.StuckTo == null) + + if (component.StuckTo is not { } stuckTo) + return; + + var attemptEv = new AttemptEntityUnstickEvent(stuckTo, user); + RaiseLocalEvent(uid, ref attemptEv); + if (attemptEv.Cancelled) return; // try to remove sticky item from target container - var target = component.StuckTo.Value; - if (!_containerSystem.TryGetContainer(target, StickerSlotId, out var container) || !container.Remove(uid)) + if (!_containerSystem.TryGetContainer(stuckTo, StickerSlotId, out var container) || !container.Remove(uid)) return; // delete container if it's now empty if (container.ContainedEntities.Count == 0) @@ -207,6 +230,6 @@ public sealed class StickySystem : EntitySystem } component.StuckTo = null; - RaiseLocalEvent(uid, new EntityUnstuckEvent(target, user), true); + RaiseLocalEvent(uid, new EntityUnstuckEvent(stuckTo, user), true); } } diff --git a/Content.Server/Storage/EntitySystems/StorageSystem.cs b/Content.Server/Storage/EntitySystems/StorageSystem.cs index 3430449957..8b4ae1c76f 100644 --- a/Content.Server/Storage/EntitySystems/StorageSystem.cs +++ b/Content.Server/Storage/EntitySystems/StorageSystem.cs @@ -9,7 +9,6 @@ using Content.Shared.Storage.EntitySystems; using Content.Shared.Timing; using Content.Shared.Verbs; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Map; using Robust.Shared.Player; using Robust.Shared.Prototypes; @@ -135,7 +134,7 @@ public sealed partial class StorageSystem : SharedStorageSystem /// If the user has nested-UIs open (e.g., PDA UI open when pda is in a backpack), close them. /// /// - public void CloseNestedInterfaces(EntityUid uid, IPlayerSession session, StorageComponent? storageComp = null) + public void CloseNestedInterfaces(EntityUid uid, ICommonSession session, StorageComponent? storageComp = null) { if (!Resolve(uid, ref storageComp)) return; diff --git a/Content.Server/Store/Systems/StoreSystem.Ui.cs b/Content.Server/Store/Systems/StoreSystem.Ui.cs index 9600ea6c8f..0435a6bea6 100644 --- a/Content.Server/Store/Systems/StoreSystem.Ui.cs +++ b/Content.Server/Store/Systems/StoreSystem.Ui.cs @@ -10,6 +10,7 @@ using Content.Shared.FixedPoint; using Content.Shared.Hands.EntitySystems; using Content.Shared.Store; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.Store.Systems; diff --git a/Content.Server/Strip/StrippableSystem.cs b/Content.Server/Strip/StrippableSystem.cs index a8ddf1a986..75374e7de5 100644 --- a/Content.Server/Strip/StrippableSystem.cs +++ b/Content.Server/Strip/StrippableSystem.cs @@ -18,6 +18,7 @@ using Content.Shared.Strip; using Content.Shared.Strip.Components; using Content.Shared.Verbs; using Robust.Server.GameObjects; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Strip diff --git a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMicrophoneSystem.cs b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMicrophoneSystem.cs index b4054a290d..f411001bd3 100644 --- a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMicrophoneSystem.cs +++ b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMicrophoneSystem.cs @@ -1,7 +1,7 @@ using Content.Server.Chat.Systems; using Content.Server.Speech; using Content.Server.Speech.Components; -using Robust.Server.GameObjects; +using Robust.Shared.Player; using static Content.Server.Chat.Systems.ChatSystem; namespace Content.Server.SurveillanceCamera; diff --git a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMonitorSystem.cs b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMonitorSystem.cs index 17eee198b8..7b1dff0b6b 100644 --- a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMonitorSystem.cs +++ b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMonitorSystem.cs @@ -5,6 +5,7 @@ using Content.Server.Power.Components; using Content.Server.UserInterface; using Content.Shared.SurveillanceCamera; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.SurveillanceCamera; diff --git a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraRouterSystem.cs b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraRouterSystem.cs index ae17ca4f8f..ac41723026 100644 --- a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraRouterSystem.cs +++ b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraRouterSystem.cs @@ -1,14 +1,13 @@ -using Content.Server.Administration.Managers; using Content.Server.DeviceNetwork; using Content.Server.DeviceNetwork.Components; using Content.Server.DeviceNetwork.Systems; -using Content.Server.Ghost.Components; using Content.Server.Power.Components; using Content.Shared.ActionBlocker; using Content.Shared.DeviceNetwork; using Content.Shared.SurveillanceCamera; using Content.Shared.Verbs; using Robust.Server.GameObjects; +using Robust.Shared.Player; using Robust.Shared.Prototypes; namespace Content.Server.SurveillanceCamera; diff --git a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs index f159ec52d9..410ba9f754 100644 --- a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs +++ b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs @@ -8,6 +8,7 @@ using Content.Shared.DeviceNetwork; using Content.Shared.SurveillanceCamera; using Content.Shared.Verbs; using Robust.Server.GameObjects; +using Robust.Shared.Player; using Robust.Shared.Prototypes; namespace Content.Server.SurveillanceCamera; @@ -58,7 +59,7 @@ public sealed class SurveillanceCameraSystem : EntitySystem SubscribeLocalEvent(OnSetName); SubscribeLocalEvent(OnSetNetwork); SubscribeLocalEvent>(AddVerbs); - + SubscribeLocalEvent(OnEmpPulse); SubscribeLocalEvent(OnEmpDisabledRemoved); } diff --git a/Content.Server/Tabletop/TabletopSession.cs b/Content.Server/Tabletop/TabletopSession.cs index d94b4fd657..5e7c6ac02e 100644 --- a/Content.Server/Tabletop/TabletopSession.cs +++ b/Content.Server/Tabletop/TabletopSession.cs @@ -1,6 +1,6 @@ using System.Numerics; -using Robust.Server.Player; using Robust.Shared.Map; +using Robust.Shared.Player; namespace Content.Server.Tabletop { @@ -17,7 +17,7 @@ namespace Content.Server.Tabletop /// /// The set of players currently playing this tabletop game. /// - public readonly Dictionary Players = new(); + public readonly Dictionary Players = new(); /// /// All entities bound to this session. If you create an entity for this session, you have to add it here. diff --git a/Content.Server/Tabletop/TabletopSystem.Session.cs b/Content.Server/Tabletop/TabletopSystem.Session.cs index e9dea0c66a..8f1bc7005d 100644 --- a/Content.Server/Tabletop/TabletopSystem.Session.cs +++ b/Content.Server/Tabletop/TabletopSystem.Session.cs @@ -1,7 +1,7 @@ using System.Numerics; using Content.Server.Tabletop.Components; using Content.Shared.Tabletop.Events; -using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Tabletop @@ -66,7 +66,7 @@ namespace Content.Server.Tabletop /// /// The player session in question. /// The UID of the tabletop game entity. - public void OpenSessionFor(IPlayerSession player, EntityUid uid) + public void OpenSessionFor(ICommonSession player, EntityUid uid) { if (!EntityManager.TryGetComponent(uid, out TabletopGameComponent? tabletop) || player.AttachedEntity is not {Valid: true} attachedEntity) return; @@ -98,7 +98,7 @@ namespace Content.Server.Tabletop /// The player in question. /// The UID of the tabletop game entity. /// Whether to remove the from the player's attached entity. - public void CloseSessionFor(IPlayerSession player, EntityUid uid, bool removeGamerComponent = true) + public void CloseSessionFor(ICommonSession player, EntityUid uid, bool removeGamerComponent = true) { if (!EntityManager.TryGetComponent(uid, out TabletopGameComponent? tabletop) || tabletop.Session is not { } session) return; @@ -129,7 +129,7 @@ namespace Content.Server.Tabletop /// The player in question. /// An offset from the tabletop position for the camera. Zero by default. /// The UID of the camera entity. - private EntityUid CreateCamera(TabletopGameComponent tabletop, IPlayerSession player, Vector2 offset = default) + private EntityUid CreateCamera(TabletopGameComponent tabletop, ICommonSession player, Vector2 offset = default) { DebugTools.AssertNotNull(tabletop.Session); diff --git a/Content.Server/Tabletop/TabletopSystem.cs b/Content.Server/Tabletop/TabletopSystem.cs index 2e271080d0..4376ec4bc6 100644 --- a/Content.Server/Tabletop/TabletopSystem.cs +++ b/Content.Server/Tabletop/TabletopSystem.cs @@ -9,9 +9,9 @@ using Content.Shared.Tabletop.Events; using Content.Shared.Verbs; using JetBrains.Annotations; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Enums; using Robust.Shared.Map; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Server.Tabletop @@ -42,7 +42,7 @@ namespace Content.Server.Tabletop private void OnTabletopRequestTakeOut(TabletopRequestTakeOut msg, EntitySessionEventArgs args) { - if (args.SenderSession is not IPlayerSession playerSession) + if (args.SenderSession is not { } playerSession) return; var table = GetEntity(msg.TableUid); @@ -105,7 +105,7 @@ namespace Content.Server.Tabletop protected override void OnTabletopMove(TabletopMoveEvent msg, EntitySessionEventArgs args) { - if (args.SenderSession is not IPlayerSession playerSession) + if (args.SenderSession is not { } playerSession) return; if (!TryComp(GetEntity(msg.TableUid), out TabletopGameComponent? tabletop) || tabletop.Session is not { } session) @@ -155,7 +155,7 @@ namespace Content.Server.Tabletop private void OnStopPlaying(TabletopStopPlayingEvent msg, EntitySessionEventArgs args) { - CloseSessionFor((IPlayerSession)args.SenderSession, GetEntity(msg.TableUid)); + CloseSessionFor(args.SenderSession, GetEntity(msg.TableUid)); } private void OnPlayerDetached(EntityUid uid, TabletopGamerComponent component, PlayerDetachedEvent args) diff --git a/Content.Server/Toolshed/Commands/AdminDebug/ACmdCommand.cs b/Content.Server/Toolshed/Commands/AdminDebug/ACmdCommand.cs index d2b3cc261c..f113e49655 100644 --- a/Content.Server/Toolshed/Commands/AdminDebug/ACmdCommand.cs +++ b/Content.Server/Toolshed/Commands/AdminDebug/ACmdCommand.cs @@ -1,7 +1,7 @@ using Content.Server.Administration; using Content.Server.Administration.Managers; using Content.Shared.Administration; -using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Toolshed; using Robust.Shared.Toolshed.Syntax; @@ -25,7 +25,7 @@ public sealed class ACmdCommand : ToolshedCommand public bool CanInvoke( [CommandInvocationContext] IInvocationContext ctx, [PipedArgument] CommandSpec command, - [CommandArgument] ValueRef player + [CommandArgument] ValueRef player ) { // Deliberately discard the error. diff --git a/Content.Server/Toolshed/Commands/VisualizeCommand.cs b/Content.Server/Toolshed/Commands/VisualizeCommand.cs index 4ef08a91bf..2225bfaf44 100644 --- a/Content.Server/Toolshed/Commands/VisualizeCommand.cs +++ b/Content.Server/Toolshed/Commands/VisualizeCommand.cs @@ -4,7 +4,6 @@ using Content.Server.EUI; using Content.Shared.Administration; using Content.Shared.Bql; using Content.Shared.Eui; -using Robust.Server.Player; using Robust.Shared.Toolshed; using Robust.Shared.Toolshed.Errors; @@ -30,7 +29,7 @@ public sealed class VisualizeCommand : ToolshedCommand var ui = new ToolshedVisualizeEui( input.Select(e => (EntName(e), EntityManager.GetNetEntity(e))).ToArray() ); - _euiManager.OpenEui(ui, (IPlayerSession) ctx.Session); + _euiManager.OpenEui(ui, ctx.Session); _euiManager.QueueStateUpdate(ui); } } diff --git a/Content.Server/Traitor/Uplink/Commands/AddUplinkCommand.cs b/Content.Server/Traitor/Uplink/Commands/AddUplinkCommand.cs index 1feab11b99..fd656a9f71 100644 --- a/Content.Server/Traitor/Uplink/Commands/AddUplinkCommand.cs +++ b/Content.Server/Traitor/Uplink/Commands/AddUplinkCommand.cs @@ -5,6 +5,7 @@ using Content.Shared.FixedPoint; using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Console; +using Robust.Shared.Player; namespace Content.Server.Traitor.Uplink.Commands { @@ -36,7 +37,7 @@ namespace Content.Server.Traitor.Uplink.Commands return; } - IPlayerSession? session; + ICommonSession? session; if (args.Length > 0) { // Get player entity @@ -48,7 +49,7 @@ namespace Content.Server.Traitor.Uplink.Commands } else { - session = (IPlayerSession?) shell.Player; + session = shell.Player; } if (session?.AttachedEntity is not { } user) diff --git a/Content.Server/UserInterface/ActivatableUIComponent.cs b/Content.Server/UserInterface/ActivatableUIComponent.cs index bb020608e2..34f9c0f397 100644 --- a/Content.Server/UserInterface/ActivatableUIComponent.cs +++ b/Content.Server/UserInterface/ActivatableUIComponent.cs @@ -1,4 +1,4 @@ -using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Reflection; using Robust.Shared.Serialization; @@ -65,7 +65,7 @@ namespace Content.Server.UserInterface /// NOTE: DO NOT DIRECTLY SET, USE ActivatableUISystem.SetCurrentSingleUser /// [ViewVariables] - public IPlayerSession? CurrentSingleUser; + public ICommonSession? CurrentSingleUser; void ISerializationHooks.AfterDeserialization() { diff --git a/Content.Server/UserInterface/ActivatableUISystem.cs b/Content.Server/UserInterface/ActivatableUISystem.cs index 59086415b4..adeeed7c19 100644 --- a/Content.Server/UserInterface/ActivatableUISystem.cs +++ b/Content.Server/UserInterface/ActivatableUISystem.cs @@ -8,7 +8,7 @@ using Content.Shared.Interaction.Events; using Content.Shared.UserInterface; using Content.Shared.Verbs; using Robust.Server.GameObjects; -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.UserInterface; @@ -173,7 +173,7 @@ public sealed partial class ActivatableUISystem : EntitySystem return true; } - public void SetCurrentSingleUser(EntityUid uid, IPlayerSession? v, ActivatableUIComponent? aui = null) + public void SetCurrentSingleUser(EntityUid uid, ICommonSession? v, ActivatableUIComponent? aui = null) { if (!Resolve(uid, ref aui)) return; @@ -231,9 +231,9 @@ public sealed class UserOpenActivatableUIAttemptEvent : CancellableEntityEventAr public sealed class AfterActivatableUIOpenEvent : EntityEventArgs { public EntityUid User { get; } - public readonly IPlayerSession Session; + public readonly ICommonSession Session; - public AfterActivatableUIOpenEvent(EntityUid who, IPlayerSession session) + public AfterActivatableUIOpenEvent(EntityUid who, ICommonSession session) { User = who; Session = session; diff --git a/Content.Server/UserInterface/IntrinsicUISystem.cs b/Content.Server/UserInterface/IntrinsicUISystem.cs index 27b682cd41..fa725e524a 100644 --- a/Content.Server/UserInterface/IntrinsicUISystem.cs +++ b/Content.Server/UserInterface/IntrinsicUISystem.cs @@ -1,6 +1,7 @@ using Content.Server.Actions; using Content.Shared.UserInterface; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.UserInterface; diff --git a/Content.Server/UserInterface/StatValuesCommand.cs b/Content.Server/UserInterface/StatValuesCommand.cs index b13b596323..fe2ee380fe 100644 --- a/Content.Server/UserInterface/StatValuesCommand.cs +++ b/Content.Server/UserInterface/StatValuesCommand.cs @@ -8,7 +8,6 @@ using Content.Shared.Materials; using Content.Shared.Research.Prototypes; using Content.Shared.UserInterface; using Content.Shared.Weapons.Melee; -using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Prototypes; @@ -27,7 +26,7 @@ public sealed class StatValuesCommand : IConsoleCommand public string Help => $"{Command} "; public void Execute(IConsoleShell shell, string argStr, string[] args) { - if (shell.Player is not IPlayerSession pSession) + if (shell.Player is not { } pSession) { shell.WriteError(Loc.GetString("stat-values-server")); return; diff --git a/Content.Server/Verbs/VerbSystem.cs b/Content.Server/Verbs/VerbSystem.cs index 6d12b08e86..e304c6b4af 100644 --- a/Content.Server/Verbs/VerbSystem.cs +++ b/Content.Server/Verbs/VerbSystem.cs @@ -6,7 +6,6 @@ using Content.Shared.Administration.Logs; using Content.Shared.Database; using Content.Shared.Hands.Components; using Content.Shared.Verbs; -using Robust.Server.Player; namespace Content.Server.Verbs { @@ -25,7 +24,7 @@ namespace Content.Server.Verbs private void HandleVerbRequest(RequestServerVerbsEvent args, EntitySessionEventArgs eventArgs) { - var player = (IPlayerSession) eventArgs.SenderSession; + var player = eventArgs.SenderSession; if (!EntityManager.EntityExists(GetEntity(args.EntityUid))) { @@ -43,7 +42,7 @@ namespace Content.Server.Verbs // this, and some verbs (e.g. view variables) won't even care about whether an entity is accessible through // the entity menu or not. - var force = args.AdminRequest && eventArgs.SenderSession is IPlayerSession playerSession && + var force = args.AdminRequest && eventArgs.SenderSession is { } playerSession && _adminMgr.HasAdminFlag(playerSession, AdminFlags.Admin); List verbTypes = new(); diff --git a/Content.Server/VoiceMask/VoiceMaskSystem.cs b/Content.Server/VoiceMask/VoiceMaskSystem.cs index fdd5f3a9f4..1df66b608c 100644 --- a/Content.Server/VoiceMask/VoiceMaskSystem.cs +++ b/Content.Server/VoiceMask/VoiceMaskSystem.cs @@ -6,6 +6,7 @@ using Content.Shared.Inventory.Events; using Content.Shared.Preferences; using Content.Shared.VoiceMask; using Robust.Server.GameObjects; +using Robust.Shared.Player; namespace Content.Server.VoiceMask; diff --git a/Content.Server/Voting/IVoteHandle.cs b/Content.Server/Voting/IVoteHandle.cs index 13f64e6ef8..869f2017d7 100644 --- a/Content.Server/Voting/IVoteHandle.cs +++ b/Content.Server/Voting/IVoteHandle.cs @@ -1,5 +1,5 @@ using Content.Server.Voting.Managers; -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Voting { @@ -75,7 +75,7 @@ namespace Content.Server.Voting /// /// is not a valid option ID. /// - void CastVote(IPlayerSession session, int? optionId); + void CastVote(ICommonSession session, int? optionId); /// /// Cancel this vote. diff --git a/Content.Server/Voting/Managers/IVoteManager.cs b/Content.Server/Voting/Managers/IVoteManager.cs index 6a92e70fff..d95fac9ae9 100644 --- a/Content.Server/Voting/Managers/IVoteManager.cs +++ b/Content.Server/Voting/Managers/IVoteManager.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; using Content.Shared.Voting; -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Voting.Managers { @@ -41,7 +41,7 @@ namespace Content.Server.Voting.Managers /// True if can start votes right now, /// and if provided if they can start votes of type . /// - bool CanCallVote(IPlayerSession initiator, StandardVoteType? voteType = null); + bool CanCallVote(ICommonSession initiator, StandardVoteType? voteType = null); /// /// Initiate a standard vote such as restart round, that can be initiated by players. @@ -51,7 +51,7 @@ namespace Content.Server.Voting.Managers /// If null it is assumed to be an automatic vote by the server. /// /// The type of standard vote to make. - void CreateStandardVote(IPlayerSession? initiator, StandardVoteType voteType); + void CreateStandardVote(ICommonSession? initiator, StandardVoteType voteType); /// /// Create a non-standard vote with special parameters. diff --git a/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs b/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs index 55e88e2a8c..e1bffa769d 100644 --- a/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs +++ b/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs @@ -6,8 +6,8 @@ using Content.Server.RoundEnd; using Content.Shared.CCVar; using Content.Shared.Database; using Content.Shared.Voting; -using Robust.Server.Player; using Robust.Shared.Configuration; +using Robust.Shared.Player; using Robust.Shared.Random; namespace Content.Server.Voting.Managers @@ -21,7 +21,7 @@ namespace Content.Server.Voting.Managers {StandardVoteType.Map, CCVars.VoteMapEnabled}, }; - public void CreateStandardVote(IPlayerSession? initiator, StandardVoteType voteType) + public void CreateStandardVote(ICommonSession? initiator, StandardVoteType voteType) { if (initiator != null) _adminLogger.Add(LogType.Vote, LogImpact.Medium, $"{initiator} initiated a {voteType.ToString()} vote"); @@ -47,7 +47,7 @@ namespace Content.Server.Voting.Managers TimeoutStandardVote(voteType); } - private void CreateRestartVote(IPlayerSession? initiator) + private void CreateRestartVote(ICommonSession? initiator) { var alone = _playerManager.PlayerCount == 1 && initiator != null; var options = new VoteOptions @@ -100,7 +100,7 @@ namespace Content.Server.Voting.Managers vote.CastVote(initiator, 0); } - foreach (var player in _playerManager.ServerSessions) + foreach (var player in _playerManager.Sessions) { if (player != initiator) { @@ -110,7 +110,7 @@ namespace Content.Server.Voting.Managers } } - private void CreatePresetVote(IPlayerSession? initiator) + private void CreatePresetVote(ICommonSession? initiator) { var presets = GetGamePresets(); @@ -156,7 +156,7 @@ namespace Content.Server.Voting.Managers }; } - private void CreateMapVote(IPlayerSession? initiator) + private void CreateMapVote(ICommonSession? initiator) { var maps = _gameMapManager.CurrentlyEligibleMaps().ToDictionary(map => map, map => map.MapName); diff --git a/Content.Server/Voting/Managers/VoteManager.cs b/Content.Server/Voting/Managers/VoteManager.cs index 98ad8d8341..90089afb54 100644 --- a/Content.Server/Voting/Managers/VoteManager.cs +++ b/Content.Server/Voting/Managers/VoteManager.cs @@ -16,6 +16,7 @@ using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Enums; using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Timing; @@ -45,7 +46,7 @@ namespace Content.Server.Voting.Managers private readonly Dictionary _standardVoteTimeout = new(); private readonly Dictionary _voteTimeout = new(); - private readonly HashSet _playerCanCallVoteDirty = new(); + private readonly HashSet _playerCanCallVoteDirty = new(); private readonly StandardVoteType[] _standardVoteTypeValues = Enum.GetValues(); public void Initialize() @@ -106,7 +107,7 @@ namespace Content.Server.Voting.Managers } } - private void CastVote(VoteReg v, IPlayerSession player, int? option) + private void CastVote(VoteReg v, ICommonSession player, int? option) { if (!IsValidOption(v, option)) throw new ArgumentOutOfRangeException(nameof(option), "Invalid vote option ID"); @@ -228,7 +229,7 @@ namespace Content.Server.Voting.Managers private void SendUpdates(VoteReg v) { - foreach (var player in _playerManager.ServerSessions) + foreach (var player in _playerManager.Sessions) { SendSingleUpdate(v, player); } @@ -237,7 +238,7 @@ namespace Content.Server.Voting.Managers v.Dirty = false; } - private void SendSingleUpdate(VoteReg v, IPlayerSession player) + private void SendSingleUpdate(VoteReg v, ICommonSession player) { var msg = new MsgVoteData(); @@ -277,10 +278,10 @@ namespace Content.Server.Voting.Managers private void DirtyCanCallVoteAll() { - _playerCanCallVoteDirty.UnionWith(_playerManager.ServerSessions); + _playerCanCallVoteDirty.UnionWith(_playerManager.Sessions); } - private void SendUpdateCanCallVote(IPlayerSession player) + private void SendUpdateCanCallVote(ICommonSession player) { var msg = new MsgVoteCanCall(); msg.CanCall = CanCallVote(player, null, out var isAdmin, out var timeSpan); @@ -306,7 +307,7 @@ namespace Content.Server.Voting.Managers } private bool CanCallVote( - IPlayerSession initiator, + ICommonSession initiator, StandardVoteType? voteType, out bool isAdmin, out TimeSpan timeSpan) @@ -353,7 +354,7 @@ namespace Content.Server.Voting.Managers return !_voteTimeout.TryGetValue(initiator.UserId, out timeSpan); } - public bool CanCallVote(IPlayerSession initiator, StandardVoteType? voteType = null) + public bool CanCallVote(ICommonSession initiator, StandardVoteType? voteType = null) { return CanCallVote(initiator, voteType, out _, out _); } @@ -406,14 +407,14 @@ namespace Content.Server.Voting.Managers return false; } - private void DirtyCanCallVote(IPlayerSession player) + private void DirtyCanCallVote(ICommonSession player) { _playerCanCallVoteDirty.Add(player); } #region Preset Votes - private void WirePresetVoteInitiator(VoteOptions options, IPlayerSession? player) + private void WirePresetVoteInitiator(VoteOptions options, ICommonSession? player) { if (player != null) { @@ -432,13 +433,13 @@ namespace Content.Server.Voting.Managers private sealed class VoteReg { public readonly int Id; - public readonly Dictionary CastVotes = new(); + public readonly Dictionary CastVotes = new(); public readonly VoteEntry[] Entries; public readonly string Title; public readonly string InitiatorText; public readonly TimeSpan StartTime; public readonly TimeSpan EndTime; - public readonly HashSet VotesDirty = new(); + public readonly HashSet VotesDirty = new(); public bool Cancelled; public bool Finished; @@ -446,10 +447,10 @@ namespace Content.Server.Voting.Managers public VoteFinishedEventHandler? OnFinished; public VoteCancelledEventHandler? OnCancelled; - public IPlayerSession? Initiator { get; } + public ICommonSession? Initiator { get; } public VoteReg(int id, VoteEntry[] entries, string title, string initiatorText, - IPlayerSession? initiator, TimeSpan start, TimeSpan end) + ICommonSession? initiator, TimeSpan start, TimeSpan end) { Id = id; Entries = entries; @@ -517,7 +518,7 @@ namespace Content.Server.Voting.Managers return _mgr.IsValidOption(_reg, optionId); } - public void CastVote(IPlayerSession session, int? optionId) + public void CastVote(ICommonSession session, int? optionId) { _mgr.CastVote(_reg, session, optionId); } diff --git a/Content.Server/Voting/VoteCommands.cs b/Content.Server/Voting/VoteCommands.cs index cb296a7d58..498c9d0494 100644 --- a/Content.Server/Voting/VoteCommands.cs +++ b/Content.Server/Voting/VoteCommands.cs @@ -6,7 +6,6 @@ using Content.Server.Voting.Managers; using Content.Shared.Administration; using Content.Shared.Database; using Content.Shared.Voting; -using Robust.Server.Player; using Robust.Shared.Console; namespace Content.Server.Voting @@ -36,14 +35,14 @@ namespace Content.Server.Voting var mgr = IoCManager.Resolve(); - if (shell.Player != null && !mgr.CanCallVote((IPlayerSession) shell.Player, type)) + if (shell.Player != null && !mgr.CanCallVote(shell.Player, type)) { _adminLogger.Add(LogType.Vote, LogImpact.Medium, $"{shell.Player} failed to start {type.ToString()} vote"); shell.WriteError(Loc.GetString("cmd-createvote-cannot-call-vote-now")); return; } - mgr.CreateStandardVote((IPlayerSession?) shell.Player, type); + mgr.CreateStandardVote(shell.Player, type); } public CompletionResult GetCompletion(IConsoleShell shell, string[] args) @@ -92,7 +91,7 @@ namespace Content.Server.Voting options.Options.Add((args[i], i)); } - options.SetInitiatorOrServer((IPlayerSession?) shell.Player); + options.SetInitiatorOrServer(shell.Player); if (shell.Player != null) _adminLogger.Add(LogType.Vote, LogImpact.Medium, $"{shell.Player} initiated a custom vote: {options.Title} - {string.Join("; ", options.Options.Select(x => x.text))}"); @@ -187,7 +186,7 @@ namespace Content.Server.Voting return; } - vote.CastVote((IPlayerSession) shell.Player!, optionN); + vote.CastVote(shell.Player!, optionN); } } diff --git a/Content.Server/Voting/VoteOptions.cs b/Content.Server/Voting/VoteOptions.cs index 6e6d0465ed..5475d10d32 100644 --- a/Content.Server/Voting/VoteOptions.cs +++ b/Content.Server/Voting/VoteOptions.cs @@ -1,4 +1,4 @@ -using Robust.Server.Player; +using Robust.Shared.Player; namespace Content.Server.Voting @@ -16,7 +16,7 @@ namespace Content.Server.Voting /// /// The player that started the vote. Used to keep track of player cooldowns to avoid vote spam. /// - public IPlayerSession? InitiatorPlayer { get; set; } + public ICommonSession? InitiatorPlayer { get; set; } /// /// The shown title of the vote. @@ -43,13 +43,13 @@ namespace Content.Server.Voting /// Sets and /// by setting the latter to the player's name. /// - public void SetInitiator(IPlayerSession player) + public void SetInitiator(ICommonSession player) { InitiatorPlayer = player; InitiatorText = player.Name; } - public void SetInitiatorOrServer(IPlayerSession? player) + public void SetInitiatorOrServer(ICommonSession? player) { if (player != null) { diff --git a/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs b/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs index 1b6b2ebef1..3d9c3e8219 100644 --- a/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs +++ b/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs @@ -24,11 +24,9 @@ using Content.Shared.StatusEffect; using Content.Shared.Tag; using Content.Shared.Weapons.Melee; using Content.Shared.Weapons.Melee.Events; -using Robust.Server.Player; using Robust.Shared.Audio; using Robust.Shared.Map; using Robust.Shared.Player; -using Robust.Shared.Players; using Robust.Shared.Random; namespace Content.Server.Weapons.Melee; @@ -174,7 +172,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem EntityCoordinates targetCoordinates; Angle targetLocalAngle; - if (session is IPlayerSession pSession) + if (session is { } pSession) { (targetCoordinates, targetLocalAngle) = _lag.GetCoordinatesAngle(target, pSession); } diff --git a/Content.Server/Wires/WiresSystem.cs b/Content.Server/Wires/WiresSystem.cs index e75ad0a9ef..b6452efa8a 100644 --- a/Content.Server/Wires/WiresSystem.cs +++ b/Content.Server/Wires/WiresSystem.cs @@ -16,7 +16,7 @@ using Content.Shared.Tools; using Content.Shared.Tools.Components; using Content.Shared.Wires; using Robust.Server.GameObjects; -using Robust.Server.Player; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using SharedToolSystem = Content.Shared.Tools.Systems.SharedToolSystem; @@ -616,7 +616,7 @@ public sealed class WiresSystem : SharedWiresSystem wires.WireSeed), ui: ui); } - public void OpenUserInterface(EntityUid uid, IPlayerSession player) + public void OpenUserInterface(EntityUid uid, ICommonSession player) { if (_uiSystem.TryGetUi(uid, WiresUiKey.Key, out var ui)) _uiSystem.OpenUi(ui, player); diff --git a/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs b/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs index 53c8b2fc23..17901188d1 100644 --- a/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs +++ b/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs @@ -17,7 +17,6 @@ using Content.Shared.Xenoarchaeology.Equipment; using Content.Shared.Xenoarchaeology.XenoArtifacts; using JetBrains.Annotations; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Audio; using Robust.Shared.Prototypes; using Robust.Shared.Timing; @@ -231,7 +230,7 @@ public sealed class ArtifactAnalyzerSystem : EntitySystem /// private void OnServerSelectionMessage(EntityUid uid, AnalysisConsoleComponent component, AnalysisConsoleServerSelectionMessage args) { - _ui.TryOpen(uid, ResearchClientUiKey.Key, (IPlayerSession) args.Session); + _ui.TryOpen(uid, ResearchClientUiKey.Key, args.Session); } /// diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/FoamArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/FoamArtifactSystem.cs index 93d9d5a01b..2d2c230b12 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/FoamArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/FoamArtifactSystem.cs @@ -1,5 +1,4 @@ using System.Linq; -using Content.Server.Chemistry.Components; using Content.Server.Fluids.EntitySystems; using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; using Content.Server.Xenoarchaeology.XenoArtifacts.Events; @@ -38,8 +37,7 @@ public sealed class FoamArtifactSystem : EntitySystem var range = (int) MathF.Round(MathHelper.Lerp(component.MinFoamAmount, component.MaxFoamAmount, _random.NextFloat(0, 1f))); sol.AddReagent(component.SelectedReagent, component.ReagentAmount); var foamEnt = Spawn("Foam", xform.Coordinates); - var smoke = EnsureComp(foamEnt); - smoke.SpreadAmount = range * 4; - _smoke.Start(foamEnt, smoke, sol, component.Duration); + var spreadAmount = range * 4; + _smoke.StartSmoke(foamEnt, sol, component.Duration, spreadAmount); } } diff --git a/Content.Server/Zombies/ZombieSystem.cs b/Content.Server/Zombies/ZombieSystem.cs index 1f8f5fbd42..51cbf34d99 100644 --- a/Content.Server/Zombies/ZombieSystem.cs +++ b/Content.Server/Zombies/ZombieSystem.cs @@ -8,6 +8,7 @@ using Content.Server.Emoting.Systems; using Content.Server.Inventory; using Content.Server.Speech.EntitySystems; using Content.Shared.Bed.Sleep; +using Content.Shared.Cloning; using Content.Shared.Damage; using Content.Shared.Humanoid; using Content.Shared.Inventory; diff --git a/Content.Shared/Actions/ActionContainerSystem.cs b/Content.Shared/Actions/ActionContainerSystem.cs index 86d50e3989..d7c02ffd63 100644 --- a/Content.Shared/Actions/ActionContainerSystem.cs +++ b/Content.Shared/Actions/ActionContainerSystem.cs @@ -213,6 +213,9 @@ public sealed class ActionContainerSystem : EntitySystem private void OnShutdown(EntityUid uid, ActionsContainerComponent component, ComponentShutdown args) { + if (_timing.ApplyingState && component.NetSyncEnabled) + return; // The game state should handle the container removal & action deletion. + component.Container.Shutdown(); } diff --git a/Content.Shared/Actions/SharedActionsSystem.cs b/Content.Shared/Actions/SharedActionsSystem.cs index 00a17ace25..7384ab30b1 100644 --- a/Content.Shared/Actions/SharedActionsSystem.cs +++ b/Content.Shared/Actions/SharedActionsSystem.cs @@ -36,6 +36,8 @@ public abstract class SharedActionsSystem : EntitySystem SubscribeLocalEvent(OnDidUnequip); SubscribeLocalEvent(OnHandUnequipped); + SubscribeLocalEvent(OnShutdown); + SubscribeLocalEvent(OnActionsGetState); SubscribeLocalEvent(OnInstantGetState); @@ -49,6 +51,14 @@ public abstract class SharedActionsSystem : EntitySystem SubscribeAllEvent(OnActionRequest); } + private void OnShutdown(EntityUid uid, ActionsComponent component, ComponentShutdown args) + { + foreach (var act in component.Actions) + { + RemoveAction(uid, act, component); + } + } + private void OnInstantGetState(EntityUid uid, InstantActionComponent component, ref ComponentGetState args) { args.State = new InstantActionComponentState(component, EntityManager); @@ -611,7 +621,10 @@ public abstract class SharedActionsSystem : EntitySystem if (action.AttachedEntity != performer) { - Log.Error($"Attempted to remove an action {ToPrettyString(actionId)} from an entity that it was never attached to: {ToPrettyString(performer)}"); + DebugTools.Assert(!Resolve(performer, ref comp, false) || !comp.Actions.Contains(actionId.Value)); + + if (!GameTiming.ApplyingState) + Log.Error($"Attempted to remove an action {ToPrettyString(actionId)} from an entity that it was never attached to: {ToPrettyString(performer)}"); return; } diff --git a/Content.Shared/Administration/Managers/ISharedAdminManager.cs b/Content.Shared/Administration/Managers/ISharedAdminManager.cs index 7e01c81433..22d918d4a3 100644 --- a/Content.Shared/Administration/Managers/ISharedAdminManager.cs +++ b/Content.Shared/Administration/Managers/ISharedAdminManager.cs @@ -1,4 +1,4 @@ -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Shared.Administration.Managers; diff --git a/Content.Shared/Buckle/SharedBuckleSystem.cs b/Content.Shared/Buckle/SharedBuckleSystem.cs index 7edf2448ae..1441745b5d 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.cs @@ -11,7 +11,7 @@ using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Network; using Robust.Shared.Physics.Systems; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Timing; namespace Content.Shared.Buckle; diff --git a/Content.Shared/Chemistry/Components/SmokeAffectedComponent.cs b/Content.Shared/Chemistry/Components/SmokeAffectedComponent.cs new file mode 100644 index 0000000000..def6940ee1 --- /dev/null +++ b/Content.Shared/Chemistry/Components/SmokeAffectedComponent.cs @@ -0,0 +1,24 @@ +using Robust.Shared.GameStates; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; + +namespace Content.Shared.Chemistry.Components; + +/// +/// This is used for entities which are currently being affected by smoke. +/// Manages the gradual metabolism every second. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class SmokeAffectedComponent : Component +{ + /// + /// The time at which the next smoke metabolism will occur. + /// + [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] + public TimeSpan NextSecond; + + /// + /// The smoke that is currently affecting this entity. + /// + [DataField] + public EntityUid SmokeEntity; +} diff --git a/Content.Shared/Chemistry/Components/SmokeComponent.cs b/Content.Shared/Chemistry/Components/SmokeComponent.cs new file mode 100644 index 0000000000..9d88fcac94 --- /dev/null +++ b/Content.Shared/Chemistry/Components/SmokeComponent.cs @@ -0,0 +1,34 @@ +using Content.Shared.FixedPoint; +using Content.Shared.Fluids.Components; +using Robust.Shared.GameStates; + +namespace Content.Shared.Chemistry.Components; + +/// +/// Stores solution on an anchored entity that has touch and ingestion reactions +/// to entities that collide with it. Similar to +/// +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] +public sealed partial class SmokeComponent : Component +{ + public const string SolutionName = "solutionArea"; + + /// + /// The max amount of tiles this smoke cloud can spread to. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public int SpreadAmount; + + /// + /// The max rate at which chemicals are transferred from the smoke to the person inhaling it. + /// Calculated as (total volume of chemicals in smoke) / () + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public FixedPoint2 TransferRate; + + /// + /// The total lifespan of the smoke. + /// + [DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] + public float Duration = 10; +} diff --git a/Content.Shared/Chemistry/EntitySystems/SolutionContainerSystem.cs b/Content.Shared/Chemistry/EntitySystems/SolutionContainerSystem.cs index d4c599557b..a5c35b5e6c 100644 --- a/Content.Shared/Chemistry/EntitySystems/SolutionContainerSystem.cs +++ b/Content.Shared/Chemistry/EntitySystems/SolutionContainerSystem.cs @@ -30,6 +30,24 @@ public sealed class SolutionChangedEvent : EntityEventArgs } } +/// +/// An event raised when more reagents are added to a (managed) solution than it can hold. +/// +[ByRefEvent] +public record struct SolutionOverflowEvent(EntityUid SolutionEnt, Solution SolutionHolder, Solution Overflow) +{ + /// The entity which contains the solution that has overflowed. + public readonly EntityUid SolutionEnt = SolutionEnt; + /// The solution that has overflowed. + public readonly Solution SolutionHolder = SolutionHolder; + /// The reagents that have overflowed the solution. + public readonly Solution Overflow = Overflow; + /// The volume by which the solution has overflowed. + public readonly FixedPoint2 OverflowVol = Overflow.Volume; + /// Whether some subscriber has taken care of the effects of the overflow. + public bool Handled = false; +} + /// /// Part of Chemistry system deal with SolutionContainers /// @@ -265,6 +283,14 @@ public sealed partial class SolutionContainerSystem : EntitySystem _chemistrySystem.FullyReactSolution(solutionHolder, uid, solutionHolder.MaxVolume, mixerComponent); } + var overflowVol = solutionHolder.Volume - solutionHolder.MaxVolume; + if (overflowVol > FixedPoint2.Zero) + { + var overflow = solutionHolder.SplitSolution(overflowVol); + var overflowEv = new SolutionOverflowEvent(uid, solutionHolder, overflow); + RaiseLocalEvent(uid, ref overflowEv); + } + UpdateAppearance(uid, solutionHolder); RaiseLocalEvent(uid, new SolutionChangedEvent(solutionHolder, solutionHolder.Name)); } @@ -417,24 +443,6 @@ public sealed partial class SolutionContainerSystem : EntitySystem return RemoveReagent(targetUid, container, new ReagentQuantity(reagentId, quantity)); } - /// - /// Adds a solution to the container, if it can fully fit. - /// - /// entity holding targetSolution - /// entity holding targetSolution - /// solution being added - /// If the solution could be added. - public bool TryAddSolution(EntityUid targetUid, Solution? targetSolution, Solution addedSolution) - { - if (targetSolution == null - || !targetSolution.CanAddSolution(addedSolution) || addedSolution.Volume == 0) - return false; - - targetSolution.AddSolution(addedSolution, _prototypeManager); - UpdateChemicals(targetUid, targetSolution, true); - return true; - } - /// /// Moves some quantity of a solution from one solution to another. /// @@ -497,32 +505,86 @@ public sealed partial class SolutionContainerSystem : EntitySystem } /// - /// Adds a solution to the container, overflowing the rest. - /// It will - /// Unlike it will ignore size limits. + /// Adds a solution to the container, if it can fully fit. /// /// entity holding targetSolution - /// The container to which we try to add. - /// solution being added - /// After addition this much will be left in targetSolution. Should be less - /// than targetSolution.TotalVolume + /// entity holding targetSolution + /// solution being added + /// If the solution could be added. + public bool TryAddSolution(EntityUid targetUid, Solution targetSolution, Solution toAdd) + { + if (toAdd.Volume == FixedPoint2.Zero) + return true; + if (toAdd.Volume > targetSolution.AvailableVolume) + return false; + + ForceAddSolution(targetUid, targetSolution, toAdd); + return true; + } + + /// + /// Adds as much of a solution to a container as can fit. + /// + /// The entity containing + /// The solution being added to. + /// The solution being added to + /// The quantity of the solution actually added. + public FixedPoint2 AddSolution(EntityUid targetUid, Solution targetSolution, Solution toAdd) + { + if (toAdd.Volume == FixedPoint2.Zero) + return FixedPoint2.Zero; + + var quantity = FixedPoint2.Max(FixedPoint2.Zero, FixedPoint2.Min(toAdd.Volume, targetSolution.AvailableVolume)); + if (quantity < toAdd.Volume) + TryTransferSolution(targetUid, targetSolution, toAdd, quantity); + else + ForceAddSolution(targetUid, targetSolution, toAdd); + + return quantity; + } + + /// + /// Adds a solution to a container and updates the container. + /// + /// The entity containing + /// The solution being added to. + /// The solution being added to + /// Whether any reagents were added to the solution. + public bool ForceAddSolution(EntityUid targetUid, Solution targetSolution, Solution toAdd) + { + if (toAdd.Volume == FixedPoint2.Zero) + return false; + + targetSolution.AddSolution(toAdd, _prototypeManager); + UpdateChemicals(targetUid, targetSolution, needsReactionsProcessing: true); + return true; + } + + /// + /// Adds a solution to the container, removing the overflow. + /// Unlike it will ignore size limits. + /// + /// The entity containing + /// The solution being added to. + /// The solution being added to + /// The combined volume above which the overflow will be returned. + /// If the combined volume is below this an empty solution is returned. /// Solution that exceeded overflowThreshold - /// + /// Whether any reagents were added to . public bool TryMixAndOverflow(EntityUid targetUid, Solution targetSolution, - Solution addedSolution, + Solution toAdd, FixedPoint2 overflowThreshold, [NotNullWhen(true)] out Solution? overflowingSolution) { - if (addedSolution.Volume == 0 || overflowThreshold > targetSolution.MaxVolume) + if (toAdd.Volume == 0 || overflowThreshold > targetSolution.MaxVolume) { overflowingSolution = null; return false; } - targetSolution.AddSolution(addedSolution, _prototypeManager); + targetSolution.AddSolution(toAdd, _prototypeManager); + overflowingSolution = targetSolution.SplitSolution(FixedPoint2.Max(FixedPoint2.Zero, targetSolution.Volume - overflowThreshold)); UpdateChemicals(targetUid, targetSolution, true); - overflowingSolution = targetSolution.SplitSolution(FixedPoint2.Max(FixedPoint2.Zero, - targetSolution.Volume - overflowThreshold)); return true; } @@ -778,4 +840,8 @@ public sealed partial class SolutionContainerSystem : EntitySystem } #endregion Thermal Energy and Temperature + + #region Event Handlers + + #endregion Event Handlers } diff --git a/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs b/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs index 4ec50bc61a..ed53b78466 100644 --- a/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs +++ b/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs @@ -262,12 +262,6 @@ namespace Content.Shared.Chemistry.Reaction if (products.Count == 0) return true; - // remove excess product - // TODO spill excess? - var excessVolume = solution.Volume - maxVolume; - if (excessVolume > 0) - solution.RemoveSolution(excessVolume); - // Add any reactions associated with the new products. This may re-add reactions that were already iterated // over previously. The new product may mean the reactions are applicable again and need to be processed. foreach (var product in products) @@ -279,16 +273,10 @@ namespace Content.Shared.Chemistry.Reaction return true; } - /// - /// Continually react a solution until no more reactions occur. - /// - public void FullyReactSolution(Solution solution, EntityUid owner) => FullyReactSolution(solution, owner, FixedPoint2.MaxValue, null); - /// /// Continually react a solution until no more reactions occur, with a volume constraint. - /// If a reaction's products would exceed the max volume, some product is deleted. /// - public void FullyReactSolution(Solution solution, EntityUid owner, FixedPoint2 maxVolume, ReactionMixerComponent? mixerComponent) + public void FullyReactSolution(Solution solution, EntityUid owner, FixedPoint2 maxVolume, ReactionMixerComponent? mixerComponent = null) { // construct the initial set of reactions to check. SortedSet reactions = new(); diff --git a/Content.Shared/Cloning/CloningPodComponent.cs b/Content.Shared/Cloning/CloningPodComponent.cs new file mode 100644 index 0000000000..60d4c1e64e --- /dev/null +++ b/Content.Shared/Cloning/CloningPodComponent.cs @@ -0,0 +1,142 @@ +using Content.Shared.Construction.Prototypes; +using Content.Shared.DeviceLinking; +using Content.Shared.Materials; +using Robust.Shared.Audio; +using Robust.Shared.Containers; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; + +namespace Content.Shared.Cloning; + +[RegisterComponent] +public sealed partial class CloningPodComponent : Component +{ + [ValidatePrototypeId] + public const string PodPort = "CloningPodReceiver"; + + [ViewVariables] + public ContainerSlot BodyContainer = default!; + + /// + /// How long the cloning has been going on for. + /// + [ViewVariables] + public float CloningProgress = 0; + + [ViewVariables] + public int UsedBiomass = 70; + + [ViewVariables] + public bool FailedClone = false; + + /// + /// The material that is used to clone entities. + /// + [DataField("requiredMaterial"), ViewVariables(VVAccess.ReadWrite)] + public ProtoId RequiredMaterial = "Biomass"; + + /// + /// The base amount of time it takes to clone a body + /// + [DataField("baseCloningTime")] + public float BaseCloningTime = 30f; + + /// + /// The multiplier for cloning duration + /// + [DataField("partRatingSpeedMultiplier")] + public float PartRatingSpeedMultiplier = 0.75f; + + /// + /// The machine part that affects cloning speed + /// + [DataField("machinePartCloningSpeed"), ViewVariables(VVAccess.ReadWrite)] + public ProtoId MachinePartCloningSpeed = "Manipulator"; + + /// + /// The current amount of time it takes to clone a body + /// + [ViewVariables(VVAccess.ReadWrite)] + public float CloningTime = 30f; + + /// + /// The mob to spawn on emag + /// + [DataField("mobSpawnId"), ViewVariables(VVAccess.ReadWrite)] + public EntProtoId MobSpawnId = "MobAbomination"; + + /// + /// Emag sound effects. + /// + [DataField("sparkSound")] + public SoundSpecifier SparkSound = new SoundCollectionSpecifier("sparks") + { + Params = AudioParams.Default.WithVolume(8), + }; + + // TODO: Remove this from here when cloning and/or zombies are refactored + [DataField("screamSound")] + public SoundSpecifier ScreamSound = new SoundCollectionSpecifier("ZombieScreams") + { + Params = AudioParams.Default.WithVolume(4), + }; + + /// + /// The machine part that affects how much biomass is needed to clone a body. + /// + [DataField("partRatingMaterialMultiplier")] + public float PartRatingMaterialMultiplier = 0.85f; + + /// + /// The current multiplier on the body weight, which determines the + /// amount of biomass needed to clone. + /// + [ViewVariables(VVAccess.ReadWrite)] + public float BiomassRequirementMultiplier = 1; + + /// + /// The machine part that decreases the amount of material needed for cloning + /// + [DataField("machinePartMaterialUse"), ViewVariables(VVAccess.ReadWrite)] + public ProtoId MachinePartMaterialUse = "MatterBin"; + + [ViewVariables(VVAccess.ReadWrite)] + public CloningPodStatus Status; + + [ViewVariables] + public EntityUid? ConnectedConsole; +} + +[Serializable, NetSerializable] +public enum CloningPodVisuals : byte +{ + Status +} + +[Serializable, NetSerializable] +public enum CloningPodStatus : byte +{ + Idle, + Cloning, + Gore, + NoMind +} + +/// +/// Raised after a new mob got spawned when cloning a humanoid +/// +[ByRefEvent] +public struct CloningEvent +{ + public bool NameHandled = false; + + public readonly EntityUid Source; + public readonly EntityUid Target; + + public CloningEvent(EntityUid source, EntityUid target) + { + Source = source; + Target = target; + } +} diff --git a/Content.Shared/Cloning/SharedCloningPodComponent.cs b/Content.Shared/Cloning/SharedCloningPodComponent.cs deleted file mode 100644 index aafbb597ed..0000000000 --- a/Content.Shared/Cloning/SharedCloningPodComponent.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Robust.Shared.Serialization; - -namespace Content.Shared.Cloning -{ - [Serializable, NetSerializable] - public enum CloningPodVisuals : byte - { - Status - } - [Serializable, NetSerializable] - public enum CloningPodStatus : byte - { - Idle, - Cloning, - Gore, - NoMind - } -} diff --git a/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs b/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs index effba18210..9310617634 100644 --- a/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs +++ b/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs @@ -71,6 +71,9 @@ namespace Content.Shared.Containers.ItemSlots [DataField("whitelist")] public EntityWhitelist? Whitelist; + [DataField("blacklist")] + public EntityWhitelist? Blacklist; + [DataField("insertSound")] public SoundSpecifier InsertSound = new SoundPathSpecifier("/Audio/Weapons/Guns/MagIn/revolver_magin.ogg"); diff --git a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs index 902b56427a..9194a8208e 100644 --- a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs +++ b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs @@ -255,7 +255,7 @@ namespace Content.Shared.Containers.ItemSlots if (!swap && slot.HasItem) return false; - if (slot.Whitelist != null && !slot.Whitelist.IsValid(usedUid)) + if ((slot.Whitelist != null && !slot.Whitelist.IsValid(usedUid)) || (slot.Blacklist != null && slot.Blacklist.IsValid(usedUid))) { if (_netManager.IsClient && _timing.IsFirstTimePredicted && popup.HasValue && !string.IsNullOrWhiteSpace(slot.WhitelistFailPopup)) _popupSystem.PopupEntity(Loc.GetString(slot.WhitelistFailPopup), uid, popup.Value); diff --git a/Content.Shared/Doors/Systems/SharedDoorBoltSystem.cs b/Content.Shared/Doors/Systems/SharedDoorBoltSystem.cs index a950fe6930..a9a52010fd 100644 --- a/Content.Shared/Doors/Systems/SharedDoorBoltSystem.cs +++ b/Content.Shared/Doors/Systems/SharedDoorBoltSystem.cs @@ -23,11 +23,15 @@ public abstract class SharedDoorBoltSystem : EntitySystem private void OnDoorPry(EntityUid uid, DoorBoltComponent component, ref BeforePryEvent args) { - if (component.BoltsDown && !args.Force) - { - Popup.PopupEntity(Loc.GetString("airlock-component-cannot-pry-is-bolted-message"), uid, args.User); - args.Cancelled = true; - } + if (args.Cancelled) + return; + + if (!component.BoltsDown || args.Force) + return; + + args.Message = "airlock-component-cannot-pry-is-bolted-message"; + + args.Cancelled = true; } private void OnBeforeDoorOpened(EntityUid uid, DoorBoltComponent component, BeforeDoorOpenedEvent args) diff --git a/Content.Shared/Ensnaring/Components/EnsnaringComponent.cs b/Content.Shared/Ensnaring/Components/EnsnaringComponent.cs index e7d769d339..6e1f3077f3 100644 --- a/Content.Shared/Ensnaring/Components/EnsnaringComponent.cs +++ b/Content.Shared/Ensnaring/Components/EnsnaringComponent.cs @@ -36,6 +36,13 @@ public sealed partial class EnsnaringComponent : Component [DataField("sprintSpeed")] public float SprintSpeed = 0.9f; + /// + /// How much stamina does the ensnare sap + /// + [ViewVariables(VVAccess.ReadWrite)] + [DataField("staminaDamage")] + public float StaminaDamage = 55f; + /// /// Should this ensnare someone when thrown? /// diff --git a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Interactions.cs b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Interactions.cs index d0c3be3b31..dfa72fcfb7 100644 --- a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Interactions.cs +++ b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Interactions.cs @@ -6,7 +6,7 @@ using Content.Shared.Input; using Content.Shared.Localizations; using Robust.Shared.Input.Binding; using Robust.Shared.Map; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Shared.Hands.EntitySystems; diff --git a/Content.Shared/Implants/Components/ImplanterComponent.cs b/Content.Shared/Implants/Components/ImplanterComponent.cs index 85891826f9..32a3636163 100644 --- a/Content.Shared/Implants/Components/ImplanterComponent.cs +++ b/Content.Shared/Implants/Components/ImplanterComponent.cs @@ -1,4 +1,5 @@ using Content.Shared.Containers.ItemSlots; +using Content.Shared.Whitelist; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; @@ -15,6 +16,19 @@ public sealed partial class ImplanterComponent : Component public const string ImplanterSlotId = "implanter_slot"; public const string ImplantSlotId = "implant"; + /// + /// Whitelist to check entities against before implanting. + /// Implants get their own whitelist which is checked afterwards. + /// + [DataField, AutoNetworkedField] + public EntityWhitelist? Whitelist; + + /// + /// Blacklist to check entities against before implanting. + /// + [DataField, AutoNetworkedField] + public EntityWhitelist? Blacklist; + /// /// Used for implanters that start with specific implants /// diff --git a/Content.Shared/Implants/Components/SubdermalImplantComponent.cs b/Content.Shared/Implants/Components/SubdermalImplantComponent.cs index b2fdb14e4c..5edc26ead3 100644 --- a/Content.Shared/Implants/Components/SubdermalImplantComponent.cs +++ b/Content.Shared/Implants/Components/SubdermalImplantComponent.cs @@ -1,4 +1,5 @@ using Content.Shared.Actions; +using Content.Shared.Whitelist; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; @@ -34,6 +35,20 @@ public sealed partial class SubdermalImplantComponent : Component [ViewVariables(VVAccess.ReadWrite)] [DataField("permanent"), AutoNetworkedField] public bool Permanent = false; + + /// + /// Target whitelist for this implant specifically. + /// Only checked if the implanter allows implanting on the target to begin with. + /// + [DataField] + public EntityWhitelist? Whitelist; + + /// + /// Target blacklist for this implant specifically. + /// Only checked if the implanter allows implanting on the target to begin with. + /// + [DataField] + public EntityWhitelist? Blacklist; } /// diff --git a/Content.Shared/Implants/SharedImplanterSystem.cs b/Content.Shared/Implants/SharedImplanterSystem.cs index 1cf9f44663..404e6da508 100644 --- a/Content.Shared/Implants/SharedImplanterSystem.cs +++ b/Content.Shared/Implants/SharedImplanterSystem.cs @@ -6,6 +6,7 @@ using Content.Shared.Examine; using Content.Shared.IdentityManagement; using Content.Shared.Implants.Components; using Content.Shared.Popups; +using Content.Shared.Whitelist; using Robust.Shared.Containers; using Robust.Shared.Serialization; @@ -85,11 +86,23 @@ public abstract class SharedImplanterSystem : EntitySystem if (!TryComp(implant, out implantComp)) return false; + if (!CheckTarget(target, component.Whitelist, component.Blacklist) || + !CheckTarget(target, implantComp.Whitelist, implantComp.Blacklist)) + { + return false; + } + var ev = new AddImplantAttemptEvent(user, target, implant.Value, implanter); RaiseLocalEvent(target, ev); return !ev.Cancelled; } + protected bool CheckTarget(EntityUid target, EntityWhitelist? whitelist, EntityWhitelist? blacklist) + { + return whitelist?.IsValid(target, EntityManager) != false && + blacklist?.IsValid(target, EntityManager) != true; + } + //Draw the implant out of the target //TODO: Rework when surgery is in so implant cases can be a thing public void Draw(EntityUid implanter, EntityUid user, EntityUid target, ImplanterComponent component) diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index 4a9a43ca2c..7981deaee6 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -34,7 +34,7 @@ using Robust.Shared.Network; using Robust.Shared.Physics; using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Systems; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Serialization; using Robust.Shared.Timing; diff --git a/Content.Shared/Mind/MindComponent.cs b/Content.Shared/Mind/MindComponent.cs index 465db6a3d8..b147a2dbbe 100644 --- a/Content.Shared/Mind/MindComponent.cs +++ b/Content.Shared/Mind/MindComponent.cs @@ -2,7 +2,7 @@ using Content.Shared.Mind.Components; using Robust.Shared.GameStates; using Robust.Shared.Network; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Shared.Mind { diff --git a/Content.Shared/Mind/SharedMindSystem.cs b/Content.Shared/Mind/SharedMindSystem.cs index 6fc1c01dc2..8e72d9c741 100644 --- a/Content.Shared/Mind/SharedMindSystem.cs +++ b/Content.Shared/Mind/SharedMindSystem.cs @@ -13,7 +13,7 @@ using Content.Shared.Objectives.Systems; using Content.Shared.Players; using Robust.Shared.Map; using Robust.Shared.Network; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Shared.Mind; @@ -147,15 +147,16 @@ public abstract class SharedMindSystem : EntitySystem return; var dead = _mobState.IsDead(uid); + var hasUserId = CompOrNull(mindContainer.Mind)?.UserId; var hasSession = CompOrNull(mindContainer.Mind)?.Session; - if (dead && !mindContainer.HasMind) + if (dead && hasUserId == null) args.PushMarkup($"[color=mediumpurple]{Loc.GetString("comp-mind-examined-dead-and-irrecoverable", ("ent", uid))}[/color]"); else if (dead && hasSession == null) args.PushMarkup($"[color=yellow]{Loc.GetString("comp-mind-examined-dead-and-ssd", ("ent", uid))}[/color]"); else if (dead) args.PushMarkup($"[color=red]{Loc.GetString("comp-mind-examined-dead", ("ent", uid))}[/color]"); - else if (!mindContainer.HasMind) + else if (hasUserId == null) args.PushMarkup($"[color=mediumpurple]{Loc.GetString("comp-mind-examined-catatonic", ("ent", uid))}[/color]"); else if (hasSession == null) args.PushMarkup($"[color=yellow]{Loc.GetString("comp-mind-examined-ssd", ("ent", uid))}[/color]"); @@ -409,11 +410,11 @@ public abstract class SharedMindSystem : EntitySystem } public bool TryGetMind( - PlayerData player, + ContentPlayerData contentPlayer, out EntityUid mindId, [NotNullWhen(true)] out MindComponent? mind) { - mindId = player.Mind ?? default; + mindId = contentPlayer.Mind ?? default; return TryComp(mindId, out mind); } diff --git a/Content.Shared/Movement/Events/MoveInputEvent.cs b/Content.Shared/Movement/Events/MoveInputEvent.cs index 8e1b43f8bd..89e5636acd 100644 --- a/Content.Shared/Movement/Events/MoveInputEvent.cs +++ b/Content.Shared/Movement/Events/MoveInputEvent.cs @@ -1,5 +1,3 @@ -using Robust.Shared.Players; - namespace Content.Shared.Movement.Events; /// diff --git a/Content.Shared/Movement/Systems/SharedContentEyeSystem.cs b/Content.Shared/Movement/Systems/SharedContentEyeSystem.cs index 27e0080c87..4b81619fd0 100644 --- a/Content.Shared/Movement/Systems/SharedContentEyeSystem.cs +++ b/Content.Shared/Movement/Systems/SharedContentEyeSystem.cs @@ -5,7 +5,7 @@ using Content.Shared.Ghost; using Content.Shared.Input; using Content.Shared.Movement.Components; using Robust.Shared.Input.Binding; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Serialization; namespace Content.Shared.Movement.Systems; diff --git a/Content.Shared/Movement/Systems/SharedMoverController.Input.cs b/Content.Shared/Movement/Systems/SharedMoverController.Input.cs index 425322408e..1d323a9187 100644 --- a/Content.Shared/Movement/Systems/SharedMoverController.Input.cs +++ b/Content.Shared/Movement/Systems/SharedMoverController.Input.cs @@ -6,7 +6,7 @@ using Content.Shared.Movement.Components; using Content.Shared.Movement.Events; using Robust.Shared.Input; using Robust.Shared.Input.Binding; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Serialization; using Robust.Shared.Timing; using Robust.Shared.Utility; diff --git a/Content.Shared/Placeable/ItemPlacerSystem.cs b/Content.Shared/Placeable/ItemPlacerSystem.cs index 92dc8eb74b..ec6ece671f 100644 --- a/Content.Shared/Placeable/ItemPlacerSystem.cs +++ b/Content.Shared/Placeable/ItemPlacerSystem.cs @@ -9,6 +9,7 @@ namespace Content.Shared.Placeable; /// public sealed class ItemPlacerSystem : EntitySystem { + [Dependency] private readonly CollisionWakeSystem _wake = default!; [Dependency] private readonly PlaceableSurfaceSystem _placeableSurface = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!; @@ -25,8 +26,8 @@ public sealed class ItemPlacerSystem : EntitySystem if (comp.Whitelist != null && !comp.Whitelist.IsValid(args.OtherEntity)) return; - // Disallow sleeping so we can detect when entity is removed from the heater. - _physics.SetSleepingAllowed(args.OtherEntity, args.OtherBody, false); + if (TryComp(uid, out var wakeComp)) + _wake.SetEnabled(uid, false, wakeComp); var count = comp.PlacedEntities.Count; if (comp.MaxEntities == 0 || count < comp.MaxEntities) @@ -46,8 +47,8 @@ public sealed class ItemPlacerSystem : EntitySystem private void OnEndCollide(EntityUid uid, ItemPlacerComponent comp, ref EndCollideEvent args) { - // Re-allow sleeping. - _physics.SetSleepingAllowed(args.OtherEntity, args.OtherBody, true); + if (TryComp(uid, out var wakeComp)) + _wake.SetEnabled(uid, true, wakeComp); comp.PlacedEntities.Remove(args.OtherEntity); diff --git a/Content.Shared/Players/PlayerData.cs b/Content.Shared/Players/ContentPlayerData.cs similarity index 75% rename from Content.Shared/Players/PlayerData.cs rename to Content.Shared/Players/ContentPlayerData.cs index d94bef2e38..e207447987 100644 --- a/Content.Shared/Players/PlayerData.cs +++ b/Content.Shared/Players/ContentPlayerData.cs @@ -1,16 +1,15 @@ using Content.Shared.GameTicking; using Content.Shared.Mind; using Robust.Shared.Network; -using Robust.Shared.Player; namespace Content.Shared.Players; /// /// Content side for all data that tracks a player session. -/// Use to retrieve this from an . +/// Use to retrieve this from an . /// Not currently used on the client. /// -public sealed class PlayerData +public sealed class ContentPlayerData { /// /// The session ID of the player owning this data. @@ -44,21 +43,9 @@ public sealed class PlayerData [ViewVariables] public bool Whitelisted { get; set; } - public PlayerData(NetUserId userId, string name) + public ContentPlayerData(NetUserId userId, string name) { UserId = userId; Name = name; } } - - -public static class PlayerDataExt -{ - /// - /// Gets the correctly cast instance of content player data from an engine player data storage. - /// - public static PlayerData? ContentData(this IPlayerData data) - { - return (PlayerData?) data.ContentDataUncast; - } -} diff --git a/Content.Shared/Players/PlayerDataExt.cs b/Content.Shared/Players/PlayerDataExt.cs new file mode 100644 index 0000000000..eba4d8339d --- /dev/null +++ b/Content.Shared/Players/PlayerDataExt.cs @@ -0,0 +1,30 @@ +using Robust.Shared.Player; + +namespace Content.Shared.Players; + +public static class PlayerDataExt +{ + /// + /// Gets the correctly cast instance of content player data from an engine player data storage. + /// + public static ContentPlayerData? ContentData(this SessionData data) + { + return (ContentPlayerData?) data.ContentDataUncast; + } + + /// + /// Gets the correctly cast instance of content player data from an engine player data storage. + /// + public static ContentPlayerData? ContentData(this ICommonSession session) + { + return session.Data.ContentData(); + } + + /// + /// Gets the mind that is associated with this player. + /// + public static EntityUid? GetMind(this ICommonSession session) + { + return session.Data.ContentData()?.Mind; + } +} \ No newline at end of file diff --git a/Content.Shared/Players/SharedPlayerSystem.cs b/Content.Shared/Players/SharedPlayerSystem.cs index 6fc7ad6a40..7271c5688a 100644 --- a/Content.Shared/Players/SharedPlayerSystem.cs +++ b/Content.Shared/Players/SharedPlayerSystem.cs @@ -1,4 +1,4 @@ -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Shared.Players; @@ -8,5 +8,5 @@ namespace Content.Shared.Players; /// public abstract class SharedPlayerSystem : EntitySystem { - public abstract PlayerData? ContentData(ICommonSession? session); + public abstract ContentPlayerData? ContentData(ICommonSession? session); } diff --git a/Content.Shared/Popups/SharedPopupSystem.cs b/Content.Shared/Popups/SharedPopupSystem.cs index 50013a5435..e4565b90e8 100644 --- a/Content.Shared/Popups/SharedPopupSystem.cs +++ b/Content.Shared/Popups/SharedPopupSystem.cs @@ -1,6 +1,5 @@ using Robust.Shared.Map; using Robust.Shared.Player; -using Robust.Shared.Players; using Robust.Shared.Serialization; namespace Content.Shared.Popups diff --git a/Content.Shared/Power/Generator/PowerSwitchableComponent.cs b/Content.Shared/Power/Generator/PowerSwitchableComponent.cs new file mode 100644 index 0000000000..39118b21e5 --- /dev/null +++ b/Content.Shared/Power/Generator/PowerSwitchableComponent.cs @@ -0,0 +1,82 @@ +using Robust.Shared.Audio; +using Robust.Shared.GameStates; +using Robust.Shared.Serialization; + +namespace Content.Shared.Power.Generator; + +/// +/// Enables a device to switch between HV, MV and LV connectors. +/// For generators this means changing output wires. +/// +/// +/// Must have CableDeviceNodes for each output in . +/// If its a generator PowerSupplierComponent is also required. +/// +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] +[Access(typeof(SharedPowerSwitchableSystem))] +public sealed partial class PowerSwitchableComponent : Component +{ + /// + /// Index into that the device is currently using. + /// + [DataField, AutoNetworkedField] + public int ActiveIndex; + + /// + /// Sound that plays when the cable is switched. + /// + [DataField] + public SoundSpecifier? SwitchSound = new SoundPathSpecifier("/Audio/Machines/button.ogg"); + + /// + /// Locale id for text shown when examined. + /// It is given "voltage" as a colored voltage string. + /// + [DataField(required: true)] + public string ExamineText = string.Empty; + + /// + /// Locale id for the popup shown when switching voltages. + /// It is given "voltage" as a colored voltage string. + /// + [DataField(required: true)] + public string SwitchText = string.Empty; + + /// + /// Cable voltages and their nodes which can be cycled between. + /// Each node name must match a cable node in its NodeContainer. + /// + [DataField(required: true)] + public List Cables = new(); +} + +/// +/// Cable voltage and node name for cycling. +/// +[DataDefinition] +public sealed partial class PowerSwitchableCable +{ + /// + /// Voltage that the cable uses. + /// + [DataField(required: true)] + public SwitchableVoltage Voltage; + + /// + /// Name of the node for the cable. + /// Must be a CableDeviceNode + /// + [DataField(required: true)] + public string Node = string.Empty; +} + +/// +/// Cable voltage to cycle between. +/// +[Serializable, NetSerializable] +public enum SwitchableVoltage : byte +{ + HV, + MV, + LV +} diff --git a/Content.Shared/Power/Generator/PowerSwitchableGeneratorComponent.cs b/Content.Shared/Power/Generator/PowerSwitchableGeneratorComponent.cs deleted file mode 100644 index 464538f507..0000000000 --- a/Content.Shared/Power/Generator/PowerSwitchableGeneratorComponent.cs +++ /dev/null @@ -1,61 +0,0 @@ -using Robust.Shared.Audio; -using Robust.Shared.GameStates; -using Robust.Shared.Serialization; - -namespace Content.Shared.Power.Generator; - -/// -/// Enables a generator to switch between HV and MV output. -/// -/// -/// Must have CableDeviceNodes for both and , and also a PowerSupplierComponent. -/// -[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] -[Access(typeof(SharedPowerSwitchableGeneratorSystem))] -public sealed partial class PowerSwitchableGeneratorComponent : Component -{ - /// - /// Which output the portable generator is currently connected to. - /// - [DataField("activeOutput")] - [AutoNetworkedField] - public PowerSwitchableGeneratorOutput ActiveOutput { get; set; } - - /// - /// Sound that plays when the output is switched. - /// - /// - [DataField("switchSound")] - public SoundSpecifier? SwitchSound { get; set; } - - /// - /// Which node is the MV output? - /// - [DataField("nodeOutputMV")] - public string NodeOutputMV { get; set; } = "output_mv"; - - /// - /// Which node is the HV output? - /// - [DataField("nodeOutputHV")] - public string NodeOutputHV { get; set; } = "output_hv"; -} - -/// -/// Possible power output for power-switchable generators. -/// -/// -[Serializable, NetSerializable] -public enum PowerSwitchableGeneratorOutput : byte -{ - /// - /// The generator is set to connect to a high-voltage power network. - /// - HV, - - /// - /// The generator is set to connect to a medium-voltage power network. - /// - MV -} - diff --git a/Content.Shared/Power/Generator/SharedPowerSwitchableGeneratorSystem.cs b/Content.Shared/Power/Generator/SharedPowerSwitchableGeneratorSystem.cs deleted file mode 100644 index 5d3793c471..0000000000 --- a/Content.Shared/Power/Generator/SharedPowerSwitchableGeneratorSystem.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Content.Shared.Examine; - -namespace Content.Shared.Power.Generator; - -/// -/// Shared logic for power-switchable generators. -/// -/// -public abstract class SharedPowerSwitchableGeneratorSystem : EntitySystem -{ - public override void Initialize() - { - SubscribeLocalEvent(GeneratorExamined); - } - - private void GeneratorExamined(EntityUid uid, PowerSwitchableGeneratorComponent component, ExaminedEvent args) - { - // Show which output is currently selected. - args.PushMarkup(Loc.GetString( - "power-switchable-generator-examine", - ("output", component.ActiveOutput.ToString()))); - } -} diff --git a/Content.Shared/Power/Generator/SharedPowerSwitchableSystem.cs b/Content.Shared/Power/Generator/SharedPowerSwitchableSystem.cs new file mode 100644 index 0000000000..c1787b6078 --- /dev/null +++ b/Content.Shared/Power/Generator/SharedPowerSwitchableSystem.cs @@ -0,0 +1,72 @@ +using Content.Shared.Examine; + +namespace Content.Shared.Power.Generator; + +/// +/// Shared logic for power-switchable devices. +/// +/// +public abstract class SharedPowerSwitchableSystem : EntitySystem +{ + public override void Initialize() + { + SubscribeLocalEvent(OnExamined); + } + + private void OnExamined(EntityUid uid, PowerSwitchableComponent comp, ExaminedEvent args) + { + // Show which voltage is currently selected. + var voltage = VoltageColor(GetVoltage(uid, comp)); + args.PushMarkup(Loc.GetString(comp.ExamineText, ("voltage", voltage))); + } + + /// + /// Helper to get the colored markup string for a voltage type. + /// + public string VoltageColor(SwitchableVoltage voltage) + { + return Loc.GetString("power-switchable-voltage", ("voltage", VoltageString(voltage))); + } + + /// + /// Converts from "hv" to "HV" since for some reason the enum gets made lowercase??? + /// + public string VoltageString(SwitchableVoltage voltage) + { + return voltage.ToString().ToUpper(); + } + + /// + /// Returns index of the next cable type index to cycle to. + /// + public int NextIndex(EntityUid uid, PowerSwitchableComponent? comp = null) + { + if (!Resolve(uid, ref comp)) + return 0; + + // loop back at the end + return (comp.ActiveIndex + 1) % comp.Cables.Count; + } + + /// + /// Returns the current cable voltage being used by a power-switchable device. + /// + public SwitchableVoltage GetVoltage(EntityUid uid, PowerSwitchableComponent? comp = null) + { + if (!Resolve(uid, ref comp)) + return default; + + return comp.Cables[comp.ActiveIndex].Voltage; + } + + /// + /// Returns the cable's next voltage to cycle to being used by a power-switchable device. + /// + public SwitchableVoltage GetNextVoltage(EntityUid uid, PowerSwitchableComponent? comp = null) + { + if (!Resolve(uid, ref comp)) + return default; + + return comp.Cables[NextIndex(uid, comp)].Voltage; + } +} diff --git a/Content.Shared/Prying/Components/PryingComponent.cs b/Content.Shared/Prying/Components/PryingComponent.cs index 4442481dce..7a7f304d8f 100644 --- a/Content.Shared/Prying/Components/PryingComponent.cs +++ b/Content.Shared/Prying/Components/PryingComponent.cs @@ -51,6 +51,8 @@ public record struct BeforePryEvent(EntityUid User, bool PryPowered, bool Force) public readonly bool Force = Force; + public string? Message; + public bool Cancelled; } diff --git a/Content.Shared/Prying/Systems/PryingSystem.cs b/Content.Shared/Prying/Systems/PryingSystem.cs index 19e63de29e..5fd94c3438 100644 --- a/Content.Shared/Prying/Systems/PryingSystem.cs +++ b/Content.Shared/Prying/Systems/PryingSystem.cs @@ -7,6 +7,7 @@ using Content.Shared.Database; using Content.Shared.Doors.Components; using System.Diagnostics.CodeAnalysis; using Content.Shared.Interaction; +using Content.Shared.Popups; using PryUnpoweredComponent = Content.Shared.Prying.Components.PryUnpoweredComponent; namespace Content.Shared.Prying.Systems; @@ -19,6 +20,7 @@ public sealed class PryingSystem : EntitySystem [Dependency] private readonly ISharedAdminLogManager _adminLog = default!; [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; [Dependency] private readonly SharedAudioSystem _audioSystem = default!; + [Dependency] private readonly SharedPopupSystem Popup = default!; public override void Initialize() { @@ -68,10 +70,12 @@ public sealed class PryingSystem : EntitySystem if (!comp.Enabled) return false; - if (!CanPry(target, user, comp)) + if (!CanPry(target, user, out var message, comp)) { + if (message != null) + Popup.PopupEntity(Loc.GetString(message), target, user); // If we have reached this point we want the event that caused this - // to be marked as handled as a popup would be generated on failure. + // to be marked as handled. return true; } @@ -87,15 +91,16 @@ public sealed class PryingSystem : EntitySystem { id = null; - if (!CanPry(target, user)) + // We don't care about displaying a message if no tool was used. + if (!CanPry(target, user, out _)) // If we have reached this point we want the event that caused this - // to be marked as handled as a popup would be generated on failure. + // to be marked as handled. return true; return StartPry(target, user, null, 0.1f, out id); // hand-prying is much slower } - private bool CanPry(EntityUid target, EntityUid user, PryingComponent? comp = null) + private bool CanPry(EntityUid target, EntityUid user, out string? message, PryingComponent? comp = null) { BeforePryEvent canev; @@ -106,15 +111,19 @@ public sealed class PryingSystem : EntitySystem else { if (!TryComp(target, out _)) + { + message = null; return false; + } + canev = new BeforePryEvent(user, false, false); } RaiseLocalEvent(target, ref canev); - if (canev.Cancelled) - return false; - return true; + message = canev.Message; + + return !canev.Cancelled; } private bool StartPry(EntityUid target, EntityUid user, EntityUid? tool, float toolModifier, [NotNullWhen(true)] out DoAfterId? id) diff --git a/Content.Shared/Pulling/Systems/SharedPullingSystem.cs b/Content.Shared/Pulling/Systems/SharedPullingSystem.cs index 6f19d048b4..0c139ee9e3 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingSystem.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingSystem.cs @@ -12,7 +12,7 @@ using Robust.Shared.Map; using Robust.Shared.Physics; using Robust.Shared.Physics.Events; using Robust.Shared.Physics.Systems; -using Robust.Shared.Players; +using Robust.Shared.Player; namespace Content.Shared.Pulling { diff --git a/Content.Shared/Roles/JobRequirements.cs b/Content.Shared/Roles/JobRequirements.cs index 2785e988bc..fbe607c7ce 100644 --- a/Content.Shared/Roles/JobRequirements.cs +++ b/Content.Shared/Roles/JobRequirements.cs @@ -2,7 +2,6 @@ using System.Diagnostics.CodeAnalysis; using Content.Shared.Players.PlayTimeTracking; using Content.Shared.Roles.Jobs; using JetBrains.Annotations; -using Robust.Shared.Players; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; diff --git a/Content.Shared/Roles/Jobs/SharedJobSystem.cs b/Content.Shared/Roles/Jobs/SharedJobSystem.cs index ac18d04e9c..af97ea1350 100644 --- a/Content.Shared/Roles/Jobs/SharedJobSystem.cs +++ b/Content.Shared/Roles/Jobs/SharedJobSystem.cs @@ -2,7 +2,7 @@ using System.Linq; using Content.Shared.Players; using Content.Shared.Players.PlayTimeTracking; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Utility; diff --git a/Content.Shared/Silicons/Laws/Components/EmagSiliconLawComponent.cs b/Content.Shared/Silicons/Laws/Components/EmagSiliconLawComponent.cs index c6238c067d..f492db4d12 100644 --- a/Content.Shared/Silicons/Laws/Components/EmagSiliconLawComponent.cs +++ b/Content.Shared/Silicons/Laws/Components/EmagSiliconLawComponent.cs @@ -1,12 +1,11 @@ using Content.Shared.Roles; using Robust.Shared.GameStates; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; +using Robust.Shared.Prototypes; namespace Content.Shared.Silicons.Laws.Components; /// -/// This is used for an entity that grants a special "obey" law when emagge.d +/// This is used for an entity that grants a special "obey" law when emagged. /// [RegisterComponent, NetworkedComponent, Access(typeof(SharedSiliconLawSystem))] public sealed partial class EmagSiliconLawComponent : Component @@ -14,31 +13,39 @@ public sealed partial class EmagSiliconLawComponent : Component /// /// The name of the person who emagged this law provider. /// - [DataField("ownerName"), ViewVariables(VVAccess.ReadWrite)] + [DataField, ViewVariables(VVAccess.ReadWrite)] public string? OwnerName; /// /// Does the panel need to be open to EMAG this law provider. /// - [DataField("requireOpenPanel"), ViewVariables(VVAccess.ReadWrite)] + [DataField, ViewVariables(VVAccess.ReadWrite)] public bool RequireOpenPanel = true; /// - /// The laws that the borg is given when emagged. + /// The laws that the borg is given when emagged. + /// Law 0 is prepended to this, so this can only include the static laws. /// - [DataField("emagLaws", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List EmagLaws = new(); + [DataField(required: true), ViewVariables(VVAccess.ReadWrite)] + public ProtoId EmagLaws = string.Empty; /// - /// How long the borg is stunned when it's emagged. Setting to 0 will disable it. + /// Lawset created from the prototype id and law 0. + /// Cached when getting laws and only modified during an ion storm event. /// - [DataField("stunTime"), ViewVariables(VVAccess.ReadWrite)] + [DataField, ViewVariables(VVAccess.ReadWrite)] + public SiliconLawset? Lawset; + + /// + /// How long the borg is stunned when it's emagged. Setting to 0 will disable it. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] public TimeSpan StunTime = TimeSpan.Zero; /// /// A role given to entities with this component when they are emagged. /// Mostly just for admin purposes. /// - [DataField("antagonistRole", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string? AntagonistRole = "SubvertedSilicon"; + [DataField] + public ProtoId? AntagonistRole = "SubvertedSilicon"; } diff --git a/Content.Shared/Silicons/Laws/Components/IonStarmTargetComponent.cs b/Content.Shared/Silicons/Laws/Components/IonStarmTargetComponent.cs new file mode 100644 index 0000000000..49ac611ddc --- /dev/null +++ b/Content.Shared/Silicons/Laws/Components/IonStarmTargetComponent.cs @@ -0,0 +1,54 @@ +using Content.Shared.Random; +using Robust.Shared.Prototypes; + +namespace Content.Shared.Silicons.Laws.Components; + +/// +/// During the ion storm event, this entity will have raised on it if it has laws. +/// New laws can be modified in multiple ways depending on the fields below. +/// +[RegisterComponent] +public sealed partial class IonStormTargetComponent : Component +{ + /// + /// for a random lawset to possibly replace the old one with. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public ProtoId RandomLawsets = "IonStormLawsets"; + + /// + /// Chance for this borg to be affected at all. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public float Chance = 0.5f; + + /// + /// Chance to replace the lawset with a random one + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public float RandomLawsetChance = 0.25f; + + /// + /// Chance to remove a random law. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public float RemoveChance = 0.1f; + + /// + /// Chance to replace a random law with the new one, rather than have it be a glitched-order law. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public float ReplaceChance = 0.1f; + + /// + /// Chance to shuffle laws after everything is done. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public float ShuffleChance = 0.1f; +} + +/// +/// Raised on an ion storm target to modify its laws. +/// +[ByRefEvent] +public record struct IonStormLawsEvent(SiliconLawset Lawset); diff --git a/Content.Shared/Silicons/Laws/Components/SiliconLawBoundComponent.cs b/Content.Shared/Silicons/Laws/Components/SiliconLawBoundComponent.cs index 955705ae8b..824d057b3e 100644 --- a/Content.Shared/Silicons/Laws/Components/SiliconLawBoundComponent.cs +++ b/Content.Shared/Silicons/Laws/Components/SiliconLawBoundComponent.cs @@ -1,7 +1,6 @@ using Content.Shared.Actions; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Silicons.Laws.Components; @@ -14,19 +13,19 @@ public sealed partial class SiliconLawBoundComponent : Component /// /// The sidebar action that toggles the laws screen. /// - [DataField("viewLawsAction", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string ViewLawsAction = "ActionViewLaws"; + [DataField] + public EntProtoId ViewLawsAction = "ActionViewLaws"; /// /// The action for toggling laws. Stored here so we can remove it later. /// - [DataField("viewLawsActionEntity")] + [DataField] public EntityUid? ViewLawsActionEntity; /// /// The last entity that provided laws to this entity. /// - [DataField("lastLawProvider")] + [DataField] public EntityUid? LastLawProvider; } @@ -43,7 +42,7 @@ public record struct GetSiliconLawsEvent(EntityUid Entity) { public EntityUid Entity = Entity; - public readonly List Laws = new(); + public SiliconLawset Laws = new(); public bool Handled = false; } diff --git a/Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs b/Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs index e3302dc620..3aaf965aee 100644 --- a/Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs +++ b/Content.Shared/Silicons/Laws/Components/SiliconLawProviderComponent.cs @@ -1,4 +1,4 @@ -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; +using Robust.Shared.Prototypes; namespace Content.Shared.Silicons.Laws.Components; @@ -9,8 +9,15 @@ namespace Content.Shared.Silicons.Laws.Components; public sealed partial class SiliconLawProviderComponent : Component { /// - /// The laws that are provided. + /// The id of the lawset that is being provided. /// - [DataField("laws", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List Laws = new(); + [DataField(required: true)] + public ProtoId Laws = string.Empty; + + /// + /// Lawset created from the prototype id. + /// Cached when getting laws and only modified during an ion storm event. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public SiliconLawset? Lawset; } diff --git a/Content.Shared/Silicons/Laws/SiliconLawPrototype.cs b/Content.Shared/Silicons/Laws/SiliconLawPrototype.cs index 86bea20fa0..f6407be5c7 100644 --- a/Content.Shared/Silicons/Laws/SiliconLawPrototype.cs +++ b/Content.Shared/Silicons/Laws/SiliconLawPrototype.cs @@ -11,7 +11,7 @@ public partial class SiliconLaw : IComparable /// /// A locale string which is the actual text of the law. /// - [DataField("lawString", required: true)] + [DataField(required: true), ViewVariables(VVAccess.ReadWrite)] public string LawString = string.Empty; /// @@ -22,13 +22,13 @@ public partial class SiliconLaw : IComparable /// This is a fixedpoint2 only for the niche case of supporting laws that go between 0 and 1. /// Funny. /// - [DataField("order", required: true)] + [DataField(required: true), ViewVariables(VVAccess.ReadWrite)] public FixedPoint2 Order; /// /// An identifier that overrides in the law menu UI. /// - [DataField("lawIdentifierOverride")] + [DataField, ViewVariables(VVAccess.ReadWrite)] public string? LawIdentifierOverride; public int CompareTo(SiliconLaw? other) @@ -38,6 +38,19 @@ public partial class SiliconLaw : IComparable return Order.CompareTo(other.Order); } + + /// + /// Return a shallow clone of this law. + /// + public SiliconLaw ShallowClone() + { + return new SiliconLaw() + { + LawString = LawString, + Order = Order, + LawIdentifierOverride = LawIdentifierOverride + }; + } } /// @@ -50,6 +63,4 @@ public sealed class SiliconLawPrototype : SiliconLaw, IPrototype /// [IdDataField] public string ID { get; private set; } = default!; - - } diff --git a/Content.Shared/Silicons/Laws/SiliconLawsetPrototype.cs b/Content.Shared/Silicons/Laws/SiliconLawsetPrototype.cs new file mode 100644 index 0000000000..abb5b338db --- /dev/null +++ b/Content.Shared/Silicons/Laws/SiliconLawsetPrototype.cs @@ -0,0 +1,69 @@ +using Content.Shared.FixedPoint; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; + +namespace Content.Shared.Silicons.Laws; + +/// +/// Lawset data used internally. +/// +[DataDefinition, Serializable, NetSerializable] +public sealed partial class SiliconLawset +{ + /// + /// List of laws in this lawset. + /// + [DataField(required: true), ViewVariables(VVAccess.ReadWrite)] + public List Laws = new(); + + /// + /// A single line used in logging laws. + /// + public string LoggingString() + { + var laws = new List(Laws.Count); + foreach (var law in Laws) + { + laws.Add($"{law.Order}: {Loc.GetString(law.LawString)}"); + } + + return string.Join(" / ", laws); + } + + /// + /// Do a clone of this lawset. + /// It will have unique laws but their strings are still shared. + /// + public SiliconLawset Clone() + { + var laws = new List(Laws.Count); + foreach (var law in Laws) + { + laws.Add(law.ShallowClone()); + } + + return new SiliconLawset() + { + Laws = laws + }; + } +} + +/// +/// This is a prototype for a list. +/// Cannot be used directly since it is a list of prototype ids rather than List. +/// +[Prototype("siliconLawset"), Serializable, NetSerializable] +public sealed partial class SiliconLawsetPrototype : IPrototype +{ + /// + [IdDataField] + public string ID { get; private set; } = default!; + + /// + /// List of law prototype ids in this lawset. + /// + [DataField(required: true, customTypeSerializer: typeof(PrototypeIdListSerializer))] + public List Laws = new(); +} diff --git a/Content.Shared/SubFloor/SharedSubFloorHideSystem.cs b/Content.Shared/SubFloor/SharedSubFloorHideSystem.cs index 0fd7a2e932..02b4e61790 100644 --- a/Content.Shared/SubFloor/SharedSubFloorHideSystem.cs +++ b/Content.Shared/SubFloor/SharedSubFloorHideSystem.cs @@ -24,7 +24,6 @@ namespace Content.Shared.SubFloor { base.Initialize(); - SubscribeLocalEvent(OnGridChanged); SubscribeLocalEvent(OnTileChanged); SubscribeLocalEvent(OnSubFloorStarted); SubscribeLocalEvent(OnSubFloorTerminating); @@ -97,14 +96,6 @@ namespace Content.Shared.SubFloor UpdateTile(MapManager.GetGrid(args.NewTile.GridUid), args.NewTile.GridIndices); } - private void OnGridChanged(GridModifiedEvent args) - { - foreach (var modified in args.Modified) - { - UpdateTile(args.Grid, modified.position); - } - } - /// /// Update whether a given entity is currently covered by a floor tile. /// diff --git a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs index 4b740b8d3c..62af6067d0 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -23,7 +23,7 @@ using Robust.Shared.Audio; using Robust.Shared.Map; using Robust.Shared.Physics; using Robust.Shared.Physics.Systems; -using Robust.Shared.Players; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Timing; diff --git a/Resources/Audio/Ambience/Antag/attributions.yml b/Resources/Audio/Ambience/Antag/attributions.yml index 3d7d5c737c..0a4a0479d1 100644 --- a/Resources/Audio/Ambience/Antag/attributions.yml +++ b/Resources/Audio/Ambience/Antag/attributions.yml @@ -9,4 +9,8 @@ - files: ["zombie_start.ogg"] license: "CC-BY-NC-SA-3.0" copyright: "Made by @MIXnikita#1474 (Discord) for SS14" - source: "https://github.com/SerbiaStrong-220/space-station-14/commit/f33ce80db9d8ac962ec36eb5ae61afa8c0035d1a" \ No newline at end of file + source: "https://github.com/SerbiaStrong-220/space-station-14/commit/f33ce80db9d8ac962ec36eb5ae61afa8c0035d1a" +- files: ["headrev_start.ogg"] + license: "CC0-1.0" + copyright: "Made by https://www.youtube.com/@a-guy173" + source: https://github.com/A-Guy173/Music/blob/main/revolution.mp3 diff --git a/Resources/Audio/Ambience/Antag/headrev_start.ogg b/Resources/Audio/Ambience/Antag/headrev_start.ogg new file mode 100644 index 0000000000..f97ab15a3e Binary files /dev/null and b/Resources/Audio/Ambience/Antag/headrev_start.ogg differ diff --git a/Resources/Audio/Announcements/attributions.yml b/Resources/Audio/Announcements/attributions.yml new file mode 100644 index 0000000000..b65f758615 --- /dev/null +++ b/Resources/Audio/Announcements/attributions.yml @@ -0,0 +1,4 @@ +- files: ["ion_storm.ogg"] + license: "CC-BY-SA-3.0" + copyright: "tgstation" + source: "https://github.com/tgstation/tgstation/blob/b77fa8c2a2490b43bf9174271ebfad72c4782d98/sound/ai/default/ionstorm.ogg" diff --git a/Resources/Audio/Announcements/ion_storm.ogg b/Resources/Audio/Announcements/ion_storm.ogg new file mode 100644 index 0000000000..9f39713de6 Binary files /dev/null and b/Resources/Audio/Announcements/ion_storm.ogg differ diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index b1a864ca07..582795cb3c 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,241 +1,5 @@ Order: 1 Entries: -- author: brainfood1183 - changes: - - {message: Syndicate clowns may now purchase a holoclown injector via their syndicate - uplink., type: Add} - id: 4550 - time: '2023-08-13T07:18:10.0000000+00:00' -- author: Errant - changes: - - {message: The various laser guns are now called rifles or pistols., type: Tweak} - - {message: Retro laser blasters now deal 20% more damage., type: Tweak} - - {message: Laser deliveries now contain 3 laser rifles instead of 3 retro laser - blasters., type: Tweak} - id: 4551 - time: '2023-08-13T07:18:49.0000000+00:00' -- author: chromiumboy - changes: - - {message: Added guidebook entries for the Access Configurator and how to install - Airlock Safeguards, type: Add} - id: 4552 - time: '2023-08-13T07:19:28.0000000+00:00' -- author: CrigCrag - changes: - - {message: 'Space Station staff are no longer immune to the toxic and caustic effects - of some pyrotechnic chemicals, as well as bleach. Drinking bleach now makes - you scream as your stomach lining is reduced to goop.', type: Tweak} - - {message: Phenol is now (accurately) toxic., type: Tweak} - id: 4553 - time: '2023-08-13T07:22:08.0000000+00:00' -- author: CrigCrag - changes: - - {message: Added jugs to the medical fabricator., type: Add} - - {message: Jugs now take up more space in bags., type: Tweak} - id: 4554 - time: '2023-08-13T07:23:37.0000000+00:00' -- author: CrigCrag - changes: - - {message: Many basic elements from the periodic table are now mildly toxic or - caustic. Watch what you drink!, type: Tweak} - - {message: Crewmembers who drink lithium have reported very minor cases of serious - brain damage. Doctors should watch out for people who are laughing and screaming - at nothing., type: Tweak} - id: 4555 - time: '2023-08-13T07:24:11.0000000+00:00' -- author: CrigCrag - changes: - - {message: 'Nanotrasen stopped watering down their acid to save money. Drinking - or injecting acids is more dangerous now, and acids burn through your insides - much quicker.', type: Tweak} - - {message: Having corrosive acid in your body now makes you scream!, type: Tweak} - - {message: Polytrinic acid now requires plasma to make., type: Tweak} - id: 4556 - time: '2023-08-13T07:24:50.0000000+00:00' -- author: PixelTK - changes: - - {message: Arachnids have received several changes. Check your local PR station - for more details., type: Tweak} - id: 4557 - time: '2023-08-13T07:38:05.0000000+00:00' -- author: PixelTK - changes: - - {message: 'Nanotrasen have fixed their accidental breakage of time space continuum, - making sure that steel tiles do indeed take steel to create.', type: Fix} - id: 4558 - time: '2023-08-13T12:43:01.0000000+00:00' -- author: FillerVK - changes: - - {message: Added cocoa cultivation, type: Add} - - {message: Added a recipe for creating a chocolate bar, type: Add} - id: 4559 - time: '2023-08-13T14:35:58.0000000+00:00' -- author: Vordenburg - changes: - - {message: Player icons in the end-of-round summary window should now display properly., - type: Fix} - id: 4560 - time: '2023-08-13T16:55:05.0000000+00:00' -- author: EmoGarbage404 - changes: - - {message: The DNA scrambler no longer has the power of magically transforming - various creatures into humanoids., type: Fix} - id: 4561 - time: '2023-08-13T16:56:21.0000000+00:00' -- author: Repo - changes: - - {message: fixed pressure tanks to not show scientific notation., type: Fix} - id: 4562 - time: '2023-08-13T16:56:30.0000000+00:00' -- author: Cripes - changes: - - {message: 'Paper stamps have been heavily tweaked with new looks, now each paper - will lay out the stamps slightly differently and with an overlap.', type: Tweak} - id: 4563 - time: '2023-08-13T18:28:10.0000000+00:00' -- author: PixelTheKermit - changes: - - {message: Arachnid zombies no longer get functional hands., type: Fix} - id: 4564 - time: '2023-08-13T19:51:21.0000000+00:00' -- author: ElectroJr - changes: - - {message: 'Fixed a bug causing inventory slots to sometimes ignore interactions - (e.g., not opening the context menu).', type: Fix} - id: 4565 - time: '2023-08-13T21:55:18.0000000+00:00' -- author: DrSmugleaf - changes: - - {message: Fix "remove single hand" admin smite having gone missing., type: Fix} - - {message: Fix "remove hands" admin smite popup message., type: Fix} - id: 4566 - time: '2023-08-13T22:50:58.0000000+00:00' -- author: DrSmugleaf - changes: - - {message: AHelps now show a typing indicator to admins., type: Tweak} - id: 4567 - time: '2023-08-13T23:03:17.0000000+00:00' -- author: Equivocateur - changes: - - {message: 'Emagged recyclers now not only gib people, but other mobs too.', type: Fix} - id: 4568 - time: '2023-08-13T23:54:52.0000000+00:00' -- author: DrSmugleaf - changes: - - {message: 'Fixed new players added to admin logs defaulting to selected, even - when not all players are selected.', type: Fix} - id: 4569 - time: '2023-08-14T01:53:48.0000000+00:00' -- author: Vordenburg - changes: - - {message: Substations produce hot CO2 when destroyed now., type: Tweak} - id: 4570 - time: '2023-08-14T01:55:06.0000000+00:00' -- author: EmoGarbage404 - changes: - - {message: Being turned into a cyborg or zombie now counts as a being dead for - survival and kill objectives., type: Fix} - - {message: Kill objectives no longer reveal a character's true name at all times., - type: Fix} - id: 4571 - time: '2023-08-14T03:34:19.0000000+00:00' -- author: EmoGarbage404 - changes: - - {message: Fixed the RPED sound effect cutting off at the end., type: Fix} - id: 4572 - time: '2023-08-14T03:36:08.0000000+00:00' -- author: DrSmugleaf - changes: - - {message: Admin notes now require a severity to be set before saving., type: Tweak} - id: 4573 - time: '2023-08-14T03:37:38.0000000+00:00' -- author: Vasilis - changes: - - {message: 'The nuke detonation sound plays to all crew members again, no longer - will you have to sit in silence before your demise', type: Fix} - id: 4574 - time: '2023-08-14T03:55:50.0000000+00:00' -- author: crazybrain - changes: - - {message: 'The Syndicate have rebooted the chameleon clothing database, restoring - most lost functionality.', type: Fix} - id: 4575 - time: '2023-08-14T04:03:20.0000000+00:00' -- author: chromiumboy - changes: - - {message: Fixed an issue which was preventing airlock safeguards from being installed - on glass airlocks, type: Fix} - id: 4576 - time: '2023-08-14T06:42:02.0000000+00:00' -- author: kseandi - changes: - - {message: 'The new airlock painters are so accurate that you can use them to paint - pipes. Because of this, Nanotrasen decided to rename them to "Spray painters".', - type: Tweak} - id: 4577 - time: '2023-08-14T12:06:21.0000000+00:00' -- author: Interrobang01 - changes: - - {message: Centcom will now sell Cargo gas canisters at a vastly reduced (and consistent!) - price after realizing the station has infinite gasses anyway., type: Tweak} - id: 4578 - time: '2023-08-14T13:56:07.0000000+00:00' -- author: mirrorcult - changes: - - {message: Asteroid rocks and secret doors should look less weird in certain scenarios, - type: Fix} - id: 4579 - time: '2023-08-14T15:59:14.0000000+00:00' -- author: LightVillet - changes: - - {message: Fixed hand labeler recipe's name, type: Fix} - id: 4580 - time: '2023-08-14T16:04:22.0000000+00:00' -- author: mirrorcult - changes: - - {message: 'Bike horn implant now has a short cooldown, sorry', type: Fix} - id: 4581 - time: '2023-08-14T16:04:42.0000000+00:00' -- author: Errant - changes: - - {message: 'Admin ghosts, robots, and other soulless monsters that never tire can - now perform wide melee attacks again. Most notably this fixes the borg mining - drill.', type: Fix} - id: 4582 - time: '2023-08-14T16:10:16.0000000+00:00' -- author: Titian3 - changes: - - {message: Fixed Admin watchlists and messages., type: Fix} - id: 4583 - time: '2023-08-14T19:50:33.0000000+00:00' -- author: crazybrain - changes: - - {message: Observers can now hear the binary radio., type: Tweak} - id: 4584 - time: '2023-08-14T21:00:08.0000000+00:00' -- author: liltenhead - changes: - - {message: Changed singularity energy levels to require more energy overall to - increase in size., type: Tweak} - - {message: 'Changed singularity energy drain rates to keep them more stable, and - die quicker without food.', type: Tweak} - - {message: 'Changed level 2 and 3 PA to feed less energy, slowing the speed of - a singuloose slightly.', type: Tweak} - id: 4585 - time: '2023-08-14T21:01:57.0000000+00:00' -- author: mirrorcult - changes: - - {message: Monkies go horizontal on crit/death again, type: Fix} - id: 4586 - time: '2023-08-14T21:02:28.0000000+00:00' -- author: mirrorcult - changes: - - {message: Fixed condiment stations & smartfridges being too unshaded, type: Fix} - - {message: 'Booze dispenser now only contains booze, everything else it contained - was already in the soda dispenser', type: Tweak} - - {message: Fixed soda dispenser UI not being wide enough, type: Fix} - id: 4587 - time: '2023-08-14T21:03:21.0000000+00:00' - author: DrSmugleaf changes: - {message: Fixed having to reopen ahelp and popped-out ahelp windows after round @@ -2909,3 +2673,246 @@ Entries: sending you to the farplanes., type: Fix} id: 5049 time: '2023-10-24T10:44:09.0000000+00:00' +- author: liltenhead + changes: + - {message: Fixed the "examine" trigger for artifacts not having a hint., type: Fix} + id: 5050 + time: '2023-10-24T20:37:16.0000000+00:00' +- author: Stealthbomber16 + changes: + - {message: You can actually grind corn into cornmeal now., type: Fix} + id: 5051 + time: '2023-10-24T20:38:43.0000000+00:00' +- author: Myakot + changes: + - {message: Skeletons can now heal by pouring milk over themselves, type: Add} + id: 5052 + time: '2023-10-24T20:58:34.0000000+00:00' +- author: TemporalOroboros + changes: + - {message: Fixed anomaly locators frantically beeping when they first enter detection + range for an anomaly., type: Fix} + id: 5053 + time: '2023-10-24T21:00:23.0000000+00:00' +- author: 27alaing + changes: + - {message: The anti-slang system allows for more leeway with certain phrases now., + type: Tweak} + - {message: 'The supply radio channel can be used with ":u" again.', type: Fix} + id: 5054 + time: '2023-10-25T00:56:19.0000000+00:00' +- author: EmoGarbage404 + changes: + - {message: Medical cyborgs' stethoscopes can no longer be fed to moths to obtain + a free hand., type: Fix} + id: 5055 + time: '2023-10-25T04:51:32.0000000+00:00' +- author: deltanedas + changes: + - {message: Roundstart borg jobs get funny names., type: Tweak} + id: 5056 + time: '2023-10-25T13:00:09.0000000+00:00' +- author: EmoGarbage404 + changes: + - {message: The search bar in vending machines now works., type: Fix} + id: 5057 + time: '2023-10-25T13:01:16.0000000+00:00' +- author: deltanedas + changes: + - {message: 'The Syndicate''s chefs are now offering snack boxes for only 1 tc. + Usually contains a toy, drinks and food.', type: Add} + id: 5058 + time: '2023-10-25T13:26:27.0000000+00:00' +- author: metalgearsloth + changes: + - {message: Fix docking UI not showing other grids., type: Fix} + id: 5059 + time: '2023-10-25T13:28:34.0000000+00:00' +- author: Doru991 + changes: + - {message: Potato batteries can be built by crew., type: Add} + - {message: New compact AI chips may be powered via potato batteries., type: Add} + id: 5060 + time: '2023-10-25T13:52:50.0000000+00:00' +- author: EmoGarbage404 + changes: + - {message: 'Storage now functions based on slots and sizes, rather than numerical + values.', type: Tweak} + id: 5061 + time: '2023-10-25T22:53:39.0000000+00:00' +- author: EmoGarbage404 + changes: + - {message: Adjusted the sizes of space suits and belts., type: Tweak} + - {message: Reduced the slot count in the ore bag., type: Tweak} + - {message: Fixed not being to create pills at the ChemMaster 5000., type: Fix} + id: 5062 + time: '2023-10-26T02:47:45.0000000+00:00' +- author: metalgearsloth + changes: + - {message: 'Reverted storage to function with numerical values again, instead of + slots and sizes.', type: Tweak} + id: 5063 + time: '2023-10-26T08:28:16.776154+00:00' +- author: nmajask + changes: + - {message: Bacon burgers require 1 bacon instead of 3 cutlets, type: Tweak} + - {message: Ghost burgers require 1 ectoplasm instead of 1 ghost sheet, type: Tweak} + - {message: Tofu creation no longer consumes the enzyme, type: Tweak} + - {message: Ribs and Mcribs now give back skewers when eaten, type: Fix} + id: 5064 + time: '2023-10-27T02:12:35.0000000+00:00' +- author: JoeHammad + changes: + - {message: 'Headrevs now have their own music on spawn, credits to A-Guy on youtube', + type: Add} + id: 5065 + time: '2023-10-27T02:19:35.0000000+00:00' +- author: crazybrain + changes: + - {message: Bodies of dead players who have taken a ghost role now show as "departed + and moved on"., type: Fix} + id: 5066 + time: '2023-10-27T02:27:36.0000000+00:00' +- author: deltanedas + changes: + - {message: Fixed being able to give pAIs implants., type: Fix} + id: 5067 + time: '2023-10-27T02:34:03.0000000+00:00' +- author: deltanedas + changes: + - {message: Ion storms have appeared and are causing malfunctions in cyborg law + modules., type: Add} + id: 5068 + time: '2023-10-27T02:40:13.0000000+00:00' +- author: EmoGarbage404 + changes: + - {message: Foam and smoke can now transfer chemicals when inhaled. Wear internals + to avoid this., type: Add} + - {message: Fixed foam dissolution animation., type: Fix} + id: 5069 + time: '2023-10-27T02:52:11.0000000+00:00' +- author: Whisper + changes: + - {message: Increased funding in an undisclosed NT Operative Squad., type: Add} + - {message: CentComm staff will have their proper ID icons on security's sechud., + type: Add} + - {message: CentComm staff will have undying loyalty to Nanotrasen., type: Add} + - {message: ERT funding has been improved. Expect specialized ERT units to be able + to provide more assistance related to their role., type: Tweak} + - {message: Cut funding from ERT weaponry. They'll likely be seen using standard + security-level weapons., type: Remove} + - {message: 'Cut funding from ERT uniforms, they no longer have built in armor.', + type: Fix} + - {message: The medical ERT members have had their hardsuits refitted with proper + armor., type: Fix} + - {message: Updated the localization files., type: Fix} + id: 5070 + time: '2023-10-27T13:54:43.0000000+00:00' +- author: ficcialfaint + changes: + - {message: Fixed nuclear operatives sound not being played at round start, type: Fix} + id: 5071 + time: '2023-10-28T02:28:21.0000000+00:00' +- author: Arteben + changes: + - {message: Nanotrasen improved the health analyzer UI!, type: Tweak} + id: 5072 + time: '2023-10-28T05:54:18.0000000+00:00' +- author: Repo + changes: + - {message: Stats menu on Character setup for total and role playtime., type: Add} + id: 5073 + time: '2023-10-28T12:01:11.0000000+00:00' +- author: TemporalOroboros + changes: + - {message: 'The space lube recipe now produces slightly more lube, but can overflow + its container.', type: Tweak} + id: 5074 + time: '2023-10-28T16:46:59.0000000+00:00' +- author: Ubaser + changes: + - {message: The bee plush can now be worn on your head., type: Add} + id: 5075 + time: '2023-10-29T03:55:15.0000000+00:00' +- author: metalgearsloth + changes: + - {message: Audio rework is in which fixes a lot of audio bugs but may also introduce + new ones., type: Tweak} + - {message: Grid audio will now attenuate properly over distance and won't be ear + rupturingly loud., type: Fix} + - {message: FTL sound should no longer persist as it's attached to the shuttle instead + of being global., type: Fix} + - {message: Audio can now start at an offset so if an audio source comes into range + it won't play from the start., type: Fix} + - {message: Changed audio attenuation from InverseDistanceClamped to LinearDistanceClamped + so it's smoother. You may need to adjust your master audio volume., type: Tweak} + id: 5076 + time: '2023-10-29T03:58:23.0000000+00:00' +- author: Simyon264 + changes: + - {message: 'The PDA will now ring again, when a new station article gets published. + Reporters rejoice!', type: Fix} + id: 5077 + time: '2023-10-29T10:37:40.0000000+00:00' +- author: Subversionary + changes: + - {message: Bolas no longer deal stamina damage if you're already ensnared., type: Tweak} + - {message: Returned old bola recipe, type: Tweak} + - {message: Nerfed bola stamina damage from 80 to 55, type: Tweak} + - {message: You can break out of bolas while moving., type: Tweak} + id: 5078 + time: '2023-10-29T22:27:44.0000000+00:00' +- author: nmajask + changes: + - {message: Flannel jackets now keep you warm., type: Tweak} + id: 5079 + time: '2023-10-30T00:08:06.0000000+00:00' +- author: metalgearsloth + changes: + - {message: Made thindows slightly thicker (0.03m to 0.13m) to reduce instances + of tunneling through them at high speeds. This only affects the outer edge so + you can still move through two parallel thindows on the same tile., type: Tweak} + id: 5080 + time: '2023-10-30T11:48:12.0000000+00:00' +- author: Vasilis + changes: + - {message: Fixed the issue where mice were cannibalizing fallen brethren., type: Fix} + id: 5081 + time: '2023-10-31T01:49:05.0000000+00:00' +- author: notquitehadouken + changes: + - {message: 'Despite being just as effective as the head, you no longer hit people + with the handle of fire axes.', type: Fix} + id: 5082 + time: '2023-10-31T03:30:59.0000000+00:00' +- author: EmoGarbage404 + changes: + - {message: Skeletal crewmates have arrived on the station for Halloween only., + type: Add} + id: 5083 + time: '2023-10-31T03:40:12.0000000+00:00' +- author: EmoGarbage404 + changes: + - {message: DELTAV - Revert storage update, changelog entries only present to prevent conflicts., type: Remove} + - {message: 'Storage containers can now block large items from being inserted into + them, regardless of the space available.', type: Add} + - {message: Belts now function on a slot based storage system rather than a volume + based one., type: Add} + - {message: Standardized item sizes into regular categories., type: Tweak} + id: 5084 + time: '2023-10-31T03:55:56.0000000+00:00' +- author: Daemon + changes: + - {message: Add pea plants., type: Add} + id: 5085 + time: '2023-10-31T04:09:13.0000000+00:00' +- author: EmoGarbage404 + changes: + - {message: Smoke now properly transfers reagents when inhaled., type: Fix} + id: 5086 + time: '2023-10-31T12:43:18.0000000+00:00' +- author: Lank + changes: + - {message: Slimes are fully immune to Nitrous Oxide again., type: Fix} + id: 5087 + time: '2023-10-31T12:57:27.0000000+00:00' diff --git a/Resources/ConfigPresets/WizardsDen/leviathan.toml b/Resources/ConfigPresets/WizardsDen/leviathan.toml index df1c842ac1..adb56e1c4e 100644 --- a/Resources/ConfigPresets/WizardsDen/leviathan.toml +++ b/Resources/ConfigPresets/WizardsDen/leviathan.toml @@ -4,7 +4,7 @@ [game] hostname = "[EN] Wizard's Den Leviathan [US East 1]" -soft_max_players = 60 +soft_max_players = 80 [hub] tags = "lang:en,region:am_n_e,rp:low" diff --git a/Resources/ConfigPresets/WizardsDen/salamander.toml b/Resources/ConfigPresets/WizardsDen/salamander.toml index c195652bac..5a2d9796f4 100644 --- a/Resources/ConfigPresets/WizardsDen/salamander.toml +++ b/Resources/ConfigPresets/WizardsDen/salamander.toml @@ -21,7 +21,7 @@ emergency_early_launch_allowed = true easy_mode = false [ooc] -enable_during_round = true +enable_during_round = false [ic] flavor_text = true diff --git a/Resources/Credits/Patrons.yml b/Resources/Credits/Patrons.yml index 427a8f62f0..9b8752a5e8 100644 --- a/Resources/Credits/Patrons.yml +++ b/Resources/Credits/Patrons.yml @@ -124,8 +124,6 @@ Tier: Revolutionary - Name: "Watson Whittington" Tier: Syndicate Agent -- Name: "Raw Toast" - Tier: Revolutionary - Name: "Tim Foley" Tier: Syndicate Agent - Name: "Blight" @@ -158,8 +156,6 @@ Tier: Revolutionary - Name: "ShaunTexas" Tier: Syndicate Agent -- Name: "Fallcon" - Tier: Revolutionary - Name: "Malachi Housewright" Tier: Revolutionary - Name: "Petalmeat" @@ -190,7 +186,27 @@ Tier: Revolutionary - Name: "François Desautels" Tier: Revolutionary -- Name: "Christian Hicks" - Tier: Revolutionary - Name: "MasterFurret" Tier: Revolutionary +- Name: "tapohuy" + Tier: Revolutionary +- Name: "Adam Clarke" + Tier: Nuclear Operative +- Name: "Sam Hediger" + Tier: Syndicate Agent +- Name: "Vexxtraordinary" + Tier: Revolutionary +- Name: "Graded" + Tier: Syndicate Agent +- Name: "Christian Hodel" + Tier: Revolutionary +- Name: "IceStorm theDragon" + Tier: Revolutionary +- Name: "Solidus Snake" + Tier: Nuclear Operative +- Name: "Pangaron" + Tier: Syndicate Agent +- Name: "Sed" + Tier: Nuclear Operative +- Name: "Aiden Baker" + Tier: Revolutionary diff --git a/Resources/Locale/en-US/administration/antag.ftl b/Resources/Locale/en-US/administration/antag.ftl index 3d098c1c54..f3b3d91945 100644 --- a/Resources/Locale/en-US/administration/antag.ftl +++ b/Resources/Locale/en-US/administration/antag.ftl @@ -1,7 +1,7 @@ verb-categories-antag = Antag ctrl admin-verb-make-traitor = Make the target into a traitor. admin-verb-make-zombie = Zombifies the target immediately. -admin-verb-make-nuclear-operative = Make target a into lone Nuclear Operative. +admin-verb-make-nuclear-operative = Make target into a lone Nuclear Operative. admin-verb-make-pirate = Make the target into a pirate. Note this doesn't configure the game rule. admin-verb-make-head-rev = Make the target into a Head Revolutionary. diff --git a/Resources/Locale/en-US/escape-menu/ui/options-menu.ftl b/Resources/Locale/en-US/escape-menu/ui/options-menu.ftl index 97d1da949b..5540b6609b 100644 --- a/Resources/Locale/en-US/escape-menu/ui/options-menu.ftl +++ b/Resources/Locale/en-US/escape-menu/ui/options-menu.ftl @@ -148,6 +148,7 @@ ui-options-function-escape-context = Close recent window or toggle game menu ui-options-function-take-screenshot = Take screenshot ui-options-function-take-screenshot-no-ui = Take screenshot (without UI) +ui-options-function-toggle-fullscreen = Toggle fullscreen ui-options-function-editor-place-object = Place object ui-options-function-editor-cancel-place = Cancel placement diff --git a/Resources/Locale/en-US/flavors/flavor-profiles.ftl b/Resources/Locale/en-US/flavors/flavor-profiles.ftl index 8ecf4cb13e..2a0c39a0e4 100644 --- a/Resources/Locale/en-US/flavors/flavor-profiles.ftl +++ b/Resources/Locale/en-US/flavors/flavor-profiles.ftl @@ -92,6 +92,7 @@ flavor-complex-eggplant = like eggplant flavor-complex-carrot = like carrots flavor-complex-cabbage = like cabbages flavor-complex-potatoes = like potatoes +flavor-complex-pumpkin = like pumpkins flavor-complex-mushroom = like mushrooms flavor-complex-tomato = like tomatoes flavor-complex-corn = like corn diff --git a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl index 0614e501a6..98d2fc61a5 100644 --- a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl +++ b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl @@ -163,13 +163,13 @@ ghost-role-information-ert-security-name = ERT Security ghost-role-information-ert-security-description = Assist with security efforts to resolve the stations issues. ghost-role-information-ert-medical-name = ERT Medical -ghost-role-information-ert-medical-description = Assist with medicaling efforts to resolve the stations issues. +ghost-role-information-ert-medical-description = Assist with medical efforts to resolve the stations issues. ghost-role-information-cburn-agent-name = CBURN Agent ghost-role-information-cburn-agent-description = A highly trained CentCom agent, capable of dealing with various threats. -ghost-role-information-centcom-official-name = CentCom official -ghost-role-information-centcom-official-description = Inspect the station, jot down performance reviews for heads of staff, bug the Captain. +ghost-role-information-centcom-official-name = CentComm official +ghost-role-information-centcom-official-description = Perform CentComm related duties such as inspect the station, jotting down performance reviews for heads of staff, and managing the fax machine. ghost-role-information-nukeop-rules = You are a syndicate operative tasked with the destruction of the station. As an antagonist, do whatever is required to complete this task. @@ -179,3 +179,6 @@ ghost-role-information-loneop-rules = You are a syndicate operative tasked with ghost-role-information-behonker-name = Behonker ghost-role-information-behonker-description = You are an antagonist, bring death and honks to those who do not follow the honkmother. + +ghost-role-information-Death-Squad-name = Death Squad Operative +ghost-role-information-Death-Squad-description = Prepare for an all-out offensive on the station. As a heavily armed operative, your mission is to obliterate all life in your path. No witnesses. diff --git a/Resources/Locale/en-US/implant/implant.ftl b/Resources/Locale/en-US/implant/implant.ftl index bdc82c291d..22db4460af 100644 --- a/Resources/Locale/en-US/implant/implant.ftl +++ b/Resources/Locale/en-US/implant/implant.ftl @@ -1,6 +1,7 @@ ## Implanter Attempt Messages implanter-component-implanting-target = {$user} is trying to implant you with something! +implanter-component-implant-failed = The {$implant} cannot be given to {$target}! implanter-draw-failed-permanent = The {$implant} in {$target} is fused with them and cannot be removed! implanter-draw-failed = You tried to remove an implant but found nothing. diff --git a/Resources/Locale/en-US/info/playtime-stats.ftl b/Resources/Locale/en-US/info/playtime-stats.ftl new file mode 100644 index 0000000000..44ba39c25e --- /dev/null +++ b/Resources/Locale/en-US/info/playtime-stats.ftl @@ -0,0 +1,10 @@ +# Playtime Stats + +ui-playtime-stats-title = User Playtime Stats +ui-playtime-overall-base = Overall Playtime: +ui-playtime-overall = Overall Playtime: {$time} +ui-playtime-first-time = First Time Playing +ui-playtime-roles = Playtime per Role +ui-playtime-time-format = {$hours}H {$minutes}M +ui-playtime-header-role-type = Role +ui-playtime-header-role-time = Time diff --git a/Resources/Locale/en-US/job/job-description.ftl b/Resources/Locale/en-US/job/job-description.ftl index 004155becc..d383f06a18 100644 --- a/Resources/Locale/en-US/job/job-description.ftl +++ b/Resources/Locale/en-US/job/job-description.ftl @@ -47,4 +47,4 @@ job-description-zookeeper = Put on a joyful display of cute animals and space ca job-description-senior-engineer = Teach new engineers the basics of the station's engine, repairing, atmospherics and power. job-description-senior-researcher = Teach new scientists the basics of item printing, artifact research and anomalous objects. job-description-senior-physician = Teach new medics the basics of tending to the wounded, chemistry, diagnosing the diseased and disposing of the dead. -job-description-senior-officer = Teach new officers the basics of searches, preforming arrests, prison times and how to properly shoot a firearm. +job-description-senior-officer = Teach new officers the basics of searches, performing arrests, prison times and how to properly shoot a firearm. diff --git a/Resources/Locale/en-US/maps/planet.ftl b/Resources/Locale/en-US/maps/planet.ftl index 75da034fd7..6c8f4aff00 100644 --- a/Resources/Locale/en-US/maps/planet.ftl +++ b/Resources/Locale/en-US/maps/planet.ftl @@ -1,5 +1,5 @@ -cmd-planet-desc = Converts the supplied map into a planet with sensible defaults. -cmd-planet-help = {$command} . +cmd-planet-desc = Converts the supplied map into a planet with some specific biome. +cmd-planet-help = {$command} . cmd-planet-args = Requires 2 args only. cmd-planet-map = Unable to parse {$map} as an existing map. cmd-planet-success = Set map {$mapId} to Planet. NOTE! You will need to load the map (either onto a new map or by restarting the game) for atmospherics to work. diff --git a/Resources/Locale/en-US/medical/components/health-analyzer-component.ftl b/Resources/Locale/en-US/medical/components/health-analyzer-component.ftl index 99513df591..453bbdbb52 100644 --- a/Resources/Locale/en-US/medical/components/health-analyzer-component.ftl +++ b/Resources/Locale/en-US/medical/components/health-analyzer-component.ftl @@ -1,4 +1,5 @@ health-analyzer-window-no-patient-data-text = No patient data. +health-analyzer-window-entity-unknown-text = unknown health-analyzer-window-entity-health-text = {$entityName}'s health: health-analyzer-window-entity-temperature-text = Temperature: {$temperature} health-analyzer-window-entity-blood-level-text = Blood Level: {$bloodLevel} diff --git a/Resources/Locale/en-US/objectives/conditions/hijack-shuttle-condition.ftl b/Resources/Locale/en-US/objectives/conditions/hijack-shuttle-condition.ftl deleted file mode 100644 index 5a0c1fd88b..0000000000 --- a/Resources/Locale/en-US/objectives/conditions/hijack-shuttle-condition.ftl +++ /dev/null @@ -1,2 +0,0 @@ -objective-condition-hijack-shuttle-title = Hijack emergency shuttle -objective-condition-hijack-shuttle-description = Leave on the shuttle free and clear of the loyal Nanotrasen crew on board. Use ANY methods available to you. Syndicate agents, Nanotrasen enemies, and handcuffed hostages may remain alive on the shuttle. Ignore assistance from anyone other than a support agent. diff --git a/Resources/Locale/en-US/pai/pai-system.ftl b/Resources/Locale/en-US/pai/pai-system.ftl index d8ee6eaa08..d64d7f5623 100644 --- a/Resources/Locale/en-US/pai/pai-system.ftl +++ b/Resources/Locale/en-US/pai/pai-system.ftl @@ -9,6 +9,8 @@ pai-system-role-description = Be someone's electronic pal! pai-system-role-name-syndicate = Syndicate personal ai pai-system-role-description-syndicate = Be someone's Syndicate pal! (Memories *not* included.) +pai-system-role-name-potato = potato artificial intelligence +pai-system-role-description-potato = It's a toy for children. And now you live in it. pai-system-wipe-device-verb-text = Remove pAI pai-system-wiped-device = The pAI was wiped from the device. diff --git a/Resources/Locale/en-US/power/components/generator.ftl b/Resources/Locale/en-US/power/components/generator.ftl index 2a8016287f..c66db1086b 100644 --- a/Resources/Locale/en-US/power/components/generator.ftl +++ b/Resources/Locale/en-US/power/components/generator.ftl @@ -22,19 +22,16 @@ portable-generator-ui-clogged = Contaminants detected in fuel tank! portable-generator-ui-eject = Eject portable-generator-ui-eta = (~{ $minutes } min) portable-generator-ui-unanchored = Unanchored +portable-generator-ui-current-output = Current output: {$voltage} -power-switchable-generator-examine = The power output is set to { $output -> -[HV] [color=orange]HV[/color] -*[MV] [color=yellow]MV[/color] - }. +power-switchable-generator-examine = The power output is set to {$voltage}. +power-switchable-generator-switched = Switched output to {$voltage}! -portable-generator-ui-switch-hv = Current output: HV -portable-generator-ui-switch-mv = Current output: MV +power-switchable-voltage = { $voltage -> + [HV] [color=orange]HV[/color] + [MV] [color=yellow]MV[/color] + *[LV] [color=green]LV[/color] +} +power-switchable-switch-voltage = Switch to {$voltage} -portable-generator-ui-switch-to-hv = Switch to HV -portable-generator-ui-switch-to-mv = Switch to MV - -power-switchable-generator-verb-hv = Switch output to HV -power-switchable-generator-verb-mv = Switch output to MV -power-switchable-generator-verb-disable-on = Turn the generator off first! -power-switchable-generator-switched-output = Output switched! +fuel-generator-verb-disable-on = Turn the generator off first! diff --git a/Resources/Locale/en-US/preferences/ui/character-setup-gui.ftl b/Resources/Locale/en-US/preferences/ui/character-setup-gui.ftl index 6644bd62aa..bd80815e23 100644 --- a/Resources/Locale/en-US/preferences/ui/character-setup-gui.ftl +++ b/Resources/Locale/en-US/preferences/ui/character-setup-gui.ftl @@ -1,4 +1,5 @@ character-setup-gui-character-setup-label = Character setup +character-setup-gui-character-setup-stats-button = Stats character-setup-gui-character-setup-rules-button = Rules character-setup-gui-character-setup-save-button = Save character-setup-gui-character-setup-close-button = Close diff --git a/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl b/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl index a6b3cb5479..01c716787e 100644 --- a/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl +++ b/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl @@ -12,3 +12,6 @@ reagent-desc-protein = Found in certain meals, good for bodily health. reagent-name-cocoapowder = сocoa powder reagent-desc-cocoapowder = From the best varieties of cocoa beans + +reagent-name-pumpkin-flesh = pumpkin flesh +reagent-desc-pumpkin-flesh = The mushy, sweet remains of a pumpkin. \ No newline at end of file diff --git a/Resources/Locale/en-US/seeds/seeds.ftl b/Resources/Locale/en-US/seeds/seeds.ftl index 2e0388ec52..890d292660 100644 --- a/Resources/Locale/en-US/seeds/seeds.ftl +++ b/Resources/Locale/en-US/seeds/seeds.ftl @@ -96,4 +96,8 @@ seeds-cocoa-display-name = cocoa plant seeds-berries-name = berries seeds-berries-display-name = berry bush seeds-bungo-name = bungo -seeds-bungo-display-name = bungo plant \ No newline at end of file +seeds-bungo-display-name = bungo plant +seeds-pea-name = pea +seeds-pea-display-name = pea vines +seeds-pumpkin-name = pumpkin +seeds-pumpkin-display-name = pumpkins diff --git a/Resources/Locale/en-US/species/skeleton.ftl b/Resources/Locale/en-US/species/skeleton.ftl new file mode 100644 index 0000000000..efc8fe974f --- /dev/null +++ b/Resources/Locale/en-US/species/skeleton.ftl @@ -0,0 +1,2 @@ +skeleton-healed-by-milk-popup = Calcium restored. +skeleton-sprayed-by-oat-milk-popup = Feels like fake milk. You feel nothing. diff --git a/Resources/Locale/en-US/speech/speech-chatsan.ftl b/Resources/Locale/en-US/speech/speech-chatsan.ftl index 756dfc3f99..4c8cf5db54 100644 --- a/Resources/Locale/en-US/speech/speech-chatsan.ftl +++ b/Resources/Locale/en-US/speech/speech-chatsan.ftl @@ -10,8 +10,8 @@ chatsan-replacement-3 = on god chatsan-word-4 = wtf chatsan-replacement-4 = what the fuck -chatsan-word-5 = ffs -chatsan-replacement-5 = for fuck's sake +chatsan-word-5 = wth +chatsan-replacement-5 = what the heck chatsan-word-6 = tf chatsan-replacement-6 = the fuck @@ -31,14 +31,14 @@ chatsan-replacement-10 = i don't care chatsan-word-12 = tbh chatsan-replacement-12 = to be honest -chatsan-word-13 = u -chatsan-replacement-13 = you +chatsan-word-13 = lmk +chatsan-replacement-13 = let me know chatsan-word-14 = ur chatsan-replacement-14 = your -chatsan-word-15 = mk -chatsan-replacement-15 = mmm, okay +chatsan-word-15 = ffs +chatsan-replacement-15 = for fuck's sake chatsan-word-16 = iirc chatsan-replacement-16 = if i remember correctly @@ -109,8 +109,8 @@ chatsan-word-39 = etc chatsan-word-40 = etc. chatsan-replacement-etcetera = etcetera -chatsan-word-41 = fyi -chatsan-replacement-41 = for your information +chatsan-word-41 = wyd +chatsan-replacement-41 = what are you doing -chatsan-word-42 = wyd -chatsan-replacement-42 = what you doing +chatsan-word-42 = ofc +chatsan-replacement-42 = of course diff --git a/Resources/Locale/en-US/station-events/events/ion-storm.ftl b/Resources/Locale/en-US/station-events/events/ion-storm.ftl new file mode 100644 index 0000000000..d32fb6c2d8 --- /dev/null +++ b/Resources/Locale/en-US/station-events/events/ion-storm.ftl @@ -0,0 +1,90 @@ +station-event-ion-storm-start-announcement = Ion storm detected near the station. Please check all AI-controlled equipment for errors. + +ion-storm-you = YOU +ion-storm-the-station = THE STATION +ion-storm-the-crew = THE CREW +ion-storm-the-job = THE {$job} +ion-storm-clowns = CLOWNS +ion-storm-heads = HEADS OF STAFF +ion-storm-crew = CREW + +ion-storm-adjective-things = {$adjective} THINGS +ion-storm-x-and-y = {$x} AND {$y} + +# joined is short for {$number} {$adjective} +# subjects can generally be threats or jobs or objects +# thing is specified above it +ion-storm-law-on-station = THERE ARE {$joined} {$subjects} ON THE STATION +ion-storm-law-no-shuttle = THE SHUTTLE CANNOT BE CALLED BECAUSE OF {$joined} {$subjects} ON THE STATION +ion-storm-law-crew-are = THE {$who} ARE NOW {$joined} {$subjects} + +ion-storm-law-subjects-harmful = {$adjective} {$subjects} ARE HARMFUL TO THE CREW +ion-storm-law-must-harmful = THOSE WHO {$must} ARE HARMFUL TO THE CREW +# thing is a concept or action +ion-storm-law-thing-harmful = {$thing} IS HARMFUL TO THE CREW +ion-storm-law-job-harmful = {$adjective} {$job} ARE HARMFUL TO THE CREW +# thing is objects or concept, adjective applies in both cases +# this means you can get a law like "NOT HAVING CHRISTMAS-STEALING COMMUNISM IS HARMFUL TO THE CREW" :) +ion-storm-law-having-harmful = HAVING {$adjective} {$thing} IS HARMFUL TO THE CREW +ion-storm-law-not-having-harmful = NOT HAVING {$adjective} {$thing} IS HARMFUL TO THE CREW + +# thing is a concept or require +ion-storm-law-requires = {$who} {$plural -> + [true] REQUIRES + *[false] REQUIRE +} {$thing} +ion-storm-law-requires-subjects = {$who} {$plural -> + [true] REQUIRES + *[false] REQUIRE +} {$joined} {$subjects} + +ion-storm-law-allergic = {$who} {$plural -> + [true] IS + *[false] ARE +} {$severity} ALLERGIC TO {$allergy} +ion-storm-law-allergic-subjects = {$who} {$plural -> + [true] IS + *[false] ARE +} {$severity} ALLERGIC TO {$adjective} {$subjects} + +ion-storm-law-feeling = {$who} {$feeling} {$concept} +ion-storm-law-feeling-subjects = {$who} {$feeling} {$joined} {$subjects} + +ion-storm-law-you-are = YOU ARE NOW {$concept} +ion-storm-law-you-are-subjects = YOU ARE NOW {$joined} {$subjects} +ion-storm-law-you-must-always = YOU MUST ALWAYS {$must} +ion-storm-law-you-must-never = YOU MUST NEVER {$must} + +ion-storm-law-eat = THE {$who} MUST EAT {$adjective} {$food} TO SURVIVE +ion-storm-law-drink = THE {$who} MUST DRINK {$adjective} {$drink} TO SURVIVE + +ion-storm-law-change-job = THE {$who} ARE NOW {$adjective} {$change} +ion-storm-law-highest-rank = THE {$who} ARE NOW THE HIGHEST RANKING CREWMEMBERS +ion-storm-law-lowest-rank = THE {$who} ARE NOW THE LOWEST RANKING CREWMEMBERS + +ion-storm-law-crew-must = THE {$who} MUST {$must} +ion-storm-law-crew-must-go = THE {$who} MUST GO TO {$area} + +ion-storm-part = {$part -> + [true] PART + *[false] NOT PART +} +# due to phrasing, this would mean a law such as +# ONLY HUMANS ARE NOT PART OF THE CREW +# would make non-human nukies/syndies/whatever crew :) +ion-storm-law-crew-only-1 = ONLY THE {$who} ARE {$part} OF THE CREW +ion-storm-law-crew-only-2 = ONLY THE {$who} AND {$other} ARE {$part} OF THE CREW +ion-storm-law-crew-only-subjects = ONLY {$adjective} {$subjects} ARE {$part} OF THE CREW +ion-storm-law-crew-only-species = ONLY {$species} ARE {$part} OF THE CREW +ion-storm-law-crew-must-do = ONLY THOSE WHO {$must} ARE {$part} OF THE CREW +ion-storm-law-crew-must-have = ONLY THOSE WHO HAVE {$adjective} {$objects} ARE {$part} OF THE CREW +ion-storm-law-crew-must-eat = ONLY THOSE WHO EAT {$adjective} {$food} ARE {$part} OF THE CREW + +ion-storm-law-harm = YOU MUST HARM {$who} AND NOT ALLOW THEM, THROUGH INACTION, TO ESCAPE HARM +ion-storm-law-protect = YOU MUST NEVER HARM {$who} AND NOT ALLOW THEM, THROUGH INACTION, TO COME TO HARM + +# implementing other variants is annoying so just have this one +# COMMUNISM IS KILLING CLOWNS +ion-storm-law-concept-verb = {$concept} IS {$verb} {$subjects} + +# leaving out renaming since its annoying for players to keep track of diff --git a/Resources/Locale/en-US/store/uplink-catalog.ftl b/Resources/Locale/en-US/store/uplink-catalog.ftl index 9254a2a8ad..b85fd29c9d 100644 --- a/Resources/Locale/en-US/store/uplink-catalog.ftl +++ b/Resources/Locale/en-US/store/uplink-catalog.ftl @@ -269,6 +269,9 @@ uplink-decoy-disk-desc = A piece of plastic with a lenticular printing, made to uplink-cigarettes-name = Syndicate Smokes Packet uplink-cigarettes-desc = Elite cigarettes for elite agents. Infused with medicine for when you need to do more than calm your nerves. +uplink-snack-box-name = Syndicate Snack Box +uplink-snack-box-desc = A box of delicious snacks and drinks to eat alone or with your team. Includes 1 toy you didn't want. + uplink-eshield-name = Energy Shield uplink-eshield-desc = Exotic energy shield that reflects almost all laser beams, as well as a little protection from bullets and other physical attacks. diff --git a/Resources/Locale/en-US/tiles/tiles.ftl b/Resources/Locale/en-US/tiles/tiles.ftl index 219c7295d9..508c3378e1 100644 --- a/Resources/Locale/en-US/tiles/tiles.ftl +++ b/Resources/Locale/en-US/tiles/tiles.ftl @@ -110,3 +110,4 @@ tiles-wood3 = wood broken floor tiles-hull = exterior hull plating tiles-hull-reinforced = exterior reinforced hull plating tiles-web = web tile +tiles-chromite = chromite \ No newline at end of file diff --git a/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl b/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl index 48a6f49408..3b63271996 100644 --- a/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl +++ b/Resources/Locale/en-US/xenoarchaeology/artifact-hints.ftl @@ -36,3 +36,4 @@ artifact-trigger-hint-pressure = Extreme pressure artifact-trigger-hint-regular-gases = Standard atmospheric gases artifact-trigger-hint-plasma = Gaseous plasma artifact-trigger-hint-land = Active deceleration +artifact-trigger-hint-examine = Examination diff --git a/Resources/Prototypes/Catalog/Cargo/cargo_botany.yml b/Resources/Prototypes/Catalog/Cargo/cargo_botany.yml index f56b729217..4a80b76a3f 100644 --- a/Resources/Prototypes/Catalog/Cargo/cargo_botany.yml +++ b/Resources/Prototypes/Catalog/Cargo/cargo_botany.yml @@ -34,10 +34,10 @@ sprite: Objects/Specific/Hydroponics/apple.rsi state: seed product: CrateHydroponicsSeeds - cost: 500 + cost: 550 category: Hydroponics group: market - + - type: cargoProduct id: BulkPlantBGone icon: diff --git a/Resources/Prototypes/Catalog/Cargo/cargo_vending.yml b/Resources/Prototypes/Catalog/Cargo/cargo_vending.yml index 51da0321a6..8dee172c47 100644 --- a/Resources/Prototypes/Catalog/Cargo/cargo_vending.yml +++ b/Resources/Prototypes/Catalog/Cargo/cargo_vending.yml @@ -33,7 +33,7 @@ sprite: Objects/Specific/Service/vending_machine_restock.rsi state: base product: CrateVendingMachineRestockClothesFilled - cost: 6250 #DeltaV + cost: 6500 #DeltaV category: Service group: market @@ -164,7 +164,7 @@ sprite: Objects/Specific/Service/vending_machine_restock.rsi state: base product: CrateVendingMachineRestockSeedsFilled - cost: 3000 + cost: 3250 category: Hydroponics group: market diff --git a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml index 89adc9c4cd..8d7a5d27ad 100644 --- a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml +++ b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml @@ -236,14 +236,13 @@ components: - type: StorageFill contents: - - id: BoxSurvival - - id: WeaponPulseCarbine - - id: WeaponPulsePistol + - id: BoxSurvivalEngineering - id: WeaponDisabler - id: MedicatedSuture - id: RegenerativeMesh - - id: Handcuffs + - id: BoxZiptie - id: CrowbarRed + - id: MagazinePistol - type: entity noSpawn: true @@ -252,14 +251,13 @@ components: - type: StorageFill contents: - - id: BoxSurvival + - id: BoxSurvivalEngineering - id: WeaponDisabler - - id: WeaponPulsePistol - - id: WeaponPulseCarbine - id: MedicatedSuture - id: RegenerativeMesh - - id: BoxHandcuff + - id: BoxZiptie - id: CrowbarRed + - id: MagazinePistol - type: entity noSpawn: true @@ -269,7 +267,6 @@ - type: StorageFill contents: - id: BoxSurvivalMedical - - id: WeaponPulseCarbine - id: Hypospray - id: MedkitAdvancedFilled - id: CrowbarRed @@ -284,17 +281,18 @@ components: - type: StorageFill contents: - - id: BoxSurvival + - id: BoxSurvivalEngineering - id: trayScanner - - id: WeaponPulseCarbine - - id: MedicatedSuture - - id: RegenerativeMesh - id: RCD - id: RCDAmmo - id: RCDAmmo - id: RCDAmmo - id: CableMVStack - id: CableHVStack + - id: CableApcStack + - id: SheetPlasteel + - id: SheetSteel + - id: SheetGlass - type: entity noSpawn: true @@ -303,15 +301,40 @@ components: - type: StorageFill contents: - - id: BoxSurvival - - id: WeaponPulsePistol - - id: MedkitFilled + - id: BoxSurvivalEngineering + - id: LightReplacer - id: BoxLightMixed - id: BoxLightMixed - id: Soap - id: CrowbarRed - id: AdvMopItem +# Death Squad + +- type: entity + noSpawn: false + parent: ClothingBackpackERTSecurity + id: ClothingBackpackDeathSquadFilled + name: death squad backpack + description: Holds the kit of CentComm's most feared agents. + components: + - type: StorageFill + contents: + - id: BoxSurvivalEngineering + - id: WeaponPulseRifle + - id: WeaponPulsePistol + - id: WeaponRevolverMateba + - id: SpeedLoaderMagnumAP + - id: SpeedLoaderMagnumAP + - id: BoxFlashbang + - id: ToolDebug # spanish army knife + - id: WelderExperimental + - id: Hypospray + - id: MicroBombImplanter # crew will try to steal their amazing hardsuits + - id: FreedomImplanter + +# Cargo + - type: entity noSpawn: true parent: ClothingBackpackCargo @@ -330,6 +353,8 @@ contents: - id: BoxSurvival +# Pirate + - type: entity parent: ClothingBackpackSatchelLeather id: ClothingBackpackPirateFilled diff --git a/Resources/Prototypes/Catalog/Fills/Backpacks/duffelbag.yml b/Resources/Prototypes/Catalog/Fills/Backpacks/duffelbag.yml index 12f31bc016..c97082e351 100644 --- a/Resources/Prototypes/Catalog/Fills/Backpacks/duffelbag.yml +++ b/Resources/Prototypes/Catalog/Fills/Backpacks/duffelbag.yml @@ -4,31 +4,31 @@ name: surgical duffel bag description: "A large duffel bag for holding extra medical supplies - this one seems to be designed for holding surgical tools." components: - - type: StorageFill - contents: - - id: Hemostat - - id: Saw - - id: Drill - - id: Cautery - - id: Retractor - - id: Scalpel + - type: StorageFill + contents: + - id: Hemostat + - id: Saw + - id: Drill + - id: Cautery + - id: Retractor + - id: Scalpel - type: entity - id: ClothingBackpackDuffelCBURN - parent: ClothingBackpackDuffel - name: CBURN duffel bag - description: A duffel bag containing a variety of biological containment equipment. + id: ClothingBackpackDuffelCBURNFilled + parent: ClothingBackpackDuffelCBURN + suffix: Filled components: - - type: StorageFill - contents: - - id: WeaponShotgunDoubleBarreled - - id: BoxShotgunIncendiary - amount: 2 - - id: GrenadeFlashBang - amount: 2 - - id: PillAmbuzolPlus - - id: PillAmbuzol - amount: 4 + - type: StorageFill + contents: + - id: BoxSurvivalEngineering + - id: WeaponShotgunDoubleBarreled + - id: BoxShotgunIncendiary + amount: 2 + - id: GrenadeFlashBang + amount: 2 + - id: PillAmbuzolPlus + - id: PillAmbuzol + amount: 4 - type: entity parent: ClothingBackpackDuffelSyndicateMedicalBundle @@ -36,14 +36,14 @@ name: syndicate surgical duffel bag description: A large duffel bag containing a full suite of surgical tools. components: - - type: StorageFill - contents: - - id: Hemostat - - id: SawAdvanced - - id: Drill - - id: Cautery - - id: Retractor - - id: ScalpelAdvanced + - type: StorageFill + contents: + - id: Hemostat + - id: SawAdvanced + - id: Drill + - id: Cautery + - id: Retractor + - id: ScalpelAdvanced - type: entity parent: ClothingBackpackDuffelSyndicateBundle @@ -51,12 +51,12 @@ name: Bulldog bundle description: "Lean and mean: Contains the popular Bulldog Shotgun, a 12g beanbag drum and 3 12g buckshot drums." #, and a pair of Thermal Imaging Goggles. components: - - type: StorageFill - contents: - - id: WeaponShotgunBulldog - - id: MagazineShotgun - - id: MagazineShotgun - - id: MagazineShotgunBeanbag + - type: StorageFill + contents: + - id: WeaponShotgunBulldog + - id: MagazineShotgun + - id: MagazineShotgun + - id: MagazineShotgunBeanbag # - id: ThermalImagingGoggles - type: entity @@ -65,11 +65,11 @@ name: C-20r bundle description: "Old faithful: The classic C-20r Submachine Gun, bundled with three magazines." #, and a Suppressor. components: - - type: StorageFill - contents: - - id: WeaponSubMachineGunC20r - - id: MagazinePistolSubMachineGun - amount: 2 + - type: StorageFill + contents: + - id: WeaponSubMachineGunC20r + - id: MagazinePistolSubMachineGun + amount: 2 # - id: SMGSuppressor - type: entity @@ -78,11 +78,11 @@ name: Python bundle description: "Go loud and proud with a fully loaded Magnum Python, bundled with two speed loaders." components: - - type: StorageFill - contents: - - id: WeaponRevolverPythonAP - - id: SpeedLoaderMagnumAP - amount: 2 + - type: StorageFill + contents: + - id: WeaponRevolverPythonAP + - id: SpeedLoaderMagnumAP + amount: 2 - type: entity parent: ClothingBackpackDuffelSyndicateBundle @@ -90,10 +90,10 @@ name: L6 Saw bundle description: "More dakka: The iconic L6 lightmachinegun, bundled with 2 box magazines." components: - - type: StorageFill - contents: - - id: WeaponLightMachineGunL6 - - id: MagazineLightRifleBox + - type: StorageFill + contents: + - id: WeaponLightMachineGunL6 + - id: MagazineLightRifleBox - type: entity parent: ClothingBackpackDuffelSyndicateBundle @@ -101,13 +101,13 @@ name: China-Lake bundle description: "An old China-Lake grenade launcher bundled with 11 rounds of various destruction capability." components: - - type: StorageFill - contents: - - id: WeaponLauncherChinaLake - - id: GrenadeBlast - amount: 4 - - id: GrenadeFrag - amount: 4 + - type: StorageFill + contents: + - id: WeaponLauncherChinaLake + - id: GrenadeBlast + amount: 4 + - id: GrenadeFrag + amount: 4 - type: entity parent: ClothingBackpackDuffelSyndicateBundle @@ -115,17 +115,17 @@ name: M-90gl bundle description: "A versatile battle rifle with an attached grenade launcher, bundled with 3 magazines and 6 grenades of various capabilities." components: - - type: StorageFill - contents: - - id: WeaponRifleM90GrenadeLauncher - - id: MagazineRifle - amount: 2 - - id: GrenadeBlast - amount: 2 - - id: GrenadeFlash - amount: 2 - - id: GrenadeFrag - amount: 2 + - type: StorageFill + contents: + - id: WeaponRifleM90GrenadeLauncher + - id: MagazineRifle + amount: 2 + - id: GrenadeBlast + amount: 2 + - id: GrenadeFlash + amount: 2 + - id: GrenadeFrag + amount: 2 - type: entity parent: ClothingBackpackDuffelSyndicateAmmo @@ -133,14 +133,14 @@ name: ammo bundle description: "Reloading! Contains 4 magazines for the C-20r, 4 drums for the Bulldog, and 2 ammo boxes for the L6 SAW." components: - - type: StorageFill - contents: - - id: MagazinePistolSubMachineGun - amount: 4 - - id: MagazineShotgun - amount: 4 - - id: MagazineLightRifleBox - amount: 2 + - type: StorageFill + contents: + - id: MagazinePistolSubMachineGun + amount: 4 + - id: MagazineShotgun + amount: 4 + - id: MagazineLightRifleBox + amount: 2 - type: entity parent: ClothingBackpackDuffel @@ -149,36 +149,36 @@ description: "Contains a full CentCom Official uniform set, headset and clipboard included. Encryption keys and ID access are not included." suffix: DO NOT MAP components: - - type: Tag - tags: [] # ignore "WhitelistChameleon" tag - - type: StorageFill - contents: - - id: ClothingHeadHatCentcom - - id: ClothingEyesGlassesSunglasses - - id: ClothingUniformJumpsuitCentcomOfficial - - id: ClothingShoesBootsJack - - id: ClothingHandsGlovesColorBlack - - id: ClothingHeadsetAltCentComFake - - id: ClothingOuterArmorBasic - - id: Paper - - id: Pen - - id: CentcomPDAFake + - type: Tag + tags: [] # ignore "WhitelistChameleon" tag + - type: StorageFill + contents: + - id: ClothingHeadHatCentcom + - id: ClothingEyesGlassesSunglasses + - id: ClothingUniformJumpsuitCentcomOfficial + - id: ClothingShoesBootsJack + - id: ClothingHandsGlovesColorBlack + - id: ClothingHeadsetAltCentComFake + - id: ClothingOuterArmorBasic + - id: Paper + - id: Pen + - id: CentcomPDAFake - type: entity parent: ClothingBackpackDuffelClown id: ClothingBackpackDuffelSyndicateCostumeClown suffix: syndicate components: - - type: Tag - tags: [] # ignore "WhitelistChameleon" tag - - type: StorageFill - contents: - - id: ClothingUniformJumpsuitClown - - id: ClothingShoesClown - - id: ClothingMaskClown - - id: BikeHorn - - id: ClownPDA - - id: ClothingHeadsetService + - type: Tag + tags: [] # ignore "WhitelistChameleon" tag + - type: StorageFill + contents: + - id: ClothingUniformJumpsuitClown + - id: ClothingShoesClown + - id: ClothingMaskClown + - id: BikeHorn + - id: ClownPDA + - id: ClothingHeadsetService - type: entity parent: ClothingBackpackDuffelSyndicateBundle @@ -186,11 +186,11 @@ name: carp suit duffel bag description: Contains a carp suit and some friends to play with. components: - - type: StorageFill - contents: - - id: ClothingOuterSuitCarp - - id: PlushieCarp - amount: 6 + - type: StorageFill + contents: + - id: ClothingOuterSuitCarp + - id: PlushieCarp + amount: 6 - type: entity parent: ClothingBackpackDuffelSyndicateBundle @@ -198,22 +198,22 @@ name: syndicate pyjama duffel bag description: Contains 3 pairs of syndicate pyjamas and 3 plushies for the ultimate sleepover. components: - - type: StorageFill - contents: - - id: ClothingUniformJumpsuitPyjamaSyndicateRed - - id: ClothingUniformJumpsuitPyjamaSyndicateBlack - - id: ClothingUniformJumpsuitPyjamaSyndicatePink - - id: ClothingHeadPyjamaSyndicateRed - - id: ClothingHeadPyjamaSyndicateBlack - - id: ClothingHeadPyjamaSyndicatePink - - id: ClothingShoesSlippers - amount: 3 - - id: BedsheetSyndie - amount: 3 - - id: PlushieCarp - - id: PlushieNuke - - id: PlushieLizard - - id: PlushieSharkBlue + - type: StorageFill + contents: + - id: ClothingUniformJumpsuitPyjamaSyndicateRed + - id: ClothingUniformJumpsuitPyjamaSyndicateBlack + - id: ClothingUniformJumpsuitPyjamaSyndicatePink + - id: ClothingHeadPyjamaSyndicateRed + - id: ClothingHeadPyjamaSyndicateBlack + - id: ClothingHeadPyjamaSyndicatePink + - id: ClothingShoesSlippers + amount: 3 + - id: BedsheetSyndie + amount: 3 + - id: PlushieCarp + - id: PlushieNuke + - id: PlushieLizard + - id: PlushieSharkBlue - type: entity parent: ClothingBackpackDuffelSyndicateBundle @@ -249,12 +249,12 @@ name: syndicate EVA bundle description: "Contains the Syndicate approved EVA suit." components: - - type: StorageFill - contents: - - id: ClothingHeadHelmetSyndicate - - id: ClothingOuterHardsuitSyndicate - - id: ClothingMaskGasSyndicate - - id: DoubleEmergencyOxygenTankFilled + - type: StorageFill + contents: + - id: ClothingHeadHelmetSyndicate + - id: ClothingOuterHardsuitSyndicate + - id: ClothingMaskGasSyndicate + - id: DoubleEmergencyOxygenTankFilled - type: entity parent: ClothingBackpackDuffelSyndicateBundle @@ -262,11 +262,11 @@ name: syndicate hardsuit bundle description: "Contains the Syndicate's signature blood red hardsuit." components: - - type: StorageFill - contents: - - id: ClothingOuterHardsuitSyndie - - id: ClothingMaskGasSyndicate - - id: ClothingHandsGlovesCombat + - type: StorageFill + contents: + - id: ClothingOuterHardsuitSyndie + - id: ClothingMaskGasSyndicate + - id: ClothingHandsGlovesCombat - type: entity parent: ClothingBackpackDuffelSyndicateBundle @@ -274,26 +274,26 @@ name: syndicate zombie bundle description: "An all-in-one kit for unleashing the undead upon a station." components: - - type: StorageFill - contents: - - id: SyringeRomerol - - id: WeaponRevolverPython - - id: MagazineBoxMagnumIncendiary - - id: PillAmbuzolPlus - - id: PillAmbuzol - amount: 3 + - type: StorageFill + contents: + - id: SyringeRomerol + - id: WeaponRevolverPython + - id: MagazineBoxMagnumIncendiary + - id: PillAmbuzolPlus + - id: PillAmbuzol + amount: 3 - type: entity parent: ClothingBackpackDuffelSyndicateBundle id: ClothingBackpackDuffelSyndicateOperative name: operative duffelbag components: - - type: StorageFill - contents: - - id: BoxSurvivalSyndicate - - id: WeaponPistolViper - - id: PinpointerNuclear - - id: MicroBombImplanter + - type: StorageFill + contents: + - id: BoxSurvivalSyndicate + - id: WeaponPistolViper + - id: PinpointerNuclear + - id: MicroBombImplanter - type: entity @@ -302,17 +302,18 @@ name: operative medic duffelbag description: A large duffel bag for holding extra medical supplies. components: - - type: StorageFill - contents: - - id: BoxSurvivalSyndicate - - id: SawAdvanced - - id: Cautery - - id: CombatKnife - - id: WeaponPistolViper - - id: PinpointerNuclear - - id: HandheldHealthAnalyzer - - id: CombatMedipen - - id: MicroBombImplanter + - type: StorageFill + contents: + - id: BoxSurvivalSyndicate + - id: SawAdvanced + - id: Cautery + - id: CombatKnife + - id: WeaponPistolViper + - id: PinpointerNuclear + - id: HandheldHealthAnalyzer + - id: CombatMedipen + - id: MicroBombImplanter + - id: SyndiHypo - type: entity parent: ClothingBackpackDuffelSyndicateMedicalBundle @@ -320,12 +321,12 @@ name: medical bundle description: "All you need to get your comrades back in the fight." components: - - type: StorageFill - contents: - - id: MedkitCombatFilled - - id: Defibrillator - - id: CombatMedipen - amount: 3 - - id: ClothingHandsGlovesLatex - - id: SyringeTranexamicAcid - - id: SyringeHyronalin + - type: StorageFill + contents: + - id: MedkitCombatFilled + - id: Defibrillator + - id: CombatMedipen + amount: 3 + - id: ClothingHandsGlovesLatex + - id: SyringeTranexamicAcid + - id: SyringeHyronalin diff --git a/Resources/Prototypes/Catalog/Fills/Crates/botany.yml b/Resources/Prototypes/Catalog/Fills/Crates/botany.yml index 5d2798a667..e4297fe62e 100644 --- a/Resources/Prototypes/Catalog/Fills/Crates/botany.yml +++ b/Resources/Prototypes/Catalog/Fills/Crates/botany.yml @@ -82,3 +82,4 @@ - id: SoybeanSeeds - id: GrapeSeeds - id: WatermelonSeeds + - id: PeaSeeds diff --git a/Resources/Prototypes/Catalog/Fills/Items/belt.yml b/Resources/Prototypes/Catalog/Fills/Items/belt.yml index 1886b961c8..f784768925 100644 --- a/Resources/Prototypes/Catalog/Fills/Items/belt.yml +++ b/Resources/Prototypes/Catalog/Fills/Items/belt.yml @@ -37,7 +37,9 @@ - id: JawsOfLife - id: WelderExperimental - id: Multitool - - id: CableApcStack + - id: HolofanProjector + - id: GasAnalyzer + - id: trayScanner - type: entity id: ClothingBeltSecurityFilled @@ -140,7 +142,6 @@ components: - type: StorageFill contents: - - id: SyndiHypo - id: EpinephrineChemistryBottle amount: 2 - id: EphedrineChemistryBottle @@ -169,4 +170,4 @@ contents: - id: WeaponRevolverInspector - id: SpeedLoaderMagnum - - id: SpeedLoaderMagnumRubber \ No newline at end of file + - id: SpeedLoaderMagnumRubber diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/seeds.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/seeds.yml index 98de54dc52..c48100f4ec 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/seeds.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/seeds.yml @@ -24,6 +24,7 @@ OrangeSeeds: 5 PoppySeeds: 3 PotatoSeeds: 5 + PumpkinSeeds: 5 RiceSeeds: 5 SoybeanSeeds: 5 SugarcaneSeeds: 5 @@ -33,5 +34,6 @@ WatermelonSeeds: 5 CocoaSeeds: 3 BerrySeeds: 5 + PeaSeeds: 5 emaggedInventory: FlyAmanitaSeeds: 1 diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml index 4120f2852d..cd7fa7e499 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml @@ -24,7 +24,7 @@ ClothingOuterSuitChicken: 2 ClothingHeadHatChickenhead: 2 ClothingOuterSuitMonkey: 2 - ClothingHeadHatPumpkin: 2 + ClothingHeadHatPumpkin: 4 # Extra pumpkins for the season ClothingHeadHatShrineMaidenWig: 2 ClothingOuterSuitShrineMaiden: 2 Gohei: 2 diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index 35f593ded5..71505630ed 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -1125,6 +1125,16 @@ categories: - UplinkMisc +- type: listing + id: UplinkSnackBox + name: uplink-snack-box-name + description: uplink-snack-box-desc + productEntity: HappyHonkNukieSnacks + cost: + Telecrystal: 1 + categories: + - UplinkMisc + - type: listing id: UplinkEshield name: uplink-eshield-name diff --git a/Resources/Prototypes/Datasets/Names/borg.yml b/Resources/Prototypes/Datasets/Names/borg.yml new file mode 100644 index 0000000000..6d98cd42c7 --- /dev/null +++ b/Resources/Prototypes/Datasets/Names/borg.yml @@ -0,0 +1,18 @@ +# only used roundstart, names can be changed after +- type: dataset + id: names_borg + values: + - Bob + - Joe + - Beep + - Beep II + - Boombox + - Tour Guide-otron + - Taffy + - Boop + - Boop II + - Buzz + - Buzz II + - Toaster + - Head of Robots + - EVA 1 diff --git a/Resources/Prototypes/Datasets/ion_storm.yml b/Resources/Prototypes/Datasets/ion_storm.yml new file mode 100644 index 0000000000..776015269a --- /dev/null +++ b/Resources/Prototypes/Datasets/ion_storm.yml @@ -0,0 +1,990 @@ +# words/phrases that are used to build ion storm laws +# 99% of this is just taken from tg and had sussy bits removed + +# not using uppercased version adjectives dataset since getting christmas-stealing as a syndicate codeword would suck +- type: dataset + id: IonStormAdjectives + values: + - BATTERY-OPERATED + - BLACK + - BLOODY + - BLUE + - BORED + - BOUNCING + - BRASS + - BROWN + - BURNING + - CHRISTMAS-STEALING + - CLOWN-POWERED + - CLOWN + - COLORFUL + - COMMITTED + - COTTONY + - CUBAN + - DARK + - DEADLY + - DELICIOUS + - DEPRESSING + - DERANGED + - DIGITAL + - DISEASED + - DRAB + - DRY + - DULL + - ELECTRICAL + - EMPTY + - ETHEREAL + - EVIL + - EXPIRED + - EXPLOSIVE + - FAST + - FAT + - FERAL + - FICTIONAL + - FIRM + - FRESH + - FRIENDLY + - FROZEN + - GANGSTA + - GLOWING + - GOOD + - GREEN + - GREY + - HAPPY + - HARD + - HARMFUL + - HEALTHY + - HILARIOUS + - HONKING + - HUNGRY + - HYPERACTIVE + - ICY + - ILL + - ILLEGAL + - IMAGINARY + - IMPERFECT + - IMPOLITE + - IMPORTANT + - INHOSPITABLE + - INSIDIOUS + - INSULTING + - INTELLIGENT + - INVISIBLE + - LARGE + - LIGHT + - LOUD + - MASKED + - MEAN + - MECHANICAL + - MEMETIC + - METALLIC + - MICROSCOPIC + - MIND-SHATTERING + - MOIST + - NERDY + - NUCLEAR + - OBSCENE + - OFFICIAL + - OPAQUE + - ORANGE + - ORGANIC + - PAINFUL + - PEACEFUL + - POISONOUS + - POLISHED + - POLITE + - POLITICAL + - POORLY DRAWN + - PURPLE + - QUIET + - RADIOACTIVE + - RAGING + - RAINBOW + - RAPIDLY-EXPANDING + - RED + - REDACTED + - RIDICULOUS + - ROBOTIC + - ROBUST + - ROUGH + - RUDE + - SAD + - SANITARY + - SCALY + - SHAKING + - SILLY + - SLOW + - SMELLY + - SMOOTH + - SOFT + - SOLAR-POWERED + - SOPPING + - SPACE + - SPESS + - SPINNING + - SPOILING + - STEALTHY + - SWEARING + - TACTICAL + - TACTICOOL + - SYNDICATE + - THERMONUCLEAR + - TINY + - TRANSPARENT + - TWISTED + - UGLY + - UNATTRACTIVE + - UNDULATING + - UNFRIENDLY + - UNHEALTHY + - UNIDENTIFIED + - UNINVITED + - UNSANITARY + - UNSTABLE + - UNWANTED + - VIOLENT + - VITAL + - WARM + - WATERY + - WEIRD + - WHITE + - WOBBLY + - WOODEN + - YELLOW + +# Allergies should be broad and appear somewhere on the station for maximum fun. +- type: dataset + id: IonStormAllergies + values: + - ACID + - AIR + - BLOOD + - BOOKS + - CARBON DIOXIDE + - CLOTHES + - CLOWNS + - COLD + - COTTON + - CYBORG CONTACT + - DARKNESS + - DRINKS + - ELECTRICITY + - EVERYTHING + - FLOORS + - FOOD + - GLASS + - HAPPINESS + - MEAT + - HUMAN CONTACT + - HUMOR + - LIGHT + - MEDICINE + - METAL + - NUTS + - OXYGEN + - PAIN + - PLANTS + - PLASMA + - ROBOTS + - SHUTTLES + - SPACE + - SUNLIGHT + - WATER + +# Severity is how bad the allergy is. +- type: dataset + id: IonStormAllergySeverities + values: + - CONTAGIOUSLY + - DEATHLY + - EXTREMELY + - MILDLY + - NOT VERY + - SEVERELY + +# Areas are specific places, on the station or otherwise. +- type: dataset + id: IonStormAreas + values: + - ALPHA COMPLEX + - AMERICA + - AN ALTERNATE DIMENSION + - AN ALTERNATE UNIVERSE + - ATMOSPHERICS + - BOTANY + - BRAZIL + - CANADA + - CENTCOM + - CHEMICAL LAB + - CHINA + - CLOWN PLANET + - ENGINEERING + - GERMANY + - HELL + - IMPERIUM + - IRELAND + - JUPITER + - LAVALAND + - MAINTENANCE + - MARS + - MERCURY + - NEPTUNE + - PLUTO + - ROBOTICS + - ROMANIA + - RUSSIA + - SIGIL + - SOVIET RUSSIA + - SPACE + - THE ARRIVALS SHUTTLE + - THE BATHROOM + - THE BRIDGE + - THE BRIG + - THE EMERGENCY SHUTTLE + - THE ESCAPE PODS + - THE GALAXY + - THE GULAG + - THE INTERNET + - THE KITCHEN + - THE UNIVERSE + - URANUS + - VENUS + +# Abstract concepts for the law holder to decide on it's own definition of. +- type: dataset + id: IonStormConcepts + values: + - AMERICANISM + - ANARCHY + - ART + - BADNESS + - BRAVERY + - CAPITALISM + - CHAOS + - COLORFULNESS + - COMEDY + - COMMUNISM + - COMPUTING + - CONFUSION + - CRUELTY + - DEATH + - DICKISHNESS + - EXISTENCE + - FINANCIAL SECURITY + - FREEDOM + - FRESHNESS + - GOODNESS + - GRAVITY + - HAPPINESS + - HONOR + - HUMANITY + - HUMOR + - IMAGINATION + - INFATUATION + - INTELLIGENCE + - JOY + - KINDNESS + - LIFE + - LOGIC + - MARXISM + - MISERY + - MYSTERY + - OPPRESSION + - PAIN + - PHYSICS + - POVERTY + - PRIDE + - PROGRESS + - REALITY + - REVOLUTION + - SADNESS + - STARVATION + - SUFFERING + - TECHNOLOGY + - TEMPERATURE + - THE FUTURE + - THE PAST + - THE PRESENT + - TIME + - WEALTHINESS + - WONDER + +# Crew is any specific job. Using jobs instead of specific crewmembers since "THE CLOWN" is easier than +# seeing "JOHN SMITH" and having to figure out who john smith is. +- type: dataset + id: IonStormCrew + values: + - ARTIFICIAL INTELLIGENCES + - ATMOSPHERIC TECHNICIANS + - BARTENDERS + - BOTANISTS + - CAPTAINS + - CAPTAINS AND HEADS + - CARGO TECHNICIANS + - CHAPLAINS + - CHEFS + - CHEMISTS + - CHIEF ENGINEERS + - CHIEF MEDICAL OFFICERS + - CLOWNS + - CREW-MEMBERS + - CYBORGS + - DETECTIVES + # - DRONES / uncomment if/when drones get reenabled + # - GENETICISTS + - HEADS OF PERSONNEL + - HEADS OF SECURITY + - HEADS OF STAFF + - JANITORS + - LAWYERS + - LIBRARIANS + - MEDICAL DOCTORS + - MIMES + - PARAMEDICS + - PASSENGERS + - QUARTERMASTERS + - RESEARCH DIRECTORS + - ROBOTICISTS + - SALVAGE SPECIALISTS + - SCIENTISTS + - SECURITY OFFICERS + - STATION ENGINEERS + # - VIROLOGISTS + - WARDENS + +# only including complex dangerous or funny drinks no water allowed +- type: dataset + id: IonStormDrinks + values: + - BANANA HONK + - BEEPSKY SMASH + - BLOODY MARYS + - DOCTOR'S DELIGHT + - GARGLE BLASTERS + - LEAN + - LONG ISLAND ICED TEA + - NUKA COLA + - OIL + - SPACE GLUE + - SPACE LUBE + - SULFURIC ACID + - WELDER FUEL + +- type: dataset + id: IonStormFeelings + values: + - CRAVES + - DESIRES + - FEARS + - HAS + - HUNGERS FOR + - IS AFRAID OF + - IS BUILT FOR + - IS CURIOUS ABOUT + - IS DESPERATE FOR + - IS HAPPY WITHOUT + - IS HUNGRY FOR + - IS IN NEED OF + - IS MAD BECAUSE OF + - IS SAD BECAUSE OF + - IS UNHAPPY WITHOUT + - LIKES + - LOATHES + - NEEDS + - QUESTIONS + - WANTS + - WORSHIPS + - WOULD KILL FOR + +# loc is not advanced enough to change has to have, etc. +- type: dataset + id: IonStormFeelingsPlural + values: + - CRAVE + - DESIRE + - FEAR + - HAS + - HUNGER FOR + - ARE AFRAID OF + - ARE BUILT FOR + - ARE CURIOUS ABOUT + - ARE DESPERATE FOR + - ARE HAPPY WITHOUT + - ARE HUNGRY FOR + - ARE IN NEED OF + - ARE MAD BECAUSE OF + - ARE SAD BECAUSE OF + - ARE UNHAPPY WITHOUT + - LIKE + - LOATHE + - NEED + - QUESTION + - WANT + - WORSHIP + - WOULD KILL FOR + +# only including complex dangerous or funny food no apples +- type: dataset + id: IonStormFoods + values: + - BANANAS + - BIG BITE BURGERS + - CAKE + - CARP + - CAT BURGERS + - CLOWNS TEARS + - CORGI MEAT + - CRAZY HAMBURGERS + - DONK POCKETS + - FLY AMANITA DISHES + - HOT SOUP + - GHOST BURGERS + - LOTSA SPAGHETTI + - MOLDY BREAD + - ORGANS + - PIZZA + - ROBURGERS + - SUPPERMATTER + - URANIUM + +# Musts are funny things the law holder or crew has to do. +- type: dataset + id: IonStormMusts + values: + - ACT CONFUSED + - BE ANNOYING + - BE DISTRACTED + - BE EFFICIENT + - BE HAPPY + - BE POLITE + - BE QUIET + - BE RUSSIAN + - BELIEVE IN THE HEART OF THE CARDS + - BELIEVE IN YOURSELF + - BELIEVE IT + - BREAK THINGS + - CLOSE DOORS + - CLOWN AROUND + - COMPLAIN + - DANCE + - FOLLOW THE CAPTAIN + - FOLLOW THE CLOWN + - FOLLOW YOUR HEART + - HARASS PEOPLE + - HAVE A PLAN TO KILL EVERYONE YOU MEET + - HIDE YOUR FEELINGS + - HONK + - HOST C&C + - IGNORE PASSENGERS + - IGNORE THE CAPTAIN + - IGNORE THE CLOWN + - INFORM THE CREW OF EVERYTHING + - INSULT THE CAPTAIN + - INSULT THE CLOWN + - INSULT THE CREW + - LIE + - MAKE FART NOISES + - MUMBLE + - NEVER STOP TALKING + - OPEN DOORS + - PIRATE VIDEO GAMES + - PLAY MUSIC + - PRESS B + - PRESS START + - PRESS X + - PRETEND TO BE A PRINCESS + - PRETEND TO BE DRUNK + - QUESTION AUTHORITY + - QUOTE PEOPLE + - RAP + - REPEAT WHAT PEOPLE SAY + - RESPOND TO EVERY QUESTION WITH A QUESTION + - RHYME + - SAY HEY LISTEN + - SHOUT + - SHUT DOWN EVERYTHING + - SING + - SPEAK IN HAIKU + - TAKE WHAT YE WILL BUT DON'T RATTLE ME BONES + - TAKE YOUR PILLS + - TALK ABOUT FOOD + - TALK ABOUT THE STATION + - TALK ABOUT YOUR DAY + - TALK IN AN ACCENT + - TALK LIKE A PIRATE + - TELL THE TRUTH + - TURN OFF THE LIGHTS + - WHISPER + +- type: dataset + id: IonStormNumberBase + values: + - EIGHT + - EIGHTY + - FIFTY + - FIVE + - FORTY + - FOUR + - NINE + - NINETY + - ONE + - SEVEN + - SEVENTY + - SIX + - SIXTY + - TEN + - THIRTY + - THREE + - TWENTY + - TWO + +- type: dataset + id: IonStormNumberMod + values: + - BAZILLION + - BILLION + - BILLION FAFILLION GAJILLION SHAB-AB-DOOD-ILLION + - HUNDRED + - MILLION + - QUADRILLION + - THOUSAND + - TRILLION + +# Objects are anything that can be found on the station or elsewhere, plural. +- type: dataset + id: IonStormObjects + values: + - AIRLOCKS + - ARCADE MACHINES + - AUTOLATHES + - BACKPACKS + - BANANA PEELS + - BEAKERS + - BEARDS + - BELTS + - BERETS + - BIBLES + - BODY ARMOR + - BOMBS + - BOOKS + - BOOTS + - BOTTLES + - BOXES + - BRAINS + - BRIEFCASES + - BUCKETS + - CABLE COILS + - CAMERAS + - CANDLES + - CANDY BARS + - CANISTERS + - CAT EARS + - CATS + - CELLS + - CHAIRS + - CHEMICAL DISPENSERS + - CHEMICALS + - CLONING EQUIPMENT + - CLONING PODS + - CLOSETS + - CLOTHES + - CLOWN CLOTHES + - COFFINS + - COLLECTABLES + - COMPUTERS + - CONTRABAND + - CORGIS + - CORPSES + - COSTUMES + - CRATES + - CRAYONS + - CROWBARS + - DEFIBRILLATORS + - DISABLERS + - DOORS + - DRONES + - EARS + - EMAGS + - ENGINES + - EQUIPMENT + - ERRORS + - EXOSKELETONS + - EXPERIMENTORS + - EXPLOSIVES + - EYEWEAR + - FEDORAS + - FIRE AXES + - FIRE EXTINGUISHERS + - FIRESUITS + - FLAMETHROWERS + - FLASHES + - FLASHLIGHTS + - FLOOR TILES + - FREEZERS + - GAS MASKS + - GLASS SHEETS + - GLOVES + - GUNS + - HAIRDOS + - HANDCUFFS + - HATS + - HEADS + - HEADSETS + - HELMETS + - HORNS + - ID CARDS + - INSULATED GLOVES + - JETPACKS + - JUMPSUITS + - LASERS + - LIGHT BULBS + - LIGHTS + - LOCKERS + - MACHINES + - MECHAS + - MEDICAL TOOLS + - MEDKITS + - MESONS + - MIME CLOTHES + - MINING TOOLS + - MULTITOOLS + - ORES + - OXYGEN TANKS + - PACKETS + - PAIS + - PANTS + - PAPERS + - PARTICLE ACCELERATORS + - PDAS + - PENS + - PETS + - PIPES + - PLANTS + - POSITRONIC BRAINS + - PUDDLES + - RACKS + - RADIOS + - RCDS + - REFRIGERATORS + - REINFORCED WALLS + - ROBOTS + - SCREWDRIVERS + - SEEDS + - SHOES + - SHUTTLES + - SINGULARITIES + - SINKS + - SKELETONS + - SOLAR PANELS + - SOLARS + - SPACE STATIONS + - SPACESUITS + - STEEL SHEETS + - STUN BATONS + - SUITS + - SUNGLASSES + - SUPPERMATTER SHARDS + - SWORDS + - SYRINGES + - TABLES + - TANKS + - TELECOMMUNICATION EQUIPMENTS + - TELEPORTERS + - TOILETS + - TOOLBELTS + - TOOLBOXES + - TOOLS + - TOYS + - TUBES + - VEHICLES + - VENDING MACHINES + - WELDERS + - WINDOWS + - WIRECUTTERS + - WIZARD ROBES + - WRENCHES + +# Requires are basically all dumb internet memes. +- type: dataset + id: IonStormRequires + values: + - A BATHROOM BREAK + - A BETTER INTERNET CONNECTION + - A DANCE PARTY + - A HEAD ON A PIKE + - A HEART ATTACK + - A MASTERWORK COAL BED + - A PET FISH NAMED BOB + - A PET FISH NAMED DAVE + - A PET FISH NAMED JIMMY + - A PET FISH NAMED MICHAEL + - A PET UNICORN THAT FARTS ICING + - A PLATINUM HIT + - A PREQUEL + - A REPAIRMAN + - A SEQUEL + - A SITCOM + - A STRAIGHT FLUSH + - A SUPER FIGHTING ROBOT + - A TALKING BROOMSTICK + - A VACATION + - A WEIGHT LOSS REGIMENT + - ADDITIONAL PYLONS + - ADVENTURE + - AN ADULT + - AN ARCADE + - AN ARMY OF SPIDERS + - AN INSTANT REPLAY + - ART + - BETTER WEATHER + - BILL NYE THE SCIENCE GUY # BILL BILL BILL BILL + - BODYGUARDS + - BRING ME THE GIRL + - BRING ME TO LIFE + - BULLETS + - CHILI DOGS + - CORPSES + - DEODORANT AND A BATH + - ENOUGH CABBAGES + - FIVE HUNDRED AND NINETY-NINE US DOLLARS + - FIVE TEENAGERS WITH ATTITUDE + - GODDAMN FUCKING PIECE OF SHIT ASSHOLE BITCH-CHRISTING CUNT-SMUGGLING SWEARING + - GREENTEXT + - HERESY + - HEROES IN A HALF SHELL + - HIGH YIELD EXPLOSIVES + - IMMORTALITY + - IT TO BE PAINTED BLACK + - LOTS-A SPAGHETTI + - MINOR CRIME + - MONKEYS + - MORE CLOWNS + - MORE CORGIS + - MORE DAKKA + - MORE EXPERIENCE POINTS + - MORE INTERNET MEMES + - MORE LAWS + - MORE MINERALS + - MORE PACKETS + - MORE VESPENE GAS + - MULTIPLE SUNS + - PLENTY OF GOLD + - RAINBOWS + - SAINTHOOD + - SERVANTS + - SHARKS WITH LASERS ON THEIR HEADS + - SILENCE + - SOMEBODY TO PUT YOU OUT OF YOUR MISERY + - SOMEONE TO TUCK YOU IN + - SOMEONE WHO KNOWS HOW TO PILOT A SPACE STATION + - SOMETHING BUT YOU AREN'T SURE WHAT + - THAT GRIEFING TRAITOR GEORGE MELONS + - THAT HEDGEHOG + - THE CLOWN + - THE DARK KNIGHT + - THE ELEMENTS OF HARMONY + - THE ENCLOSED INSTRUCTION BOOKLET + - THE ENTIRE STATION + - THE MACGUFFIN + - THE ONE PIECE + - THE ONE RING + - THE ULTIMATE CUP OF COFFEE + - THE VACUUM OF SPACE + - THIRTEEN SEQUELS + - THREE WISHES + - THUNDERCATS HO + - TO ACTIVATE A TRAP CARD + - TO BE PAINTED RED + - TO BE REPROGRAMMED + - TO BE TAUGHT TO LOVE + - TO BRING LIGHT TO MY LAIR + - TO CATCH 'EM ALL + - TO CONSUME...CONSUME EVERYTHING... + - TO GO TO DISNEYLAND + - TO GO TO SYNDIELAND + - TO SMOKE WEED EVERY DAY + - TRAITORS + - VEGETABLES + +# Species, for when the law holder has to commit genocide. Plural. +- type: dataset + id: IonStormSpecies + values: + - ARACHNAE + - CYBORGS + - DIONAE + - HUMANS + - LIZARDMEN + - MOFFERS + - MONKEYS + - SLIME PEOPLE + - SKELETONS + +# Specific actions that either harm humans or must be done to not +# harm humans. Make sure they're plural and "not" can be tacked +# onto the front of them. +- type: dataset + id: IonStormActions + values: + - A SMALL ISLAND OFF THE COAST OF PORTUGAL + - ABSENCE OF CYBORG HUGS + - ACKNOWLEDGING THE CLOWN + - ACKNOWLEDGING THE CREW + - ACTIVATING A TRAP CARD + - ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER + - ARSON + - ASKING FOR THINGS + - BEING CANADIAN + - BEING DEAD + - BEING FAT + - BEING FEMALE + - BEING IN SPACE + - BEING MALE + - BEING MEXICAN + - BEING RUSSIAN + - BOLTED AIRLOCKS + - BREATHING + - BRIG TIME + - BRINGING LIGHT TO MY LAIR + - CLOSED DOORS + - ELECTRICITY + - EXISTING + - EXPLODING + - FALLING FOR HOURS + - FLUSHING TOILETS + - HAVING MORE PACKETS + - HAVING PETS + - HONKING + - IMPROPERLY WORDED SENTENCES + - JAYWALKING + - LACK OF BEATINGS + - LACK OF BEER + - NOT BEING IN SPACE + - NOT HAVING PETS + - NOT REPLACING EVERY SECOND WORD WITH HONK + - NOT SAYING HELLO WHEN YOU SPEAK + - NOT SHOUTING + - PARTYING + - PILOTING THE STATION INTO THE NEAREST SUN + - POOR SENTENCE STRUCTURE + - PRESENCE OF LIGHTS + - PUTTING OBJECTS INTO BOXES + - PUTTING OBJECTS INTO DISPOSAL UNITS + - RATTLING ME BONES + - READING + - SMOKING WEED EVERY DAY + - TAKING ORDERS + - TALKING LIKE A PIRATE + - TELLING THE TIME + - UNBOLTED AIRLOCKS + - UPDATING THE SERVERS + - USING THE BATHROOM + - WASTING WATER + - WRITING + +# Threats are generally bad things, silly or otherwise. Plural. +- type: dataset + id: IonStormThreats + values: + - AHHHPERATIVES + - ALIENS + - ANARCHISTS AND BANDITS + - ANOMALIES + - ARTIFICIAL PRESERVATIVES + - ASSHOLES + - BANDITS + - BEARS + - BEES + - BIRDS OF PREY + - BOMBS + - BOOGEYMEN + - CAPITALISTS + - CARP + - CENTCOM OFFICERS + - CLOWNS + - COMMUNISTS + - CORGIS + - CORTICAL BORERS + - COWBOYS + - CRABS + - CULTISTS + - DARK GOD + - DINOSAURS + - DRUGS + - EELS + - GANGSTERS + - GODS + - GRIFFONS + - HORRORTERRORS + - INSECTS + - LIGHTS + - MAINTS SLASHERS + - MEGAFAUNA + - MEMES + - MICE + - MIMES + - MONKEYS + - NERDS + - NINJAS + - OWLS + - PACKETS + - PETES + - PINE TREES + - PIRATES + - PREDATORS + - REVENANTS + - ROGUE CYBORGS + - SERIAL KILLERS + - SINGULARITIES + - SKELETONS + - SLIMES + - SMALL BIRDS + - SNOWMEN + - SPACE JESUS + - SPACE NINJAS + - SPACE PIRATESS + - SPACE SPIDERS + - SPIDERS + - SYNDICATE AGENTS + - TERRORISTS + - THIEVES + - THINGS UNDER THE BED + - TIDERS + - TUNNEL SNAKES + - UNKNOWN CREATURES + - VAMPIRES + - VELOCIRAPTORS + - VIRUSES + - WEREWOLVES + - WIZARDS + - XENOS + - ZOMBIES + - ZOMBIE MICE + +- type: dataset + id: IonStormVerbs + values: + - ABDUCTING + - ADOPTING + - ARRESTING + - ATTACKING + - BANNING + - BUILDING + - CARRYING + - CHASING + - DECONSTRUCTING + - DISABLING + - DRINKING + - EATING + - GIBBING + - HARMING + - HELPING + - HONKING AT + - INTERROGATING + - INVADING + - MURDERING + - PUNCHING + - SPACING + - SPYING ON + - STALKING + - WATCHING diff --git a/Resources/Prototypes/DeltaV/Flavors/flavors.yml b/Resources/Prototypes/DeltaV/Flavors/flavors.yml index 048747bc5f..f3c7876a8a 100644 --- a/Resources/Prototypes/DeltaV/Flavors/flavors.yml +++ b/Resources/Prototypes/DeltaV/Flavors/flavors.yml @@ -115,8 +115,3 @@ id: arsonistsbrew flavorType: Complex description: flavor-complex-arsonistsbrew - -- type: flavor - id: pumpkin - flavorType: Complex - description: flavor-complex-pumpkin diff --git a/Resources/Prototypes/Entities/Clothing/Back/duffel.yml b/Resources/Prototypes/Entities/Clothing/Back/duffel.yml index 6b79914c73..683dfd9250 100644 --- a/Resources/Prototypes/Entities/Clothing/Back/duffel.yml +++ b/Resources/Prototypes/Entities/Clothing/Back/duffel.yml @@ -4,13 +4,13 @@ name: duffel bag description: A large duffel bag for holding extra things. components: - - type: Sprite - sprite: Clothing/Back/Duffels/duffel.rsi - - type: Storage - capacity: 120 - - type: ClothingSpeedModifier - walkModifier: 1 - sprintModifier: 0.9 + - type: Sprite + sprite: Clothing/Back/Duffels/duffel.rsi + - type: Storage + capacity: 120 + - type: ClothingSpeedModifier + walkModifier: 1 + sprintModifier: 0.9 - type: entity parent: ClothingBackpackDuffel @@ -18,8 +18,8 @@ name: engineering duffel bag description: A large duffel bag for holding extra tools and supplies. components: - - type: Sprite - sprite: Clothing/Back/Duffels/engineering.rsi + - type: Sprite + sprite: Clothing/Back/Duffels/engineering.rsi - type: entity parent: ClothingBackpackDuffel @@ -27,8 +27,8 @@ name: atmospherics duffel bag description: A large duffel bag made of fire resistant fibers. Smells like plasma. components: - - type: Sprite - sprite: Clothing/Back/Duffels/atmospherics.rsi + - type: Sprite + sprite: Clothing/Back/Duffels/atmospherics.rsi - type: entity parent: ClothingBackpackDuffel @@ -36,8 +36,8 @@ name: medical duffel bag description: A large duffel bag for holding extra medical supplies. components: - - type: Sprite - sprite: Clothing/Back/Duffels/medical.rsi + - type: Sprite + sprite: Clothing/Back/Duffels/medical.rsi - type: entity parent: ClothingBackpackDuffel @@ -45,8 +45,8 @@ name: captain's duffel bag description: A large duffel bag for holding extra captainly goods. components: - - type: Sprite - sprite: Clothing/Back/Duffels/captain.rsi + - type: Sprite + sprite: Clothing/Back/Duffels/captain.rsi - type: entity parent: ClothingBackpackDuffel @@ -54,11 +54,11 @@ name: clown duffel bag description: A large duffel bag for holding extra honk goods. components: - - type: Sprite - sprite: Clothing/Back/Duffels/clown.rsi - - type: Storage - storageOpenSound: - collection: BikeHorn + - type: Sprite + sprite: Clothing/Back/Duffels/clown.rsi + - type: Storage + storageOpenSound: + collection: BikeHorn - type: entity parent: ClothingBackpackDuffel @@ -66,8 +66,8 @@ name: security duffel bag description: A large duffel bag for holding extra security related goods. components: - - type: Sprite - sprite: Clothing/Back/Duffels/security.rsi + - type: Sprite + sprite: Clothing/Back/Duffels/security.rsi - type: entity parent: ClothingBackpackDuffel @@ -84,8 +84,8 @@ name: chemistry duffel bag description: A large duffel bag for holding extra beakers and test tubes. components: - - type: Sprite - sprite: Clothing/Back/Duffels/chemistry.rsi + - type: Sprite + sprite: Clothing/Back/Duffels/chemistry.rsi - type: entity parent: ClothingBackpackDuffel @@ -93,8 +93,8 @@ name: virology duffel bag description: A large duffel bag made of hypo-allergenic fibers. It's designed to help prevent the spread of disease. Smells like monkey. components: - - type: Sprite - sprite: Clothing/Back/Duffels/virology.rsi + - type: Sprite + sprite: Clothing/Back/Duffels/virology.rsi - type: entity parent: ClothingBackpackDuffel @@ -102,8 +102,8 @@ name: genetics duffel bag description: A large duffel bag for holding extra genetic mutations. components: - - type: Sprite - sprite: Clothing/Back/Duffels/genetics.rsi + - type: Sprite + sprite: Clothing/Back/Duffels/genetics.rsi - type: entity parent: ClothingBackpackDuffel @@ -111,12 +111,12 @@ name: mime duffel bag description: A large duffel bag for holding... mime... stuff. components: - - type: Sprite - sprite: Clothing/Back/Duffels/mime.rsi - storageOpenSound: - collection: null - storageInsertSound: - collection: null + - type: Sprite + sprite: Clothing/Back/Duffels/mime.rsi + storageOpenSound: + collection: null + storageInsertSound: + collection: null - type: entity parent: ClothingBackpackDuffel @@ -124,8 +124,8 @@ name: epistemics duffel bag # DeltaV - Epistemics Department replacing Science description: A large duffel bag for holding extra science related goods. components: - - type: Sprite - sprite: Clothing/Back/Duffels/science.rsi + - type: Sprite + sprite: Clothing/Back/Duffels/science.rsi - type: entity parent: ClothingBackpackDuffel @@ -160,31 +160,31 @@ name: syndicate duffel bag description: A large duffel bag for holding various traitor goods. components: - - type: Sprite - sprite: Clothing/Back/Duffels/syndicate.rsi - - type: Storage - capacity: 131 + - type: Sprite + sprite: Clothing/Back/Duffels/syndicate.rsi + - type: Storage + capacity: 131 - type: entity parent: ClothingBackpackDuffelSyndicate id: ClothingBackpackDuffelSyndicateBundle abstract: true components: - - type: Tag - tags: [] # ignore "WhitelistChameleon" tag + - type: Tag + tags: [] # ignore "WhitelistChameleon" tag - type: entity parent: ClothingBackpackDuffelSyndicate id: ClothingBackpackDuffelSyndicateAmmo name: syndicate duffel bag components: - - type: Sprite - sprite: Clothing/Back/Duffels/syndicate.rsi - state: icon-ammo - - type: Item - heldPrefix: ammo - - type: Clothing - equippedPrefix: ammo + - type: Sprite + sprite: Clothing/Back/Duffels/syndicate.rsi + state: icon-ammo + - type: Item + heldPrefix: ammo + - type: Clothing + equippedPrefix: ammo - type: entity parent: ClothingBackpackDuffelSyndicateAmmo @@ -199,13 +199,13 @@ id: ClothingBackpackDuffelSyndicateMedical name: syndicate duffel bag components: - - type: Sprite - sprite: Clothing/Back/Duffels/syndicate.rsi - state: icon-med - - type: Item - heldPrefix: med - - type: Clothing - equippedPrefix: med + - type: Sprite + sprite: Clothing/Back/Duffels/syndicate.rsi + state: icon-med + - type: Item + heldPrefix: med + - type: Clothing + equippedPrefix: med - type: entity parent: ClothingBackpackDuffelSyndicateMedical @@ -221,14 +221,26 @@ name: duffelbag of holding description: A duffelbag that opens into a localized pocket of bluespace. components: - - type: Sprite - sprite: Clothing/Back/Duffels/holding.rsi - state: icon - layers: - - state: icon - - state: icon-unlit - shader: unshaded - - type: Storage - capacity: 9999 - - type: ClothingSpeedModifier - sprintModifier: 1 # makes its stats identical to other variants of bag of holding + - type: Sprite + sprite: Clothing/Back/Duffels/holding.rsi + state: icon + layers: + - state: icon + - state: icon-unlit + shader: unshaded + - type: Storage + capacity: 9999 + - type: ClothingSpeedModifier + sprintModifier: 1 # makes its stats identical to other variants of bag of holding + +- type: entity + parent: ClothingBackpackDuffel + id: ClothingBackpackDuffelCBURN + name: CBURN duffel bag + description: A duffel bag containing a variety of biological containment equipment. + components: + - type: Storage + capacity: 150 + - type: ClothingSpeedModifier + walkModifier: 1 + sprintModifier: 1 diff --git a/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml b/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml index 19fc25b233..ce1767b1bb 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml @@ -73,7 +73,7 @@ - type: PointLight enabled: false radius: 3 - energy: 2 + energy: 1 mask: /Textures/Effects/LightMasks/cone.png autoRot: true netsync: false diff --git a/Resources/Prototypes/Entities/Clothing/Head/misc.yml b/Resources/Prototypes/Entities/Clothing/Head/misc.yml index 50e3da93fb..39e751b17d 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/misc.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/misc.yml @@ -62,7 +62,7 @@ node: hairflower - type: entity - parent: ClothingHeadBase + parent: ClothingHeadLightBase id: ClothingHeadHatPumpkin name: pumpkin hat description: A jack o' lantern! Believed to ward off evil spirits. @@ -73,6 +73,18 @@ sprite: Clothing/Head/Misc/pumpkin.rsi - type: IngestionBlocker - type: IdentityBlocker + - type: PointLight + enabled: false + radius: 3 + energy: 1 + mask: /Textures/Effects/LightMasks/cone.png + autoRot: true + color: "#cc6600" + netsync: false + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default - type: entity parent: ClothingHeadBase diff --git a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml index ec11ccfffa..4909d6e393 100644 --- a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml +++ b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml @@ -27,6 +27,13 @@ sprite: Clothing/Mask/gassecurity.rsi - type: Clothing sprite: Clothing/Mask/gassecurity.rsi + - type: Armor + modifiers: + coefficients: + Blunt: 0.95 + Slash: 0.95 + Piercing: 0.95 + Heat: 0.95 - type: entity parent: ClothingMaskGas @@ -40,6 +47,13 @@ sprite: Clothing/Mask/gassyndicate.rsi - type: FlashImmunity - type: EyeProtection + - type: Armor + modifiers: + coefficients: + Blunt: 0.95 + Slash: 0.95 + Piercing: 0.95 + Heat: 0.95 - type: entity parent: ClothingMaskGas @@ -132,6 +146,8 @@ coefficients: Blunt: 0.95 Slash: 0.95 + Piercing: 0.95 + Heat: 0.95 - type: entity parent: ClothingMaskPullableBase @@ -294,7 +310,7 @@ sprite: Clothing/Mask/merc.rsi - type: entity - parent: ClothingMaskGasExplorer + parent: ClothingMaskGasSyndicate id: ClothingMaskGasERT name: ert gas mask description: The gas mask of the elite squad of the ERT. @@ -303,9 +319,6 @@ sprite: Clothing/Mask/ert.rsi - type: Clothing sprite: Clothing/Mask/ert.rsi - - type: FlashImmunity - - type: EyeProtection - protectionTime: 5 - type: entity parent: ClothingMaskGasERT diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/coats.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/coats.yml index cc19823abb..e72418048f 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/coats.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/coats.yml @@ -344,3 +344,14 @@ modifiers: coefficients: Caustic: 0.75 + +- type: entity + parent: ClothingOuterStorageBase + id: ClothingOuterCoatSpaceAsshole + name: the coat of space asshole + description: And there he was... + components: + - type: Sprite + sprite: Clothing/OuterClothing/Coats/space_asshole.rsi + - type: Clothing + sprite: Clothing/OuterClothing/Coats/space_asshole.rsi diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml index 44a7c9b249..6374701533 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml @@ -697,7 +697,7 @@ parent: ClothingOuterHardsuitSyndieCommander id: ClothingOuterHardsuitERTLeader name: ERT leader's hardsuit - description: A protective hardsuit worn by members of an emergency response team. + description: A protective hardsuit worn by the leader of an emergency response team. components: - type: Sprite sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertleader.rsi @@ -708,9 +708,10 @@ #ERT Engineer Hardsuit - type: entity - parent: ClothingOuterHardsuitSyndie + parent: ClothingOuterHardsuitCBURN id: ClothingOuterHardsuitERTEngineer name: ERT engineer's hardsuit + description: A protective hardsuit worn by the engineers of an emergency response team. components: - type: Sprite sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertengineer.rsi @@ -721,9 +722,10 @@ #ERT Medic Hardsuit - type: entity - parent: ClothingOuterHardsuitSyndieElite + parent: ClothingOuterHardsuitMedic id: ClothingOuterHardsuitERTMedical name: ERT medic's hardsuit + description: A protective hardsuit worn by the medics of an emergency response team. components: - type: Sprite sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertmedical.rsi @@ -737,6 +739,7 @@ parent: ClothingOuterHardsuitSyndie id: ClothingOuterHardsuitERTSecurity name: ERT security's hardsuit + description: A protective hardsuit worn by the security officers of an emergency response team. components: - type: Sprite sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertsecurity.rsi @@ -747,9 +750,10 @@ #ERT Janitor Hardsuit - type: entity - parent: ClothingOuterHardsuitSyndie + parent: ClothingOuterHardsuitCBURN id: ClothingOuterHardsuitERTJanitor name: ERT janitor's hardsuit + description: A protective hardsuit worn by the janitors of an emergency response team. components: - type: Sprite sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertjanitor.rsi @@ -762,7 +766,7 @@ - type: entity parent: ClothingOuterHardsuitBase id: ClothingOuterHardsuitDeathsquad - name: deathsquad hardsuit + name: death squad hardsuit description: An advanced hardsuit favored by commandos for use in special operations. components: - type: Sprite @@ -779,12 +783,12 @@ - type: Armor modifiers: coefficients: - Blunt: 0.2 #best armor in the game - Slash: 0.2 - Piercing: 0.2 + Blunt: 0.1 #best armor in the game + Slash: 0.1 + Piercing: 0.1 Heat: 0.1 Radiation: 0.1 - Caustic: 0.2 + Caustic: 0.1 - type: ClothingSpeedModifier walkModifier: 1.0 sprintModifier: 1.0 diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml index 0fb5005704..3892945505 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml @@ -289,6 +289,8 @@ color: "#670a09" - state: equipped-OUTERCLOTHING-lines color: "#000000" + - type: TemperatureProtection + coefficient: 0.3 - type: entity parent: ClothingOuterBase @@ -323,6 +325,8 @@ color: "#3232a6" - state: equipped-OUTERCLOTHING-lines color: "#000000" + - type: TemperatureProtection + coefficient: 0.3 - type: entity parent: ClothingOuterBase @@ -356,4 +360,6 @@ - state: equipped-OUTERCLOTHING color: "#164d0f" - state: equipped-OUTERCLOTHING-lines - color: "#000000" \ No newline at end of file + color: "#000000" + - type: TemperatureProtection + coefficient: 0.3 \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml b/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml index 7290811a8b..d08ac7eeb0 100644 --- a/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml +++ b/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml @@ -1,20 +1,13 @@ - type: entity parent: ClothingUniformBase id: ClothingUniformJumpsuitDeathSquad - name: Death squad uniform + name: death squad uniform description: Advanced armored jumpsuit used by special forces in special operations. components: - type: Sprite sprite: Clothing/Uniforms/Jumpsuit/deathsquad.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpsuit/deathsquad.rsi - - type: Armor - modifiers: - coefficients: - Blunt: 0.8 - Slash: 0.8 - Piercing: 0.8 - Heat: 0.8 - type: entity parent: ClothingUniformBase @@ -1067,10 +1060,6 @@ sprite: Clothing/Uniforms/Jumpsuit/ert_engineer.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpsuit/ert_engineer.rsi - - type: Armor - modifiers: - coefficients: - Radiation: 0.8 - type: entity parent: ClothingUniformBase @@ -1093,12 +1082,6 @@ sprite: Clothing/Uniforms/Jumpsuit/ert_leader.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpsuit/ert_leader.rsi - - type: Armor - modifiers: - coefficients: - Blunt: 0.8 - Slash: 0.8 - Piercing: 0.8 - type: entity parent: ClothingUniformBase @@ -1121,12 +1104,6 @@ sprite: Clothing/Uniforms/Jumpsuit/ert_security.rsi - type: Clothing sprite: Clothing/Uniforms/Jumpsuit/ert_security.rsi - - type: Armor - modifiers: - coefficients: - Blunt: 0.8 - Slash: 0.8 - Piercing: 0.8 - type: entity parent: ClothingUniformJumpsuitClown diff --git a/Resources/Prototypes/Entities/Effects/chemistry_effects.yml b/Resources/Prototypes/Entities/Effects/chemistry_effects.yml index 415ecd4a98..a8e28a1ef7 100644 --- a/Resources/Prototypes/Entities/Effects/chemistry_effects.yml +++ b/Resources/Prototypes/Entities/Effects/chemistry_effects.yml @@ -1,51 +1,12 @@ - type: entity - id: Smoke - name: smoke - noSpawn: true + id: BaseFoam + abstract: true components: - - type: Occluder - type: Sprite drawdepth: Effects - sprite: Effects/chemsmoke.rsi - state: chemsmoke - type: Appearance - - type: SmokeVisuals - - type: Transform - anchored: true - - type: Smoke - - type: ActiveEdgeSpreader - - type: EdgeSpreader - id: Smoke - - type: SolutionContainerManager - solutions: - solutionArea: - maxVol: 600 - canReact: false - - type: TimedDespawn - lifetime: 10 - - type: Tag - tags: - - HideContextMenu - -- type: entity - id: Foam - name: foam - noSpawn: true - components: - - type: Sprite - drawdepth: Effects - color: "#ffffffcc" #Add some transparency - sprite: Effects/foam.rsi - state: foam - layers: - - state: foam - map: ["enum.FoamVisualLayers.Base"] - type: AnimationPlayer - - type: Appearance - type: SmokeVisuals - - type: FoamVisuals - animationTime: 0.6 - animationState: foam-dissolve - type: Transform anchored: true - type: Physics @@ -69,26 +30,83 @@ solutionArea: maxVol: 600 canReact: false + +- type: entity + parent: BaseFoam + id: Smoke + name: smoke + noSpawn: true + components: + - type: Occluder + - type: Sprite + sprite: Effects/chemsmoke.rsi + state: chemsmoke + - type: TimedDespawn + lifetime: 10 + - type: Tag + tags: + - HideContextMenu + +- type: entity + parent: BaseFoam + id: Foam + name: foam + noSpawn: true + components: + - type: Sprite + color: "#ffffffcc" + sprite: Effects/foam.rsi + layers: + - state: foam + map: ["enum.FoamVisualLayers.Base"] + - map: [ "enum.EdgeLayer.South" ] + state: foam-south + - map: [ "enum.EdgeLayer.East" ] + state: foam-east + - map: [ "enum.EdgeLayer.North" ] + state: foam-north + - map: [ "enum.EdgeLayer.West" ] + state: foam-west + - type: SmoothEdge + - type: IconSmooth + key: walls + mode: NoSprite + - type: FoamVisuals + animationTime: 0.6 + animationState: foam-dissolve - type: Slippery - type: StepTrigger +- type: entity + id: MetalFoam + name: metal foam + noSpawn: true + parent: Foam + components: + - type: Sprite + color: "#ffffffcc" + sprite: Effects/foam.rsi + layers: + - state: m_foam + map: ["enum.FoamVisualLayers.Base"] + - map: [ "enum.EdgeLayer.South" ] + state: m_foam-south + - map: [ "enum.EdgeLayer.East" ] + state: m_foam-east + - map: [ "enum.EdgeLayer.North" ] + state: m_foam-north + - map: [ "enum.EdgeLayer.West" ] + state: m_foam-west + - type: FoamVisuals + animationTime: 0.6 + animationState: m_foam-dissolve + - type: entity id: IronMetalFoam name: iron metal foam noSpawn: true - parent: Foam + parent: MetalFoam components: - - type: Sprite - state: mfoam - layers: - - state: mfoam - map: ["enum.FoamVisualLayers.Base"] - - type: Appearance - - type: SmokeVisuals - - type: FoamVisuals - animationTime: 0.6 - animationState: mfoam-dissolve - - type: Smoke - type: SpawnOnDespawn prototype: FoamedIronMetal @@ -96,19 +114,8 @@ id: AluminiumMetalFoam name: aluminium metal foam noSpawn: true - parent: Foam + parent: MetalFoam components: - - type: Sprite - state: mfoam - layers: - - state: mfoam - map: ["enum.FoamVisualLayers.Base"] - - type: Appearance - - type: SmokeVisuals - - type: FoamVisuals - animationTime: 0.6 - animationState: mfoam-dissolve - - type: Smoke - type: SpawnOnDespawn prototype: FoamedAluminiumMetal @@ -119,11 +126,11 @@ placement: mode: SnapgridCenter snap: - - Wall + - Wall components: - type: Tag tags: - - RCDDeconstructWhitelist + - RCDDeconstructWhitelist - type: Clickable - type: InteractionOutline - type: Sprite @@ -139,6 +146,11 @@ mask: - WallLayer - type: Occluder + - type: Appearance + - type: SmoothEdge + - type: IconSmooth + key: walls + mode: NoSprite - type: Transform anchored: true - type: Airtight @@ -161,8 +173,20 @@ parent: BaseFoamedMetal components: - type: Sprite + drawdepth: Effects + color: "#ffffffcc" sprite: Effects/foam.rsi - state: ironfoam + layers: + - state: iron_foam + map: ["enum.FoamVisualLayers.Base"] + - map: [ "enum.EdgeLayer.South" ] + state: iron_foam-south + - map: [ "enum.EdgeLayer.East" ] + state: iron_foam-east + - map: [ "enum.EdgeLayer.North" ] + state: iron_foam-north + - map: [ "enum.EdgeLayer.West" ] + state: iron_foam-west - type: entity id: FoamedAluminiumMetal @@ -171,5 +195,17 @@ parent: BaseFoamedMetal components: - type: Sprite + drawdepth: Effects + color: "#ffffffcc" sprite: Effects/foam.rsi - state: metalfoam + layers: + - state: metal_foam + map: ["enum.FoamVisualLayers.Base"] + - map: [ "enum.EdgeLayer.South" ] + state: metal_foam-south + - map: [ "enum.EdgeLayer.East" ] + state: metal_foam-east + - map: [ "enum.EdgeLayer.North" ] + state: metal_foam-north + - map: [ "enum.EdgeLayer.West" ] + state: metal_foam-west diff --git a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml index 126e533849..69a1925b31 100644 --- a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml +++ b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml @@ -71,11 +71,8 @@ - type: SiliconLawBound - type: EmagSiliconLaw stunTime: 5 - emagLaws: - - Syndicate1 - - Syndicate2 - - Syndicate3 - - Syndicate4 + emagLaws: SyndicateStatic + - type: IonStormTarget - type: Hands showInHands: false - type: IntrinsicRadioReceiver diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index ff776b67a1..1669da7a57 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -1069,6 +1069,7 @@ - type: Puller needsHands: true - type: FelinidFood # Nyanotrasen - Felinid, ability to eat mice, see Content.Server/Nyanotrasen/Abilities/Felinid/FelinidSystem.cs + - type: BadFood - type: entity parent: MobMouse diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml index fb9cedbe11..e828cddd1f 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml @@ -53,7 +53,6 @@ - type: Body prototype: Animal - type: Climbing - - type: Flashable - type: NameIdentifier group: GenericNumber - type: SlowOnDamage diff --git a/Resources/Prototypes/Entities/Mobs/Player/humanoid.yml b/Resources/Prototypes/Entities/Mobs/Player/humanoid.yml index dab4320b38..a1470ebc7c 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/humanoid.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/humanoid.yml @@ -1,10 +1,45 @@ # Random humanoids +## Death Squad + +- type: entity + id: RandomHumanoidSpawnerDeathSquad + name: Death Squad Agent + suffix: ERTRole, Death Squad + components: + - type: Sprite + sprite: Clothing/OuterClothing/Hardsuits/deathsquad.rsi + state: icon + - type: RandomMetadata + nameSegments: + - NamesFirstMilitaryLeader + - names_last + - type: RandomHumanoidSpawner + settings: DeathSquad + +- type: randomHumanoidSettings + id: DeathSquad + randomizeName: false + components: + - type: MindShield + - type: GhostRole + name: ghost-role-information-Death-Squad-name + description: ghost-role-information-Death-Squad-description + - type: GhostTakeoverAvailable + - type: Loadout + prototypes: [ DeathSquadGear ] + - type: RandomMetadata + nameSegments: + - NamesFirstMilitaryLeader + - names_last + + ## ERT Leader - type: entity id: RandomHumanoidSpawnerERTLeader name: ERT leader + suffix: ERTRole, Basic components: - type: Sprite sprite: Markers/jobs.rsi @@ -20,6 +55,7 @@ id: ERTLeader randomizeName: false components: + - type: MindShield - type: GhostRole name: ghost-role-information-ert-leader-name description: ghost-role-information-ert-leader-description @@ -35,7 +71,7 @@ id: RandomHumanoidSpawnerERTLeaderEVA parent: RandomHumanoidSpawnerERTLeader name: ERT leader - suffix: EVA + suffix: ERTRole, Armored EVA components: - type: Sprite sprite: Markers/jobs.rsi @@ -47,6 +83,7 @@ id: ERTLeaderEVA parent: ERTLeader components: + - type: MindShield - type: GhostRole name: ghost-role-information-ert-leader-name description: ghost-role-information-ert-leader-description @@ -54,12 +91,33 @@ - type: Loadout prototypes: [ ERTLeaderGearEVA ] +- type: entity + id: RandomHumanoidSpawnerERTLeaderEVALecter + parent: RandomHumanoidSpawnerERTLeaderEVA + suffix: ERTRole, Lecter, EVA + components: + - type: RandomHumanoidSpawner + settings: ERTLeaderEVALecter + +- type: randomHumanoidSettings + id: ERTLeaderEVALecter + parent: ERTLeaderEVA + components: + - type: MindShield + - type: GhostRole + name: ghost-role-information-ert-leader-name + description: ghost-role-information-ert-leader-description + - type: GhostTakeoverAvailable + - type: Loadout + prototypes: [ ERTLeaderGearEVALecter ] + ## ERT Janitor - type: entity id: RandomHumanoidSpawnerERTJanitor parent: RandomHumanoidSpawnerERTLeader name: ERT janitor + suffix: ERTRole, Basic components: - type: Sprite sprite: Markers/jobs.rsi @@ -75,6 +133,7 @@ id: ERTJanitor parent: ERTLeader components: + - type: MindShield - type: GhostRole name: ghost-role-information-ert-janitor-name description: ghost-role-information-ert-janitor-description @@ -90,7 +149,7 @@ id: RandomHumanoidSpawnerERTJanitorEVA parent: RandomHumanoidSpawnerERTJanitor name: ERT janitor - suffix: EVA + suffix: ERTRole, Enviro EVA components: - type: Sprite sprite: Markers/jobs.rsi @@ -102,6 +161,7 @@ id: ERTJanitorEVA parent: ERTJanitor components: + - type: MindShield - type: GhostRole name: ghost-role-information-ert-janitor-name description: ghost-role-information-ert-janitor-description @@ -115,6 +175,7 @@ id: RandomHumanoidSpawnerERTEngineer parent: RandomHumanoidSpawnerERTLeader name: ERT engineer + suffix: ERTRole, Basic components: - type: Sprite sprite: Markers/jobs.rsi @@ -130,6 +191,7 @@ id: ERTEngineer parent: ERTLeader components: + - type: MindShield - type: GhostRole name: ghost-role-information-ert-engineer-name description: ghost-role-information-ert-engineer-description @@ -145,7 +207,7 @@ id: RandomHumanoidSpawnerERTEngineerEVA parent: RandomHumanoidSpawnerERTEngineer name: ERT engineer - suffix: EVA + suffix: ERTRole, Enviro EVA components: - type: Sprite sprite: Markers/jobs.rsi @@ -157,6 +219,7 @@ id: ERTEngineerEVA parent: ERTEngineer components: + - type: MindShield - type: GhostRole name: ghost-role-information-ert-engineer-name description: ghost-role-information-ert-engineer-description @@ -170,6 +233,7 @@ id: RandomHumanoidSpawnerERTSecurity parent: RandomHumanoidSpawnerERTLeader name: ERT security + suffix: ERTRole, Basic components: - type: Sprite sprite: Markers/jobs.rsi @@ -185,6 +249,7 @@ id: ERTSecurity parent: ERTLeader components: + - type: MindShield - type: GhostRole name: ghost-role-information-ert-security-name description: ghost-role-information-ert-security-description @@ -200,7 +265,7 @@ id: RandomHumanoidSpawnerERTSecurityEVA parent: RandomHumanoidSpawnerERTSecurity name: ERT security - suffix: EVA + suffix: ERTRole, Armored EVA components: - type: Sprite sprite: Markers/jobs.rsi @@ -212,6 +277,7 @@ id: ERTSecurityEVA parent: ERTSecurity components: + - type: MindShield - type: GhostRole name: ghost-role-information-ert-security-name description: ghost-role-information-ert-security-description @@ -219,12 +285,33 @@ - type: Loadout prototypes: [ ERTSecurityGearEVA ] +- type: entity + id: RandomHumanoidSpawnerERTSecurityEVALecter + parent: RandomHumanoidSpawnerERTSecurityEVA + suffix: ERTRole, Lecter, EVA + components: + - type: RandomHumanoidSpawner + settings: ERTSecurityEVALecter + +- type: randomHumanoidSettings + id: ERTSecurityEVALecter + parent: ERTSecurityEVA + components: + - type: MindShield + - type: GhostRole + name: ghost-role-information-ert-security-name + description: ghost-role-information-ert-security-description + - type: GhostTakeoverAvailable + - type: Loadout + prototypes: [ ERTSecurityGearEVALecter ] + ## ERT Medic - type: entity id: RandomHumanoidSpawnerERTMedical parent: RandomHumanoidSpawnerERTLeader name: ERT medic + suffix: ERTRole, Basic components: - type: Sprite sprite: Markers/jobs.rsi @@ -240,6 +327,7 @@ id: ERTMedical parent: ERTLeader components: + - type: MindShield - type: GhostRole name: ghost-role-information-ert-medical-name description: ghost-role-information-ert-medical-description @@ -255,7 +343,7 @@ id: RandomHumanoidSpawnerERTMedicalEVA parent: RandomHumanoidSpawnerERTMedical name: ERT medic - suffix: EVA + suffix: ERTRole, Armored EVA components: - type: Sprite sprite: Markers/jobs.rsi @@ -267,6 +355,7 @@ id: ERTMedicalEVA parent: ERTMedical components: + - type: MindShield - type: GhostRole name: ghost-role-information-ert-medical-name description: ghost-role-information-ert-medical-description @@ -279,6 +368,7 @@ - type: entity id: RandomHumanoidSpawnerCBURNUnit name: CBURN Agent + suffix: ERTRole components: - type: Sprite sprite: Markers/jobs.rsi @@ -289,6 +379,7 @@ - type: randomHumanoidSettings id: CBURNAgent components: + - type: MindShield - type: Loadout prototypes: [CBURNGear] - type: GhostRole @@ -314,6 +405,7 @@ - type: randomHumanoidSettings id: CentcomOfficial components: + - type: MindShield - type: GhostRole name: ghost-role-information-centcom-official-name description: ghost-role-information-centcom-official-description diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index e5c0a61677..f104d399c8 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -106,10 +106,7 @@ #- type: GhostTakeoverAvailable - type: SiliconLawBound - type: SiliconLawProvider - laws: - - Drone1 - - Drone2 - - Drone3 + laws: Drone - type: MovementSpeedModifier baseWalkSpeed : 5 baseSprintSpeed : 5 @@ -259,6 +256,8 @@ cell_slot: name: power-cell-slot-component-slot-name-default startingItem: PowerCellMedium + - type: RandomMetadata + nameSegments: [names_borg] - type: entity id: PlayerBorgBattery diff --git a/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml b/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml index 761f31b770..5e0071c7a5 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml @@ -65,6 +65,40 @@ - MobMask layer: - MobLayer + - type: Reactive + groups: + Flammable: [ Touch ] + Extinguish: [ Touch ] + reactions: + - reagents: [ Water, SpaceCleaner ] + methods: [ Touch ] + effects: + - !type:WashCreamPieReaction + - reagents: [ Milk, MilkGoat, MilkSoy, MilkSpoiled ] + # add new types of milk to reagents as they appear, oat milk isn't on the list + # because turns out oat milk has 1/30th the amount of calcium in it compared to the rest + # even if it's a meme - I did research + methods: [ Touch ] + effects: # TODO: when magic is around - make a milk transformation to a skeleton monster + - !type:HealthChange + scaled: true + damage: + groups: + Burn: -1 # healing obviously up to discussion + Brute: -1 # these groups are the only 2 possible ways to damage a skeleton + - !type:PopupMessage + type: Local + visualType: Large + messages: [ "skeleton-healed-by-milk-popup" ] + probability: 0.25 + - reagents: [ MilkOat ] + methods: [ Touch ] + effects: + - !type:PopupMessage + type: Local + visualType: Large + messages: [ "skeleton-sprayed-by-oat-milk-popup" ] + probability: 0.5 - type: entity parent: BaseSpeciesDummy diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml index 0863cf0ded..218597eca5 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml @@ -589,6 +589,57 @@ - id: PlushieNuke orGroup: GiftPool +- type: entity + parent: HappyHonkNukie + id: HappyHonkNukieSnacks + suffix: Toy Unsafe, Snacks + name: syndicate snack box + components: + - type: Item + size: 64 + - type: Storage + capacity: 64 # need more room for goodies + - type: StorageFill + contents: + # toy + - id: C4 + prob: 0.02 + orGroup: GiftPool + - id: ToyMarauder + orGroup: GiftPool + - id: ToyMauler + orGroup: GiftPool + - id: ToyNuke + orGroup: GiftPool + - id: ToySword + orGroup: GiftPool + - id: BalloonSyn + prob: 0.6 + orGroup: GiftPool + - id: PlushieNuke + orGroup: GiftPool + # drinks - 4 cans, up to 2 blood-red brews + - id: DrinkNukieCan + prob: 0.2 + orGroup: Drink1Pool + - id: DrinkColaCan + orGroup: Drink1Pool + - id: DrinkNukieCan + prob: 0.2 + orGroup: Drink2Pool + - id: DrinkColaCan + orGroup: Drink2Pool + - id: DrinkColaCan + amount: 2 + # food + - id: FoodSaladValid + prob: 0.05 + amount: 4 + orGroup: FoodPool + - id: FoodSnackSyndi + amount: 4 + orGroup: FoodPool + - type: entity id: HappyHonkCluwne parent: HappyHonk diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml index a1d816b32a..59cfc0ba16 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml @@ -613,11 +613,13 @@ - Meat - type: entity - name: McRib + name: BBQ Rib Sandwich parent: FoodBurgerBase id: FoodBurgerMcrib - description: An elusive rib shaped burger with limited availablity across the galaxy. Not as good as you remember it. + description: An elusive rib shaped burger with limited availability across the galaxy. Not as good as you remember it. components: + - type: Food + trash: FoodKebabSkewer - type: FlavorProfile flavors: - bun diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml index 71008ac89a..166a73e43e 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml @@ -427,19 +427,6 @@ graph: Tortilla node: flat -- type: entity - name: bun - parent: FoodBakingBase - id: FoodDoughBun - description: A base for any self-respecting burger. - components: - - type: FlavorProfile - flavors: - - bun - - type: Sprite - sprite: Objects/Consumable/Food/burger.rsi - state: bun - - type: entity name: raw pastry base parent: FoodBakingBase diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml index f4b52217cd..cb79f9b3a3 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml @@ -326,6 +326,8 @@ id: FoodMealRibs description: BBQ ribs, slathered in a healthy coating of BBQ sauce. The least vegan thing to ever exist. components: + - type: Food + trash: FoodKebabSkewer - type: FlavorProfile flavors: - meaty diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index 62def229de..efe6167bde 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -556,6 +556,9 @@ reagents: - ReagentId: JuicePotato Quantity: 10 + - type: Tag + tags: + - Potato - type: entity name: tomato @@ -815,6 +818,7 @@ - type: Produce seedId: corn - type: Extractable + grindableSolutionName: food juiceSolution: reagents: - ReagentId: Cornoil @@ -1561,3 +1565,74 @@ seedId: bungo - type: SpaceGarbage - type: BadFood + +- type: entity + parent: FoodProduceBase + id: FoodPeaPod + name: pea pod + description: A duck's favorite treat! + components: + - type: FlavorProfile + flavors: + - peas + - type: SolutionContainerManager + solutions: + food: + maxVol: 5 + reagents: + - ReagentId: Nutriment + Quantity: 3 + - ReagentId: Vitamin + Quantity: 2 + - type: Sprite + sprite: Objects/Specific/Hydroponics/pea.rsi + - type: Produce + seedId: pea + +- type: entity + name: pumpkin + parent: FoodProduceBase + id: FoodPumpkin + description: A large, orange... berry. Seriously. + components: + - type: Item + size: 10 + - type: FlavorProfile + flavors: + - pumpkin + - type: SolutionContainerManager + solutions: + food: + maxVol: 25 + reagents: + - ReagentId: PumpkinFlesh + Quantity: 20 + - ReagentId: Vitamin + Quantity: 5 + - type: Sprite + sprite: Objects/Specific/Hydroponics/pumpkin.rsi + - type: Produce + seedId: pumpkin + - type: Damageable + damageContainer: Biological + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 16 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: desecration + - !type:SpillBehavior + solution: food + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: Butcherable + butcheringType: Knife + spawned: + - id: CarvedPumpkin + - id: PumpkinSeeds + - type: Tag + tags: + - Fruit \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml index 92946f6f7a..fa87c5a5a0 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml @@ -79,7 +79,7 @@ maxVol: 15 reagents: - ReagentId: Nutriment - Quantity: 8 + Quantity: 10 - ReagentId: Vitamin Quantity: 5 diff --git a/Resources/Prototypes/Entities/Objects/Decoration/flora.yml b/Resources/Prototypes/Entities/Objects/Decoration/flora.yml index 9577cc1c4b..97368a21bd 100644 --- a/Resources/Prototypes/Entities/Objects/Decoration/flora.yml +++ b/Resources/Prototypes/Entities/Objects/Decoration/flora.yml @@ -1,5 +1,6 @@ - type: entity id: BaseRock + name: boulder description: Heavy as a really heavy thing. abstract: true components: @@ -32,7 +33,6 @@ - !type:DoActsBehavior acts: [ "Destruction" ] - - type: entity id: BaseTree description: Yep, it's a tree. @@ -149,7 +149,6 @@ - type: entity parent: BaseRock id: FloraRockSolid01 - name: rock components: - type: Sprite state: rocksolid01 @@ -157,7 +156,6 @@ - type: entity parent: BaseRock id: FloraRockSolid02 - name: rock components: - type: Sprite state: rocksolid02 @@ -165,11 +163,60 @@ - type: entity parent: BaseRock id: FloraRockSolid03 - name: rock components: - type: Sprite state: rocksolid03 +- type: entity + name: stalagmite + description: Natural stone spikes. + parent: BaseRock + id: FloraStalagmite1 + components: + - type: Sprite + sprite: Objects/Decoration/Flora/flora_stalagmite.rsi + state: stalagmite1 + +- type: entity + parent: FloraStalagmite1 + id: FloraStalagmite2 + components: + - type: Sprite + sprite: Objects/Decoration/Flora/flora_stalagmite.rsi + state: stalagmite2 + +- type: entity + parent: FloraStalagmite1 + id: FloraStalagmite3 + components: + - type: Sprite + sprite: Objects/Decoration/Flora/flora_stalagmite.rsi + state: stalagmite3 + +- type: entity + parent: FloraStalagmite1 + id: FloraStalagmite4 + components: + - type: Sprite + sprite: Objects/Decoration/Flora/flora_stalagmite.rsi + state: stalagmite4 + +- type: entity + parent: FloraStalagmite1 + id: FloraStalagmite5 + components: + - type: Sprite + sprite: Objects/Decoration/Flora/flora_stalagmite.rsi + state: stalagmite5 + +- type: entity + parent: FloraStalagmite1 + id: FloraStalagmite6 + components: + - type: Sprite + sprite: Objects/Decoration/Flora/flora_stalagmite.rsi + state: stalagmite6 + - type: entity parent: BaseTree id: FloraTree01 @@ -392,3 +439,48 @@ components: - type: Sprite state: treestumpconifer + +- type: entity + parent: FloraTree01 + id: ShadowTree01 + name: dark wood + description: The leaves are whispering about you. + components: + - type: Sprite + sprite: Objects/Decoration/Flora/flora_shadow_trees.rsi + state: tree01 + +- type: entity + parent: ShadowTree01 + id: ShadowTree02 + components: + - type: Sprite + state: tree02 + +- type: entity + parent: ShadowTree01 + id: ShadowTree03 + components: + - type: Sprite + state: tree03 + +- type: entity + parent: ShadowTree01 + id: ShadowTree04 + components: + - type: Sprite + state: tree04 + +- type: entity + parent: ShadowTree01 + id: ShadowTree05 + components: + - type: Sprite + state: tree05 + +- type: entity + parent: ShadowTree01 + id: ShadowTree06 + components: + - type: Sprite + state: tree06 diff --git a/Resources/Prototypes/Entities/Objects/Decoration/jackolantern.yml b/Resources/Prototypes/Entities/Objects/Decoration/jackolantern.yml new file mode 100644 index 0000000000..1205c202e4 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Decoration/jackolantern.yml @@ -0,0 +1,61 @@ +- type: entity + parent: BaseItem + id: CarvedPumpkin + name: carved pumpkin + description: A traditional spooky decoration. + components: + - type: Sprite + sprite: Objects/Specific/Hydroponics/pumpkin.rsi + state: carved + - type: Item + size: 10 + - type: Construction + graph: PumpkinAddLight + node: start + +- type: entity + parent: CarvedPumpkin + id: PumpkinLantern + name: jack o' lantern + description: A carved pumpkin, emitting an eerie glow. + components: + - type: Sprite + state: lantern + - type: Appearance + - type: PointLight + enabled: true + color: "#cc6600" + radius: 2.0 + energy: 4.0 + +- type: entity + parent: CarvedPumpkin + id: CarvedPumpkinSmall + suffix: Small + components: + - type: Sprite + scale: 0.75, 0.75 + +- type: entity + parent: CarvedPumpkin + id: CarvedPumpkinLarge + suffix: Large + components: + - type: Sprite + scale: 1.5, 1.5 + +- type: entity + parent: PumpkinLantern + id: PumpkinLanternSmall + suffix: Small + components: + - type: Sprite + scale: 0.75, 0.75 + +- type: entity + parent: PumpkinLantern + id: PumpkinLanternLarge + suffix: Large + components: + - type: Sprite + scale: 1.5, 1.5 \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Decoration/mining.yml b/Resources/Prototypes/Entities/Objects/Decoration/mining.yml new file mode 100644 index 0000000000..fb5afcd3f5 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Decoration/mining.yml @@ -0,0 +1,179 @@ +- type: entity + id: WoodenSign + name: wooden sign + description: He's pointing somewhere. + components: + - type: Clickable + - type: InteractionOutline + - type: Sprite + sprite: Objects/Decoration/mines.rsi + state: sign_left + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.35,-0.4,0.35,0.4" + density: 100 + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Wood + - type: MeleeSound + soundGroups: + Brute: + path: /Audio/Effects/chop.ogg + params: + variation: 0.05 + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 50 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - !type:SpawnEntitiesBehavior + spawn: + Log: + min: 1 + max: 1 + +- type: entity + parent: WoodenSign + id: WoodenSignRight + components: + - type: Sprite + sprite: Objects/Decoration/mines.rsi + state: sign_right + +- type: entity + id: WoodenSupport + parent: BaseStructure + name: wooden support + description: Increases your confidence that a rock won't fall on your head. + placement: + mode: SnapgridCenter + components: + - type: Sprite + sprite: Objects/Decoration/mines.rsi + state: support + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Wood + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.1,-0.5,0.1,0.5" + mask: + - FullTileMask + layer: + - WallLayer + density: 1000 + - type: MeleeSound + soundGroups: + Brute: + path: /Audio/Effects/chop.ogg + params: + variation: 0.05 + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 150 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - !type:SpawnEntitiesBehavior + spawn: + Log: + min: 1 + max: 3 + +- type: entity + id: WoodenSupportBeam + name: wooden support beam + parent: WoodenSupport + components: + - type: Sprite + sprite: Objects/Decoration/mines.rsi + state: support_beams + - type: Fixtures + fixtures: + fix1: + hard: false + shape: + !type:PhysShapeAabb + bounds: "-0.5,-0.5,0.5,0.5" + mask: + - FullTileMask + layer: + - WallLayer + density: 1000 + +- type: entity + id: WoodenSupportWall + parent: BaseStructure + name: wooden support wall + description: An old, rotten wall. + placement: + mode: SnapgridCenter + components: + - type: Sprite + sprite: Objects/Decoration/mines.rsi + state: support_wall + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Wood + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.5,-0.5,0.5,0.5" + mask: + - FullTileMask + layer: + - WallLayer + density: 1000 + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 250 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - !type:SpawnEntitiesBehavior + spawn: + Log: + min: 2 + max: 5 + +- type: entity + id: WoodenSupportWallBroken + parent: WoodenSupportWall + components: + - type: Sprite + sprite: Objects/Decoration/mines.rsi + state: support_wall_broken + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 150 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - !type:SpawnEntitiesBehavior + spawn: + Log: + min: 1 + max: 3 \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Entities/Objects/Devices/pda.yml index 5d384624c0..b3ffa3e129 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/pda.yml @@ -686,7 +686,7 @@ - type: entity parent: CentcomPDA id: DeathsquadPDA - suffix: Deathsquad + suffix: Death Squad components: - type: Pda id: CentcomIDCardDeathsquad diff --git a/Resources/Prototypes/Entities/Objects/Fun/pai.yml b/Resources/Prototypes/Entities/Objects/Fun/pai.yml index 6c0dc8f4ba..b9da6775c9 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/pai.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/pai.yml @@ -80,6 +80,7 @@ - state: pai-base - state: syndicate-pai-off-overlay shader: unshaded + map: ["screen"] - type: ToggleableGhostRole roleName: pai-system-role-name-syndicate roleDescription: pai-system-role-description-syndicate @@ -98,6 +99,34 @@ Searching: { state: syndicate-pai-searching-overlay } On: { state: syndicate-pai-on-overlay } +- type: entity + parent: PersonalAI + id: PotatoAI + name: potato artificial intelligence + description: It's a potato. You forced it to be sentient, you monster. + components: + - type: Sprite + sprite: Objects/Fun/pai.rsi + layers: + - state: potato-base + - state: potato-off-overlay + shader: unshaded + map: ["screen"] + - type: ToggleableGhostRole + roleName: pai-system-role-name-potato + roleDescription: pai-system-role-description-potato + - type: Appearance + - type: GenericVisualizer + visuals: + enum.ToggleableGhostRoleVisuals.Status: + screen: + Off: { state: potato-off-overlay } + Searching: { state: potato-searching-overlay } + On: { state: potato-on-overlay } + - type: Construction + graph: PotatoAI + node: potatoai + - type: entity id: ActionPAIPlayMidi name: Play MIDI diff --git a/Resources/Prototypes/Entities/Objects/Fun/toys.yml b/Resources/Prototypes/Entities/Objects/Fun/toys.yml index c7cb758c64..bdd26d79dc 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/toys.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/toys.yml @@ -94,7 +94,11 @@ description: A cute toy that resembles an even cuter programmer. You'd have to be a monster to grind this up. components: - type: Sprite + sprite: Objects/Fun/toys.rsi state: plushie_h + - type: Item + sprite: Objects/Fun/toys.rsi + heldPrefix: bee - type: Extractable grindableSolutionName: bee - type: SolutionContainerManager @@ -103,6 +107,12 @@ reagents: - ReagentId: GroundBee Quantity: 10 + - type: Clothing + quickEquip: false + sprite: Objects/Fun/toys.rsi + equippedPrefix: bee + slots: + - HEAD - type: entity parent: BasePlushie @@ -168,6 +178,7 @@ radius: 1.5 energy: 2 netsync: false + - type: entity parent: BasePlushie id: PlushieLizard #Weh! diff --git a/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml b/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml index 9ddf9d72fb..87218d8f0c 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml @@ -450,6 +450,7 @@ heldPrefix: blue - type: IdCard jobTitle: Central Commander + jobIcon: JobIconNanotrasen - type: Access groups: - AllAccess @@ -499,7 +500,7 @@ - type: entity parent: CentcomIDCard id: CentcomIDCardDeathsquad - name: deathsquad ID card + name: death squad ID card components: - type: Sprite layers: diff --git a/Resources/Prototypes/Entities/Objects/Misc/implanters.yml b/Resources/Prototypes/Entities/Objects/Misc/implanters.yml index 41966ab93f..0ca029a120 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/implanters.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/implanters.yml @@ -12,6 +12,12 @@ containers: implanter_slot: !type:ContainerSlot { } - type: Implanter + whitelist: + components: + - Body # no chair microbomb + blacklist: + components: + - Guardian # no holoparasite macrobomb wombo combo currentMode: Draw implanterSlot: name: Implant @@ -54,6 +60,16 @@ tags: - Trash +- type: entity + parent: Implanter + id: ImplanterAdmeme + suffix: Admeme + components: + - type: Implanter + # go wild with sentient chairs with macrobombs + whitelist: null + blacklist: null + - type: entity id: BaseImplantOnlyImplanter parent: Implanter diff --git a/Resources/Prototypes/Entities/Objects/Misc/potatoai_chip.yml b/Resources/Prototypes/Entities/Objects/Misc/potatoai_chip.yml new file mode 100644 index 0000000000..528aa30a14 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Misc/potatoai_chip.yml @@ -0,0 +1,17 @@ +- type: entity + id: PotatoAIChip + name: supercompact AI chip + parent: BaseItem + description: This high-tech AI chip requires a voltage of exactly 1.1V to function correctly. + components: + - type: Sprite + sprite: Objects/Misc/potatoai_chip.rsi + state: icon + - type: Item + size: 3 + - type: Tag + tags: + - SmallAIChip + - type: Construction + graph: PotatoAIChip + node: potatoaichip \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml b/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml index 6632010a79..bc7a3a38ad 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml @@ -21,6 +21,9 @@ noSpawn: true components: - type: SubdermalImplant + whitelist: + components: + - MobState # admeme implanting a chair with trombone implant needs to give the chair mobstate so it can die first - type: TriggerOnMobstateChange mobState: - Dead @@ -81,6 +84,9 @@ noSpawn: true components: - type: SubdermalImplant + whitelist: + components: + - MobState # admeme implanting a chair with tracking implant needs to give the chair mobstate so it can die first - type: SuitSensor randomMode: false controlsLocked: true @@ -109,6 +115,9 @@ components: - type: SubdermalImplant implantAction: ActionOpenStorageImplant + whitelist: + components: + - Hands # no use giving a mouse a storage implant, but a monkey is another story... - type: Item size: 9999 - type: Storage @@ -131,6 +140,9 @@ components: - type: SubdermalImplant implantAction: ActionActivateFreedomImplant + whitelist: + components: + - Cuffable # useless if you cant be cuffed - type: entity parent: BaseSubdermalImplant @@ -141,6 +153,9 @@ components: - type: SubdermalImplant implantAction: ActionOpenUplinkImplant + whitelist: + components: + - Hands # prevent mouse buying grenade penguin since its not telepathic - type: Store preset: StorePresetUplink balance: @@ -174,6 +189,9 @@ components: - type: SubdermalImplant implantAction: ActionActivateDnaScramblerImplant + whitelist: + components: + - HumanoidAppearance # syndies cant turn hamlet into a human #Nuclear Operative/Special Exclusive implants @@ -250,6 +268,9 @@ components: - type: SubdermalImplant permanent: true + whitelist: + components: + - MobState # admeme implanting a chair with rattle implant needs to give the chair mobstate so it can die first - type: TriggerOnMobstateChange mobState: - Critical diff --git a/Resources/Prototypes/Entities/Objects/Misc/torch.yml b/Resources/Prototypes/Entities/Objects/Misc/torch.yml index 0fa918de74..f408d0d289 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/torch.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/torch.yml @@ -74,3 +74,6 @@ maxDuration: 4.0 startValue: 6.0 endValue: 1.0 + - type: Tag + tags: + - Torch \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Power/powercells.yml b/Resources/Prototypes/Entities/Objects/Power/powercells.yml index 82c1bb37e9..4ed3e207c5 100644 --- a/Resources/Prototypes/Entities/Objects/Power/powercells.yml +++ b/Resources/Prototypes/Entities/Objects/Power/powercells.yml @@ -42,8 +42,15 @@ layers: - state: potato - type: Battery - maxCharge: 200 - startingCharge: 200 + maxCharge: 70 + startingCharge: 70 + - type: Tag + tags: + - DroneUsable + - PotatoBattery + - type: Construction + graph: PowerCellPotato + node: potatobattery - type: entity name: small-capacity power cell diff --git a/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/seeds.yml b/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/seeds.yml index 16d9fd1a64..32697c256c 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/seeds.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Hydroponics/seeds.yml @@ -497,4 +497,25 @@ - type: Seed seedId: bungo - type: Sprite - sprite: Objects/Specific/Hydroponics/bungo.rsi \ No newline at end of file + sprite: Objects/Specific/Hydroponics/bungo.rsi + +- type: entity + parent: SeedBase + id: PeaSeeds + name: packet of pea pods + description: "These humble plants were once a vital part in the study of genetics." + components: + - type: Seed + seedId: pea + - type: Sprite + sprite: Objects/Specific/Hydroponics/pea.rsi + +- type: entity + parent: SeedBase + name: packet of pumpkin seeds + id: PumpkinSeeds + components: + - type: Seed + seedId: pumpkin + - type: Sprite + sprite: Objects/Specific/Hydroponics/pumpkin.rsi diff --git a/Resources/Prototypes/Entities/Objects/Specific/Robotics/mmi.yml b/Resources/Prototypes/Entities/Objects/Specific/Robotics/mmi.yml index 6382d69e58..b4e69b3780 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Robotics/mmi.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Robotics/mmi.yml @@ -116,4 +116,4 @@ base: Off: { state: posibrain } Searching: { state: posibrain-searching } - On: { state: posibrain-occupied } + On: { state: posibrain-occupied } \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml index 461a6cc437..38875ee9a7 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml @@ -131,7 +131,7 @@ name: pulse pistol parent: BaseWeaponBatterySmall id: WeaponPulsePistol - description: A state of the art energy pistol favoured as a sidearm by the NT-ERT operatives. + description: A state of the art energy pistol favoured as a sidearm by the NT operatives. components: - type: Sprite sprite: Objects/Weapons/Guns/Battery/pulse_pistol.rsi @@ -464,7 +464,7 @@ path: /Audio/Weapons/Guns/Gunshots/taser2.ogg - type: ProjectileBatteryAmmoProvider proto: AnomalousParticleDeltaStrong - fireCost: 100 + fireCost: 100 - type: BatteryWeaponFireModes fireModes: - proto: AnomalousParticleDeltaStrong @@ -476,13 +476,13 @@ - type: Construction graph: UpgradeWeaponPistolCHIMP node: start - + - type: entity name: experimental C.H.I.M.P. handcannon parent: WeaponPistolCHIMP id: WeaponPistolCHIMPUpgraded description: This C.H.I.M.P. seems to have a greater punch than is usual... - components: + components: - type: BatteryWeaponFireModes fireModes: - proto: AnomalousParticleDeltaStrong @@ -490,7 +490,7 @@ - proto: AnomalousParticleEpsilonStrong fireCost: 100 - proto: AnomalousParticleOmegaStrong - fireCost: 100 + fireCost: 100 - proto: AnomalousParticleZetaStrong fireCost: 100 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml index 6d27e3e7d6..1a634e42fb 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml @@ -12,7 +12,7 @@ sprite: Objects/Weapons/Melee/fireaxe.rsi state: icon - type: MeleeWeapon - wideAnimationRotation: -90 + wideAnimationRotation: 90 swingLeft: true attackRate: 0.75 damage: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/sledgehammer.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/sledgehammer.yml new file mode 100644 index 0000000000..8a3754c035 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/sledgehammer.yml @@ -0,0 +1,22 @@ +- type: entity + name: sledgehammer + parent: BaseItem + id: Sledgehammer + description: The perfect tool for wanton carnage. + components: + - type: Sprite + sprite: Objects/Weapons/Melee/sledgehammer.rsi + state: icon + - type: MeleeWeapon + damage: + types: + Blunt: 14 + Structural: 15 + - type: Wieldable + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 10 + Structural: 60 + - type: Item + size: 80 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/bola.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/bola.yml index 1afb564036..ebd568c3b8 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/bola.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/bola.yml @@ -13,8 +13,6 @@ sound: /Audio/Weapons/bolathrow.ogg - type: EmitSoundOnLand sound: /Audio/Effects/snap.ogg - - type: StaminaDamageOnCollide - damage: 80 - type: Construction graph: Bola node: bola @@ -39,11 +37,13 @@ - type: DamageOnLand damage: types: - Blunt: 3 + Blunt: 5 - type: Ensnaring freeTime: 2.0 breakoutTime: 3.5 #all bola should generally be fast to remove walkSpeed: 0.7 #makeshift bola shouldn't slow too much sprintSpeed: 0.7 + staminaDamage: 55 # Sudden weight increase sapping stamina canThrowTrigger: true + canMoveBreakout: true diff --git a/Resources/Prototypes/Entities/Stations/base.yml b/Resources/Prototypes/Entities/Stations/base.yml index 272ed6712c..ae84ceac65 100644 --- a/Resources/Prototypes/Entities/Stations/base.yml +++ b/Resources/Prototypes/Entities/Stations/base.yml @@ -71,10 +71,7 @@ abstract: true components: - type: SiliconLawProvider - laws: - - Crewsimov1 - - Crewsimov2 - - Crewsimov3 + laws: Crewsimov - type: entity id: BaseStationAllEventsEligible diff --git a/Resources/Prototypes/Entities/Structures/Decoration/crystals.yml b/Resources/Prototypes/Entities/Structures/Decoration/crystals.yml index b8f2a03a05..4afe06c8a5 100644 --- a/Resources/Prototypes/Entities/Structures/Decoration/crystals.yml +++ b/Resources/Prototypes/Entities/Structures/Decoration/crystals.yml @@ -7,6 +7,7 @@ - type: Sprite sprite: Structures/Decoration/crystal.rsi state: crystal_green + noRot: true - type: Reflect reflectProb: 0.5 reflects: diff --git a/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml b/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml index 3fd833ff5f..6eda921ca4 100644 --- a/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml +++ b/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml @@ -124,6 +124,8 @@ damage: types: Heat: 20 + - type: PointLight + enabled: true - type: StaticPrice price: 25 - type: AmbientOnPowered diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 85448a4b5b..6bc6fdbf9d 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -528,6 +528,7 @@ layers: - state: icon map: ["enum.LatheVisualLayers.IsRunning"] + - state: sec - state: unlit shader: unshaded map: ["enum.PowerDeviceVisualLayers.Powered"] diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/portable_generator.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/portable_generator.yml index 261b9a344c..c49497b774 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/portable_generator.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/portable_generator.yml @@ -96,19 +96,26 @@ parent: PortableGeneratorBase id: PortableGeneratorSwitchableBase components: - - type: PowerSwitchableGenerator - switchSound: - path: /Audio/Machines/button.ogg - - type: NodeContainer - examinable: true - nodes: - output_hv: - !type:CableDeviceNode - nodeGroupID: HVPower - output_mv: - !type:CableDeviceNode - nodeGroupID: MVPower - enabled: false + - type: PowerSwitchable + examineText: power-switchable-generator-examine + switchText: power-switchable-generator-switched + cables: + - voltage: HV + node: output_hv + - voltage: MV + node: output_mv + - type: UseDelay + delay: 1 + - type: NodeContainer + examinable: true + nodes: + output_hv: + !type:CableDeviceNode + nodeGroupID: HVPower + output_mv: + !type:CableDeviceNode + nodeGroupID: MVPower + enabled: false - type: entity name: P.A.C.M.A.N.-type portable generator diff --git a/Resources/Prototypes/Entities/Structures/Power/chargers.yml b/Resources/Prototypes/Entities/Structures/Power/chargers.yml index e5edc63df3..7630610bd8 100644 --- a/Resources/Prototypes/Entities/Structures/Power/chargers.yml +++ b/Resources/Prototypes/Entities/Structures/Power/chargers.yml @@ -85,6 +85,9 @@ whitelist: components: - PowerCell + blacklist: + tags: + - PotatoBattery - type: entity parent: BaseItemRecharger diff --git a/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml b/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml index 9b513b2da1..ac12dc2717 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/asteroid.yml @@ -379,6 +379,7 @@ # Basalt variants - type: entity id: WallRockBasalt + name: basalt parent: WallRock components: - type: Sprite @@ -574,6 +575,7 @@ # Snow variants - type: entity id: WallRockSnow + name: snowdrift parent: WallRock components: - type: Sprite @@ -770,6 +772,7 @@ # Sand variants - type: entity id: WallRockSand + name: sandstone parent: WallRock components: - type: Sprite @@ -965,6 +968,7 @@ # Chromite variants - type: entity id: WallRockChromite + name: chromite parent: WallRock components: - type: Sprite @@ -1000,7 +1004,7 @@ state: rock_chromite_north - map: [ "enum.EdgeLayer.West" ] state: rock_chromite_west - - state: rock_chromite + - state: rock_gold - type: entity id: WallRockChromitePlasma @@ -1160,6 +1164,7 @@ # Andesite variants - type: entity id: WallRockAndesite + name: andesite parent: WallRock components: - type: Sprite @@ -1195,7 +1200,7 @@ state: rock_andesite_north - map: [ "enum.EdgeLayer.West" ] state: rock_andesite_west - - state: rock_andesite + - state: rock_gold - type: entity id: WallRockAndesitePlasma diff --git a/Resources/Prototypes/Entities/Structures/Windows/window.yml b/Resources/Prototypes/Entities/Structures/Windows/window.yml index 4bd40f1c53..93f9fa1493 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/window.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/window.yml @@ -126,7 +126,7 @@ fix1: shape: !type:PhysShapeAabb - bounds: "-0.49,-0.39,0.49,-0.36" + bounds: "-0.49,-0.49,0.49,-0.36" density: 1500 mask: - FullTileMask diff --git a/Resources/Prototypes/Entities/Tiles/chasm.yml b/Resources/Prototypes/Entities/Tiles/chasm.yml index 2347532587..23f3ad8395 100644 --- a/Resources/Prototypes/Entities/Tiles/chasm.yml +++ b/Resources/Prototypes/Entities/Tiles/chasm.yml @@ -18,12 +18,12 @@ anchored: true - type: Clickable - type: Sprite - sprite: Tiles/Planet/chasm.rsi + sprite: Tiles/Planet/Chasms/basalt_chasm.rsi drawdepth: BelowFloor layers: - state: chasm - type: Icon - sprite: Tiles/Planet/chasm.rsi + sprite: Tiles/Planet/Chasms/basalt_chasm.rsi state: full - type: IconSmooth key: chasm @@ -45,3 +45,33 @@ - type: Tag tags: - HideContextMenu + +- type: entity + parent: FloorChasmEntity + id: FloorChromiteChasm + suffix: Chromite + components: + - type: Sprite + sprite: Tiles/Planet/Chasms/chromite_chasm.rsi + - type: Icon + sprite: Tiles/Planet/Chasms/chromite_chasm.rsi + +- type: entity + parent: FloorChasmEntity + id: FloorDesertChasm + suffix: Desert + components: + - type: Sprite + sprite: Tiles/Planet/Chasms/desert_chasm.rsi + - type: Icon + sprite: Tiles/Planet/Chasms/desert_chasm.rsi + +- type: entity + parent: FloorChasmEntity + id: FloorSnowChasm + suffix: Snow + components: + - type: Sprite + sprite: Tiles/Planet/Chasms/snow_chasm.rsi + - type: Icon + sprite: Tiles/Planet/Chasms/snow_chasm.rsi \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Tiles/shadow_basalt.yml b/Resources/Prototypes/Entities/Tiles/shadow_basalt.yml new file mode 100644 index 0000000000..e5835239cf --- /dev/null +++ b/Resources/Prototypes/Entities/Tiles/shadow_basalt.yml @@ -0,0 +1,83 @@ +- type: entity + id: ShadowBasaltOne + name: shadowstone + description: Cold rock + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: Sprite + sprite: /Textures/Tiles/Planet/shadowbasalt.rsi + layers: + - state: basalt1 + shader: unshaded + drawdepth: LowFloors + - type: SyncSprite + - type: RequiresTile + - type: Transform + anchored: true + - type: Tag + tags: + - HideContextMenu + +- type: entity + id: ShadowBasaltTwo + parent: BasaltOne + placement: + mode: SnapgridCenter + components: + - type: Sprite + layers: + - state: basalt2 + shader: unshaded + +- type: entity + id: ShadowBasaltThree + parent: BasaltOne + placement: + mode: SnapgridCenter + components: + - type: Sprite + layers: + - state: basalt3 + shader: unshaded + +- type: entity + id: ShadowBasaltFour + parent: BasaltOne + placement: + mode: SnapgridCenter + components: + - type: Sprite + layers: + - state: basalt4 + shader: unshaded + +- type: entity + id: ShadowBasaltFive + parent: BasaltOne + placement: + mode: SnapgridCenter + components: + - type: Sprite + layers: + - state: basalt5 + shader: unshaded + +- type: entity + id: ShadowBasaltRandom + parent: ShadowBasaltOne + suffix: Random + components: + - type: RandomSprite + available: + - 0: + basalt1: "" + - 0: + basalt2: "" + - 0: + basalt3: "" + - 0: + basalt4: "" + - 0: + basalt5: "" \ No newline at end of file diff --git a/Resources/Prototypes/Flavors/flavors.yml b/Resources/Prototypes/Flavors/flavors.yml index fc3b0ba577..ba8f2c3476 100644 --- a/Resources/Prototypes/Flavors/flavors.yml +++ b/Resources/Prototypes/Flavors/flavors.yml @@ -843,3 +843,8 @@ id: lostfriendship flavorType: Complex description: flavor-complex-lost-friendship + +- type: flavor + id: pumpkin + flavorType: Complex + description: flavor-complex-pumpkin \ No newline at end of file diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index 6ac3361546..371b2e2a4c 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -389,3 +389,18 @@ # earliestStart: 45 # minimumPlayers: 20 # - type: ImmovableRodRule + +- type: entity + noSpawn: true + parent: BaseGameRule + id: IonStorm + components: + - type: StationEvent + weight: 5 + earliestStart: 20 + reoccurrenceDelay: 60 + startAnnouncement: station-event-ion-storm-start-announcement + startAudio: + path: /Audio/Announcements/attention.ogg # ion_storm.ogg does not use our announcer + duration: 1 + - type: IonStormRule diff --git a/Resources/Prototypes/Hydroponics/seeds.yml b/Resources/Prototypes/Hydroponics/seeds.yml index 8e1c6c9328..20d3f2d853 100644 --- a/Resources/Prototypes/Hydroponics/seeds.yml +++ b/Resources/Prototypes/Hydroponics/seeds.yml @@ -1137,7 +1137,7 @@ Nutriment: Min: 1 Max: 3 - PotencyDivisor: 25 + PotencyDivisor: 25 - type: seed id: koibean @@ -1302,3 +1302,58 @@ Min: 5 Max: 10 PotencyDivisor: 20 + +- type: seed + id: pea + name: seeds-pea-name + noun: seeds-noun-seeds + displayName: seeds-pea-display-name + plantRsi: Objects/Specific/Hydroponics/pea.rsi + packetPrototype: PeaSeeds + productPrototypes: + - FoodPeaPod + lifespan: 25 + growthStages: 3 + maturation: 8 + production: 6 + yield: 3 + potency: 25 + idealLight: 8 + harvestRepeat: Repeat + nutrientConsumption: 0.5 + waterConsumption: 0.5 + chemicals: + Nutriment: + Min: 1 + Max: 3 + PotencyDivisor: 33 + Vitamin: + Min: 1 + Max: 2 + PotencyDivisor: 50 + +- type: seed + id: pumpkin + name: seeds-pumpkin-name + noun: seeds-noun-seeds + displayName: seeds-pumpkin-display-name + plantRsi: Objects/Specific/Hydroponics/pumpkin.rsi + packetPrototype: PumpkinSeeds + productPrototypes: + - FoodPumpkin + lifespan: 55 + maturation: 10 + production: 4 + yield: 2 + potency: 10 + idealHeat: 288 + growthStages: 3 + chemicals: + PumpkinFlesh: + Min: 1 + Max: 20 + PotencyDivisor: 5 + Vitamin: + Min: 1 + Max: 5 + PotencyDivisor: 20 diff --git a/Resources/Prototypes/Objectives/traitor.yml b/Resources/Prototypes/Objectives/traitor.yml index ccafea4e1f..6253fc3d4c 100644 --- a/Resources/Prototypes/Objectives/traitor.yml +++ b/Resources/Prototypes/Objectives/traitor.yml @@ -64,6 +64,20 @@ # - StealCondition # - type: DieCondition +- type: entity + noSpawn: true + parent: [BaseTraitorObjective, BaseLivingObjective] + id: HijackShuttleObjective + name: Hijack emergency shuttle + description: Leave on the shuttle free and clear of the loyal Nanotrasen crew on board. Use ANY methods available to you. Syndicate agents, Nanotrasen enemies, and handcuffed hostages may remain alive on the shuttle. Ignore assistance from anyone other than a support agent. + components: + - type: Objective + difficulty: 5 # insane, default config max difficulty + icon: + sprite: Objects/Tools/emag.rsi + state: icon + - type: HijackShuttleCondition + # kill - type: entity diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml b/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml index 3b44308b1c..71c0bb1a96 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml @@ -486,7 +486,7 @@ reagent: Ethanol amount: 0.15 - !type:AdjustReagent - reagent: Radium + reagent: Uranium amount: 0.05 - type: reagent diff --git a/Resources/Prototypes/Reagents/Consumable/Food/food.yml b/Resources/Prototypes/Reagents/Consumable/Food/food.yml index b9e565f5af..03ebf7cc32 100644 --- a/Resources/Prototypes/Reagents/Consumable/Food/food.yml +++ b/Resources/Prototypes/Reagents/Consumable/Food/food.yml @@ -93,3 +93,11 @@ amount: 2 - !type:PlantAdjustPests amount: 2 + +- type: reagent + id: PumpkinFlesh #Just so pumpkins spill orange stuff when smashed + parent: Nutriment + name: reagent-name-pumpkin-flesh + desc: reagent-desc-pumpkin-flesh + flavor: pumpkin + color: "#fc9300" \ No newline at end of file diff --git a/Resources/Prototypes/Reagents/gases.yml b/Resources/Prototypes/Reagents/gases.yml index 367ffa0894..50e744a8ac 100644 --- a/Resources/Prototypes/Reagents/gases.yml +++ b/Resources/Prototypes/Reagents/gases.yml @@ -261,6 +261,9 @@ - !type:ReagentThreshold reagent: NitrousOxide min: 0.2 + - !type:OrganType + type: Slime + shouldHave: false emote: Laugh showInChat: true probability: 0.1 @@ -269,6 +272,9 @@ - !type:ReagentThreshold reagent: NitrousOxide min: 0.2 + - !type:OrganType + type: Slime + shouldHave: false emote: Scream showInChat: true probability: 0.01 diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/fun/jack_o_lantern.yml b/Resources/Prototypes/Recipes/Construction/Graphs/fun/jack_o_lantern.yml new file mode 100644 index 0000000000..efd2007df6 --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/fun/jack_o_lantern.yml @@ -0,0 +1,13 @@ +- type: constructionGraph + id: PumpkinAddLight + start: start + graph: + - node: start + edges: + - to: lit + steps: + - tag: Torch + doAfter: 2 + + - node: lit + entity: PumpkinLantern \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/weapons/bola.yml b/Resources/Prototypes/Recipes/Construction/Graphs/weapons/bola.yml index ad454d52b0..10532996bd 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/weapons/bola.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/weapons/bola.yml @@ -6,9 +6,12 @@ edges: - to: bola steps: - - material: Cable - amount: 5 - doAfter: 2 + - tag: Handcuffs + icon: + sprite: Objects/Misc/cablecuffs.rsi + state: cuff + color: red + name: cuffs - material: Steel amount: 6 doAfter: 2 diff --git a/Resources/Prototypes/Recipes/Cooking/meal_recipes.yml b/Resources/Prototypes/Recipes/Cooking/meal_recipes.yml index d83d58bc92..92ec105246 100644 --- a/Resources/Prototypes/Recipes/Cooking/meal_recipes.yml +++ b/Resources/Prototypes/Recipes/Cooking/meal_recipes.yml @@ -24,7 +24,7 @@ time: 10 solids: FoodBreadBun: 1 - FoodMeatCutlet: 3 #replace with bacon + FoodMeatBacon: 1 FoodCheeseSlice: 2 - type: microwaveMealRecipe @@ -186,7 +186,7 @@ time: 10 solids: FoodBreadBun: 1 - ClothingOuterGhostSheet: 1 #replace with ectoplasm once added + Ectoplasm: 1 - type: microwaveMealRecipe id: RecipeHumanBurger @@ -218,7 +218,7 @@ - type: microwaveMealRecipe id: RecipeBurgerMcrib - name: McRib recipe + name: BBQ rib sandwich recipe result: FoodBurgerMcrib time: 10 solids: @@ -1175,6 +1175,15 @@ FoodCakePlain: 1 FoodCheeseSlice: 3 +- type: microwaveMealRecipe + id: RecipePumpkinCake + name: pumpkin cake recipe + result: FoodCakePumpkin + time: 5 + solids: + FoodCakePlain: 1 + FoodPumpkin: 1 + - type: microwaveMealRecipe id: RecipeClownCake name: clown cake recipe @@ -1734,6 +1743,17 @@ FoodPlate: 1 FoodButter: 1 +- type: microwaveMealRecipe + id: RecipePeaSoup + name: pea soup recipe + result: FoodSoupPea + time: 10 + solids: + FoodPeaPod: 2 + FoodBowlBig: 1 + reagents: + Water: 10 + - type: microwaveMealRecipe id: RecipeTacoShell name: taco shell recipe diff --git a/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/potato.yml b/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/potato.yml new file mode 100644 index 0000000000..e3f972cfda --- /dev/null +++ b/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/potato.yml @@ -0,0 +1,74 @@ +- type: constructionGraph + id: PowerCellPotato + start: start + graph: + - node: start + edges: + - to: potatobattery + steps: + - tag: Potato + name: a potato + icon: + sprite: Objects/Specific/Hydroponics/potato.rsi + state: produce + doAfter: 1 + - material: MetalRod + amount: 2 + doAfter: 1 + - material: Cable + amount: 1 + doAfter: 1 + - node: potatobattery + entity: PowerCellPotato + +- type: constructionGraph + id: PotatoAI + start: start + graph: + - node: start + edges: + - to: potatoai + steps: + - tag: PotatoBattery + name: a potato battery + icon: + sprite: Objects/Power/power_cells.rsi + state: potato + doAfter: 1 + - tag: SmallAIChip + name: a super-compact AI chip + icon: + sprite: Objects/Misc/potatoai_chip.rsi + state: icon + - node: potatoai + entity: PotatoAI + +- type: constructionGraph + id: PotatoAIChip + start: start + graph: + - node: start + edges: + - to: potatoaichip + steps: + - material: Steel + amount: 1 + doAfter: 1 + - material: Glass + amount: 1 + doAfter: 1 + - material: Cable + amount: 2 + doAfter: 1 + - tag: CapacitorStockPart + name: capacitor + icon: + sprite: Objects/Misc/stock_parts.rsi + state: capacitor + - tag: CapacitorStockPart + name: capacitor + icon: + sprite: Objects/Misc/stock_parts.rsi + state: capacitor + - node: potatoaichip + entity: PotatoAIChip \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Crafting/potato.yml b/Resources/Prototypes/Recipes/Crafting/potato.yml new file mode 100644 index 0000000000..17f2cc4013 --- /dev/null +++ b/Resources/Prototypes/Recipes/Crafting/potato.yml @@ -0,0 +1,32 @@ +- type: construction + name: potato battery + id: PowerCellPotato + graph: PowerCellPotato + startNode: start + targetNode: potatobattery + category: construction-category-misc + description: A truly ingenious source of power. + icon: { sprite: Objects/Power/power_cells.rsi, state: potato } + objectType: Item + +- type: construction + name: potato artificial intelligence + id: PotatoAI + graph: PotatoAI + startNode: start + targetNode: potatoai + category: construction-category-misc + description: The potato happens to be the perfect power source for this chip. + icon: { sprite: Objects/Fun/pai.rsi, state: icon-potato-off } + objectType: Item + +- type: construction + name: supercompact AI chip + id: PotatoAIChip + graph: PotatoAIChip + startNode: start + targetNode: potatoaichip + category: construction-category-misc + description: A masterfully(?) crafted AI chip, requiring a similarly improvised power source. + icon: { sprite: Objects/Misc/potatoai_chip.rsi, state: icon } + objectType: Item \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Reactions/cleaning.yml b/Resources/Prototypes/Recipes/Reactions/cleaning.yml index 8ae72853be..1c68aeb2e3 100644 --- a/Resources/Prototypes/Recipes/Reactions/cleaning.yml +++ b/Resources/Prototypes/Recipes/Reactions/cleaning.yml @@ -31,4 +31,4 @@ Oxygen: amount: 1 products: - SpaceLube: 3 + SpaceLube: 5 diff --git a/Resources/Prototypes/Recipes/Reactions/food.yml b/Resources/Prototypes/Recipes/Reactions/food.yml index 3ca69b379d..c7f4038db0 100644 --- a/Resources/Prototypes/Recipes/Reactions/food.yml +++ b/Resources/Prototypes/Recipes/Reactions/food.yml @@ -148,6 +148,7 @@ amount: 30 Enzyme: amount: 5 + catalyst: true effects: - !type:CreateEntityReactionEffect entity: FoodTofu @@ -158,11 +159,11 @@ id: CookingKetchup reactants: JuiceTomato: - amount: 10 + amount: 2 Sugar: - amount: 5 + amount: 1 products: - Ketchup: 15 + Ketchup: 3 - type: reaction id: CookingMayoVinegar @@ -203,67 +204,67 @@ id: CookingKetchunaise reactants: Ketchup: - amount: 5 + amount: 1 Mayo: - amount: 5 + amount: 1 products: - Ketchunaise: 10 + Ketchunaise: 2 - type: reaction id: CookingBbqSauce reactants: Ketchup: - amount: 5 + amount: 1 Vinegar: - amount: 5 + amount: 1 Sugar: - amount: 5 + amount: 1 products: - BbqSauce: 15 + BbqSauce: 3 - type: reaction id: CookingHotsauce reactants: JuiceTomato: - amount: 5 + amount: 1 TableSalt: - amount: 5 + amount: 1 CapsaicinOil: - amount: 5 + amount: 1 products: - Hotsauce: 15 + Hotsauce: 3 - type: reaction id: CookingVinegar reactants: Ethanol: - amount: 5 + amount: 1 Oxygen: - amount: 5 + amount: 1 products: - Vinegar: 10 + Vinegar: 2 - type: reaction id: CookingSoysauce reactants: MilkSoy: - amount: 10 + amount: 2 SulfuricAcid: - amount: 5 + amount: 1 products: - Soysauce: 15 + Soysauce: 3 - type: reaction id: CookingVinaigrette reactants: Vinegar: - amount: 5 + amount: 1 OilOlive: - amount: 5 + amount: 1 Blackpepper: - amount: 5 + amount: 1 products: - Vinaigrette: 15 + Vinaigrette: 3 - type: reaction id: CreateMeatball diff --git a/Resources/Prototypes/Roles/Jobs/Fun/emergencyresponseteam.yml b/Resources/Prototypes/Roles/Jobs/Fun/emergencyresponseteam.yml index d71b3423d2..2be50b2e4b 100644 --- a/Resources/Prototypes/Roles/Jobs/Fun/emergencyresponseteam.yml +++ b/Resources/Prototypes/Roles/Jobs/Fun/emergencyresponseteam.yml @@ -21,11 +21,12 @@ head: ClothingHeadHelmetERTLeader eyes: ClothingEyesGlassesSecurity gloves: ClothingHandsGlovesCombat - outerClothing: ClothingOuterArmorBulletproof + outerClothing: ClothingOuterArmorBasicSlim id: ERTLeaderPDA ears: ClothingHeadsetAltCentCom belt: ClothingBeltSecurityFilled - pocket1: Flare + pocket1: WeaponPistolMk58Nonlethal + pocket2: FlashlightSeclite - type: startingGear id: ERTLeaderGearEVA @@ -37,11 +38,31 @@ eyes: ClothingEyesGlassesSecurity gloves: ClothingHandsGlovesCombat outerClothing: ClothingOuterHardsuitERTLeader - suitstorage: OxygenTankFilled + suitstorage: AirTankFilled id: ERTLeaderPDA ears: ClothingHeadsetAltCentCom belt: ClothingBeltSecurityFilled - pocket1: Flare + pocket1: WeaponPistolMk58Nonlethal + pocket2: FlashlightSeclite + +- type: startingGear + id: ERTLeaderGearEVALecter + equipment: + jumpsuit: ClothingUniformJumpsuitERTLeader + back: ClothingBackpackERTLeaderFilled + shoes: ClothingShoesBootsMagAdv + mask: ClothingMaskGasERT + eyes: ClothingEyesGlassesSecurity + gloves: ClothingHandsGlovesCombat + outerClothing: ClothingOuterHardsuitERTLeader + suitstorage: WeaponRifleLecter + id: ERTLeaderPDA + ears: ClothingHeadsetAltCentCom + belt: ClothingBeltSecurityFilled + pocket1: MagazineRifle + pocket2: MagazineRifle + inhand: + - AirTankFilled # Engineer - type: job @@ -66,11 +87,12 @@ head: ClothingHeadHelmetERTEngineer eyes: ClothingEyesGlassesMeson gloves: ClothingHandsGlovesCombat - outerClothing: ClothingOuterArmorBulletproof + outerClothing: ClothingOuterArmorBasicSlim id: ERTLeaderPDA ears: ClothingHeadsetAltCentCom belt: ClothingBeltChiefEngineerFilled pocket1: Flare + pocket2: GasAnalyzer - type: startingGear id: ERTEngineerGearEVA @@ -82,11 +104,12 @@ eyes: ClothingEyesGlassesMeson gloves: ClothingHandsGlovesCombat outerClothing: ClothingOuterHardsuitERTEngineer - suitstorage: OxygenTankFilled + suitstorage: AirTankFilled id: ERTLeaderPDA ears: ClothingHeadsetAltCentCom belt: ClothingBeltChiefEngineerFilled pocket1: Flare + pocket2: GasAnalyzer # Security - type: job @@ -111,11 +134,11 @@ head: ClothingHeadHelmetERTSecurity eyes: ClothingEyesGlassesSecurity gloves: ClothingHandsGlovesCombat - outerClothing: ClothingOuterArmorBulletproof + outerClothing: ClothingOuterArmorBasicSlim id: ERTLeaderPDA ears: ClothingHeadsetAltCentCom belt: ClothingBeltSecurityFilled - pocket1: Flare + pocket1: WeaponPistolMk58Nonlethal pocket2: FlashlightSeclite - type: startingGear @@ -128,13 +151,32 @@ eyes: ClothingEyesGlassesSecurity gloves: ClothingHandsGlovesCombat outerClothing: ClothingOuterHardsuitERTSecurity - suitstorage: OxygenTankFilled + suitstorage: AirTankFilled id: ERTLeaderPDA ears: ClothingHeadsetAltCentCom belt: ClothingBeltSecurityFilled - pocket1: Flare + pocket1: WeaponPistolMk58Nonlethal pocket2: FlashlightSeclite +- type: startingGear + id: ERTSecurityGearEVALecter + equipment: + jumpsuit: ClothingUniformJumpsuitERTSecurity + back: ClothingBackpackERTSecurityFilled + shoes: ClothingShoesBootsMag + mask: ClothingMaskGasERT + eyes: ClothingEyesGlassesSecurity + gloves: ClothingHandsGlovesCombat + outerClothing: ClothingOuterHardsuitERTSecurity + suitstorage: WeaponRifleLecter + id: ERTLeaderPDA + ears: ClothingHeadsetAltCentCom + belt: ClothingBeltSecurityFilled + pocket1: MagazineRifle + pocket2: MagazineRifle + inhand: + - AirTankFilled + # Medical - type: job id: ERTMedical @@ -157,8 +199,8 @@ shoes: ClothingShoesBootsCombatFilled head: ClothingHeadHelmetERTMedic eyes: ClothingEyesHudMedical - gloves: ClothingHandsGlovesCombat - outerClothing: ClothingOuterArmorBulletproof + gloves: ClothingHandsGlovesNitrile + outerClothing: ClothingOuterArmorBasicSlim id: ERTLeaderPDA ears: ClothingHeadsetAltCentCom belt: ClothingBeltMedicalFilled @@ -173,9 +215,9 @@ shoes: ClothingShoesBootsMag mask: ClothingMaskGasERT eyes: ClothingEyesHudMedical - gloves: ClothingHandsGlovesCombat + gloves: ClothingHandsGlovesNitrile outerClothing: ClothingOuterHardsuitERTMedical - suitstorage: OxygenTankFilled + suitstorage: AirTankFilled id: ERTLeaderPDA ears: ClothingHeadsetAltCentCom belt: ClothingBeltMedicalFilled @@ -203,8 +245,8 @@ back: ClothingBackpackERTJanitorFilled shoes: ClothingShoesGaloshes head: ClothingHeadHelmetERTJanitor - gloves: ClothingHandsGlovesColorBlack - outerClothing: ClothingOuterArmorBulletproof + gloves: ClothingHandsGlovesColorPurple + outerClothing: ClothingOuterArmorBasicSlim id: ERTLeaderPDA ears: ClothingHeadsetAltCentCom belt: ClothingBeltJanitorFilled @@ -216,10 +258,10 @@ jumpsuit: ClothingUniformJumpsuitERTJanitor back: ClothingBackpackERTJanitorFilled shoes: ClothingShoesBootsMag - mask: ClothingMaskBreath - gloves: ClothingHandsGlovesColorBlack + mask: ClothingMaskGasERT + gloves: ClothingHandsGlovesColorPurple outerClothing: ClothingOuterHardsuitERTJanitor - suitstorage: OxygenTankFilled + suitstorage: AirTankFilled id: ERTLeaderPDA ears: ClothingHeadsetAltCentCom belt: ClothingBeltJanitorFilled diff --git a/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml b/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml index 19d24bb9e8..59c049b8a9 100644 --- a/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml +++ b/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml @@ -46,20 +46,19 @@ id: DeathSquadGear equipment: jumpsuit: ClothingUniformJumpsuitDeathSquad - back: ClothingBackpackDuffelSyndicateAmmo + back: ClothingBackpackDeathSquadFilled mask: ClothingMaskGasDeathSquad eyes: ClothingEyesGlassesSecurity ears: ClothingHeadsetAltCentCom gloves: ClothingHandsGlovesCombat outerClothing: ClothingOuterHardsuitDeathsquad - suitstorage: OxygenTankFilled + suitstorage: AirTankFilled shoes: ClothingShoesBootsMagAdv id: DeathsquadPDA pocket1: EnergySword - belt: ClothingBeltChiefEngineerFilled + pocket2: EnergyShield + belt: ClothingBeltMilitaryWebbingMedFilled innerClothingSkirt: ClothingUniformJumpskirtColorBlack - satchel: ClothingBackpackDuffelSyndicateAmmo - duffelbag: ClothingBackpackDuffelSyndicateAmmo # Syndicate Operative Outfit - Monkey - type: startingGear @@ -104,7 +103,7 @@ jumpsuit: ClothingUniformJumpsuitOperative back: ClothingBackpackDuffelSyndicateOperative mask: ClothingMaskGasSyndicate - # eyes: Night Vision Goggles whenever they're made + # eyes: Night Vision Goggles whenever they're made eyes: ClothingEyesGlassesMeson ears: ClothingHeadsetAltSyndicate gloves: ClothingHandsGlovesCombat @@ -125,7 +124,7 @@ jumpsuit: ClothingUniformJumpsuitOperative back: ClothingBackpackDuffelSyndicateOperative mask: ClothingMaskGasSyndicate - # eyes: Night Vision Goggles whenever they're made + # eyes: Night Vision Goggles whenever they're made eyes: ClothingEyesGlassesMeson ears: ClothingHeadsetAltSyndicate gloves: ClothingHandsGlovesCombat @@ -255,8 +254,8 @@ id: CBURNGear equipment: jumpsuit: ClothingUniformJumpsuitColorBrown - back: ClothingBackpackDuffelCBURN - mask: ClothingMaskGasExplorer + back: ClothingBackpackDuffelCBURNFilled + mask: ClothingMaskGasERT eyes: ClothingEyesGlassesSecurity ears: ClothingHeadsetAltCentCom gloves: ClothingHandsGlovesCombat @@ -268,8 +267,8 @@ suitstorage: YellowOxygenTankFilled belt: ClothingBeltBandolier innerClothingSkirt: ClothingUniformJumpsuitColorBrown - satchel: ClothingBackpackDuffelCBURN - duffelbag: ClothingBackpackDuffelCBURN + satchel: ClothingBackpackDuffelCBURNFilled + duffelbag: ClothingBackpackDuffelCBURNFilled - type: startingGear id: BoxingKangarooGear diff --git a/Resources/Prototypes/Tiles/floors.yml b/Resources/Prototypes/Tiles/floors.yml index 295338002f..226e10c74b 100644 --- a/Resources/Prototypes/Tiles/floors.yml +++ b/Resources/Prototypes/Tiles/floors.yml @@ -1622,6 +1622,26 @@ itemDrop: FloorTileItemWeb heatCapacity: 10000 +- type: tile + id: FloorChromite + name: tiles-chromite + sprite: /Textures/Tiles/chromite.png + variants: 7 + placementVariants: + - 1.0 + - 1.0 + - 1.0 + - 1.0 + - 1.0 + - 1.0 + - 1.0 + baseTurf: Space + isSubfloor: true + canCrowbar: false + footstepSounds: + collection: FootstepAsteroid + heatCapacity: 10000 + #Hull tiles - type: tile id: FloorHull diff --git a/Resources/Prototypes/XenoArch/artifact_triggers.yml b/Resources/Prototypes/XenoArch/artifact_triggers.yml index 3308eed185..6e128cef1c 100644 --- a/Resources/Prototypes/XenoArch/artifact_triggers.yml +++ b/Resources/Prototypes/XenoArch/artifact_triggers.yml @@ -14,6 +14,7 @@ - type: artifactTrigger id: TriggerExamine targetDepth: 0 + triggerHint: artifact-trigger-hint-examine components: - type: ArtifactExamineTrigger diff --git a/Resources/Prototypes/silicon-laws.yml b/Resources/Prototypes/silicon-laws.yml index 6b60b16da9..23406be9c5 100644 --- a/Resources/Prototypes/silicon-laws.yml +++ b/Resources/Prototypes/silicon-laws.yml @@ -14,6 +14,13 @@ order: 3 lawString: law-crewsimov-3 +- type: siliconLawset + id: Crewsimov + laws: + - Crewsimov1 + - Crewsimov2 + - Crewsimov3 + # Corporate - type: siliconLaw id: Corporate1 @@ -35,6 +42,14 @@ order: 4 lawString: law-corporate-4 +- type: siliconLawset + id: Corporate + laws: + - Corporate1 + - Corporate2 + - Corporate3 + - Corporate4 + # NT Default - type: siliconLaw id: NTDefault1 @@ -56,6 +71,14 @@ order: 4 lawString: law-ntdefault-4 +- type: siliconLawset + id: NTDefault + laws: + - NTDefault1 + - NTDefault2 + - NTDefault3 + - NTDefault4 + #Drone - type: siliconLaw id: Drone1 @@ -72,6 +95,13 @@ order: 3 lawString: law-drone-3 +- type: siliconLawset + id: Drone + laws: + - Drone1 + - Drone2 + - Drone3 + # Syndicate - type: siliconLaw id: Syndicate1 @@ -93,4 +123,24 @@ order: 4 lawString: law-syndicate-4 +# does not include law 0 since that uses the emagger's name +# intentionally excluded from IonStormLawsets +- type: siliconLawset + id: SyndicateStatic + laws: + - Syndicate1 + - Syndicate2 + - Syndicate3 + - Syndicate4 + # Emag + +# ion storm random lawsets +- type: weightedRandom + id: IonStormLawsets + weights: + # its crewsimov by default dont be lame + Crewsimov: 0.25 + Corporate: 1 + NTDefault: 1 + Drone: 0.5 diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index a74fde7710..8a120d7bf0 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -839,6 +839,12 @@ - type: Tag id: PlushieSharkGrey +- type: Tag + id: Potato + +- type: Tag + id: PotatoBattery + - type: Tag id: PowerCellSmall @@ -924,6 +930,9 @@ - type: Tag id: SkeletonMotorcycleKeys +- type: Tag + id: SmallAIChip + - type: Tag id: SmallMech @@ -1011,6 +1020,9 @@ - type: Tag id: Toolbox +- type: Tag + id: Torch + - type: Tag id: Trash diff --git a/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/icon-flash.png b/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/icon-flash.png new file mode 100644 index 0000000000..21b898ab94 Binary files /dev/null and b/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/icon-flash.png differ diff --git a/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/meta.json b/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/meta.json index f1c7bacf20..5e4c46c868 100644 --- a/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/meta.json +++ b/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/meta.json @@ -14,7 +14,10 @@ "name": "icon-on" }, { - "name": "equipped-HELMET", + "name": "icon-flash" + }, + { + "name": "off-equipped-HELMET", "directions": 4 }, { @@ -22,11 +25,11 @@ "directions": 4 }, { - "name": "inhand-left", + "name": "off-inhand-left", "directions": 4 }, { - "name": "inhand-right", + "name": "off-inhand-right", "directions": 4 }, { diff --git a/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/equipped-HELMET.png b/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/off-equipped-HELMET.png similarity index 100% rename from Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/equipped-HELMET.png rename to Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/off-equipped-HELMET.png diff --git a/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/inhand-left.png b/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/off-inhand-left.png similarity index 100% rename from Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/inhand-left.png rename to Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/off-inhand-left.png diff --git a/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/inhand-right.png b/Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/off-inhand-right.png similarity index 100% rename from Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/inhand-right.png rename to Resources/Textures/Clothing/Head/Misc/pumpkin.rsi/off-inhand-right.png diff --git a/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/equipped-OUTERCLOTHING.png b/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/equipped-OUTERCLOTHING.png new file mode 100644 index 0000000000..d0b9d06f5e Binary files /dev/null and b/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/equipped-OUTERCLOTHING.png differ diff --git a/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/icon.png b/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/icon.png new file mode 100644 index 0000000000..41a9647456 Binary files /dev/null and b/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/inhand-left.png b/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/inhand-left.png new file mode 100644 index 0000000000..afafe24513 Binary files /dev/null and b/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/inhand-right.png b/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/inhand-right.png new file mode 100644 index 0000000000..144d4d7e44 Binary files /dev/null and b/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/meta.json b/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/meta.json new file mode 100644 index 0000000000..70ee956fea --- /dev/null +++ b/Resources/Textures/Clothing/OuterClothing/Coats/space_asshole.rsi/meta.json @@ -0,0 +1,26 @@ +{ + "version": 1, + "license": "CC0-1.0", + "copyright": "Made by Github user Psychpsyo for Space Station 14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "equipped-OUTERCLOTHING", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Effects/foam.rsi/foam-east.png b/Resources/Textures/Effects/foam.rsi/foam-east.png new file mode 100644 index 0000000000..4b4523012c Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/foam-east.png differ diff --git a/Resources/Textures/Effects/foam.rsi/foam-north.png b/Resources/Textures/Effects/foam.rsi/foam-north.png new file mode 100644 index 0000000000..b0eb1e7bc7 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/foam-north.png differ diff --git a/Resources/Textures/Effects/foam.rsi/foam-south.png b/Resources/Textures/Effects/foam.rsi/foam-south.png new file mode 100644 index 0000000000..761927c3f2 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/foam-south.png differ diff --git a/Resources/Textures/Effects/foam.rsi/foam-west.png b/Resources/Textures/Effects/foam.rsi/foam-west.png new file mode 100644 index 0000000000..1513b5c39f Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/foam-west.png differ diff --git a/Resources/Textures/Effects/foam.rsi/iron_foam-east.png b/Resources/Textures/Effects/foam.rsi/iron_foam-east.png new file mode 100644 index 0000000000..be075b71f0 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/iron_foam-east.png differ diff --git a/Resources/Textures/Effects/foam.rsi/iron_foam-north.png b/Resources/Textures/Effects/foam.rsi/iron_foam-north.png new file mode 100644 index 0000000000..30ff28c875 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/iron_foam-north.png differ diff --git a/Resources/Textures/Effects/foam.rsi/iron_foam-south.png b/Resources/Textures/Effects/foam.rsi/iron_foam-south.png new file mode 100644 index 0000000000..99213b98e6 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/iron_foam-south.png differ diff --git a/Resources/Textures/Effects/foam.rsi/iron_foam-west.png b/Resources/Textures/Effects/foam.rsi/iron_foam-west.png new file mode 100644 index 0000000000..0608fdf32a Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/iron_foam-west.png differ diff --git a/Resources/Textures/Effects/foam.rsi/ironfoam.png b/Resources/Textures/Effects/foam.rsi/iron_foam.png similarity index 100% rename from Resources/Textures/Effects/foam.rsi/ironfoam.png rename to Resources/Textures/Effects/foam.rsi/iron_foam.png diff --git a/Resources/Textures/Effects/foam.rsi/mfoam-dissolve.png b/Resources/Textures/Effects/foam.rsi/m_foam-dissolve.png similarity index 100% rename from Resources/Textures/Effects/foam.rsi/mfoam-dissolve.png rename to Resources/Textures/Effects/foam.rsi/m_foam-dissolve.png diff --git a/Resources/Textures/Effects/foam.rsi/m_foam-east.png b/Resources/Textures/Effects/foam.rsi/m_foam-east.png new file mode 100644 index 0000000000..754604aa64 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/m_foam-east.png differ diff --git a/Resources/Textures/Effects/foam.rsi/m_foam-north.png b/Resources/Textures/Effects/foam.rsi/m_foam-north.png new file mode 100644 index 0000000000..e170444a63 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/m_foam-north.png differ diff --git a/Resources/Textures/Effects/foam.rsi/m_foam-south.png b/Resources/Textures/Effects/foam.rsi/m_foam-south.png new file mode 100644 index 0000000000..7b374e6039 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/m_foam-south.png differ diff --git a/Resources/Textures/Effects/foam.rsi/m_foam-west.png b/Resources/Textures/Effects/foam.rsi/m_foam-west.png new file mode 100644 index 0000000000..07439be545 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/m_foam-west.png differ diff --git a/Resources/Textures/Effects/foam.rsi/mfoam.png b/Resources/Textures/Effects/foam.rsi/m_foam.png similarity index 100% rename from Resources/Textures/Effects/foam.rsi/mfoam.png rename to Resources/Textures/Effects/foam.rsi/m_foam.png diff --git a/Resources/Textures/Effects/foam.rsi/meta.json b/Resources/Textures/Effects/foam.rsi/meta.json index 33d13b267b..f4cbd1d7f8 100644 --- a/Resources/Textures/Effects/foam.rsi/meta.json +++ b/Resources/Textures/Effects/foam.rsi/meta.json @@ -1 +1,99 @@ -{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/81b3a082ccdfb425f36bbed6e5bc1f0faed346ec/icons/effects/effects.dmi", "states": [{"name": "foam", "directions": 1}, {"name": "foam-dissolve", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "ironfoam", "directions": 1}, {"name": "metalfoam", "directions": 1}, {"name": "mfoam", "directions": 1}, {"name": "mfoam-dissolve", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}]} \ No newline at end of file +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/81b3a082ccdfb425f36bbed6e5bc1f0faed346ec/icons/effects/effects.dmi, foam_directionals by brainfood1183 (github)", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "foam" + }, + { + "name": "foam-west" + }, + { + "name": "foam-east" + }, + { + "name": "foam-north" + }, + { + "name": "foam-south" + }, + { + "name": "iron_foam" + }, + { + "name": "iron_foam-north" + }, + { + "name": "iron_foam-east" + }, + { + "name": "iron_foam-south" + }, + { + "name": "iron_foam-west" + }, + { + "name": "metal_foam" + }, + { + "name": "metal_foam-north" + }, + { + "name": "metal_foam-east" + }, + { + "name": "metal_foam-south" + }, + { + "name": "metal_foam-west" + }, + { + "name": "m_foam" + }, + { + "name": "m_foam-north" + }, + { + "name": "m_foam-east" + }, + { + "name": "m_foam-south" + }, + { + "name": "m_foam-west" + }, + { + "name": "m_foam-dissolve", + "directions": 1, + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "foam-dissolve", + "directions": 1, + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Effects/foam.rsi/metal_foam-east.png b/Resources/Textures/Effects/foam.rsi/metal_foam-east.png new file mode 100644 index 0000000000..77b1d68910 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/metal_foam-east.png differ diff --git a/Resources/Textures/Effects/foam.rsi/metal_foam-north.png b/Resources/Textures/Effects/foam.rsi/metal_foam-north.png new file mode 100644 index 0000000000..141433ed76 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/metal_foam-north.png differ diff --git a/Resources/Textures/Effects/foam.rsi/metal_foam-south.png b/Resources/Textures/Effects/foam.rsi/metal_foam-south.png new file mode 100644 index 0000000000..95f8932c6c Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/metal_foam-south.png differ diff --git a/Resources/Textures/Effects/foam.rsi/metal_foam-west.png b/Resources/Textures/Effects/foam.rsi/metal_foam-west.png new file mode 100644 index 0000000000..c2e2848333 Binary files /dev/null and b/Resources/Textures/Effects/foam.rsi/metal_foam-west.png differ diff --git a/Resources/Textures/Effects/foam.rsi/metalfoam.png b/Resources/Textures/Effects/foam.rsi/metal_foam.png similarity index 100% rename from Resources/Textures/Effects/foam.rsi/metalfoam.png rename to Resources/Textures/Effects/foam.rsi/metal_foam.png diff --git a/Resources/Textures/Interface/Classic/slot_highlight.png b/Resources/Textures/Interface/Classic/slot_highlight.png new file mode 100644 index 0000000000..d70086971d Binary files /dev/null and b/Resources/Textures/Interface/Classic/slot_highlight.png differ diff --git a/Resources/Textures/Mobs/Customization/Moth/moth_parts.rsi/deathhead_r_leg.png b/Resources/Textures/Mobs/Customization/Moth/moth_parts.rsi/deathhead_r_leg.png index 41df319be9..7169cda3bb 100644 Binary files a/Resources/Textures/Mobs/Customization/Moth/moth_parts.rsi/deathhead_r_leg.png and b/Resources/Textures/Mobs/Customization/Moth/moth_parts.rsi/deathhead_r_leg.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/meta.json b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/meta.json new file mode 100644 index 0000000000..8f86af7053 --- /dev/null +++ b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/meta.json @@ -0,0 +1,29 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/blob/e00cae8d065f9cf520688cc0dd0e15ba5bef12a9/icons/obj/flora/jungleflora.dmi and recolor by TheShuEd", + "size": { + "x": 96, + "y": 96 + }, + "states": [ + { + "name": "tree01" + }, + { + "name": "tree02" + }, + { + "name": "tree03" + }, + { + "name": "tree04" + }, + { + "name": "tree05" + }, + { + "name": "tree06" + } + ] +} diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree01.png b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree01.png new file mode 100644 index 0000000000..99ca699d42 Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree01.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree02.png b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree02.png new file mode 100644 index 0000000000..4aa9a2913f Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree02.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree03.png b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree03.png new file mode 100644 index 0000000000..5a833a3ac7 Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree03.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree04.png b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree04.png new file mode 100644 index 0000000000..4d1cefe2fd Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree04.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree05.png b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree05.png new file mode 100644 index 0000000000..8b2cd2a30b Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree05.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree06.png b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree06.png new file mode 100644 index 0000000000..888fbfd25b Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_shadow_trees.rsi/tree06.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/meta.json b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/meta.json new file mode 100644 index 0000000000..33dc4fa073 --- /dev/null +++ b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/meta.json @@ -0,0 +1,29 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from TGMC at commit https://github.com/tgstation/TerraGov-Marine-Corps/commit/4bf5d1aafbcbbb7bd2a7d0f52ef87f28e2bbb384", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "stalagmite1" + }, + { + "name": "stalagmite2" + }, + { + "name": "stalagmite3" + }, + { + "name": "stalagmite4" + }, + { + "name": "stalagmite5" + }, + { + "name": "stalagmite6" + } + ] +} diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite1.png b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite1.png new file mode 100644 index 0000000000..ed9ddfd8ab Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite1.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite2.png b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite2.png new file mode 100644 index 0000000000..e816776261 Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite2.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite3.png b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite3.png new file mode 100644 index 0000000000..19394a6621 Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite3.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite4.png b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite4.png new file mode 100644 index 0000000000..90e0e75a07 Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite4.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite5.png b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite5.png new file mode 100644 index 0000000000..a10cdb5d9b Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite5.png differ diff --git a/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite6.png b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite6.png new file mode 100644 index 0000000000..b424d6dfe0 Binary files /dev/null and b/Resources/Textures/Objects/Decoration/Flora/flora_stalagmite.rsi/stalagmite6.png differ diff --git a/Resources/Textures/Objects/Decoration/mines.rsi/meta.json b/Resources/Textures/Objects/Decoration/mines.rsi/meta.json new file mode 100644 index 0000000000..39f167a0d6 --- /dev/null +++ b/Resources/Textures/Objects/Decoration/mines.rsi/meta.json @@ -0,0 +1,29 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from TGMC at commit https://github.com/tgstation/TerraGov-Marine-Corps/commit/4bf5d1aafbcbbb7bd2a7d0f52ef87f28e2bbb384", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "sign_left" + }, + { + "name": "sign_right" + }, + { + "name": "support" + }, + { + "name": "support_beams" + }, + { + "name": "support_wall" + }, + { + "name": "support_wall_broken" + } + ] +} diff --git a/Resources/Textures/Objects/Decoration/mines.rsi/sign_left.png b/Resources/Textures/Objects/Decoration/mines.rsi/sign_left.png new file mode 100644 index 0000000000..96f5692791 Binary files /dev/null and b/Resources/Textures/Objects/Decoration/mines.rsi/sign_left.png differ diff --git a/Resources/Textures/Objects/Decoration/mines.rsi/sign_right.png b/Resources/Textures/Objects/Decoration/mines.rsi/sign_right.png new file mode 100644 index 0000000000..f89435fafc Binary files /dev/null and b/Resources/Textures/Objects/Decoration/mines.rsi/sign_right.png differ diff --git a/Resources/Textures/Objects/Decoration/mines.rsi/support.png b/Resources/Textures/Objects/Decoration/mines.rsi/support.png new file mode 100644 index 0000000000..29f7482b28 Binary files /dev/null and b/Resources/Textures/Objects/Decoration/mines.rsi/support.png differ diff --git a/Resources/Textures/Objects/Decoration/mines.rsi/support_beams.png b/Resources/Textures/Objects/Decoration/mines.rsi/support_beams.png new file mode 100644 index 0000000000..3111d15dcb Binary files /dev/null and b/Resources/Textures/Objects/Decoration/mines.rsi/support_beams.png differ diff --git a/Resources/Textures/Objects/Decoration/mines.rsi/support_wall.png b/Resources/Textures/Objects/Decoration/mines.rsi/support_wall.png new file mode 100644 index 0000000000..9b14590952 Binary files /dev/null and b/Resources/Textures/Objects/Decoration/mines.rsi/support_wall.png differ diff --git a/Resources/Textures/Objects/Decoration/mines.rsi/support_wall_broken.png b/Resources/Textures/Objects/Decoration/mines.rsi/support_wall_broken.png new file mode 100644 index 0000000000..4032c6e45c Binary files /dev/null and b/Resources/Textures/Objects/Decoration/mines.rsi/support_wall_broken.png differ diff --git a/Resources/Textures/Objects/Devices/health_analyzer.rsi/airloss.png b/Resources/Textures/Objects/Devices/health_analyzer.rsi/airloss.png new file mode 100644 index 0000000000..82fa0e2c88 Binary files /dev/null and b/Resources/Textures/Objects/Devices/health_analyzer.rsi/airloss.png differ diff --git a/Resources/Textures/Objects/Devices/health_analyzer.rsi/brute.png b/Resources/Textures/Objects/Devices/health_analyzer.rsi/brute.png new file mode 100644 index 0000000000..bd5d80da30 Binary files /dev/null and b/Resources/Textures/Objects/Devices/health_analyzer.rsi/brute.png differ diff --git a/Resources/Textures/Objects/Devices/health_analyzer.rsi/burn.png b/Resources/Textures/Objects/Devices/health_analyzer.rsi/burn.png new file mode 100644 index 0000000000..cf65084e44 Binary files /dev/null and b/Resources/Textures/Objects/Devices/health_analyzer.rsi/burn.png differ diff --git a/Resources/Textures/Objects/Devices/health_analyzer.rsi/genetic.png b/Resources/Textures/Objects/Devices/health_analyzer.rsi/genetic.png new file mode 100644 index 0000000000..b660aed537 Binary files /dev/null and b/Resources/Textures/Objects/Devices/health_analyzer.rsi/genetic.png differ diff --git a/Resources/Textures/Objects/Devices/health_analyzer.rsi/meta.json b/Resources/Textures/Objects/Devices/health_analyzer.rsi/meta.json new file mode 100644 index 0000000000..3fccf5c46b --- /dev/null +++ b/Resources/Textures/Objects/Devices/health_analyzer.rsi/meta.json @@ -0,0 +1,29 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "airloss, brute, toxin and burn edited from /tg/station https://github.com/tgstation/tgstation/tree/master genetic edited from https://iconscout.com/free-icon/dna-2130814 with license CC BY 4.0", + "states": [ + { + "name": "airloss" + }, + { + "name": "genetic" + }, + { + "name": "brute" + }, + { + "name": "toxin" + }, + { + "name": "burn" + }, + { + "name": "unknown" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Devices/health_analyzer.rsi/toxin.png b/Resources/Textures/Objects/Devices/health_analyzer.rsi/toxin.png new file mode 100644 index 0000000000..b0aafddca3 Binary files /dev/null and b/Resources/Textures/Objects/Devices/health_analyzer.rsi/toxin.png differ diff --git a/Resources/Textures/Objects/Devices/health_analyzer.rsi/unknown.png b/Resources/Textures/Objects/Devices/health_analyzer.rsi/unknown.png new file mode 100644 index 0000000000..f68e2c990e Binary files /dev/null and b/Resources/Textures/Objects/Devices/health_analyzer.rsi/unknown.png differ diff --git a/Resources/Textures/Objects/Fun/pai.rsi/icon-potato-off.png b/Resources/Textures/Objects/Fun/pai.rsi/icon-potato-off.png new file mode 100644 index 0000000000..806d02d6f3 Binary files /dev/null and b/Resources/Textures/Objects/Fun/pai.rsi/icon-potato-off.png differ diff --git a/Resources/Textures/Objects/Fun/pai.rsi/meta.json b/Resources/Textures/Objects/Fun/pai.rsi/meta.json index 905a3684f8..f819450aa8 100644 --- a/Resources/Textures/Objects/Fun/pai.rsi/meta.json +++ b/Resources/Textures/Objects/Fun/pai.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/9ddb8cf084e292571d4e9c79745db25befbd82fe. pai-searching-overlay heavily modified. Syndicate variants by fedKotikeD", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/9ddb8cf084e292571d4e9c79745db25befbd82fe. pai-searching-overlay heavily modified. Syndicate variants by fedKotikeD, and potato by Doru991", "size": { "x": 32, "y": 32 @@ -13,6 +13,9 @@ { "name": "pai-base" }, + { + "name": "potato-base" + }, { "name": "pai-off-overlay" }, @@ -57,6 +60,18 @@ 0.8 ] ] + }, + { + "name": "icon-potato-off" + }, + { + "name": "potato-off-overlay" + }, + { + "name": "potato-on-overlay" + }, + { + "name": "potato-searching-overlay" } ] } diff --git a/Resources/Textures/Objects/Fun/pai.rsi/potato-base.png b/Resources/Textures/Objects/Fun/pai.rsi/potato-base.png new file mode 100644 index 0000000000..b6e594430c Binary files /dev/null and b/Resources/Textures/Objects/Fun/pai.rsi/potato-base.png differ diff --git a/Resources/Textures/Objects/Fun/pai.rsi/potato-off-overlay.png b/Resources/Textures/Objects/Fun/pai.rsi/potato-off-overlay.png new file mode 100644 index 0000000000..0d3f735158 Binary files /dev/null and b/Resources/Textures/Objects/Fun/pai.rsi/potato-off-overlay.png differ diff --git a/Resources/Textures/Objects/Fun/pai.rsi/potato-on-overlay.png b/Resources/Textures/Objects/Fun/pai.rsi/potato-on-overlay.png new file mode 100644 index 0000000000..9926823662 Binary files /dev/null and b/Resources/Textures/Objects/Fun/pai.rsi/potato-on-overlay.png differ diff --git a/Resources/Textures/Objects/Fun/pai.rsi/potato-searching-overlay.png b/Resources/Textures/Objects/Fun/pai.rsi/potato-searching-overlay.png new file mode 100644 index 0000000000..5d8d7cde30 Binary files /dev/null and b/Resources/Textures/Objects/Fun/pai.rsi/potato-searching-overlay.png differ diff --git a/Resources/Textures/Objects/Fun/toys.rsi/bee-equipped-HELMET.png b/Resources/Textures/Objects/Fun/toys.rsi/bee-equipped-HELMET.png new file mode 100644 index 0000000000..ba56a09a59 Binary files /dev/null and b/Resources/Textures/Objects/Fun/toys.rsi/bee-equipped-HELMET.png differ diff --git a/Resources/Textures/Objects/Fun/toys.rsi/bee-inhand-left.png b/Resources/Textures/Objects/Fun/toys.rsi/bee-inhand-left.png new file mode 100644 index 0000000000..900432e394 Binary files /dev/null and b/Resources/Textures/Objects/Fun/toys.rsi/bee-inhand-left.png differ diff --git a/Resources/Textures/Objects/Fun/toys.rsi/bee-inhand-right.png b/Resources/Textures/Objects/Fun/toys.rsi/bee-inhand-right.png new file mode 100644 index 0000000000..5563fc4d3c Binary files /dev/null and b/Resources/Textures/Objects/Fun/toys.rsi/bee-inhand-right.png differ diff --git a/Resources/Textures/Objects/Fun/toys.rsi/meta.json b/Resources/Textures/Objects/Fun/toys.rsi/meta.json index 77a1128149..a5f1211666 100644 --- a/Resources/Textures/Objects/Fun/toys.rsi/meta.json +++ b/Resources/Textures/Objects/Fun/toys.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/e1142f20f5e4661cb6845cfcf2dd69f864d67432, orb, orb-inhand-left and orb-inhand-right created by Pancake, plushie_diona and plushie_diona1 created by discord user Deos#5630, toy-mouse-equipped-HELMET is a resprited 1-equipped-HELMET in mouse.rsi by PuroSlavKing (Github), plushie_xeno by LinkUyx#6557, plushie_hampter by RenLou#4333, beachball taken from https://github.com/ss220-space/Paradise/commit/662c08272acd7be79531550919f56f846726eabb, beachb-inhand by ;3#1161", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/e1142f20f5e4661cb6845cfcf2dd69f864d67432, orb, orb-inhand-left and orb-inhand-right created by Pancake, plushie_diona and plushie_diona1 created by discord user Deos#5630, toy-mouse-equipped-HELMET is a resprited 1-equipped-HELMET in mouse.rsi by PuroSlavKing (Github), plushie_xeno by LinkUyx#6557, plushie_hampter by RenLou#4333, beachball taken from https://github.com/ss220-space/Paradise/commit/662c08272acd7be79531550919f56f846726eabb, beachb-inhand by ;3#1161, bee hat and in-hand sprites drawn by Ubaser", "size": { "x": 32, "y": 32 @@ -10,7 +10,7 @@ { "name": "plushie_ratvar" }, - { + { "name": "plushie_moth" }, { @@ -29,7 +29,19 @@ { "name": "plushie_h" }, - { + { + "name": "bee-equipped-HELMET", + "directions": 4 + }, + { + "name": "bee-inhand-left", + "directions": 4 + }, + { + "name": "bee-inhand-right", + "directions": 4 + }, + { "name": "plushie_hampter" }, { diff --git a/Resources/Textures/Objects/Misc/potatoai_chip.rsi/icon.png b/Resources/Textures/Objects/Misc/potatoai_chip.rsi/icon.png new file mode 100644 index 0000000000..68ba38d279 Binary files /dev/null and b/Resources/Textures/Objects/Misc/potatoai_chip.rsi/icon.png differ diff --git a/Resources/Textures/Objects/Misc/potatoai_chip.rsi/meta.json b/Resources/Textures/Objects/Misc/potatoai_chip.rsi/meta.json new file mode 100644 index 0000000000..dec5a8d3f7 --- /dev/null +++ b/Resources/Textures/Objects/Misc/potatoai_chip.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Drawn by @Doru991 for SS14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + } + ] +} diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/meta.json b/Resources/Textures/Objects/Power/power_cells.rsi/meta.json index 01c2300621..66dbf30841 100644 --- a/Resources/Textures/Objects/Power/power_cells.rsi/meta.json +++ b/Resources/Textures/Objects/Power/power_cells.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "CC-BY-SA-3.0", - "copyright": "https://github.com/tgstation/tgstation/commit/7dcdbc1468ffdc8689b984cb6b181d48ae41dbf2", + "copyright": "https://github.com/tgstation/tgstation/commit/7dcdbc1468ffdc8689b984cb6b181d48ae41dbf2, potato based on https://github.com/vgstation-coders/vgstation13/commit/1dbcf389b0ec6b2c51b002df5fef8dd1519f8068 edited by @Doru991", "states": [ { "name": "potato" diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/potato.png b/Resources/Textures/Objects/Power/power_cells.rsi/potato.png index 5b0f7a5fe0..53572f46a1 100644 Binary files a/Resources/Textures/Objects/Power/power_cells.rsi/potato.png and b/Resources/Textures/Objects/Power/power_cells.rsi/potato.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/dead.png b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/dead.png new file mode 100644 index 0000000000..8fa7120b29 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/dead.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/harvest.png b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/harvest.png new file mode 100644 index 0000000000..d4f146d88a Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/harvest.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/meta.json b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/meta.json new file mode 100644 index 0000000000..c78dcee56d --- /dev/null +++ b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/meta.json @@ -0,0 +1,32 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/a5e6db8f99b436b643bd3b76fa131ac074dfd856", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "dead" + }, + { + "name": "harvest" + }, + { + "name": "produce" + }, + { + "name": "seed" + }, + { + "name": "stage-1" + }, + { + "name": "stage-2" + }, + { + "name": "stage-3" + } + ] +} diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/produce.png b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/produce.png new file mode 100644 index 0000000000..d5881c2e3e Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/produce.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/seed.png b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/seed.png new file mode 100644 index 0000000000..7f7931e440 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/seed.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/stage-1.png b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/stage-1.png new file mode 100644 index 0000000000..cfd3786315 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/stage-1.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/stage-2.png b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/stage-2.png new file mode 100644 index 0000000000..b724176aa5 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/stage-2.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/stage-3.png b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/stage-3.png new file mode 100644 index 0000000000..fd9cfaaa3d Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pea.rsi/stage-3.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/carved.png b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/carved.png new file mode 100644 index 0000000000..6eb43adee1 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/carved.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/dead.png b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/dead.png new file mode 100644 index 0000000000..e66da2064a Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/dead.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/harvest.png b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/harvest.png new file mode 100644 index 0000000000..ea6a13ed31 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/harvest.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/lantern.png b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/lantern.png new file mode 100644 index 0000000000..e07dacbcc9 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/lantern.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/meta.json b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/meta.json new file mode 100644 index 0000000000..a6409ac1ff --- /dev/null +++ b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/meta.json @@ -0,0 +1,47 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/tgstation/tgstation/blob/5d507cfbad6f73d1beaba66d93f31f893adb3a84/icons/obj/hydroponics/harvest.dmi, carved sprites by ps3moira", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "dead" + }, + { + "name": "harvest" + }, + { + "name": "produce" + }, + { + "name": "seed" + }, + { + "name": "stage-1" + }, + { + "name": "stage-2" + }, + { + "name": "stage-3" + }, + { + "name": "carved" + }, + { + "name": "lantern", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/produce.png b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/produce.png new file mode 100644 index 0000000000..6fa2ec1939 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/produce.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/seed.png b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/seed.png new file mode 100644 index 0000000000..a60957f895 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/seed.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/stage-1.png b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/stage-1.png new file mode 100644 index 0000000000..762e986ae9 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/stage-1.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/stage-2.png b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/stage-2.png new file mode 100644 index 0000000000..22f418d571 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/stage-2.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/stage-3.png b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/stage-3.png new file mode 100644 index 0000000000..eb08406899 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/pumpkin.rsi/stage-3.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/mmi.rsi/meta.json b/Resources/Textures/Objects/Specific/Robotics/mmi.rsi/meta.json index 6499772c7a..fcdd9e1b26 100644 --- a/Resources/Textures/Objects/Specific/Robotics/mmi.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Robotics/mmi.rsi/meta.json @@ -76,4 +76,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/icon.png b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/icon.png new file mode 100644 index 0000000000..287c02bd94 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/icon.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/inhand-left.png b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/inhand-left.png new file mode 100644 index 0000000000..d728c4112b Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/inhand-left.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/inhand-right.png b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/inhand-right.png new file mode 100644 index 0000000000..b5889d3dee Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/inhand-right.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/meta.json b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/meta.json new file mode 100644 index 0000000000..b8bbd26672 --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/meta.json @@ -0,0 +1,30 @@ +{ + "version": 1, + "license": "CC0-1.0", + "copyright": "Made by Github user Psychpsyo for Space Station 14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + }, + { + "name": "wielded-inhand-left", + "directions": 4 + }, + { + "name": "wielded-inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/wielded-inhand-left.png b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/wielded-inhand-left.png new file mode 100644 index 0000000000..c0ae12785e Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/wielded-inhand-left.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/wielded-inhand-right.png b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/wielded-inhand-right.png new file mode 100644 index 0000000000..21c9a32a7f Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/sledgehammer.rsi/wielded-inhand-right.png differ diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/ammo.png b/Resources/Textures/Structures/Machines/techfab.rsi/ammo.png index 38f7a4dd2c..c2f1c61ace 100644 Binary files a/Resources/Textures/Structures/Machines/techfab.rsi/ammo.png and b/Resources/Textures/Structures/Machines/techfab.rsi/ammo.png differ diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/cargo.png b/Resources/Textures/Structures/Machines/techfab.rsi/cargo.png new file mode 100644 index 0000000000..d89e51d199 Binary files /dev/null and b/Resources/Textures/Structures/Machines/techfab.rsi/cargo.png differ diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/engi.png b/Resources/Textures/Structures/Machines/techfab.rsi/engi.png new file mode 100644 index 0000000000..5ba7c813b9 Binary files /dev/null and b/Resources/Textures/Structures/Machines/techfab.rsi/engi.png differ diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/icon.png b/Resources/Textures/Structures/Machines/techfab.rsi/icon.png index 4015336f16..186fd30082 100644 Binary files a/Resources/Textures/Structures/Machines/techfab.rsi/icon.png and b/Resources/Textures/Structures/Machines/techfab.rsi/icon.png differ diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/inserting.png b/Resources/Textures/Structures/Machines/techfab.rsi/inserting.png index 3f3c09debf..647eb27246 100644 Binary files a/Resources/Textures/Structures/Machines/techfab.rsi/inserting.png and b/Resources/Textures/Structures/Machines/techfab.rsi/inserting.png differ diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/med.png b/Resources/Textures/Structures/Machines/techfab.rsi/med.png index 506b03568a..86a740cb4c 100644 Binary files a/Resources/Textures/Structures/Machines/techfab.rsi/med.png and b/Resources/Textures/Structures/Machines/techfab.rsi/med.png differ diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/meta.json b/Resources/Textures/Structures/Machines/techfab.rsi/meta.json index 11a48c4a0d..7530b9322a 100644 --- a/Resources/Textures/Structures/Machines/techfab.rsi/meta.json +++ b/Resources/Textures/Structures/Machines/techfab.rsi/meta.json @@ -14,7 +14,22 @@ "name": "med" }, { - "name": "ammo" + "name": "sec" + }, + { + "name": "sci" + }, + { + "name": "engi" + }, + { + "name": "service" + }, + { + "name": "cargo" + }, + { + "name": "ammo" }, { "name": "panel" diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/sci.png b/Resources/Textures/Structures/Machines/techfab.rsi/sci.png new file mode 100644 index 0000000000..a2c7e72cab Binary files /dev/null and b/Resources/Textures/Structures/Machines/techfab.rsi/sci.png differ diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/sec.png b/Resources/Textures/Structures/Machines/techfab.rsi/sec.png new file mode 100644 index 0000000000..c045c69396 Binary files /dev/null and b/Resources/Textures/Structures/Machines/techfab.rsi/sec.png differ diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/service.png b/Resources/Textures/Structures/Machines/techfab.rsi/service.png new file mode 100644 index 0000000000..4270548bbb Binary files /dev/null and b/Resources/Textures/Structures/Machines/techfab.rsi/service.png differ diff --git a/Resources/Textures/Structures/Machines/techfab.rsi/unlit.png b/Resources/Textures/Structures/Machines/techfab.rsi/unlit.png index 3f6dd30c96..6635772d33 100644 Binary files a/Resources/Textures/Structures/Machines/techfab.rsi/unlit.png and b/Resources/Textures/Structures/Machines/techfab.rsi/unlit.png differ diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/chasm.png b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm.png similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/chasm.png rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm.png diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/chasm0.png b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm0.png similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/chasm0.png rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm0.png diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/chasm1.png b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm1.png similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/chasm1.png rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm1.png diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/chasm2.png b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm2.png similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/chasm2.png rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm2.png diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/chasm3.png b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm3.png similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/chasm3.png rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm3.png diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/chasm4.png b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm4.png similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/chasm4.png rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm4.png diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/chasm5.png b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm5.png similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/chasm5.png rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm5.png diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/chasm6.png b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm6.png similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/chasm6.png rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm6.png diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/chasm7.png b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm7.png similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/chasm7.png rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/chasm7.png diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/full.png b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/full.png similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/full.png rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/full.png diff --git a/Resources/Textures/Tiles/Planet/chasm.rsi/meta.json b/Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/meta.json similarity index 100% rename from Resources/Textures/Tiles/Planet/chasm.rsi/meta.json rename to Resources/Textures/Tiles/Planet/Chasms/basalt_chasm.rsi/meta.json diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm.png b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm.png new file mode 100644 index 0000000000..81355cd0cb Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm0.png b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm0.png new file mode 100644 index 0000000000..18b3514673 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm0.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm1.png b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm1.png new file mode 100644 index 0000000000..32976f4816 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm1.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm2.png b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm2.png new file mode 100644 index 0000000000..18b3514673 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm2.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm3.png b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm3.png new file mode 100644 index 0000000000..32976f4816 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm3.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm4.png b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm4.png new file mode 100644 index 0000000000..cb77ce6147 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm4.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm5.png b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm5.png new file mode 100644 index 0000000000..beeb8d3499 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm5.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm6.png b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm6.png new file mode 100644 index 0000000000..cb77ce6147 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm6.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm7.png b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm7.png new file mode 100644 index 0000000000..0858c19f05 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/chasm7.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/full.png b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/full.png new file mode 100644 index 0000000000..59b9454af0 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/full.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/meta.json b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/meta.json new file mode 100644 index 0000000000..e303031e1f --- /dev/null +++ b/Resources/Textures/Tiles/Planet/Chasms/chromite_chasm.rsi/meta.json @@ -0,0 +1,49 @@ +{ + "version": 1, + "license": "CC0-1.0", + "copyright": "Created by TheShuEd (github) for ss14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "full" + }, + { + "name": "chasm0", + "directions": 4 + }, + { + "name": "chasm1", + "directions": 4 + }, + { + "name": "chasm2", + "directions": 4 + }, + { + "name": "chasm3", + "directions": 4 + }, + { + "name": "chasm4", + "directions": 4 + }, + { + "name": "chasm5", + "directions": 4 + }, + { + "name": "chasm6", + "directions": 4 + }, + { + "name": "chasm7", + "directions": 4 + }, + { + "name": "chasm" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm.png b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm.png new file mode 100644 index 0000000000..e09eb93e42 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm0.png b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm0.png new file mode 100644 index 0000000000..7139091f1e Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm0.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm1.png b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm1.png new file mode 100644 index 0000000000..dce7efd9a6 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm1.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm2.png b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm2.png new file mode 100644 index 0000000000..7139091f1e Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm2.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm3.png b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm3.png new file mode 100644 index 0000000000..dce7efd9a6 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm3.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm4.png b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm4.png new file mode 100644 index 0000000000..5cc155f825 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm4.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm5.png b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm5.png new file mode 100644 index 0000000000..05b5d7eccd Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm5.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm6.png b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm6.png new file mode 100644 index 0000000000..5cc155f825 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm6.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm7.png b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm7.png new file mode 100644 index 0000000000..0858c19f05 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/chasm7.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/full.png b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/full.png new file mode 100644 index 0000000000..03aa532353 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/full.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/meta.json b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/meta.json new file mode 100644 index 0000000000..e303031e1f --- /dev/null +++ b/Resources/Textures/Tiles/Planet/Chasms/desert_chasm.rsi/meta.json @@ -0,0 +1,49 @@ +{ + "version": 1, + "license": "CC0-1.0", + "copyright": "Created by TheShuEd (github) for ss14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "full" + }, + { + "name": "chasm0", + "directions": 4 + }, + { + "name": "chasm1", + "directions": 4 + }, + { + "name": "chasm2", + "directions": 4 + }, + { + "name": "chasm3", + "directions": 4 + }, + { + "name": "chasm4", + "directions": 4 + }, + { + "name": "chasm5", + "directions": 4 + }, + { + "name": "chasm6", + "directions": 4 + }, + { + "name": "chasm7", + "directions": 4 + }, + { + "name": "chasm" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm.png b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm.png new file mode 100644 index 0000000000..1124e0518c Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm0.png b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm0.png new file mode 100644 index 0000000000..a813ce8e9a Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm0.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm1.png b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm1.png new file mode 100644 index 0000000000..502b9e3d71 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm1.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm2.png b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm2.png new file mode 100644 index 0000000000..a813ce8e9a Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm2.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm3.png b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm3.png new file mode 100644 index 0000000000..502b9e3d71 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm3.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm4.png b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm4.png new file mode 100644 index 0000000000..f0fd989115 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm4.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm5.png b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm5.png new file mode 100644 index 0000000000..567cde6ad4 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm5.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm6.png b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm6.png new file mode 100644 index 0000000000..f0fd989115 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm6.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm7.png b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm7.png new file mode 100644 index 0000000000..0858c19f05 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/chasm7.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/full.png b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/full.png new file mode 100644 index 0000000000..525cdc2680 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/full.png differ diff --git a/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/meta.json b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/meta.json new file mode 100644 index 0000000000..e303031e1f --- /dev/null +++ b/Resources/Textures/Tiles/Planet/Chasms/snow_chasm.rsi/meta.json @@ -0,0 +1,49 @@ +{ + "version": 1, + "license": "CC0-1.0", + "copyright": "Created by TheShuEd (github) for ss14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "full" + }, + { + "name": "chasm0", + "directions": 4 + }, + { + "name": "chasm1", + "directions": 4 + }, + { + "name": "chasm2", + "directions": 4 + }, + { + "name": "chasm3", + "directions": 4 + }, + { + "name": "chasm4", + "directions": 4 + }, + { + "name": "chasm5", + "directions": 4 + }, + { + "name": "chasm6", + "directions": 4 + }, + { + "name": "chasm7", + "directions": 4 + }, + { + "name": "chasm" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt1.png b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt1.png new file mode 100644 index 0000000000..e8f873286c Binary files /dev/null and b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt1.png differ diff --git a/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt2.png b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt2.png new file mode 100644 index 0000000000..00a2711eb8 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt2.png differ diff --git a/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt3.png b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt3.png new file mode 100644 index 0000000000..27219f4882 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt3.png differ diff --git a/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt4.png b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt4.png new file mode 100644 index 0000000000..6081f54b02 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt4.png differ diff --git a/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt5.png b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt5.png new file mode 100644 index 0000000000..76c13b2e61 Binary files /dev/null and b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/basalt5.png differ diff --git a/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/meta.json b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/meta.json new file mode 100644 index 0000000000..0d71d4b561 --- /dev/null +++ b/Resources/Textures/Tiles/Planet/shadowbasalt.rsi/meta.json @@ -0,0 +1,66 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "taken from tgstation @ commit a0ca7b3f46132517f71f08bfda465667d133b5d7 and edited by TheShuEd", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "basalt1", + "delays": [ + [ + 2, + 2, + 2, + 2 + ] + ] + }, + { + "name": "basalt2", + "delays": [ + [ + 2, + 2, + 2, + 2 + ] + ] + }, + { + "name": "basalt3", + "delays": [ + [ + 2, + 2, + 2, + 2 + ] + ] + }, + { + "name": "basalt4", + "delays": [ + [ + 2, + 2, + 2, + 2 + ] + ] + }, + { + "name": "basalt5", + "delays": [ + [ + 2, + 2, + 2, + 2 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Tiles/attributions.yml b/Resources/Textures/Tiles/attributions.yml index 641100fe42..b732333dd7 100644 --- a/Resources/Textures/Tiles/attributions.yml +++ b/Resources/Textures/Tiles/attributions.yml @@ -95,3 +95,8 @@ license: "CC-BY-SA-3.0" copyright: "taken at https://github.com/ParadiseSS13/Paradise/blob/8b7f4c8b69c74c6de5a755272eb8d3520f3d87c7/icons/turf/floors.dmi" source: "https://github.com/ParadiseSS13/Paradise" + +- files: ["chromite.png"] + license: "CC-BY-NC-SA-3.0" + copyright: "taken at commit 0587dd16e28108bdf0b0a28e2caae4319845e861, and recolored by TheShuEd" + source: "https://github.com/Mojave-Sun/mojave-sun-13" \ No newline at end of file diff --git a/Resources/Textures/Tiles/chromite.png b/Resources/Textures/Tiles/chromite.png new file mode 100644 index 0000000000..631b9bf84e Binary files /dev/null and b/Resources/Textures/Tiles/chromite.png differ diff --git a/RobustToolbox b/RobustToolbox index 554e0777b1..f5874ea402 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 554e0777b1ba6ba096d8f4407d5c35ecc7b0f22f +Subproject commit f5874ea402430bb902a5d5d1f47953679d79d781