Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Contact Slowdown when Weightless or in the Air #33299

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Vexerot
Copy link

@Vexerot Vexerot commented Nov 13, 2024

About the PR

Removes the application of contact slowdowns from puddles (i.e. glue, slime, etc.) when entities are weightless or in the air.

Why / Balance

Currently, contact slowdowns from puddles (i.e. glue, slime, etc.) apply even when entities are weightless or in the air, impacting both players under zero gravity and flying mobs such as Space Dragons and Space Carp. It does not make sense for ground-based slowdowns to affect weightless or flying entities.

I recognize that there exists minor balance implications as this PR slightly buffs the movement of all flying mobs, as well as reduces the utility of space glue in zero gravity situations, but I believe that such buffs are sufficiently minor to warrant a change that more intuitively aligns contact slowdowns with in-game physics.

Technical details

  • Added a SharedGravitySystem dependency to SpeedModifierContactsSystem.cs to facilitate a weightless check.
  • Added a conditional return in the MovementSpeedCheck method; based on whether the entity is weightless or in the air.

Media

Weightless.mp4
FlyingMobs.mp4

Requirements

Breaking changes

Changelog

🆑 Vexerot

  • tweak: Entities that are weightless or in the air are no longer slowed by puddles.

@github-actions github-actions bot added the S: Needs Review Status: Requires additional reviews before being fully accepted label Nov 13, 2024
@K-Dynamic
Copy link
Contributor

Even if this buffs flyers it doesn't make sense to be slowed by glue or affected by ice (the latter probably needs to be checked out here or another PR)

@SlamBamActionman SlamBamActionman added the S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. label Nov 14, 2024
@Vexerot
Copy link
Author

Vexerot commented Nov 14, 2024

I've done some testing with ice and it seems to be a non-issue; it does not affect entities that are weightless or in the air.

@@ -81,6 +83,11 @@ private void MovementSpeedCheck(EntityUid uid, SpeedModifiedByContactComponent c
if (!EntityManager.TryGetComponent<PhysicsComponent>(uid, out var physicsComponent))
return;

// entities that are weightless, i.e. no gravity, should not be affected by contact slowdowns
// entities that are in the air, i.e. flying mobs, should not be affected by contact slowdowns
if (_gravity.IsWeightless(uid) || physicsComponent.BodyStatus == BodyStatus.InAir)
Copy link
Member

Choose a reason for hiding this comment

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

Ok we can have full-tile meat kudzu, rhat should slowdown in weightless state too

Copy link
Author

Choose a reason for hiding this comment

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

I've gone ahead and fixed this interaction. In order to facilitate future code extensibility, I've added a new component that can be applied to entities that should still apply their contact slowdowns to airborne mobs. Let me know if you think this is fine or should be done in another way.

@TheShuEd TheShuEd added P: Low Priority: Doesn't need to be prioritized above other items. D: Low Difficulty: Some codebase knowledge required. C: Balance Change Categorisation: Balance changes through direct value changes, or changes to mechanics that affect it A: General Interactions Area: General in-game interactions that don't relate to another area. size/XS Denotes a PR that changes 0-9 lines. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Nov 14, 2024
@github-actions github-actions bot added size/S Denotes a PR that changes 10-29 lines. and removed size/XS Denotes a PR that changes 0-9 lines. labels Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: General Interactions Area: General in-game interactions that don't relate to another area. C: Balance Change Categorisation: Balance changes through direct value changes, or changes to mechanics that affect it D: Low Difficulty: Some codebase knowledge required. P: Low Priority: Doesn't need to be prioritized above other items. S: Needs Review Status: Requires additional reviews before being fully accepted size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants