Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d75250d
Xenowears
ShadesMars Jul 6, 2024
e80c764
Oops
ShadesMars Jul 6, 2024
cc5414f
Update mantles.yml
ShadesMars Jul 6, 2024
a8524d7
Tailwag
ShadesMars Jul 9, 2024
8ab671c
Merge branch 'master' into Xenowear
ShadesMars Jul 9, 2024
28e345b
oops
ShadesMars Jul 9, 2024
a603b30
Merge branch 'master' into Xenowear
ShadesMars Jul 9, 2024
1371b09
Merge branch 'master' into Xenowear
ShadesMars Jul 9, 2024
fc018e5
Merge branch 'master' into Xenowear
ShadesMars Jul 9, 2024
cd0bf23
Merge branch 'master' into Xenowear
ShadesMars Jul 10, 2024
6784da1
Merge branch 'master' into Xenowear
ShadesMars Jul 13, 2024
8c03e4b
Merge branch 'Simple-Station:master' into Xenowear
ShadesMars Jul 15, 2024
719bb42
Update neck.yml
ShadesMars Jul 19, 2024
55403e7
Merge branch 'master' into Xenowear
ShadesMars Jul 19, 2024
fde7559
Merge branch 'master' into Xenowear
ShadesMars Jul 20, 2024
706ba96
Requested Changes
ShadesMars Jul 20, 2024
bbe1ae7
Update EmitsSoundOnMoveSystem.cs
ShadesMars Jul 20, 2024
019d300
Merge branch 'master' into Xenowear
ShadesMars Jul 21, 2024
37a3022
Merge branch 'Simple-Station:master' into Xenowear
ShadesMars Jul 24, 2024
bc27467
Merge branch 'master' into Xenowear
ShadesMars Jul 30, 2024
042bb45
Merge branch 'master' into Xenowear
ShadesMars Aug 1, 2024
7e2b6dd
Removed TailWagging
ShadesMars Aug 1, 2024
bd8e17f
Update WaggingSystem.cs
ShadesMars Aug 1, 2024
00136a8
Update WaggingSystem.cs
ShadesMars Aug 1, 2024
61c52b6
Update vulpkanin.yml
ShadesMars Aug 1, 2024
fe2e4c1
Apply suggestions from code review
ShadesMars Aug 1, 2024
991a5f4
Update meta.json
ShadesMars Aug 1, 2024
50aba46
Update meta.json
ShadesMars Aug 1, 2024
657ef43
format
ShadesMars Aug 1, 2024
de92a82
Merge branch 'Xenowear' of https://github.com/FoxxoTrystan/Einstein-E…
ShadesMars Aug 1, 2024
5e1ceb2
Update vulpkanin.ftl
ShadesMars Aug 1, 2024
2909755
Apply suggestions from code review
ShadesMars Aug 1, 2024
8e25fb2
Update neck.yml
ShadesMars Aug 1, 2024
674d92e
Update misc.yml
ShadesMars Aug 1, 2024
6789498
Update clothwarps.yml
ShadesMars Aug 1, 2024
c83e991
ye
ShadesMars Aug 1, 2024
830a142
Merge branch 'Xenowear' of https://github.com/FoxxoTrystan/Einstein-E…
ShadesMars Aug 1, 2024
cb629b8
Update clothwarps.yml
ShadesMars Aug 1, 2024
c9d15d9
Merge branch 'master' into Xenowear
ShadesMars Aug 1, 2024
a6dffca
Merge branch 'master' into Xenowear
VMSolidus Aug 1, 2024
5113905
Merge remote-tracking branch 'upstream/master' into Xenowear
ShadesMars Aug 6, 2024
a2d944f
fixes?
ShadesMars Aug 6, 2024
adb58d8
pain
ShadesMars Aug 6, 2024
5df91d5
stap!
ShadesMars Aug 6, 2024
dd5aabe
Merge branch 'master' into Xenowear
VMSolidus Aug 6, 2024
f9431e1
Merge branch 'master' into Xenowear
ShadesMars Aug 11, 2024
18617ff
Update vulpkanin.yml
ShadesMars Aug 12, 2024
41067af
Update interaction-popup-component.ftl
ShadesMars Aug 12, 2024
4b95e1f
Merge branch 'master' into Xenowear
ShadesMars Aug 12, 2024
0cce9cd
Update meta.json
ShadesMars Aug 13, 2024
dea0aaf
Update meta.json
ShadesMars Aug 13, 2024
7e62550
Update meta.json
ShadesMars Aug 13, 2024
34c5e0f
Update meta.json
ShadesMars Aug 13, 2024
5e35d63
Merge branch 'master' into Xenowear
ShadesMars Aug 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Content.Server/Wagging/WaggingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public bool TryToggleWagging(EntityUid uid, WaggingComponent? wagging = null, Hu

wagging.Wagging = !wagging.Wagging;

_actions.SetToggled(wagging.ActionEntity, wagging.Wagging);
Comment thread
ShadesMars marked this conversation as resolved.

for (var idx = 0; idx < markings.Count; idx++) // Animate all possible tails
{
var currentMarkingId = markings[idx].MarkingId;
Expand Down
35 changes: 35 additions & 0 deletions Content.Shared/Clothing/Components/EmitsSoundOnMoveComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Map;

namespace Content.Shared.Clothing.Components;

/// <summary>
/// Indicates that the clothing entity emits sound when it moves.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class EmitsSoundOnMoveComponent : Component
Comment thread
ShadesMars marked this conversation as resolved.
{
[ViewVariables(VVAccess.ReadWrite)]
[DataField(required: true), AutoNetworkedField]
public SoundSpecifier SoundCollection = default!;

[ViewVariables(VVAccess.ReadWrite)]
[DataField("requiresGravity"), AutoNetworkedField]
public bool RequiresGravity = true;

[ViewVariables(VVAccess.ReadOnly)]
public EntityCoordinates LastPosition = EntityCoordinates.Invalid;

/// <summary>
/// The distance moved since the played sound.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public float SoundDistance = 0f;

/// <summary>
/// Whether this item is equipped in a inventory item slot.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public bool IsSlotValid = true;
}
99 changes: 99 additions & 0 deletions Content.Shared/Clothing/EntitySystems/EmitsSoundOnMoveSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
using System.Numerics;
using Content.Shared.Clothing.Components;
using Content.Shared.Gravity;
using Content.Shared.Inventory;
using Content.Shared.Inventory.Events;
using Content.Shared.Mobs.Components;
using Content.Shared.Movement.Components;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Physics.Components;
using Robust.Shared.Timing;

namespace Content.Shared.Clothing.Systems;

public sealed class EmitsSoundOnMoveSystem : EntitySystem
Comment thread
ShadesMars marked this conversation as resolved.
{
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedMapSystem _grid = default!;
[Dependency] private readonly SharedGravitySystem _gravity = default!;
[Dependency] private readonly IGameTiming _timing = default!;

private EntityQuery<InputMoverComponent> _moverQuery;
private EntityQuery<PhysicsComponent> _physicsQuery;
private EntityQuery<TransformComponent> _xformQuery;
private EntityQuery<ClothingComponent> _clothingQuery;

public override void Initialize()
{
_moverQuery = GetEntityQuery<InputMoverComponent>();
_physicsQuery = GetEntityQuery<PhysicsComponent>();
_xformQuery = GetEntityQuery<TransformComponent>();
_clothingQuery = GetEntityQuery<ClothingComponent>();

SubscribeLocalEvent<EmitsSoundOnMoveComponent, GotEquippedEvent>(OnEquipped);
SubscribeLocalEvent<EmitsSoundOnMoveComponent, GotUnequippedEvent>(OnUnequipped);
}

private void OnEquipped(EntityUid uid, EmitsSoundOnMoveComponent component, GotEquippedEvent args)
{
component.IsSlotValid = !args.SlotFlags.HasFlag(SlotFlags.POCKET);
}

private void OnUnequipped(EntityUid uid, EmitsSoundOnMoveComponent component, GotUnequippedEvent args)
{
component.IsSlotValid = true;
}

public override void Update(float frameTime)
{
var query = EntityQueryEnumerator<EmitsSoundOnMoveComponent>();
while (query.MoveNext(out var uid, out var comp))
{
UpdateSound(uid, comp);
}
query.Dispose();
}

private void UpdateSound(EntityUid uid, EmitsSoundOnMoveComponent component)
{
if (!_xformQuery.TryGetComponent(uid, out var xform) ||
!_physicsQuery.TryGetComponent(uid, out var physics))
return;

Comment thread
ShadesMars marked this conversation as resolved.
// Space does not transmit sound
if (xform.GridUid == null)
return;
Comment thread
ShadesMars marked this conversation as resolved.
Outdated

if (component.RequiresGravity && _gravity.IsWeightless(uid, physics, xform))
return;

var parent = xform.ParentUid;
Comment thread
ShadesMars marked this conversation as resolved.
Outdated

var isWorn = parent is { Valid: true } &&
_clothingQuery.TryGetComponent(uid, out var clothing)
&& clothing.InSlot != null
&& component.IsSlotValid;
// If this entity is worn by another entity, use that entity's coordinates
var coordinates = isWorn ? Transform(parent).Coordinates : xform.Coordinates;
var distanceNeeded = (isWorn && _moverQuery.TryGetComponent(parent, out var mover) && mover.Sprinting)
? 1.5f // The parent is a mob that is currently sprinting
: 2f; // The parent is not a mob or is not sprinting

if (!coordinates.TryDistance(EntityManager, component.LastPosition, out var distance) || distance > distanceNeeded)
component.SoundDistance = distanceNeeded;
else
component.SoundDistance += distance;

component.LastPosition = coordinates;
if (component.SoundDistance < distanceNeeded)
return;
component.SoundDistance -= distanceNeeded;

var sound = component.SoundCollection;
var audioParams = sound.Params
.WithVolume(sound.Params.Volume)
.WithVariation(sound.Params.Variation ?? 0f);

_audio.PlayPredicted(sound, uid, uid, audioParams);
}
}
32 changes: 5 additions & 27 deletions Resources/Locale/en-US/deltav/markings/vulpkanin.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,6 @@ marking-VulpTailTip-vulp = Vulpkanin tail (base)
marking-VulpTailTip-vulp-tip = Vulpkanin tail (tip)
marking-VulpTailTip = Vulpkanin (tip)

marking-VulpTailWag-vulp_wag = Vulpkanin tail (base)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes a lot of existing markings, but does not provide a db migration. This can lead to unexpected errors at runtime.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't

marking-VulpTailWag-vulp_wag-fade = Vulpkanin tail (fade)
marking-VulpTailWag = Vulpkanin (wag)

marking-VulpTailWagTip-vulp_wag = Vulpkanin tail (base)
marking-VulpTailWagTip-vulp_wag-tip = Vulpkanin tail (tip)
marking-VulpTailWagTip = Vulpkanin (wag, tip)

marking-VulpTailAlt-vulp_alt = Vulpkanin tail (base)
marking-VulpTailAlt-vulp_alt-fade = Vulpkanin tail (fade)
marking-VulpTailAlt = Vulpkanin (alt)
Expand All @@ -130,29 +122,12 @@ marking-VulpTailFoxTip-fox = Fox tail (base)
marking-VulpTailFoxTip-fox-tip = Fox tail (fade)
marking-VulpTailFoxTip = Vulpkanin Fox (tip)

marking-VulpTailFoxWag-fox_wag = Fox tail (base)
marking-VulpTailFoxWag-fox_wag-fade = Fox tail (fade)
marking-VulpTailFoxWag = Vulpkanin Fox (wag)

marking-VulpTailFoxWagTip-fox_wag = Fox tail (base)
marking-VulpTailFoxWagTip-fox_wag-tip = Fox tail (tip)
marking-VulpTailFoxWagTip = Vulpkanin Fox (wag, tip)

marking-VulpTailBushy-bushfluff = Bush tail
marking-VulpTailBushy = Vulpkanin Bush

marking-VulpTailBushyWag-bushfluff_wag = Bush tail
marking-VulpTailBushyWag = Vulpkanin Bush (wag)

marking-VulpTailCoyote-coyote = Coyote tail
marking-VulpTailCoyote = Vulpkanin Coyote

marking-VulpTailCoyoteWag-coyote_wag = Coyote tail
marking-VulpTailCoyoteWag = Vulpkanin Coyote (wag)

marking-VulpTailCorgiWag-corgi_wag = Crogi tail
marking-VulpTailCorgiWag = Vulpkanin Corgi (wag)

marking-VulpTailHusky-husky-inner = Husky tail (inner)
marking-VulpTailHusky-husky-outer = Husky tail (outer)
marking-VulpTailHusky = Vulpkanin Husky
Expand All @@ -176,8 +151,11 @@ marking-VulpTailOtie = Vulpkanin Otie
marking-VulpTailFluffy-fluffy = Fluffy tail
marking-VulpTailFluffy = Vulpkanin Fluffy

marking-VulpTailDalmatianWag-dalmatian_wag = Dalmatian tail
marking-VulpTailDalmatianWag = Vulpkanin Dalmatian (wag)
marking-VulpTailCorgi-corgi = Crogi tail
marking-VulpTailCorgi = Vulpkanin Corgi

marking-VulpTailDalmatian-dalmatian = Dalmatian tail
marking-VulpTailDalmatian = Vulpkanin Dalmatian


marking-VulpBellyCrest-belly_crest = Belly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

petting-success-generic = You pet {THE($target)} on {POSS-ADJ($target)} head.
petting-success-soft-floofy = You pet {THE($target)} on {POSS-ADJ($target)} soft floofy head.
petting-success-generic-others = { CAPITALIZE(THE($user)) } pets {THE($target)}.
Comment thread
ShadesMars marked this conversation as resolved.
Outdated

petting-success-bingus = You pet {THE($target)} on {POSS-ADJ($target)} wrinkly little head.
petting-success-bird = You pet {THE($target)} on {POSS-ADJ($target)} cute feathery head.
Expand Down
4 changes: 2 additions & 2 deletions Resources/Prototypes/Actions/types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@
noSpawn: true
components:
- type: InstantAction
icon: { sprite: Mobs/Customization/reptilian_parts.rsi, state: tail_smooth_behind }
iconOn: { sprite: Mobs/Customization/reptilian_parts.rsi, state: tail_smooth_behind }
icon: { sprite: Interface/Actions/wagging.rsi, state: icon }
iconOn: { sprite: Interface/Actions/wagging.rsi, state: icon-on }
itemIconStyle: NoItem
useDelay: 1 # emote spam
event: !type:ToggleActionEvent
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
ClothingShoesColorOrange: 2
ClothingShoesColorRed: 2
ClothingShoesColorPurple: 2
ClothingsClothwarp: 4
Comment thread
ShadesMars marked this conversation as resolved.
Outdated
ClothingHeadHatGreysoft: 8
ClothingHeadHatMimesoft: 3
ClothingHeadHatBluesoft: 2
Expand Down Expand Up @@ -111,6 +112,8 @@
ClothingHandsGlovesColorOrange: 2
ClothingHandsGlovesColorPurple: 2
ClothingEyesGlassesCheapSunglasses: 3
ClothingNeckOldMantle: 2
ClothingNeckUnathiMantle: 2
contrabandInventory:
ClothingMaskNeckGaiter: 2
ClothingUniformJumpsuitTacticool: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
ClothingShoesBootsCowboyBlack: 1
ClothingShoesBootsCowboyWhite: 1
ClothingMaskNeckGaiterRed: 2
ClothingNeckBellCollar: 2
ClothingOuterUnathiRobe: 1
emaggedInventory:
ClothingShoesBling: 1
ClothingShoesBootsCowboyFancy: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,32 +280,32 @@
state: vulp-fade

- type: marking
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above, tail changes go into a separate PR

id: VulpTailTip
id: VulpTailAnimated
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Vulpkanin]
speciesRestriction: []
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: vulp
state: vulp_wag
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: vulp-tip
state: vulp_wag-tip #fade

- type: marking
id: VulpTailWag
id: VulpTailTip
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Vulpkanin]
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: vulp_wag
state: vulp
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: vulp_wag-tip #fade
state: vulp-tip

- type: marking
id: VulpTailWagTip
id: VulpTailTipAnimated
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Vulpkanin]
speciesRestriction: []
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: vulp_wag
Expand Down Expand Up @@ -357,32 +357,32 @@
state: fox-fade

- type: marking
id: VulpTailFoxTip
id: VulpTailFoxAnimated
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Vulpkanin]
speciesRestriction: []
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: fox
state: fox_wag
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: fox-tip
state: fox_wag-fade

- type: marking
id: VulpTailFoxWag
id: VulpTailFoxTip
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Vulpkanin]
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: fox_wag
state: fox
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: fox_wag-fade
state: fox-tip

- type: marking
id: VulpTailFoxWagTip
id: VulpTailFoxTipAnimated
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Vulpkanin]
speciesRestriction: []
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: fox_wag
Expand All @@ -399,10 +399,10 @@
state: bushfluff

- type: marking
id: VulpTailBushyWag
id: VulpTailBushyAnimated
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Vulpkanin]
speciesRestriction: []
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: bushfluff_wag
Expand All @@ -417,19 +417,28 @@
state: coyote

- type: marking
id: VulpTailCoyoteWag
id: VulpTailCoyoteAnimated
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Vulpkanin]
speciesRestriction: []
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: coyote_wag

- type: marking
id: VulpTailCorgiWag
id: VulpTailCorgi
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Vulpkanin]
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: corgi

- type: marking
id: VulpTailCorgiAnimated
bodyPart: Tail
markingCategory: Tail
speciesRestriction: []
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: corgi_wag
Expand Down Expand Up @@ -502,10 +511,19 @@
state: fluffy

- type: marking
id: VulpTailDalmatianWag
id: VulpTailDalmatian
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Vulpkanin]
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: dalmatian

- type: marking
id: VulpTailDalmatianAnimated
bodyPart: Tail
markingCategory: Tail
speciesRestriction: []
sprites:
- sprite: DeltaV/Mobs/Customization/Vulpkanin/tail_markings.rsi
state: dalmatian_wag
Expand Down
Loading