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

Properly splits attack_ai() and attack_robot() where in make sense #11310

Merged

Conversation

mystery3525
Copy link
Contributor

About The Pull Request

Properly splits the calls of attack_ai() and attack_robot() into their own execution where it makes sense.

Why It's Good For The Game

Looking through all the code in both attack_ai() and attack_robot(), its execution was all over the place. Some times attack_ai() calls attack_robot() and vice-versa, this properly untangles that execution so that we can now assume when we call attack_ai(), its mob is actually an AI. When we call attack_robot(), its mob is actually a cyborg. We can also call the parent now so that COMSIG_ATOM_ATTACK_AI and COMSIG_ATOM_ATTACK_ROBOT can work (separate PR).

Testing Photographs and Procedure

Screenshots&Videos

Tested it a bunch in private, and it compiles:
image

Changelog

🆑
code: Untangles attack_ai() and attack_robot() code
/:cl:

Copy link

github-actions bot commented Sep 8, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

1 similar comment
Copy link

github-actions bot commented Sep 8, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@PowerfulBacon
Copy link
Member

Seems generally fine, but wouldn't it make more sense to split it via function considering how AI and borgs are meant to have similar functions with borgs also getting the ability to use things physically.

This would be something like

  • Some form of attack remote which the AI calls, and borgs call if their attack borg fails
  • Standard attack cyborg that does close range interactions

@mystery3525
Copy link
Contributor Author

Believe it or not, there is some functionality unique to AIs, like being able to attack cyborgs, not being able to attack advanced camera consoles, a few more I forgot.

Added attack_silicon() which is called for both and ideally returns TRUE to cancel attack chain.

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.

Seems like a good idea, hoping this is tested well and AI attacks won't start breaking

@PowerfulBacon PowerfulBacon added this pull request to the merge queue Sep 25, 2024
Merged via the queue into BeeStation:master with commit 8e95962 Sep 25, 2024
21 checks passed
mystery3525 pushed a commit to mystery3525/BeeStation-Hornet that referenced this pull request Sep 25, 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