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

Fix the inability to drag clumsy entities into the biomass reclaimer #33844

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MilenVolf
Copy link
Contributor

@MilenVolf MilenVolf commented Dec 12, 2024

About the PR

Some conditions in ClumsySystem were modified, so now in climbing condition clumsiness will work only if a clumsy mob will climb by itself, but if somebody will drag you onto the table, clumsiness will not work.
It was made due to the bug and comment that says that it was intended behaviour. Previously you could kill the clumsy person by non-stop dragging them onto the table (condition was always true because of args.PuttingOnTable == ent.Owner and the usage of &&.

Why / Balance

Fixes #33819

Technical details

Moves BiomassReclaimerComponent to Shared to use it in new condition in ClumsySystem
This PR adds new condition in ClumsySystem, that checks for BiomassReclaimerComponent on a target.
Also modifies conditions
Before:

!_cfg.GetCVar(CCVars.GameTableBonk)
&& args.PuttingOnTable == ent.Owner // Always sets false if being dragged by smb and && does not even consider third check
&& !rand.Prob(ent.Comp.ClumsyDefaultCheck)

After

_cfg.GetCVar(CCVars.GameTableBonk)
|| args.PuttingOnTable != ent.Owner // If we're clumsy and being dragged onto climbable, always return
|| !rand.Prob(ent.Comp.ClumsyDefaultCheck)

Media

Climbing

Content.Client_iVFOdhw0Ry.mp4

Dragging into reclaimer

Content.Client_MWXTdM4YKd.mp4

Requirements

Changelog

🆑

  • fix: Clumsy mobs can be dragged into biomass reclaimer once again.

@MilenVolf MilenVolf requested a review from Jezithyr as a code owner December 12, 2024 23:38
@github-actions github-actions bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. S: Needs Review Status: Requires additional reviews before being fully accepted size/M Denotes a PR that changes 30-99 lines. labels Dec 12, 2024
@slarticodefast
Copy link
Member

Hmm, I don't like hardcoding the BiomassReclaimerComponent into the ClumsySystem, that should be an event. We just removed the ClumsyComponent from the GunSystem for the same reason: It makes systems that have nothing to do with each other depend on each other.

@ScarKy0 ScarKy0 added T: Bugfix Type: Bugs and/or bugfixes P3: Standard Priority: Default priority for repository items. D2: Medium Difficulty: A good amount of codebase knowledge required. A: General Interactions Area: General in-game interactions that don't relate to another area. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Dec 13, 2024
@@ -97,14 +98,17 @@ private void BeforeGunShotEvent(Entity<ClumsyComponent> ent, ref SelfBeforeGunSh
private void OnBeforeClimbEvent(Entity<ClumsyComponent> ent, ref SelfBeforeClimbEvent args)
{
// checks if ClumsyVaulting is false, if so, skips.
if (!ent.Comp.ClumsyVaulting)
if (!ent.Comp.ClumsyVaulting
|| HasComp<BiomassReclaimerComponent>(args.BeingClimbedOn))
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I'm definitely not a fan of hard coding this component check, as slarticodefast said. Is this check even needed with the other check in place?

Copy link
Member

Choose a reason for hiding this comment

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

We probably don't even need to use SelfBeforeClimbEvent here and can use normal drag drop without any climbing for inserting into the reclaimer, similar ot the cryopod.

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. D2: Medium Difficulty: A good amount of codebase knowledge required. P3: Standard Priority: Default priority for repository items. S: Needs Review Status: Requires additional reviews before being fully accepted size/M Denotes a PR that changes 30-99 lines. T: Bugfix Type: Bugs and/or bugfixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Monkeys and Kobolds are too clumsy to grind
4 participants