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

Standardizes & documents Attack Chain. Telekinesis cleanup #10903

Merged
merged 8 commits into from
May 7, 2024

Conversation

Tsar-Salat
Copy link
Contributor

@Tsar-Salat Tsar-Salat commented Apr 18, 2024

About The Pull Request

Title. Standardizes the attack chain, documents most procs involved.

I've also implemented stack_traces that will show items that have had the attack chain improperly implemented.

Changes include, but are not limited to:

  • Reducing redundant procs, integrating them into their parents if possible (i.e. tool_attack_chain is now part of melee_attack_chain.
  • Minor buff to telekinesis allowing it to use most interact() code. This shouldn't be anything significant for balance, its mainly to reduce snowflake code where we are just copying what interact does and putting it in a duplicate proc, but for tk. Gets very excessive quickly.
  • Killed about 4 snowflake COMPONENT_NO_x signals, replaced with generic COMPONENT_CANCEL_ATTACK_CHAIN

Ports:

Why It's Good For The Game

Beestation has bitten off bits and pieces of these PRs throughout the years, especially with the heretics port. This has just further contributed to the messy chain. With the standardization, we reduce further deviations significantly.

My own personal reasons for adjusting this is for the Retiling Appearance pr, which is seemingly inoperable at the moment, and I have been suspecting a faulty attack_chain is to blame.

Testing Photographs and Procedure

Screenshots&Videos
dreamseeker_QWb73kjkna.1.mp4

Changelog

🆑 rkz, haukeschuemann, Rohesie, Timberpoes, zxaber
refactor: Standardized the entire attack_chain and added stack_traces to detect when & where it fails.
balance: minor buff to telekinesis to use most interact() code. Unlikely to cause major change, just reducing duplicate code where TK would have its own proc for essentially doing the exact same thing
/:cl:

Copy link
Member

@PowerfulBacon PowerfulBacon left a comment

Choose a reason for hiding this comment

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

This is likely to cause some accidental behavioural changes, is there any way that we can easilly check/test if something is using the old code vs the new method and does that matter?

@Tsar-Salat
Copy link
Contributor Author

Tsar-Salat commented May 7, 2024

if something is using the old code vs the new method

It's not particularly problematic if something is using the old code for this, as the majority of the work done here is eliminating duplicate signals and standardizing them to use. As the old signals defines don't exist anymore to be send or registered, I don't think that part will cause issues.

What is problematic is if we have attack calls for a specific item or tool or whatever that's ignoring the attack chain. For example tool usage being inside attack procs when they should be in tool_act.

Of course, my natural assumption is that if some item is not following the attack chain or abusing signals, the stack traces of this pr will help identify it rather than introducing further issues.

My real worry for behavioral changes was with telekinesis attacks, but I think I tested that to a reasonable degree and saw no issues.

@PowerfulBacon PowerfulBacon added this pull request to the merge queue May 7, 2024
Merged via the queue into BeeStation:master with commit 22f035f May 7, 2024
8 checks passed
DrDuckedGoose pushed a commit to DrDuckedGoose/BeeStation-Hornet that referenced this pull request May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants