Files
Bubberstation/code/datums/elements
necromanceranne ee5e1017d0 Ancient and recent mecha bug fixes (#84171)
## About The Pull Request

Mecha guns actually utilize random spread while firing if ``randomspread
= TRUE``. Currently every weapon that isn't the shotguns are always
pinpoint even if they would have variance.

Makes bumpsmash and melee attacks in a mech use the same cooldown. The
actual speed between bumpsmash melees are the same as before (once every
0.3 seconds) and click melee is the same as well (once every second).
However, if you do one or the other, it will put you on cooldown for
both. The reason for this is that they're literally just calling the
same proc but not respecting each others cooldowns. So we've
consolidated this into one cooldown with varying cooldown timers. I
don't even think this is the most elegant solution, but I'm not going to
make any radical changes of the structure of the code. Fuck that.

**Edit** I forgot to mention this but you have to be in combat mode to
bumpsmash as a consequence of the above changes. You're fucking welcome.

Separates out mecha_melee_attack proc on the ``/obj/`` level to instead
only ``/obj/structure`` and ``/obj/machinery``, which is the only things
we should be attacking in the /obj/ list. I don't even want to know what
mechs have been able to punch while this wasn't the case. Probably
nothing they should have.

## Why It's Good For The Game

Mechs are a fucking diabolical nightmare of procs and some truly ancient
code. Over time, things have gotten worse, as we have no one really
actively maintaining some of this consistently. One of these bugs is
literally day of mech implementation. I shit you not.

## Changelog
🆑
fix: Mecha weaponry is capable, for the first time ever, of experiencing
recoil. This was an intended mechanic, I promise. The code just
literally never worked.
fix: Mecha bump melee attacks and click melee attacks are now on the
same cooldown, but have varying cooldown timers. You will always bump
attack faster than you will click.
fix: You must be in combat mode to punch objects and to bumpsmash into
objects.
fix: Stops mecha being able to punch literally any object and damage
them.
code: Tidies up some of the autodoc comments for mech weapons.
/🆑
2024-07-01 00:50:05 +02:00
..
2024-02-29 04:24:10 +00:00
2024-01-26 02:23:24 +01:00
2023-11-14 13:57:52 -07:00
2024-03-29 22:26:35 -06:00
2024-05-16 19:54:00 -07:00
2024-06-08 19:26:03 -04:00