Commit Graph

6 Commits

Author SHA1 Message Date
tonty
d5daa9c9b8 [NO GBP] Renames mob/camera to mob/eye and makes everything follow suit (#87684)
## Why It's Good For The Game

Clarity and consistency regarding DM's systems. 
Internally, `eye` is used for anything that controls the client's view.

![image](https://github.com/user-attachments/assets/7d1291e1-7a6a-4736-a14b-97834e89846f)
How `eye` is used in DM is consistent with how we use the term, so I
figured this would add clarity.

Being named mob/camera also makes it unclear exactly what it's doing.
The name implies that it would function similar to how mob/camera/ai_eye
does, but most of the time it's only used as... an eye.

My ulterior reason for this PR is that I want to clean up
mob/camera/ai_eye and it's subtypes after this.
## Changelog

🆑
server: mob/camera has been renamed to mob/eye, which may break
downstreams
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-11-09 10:57:45 +00:00
Bloop
00a42f75e3 Fixes another image harddel in station blueprints (and more) (#80780)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/13398309/063c58ef-6233-4c91-aaf0-7e9589c0e912)

Tin. Just more uncovering of some of these image harddels.
`blueprint_data` is a list of images.

I also went through the code and looked for any more instances of images
being qdeleted that I could find.

## Why It's Good For The Game

Hard dels begone

## Changelog

🆑
fix: fixes an /image harddel in station blueprints
code: cleaned up some more /image qdels
/🆑
2024-01-05 18:00:23 +00:00
Mothblocks
c1d68698fb Micro-optimize qdel by only permitting one parameter (#80628)
Productionizes #80615.

The core optimization is this:

```patch
-	var/hint = to_delete.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up.
+	var/hint = to_delete.Destroy(force) // Let our friend know they're about to get fucked up.
```

We avoid a heap allocation in the form of copying the args over to a new
list. A/B testing shows this results in 33% better overtime, and in a
real round shaving off a full second of self time and 0.4 seconds of
overtime--both of these would be doubled in the event this is merged as
the new proc was only being run 50% of the time.
2023-12-28 13:52:44 -08:00
LemonInTheDark
9696dd1a1d Targeting Datums Renamed (and global) (#79513)
## About The Pull Request

[Implements the backend required to make targeting datums
global](6901ead12e)

It's inconsistent with the rest of basic ai for these to have a high
degree of state, plus like, such a waste yaknow?

[Implements
GET_TARGETING_STRATEGY](d79c29134d)

Regexes used:
new.*(/datum/targetting_datum[^,(]*)\(*\)* -> GET_TARGETING_STRATEGY($1)

Renamed all instances of targetting to targeting (also targetting datum
-> targeting strategy)

I've used GET_TARGETING_STRATEGY at the source where the keys are
actually used, rather then in the listing. This works out just fine.

## Why It's Good For The Game

Not a misspelled name through the whole codebase, very slightly less
memory load for basically no downside (slight cpu cost maybe but not a
significant one.

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-11-09 14:44:24 +00:00
Bloop
4c870f71ca Fixes a bunch of callbacks that were being qdeleted, and code cleanup (#77904)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/13398309/559eb50a-461c-4220-b628-55412baaffc3)

Continuing the work of
https://github.com/tgstation/tgstation/pull/77850.

it started with finding one that was being missed and causing a
runtime...then I noticed a whole lot more. While I was doing this I
found callbacks that weren't being nulled in `Destroy()`, so I added
that wherever I found these spots as well as some general code cleanup.

There were a lot more of these than I initially hoped to encounter so
I'm labeling it as a refactor.

## Why It's Good For The Game

Fixes lots of runtimes, improves code resiliency.

## Changelog

🆑
refactor: fixed a bunch of instances of callbacks being qdeleted and
cleaned up related code
/🆑
2023-08-25 16:03:27 -06:00
Jacquerel
44c0099536 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.
/🆑
2023-03-10 21:49:23 -07:00