Commit Graph

8 Commits

Author SHA1 Message Date
SkyratBot
0b958ddbe0 [MIRROR] Fixes a bug with the scope getting stuck on mobs that get dusted or ghost [MDB IGNORE] (#24404)
* Fixes a bug with the scope getting stuck on mobs that get dusted or ghost (#78941)

## About The Pull Request

If you ghost while mid-scope (or similarly, if you get dusted/your mob
gets deleted) the mob's cursor would get all messed up due to some
oversights. This just clears up some of these logic errors and ensures
everything gets cleaned up properly.

Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/24189
Fixes https://github.com/tgstation/tgstation/issues/78756

## Why It's Good For The Game

Fixes a bug. I don't think scopes are even in use here but they are
downstream.

<details>
<summary>Deleted and being dusted resets perspective and cursor
properly</summary>

![dreamseeker_SSU4YnEK4n](https://github.com/Skyrat-SS13/Skyrat-tg/assets/13398309/dcaa5238-0067-4923-a956-24c6ba4aa2b3)

![dreamseeker_GZEhuSJSGS](https://github.com/Skyrat-SS13/Skyrat-tg/assets/13398309/2b88db21-6560-486d-94d3-9773fa543c50)

</details>

<details>
<summary>So does ghosting</summary>

![dreamseeker_7n3uXZvDSI](https://github.com/tgstation/tgstation/assets/13398309/08f6272d-baba-4e8e-ae0b-db23331982f7)

</details>

## Changelog

🆑
fix: being killed or ghosting while being scoped will no longer cause
the cursor offset to persist in a bugged state
/🆑

---------

Co-authored-by: san7890 <the@ san7890.com>

* Fixes a bug with the scope getting stuck on mobs that get dusted or ghost

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
2023-10-17 16:35:30 -07:00
SkyratBot
44c654d771 [MIRROR] fixes cursor catchers not working without widescreen [MDB IGNORE] (#22893)
* fixes cursor catchers not working without widescreen (#77372)

## About The Pull Request
apparently vis x and vis y dont exist unless the object is transformed

## Changelog
🆑
fix: sniper scope and kinesis should work without widescreen
/🆑

* fixes cursor catchers not working without widescreen

---------

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2023-08-05 19:36:50 -04:00
SkyratBot
6dfe17306c [MIRROR] Pulls apart the vestiges of components still hanging onto signals [MDB IGNORE] (#21738)
* Pulls apart the vestiges of components still hanging onto signals

* update modular

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2023-06-18 13:18:23 +00:00
SkyratBot
9a594755f3 [MIRROR] Renames delta time to be a more obvious name [MDB IGNORE] (#20507)
* Renames delta time to be a more obvious name

* updates to our code

---------

Co-authored-by: oranges <email@oranges.net.nz>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-04-12 20:45:43 +01:00
SkyratBot
ac2b1d5ec7 [MIRROR] Restores Spell Card targetting behaviour [MDB IGNORE] (#19776)
* Restores Spell Card targetting behaviour (#73706)

## About The Pull Request

Fixes #52946

This has been broken ever since #44112 which apparently removed the proc
in this component which selected a target for performance reasons and
just... didn't replace it with anything else? So it's been bricked ever
since.

In order to restore the removed mouse tracking behaviour I implemented
the pattern used in scoped weapons and the kinesis module. As this was
the third thing I could find to use this code, I abstracted it out into
an object where most of the shared behaviour lives. I tested those
things too and they still seem to do what they used to.

Here it is in action:

https://user-images.githubusercontent.com/7483112/221954852-22244bb1-7c87-452d-a9b0-ebed81c4c1ef.mp4

Because this spell now applies a full screen overlay in order to
function, it's really begging for someone to make some touhou-style art
with cards and patterns around the edge of the screen while you are in
aiming mode, but I'm not going to be the one to make it.

I tidied this component up and refactored it as best I could while I was
reworking it to use a full screen overlay but I am... not totally
confident that it should be a component at all given that it keeps being
created and destroyed. But also it has worked that way for like four
years now, so who am I to say.

Oh yeah also the icon for this spell broke, so I fixed it.

## Why It's Good For The Game

Makes a reasonably terrible wizard spell marginally less bad.
Maybe now that this component works, some other things can use it?
If we make a fourth thing which follows your cursor it won't need to
copy/paste code around.

## Changelog

🆑
fix: Spell Cards from the Wizard spell will now home in somewhat on the
target nearest to your cursor.
fix: The Spell Cards spell now displays the correct icon instead of a
big red "error" text.
/🆑

* Restores Spell Card targetting behaviour

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-03-11 15:15:26 +00:00
Zonespace
f7c26bbf25 515 Compat (#17465)
* ONLY SKYRAT CHANGES

* ACTUALLY SKYRAT CHANGES

* yolo, revert later

* Update alternate_byond_versions.txt

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2022-11-15 06:59:06 +00:00
SkyratBot
f3faa38e1c [MIRROR] (hopefully) improvements to use of scope and kinesis module [MDB IGNORE] (#17302)
* (hopefully) improvements to use of scope and kinesis module (#70934)

## About The Pull Request
so, scope and kinesis are the only things in the game (other than the
body zone selector) which use the function MouseMove. this tracks every
mouse movement, which meant we had to stuff a cooldown on it to not
calculate a ton of useless stuff. this time can misalign if you move
your mouse fast, not registering at all, as well as not working out with
the 0.2 second processing time of the things handling it (the scope
component and kinesis module)
instead of doing that, we are now keeping the mouse parameters as a
variable, which we update with every mousemove to the current
parameters. then we handle the calculations right as we need them (in
the kinesis/scope) module, rather than relying on mousemove cooldowns,
this should hopefully feel way better

## Why It's Good For The Game
😁

## Changelog
🆑
qol: sniper scopes and kinesis module should feel better to use
/🆑

* (hopefully) improvements to use of scope and kinesis module

* seconds

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-04 12:55:05 -04:00
SkyratBot
f5e5c368fa [MIRROR] Adds a scope component, removes old zooming and adds sniper marksman ammo. [MDB IGNORE] (#13110)
* Adds a scope component, removes old zooming and adds sniper marksman ammo. (#66218)

Removes the old sniper rifle zoom, replaces it with a scope component. the scope activates on right click and lets your camera follow your mouse.
https://streamable.com/2c63u4 (due to byond rounding some shots were weirdly missed in that video, its fixed now)
Also adds sniper marksman ammo to the nukie uplink. It does slightly less damage, but it is hitscan and has one guaranteed ricochet shot, so you can shoot a wall and it could still hit someone.

* Adds a scope component, removes old zooming and adds sniper marksman ammo.

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2022-04-25 17:38:49 -07:00