BeeStation / BeeStation-Hornet

99.95% station. 0.05% bees
https://beestation13.com
GNU Affero General Public License v3.0
200 stars 682 forks source link

Adds Combat mode, rclick functionality #11899

Open Tsar-Salat opened 4 days ago

Tsar-Salat commented 4 days ago

About The Pull Request

This adds right-click functionality through the addition of the combat mode system.

Changes are as listed:

Major Codebase changes

Functional Item changes

Ports: - https://github.com/tgstation/tgstation/pull/56601 - https://github.com/tgstation/tgstation/pull/56636 - https://github.com/tgstation/tgstation/pull/56667 - https://github.com/tgstation/tgstation/pull/56699 - https://github.com/tgstation/tgstation/pull/56700 - https://github.com/tgstation/tgstation/pull/56779 - https://github.com/tgstation/tgstation/pull/56781 - https://github.com/tgstation/tgstation/pull/56811 - https://github.com/tgstation/tgstation/pull/56813 - https://github.com/tgstation/tgstation/pull/56816 - https://github.com/tgstation/tgstation/pull/56829 - https://github.com/tgstation/tgstation/pull/56846 - https://github.com/tgstation/tgstation/pull/56864 - https://github.com/tgstation/tgstation/pull/56865 - https://github.com/tgstation/tgstation/pull/57214 - https://github.com/tgstation/tgstation/pull/57617 - https://github.com/tgstation/tgstation/pull/57788 - https://github.com/tgstation/tgstation/pull/57837 - https://github.com/tgstation/tgstation/pull/57841 - https://github.com/tgstation/tgstation/pull/57881 - https://github.com/tgstation/tgstation/pull/58124 - https://github.com/tgstation/tgstation/pull/58270 - https://github.com/tgstation/tgstation/pull/58523 - https://github.com/tgstation/tgstation/pull/58774 - https://github.com/tgstation/tgstation/pull/58802 - https://github.com/tgstation/tgstation/pull/58830 - https://github.com/tgstation/tgstation/pull/59508 - https://github.com/tgstation/tgstation/pull/59656 - https://github.com/tgstation/tgstation/pull/59814 - https://github.com/tgstation/tgstation/pull/60653 - https://github.com/tgstation/tgstation/pull/60990 - https://github.com/tgstation/tgstation/pull/61275 - https://github.com/tgstation/tgstation/pull/61795 - https://github.com/tgstation/tgstation/pull/62949 - https://github.com/tgstation/tgstation/pull/63038 - https://github.com/tgstation/tgstation/pull/64441 - https://github.com/tgstation/tgstation/pull/64482 - https://github.com/tgstation/tgstation/pull/64724 - https://github.com/tgstation/tgstation/pull/64939 - https://github.com/tgstation/tgstation/pull/64964 - https://github.com/tgstation/tgstation/pull/65353 - https://github.com/tgstation/tgstation/pull/65978 - https://github.com/tgstation/tgstation/pull/66038 - https://github.com/tgstation/tgstation/pull/66928 - https://github.com/tgstation/tgstation/pull/72463 - https://github.com/tgstation/tgstation/pull/72959 - https://github.com/tgstation/tgstation/pull/76057

Why It's Good For The Game

Intents are by-and-large not a very well written system. The "grab" intent, for instance, has had a hotkey for years on ctrl-click.

The large goal of this PR is to address two fundamental issues:

  1. The current intent check system, which almost entirely relies on if a character is or is not on help or harm mode, to determine that players intention.
  2. The clunkiness of actual systems that DO fully utilize the intent system

For the first issue, nearly all of our intent checks in the codebase are just diametric checks for if a player is in harm or help mode. Grab is only checked when checking grab_state, which is attached to attack_hand, otherwise you can basically forget about the intent and just use the ctrl hotkey. Disarm is in an even worse boat, its basically Harm Jr. in that players in combat will primarily be on harm while in combat and be spam-switching between the two only for the purpose of trying to stun them on a wall, table, or mob.

For the second issue, the most notable use of intents is martial arts. This is not to the boon of martial arts either, as the combination of moves that you have to do mid-combat is not very well done.

Allowing players to free up their mouse instead of the specific intents gives coders a lot more room and buttons to work with, and allow simplification for needlessly complex tasks like martial arts or construction.

Testing Photographs and Procedure

Screenshots&Videos rclick welding https://github.com/user-attachments/assets/a57beea5-e2fc-4a6f-ada5-8157d5f468ca lclick/rclick syringes https://github.com/user-attachments/assets/24dbf3ec-9cf3-4f29-8442-86063871daf1 grab states https://github.com/user-attachments/assets/f967f636-702e-432a-bca3-d63fcad7b1ce RCD rclick deconstruction https://github.com/user-attachments/assets/2ff9beba-18e2-4ee7-80cb-04fd66c104e4 generic structure deconstruction https://github.com/user-attachments/assets/98534cc5-569b-46ef-9112-2e16a07425ea CW/CCW mouse rotation https://github.com/user-attachments/assets/b8cfabca-352a-4d9a-a08d-55bdf6007236 rclick girder construction https://github.com/user-attachments/assets/b8b80e36-f3d7-4c2a-b978-64f258750114

Changelog

:cl: rkz, Qustinnus, Mothblocks, TJatPBnJ, IndieanaJones, KathyRyals, Arkatos, norill, Fikou, dragomagol, SgtHunk, JJRCop, ninjanomnom, cacogen, Timberpoes, LemonInTheDark, Ghommie, Sealed101, Ghilker, TheBonded, Timothymtorres, CameronWoof, ArcaneDefence, BurgerLUA, OneAsianTortoise, vincentiusvin, itseasytosee, AnturK add: Adds combat mode refactor: refactored syringe code to use flags tweak: clicking on the turf of a airlock while combat mode is off will now close the airlock. No more pixel hunting! balance: buffs to hook shotgun in addition to rclick functionality code: renames RemoveComponent, component destroy will no longer runtime when parent is null refactor: refactored simple rotation component fix: fixed abandoned crates to not try to kill you if you perform actions on them AFTER they are unlocked code: introduced variable weapon attack speed. No weapon utilizes this yet but admins can now varedit items to attack faster/slower. code: unit tests reagent container transfer amounts /:cl:

github-actions[bot] commented 3 days ago

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

llol111 commented 3 days ago

So the day has come its all over Annihilation awaits

Geatish commented 3 days ago

Rip to all the screwdrivers that will be consumed by the autolate

EvilDragonfiend commented 2 days ago

eh is it really golden? but well I guess any maint can give one. prolly deserving when it's a big port.

Archanial commented 1 day ago

I like it, good pr ‼️

github-actions[bot] commented 1 day ago

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

Rukofamicom commented 17 hours ago

eh is it really golden?

According to the tag yes: image

This was a really high-effort port that also has a major impact on the game.