From 599c3f6b05227dae0bfc2da8f6e49c844ed0c4e2 Mon Sep 17 00:00:00 2001 From: Vigers Ray Date: Sun, 9 Jun 2024 17:18:58 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC?= =?UTF-8?q?=D1=8B=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=D0=B0=20?= =?UTF-8?q?=D0=B3=D1=83=D0=BC=D0=B0=D0=BD=D0=BE=D0=B8=D0=B4=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resist/EscapeInventorySystem.cs | 11 + .../_Sunrise/Carrying/CarryingSystem.cs | 206 ++++++----------- .../PseudoItem/AllowsSleepInsideComponent.cs | 9 - .../Item/PseudoItem/PseudoItemSystem.cs | 213 ------------------ .../Carrying/CarryingSlowdownComponent.cs | 1 + .../Carrying/CarryingSlowdownSystem.cs | 3 +- .../_Sunrise/Cloning/ITransferredByCloning.cs | 9 - .../Item/Components/PseudoItemComponent.cs | 19 -- .../Item/PseudoItemInsertDoAfterEvent.cs | 10 - .../Prototypes/Entities/Mobs/Species/base.yml | 3 +- .../_Sunrise/Entities/Mobs/Species/synth.yml | 5 +- 11 files changed, 81 insertions(+), 408 deletions(-) delete mode 100644 Content.Server/_Sunrise/Item/PseudoItem/AllowsSleepInsideComponent.cs delete mode 100644 Content.Server/_Sunrise/Item/PseudoItem/PseudoItemSystem.cs delete mode 100644 Content.Shared/_Sunrise/Cloning/ITransferredByCloning.cs delete mode 100644 Content.Shared/_Sunrise/Item/Components/PseudoItemComponent.cs delete mode 100644 Content.Shared/_Sunrise/Item/PseudoItemInsertDoAfterEvent.cs diff --git a/Content.Server/Resist/EscapeInventorySystem.cs b/Content.Server/Resist/EscapeInventorySystem.cs index 679af0d4e7..56dd5dde93 100644 --- a/Content.Server/Resist/EscapeInventorySystem.cs +++ b/Content.Server/Resist/EscapeInventorySystem.cs @@ -1,3 +1,5 @@ +using Content.Server._Sunrise.Carrying; +using Content.Server.Carrying; using Content.Server.Popups; using Content.Shared.Storage.Components; using Content.Shared.ActionBlocker; @@ -19,6 +21,7 @@ public sealed class EscapeInventorySystem : EntitySystem [Dependency] private readonly SharedContainerSystem _containerSystem = default!; [Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!; [Dependency] private readonly SharedHandsSystem _handsSystem = default!; + [Dependency] private readonly CarryingSystem _carryingSystem = default!; public override void Initialize() { @@ -82,6 +85,14 @@ public sealed class EscapeInventorySystem : EntitySystem if (args.Handled || args.Cancelled) return; + // Sunrise-Start + if (TryComp(uid, out var carried)) + { + _carryingSystem.DropCarried(carried.Carrier, uid); + return; + } + // Sunrise-End + _containerSystem.AttachParentToContainerOrGrid((uid, Transform(uid))); args.Handled = true; } diff --git a/Content.Server/_Sunrise/Carrying/CarryingSystem.cs b/Content.Server/_Sunrise/Carrying/CarryingSystem.cs index 89a3338514..27afba0235 100644 --- a/Content.Server/_Sunrise/Carrying/CarryingSystem.cs +++ b/Content.Server/_Sunrise/Carrying/CarryingSystem.cs @@ -1,54 +1,48 @@ -using System.Numerics; using System.Threading; +using Content.Server.Carrying; using Content.Server.DoAfter; -using Content.Server.Inventory; -using Content.Server.Resist; using Content.Server.Popups; -using Content.Server.Item.PseudoItem; -using Content.Shared.Climbing; -using Content.Shared.Mobs; -using Content.Shared.DoAfter; -using Content.Shared.Buckle.Components; -using Content.Shared.Hands.Components; -using Content.Shared.Hands; -using Content.Shared.Stunnable; -using Content.Shared.Interaction.Events; -using Content.Shared.Verbs; -using Content.Shared.Climbing.Events; -using Content.Shared.Carrying; -using Content.Shared.Movement.Events; -using Content.Shared.Movement.Systems; -using Content.Shared.Pulling; -using Content.Shared.Standing; +using Content.Server.Resist; +using Content.Shared._Sunrise.Carrying; using Content.Shared.ActionBlocker; +using Content.Shared.Buckle.Components; +using Content.Shared.Carrying; +using Content.Shared.Climbing.Events; +using Content.Shared.DoAfter; +using Content.Shared.Hands; +using Content.Shared.Hands.Components; +using Content.Shared.Interaction; +using Content.Shared.Interaction.Events; using Content.Shared.Inventory.VirtualItem; -using Content.Shared.Item; -using Content.Shared.Item.PseudoItem; -using Content.Shared.Mind.Components; -using Content.Shared.Throwing; +using Content.Shared.Mobs; using Content.Shared.Mobs.Systems; +using Content.Shared.Movement.Events; using Content.Shared.Movement.Pulling.Components; using Content.Shared.Movement.Pulling.Events; using Content.Shared.Movement.Pulling.Systems; -using Content.Shared.Popups; -using Content.Shared.Storage; +using Content.Shared.Movement.Systems; +using Content.Shared.Standing; +using Content.Shared.Stunnable; +using Content.Shared.Throwing; +using Content.Shared.Verbs; using Robust.Shared.Map.Components; +using Robust.Shared.Physics.Components; -namespace Content.Server.Carrying +namespace Content.Server._Sunrise.Carrying { public sealed class CarryingSystem : EntitySystem { + [Dependency] private readonly SharedVirtualItemSystem _virtualItemSystem = default!; [Dependency] private readonly CarryingSlowdownSystem _slowdown = default!; [Dependency] private readonly DoAfterSystem _doAfterSystem = default!; [Dependency] private readonly StandingStateSystem _standingState = default!; [Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!; - [Dependency] private readonly PullingSystem _pulling = default!; + [Dependency] private readonly PullingSystem _pullingSystem = default!; [Dependency] private readonly MobStateSystem _mobStateSystem = default!; [Dependency] private readonly EscapeInventorySystem _escapeInventorySystem = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; - [Dependency] private readonly PseudoItemSystem _pseudoItem = default!; - [Dependency] private readonly VirtualItemSystem _virtualItemSystem = default!; + [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; public override void Initialize() { @@ -67,9 +61,18 @@ namespace Content.Server.Carrying SubscribeLocalEvent(OnStartClimb); SubscribeLocalEvent(OnBuckleChange); SubscribeLocalEvent(OnDoAfter); - SubscribeLocalEvent>(AddInsertCarriedVerb); } + private float MassContest(EntityUid roller, EntityUid target, PhysicsComponent? rollerPhysics = null, PhysicsComponent? targetPhysics = null) + { + if (!Resolve(roller, ref rollerPhysics, false) || !Resolve(target, ref targetPhysics, false)) + return 1f; + + if (targetPhysics.FixturesMass == 0) + return 1f; + + return rollerPhysics.FixturesMass / targetPhysics.FixturesMass; + } private void AddCarryVerb(EntityUid uid, CarriableComponent component, GetVerbsEvent args) { @@ -79,12 +82,15 @@ namespace Content.Server.Carrying if (!CanCarry(args.User, uid, component)) return; - if (HasComp(args.User)) + if (HasComp(args.User)) // yeah not dealing with that return; if (HasComp(args.User) || HasComp(args.Target)) return; + if (!_interactionSystem.InRangeUnobstructed(args.User, uid, 0.75f)) + return; + if (!_mobStateSystem.IsAlive(args.User)) return; @@ -118,8 +124,8 @@ namespace Content.Server.Carrying args.ItemUid = virtItem.BlockingEntity; - // var multiplier = _contests.MassContest(uid, virtItem.BlockingEntity); - // args.ThrowStrength = 5f * multiplier; + var multiplier = MassContest(uid, virtItem.BlockingEntity); + args.ThrowStrength = 5f * multiplier; } private void OnParentChanged(EntityUid uid, CarryingComponent component, ref EntParentChangedMessage args) @@ -141,9 +147,6 @@ namespace Content.Server.Carrying DropCarried(uid, component.Carried); } - /// - /// позволяет человеку, которого несут, взаимодействовать только с тем, кто его несет, и с вещами, находящимися у него - /// private void OnInteractionAttempt(EntityUid uid, BeingCarriedComponent component, InteractionAttemptEvent args) { if (args.Target == null) @@ -168,7 +171,7 @@ namespace Content.Server.Carrying if (_actionBlockerSystem.CanInteract(uid, component.Carrier)) { - _escapeInventorySystem.AttemptEscape(uid, component.Carrier, escape); + _escapeInventorySystem.AttemptEscape(uid, component.Carrier, escape, MassContest(uid, component.Carrier)); } } @@ -215,11 +218,16 @@ namespace Content.Server.Carrying Carry(args.Args.User, uid); args.Handled = true; } - private void StartCarryDoAfter(EntityUid carrier, EntityUid carried, CarriableComponent component) { - var length = GetPickupDuration(carrier, carried); - if (length >= TimeSpan.FromSeconds(9)) + TimeSpan length = TimeSpan.FromSeconds(1); + + var mod = MassContest(carrier, carried); + + if (mod != 0) + length /= mod; + + if (length >= TimeSpan.FromSeconds(5)) { _popupSystem.PopupEntity(Loc.GetString("carry-too-heavy"), carried, carrier, Shared.Popups.PopupType.SmallCaution); return; @@ -231,11 +239,12 @@ namespace Content.Server.Carrying component.CancelToken = new CancellationTokenSource(); var ev = new CarryDoAfterEvent(); - var args = new DoAfterArgs(EntityManager, carrier, length, ev, carried, target: carried) + var args = new DoAfterArgs(EntityManager ,carrier, length, ev, carried, target: carried) { BreakOnMove = true, NeedHand = true }; + _doAfterSystem.TryStartDoAfter(args); _popupSystem.PopupEntity(Loc.GetString("carry-started", ("carrier", carrier)), carried, carried); @@ -244,29 +253,19 @@ namespace Content.Server.Carrying private void Carry(EntityUid carrier, EntityUid carried) { if (TryComp(carried, out var pullable)) - { - if (pullable.Puller != null) - { - _pulling.TryStopPull(carried, pullable); - } - } - - - if (TryComp(carried, out var carryComp)) - DropCarried(carried, carryComp.Carried); + _pullingSystem.TryStopPull(carried, pullable, carrier); Transform(carrier).AttachToGridOrMap(); Transform(carried).AttachToGridOrMap(); Transform(carried).Coordinates = Transform(carrier).Coordinates; Transform(carried).AttachParent(Transform(carrier)); + _virtualItemSystem.TrySpawnVirtualItemInHand(carried, carrier); + _virtualItemSystem.TrySpawnVirtualItemInHand(carried, carrier); var carryingComp = EnsureComp(carrier); ApplyCarrySlowdown(carrier, carried); var carriedComp = EnsureComp(carried); EnsureComp(carried); - _virtualItemSystem.TrySpawnVirtualItemInHand(carried, carrier); - _virtualItemSystem.TrySpawnVirtualItemInHand(carried, carrier); - carryingComp.Carried = carried; carriedComp.Carrier = carrier; @@ -275,27 +274,27 @@ namespace Content.Server.Carrying public void DropCarried(EntityUid carrier, EntityUid carried) { - RemComp(carrier); + RemComp(carrier); // get rid of this first so we don't recusrively fire that event RemComp(carrier); RemComp(carried); RemComp(carried); _actionBlockerSystem.UpdateCanMove(carried); + _virtualItemSystem.DeleteInHandsMatching(carrier, carried); Transform(carried).AttachToGridOrMap(); _standingState.Stand(carried); _movementSpeed.RefreshMovementSpeedModifiers(carrier); - _virtualItemSystem.DeleteInHandsMatching(carrier, carried); } private void ApplyCarrySlowdown(EntityUid carrier, EntityUid carried) { - // Carrying slowdown made static as a part of removing mass contests - // var massRatio = _contests.MassContest(carrier, carried); - // if (massRatio == 0) - // massRatio = 1; - // var massRatioSq = Math.Pow(massRatio, 2); - // var modifier = (1 - (0.15 / massRatioSq)); - // modifier = Math.Max(0.1, modifier); - var modifier = 0.7f; // 30% slowdown while carrying + var massRatio = MassContest(carrier, carried); + + if (massRatio == 0) + massRatio = 1; + + var massRatioSq = Math.Pow(massRatio, 2); + var modifier = (1 - (0.15 / massRatioSq)); + modifier = Math.Max(0.1, modifier); var slowdownComp = EnsureComp(carrier); _slowdown.SetModifier(carrier, (float) modifier, (float) modifier, slowdownComp); } @@ -314,9 +313,6 @@ namespace Content.Server.Carrying if (HasComp(carrier) || HasComp(carried)) return false; - // if (_respirator.IsReceivingCPR(carried)) - // return false; - if (!TryComp(carrier, out var hands)) return false; @@ -325,81 +321,5 @@ namespace Content.Server.Carrying return true; } - - public override void Update(float frameTime) - { - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var carried, out var comp)) - { - var carrier = comp.Carrier; - if (carrier is not { Valid: true } || carried is not { Valid: true }) - continue; - - if (Transform(carried).ParentUid != carrier) - { - DropCarried(carrier, carried); - continue; - } - - var xform = Transform(carried); - if (!xform.LocalPosition.Equals(Vector2.Zero)) - { - xform.LocalPosition = Vector2.Zero; - } - } - query.Dispose(); - } - - public TimeSpan GetPickupDuration(EntityUid carrier, EntityUid carried) - { - TimeSpan length = TimeSpan.FromSeconds(2.5); - - // var mod = _contests.MassContest(carrier, carried); - // if (mod != 0) - // length /= mod; - - return length; - } - - public bool TryCarry(EntityUid carrier, EntityUid toCarry, CarriableComponent? carriedComp = null) - { - if (!Resolve(toCarry, ref carriedComp, false)) - return false; - - if (!CanCarry(carrier, toCarry, carriedComp)) - return false; - - if (HasComp(carrier) || HasComp(carrier)) - return false; - - if (GetPickupDuration(carrier, toCarry) > TimeSpan.FromSeconds(9)) - return false; - - Carry(carrier, toCarry); - - return true; - } - - private void AddInsertCarriedVerb(EntityUid uid, CarryingComponent component, GetVerbsEvent args) - { - var toInsert = args.Using; - if (toInsert is not { Valid: true } || !args.CanAccess || !TryComp(toInsert, out var pseudoItem)) - return; - - if (!HasComp(args.Target)) - return; - - InnateVerb verb = new() - { - Act = () => - { - DropCarried(uid, toInsert.Value); - _pseudoItem.TryInsert(args.Target, toInsert.Value, args.User, pseudoItem); - }, - Text = Loc.GetString("action-name-insert-other", ("target", toInsert)), - Priority = 2 - }; - args.Verbs.Add(verb); - } } } diff --git a/Content.Server/_Sunrise/Item/PseudoItem/AllowsSleepInsideComponent.cs b/Content.Server/_Sunrise/Item/PseudoItem/AllowsSleepInsideComponent.cs deleted file mode 100644 index 3f023d6cdc..0000000000 --- a/Content.Server/_Sunrise/Item/PseudoItem/AllowsSleepInsideComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Content.Server.Item.PseudoItem; - -/// -/// Signifies that pseudo-item creatures can sleep inside the container to which this component was added. -/// -[RegisterComponent] -public sealed partial class AllowsSleepInsideComponent : Component -{ -} diff --git a/Content.Server/_Sunrise/Item/PseudoItem/PseudoItemSystem.cs b/Content.Server/_Sunrise/Item/PseudoItem/PseudoItemSystem.cs deleted file mode 100644 index af7af93eab..0000000000 --- a/Content.Server/_Sunrise/Item/PseudoItem/PseudoItemSystem.cs +++ /dev/null @@ -1,213 +0,0 @@ -using Content.Server.Actions; -using Content.Server.Bed.Sleep; -using Content.Server.Carrying; -using Content.Server.DoAfter; -using Content.Server.Popups; -using Content.Server.Storage.EntitySystems; -using Content.Shared.Bed.Sleep; -using Content.Shared.DoAfter; -using Content.Shared.Hands; -using Content.Shared.IdentityManagement; -using Content.Shared.Item; -using Content.Shared.Item.PseudoItem; -using Content.Shared.Storage; -using Content.Shared.Tag; -using Content.Shared.Verbs; -using Robust.Shared.Containers; - -namespace Content.Server.Item.PseudoItem; - -public sealed class PseudoItemSystem : EntitySystem -{ - [Dependency] private readonly StorageSystem _storageSystem = default!; - [Dependency] private readonly ItemSystem _itemSystem = default!; - [Dependency] private readonly DoAfterSystem _doAfter = default!; - [Dependency] private readonly TagSystem _tagSystem = default!; - [Dependency] private readonly CarryingSystem _carrying = default!; // Frontier - [Dependency] private readonly ActionsSystem _actions = default!; // Frontier - [Dependency] private readonly PopupSystem _popup = default!; // Frontier - - [ValidatePrototypeId] - private const string PreventTag = "PreventLabel"; - - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent>(AddInsertVerb); - SubscribeLocalEvent>(AddInsertAltVerb); - SubscribeLocalEvent(OnEntRemoved); - SubscribeLocalEvent(OnGettingPickedUpAttempt); - SubscribeLocalEvent(OnDropAttempt); - SubscribeLocalEvent(OnDoAfter); - SubscribeLocalEvent(OnInsertAttempt); - SubscribeLocalEvent(OnTrySleeping); // Frontier - } - - private void AddInsertVerb(EntityUid uid, PseudoItemComponent component, GetVerbsEvent args) - { - if (!args.CanInteract || !args.CanAccess) - return; - - if (component.Active) - return; - - if (!TryComp(args.Target, out var targetStorage)) - return; - - if (Transform(args.Target).ParentUid == uid) - return; - - InnateVerb verb = new() - { - Act = () => - { - TryInsert(args.Target, uid, args.User, component, targetStorage); - }, - Text = Loc.GetString("action-name-insert-self"), - Priority = 2 - }; - args.Verbs.Add(verb); - } - - private void AddInsertAltVerb(EntityUid uid, PseudoItemComponent component, GetVerbsEvent args) - { - if (!args.CanInteract || !args.CanAccess) - return; - - if (args.User == args.Target) - return; - - if (component.Active) - return; - - if (args.Hands == null) - return; - - if (!TryComp(args.Hands.ActiveHandEntity, out var targetStorage)) - return; - - AlternativeVerb verb = new() - { - Act = () => - { - StartInsertDoAfter(args.User, uid, args.Hands.ActiveHandEntity.Value, component); - }, - Text = Loc.GetString("action-name-insert-other", ("target", Identity.Entity(args.Target, EntityManager))), - Priority = 2 - }; - args.Verbs.Add(verb); - } - - private void OnEntRemoved(EntityUid uid, PseudoItemComponent component, EntGotRemovedFromContainerMessage args) - { - if (!component.Active) - return; - - RemComp(uid); - component.Active = false; - - // Frontier - if (component.SleepAction is { Valid: true }) - _actions.RemoveAction(uid, component.SleepAction); - } - - private void OnGettingPickedUpAttempt(EntityUid uid, PseudoItemComponent component, - GettingPickedUpAttemptEvent args) - { - if (args.User == args.Item) - return; - - // Frontier: prevent people from pushing each other from a bag - if (HasComp(args.User)) - { - args.Cancel(); - return; - } - - // Frontier: try to carry the person when taking them out of a bag. - if (_carrying.TryCarry(args.User, uid)) - { - args.Cancel(); - return; - } - - Transform(uid).AttachToGridOrMap(); - args.Cancel(); - } - - private void OnDropAttempt(EntityUid uid, PseudoItemComponent component, DropAttemptEvent args) - { - if (component.Active) - args.Cancel(); - } - - private void OnDoAfter(EntityUid uid, PseudoItemComponent component, DoAfterEvent args) - { - if (args.Handled || args.Cancelled || args.Args.Used == null) - return; - - args.Handled = TryInsert(args.Args.Used.Value, uid, args.User, component); - } - - public bool TryInsert(EntityUid storageUid, EntityUid toInsert, EntityUid userUid, PseudoItemComponent component, - StorageComponent? storage = null) - { - if (!Resolve(storageUid, ref storage)) - return false; - - var item = EnsureComp(toInsert); - _tagSystem.TryAddTag(toInsert, PreventTag); - _itemSystem.SetSize(toInsert, component.Size, item); - _itemSystem.VisualsChanged(toInsert); - - if (!_storageSystem.CanInsert(storageUid, toInsert, out _) || - !_storageSystem.PlayerInsertEntityInWorld(storageUid, userUid, toInsert)) - { - component.Active = false; - RemComp(toInsert); - return false; - } - _storageSystem.UpdateUI(storageUid); - _storageSystem.UpdateAppearance(storageUid); - - // Frontier - if (HasComp(storageUid)) - _actions.AddAction(toInsert, ref component.SleepAction, SleepingSystem.SleepActionId, toInsert); - - component.Active = true; - return true; - } - - private void StartInsertDoAfter(EntityUid inserter, EntityUid toInsert, EntityUid storageEntity, - PseudoItemComponent? pseudoItem = null) - { - if (!Resolve(toInsert, ref pseudoItem)) - return; - - var ev = new PseudoItemInsertDoAfterEvent(); - var args = new DoAfterArgs(EntityManager, inserter, 5f, ev, toInsert, toInsert, storageEntity) - { - BreakOnMove = true, - NeedHand = true - }; - - _doAfter.TryStartDoAfter(args); - } - - private void OnInsertAttempt(EntityUid uid, PseudoItemComponent component, - ContainerGettingInsertedAttemptEvent args) - { - if (!component.Active) - return; - // This hopefully shouldn't trigger, but this is a failsafe just in case so we dont bluespace them cats - args.Cancel(); - } - - // Frontier - show a popup when a pseudo-item falls asleep inside a bag. - private void OnTrySleeping(EntityUid uid, PseudoItemComponent component, TryingToSleepEvent args) - { - var parent = Transform(uid).ParentUid; - if (!HasComp(uid) && parent is { Valid: true } && HasComp(parent)) - _popup.PopupEntity(Loc.GetString("popup-sleep-in-bag", ("entity", uid)), uid); - } -} diff --git a/Content.Shared/_Sunrise/Carrying/CarryingSlowdownComponent.cs b/Content.Shared/_Sunrise/Carrying/CarryingSlowdownComponent.cs index a4b0cc1781..45e80dbaaa 100644 --- a/Content.Shared/_Sunrise/Carrying/CarryingSlowdownComponent.cs +++ b/Content.Shared/_Sunrise/Carrying/CarryingSlowdownComponent.cs @@ -1,3 +1,4 @@ +using Content.Shared._Sunrise.Carrying; using Robust.Shared.GameStates; using Robust.Shared.Serialization; diff --git a/Content.Shared/_Sunrise/Carrying/CarryingSlowdownSystem.cs b/Content.Shared/_Sunrise/Carrying/CarryingSlowdownSystem.cs index 9b9c8cec10..a3351a7546 100644 --- a/Content.Shared/_Sunrise/Carrying/CarryingSlowdownSystem.cs +++ b/Content.Shared/_Sunrise/Carrying/CarryingSlowdownSystem.cs @@ -1,7 +1,8 @@ +using Content.Shared.Carrying; using Content.Shared.Movement.Systems; using Robust.Shared.GameStates; -namespace Content.Shared.Carrying +namespace Content.Shared._Sunrise.Carrying { public sealed class CarryingSlowdownSystem : EntitySystem { diff --git a/Content.Shared/_Sunrise/Cloning/ITransferredByCloning.cs b/Content.Shared/_Sunrise/Cloning/ITransferredByCloning.cs deleted file mode 100644 index a58c50ab34..0000000000 --- a/Content.Shared/_Sunrise/Cloning/ITransferredByCloning.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Content.Shared._Sunrise.Cloning; - -/// -/// Indicates that this Component should be transferred to the new entity when the entity is cloned (for example, using a cloner) -/// -public interface ITransferredByCloning -{ -} - diff --git a/Content.Shared/_Sunrise/Item/Components/PseudoItemComponent.cs b/Content.Shared/_Sunrise/Item/Components/PseudoItemComponent.cs deleted file mode 100644 index 41e2b660e9..0000000000 --- a/Content.Shared/_Sunrise/Item/Components/PseudoItemComponent.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Content.Shared._Sunrise.Cloning; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; - -namespace Content.Shared.Item.PseudoItem; -/// -/// For entities that behave like an item under certain conditions, -/// but not under most conditions. -/// -[RegisterComponent] -public sealed partial class PseudoItemComponent : Component, ITransferredByCloning -{ - [DataField("size", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string Size = "Huge"; - - public bool Active = false; - - [DataField] - public EntityUid? SleepAction; -} diff --git a/Content.Shared/_Sunrise/Item/PseudoItemInsertDoAfterEvent.cs b/Content.Shared/_Sunrise/Item/PseudoItemInsertDoAfterEvent.cs deleted file mode 100644 index 4b34118f37..0000000000 --- a/Content.Shared/_Sunrise/Item/PseudoItemInsertDoAfterEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Robust.Shared.Serialization; -using Content.Shared.DoAfter; - -namespace Content.Shared.Item.PseudoItem; - - -[Serializable, NetSerializable] -public sealed partial class PseudoItemInsertDoAfterEvent : SimpleDoAfterEvent -{ -} diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml index d3924701f8..2282b2cf8c 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml @@ -92,7 +92,6 @@ horizontalRotation: 90 - type: HumanoidAppearance species: Human - - type: Carriable - type: SlowOnDamage speedModifierThresholds: 60: 0.7 @@ -245,6 +244,8 @@ id: BaseMobSpeciesOrganic abstract: true components: + - type: Carriable # Sunrise-edit + - type: CanEscapeInventory # Sunrise-edit - type: Barotrauma damage: types: diff --git a/Resources/Prototypes/_Sunrise/Entities/Mobs/Species/synth.yml b/Resources/Prototypes/_Sunrise/Entities/Mobs/Species/synth.yml index 4255849ac9..d75c76b0b3 100644 --- a/Resources/Prototypes/_Sunrise/Entities/Mobs/Species/synth.yml +++ b/Resources/Prototypes/_Sunrise/Entities/Mobs/Species/synth.yml @@ -298,9 +298,8 @@ deathPenalty: 0.01 # However they really ought to be living and intact, otherwise they're worth 100x less. - type: TTS # Sunrise-TTS - type: ContentEye -# VIXME VIGERS -# - type: Carriable # Sunrise-edit -# - type: CanEscapeInventory # Sunrise-edit + - type: Carriable # Sunrise-edit + - type: CanEscapeInventory # Sunrise-edit - type: TypingIndicator proto: robot - type: Unrevivable