Commit Graph

9 Commits

Author SHA1 Message Date
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
Fikou
9175e2431e psyker echolocatione improvementa (#80042)
## About The Pull Request
psyker echolocation cooldown time has been reduced from 2 to 1.8 seconds
psyker heads no longer render an overlay of not having eyes
psyker echolocation rendering has been reworked to hopefully not crash
the game anymore when theres many psykers

## Why It's Good For The Game
these changes make psyker better

## Changelog
🆑
qol: psyker echolocation cooldown time has been reduced from 2 to 1.8
seconds
fix: psyker heads no longer render an overlay of not having eyes
/🆑
2023-12-02 03:27:47 +01:00
John Willard
06ca7a4481 Hud screens now set hud owner in Initialize. (#76772)
## About The Pull Request

Adds an arg in huds' screens to add the hud owner in the Initialize,
instead of manually setting it every time we need to.
This is already done in ``New()`` for lobby screens, which I left intact
as lobby screens are used for new players, and are given out before
atoms are Initialized. Everything else, however, uses Initialize, so it
does not mess with any other args in their own Initializes (like the
Escape menu).
This also allows us to set the screens' HUDs as a private var, to ensure
this won't be messed with in the future.
Lastly I replaced instances of ``client`` with ``cannon_client`` to be
consistent with a lot of other parts of hud code.

## Why It's Good For The Game

Huds are easy to break when they do not have a hud owner, and for
something as important as that I believe it should be something you
opt-out of when you don't want it, rather than something you opt-into by
manually setting hud owner every time.
This cuts down on a lot of copy paste in hud code for humans, aliens,
etc.

## Changelog

🆑
refactor: Huds now have their hud owner set in Initialize
/🆑
2023-07-16 21:00:22 +02:00
ArcaneMusic
d0441464fb Basic pollen-particles for plants pollenating. (#74675)
Legally endorsed nightcode 👍 

## About The Pull Request

When 2 plants are adjacent to each other, they will begin to
cross-pollenate, sharing their potency, instability, and yield values
between the two. This has been in the game since #50001 , however we
never added a more clear visual tell that cross-pollenation exists.
Thanks to the magic of *barticles*, now you can!

![image](https://user-images.githubusercontent.com/41715314/231359363-07c7f354-d2f6-4d5e-8b59-5f968781135f.png)
_pictured: wheat and tomatoes pollenating_

Adds a simple particle effect, largely lifted from bonfires, that
indicates that two plants are sharing stats at minimum.

## Why It's Good For The Game

Following discussion from #74621, it was decided we needed and preferred
a more visual cue to the mechanic. As a general point I think that's a
longer term fix to the issue, and this adds more visual clarity to an
otherwise arcane mechanic (heh).

Looking for feedback on how to improve the look of the particles but for
fast nightcode I think I did okay for a first try

## Changelog

🆑
imageadd: Hydroponics trays now have pollen particles that they generate
when they share stats and chems. Non-allergenic!
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-04-15 21:42:27 -06:00
san7890
bf6f81a9b5 Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test (#74037)
On the tin, doing it like this means we can reduce our overall line
fingerprint whenever we have to add two or more traits from the same
source on the same target. Especially helps when we get to the 4+ range
of traits, a breath of fresh air even.

Doesn't mean we have to do for loops, as that's already handled within
the define as well. I replaced some of the checks with `length()`
checks, let me know if I should switch it over to something else (maybe
`islist()`)? We stack_trace whenever we're not passed a list reference
on purpose, and sometimes var/lists are null by default (or just empty,
making this redundant).
## Why It's Good For The Game

I commonly feel the urge to write "use `AddTraits()`" or something in
reviews, then am sad when I remember it doesn't exist. I will no longer
be sad.

Can ensure a lot more trait safety as well by using static lists- when
both ADD_TRAIT_LIST and REMOVE_TRAIT_LIST re-use the same list, you are
confident (from a static point of view) that everything that you want to
be adding/removing works.

I may have missed a few things where this could be used, but both macros
implemented in this PR still use the same framework that was being used
in the last four years- so stuff won't break if left untouched. Just a
nifty new tool for developers.

also fixed up some code in the area, numerous bugs were found and
exploded
2023-03-18 01:57:06 +00:00
Fikou
77f0814f95 psyker gang fixes (#72330)
## About The Pull Request
adds more ammunition, and also signing on the psyker ship
fixes some minor stuff
you can see other echolocation receivers as fully purple now, rather
than just their outline
echolocating people have night vision, to prevent bugs with them not
being able to see echolocated tiles
psyker pirates have headsets that increase their echolocation range
partially fixes the shuttle docker. need someone smarter to look at it
with me though, you can physically use it at least, just cant see yet.

## Why It's Good For The Game
they are not very playable right now

## Changelog
🆑
balance: adds more ammunition, and also signing on the psyker ship
qol: you can see other echolocation receivers as fully purple now,
rather than just their outline
fix: echolocating people have night vision, to prevent bugs with them
not being able to see echolocated tiles
add: psyker pirates have headsets that increase their echolocation range
fix: partially fixes the psyker ship shuttle docker
/🆑
2023-01-02 15:13:56 +00:00
Zephyr
5c18606d9b [FUCK] Linters work again, V3 (#71748)
Get linters working again, I was never using the correct directory
expansion syntax for checks, so why some of them still worked anyway is
beyond me.

Fixes https://github.com/tgstation/tgstation/issues/71695
2022-12-06 01:05:52 -08:00
tralezab
e9cff525dc Refactors Pirates into Pirate Gangs, Adds the Psyker-gang as new pirates (#71650)
## About The Pull Request

### Refactor
Pirate gangs are now datumized for extendability, custom dialogue, etc.

### Psyker Gang 🧠 
Psyker-gang Members are pirates who are... yes, Psykers. They're on a
gore-binge and need some money for more hits of gore!

- Gore autoinjectors, filled with dirty kronkaine. Don't overdose,
you'll go splat.
- Psykerboost armor, reactive armor that refreshes psychic abilities.
Given to the leader.

- [x] @Fikou is making the map :D

## Why It's Good For The Game

God I fucking love variety also now we can add as many different pirates
as we so desire

<details>
  <summary>Spoiler warning</summary>
  

![image](https://user-images.githubusercontent.com/40974010/205342701-9cba63ef-a22c-4f07-9b48-8793c4a2b5af.png)
  
</details>

## Changelog
🆑 Tralezab code, Fikou's map, PigeonVerde and Halcyon for sprites!
add: Psyker-gangers are new pirates
refactor: refactored pirate code so we can add more in the future
/🆑

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2022-12-05 02:18:23 +00:00
Fikou
35b5ac0c4e Psykers (#71566)
## About The Pull Request
Finishes #66471
At burden level nine (or through a deadly genetic breakdown), you now
turn into a psyker.
This splits your skull in half and transforms it into a weird fleshy
mass. You become blind, but your skull is perfectly suited for sending
out psychic waves. You get potent psy abilities.
First one is brainwave echolocation, inspired by Gehennites (but not as
laggy).
Secondly, you get the ability of Psychic Walls, which act similarly to
wizard ones, but last shorter, and cause projectiles to ricochet off
them.
Thirdly, you get a projectile boost ability, this temporarily lets you
fire guns twice as fast and gives them homing to the target you clicked.
Lastly, you get the ability of psychic projection. This terrifies the
victim, fucking their screen up and causing them to rapidfire any gun
they have in their general direction (they'll probably miss you)
With most of the abilities being based around guns, a burden level nine
chaplain now gets a new rite, Transmogrify. This lets them turn their
null rod into a 5-shot 18 damage .77 revolver. The revolver possesses a
weaker version of antimagic (protects against mind and unholy spells,
but not wizard/cult ones). It is reloaded by a prayer action (can also
only be performed by a max burdened person).
General Video: https://streamable.com/w3kkrk
Psychic Projection Video: https://streamable.com/4ibu7o

![image](https://user-images.githubusercontent.com/23585223/204150279-a6cf8e2f-c678-476e-b72c-6088cd8b684b.png)

## Why It's Good For The Game
Rewards the burdened chaplain with some pretty cool stuff for going
through hell like losing half his limbs, cause the current psychics dont
cut it as much as probably necessary, adds echolocation which can be
used for neat stuff in the future (bat organs for DNA infuser for
example).

## Changelog
🆑 Fikou, sprites from Halcyon, some old code from Basilman and
Armhulen.
refactor: Honorbound and Burdened mutations are brain traumas now.
add: Psykers. Become a psyker through the path of the burdened, or a
genetic breakdown.
add: Echolocation Component.
/🆑

Co-authored-by: tralezab <spamqetuo2@gmail.com>
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-11-29 20:13:28 +00:00