mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Changeling move when transforming (#43795)
* I love microbalance * Update Content.Shared/Changeling/Systems/ChangelingTransformSystem.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
parent
9e541fbcb3
commit
807ea69860
2 changed files with 6 additions and 4 deletions
|
|
@ -30,7 +30,7 @@ public sealed partial class ChangelingTransformComponent : Component
|
|||
/// Time it takes to Transform
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public TimeSpan TransformWindup = TimeSpan.FromSeconds(5);
|
||||
public TimeSpan TransformWindup = TimeSpan.FromSeconds(4f);
|
||||
|
||||
/// <summary>
|
||||
/// The noise used when attempting to transform
|
||||
|
|
|
|||
|
|
@ -156,8 +156,6 @@ public sealed partial class ChangelingTransformSystem : EntitySystem
|
|||
ent,
|
||||
target: targetIdentity)
|
||||
{
|
||||
BreakOnMove = true,
|
||||
BreakOnWeightlessMove = true,
|
||||
DuplicateCondition = DuplicateConditions.None,
|
||||
RequireCanInteract = false,
|
||||
DistanceThreshold = null,
|
||||
|
|
@ -168,10 +166,14 @@ public sealed partial class ChangelingTransformSystem : EntitySystem
|
|||
ref ChangelingTransformDoAfterEvent args)
|
||||
{
|
||||
args.Handled = true;
|
||||
ent.Comp.CurrentTransformSound = _audio.Stop(ent.Comp.CurrentTransformSound);
|
||||
|
||||
if (args.Cancelled)
|
||||
{
|
||||
// Only stop the sound if we finish transforming successfully.
|
||||
ent.Comp.CurrentTransformSound = _audio.Stop(ent.Comp.CurrentTransformSound);
|
||||
return;
|
||||
}
|
||||
ent.Comp.CurrentTransformSound = null;
|
||||
|
||||
if (!_prototype.Resolve(ent.Comp.TransformCloningSettings, out var settings))
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue