diff --git a/Content.Client/Alerts/ClientAlertsSystem.cs b/Content.Client/Alerts/ClientAlertsSystem.cs index 9c4ebb9cd2..223bf7876a 100644 --- a/Content.Client/Alerts/ClientAlertsSystem.cs +++ b/Content.Client/Alerts/ClientAlertsSystem.cs @@ -4,7 +4,6 @@ using JetBrains.Annotations; using Robust.Client.Player; using Robust.Shared.Player; using Robust.Shared.Prototypes; -using Robust.Shared.Timing; namespace Content.Client.Alerts; @@ -13,7 +12,6 @@ public sealed class ClientAlertsSystem : AlertsSystem { public AlertOrderPrototype? AlertOrder { get; set; } - [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; diff --git a/Content.Client/Audio/AmbientSoundSystem.cs b/Content.Client/Audio/AmbientSoundSystem.cs index 9d30cabb1e..0206017bae 100644 --- a/Content.Client/Audio/AmbientSoundSystem.cs +++ b/Content.Client/Audio/AmbientSoundSystem.cs @@ -50,7 +50,6 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem private static AudioParams _params = AudioParams.Default .WithVariation(0.01f) .WithLoop(true) - .WithAttenuation(Attenuation.LinearDistance) .WithMaxDistance(7f); /// diff --git a/Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs b/Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs index 0fdcc7a86d..92c5b7a419 100644 --- a/Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs +++ b/Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs @@ -23,8 +23,8 @@ public sealed partial class ContentAudioSystem [Dependency] private readonly IStateManager _stateManager = default!; [Dependency] private readonly IResourceCache _resourceCache = default!; - private readonly AudioParams _lobbySoundtrackParams = new(-5f, 1, "Master", 0, 0, 0, false, 0f); - private readonly AudioParams _roundEndSoundEffectParams = new(-5f, 1, "Master", 0, 0, 0, false, 0f); + private readonly AudioParams _lobbySoundtrackParams = new(-5f, 1, 0, 0, 0, false, 0f); + private readonly AudioParams _roundEndSoundEffectParams = new(-5f, 1, 0, 0, 0, false, 0f); /// /// EntityUid of lobby restart sound component. diff --git a/Content.Client/Clothing/ClientClothingSystem.cs b/Content.Client/Clothing/ClientClothingSystem.cs index fbe9d5ec5b..7e78ac7d70 100644 --- a/Content.Client/Clothing/ClientClothingSystem.cs +++ b/Content.Client/Clothing/ClientClothingSystem.cs @@ -133,7 +133,7 @@ public sealed class ClientClothingSystem : ClothingSystem else if (TryComp(uid, out SpriteComponent? sprite)) rsi = sprite.BaseRSI; - if (rsi == null || rsi.Path == null) + if (rsi == null) return false; var correctedSlot = slot; diff --git a/Content.Client/Doors/DoorSystem.cs b/Content.Client/Doors/DoorSystem.cs index 473ae97059..bc52730b0e 100644 --- a/Content.Client/Doors/DoorSystem.cs +++ b/Content.Client/Doors/DoorSystem.cs @@ -4,14 +4,12 @@ using Robust.Client.Animations; using Robust.Client.GameObjects; using Robust.Client.ResourceManagement; using Robust.Shared.Serialization.TypeSerializers.Implementations; -using Robust.Shared.Timing; namespace Content.Client.Doors; public sealed class DoorSystem : SharedDoorSystem { [Dependency] private readonly AnimationPlayerSystem _animationSystem = default!; - [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly IResourceCache _resourceCache = default!; public override void Initialize() diff --git a/Content.Client/Fluids/PuddleSystem.cs b/Content.Client/Fluids/PuddleSystem.cs index 54b1d5b86b..5dbffe0fd2 100644 --- a/Content.Client/Fluids/PuddleSystem.cs +++ b/Content.Client/Fluids/PuddleSystem.cs @@ -1,7 +1,9 @@ using Content.Client.IconSmoothing; +using Content.Shared.Chemistry.Components; using Content.Shared.Fluids; using Content.Shared.Fluids.Components; using Robust.Client.GameObjects; +using Robust.Shared.Map; namespace Content.Client.Fluids; @@ -21,7 +23,7 @@ public sealed class PuddleSystem : SharedPuddleSystem if (args.Sprite == null) return; - float volume = 1f; + var volume = 1f; if (args.AppearanceData.TryGetValue(PuddleVisuals.CurrentVolume, out var volumeObj)) { @@ -64,4 +66,38 @@ public sealed class PuddleSystem : SharedPuddleSystem args.Sprite.Color *= baseColor; } } + + #region Spill + + // Maybe someday we'll have clientside prediction for entity spawning, but not today. + // Until then, these methods do nothing on the client. + /// + public override bool TrySplashSpillAt(EntityUid uid, EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true, EntityUid? user = null) + { + puddleUid = EntityUid.Invalid; + return false; + } + + /// + public override bool TrySpillAt(EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true) + { + puddleUid = EntityUid.Invalid; + return false; + } + + /// + public override bool TrySpillAt(EntityUid uid, Solution solution, out EntityUid puddleUid, bool sound = true, TransformComponent? transformComponent = null) + { + puddleUid = EntityUid.Invalid; + return false; + } + + /// + public override bool TrySpillAt(TileRef tileRef, Solution solution, out EntityUid puddleUid, bool sound = true, bool tileReact = true) + { + puddleUid = EntityUid.Invalid; + return false; + } + + #endregion Spill } diff --git a/Content.Client/IconSmoothing/IconSmoothSystem.cs b/Content.Client/IconSmoothing/IconSmoothSystem.cs index 20a80c42a3..4b02560846 100644 --- a/Content.Client/IconSmoothing/IconSmoothSystem.cs +++ b/Content.Client/IconSmoothing/IconSmoothSystem.cs @@ -16,8 +16,6 @@ namespace Content.Client.IconSmoothing [UsedImplicitly] public sealed partial class IconSmoothSystem : EntitySystem { - [Dependency] private readonly IMapManager _mapManager = default!; - private readonly Queue _dirtyEntities = new(); private readonly Queue _anchorChangedEntities = new(); diff --git a/Content.Client/Items/Systems/ItemSystem.cs b/Content.Client/Items/Systems/ItemSystem.cs index e406ba2b55..5e60d06d0c 100644 --- a/Content.Client/Items/Systems/ItemSystem.cs +++ b/Content.Client/Items/Systems/ItemSystem.cs @@ -93,7 +93,7 @@ public sealed class ItemSystem : SharedItemSystem else if (TryComp(uid, out SpriteComponent? sprite)) rsi = sprite.BaseRSI; - if (rsi == null || rsi.Path == null) + if (rsi == null) return false; var state = (item.HeldPrefix == null) diff --git a/Content.Client/Kitchen/UI/GrinderMenu.xaml b/Content.Client/Kitchen/UI/GrinderMenu.xaml index b83128d004..dacddd0df6 100644 --- a/Content.Client/Kitchen/UI/GrinderMenu.xaml +++ b/Content.Client/Kitchen/UI/GrinderMenu.xaml @@ -3,10 +3,12 @@ xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" Title="{Loc grinder-menu-title}" MinSize="768 256"> - - public sealed class SpreaderSystem : EntitySystem { - [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly IPrototypeManager _prototype = default!; [Dependency] private readonly IRobustRandom _robustRandom = default!; [Dependency] private readonly SharedMapSystem _map = default!; diff --git a/Content.Server/Station/Systems/StationJobsSystem.cs b/Content.Server/Station/Systems/StationJobsSystem.cs index a3b7a57354..debac8902e 100644 --- a/Content.Server/Station/Systems/StationJobsSystem.cs +++ b/Content.Server/Station/Systems/StationJobsSystem.cs @@ -25,7 +25,6 @@ public sealed partial class StationJobsSystem : EntitySystem [Dependency] private readonly IConfigurationManager _configurationManager = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly GameTicker _gameTicker = default!; - [Dependency] private readonly StationSystem _stationSystem = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; /// diff --git a/Content.Server/Station/Systems/StationSystem.cs b/Content.Server/Station/Systems/StationSystem.cs index b9ff8a4339..492f15c8e2 100644 --- a/Content.Server/Station/Systems/StationSystem.cs +++ b/Content.Server/Station/Systems/StationSystem.cs @@ -29,7 +29,6 @@ public sealed class StationSystem : EntitySystem { [Dependency] private readonly IConfigurationManager _configurationManager = default!; [Dependency] private readonly ILogManager _logManager = default!; - [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly IPlayerManager _player = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly ChatSystem _chatSystem = default!; diff --git a/Content.Server/StationEvents/Events/NinjaSpawnRule.cs b/Content.Server/StationEvents/Events/NinjaSpawnRule.cs index c60f3298e7..8ad5c8602e 100644 --- a/Content.Server/StationEvents/Events/NinjaSpawnRule.cs +++ b/Content.Server/StationEvents/Events/NinjaSpawnRule.cs @@ -2,10 +2,8 @@ using Content.Server.GameTicking.Rules.Components; using Content.Server.Ninja.Systems; using Content.Server.Station.Components; using Content.Server.StationEvents.Components; -using Robust.Server.GameObjects; using Robust.Shared.Map; using Robust.Shared.Map.Components; -using Robust.Shared.Random; namespace Content.Server.StationEvents.Events; @@ -14,7 +12,6 @@ namespace Content.Server.StationEvents.Events; /// public sealed class NinjaSpawnRule : StationEventSystem { - [Dependency] private readonly SpaceNinjaSystem _ninja = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; protected override void Started(EntityUid uid, NinjaSpawnRuleComponent comp, GameRuleComponent gameRule, GameRuleStartedEvent args) diff --git a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSpeakerSystem.cs b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSpeakerSystem.cs index 7544fc376b..0e694a801e 100644 --- a/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSpeakerSystem.cs +++ b/Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSpeakerSystem.cs @@ -1,10 +1,7 @@ using Content.Server.Chat.Systems; using Content.Server.Speech; using Content.Shared.Speech; -using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; -using Robust.Shared.Prototypes; -using Robust.Shared.Random; using Robust.Shared.Timing; namespace Content.Server.SurveillanceCamera; @@ -18,8 +15,6 @@ public sealed class SurveillanceCameraSpeakerSystem : EntitySystem [Dependency] private readonly SpeechSoundSystem _speechSound = default!; [Dependency] private readonly ChatSystem _chatSystem = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; - [Dependency] private readonly IRobustRandom _random = default!; /// public override void Initialize() diff --git a/Content.Server/Temperature/Systems/TemperatureSystem.cs b/Content.Server/Temperature/Systems/TemperatureSystem.cs index aef4b89d50..6c9e99e5f3 100644 --- a/Content.Server/Temperature/Systems/TemperatureSystem.cs +++ b/Content.Server/Temperature/Systems/TemperatureSystem.cs @@ -11,7 +11,6 @@ using Content.Shared.Database; using Content.Shared.Inventory; using Content.Shared.Rejuvenate; using Content.Shared.Temperature; -using Robust.Server.GameObjects; using Robust.Shared.Physics.Components; namespace Content.Server.Temperature.Systems; @@ -22,7 +21,6 @@ public sealed class TemperatureSystem : EntitySystem [Dependency] private readonly AtmosphereSystem _atmosphere = default!; [Dependency] private readonly DamageableSystem _damageable = default!; [Dependency] private readonly IAdminLogManager _adminLogger = default!; - [Dependency] private readonly TransformSystem _transform = default!; /// /// All the components that will have their damage updated at the end of the tick. diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs index b8f8f12211..e64657743d 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs @@ -1,6 +1,5 @@ using System.Linq; using System.Numerics; -using Content.Server.Administration.Logs; using Content.Server.Cargo.Systems; using Content.Server.Interaction; using Content.Server.Power.EntitySystems; @@ -29,7 +28,6 @@ namespace Content.Server.Weapons.Ranged.Systems; public sealed partial class GunSystem : SharedGunSystem { - [Dependency] private readonly IAdminLogManager _adminLogger = default!; [Dependency] private readonly IComponentFactory _factory = default!; [Dependency] private readonly BatterySystem _battery = default!; [Dependency] private readonly DamageExamineSystem _damageExamine = default!; diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactGasTriggerSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactGasTriggerSystem.cs index 96f1dc3783..00f409f553 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactGasTriggerSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactGasTriggerSystem.cs @@ -1,7 +1,6 @@ using Content.Server.Atmos.EntitySystems; using Content.Server.Xenoarchaeology.XenoArtifacts.Events; using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components; -using Robust.Server.GameObjects; namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems; @@ -9,7 +8,6 @@ public sealed class ArtifactGasTriggerSystem : EntitySystem { [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!; [Dependency] private readonly ArtifactSystem _artifactSystem = default!; - [Dependency] private readonly TransformSystem _transformSystem = default!; public override void Initialize() { diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactHeatTriggerSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactHeatTriggerSystem.cs index 33d1a43c12..5525cdf359 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactHeatTriggerSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactHeatTriggerSystem.cs @@ -3,7 +3,6 @@ using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components; using Content.Shared.Interaction; using Content.Shared.Temperature; using Content.Shared.Weapons.Melee.Events; -using Robust.Server.GameObjects; namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems; @@ -11,7 +10,6 @@ public sealed class ArtifactHeatTriggerSystem : EntitySystem { [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!; [Dependency] private readonly ArtifactSystem _artifactSystem = default!; - [Dependency] private readonly TransformSystem _transformSystem = default!; public override void Initialize() { diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactPressureTriggerSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactPressureTriggerSystem.cs index 4388756cce..8777ab0a8c 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactPressureTriggerSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactPressureTriggerSystem.cs @@ -1,6 +1,5 @@ using Content.Server.Atmos.EntitySystems; using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components; -using Robust.Server.GameObjects; namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems; @@ -11,7 +10,6 @@ public sealed class ArtifactPressureTriggerSystem : EntitySystem { [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!; [Dependency] private readonly ArtifactSystem _artifactSystem = default!; - [Dependency] private readonly TransformSystem _transformSystem = default!; public override void Update(float frameTime) { diff --git a/Content.Server/Zombies/ZombieSystem.cs b/Content.Server/Zombies/ZombieSystem.cs index bef57eceb3..080bef44e7 100644 --- a/Content.Server/Zombies/ZombieSystem.cs +++ b/Content.Server/Zombies/ZombieSystem.cs @@ -2,9 +2,7 @@ using System.Linq; using Content.Server.Body.Systems; using Content.Server.Chat; using Content.Server.Chat.Systems; -using Content.Server.Cloning; using Content.Server.Emoting.Systems; -using Content.Server.Inventory; using Content.Server.Speech.EntitySystems; using Content.Shared.Bed.Sleep; using Content.Shared.Cloning; @@ -31,7 +29,6 @@ namespace Content.Server.Zombies [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly BloodstreamSystem _bloodstream = default!; [Dependency] private readonly DamageableSystem _damageable = default!; - [Dependency] private readonly ServerInventorySystem _inv = default!; [Dependency] private readonly ChatSystem _chat = default!; [Dependency] private readonly AutoEmoteSystem _autoEmote = default!; [Dependency] private readonly EmoteOnDamageSystem _emoteOnDamage = default!; diff --git a/Content.Shared/Climbing/Systems/ClimbSystem.cs b/Content.Shared/Climbing/Systems/ClimbSystem.cs index ec4ec17acd..5471f07250 100644 --- a/Content.Shared/Climbing/Systems/ClimbSystem.cs +++ b/Content.Shared/Climbing/Systems/ClimbSystem.cs @@ -34,7 +34,6 @@ public sealed partial class ClimbSystem : VirtualController [Dependency] private readonly DamageableSystem _damageableSystem = default!; [Dependency] private readonly FixtureSystem _fixtureSystem = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly SharedBodySystem _bodySystem = default!; [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; [Dependency] private readonly SharedPopupSystem _popupSystem = default!; diff --git a/Content.Shared/Construction/SharedFlatpackSystem.cs b/Content.Shared/Construction/SharedFlatpackSystem.cs index a62488d6f3..8b21bca52a 100644 --- a/Content.Shared/Construction/SharedFlatpackSystem.cs +++ b/Content.Shared/Construction/SharedFlatpackSystem.cs @@ -114,8 +114,7 @@ public abstract class SharedFlatpackSystem : EntitySystem if (!Resolve(ent, ref ent.Comp)) return; - EntProtoId machinePrototypeId; - string? entityPrototype; + var machinePrototypeId = new EntProtoId(); if (TryComp(board, out var machineBoard) && machineBoard.Prototype is not null) machinePrototypeId = machineBoard.Prototype; else if (TryComp(board, out var computerBoard) && computerBoard.Prototype is not null) diff --git a/Content.Shared/Coordinates/EntityCoordinatesExtensions.cs b/Content.Shared/Coordinates/EntityCoordinatesExtensions.cs index b9083eabe1..47d359d387 100644 --- a/Content.Shared/Coordinates/EntityCoordinatesExtensions.cs +++ b/Content.Shared/Coordinates/EntityCoordinatesExtensions.cs @@ -1,6 +1,5 @@ using System.Numerics; using Robust.Shared.Map; -using Robust.Shared.Map.Components; namespace Content.Shared.Coordinates { @@ -20,17 +19,5 @@ namespace Content.Shared.Coordinates { return new EntityCoordinates(id, x, y); } - - [Obsolete] - public static EntityCoordinates ToCoordinates(this MapGridComponent grid, float x, float y) - { - return ToCoordinates(grid.Owner, x, y); - } - - [Obsolete] - public static EntityCoordinates ToCoordinates(this MapGridComponent grid) - { - return ToCoordinates(grid.Owner, Vector2.Zero); - } } } diff --git a/Content.Shared/Disposal/SharedDisposalUnitSystem.cs b/Content.Shared/Disposal/SharedDisposalUnitSystem.cs index 600036a891..9afd683cbd 100644 --- a/Content.Shared/Disposal/SharedDisposalUnitSystem.cs +++ b/Content.Shared/Disposal/SharedDisposalUnitSystem.cs @@ -127,9 +127,6 @@ public abstract class SharedDisposalUnitSystem : EntitySystem return damageState != null && (!component.MobsCanEnter || _mobState.IsDead(entity, damageState)); } - /// - /// TODO: Proper prediction - /// public abstract void DoInsertDisposalUnit(EntityUid uid, EntityUid toInsert, EntityUid user, SharedDisposalUnitComponent? disposal = null); [Serializable, NetSerializable] diff --git a/Content.Shared/Fluids/Components/PreventSpillerComponent.cs b/Content.Shared/Fluids/Components/PreventSpillerComponent.cs new file mode 100644 index 0000000000..e396d9faf5 --- /dev/null +++ b/Content.Shared/Fluids/Components/PreventSpillerComponent.cs @@ -0,0 +1,12 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Fluids.Components; + +/// +/// Blocks this entity's ability to spill solution containing entities via the verb menu. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class PreventSpillerComponent : Component +{ + +} diff --git a/Content.Shared/Fluids/Components/SpillableComponent.cs b/Content.Shared/Fluids/Components/SpillableComponent.cs index a1b5fa17eb..428d91f2de 100644 --- a/Content.Shared/Fluids/Components/SpillableComponent.cs +++ b/Content.Shared/Fluids/Components/SpillableComponent.cs @@ -2,6 +2,12 @@ using Content.Shared.FixedPoint; namespace Content.Shared.Fluids.Components; +/// +/// Makes a solution contained in this entity spillable. +/// Spills can occur when a container with this component overflows, +/// is used to melee attack something, is equipped (see ), +/// lands after being thrown, or has the Spill verb used. +/// [RegisterComponent] public sealed partial class SpillableComponent : Component { diff --git a/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs b/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs index 77730e5afc..1e9e742a38 100644 --- a/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs +++ b/Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs @@ -1,14 +1,23 @@ +using Content.Shared.Database; +using Content.Shared.DoAfter; using Content.Shared.Examine; +using Content.Shared.FixedPoint; using Content.Shared.Fluids.Components; +using Content.Shared.Nutrition.EntitySystems; +using Content.Shared.Spillable; +using Content.Shared.Verbs; using Content.Shared.Weapons.Melee; namespace Content.Shared.Fluids; public abstract partial class SharedPuddleSystem { + [Dependency] protected readonly SharedOpenableSystem Openable = default!; + protected virtual void InitializeSpillable() { SubscribeLocalEvent(OnExamined); + SubscribeLocalEvent>(AddSpillVerb); } private void OnExamined(Entity entity, ref ExaminedEvent args) @@ -21,4 +30,55 @@ public abstract partial class SharedPuddleSystem args.PushMarkup(Loc.GetString("spill-examine-spillable-weapon")); } } + + private void AddSpillVerb(Entity entity, ref GetVerbsEvent args) + { + if (!args.CanAccess || !args.CanInteract) + return; + + if (!_solutionContainerSystem.TryGetSolution(args.Target, entity.Comp.SolutionName, out var soln, out var solution)) + return; + + if (Openable.IsClosed(args.Target)) + return; + + if (solution.Volume == FixedPoint2.Zero) + return; + + if (HasComp(args.User)) + return; + + + Verb verb = new() + { + Text = Loc.GetString("spill-target-verb-get-data-text") + }; + + // TODO VERB ICONS spill icon? pouring out a glass/beaker? + if (entity.Comp.SpillDelay == null) + { + var target = args.Target; + verb.Act = () => + { + var puddleSolution = _solutionContainerSystem.SplitSolution(soln.Value, solution.Volume); + TrySpillAt(Transform(target).Coordinates, puddleSolution, out _); + }; + } + else + { + var user = args.User; + verb.Act = () => + { + _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, user, entity.Comp.SpillDelay ?? 0, new SpillDoAfterEvent(), entity.Owner, target: entity.Owner) + { + BreakOnDamage = true, + BreakOnMove = true, + NeedHand = true, + }); + }; + } + verb.Impact = LogImpact.Medium; // dangerous reagent reaction are logged separately. + verb.DoContactInteraction = true; + args.Verbs.Add(verb); + } } diff --git a/Content.Shared/Fluids/SharedPuddleSystem.cs b/Content.Shared/Fluids/SharedPuddleSystem.cs index e4bd61baa8..f573c042c5 100644 --- a/Content.Shared/Fluids/SharedPuddleSystem.cs +++ b/Content.Shared/Fluids/SharedPuddleSystem.cs @@ -1,12 +1,14 @@ using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; +using Content.Shared.DoAfter; using Content.Shared.DragDrop; using Content.Shared.Examine; using Content.Shared.FixedPoint; using Content.Shared.Fluids.Components; using Content.Shared.Movement.Events; using Content.Shared.StepTrigger.Components; +using Robust.Shared.Map; using Robust.Shared.Prototypes; namespace Content.Shared.Fluids; @@ -15,6 +17,7 @@ public abstract partial class SharedPuddleSystem : EntitySystem { [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!; + [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; /// /// The lowest threshold to be considered for puddle sprite states as well as slipperiness of a puddle. @@ -106,4 +109,54 @@ public abstract partial class SharedPuddleSystem : EntitySystem args.PushMarkup(Loc.GetString("puddle-component-examine-evaporating-no")); } } + + #region Spill + // These methods are in Shared to make it easier to interact with PuddleSystem in Shared code. + // Note that they always fail when run on the client, not creating a puddle and returning false. + // Adding proper prediction to this system would require spawning temporary puddle entities on the + // client and replacing or merging them with the ones spawned by the server when the client goes to + // replicate those, and I am not enough of a wizard to attempt implementing that. + + /// + /// First splashes reagent on reactive entities near the spilling entity, then spills the rest regularly to a + /// puddle. This is intended for 'destructive' spills, like when entities are destroyed or thrown. + /// + /// + /// On the client, this will always set to and return false. + /// + public abstract bool TrySplashSpillAt(EntityUid uid, + EntityCoordinates coordinates, + Solution solution, + out EntityUid puddleUid, + bool sound = true, + EntityUid? user = null); + + /// + /// Spills solution at the specified coordinates. + /// Will add to an existing puddle if present or create a new one if not. + /// + /// + /// On the client, this will always set to and return false. + /// + public abstract bool TrySpillAt(EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true); + + /// + /// + /// + /// + /// On the client, this will always set to and return false. + /// + public abstract bool TrySpillAt(EntityUid uid, Solution solution, out EntityUid puddleUid, bool sound = true, + TransformComponent? transformComponent = null); + + /// + /// + /// + /// + /// On the client, this will always set to and return false. + /// + public abstract bool TrySpillAt(TileRef tileRef, Solution solution, out EntityUid puddleUid, bool sound = true, + bool tileReact = true); + + #endregion Spill } diff --git a/Content.Shared/Kitchen/SharedReagentGrinder.cs b/Content.Shared/Kitchen/SharedReagentGrinder.cs index f5d679c293..579db239c8 100644 --- a/Content.Shared/Kitchen/SharedReagentGrinder.cs +++ b/Content.Shared/Kitchen/SharedReagentGrinder.cs @@ -10,6 +10,12 @@ namespace Content.Shared.Kitchen public static string InputContainerId = "inputContainer"; } + [Serializable, NetSerializable] + public sealed class ReagentGrinderToggleAutoModeMessage : BoundUserInterfaceMessage + { + public ReagentGrinderToggleAutoModeMessage() { } + } + [Serializable, NetSerializable] public sealed class ReagentGrinderStartMessage : BoundUserInterfaceMessage { @@ -75,6 +81,13 @@ namespace Content.Shared.Kitchen Key } + public enum GrinderAutoMode : byte + { + Off, + Grind, + Juice + } + [NetSerializable, Serializable] public sealed class ReagentGrinderInterfaceState : BoundUserInterfaceState { @@ -85,13 +98,16 @@ namespace Content.Shared.Kitchen public bool CanGrind; public NetEntity[] ChamberContents; public ReagentQuantity[]? ReagentQuantities; - public ReagentGrinderInterfaceState(bool isBusy, bool hasBeaker, bool powered, bool canJuice, bool canGrind, NetEntity[] chamberContents, ReagentQuantity[]? heldBeakerContents) + public GrinderAutoMode AutoMode; + + public ReagentGrinderInterfaceState(bool isBusy, bool hasBeaker, bool powered, bool canJuice, bool canGrind, GrinderAutoMode autoMode, NetEntity[] chamberContents, ReagentQuantity[]? heldBeakerContents) { IsBusy = isBusy; HasBeakerIn = hasBeaker; Powered = powered; CanJuice = canJuice; CanGrind = canGrind; + AutoMode = autoMode; ChamberContents = chamberContents; ReagentQuantities = heldBeakerContents; } diff --git a/Content.Shared/Light/Components/SharedExpendableLightComponent.cs b/Content.Shared/Light/Components/SharedExpendableLightComponent.cs index c802700b62..e40174ab78 100644 --- a/Content.Shared/Light/Components/SharedExpendableLightComponent.cs +++ b/Content.Shared/Light/Components/SharedExpendableLightComponent.cs @@ -7,7 +7,7 @@ namespace Content.Shared.Light.Components; [NetworkedComponent] public abstract partial class SharedExpendableLightComponent : Component { - public static readonly AudioParams LoopedSoundParams = new(0, 1, "Master", 62.5f, 1, 1, true, 0.3f); + public static readonly AudioParams LoopedSoundParams = new(0, 1, 62.5f, 1, 1, true, 0.3f); [ViewVariables(VVAccess.ReadOnly)] public ExpendableLightState CurrentState { get; set; } diff --git a/Content.Shared/Maps/TurfSystem.cs b/Content.Shared/Maps/TurfSystem.cs index c0757c5573..ad8b3ddea8 100644 --- a/Content.Shared/Maps/TurfSystem.cs +++ b/Content.Shared/Maps/TurfSystem.cs @@ -13,7 +13,6 @@ public sealed class TurfSystem : EntitySystem { [Dependency] private readonly EntityLookupSystem _entityLookup = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; - [Dependency] private readonly IMapManager _mapMan = default!; /// /// Returns true if a given tile is blocked by physics-enabled entities. diff --git a/Content.Shared/Polymorph/PolymorphActions.cs b/Content.Shared/Polymorph/PolymorphActions.cs index 0f230868f0..13e00f55e2 100644 --- a/Content.Shared/Polymorph/PolymorphActions.cs +++ b/Content.Shared/Polymorph/PolymorphActions.cs @@ -1,18 +1,20 @@ using Content.Shared.Actions; +using Robust.Shared.Prototypes; namespace Content.Shared.Polymorph; public sealed partial class PolymorphActionEvent : InstantActionEvent { /// - /// The polymorph prototype containing all the information about - /// the specific polymorph. + /// The polymorph proto id, containing all the information about + /// the specific polymorph. /// - public PolymorphPrototype Prototype = default!; + [DataField] + public ProtoId? ProtoId; - public PolymorphActionEvent(PolymorphPrototype prototype) : this() + public PolymorphActionEvent(ProtoId protoId) : this() { - Prototype = prototype; + ProtoId = protoId; } } diff --git a/Content.Shared/RCD/Systems/RCDSystem.cs b/Content.Shared/RCD/Systems/RCDSystem.cs index 50a7c0fef9..6282a117bb 100644 --- a/Content.Shared/RCD/Systems/RCDSystem.cs +++ b/Content.Shared/RCD/Systems/RCDSystem.cs @@ -25,7 +25,6 @@ namespace Content.Shared.RCD.Systems; public sealed class RCDSystem : EntitySystem { [Dependency] private readonly IGameTiming _timing = default!; - [Dependency] private readonly IMapManager _mapMan = default!; [Dependency] private readonly INetManager _net = default!; [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; [Dependency] private readonly ITileDefinitionManager _tileDefMan = default!; @@ -39,7 +38,7 @@ public sealed class RCDSystem : EntitySystem [Dependency] private readonly TurfSystem _turf = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; - private readonly int RcdModeCount = Enum.GetValues(typeof(RcdMode)).Length; + private readonly int _rcdModeCount = Enum.GetValues(typeof(RcdMode)).Length; public override void Initialize() { @@ -310,7 +309,7 @@ public sealed class RCDSystem : EntitySystem _audio.PlayPredicted(comp.SwapModeSound, uid, user); var mode = (int) comp.Mode; - mode = ++mode % RcdModeCount; + mode = ++mode % _rcdModeCount; comp.Mode = (RcdMode) mode; Dirty(uid, comp); diff --git a/Content.Shared/Remotes/EntitySystems/SharedDoorRemoteSystem.cs b/Content.Shared/Remotes/EntitySystems/SharedDoorRemoteSystem.cs index 72d807e6a0..e9bbd27ada 100644 --- a/Content.Shared/Remotes/EntitySystems/SharedDoorRemoteSystem.cs +++ b/Content.Shared/Remotes/EntitySystems/SharedDoorRemoteSystem.cs @@ -1,4 +1,3 @@ -using Content.Shared.Interaction; using Content.Shared.Popups; using Content.Shared.Interaction.Events; using Content.Shared.Remotes.Components; @@ -8,8 +7,6 @@ namespace Content.Shared.Remotes.EntitySystems; public abstract class SharedDoorRemoteSystem : EntitySystem { [Dependency] protected readonly SharedPopupSystem Popup = default!; - [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; - // I'm so sorry [Dependency] private readonly SharedAirlockSystem _sharedAirlockSystem = default!; public override void Initialize() { diff --git a/Content.Shared/Shuttles/Components/IFFComponent.cs b/Content.Shared/Shuttles/Components/IFFComponent.cs index a7e6ac1152..6bacbd2b5b 100644 --- a/Content.Shared/Shuttles/Components/IFFComponent.cs +++ b/Content.Shared/Shuttles/Components/IFFComponent.cs @@ -10,11 +10,6 @@ namespace Content.Shared.Shuttles.Components; [Access(typeof(SharedShuttleSystem))] public sealed partial class IFFComponent : Component { - /// - /// Should we show IFF by default? - /// - public const bool ShowIFFDefault = true; - public static readonly Color SelfColor = Color.MediumSpringGreen; /// diff --git a/Content.Shared/Shuttles/Systems/SharedShuttleSystem.IFF.cs b/Content.Shared/Shuttles/Systems/SharedShuttleSystem.IFF.cs index ed687d48f4..8231e48e2d 100644 --- a/Content.Shared/Shuttles/Systems/SharedShuttleSystem.IFF.cs +++ b/Content.Shared/Shuttles/Systems/SharedShuttleSystem.IFF.cs @@ -28,11 +28,6 @@ public abstract partial class SharedShuttleSystem public string? GetIFFLabel(EntityUid gridUid, bool self = false, IFFComponent? component = null) { - if (!IFFComponent.ShowIFFDefault) - { - return null; - } - var entName = MetaData(gridUid).EntityName; if (self) diff --git a/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs b/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs index 324fd65c86..ca25a49b23 100644 --- a/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs +++ b/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs @@ -146,7 +146,6 @@ public abstract partial class SharedShuttleSystem : EntitySystem // Just checks if any grids inside of a buffer range at the target position. _grids.Clear(); - var ftlRange = FTLRange; var mapCoordinates = coordinates.ToMap(EntityManager, XformSystem); var ourPos = Maps.GetGridPosition((shuttleUid, shuttlePhysics, shuttleXform)); diff --git a/Content.Shared/Storage/EntitySystems/DumpableSystem.cs b/Content.Shared/Storage/EntitySystems/DumpableSystem.cs index 2b804cf732..8a8b636a67 100644 --- a/Content.Shared/Storage/EntitySystems/DumpableSystem.cs +++ b/Content.Shared/Storage/EntitySystems/DumpableSystem.cs @@ -19,17 +19,16 @@ public sealed class DumpableSystem : EntitySystem [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly SharedContainerSystem _container = default!; [Dependency] private readonly SharedDisposalUnitSystem _disposalUnitSystem = default!; [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; [Dependency] private readonly SharedTransformSystem _transformSystem = default!; - private EntityQuery _xformQuery; + private EntityQuery _itemQuery; public override void Initialize() { base.Initialize(); - _xformQuery = GetEntityQuery(); + _itemQuery = GetEntityQuery(); SubscribeLocalEvent(OnAfterInteract, after: new[]{ typeof(SharedEntityStorageSystem) }); SubscribeLocalEvent>(AddDumpVerb); SubscribeLocalEvent>(AddUtilityVerbs); @@ -111,7 +110,7 @@ public sealed class DumpableSystem : EntitySystem } } - private void StartDoAfter(EntityUid storageUid, EntityUid? targetUid, EntityUid userUid, DumpableComponent dumpable) + private void StartDoAfter(EntityUid storageUid, EntityUid targetUid, EntityUid userUid, DumpableComponent dumpable) { if (!TryComp(storageUid, out var storage)) return; @@ -120,7 +119,7 @@ public sealed class DumpableSystem : EntitySystem foreach (var entity in storage.Container.ContainedEntities) { - if (!TryComp(entity, out var itemComp) || + if (!_itemQuery.TryGetComponent(entity, out var itemComp) || !_prototypeManager.TryIndex(itemComp.Size, out var itemSize)) { continue; @@ -138,33 +137,16 @@ public sealed class DumpableSystem : EntitySystem }); } - private void OnDoAfter(EntityUid uid, DumpableComponent component, DoAfterEvent args) + private void OnDoAfter(EntityUid uid, DumpableComponent component, DumpableDoAfterEvent args) { - if (args.Handled || args.Cancelled || !TryComp(uid, out var storage)) + if (args.Handled || args.Cancelled || !TryComp(uid, out var storage) || storage.Container.ContainedEntities.Count == 0) return; - Queue dumpQueue = new(); - foreach (var entity in storage.Container.ContainedEntities) - { - dumpQueue.Enqueue(entity); - } - - if (dumpQueue.Count == 0) - return; - - foreach (var entity in dumpQueue) - { - var transform = Transform(entity); - _container.AttachParentToContainerOrGrid((entity, transform)); - _transformSystem.SetLocalPositionRotation(entity, transform.LocalPosition + _random.NextVector2Box() / 2, _random.NextAngle(), transform); - } - - if (args.Args.Target == null) - return; + var dumpQueue = new Queue(storage.Container.ContainedEntities); var dumped = false; - if (_disposalUnitSystem.HasDisposals(args.Args.Target.Value)) + if (_disposalUnitSystem.HasDisposals(args.Args.Target)) { dumped = true; @@ -173,22 +155,31 @@ public sealed class DumpableSystem : EntitySystem _disposalUnitSystem.DoInsertDisposalUnit(args.Args.Target.Value, entity, args.Args.User); } } - else if (HasComp(args.Args.Target.Value)) + else if (HasComp(args.Args.Target)) { dumped = true; - var targetPos = _xformQuery.GetComponent(args.Args.Target.Value).LocalPosition; + var targetPos = _transformSystem.GetWorldPosition(args.Args.Target.Value); foreach (var entity in dumpQueue) { - _transformSystem.SetLocalPosition(entity, targetPos + _random.NextVector2Box() / 4); + _transformSystem.SetWorldPosition(entity, targetPos + _random.NextVector2Box() / 4); + } + } + else + { + var targetPos = _transformSystem.GetWorldPosition(uid); + + foreach (var entity in dumpQueue) + { + var transform = Transform(entity); + _transformSystem.SetWorldPositionRotation(entity, targetPos + _random.NextVector2Box() / 4, _random.NextAngle(), transform); } } if (dumped) { - // TODO: Predicted when above predicted - _audio.PlayPvs(component.DumpSound, uid); + _audio.PlayPredicted(component.DumpSound, uid, args.User); } } } diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs index d47d024de5..274828a208 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs @@ -102,7 +102,7 @@ public abstract partial class SharedGunSystem // TODO: Actions need doing for guns anyway. private sealed partial class CycleModeEvent : InstantActionEvent { - public SelectiveFire Mode; + public SelectiveFire Mode = default; } private void OnCycleMode(EntityUid uid, GunComponent component, CycleModeEvent args) diff --git a/Resources/Changelog/Admin.yml b/Resources/Changelog/Admin.yml index 48cbebdb29..b4b7f699fe 100644 --- a/Resources/Changelog/Admin.yml +++ b/Resources/Changelog/Admin.yml @@ -129,5 +129,12 @@ Entries: id: 17 time: '2024-03-24T15:39:54.0000000+00:00' url: https://github.com/space-wizards/space-station-14/pull/26263 +- author: lzk228 + changes: + - message: Selected preset for secret is now sent to admin chat. + type: Tweak + id: 18 + time: '2024-03-29T05:03:34.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/26500 Name: Admin Order: 1 diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index db48f993d5..5e5c44dd72 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,45 +1,4 @@ Entries: -- author: mirrorcult - changes: - - message: Destruction & impact sounds have been reworked in general, you should - expect better sounds/more variance/actually playing sounds when applicable - type: Add - - message: Melee hit sounds being cut off when an entity is destroyed has been fixed - type: Fix - id: 5746 - time: '2024-01-19T15:33:08.0000000+00:00' - url: https://api.github.com/repos/space-wizards/space-station-14/pulls/24282 -- author: SpeltIncorrectyl - changes: - - message: Emagging the artifact crusher now stops it from being opened while it - is crushing. - type: Add - id: 5747 - time: '2024-01-19T15:35:02.0000000+00:00' - url: https://api.github.com/repos/space-wizards/space-station-14/pulls/23957 -- author: EmoGarbage404 - changes: - - message: You can now sort lathe recipes by category. - type: Add - - message: Recipes in lathes are now sorted alphabetically. - type: Add - id: 5748 - time: '2024-01-20T00:45:04.0000000+00:00' - url: https://api.github.com/repos/space-wizards/space-station-14/pulls/24247 -- author: Scribbles0 - changes: - - message: Added a new trait, the Unrevivable trait. - type: Add - id: 5749 - time: '2024-01-20T02:22:15.0000000+00:00' - url: https://api.github.com/repos/space-wizards/space-station-14/pulls/24226 -- author: Drayff - changes: - - message: Animations for ToolBoxes! - type: Add - id: 5750 - time: '2024-01-20T02:29:13.0000000+00:00' - url: https://api.github.com/repos/space-wizards/space-station-14/pulls/24305 - author: Agoichi changes: - message: Rebalanced Lobbying Bundle @@ -3798,3 +3757,39 @@ id: 6245 time: '2024-03-28T06:36:43.0000000+00:00' url: https://github.com/space-wizards/space-station-14/pull/25768 +- author: EmoGarbage404 + changes: + - message: Electrocution damage is no longer based on the power supplied and is + instead based on the wire voltage (LV, MV, or HV). + type: Tweak + id: 6246 + time: '2024-03-28T20:44:44.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/26455 +- author: Jake Huxell + changes: + - message: Late join menu correctly respects client role restrictions. + type: Fix + id: 6247 + time: '2024-03-29T02:30:23.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/26498 +- author: Jake Huxell + changes: + - message: Reduced game build warning count. + type: Fix + id: 6248 + time: '2024-03-29T05:28:16.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/26518 +- author: wafehling + changes: + - message: Added a chemistry recipe to make crystal shards. + type: Add + id: 6249 + time: '2024-03-29T06:13:52.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/26269 +- author: Crotalus + changes: + - message: Reagent grinder auto-modes + type: Add + id: 6250 + time: '2024-03-29T06:30:51.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/26290 diff --git a/Resources/Locale/en-US/game-ticking/game-rules/rule-secret.ftl b/Resources/Locale/en-US/game-ticking/game-rules/rule-secret.ftl new file mode 100644 index 0000000000..c38220cca1 --- /dev/null +++ b/Resources/Locale/en-US/game-ticking/game-rules/rule-secret.ftl @@ -0,0 +1,2 @@ +# Sent to admin chat +rule-secret-selected-preset = Selected {$preset} for secret. diff --git a/Resources/Locale/en-US/kitchen/components/reagent-grinder-component.ftl b/Resources/Locale/en-US/kitchen/components/reagent-grinder-component.ftl index 30af6e9872..8a3ca9eef8 100644 --- a/Resources/Locale/en-US/kitchen/components/reagent-grinder-component.ftl +++ b/Resources/Locale/en-US/kitchen/components/reagent-grinder-component.ftl @@ -7,6 +7,9 @@ reagent-grinder-component-cannot-put-entity-message = You can't put this in the grinder-menu-title = All-In-One Grinder 3000 grinder-menu-grind-button = Grind grinder-menu-juice-button = Juice +grinder-menu-auto-label = Auto mode +grinder-menu-auto-button-off = Off +grinder-menu-manual-label = Manual mode grinder-menu-chamber-content-box-label = Chamber grinder-menu-chamber-content-box-button = Eject Contents grinder-menu-beaker-content-box-label = Beaker diff --git a/Resources/Prototypes/Entities/Clothing/Head/hats.yml b/Resources/Prototypes/Entities/Clothing/Head/hats.yml index dc57302619..fba77d885f 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hats.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hats.yml @@ -476,17 +476,30 @@ - WhitelistChameleon - type: entity - parent: ClothingHeadBase + parent: [ClothingHeadBase, BaseFoldable] id: ClothingHeadHatUshanka name: ushanka description: "Perfect for winter in Siberia, da?" components: - - type: Sprite - sprite: Clothing/Head/Hats/ushanka.rsi - type: Clothing sprite: Clothing/Head/Hats/ushanka.rsi + - type: Appearance - type: AddAccentClothing accent: RussianAccent + - type: Foldable + canFoldInsideContainer: true + - type: FoldableClothing + foldedEquippedPrefix: up + foldedHeldPrefix: up + - type: Sprite + sprite: Clothing/Head/Hats/ushanka.rsi + layers: + - state: icon + map: [ "unfoldedLayer" ] + - state: icon-up + map: ["foldedLayer"] + visible: false + - type: entity parent: ClothingHeadBase diff --git a/Resources/Prototypes/Entities/Objects/Materials/crystal_shard.yml b/Resources/Prototypes/Entities/Objects/Materials/crystal_shard.yml index 884a5531e7..8f522abce4 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/crystal_shard.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/crystal_shard.yml @@ -134,3 +134,18 @@ tags: - Trash - CrystalRed + +- type: entity + parent: ShardCrystalBase + id: ShardCrystalRandom + name: random crystal shard + components: + - type: RandomSpawner + prototypes: + - ShardCrystalGreen + - ShardCrystalPink + - ShardCrystalOrange + - ShardCrystalBlue + - ShardCrystalCyan + - ShardCrystalRed + chance: 1 diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml index 2ddb21b9e6..db08481dc5 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml @@ -11,6 +11,8 @@ damage: types: Blunt: 10 + soundHit: + collection: MetalThud - type: Spillable solution: absorbed - type: Wieldable @@ -49,6 +51,8 @@ damage: types: Blunt: 10 + soundHit: + collection: MetalThud - type: Spillable solution: absorbed - type: Wieldable diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/weapon_toolbox.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/weapon_toolbox.yml index 366aabd2f2..240a17a0a4 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/weapon_toolbox.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/weapon_toolbox.yml @@ -17,3 +17,5 @@ damage: types: Blunt: 20 + soundHit: + path: "/Audio/Weapons/smash.ogg" diff --git a/Resources/Prototypes/GameRules/roundstart.yml b/Resources/Prototypes/GameRules/roundstart.yml index a836faf500..21ad1310de 100644 --- a/Resources/Prototypes/GameRules/roundstart.yml +++ b/Resources/Prototypes/GameRules/roundstart.yml @@ -69,7 +69,7 @@ noSpawn: true components: - type: GameRule - minPlayers: 20 + minPlayers: 35 - type: NukeopsRule faction: Syndicate diff --git a/Resources/Prototypes/Recipes/Reactions/fun.yml b/Resources/Prototypes/Recipes/Reactions/fun.yml index fd1f42f101..5ae173c0ee 100644 --- a/Resources/Prototypes/Recipes/Reactions/fun.yml +++ b/Resources/Prototypes/Recipes/Reactions/fun.yml @@ -171,6 +171,21 @@ products: Laughter: 2 +- type: reaction + id: CreateCrystals + quantized: true + minTemp: 374 + reactants: + Sugar: + amount: 15 + Water: + amount: 15 + Ethanol: + amount: 5 + effects: + - !type:CreateEntityReactionEffect + entity: ShardCrystalRandom + - type: reaction id: Gunpowder impact: Low @@ -185,4 +200,4 @@ amount: 2 effects: - !type:CreateEntityReactionEffect - entity: MaterialGunpowder \ No newline at end of file + entity: MaterialGunpowder diff --git a/RobustToolbox b/RobustToolbox index 8607ba1f16..4002cbddb9 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 8607ba1f16ce676a849b59a41efd389a6e467f5c +Subproject commit 4002cbddb9c9de9030a81480b45b13d978b87526