Skip to content

Commit

Permalink
Merge branch 'master' into Floofstation-V7
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxxoTrystan committed Dec 5, 2024
2 parents 8752232 + 3fcbf6b commit 902971f
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: Publish stable

concurrency:
group: publish

on:
workflow_dispatch:
push:
branches:
- stable # or the branch where merge requests are being merged into (e.g., 'master')


jobs:
build:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ concurrency:
group: publish

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'
push:
branches:
- master

jobs:
build:
Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Jittering/JitteringSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ private void OnShutdown(EntityUid uid, JitteringComponent jittering, ComponentSh

private void OnAnimationCompleted(EntityUid uid, JitteringComponent jittering, AnimationCompletedEvent args)
{
if(args.Key != _jitterAnimationKey)
// FLoofstation - avoid restarting the jittering animation on entites that already stopped jittering
if(args.Key != _jitterAnimationKey || jittering.LifeStage >= ComponentLifeStage.Stopping)
return;

if (TryComp(uid, out AnimationPlayerComponent? animationPlayer)
Expand Down
15 changes: 11 additions & 4 deletions Content.Server/Carrying/CarryingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,17 @@ private void OnMobStateChanged(EntityUid uid, CarryingComponent component, MobSt
/// </summary>
private void OnInteractionAttempt(EntityUid uid, BeingCarriedComponent component, InteractionAttemptEvent args)
{
if (args.Target == null)
// Floofstation - function body reviewed
Predicate<TransformComponent> isChildOfCarrier = null!; // C# doesn't have local functions eugh
isChildOfCarrier = (childXForm) => childXForm.ParentUid == component.Carrier
|| (childXForm.ParentUid is {Valid: true} parent && isChildOfCarrier(Transform(parent)));

if (args.Target == null // Allow self-interacts
|| isChildOfCarrier(Transform(args.Target.Value))) // Allow interacting with everything on the carriee
return;

// Also check if the interacted-with entity is on the carrier and cancel the event if not
var targetParent = Transform(args.Target.Value).ParentUid;

if (args.Target.Value != component.Carrier && targetParent != component.Carrier && targetParent != uid)
args.Cancel();
}
Expand Down Expand Up @@ -201,8 +207,9 @@ private void OnStandAttempt(EntityUid uid, BeingCarriedComponent component, Stan

private void OnInteractedWith(EntityUid uid, BeingCarriedComponent component, GettingInteractedWithAttemptEvent args)
{
if (args.Uid != component.Carrier)
args.Cancel();
// Floofstation - why.
// if (args.Uid != component.Carrier)
// args.Cancel();
}

private void OnPullAttempt(EntityUid uid, BeingCarriedComponent component, PullAttemptEvent args)
Expand Down
12 changes: 12 additions & 0 deletions Resources/Changelog/Floof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1695,3 +1695,15 @@ Entries:
id: 223
time: '2024-12-03T16:25:05.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/392
- author: Mnemotechnician
changes:
- type: Tweak
message: >-
You can now interact with carried entities, and carried entities
themselves can freely interact with items inside their
bags/clothing/etc.
- type: Fix
message: Jittering should no longer leave your character visually off-set.
id: 224
time: '2024-12-05T16:33:52.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/393

0 comments on commit 902971f

Please sign in to comment.