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

Adds Combat mode, rclick functionality #11899

Merged
merged 151 commits into from
Feb 14, 2025

Conversation

Tsar-Salat
Copy link
Contributor

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

About The Pull Request

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

Changes are as listed:

Major Codebase changes

  • Disarm and Grab Intents have been removed.
  • Diametric intents (harm/help) are not combat mode. Toggled by F or 4.
  • Context menu now appears on shift+rclick (like examine)
  • Disarm functionality has now been moved to rclick, whether CM is active or not
  • Grabbing has been centralized in its hotkey ctrl-click

Functional Item changes

  • Ninja Dash now activates via right-click
  • M90 grenade launcher activates through right click rather than toggle
  • Health analyzer now scans health with left click, chemicals with right click
  • Jumpsuits change suit sensors through right-click
  • Airlocks are now welded through rightclick
  • Reagent splashing is done through right click
  • RCDs deconstruct through rclick
  • Syringes now lclick to inject, rclick to draw
  • washingmachines now use rclick to start
  • stack splitting now uses rclick
  • hookshotguns use rclick instead of toggle
  • deconstructing windows, tables, chairs is done through rclick with appropriate tools
  • secure lockers are now (un)locked through rclick
  • gas canisters are repaired on lclick and deconstructed on rclick
  • right clicking a reagent container will now set it to its previous transfer amount
  • Screwdrivers can now be put in autolathes through lclick, maintenance through rclick
  • girders can be built by rclicking a turf with a sheet of iron (allowing building multiple at the same time)
  • Most previously rotatable structures or machines can now be rotated through mouseclick. Left for Counterclockwise, right for clockwise.
  • closet wrench actions moved to rclick
  • chemistry machines use rclick to add/remove their beakers
  • Kinetic Crusher projectiles are now fired on rclick
  • ID Painter now lets your remove IDs/PDA through rclick
  • PKA modkits can now be removed through a radial on rclick
  • storage item access has been moved from alt+click to rclick
  • stunbatons now stunshove through rclick, instead of on disarm intent
Ports:

(not rclick but rclick needed)

Rclick:

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

dreamseeker_3glRJS1Dp3.mp4

lclick/rclick syringes

dreamseeker_NzvFfxDE1k.mp4

grab states

dreamseeker_zvpHi0bMQQ.mp4

RCD rclick deconstruction

dreamseeker_Nez9ejXPHj.mp4

generic structure deconstruction

dreamseeker_uBsH8AheX2.mp4

CW/CCW mouse rotation

dreamseeker_LJmxLX3m8t.mp4

rclick girder construction

dreamseeker_8bMhahRAPx.mp4

Changelog

🆑 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, GuillaumePrata, Timberpoes, Ghommie, zxaber, Gpeckman, haukeschaumann, tralezab, Jack LeCroy, MrMelbert, ShizCalev, Actioninja
add: Adds combat mode
add: Adds martial art combo meters and TGUI guides
refactor: refactors CanUseTopic and dexterity
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
code: unit tests attacking people

balance: Using Jaunts will conceal your runechat for their duration.
code: passed IS_HERETIC through the proc, rather than checking everytime you used a heretic spell. Less runtimes.

fix: cutting wires while a TGUI menu is open will no longer shock you and bypass shock protection
tweak: cleaned up airlock prying code. Nightmare blades are now crowbars and fulfill tool_acts, they still can break stuff by being on combat mode though. Rclick with a one to pry regardless of intent.

refactor: refactors stun batons
tweak: abductor batons are children of stun batons
/:cl:

Copy link

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

@PowerfulBacon
Copy link
Member

Can we have the 'F' key rebound from looking (who uses that anyway) to the combat mode toggle? I believe that's a standard on other servers

@Tsar-Salat
Copy link
Contributor Author

Tsar-Salat commented Feb 14, 2025

Can we have the 'F' key rebound from looking

Its not on looking.

Its the button combinations you use when you need to move up/down as a ghost, cameramob, blob, revenant, or with wings.

As an admin who ghosts a lot and a previous AI main, this is kinda muscle memory for me personally. I dont see whats wrong with `

If you wish for me to change it, please offer alternative hotkeys.

@XeonMations

This comment was marked as off-topic.

@Tsar-Salat
Copy link
Contributor Author

You cant unequip an L6 SAW from your hardsuit storage once it's placed in there.

Use the issue threads for bugs unrelated to combat mode.

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.

Can I merge this and get continued support in a new PR?

Copy link

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

@Tsar-Salat
Copy link
Contributor Author

Can I merge this and get continued support in a new PR?

If you want to.

The amount of issues being attributed to me that don't have anything to do with this pr is getting annoying however.

@Liver-1
Copy link
Contributor

Liver-1 commented Feb 14, 2025

I believe this testmerge cause the following bug:
#12293

@Tsar-Salat
Copy link
Contributor Author

I believe this testmerge cause the following bug: #12293

No?

t7FJ2BhmCm.mp4

@Liver-1
Copy link
Contributor

Liver-1 commented Feb 14, 2025

I believe this testmerge cause the following bug: #12293

No?
t7FJ2BhmCm.mp4

Try it in-server, I am telling you it's not working

@Liver-1
Copy link
Contributor

Liver-1 commented Feb 14, 2025

When I press 4 it makes the combat intent noise, despite AI not using it.

@PowerfulBacon PowerfulBacon added this pull request to the merge queue Feb 14, 2025
Merged via the queue into BeeStation:master with commit 08ab120 Feb 14, 2025
21 checks passed
@Therealdoooc213
Copy link
Contributor

OMG guys beestation is gonna die because of combat mode! I'll be checking back up in a year to see if this is true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Administration Balance/Rebalance ☑️ Good PR I like it Code Improvement Feature Fix Golden ⭐ For high-effort PRs that make big and good improvements to the game. Mapping DMM Change Needs Testmerge Refactor Sound Sprites TGUI-Changes Contains changes to TGUI. Make sure its up to date with TGUI 4.0 Tweak
Projects
None yet
Development

Successfully merging this pull request may close these issues.