Commit Graph

8969 Commits

Author SHA1 Message Date
Ghom
12ba9d1dea Icon for the cleanbot cheevo. (#80986) 2024-01-18 22:17:56 -05:00
Kyle Spier-Swenson
8703eac50d split area.contained_turfs up by zlevel, make init 10 seconds faster (#80941)
## About The Pull Request

Situation: areas have a list of all turfs in their area.

Problem: `/area/space` is an area and has a 6 to 7 digit count of turfs
that has to be traversed for every turf we need to remove from it. This
can take multiple byond ticks just to preform this action for a single
space rune

Solution: split the list by zlevel, and only search the right zlevel
list when removing turfs from areas.

replaces `area.get_contained_turfs()` with a few new procs:

* `get_highest_zlevel()` - returns the highest zlevel the area contains
turfs in. useful for use with `get_turfs_by_zlevel`
* `get_turfs_by_zlevel(zlevel)` - returns a list of turfs in the area in
a given zlevel. Useful for code that only cares about a specific zlevel
or changes behavior based on zlevel like lighting init.
* `get_turfs_from_all_zlevels()` - the replacement for
`get_contained_turfs()`, renamed as such so anybody copying/cargo
culting code gets a hint that a zlevel specific version might exist.
Still used in for loops that type checked so byond would do that all at
once
* `get_zlevel_turf_lists()` - returns the area's zlevel lists of lists
but only for non-empty zlevels. very useful for for loops.

The area contents unit test has been rewritten to ensure any improper
data triggers failures or runtimes by not having it use the helpers
above (some of which ensure a list is always returned) and access the
lists directly.
2024-01-18 12:16:12 -05:00
DATAxPUNGED
61affc283c Fixes eye pulling message from cranial fissure. (#80935)
## About The Pull Request

Fixes #80928 by swapping two strings. This also gives a new string for
bystanders when someone STARTS pulling someone's eyes, which felt like
an oversight while testing, but i can revert that last part if it is
deemed too much of a "feature"

- [x] I tested this on a localhost
## Why It's Good For The Game



Bystanders won't think that they're the culprit of terrible eye-pulling
crimes anymore
## Changelog
🆑
fix: Bystanders will no longer think they've pulled out a victim's eyes
after seeing someone else do it.
qol: They will also be able to tell when someone starts pulling out a
victim's eyes.
/🆑
2024-01-17 10:54:14 +01:00
_0Steven
3b368888c3 Fix bugs regarding immobile shells. (#80976)
## About The Pull Request

In `shell.dm`:
When immobile shells were unsecured it would just directly set
`attached_circuit.on` to whatever the shell anchor state was, which
bypassed sending the signal `set_on()` sends. By instead using
`attached_circuit.set_on()` this state change should actually propagate
to the inner modules, rather than say letting an inner module with a
clock run regardless of the shell's anchor state.
Similarly, adding a circuit to an unsecured immobile shell would try to
set `attached_circuit.on` to the shell anchor state, but in addition to
not propagating to inner modules this simply did not work because the
`attached_circuit.set_shell(parent_atom)` called later would set it to
be on anyway. We resolve this by just, moving the state change until
*after* set_shell.
Finally removes the `attached_circuit.on = TRUE` from the
`remove_circuit()` proc, because
`attached_circuit.remove_current_shell()` immediately sets this to false
again anyway.

More related but separate bits probably tomorrow.
## Why It's Good For The Game

Makes immobile shells actually work only when anchored, and resolved
some related jank.
## Changelog
🆑
fix: Immobile shells no longer work regardless of anchor state if you
put the circuit in while it's unanchored.
fix: Immobile shells properly propagate their on/off state after
wrenching to inner modules.
/🆑
2024-01-17 04:46:20 -05:00
Interception&?
9c2df71dc2 New Ore Silo UI (#80975)
![UI](https://github.com/tgstation/tgstation/assets/137328283/8a6f3645-32db-4700-8884-985cf7b3dd40)

## About The Pull Request

Made a new UI for Ore Silo, tweaked `MaterialAccessBar` component a bit
to properly display pop-ups over “wrapped” elements and actually wrap.

## Why It's Good For The Game

Ore Silo is one of the last machines that use browser on TG, we're
almost there!

Also, it helps @JohnFulpWillard to bring
https://hackmd.io/XLt5MoRvRxuhFbwtk4VAUA HackMD document to a closure.

## Changelog
🆑
refactor: Refactored Ore Silo Ui.
/🆑
2024-01-17 04:42:24 -05:00
Ghom
0e3c83ff3a Revert "Makes immerse use weakrefs", prioritizing some ref removal lines instead. (#80707)
## About The Pull Request
For a moment, I had forgot about saying I'd take a look into it, but it
seems the new fix to hard dels is causing some runtimes with empty
weakrefs. Beside, WEAKREF() doesn't work well with qdeleting atoms (so
you'd have to access the weak_reference var directly).
How immersion works is quite confusing even for me who coded it, trying
to work around some of the hefty limitations of the engine truly blows.
I could even ask MrMelbert to make a proc-chain chart for it.

But yeah, long story short, I only have a bare idea where the uncleared
refs would be. I suspect it could be `immersed_movables`. It's totally
possible since the proc can early return in a few cases, thus skipping
the ref removal, hence the title.

## Why It's Good For The Game
I didn't like the PR that implemented weakref usage into the element,
but I let it pass because "hard dels = bad". However, the runtimes
aren't that much more pleasant either.

## Changelog
N/A
2024-01-17 04:38:13 -05:00
Ghom
aa9caef0ed Fishing hook and reel line tweaks (also qol for the fish bounties) (#80599)
## About The Pull Request
This PR includes a series of small changes and additions to hooks and
reel lines, as well as the aforementioned bounties. My objective here is
to make the (base) hook and reel line feel more useful. Ditto with a few
other things.

Here's the list of changes:
- Almost all fishing rods come with a hook and reel line pre-installed.
The rod from the fishing toolbox comes with separate hook and reel line.
- Without a hook, you cannot fish. Without a reel line, the cast range
is reduced (from 5 to 3).
- Fishing with a reel line installed provides a mild boon to completion
speed by default.
- The sinewy reel line (craftable from lavaland mobs) can now be used to
fish on lava / liquid plasma, but it's a bit stiff and gives a mild
malus to completion speed.
- Unlike other hooks, the rescue and jawed hooks now allow you to cast a
line and reel in living mobs too, not only items. They even get a status
alert they can click to un-snag themselves, or move away far enough to
achieve the same effect.
- Master fishing rod buffed. It now comes with a flexible reel line and
weighted hook pre-installed, and can be cast further than other rods.
- On top of that, the jawed hook will slow down living mobs snagged by
it and is a bit harder to remove.
- when casting a line, it will now show the icon of the current hook as
projectile, not a generic one.
- Reeling now correctly checks movement resistance and anchorage.
- Reeling an object (or a mob) now plays a sound. Ditto for
installing/removing slotted items.
- A few balloon alert feedbacks.
- Minor code improvements.
- The jawed hook should look a smidge sharper.
- reel lines are now small items.

## Why It's Good For The Game
The base hook and reel line didn't do anything begin with, and you would
do just fine without them. In the end it's just a bit unintuitive for
them not to be a requirement.

Beside that, it makes sense for the rescue hook to be able to snag mobs,
so they may as well be used to drag people out of lava or liquid plasma.
As for the jawed hook, it always felt to me a bit underwhelming and a
bit of a filler I had cooked up on the moment. It really could have some
'tactical' utility in virtue of being one of those niche black market
items.

## Changelog

🆑
add: Most fishing rods come with a hook and line preinstalled. Fishing
toolboxes come with separate reel and lines as usual.
balance: Fishing hooks are now required to fish.
balance: Without a reel line, the range of fishing rods is reduced by
two tiles. Conversely, having one installed gives a mild buff to the
minigame completion speed.
balance: The craftable sinewy reel line can now be used to fish on lava
or liquid plasma, but it's a bit harder to use.
balance: The rare-to-find-in-maintenance master fishing rod now comes
with a flexible line and weighted hook preinstalled, and has better
range than other rods.
balance: Fishing reel lines are now small enough to fit pockets.
add: The rescue and jawed hook can now snag and reel in mobs, not only
items. The jawed hook also slows down when applied, a la beartrap.
qol: Fish bounties now accept filled (stasis) fish cases.
qol: Several balloon alerts for fishing rod interactions.
fix: Reeling in items (and mobs) now respects movement resistance and
anchorage.
fix: Fixed the fishing rod equipment UI being too small to fit its
components.
sound: Reeling in something now plays a sound.
/🆑
2024-01-17 04:37:52 -05:00
John Willard
27f85f1c76 Ice cream vat uses a radial menu (#80965)
## About The Pull Request

Removes the ice cream vat's html window for ice cream, reagents, and
cones and replaces it with a radial menu and the ability to simply
examine the machine to see its contents.
Soup and Salads currently allow you to see whats inside without the need
for science/bar goggles, so following that theme I thought it would make
more sense for it to also be the case here (and for feature parity with
previous behavior).

#### Controls

Left-click chooses ice cream flavor or ice cream cone
Right-click swaps between which one you will be choosing from

Left click with a beaker will put it inside to use for custom
ingredients
Right click with a beaker will transfer its reagents to the machine (any
that is used for making ice cream)

Dispensing custom ice cream takes from the beaker inside of the beaker

Video demonstration

https://github.com/tgstation/tgstation/assets/53777086/9ebdcb13-b29f-4b3c-9d5f-54be1f6da888

Custom Ice cream

https://github.com/tgstation/tgstation/assets/53777086/687af270-14e4-4851-bf1f-3c4da4aeb21f

## Why It's Good For The Game

The ice cream machine is genuinely confusing because of it's UI and
personally it was unironically the last kitchen tool I learned because I
just didn't think it was worth it. This makes it feel way better to use.
It also helps me with https://hackmd.io/XLt5MoRvRxuhFbwtk4VAUA which
I've been trying to chisel away at.

## Changelog

🆑
refactor: Ice cream vats now use a radial menu instead of an HTML one.
/🆑
2024-01-17 03:30:10 +01:00
Ghom
68677dc721 Disarm refactor, plus shoving people with shields (#80123)
## About The Pull Request
I wanted to add the ability to shove people with shields by
right-clicking your target, just like how it works barehanded.

This also required a solid refactor of disarm code, effectively bringing
down the core of it to `mob/living` from `mob/living/carbon` or
`mob/living/carbon/human`. This also means you can shove simple mobs
inside closets, bins and on tables.

Xenos and borgs are pretty much immune to regular disarms, but using a
shield will work (borgs and royal xenos are immune to the knockdown).

The riot shield armor has been balanced. It now tanks melee attacks
pretty well, but will break against bullets in just about 2 to 4 hits
depending on the bullet damage. I've always found the lack of sturdiness
of the riot shields for what they're supposed to be good for a bit
detrimental.

Because I've refactored an item flag into a trait, I've had to add a new
MOD module that grants protection from shove knockdown and staggering;
found pre-installed in the administrative MODsuit, but I've also added
it to the black market to make it cooler.

You can bash people with the strobe shield on combat mode.

## Why It's Good For The Game
Currently, shields are simply items that take a held slot in return of
some block chance without being anything special, save for the strobe
shield's integrated flash I guess, but are also a botherance as most
crumple under the duress of less than half a dozen attacks. Meanwhile
swords and other weapons with blok chance just don't care.
TL;DR, I want them a bit more remarkable, and flexible as a tool.

Of course, this ended up in a larger refactor because the right-click /
disarm code was inconsistent.

## Changelog

🆑
add: Shields (and pillows) can be used to shove people around the same
way barehanded right-clicking does. Xenos and borgs can actually be
moved this way.
add: Added a new MODsuit module, the bulwark module, which prevents
knockdown and staggering from shoving, and getting pushed away by thrown
objects. Inbuilt for the safeguard MODsuit, but one might also it in the
black market.
refactor: Disarming has been refactored. You can now shove simple
critters onto tables and into bins and closets
balance: Shields now take their own armor values and the armor
penetration of the attack they blocked when damaged. This means shields
are a bit sturdier now.
balance: Riot shields can tank a lot more damage against melee weapons,
but less against bullets.
qol: strobe shields can now be used to bash people while combat mode is
on.
/🆑
2024-01-16 19:35:56 -06:00
Bloop
fc0a1f4068 Removes timeout_mod arg from add_mood_effect (#80964)
## About The Pull Request

Partial Revert of https://github.com/tgstation/tgstation/pull/80800

Assuming every num passed in the parameters of `add_mood_effect` is a
`timeout_mod` is incorrect, because there can be mood events that take a
numeric arg which is not meant to be multiplied against the timeout.

This leads to the same issue as multiplying it with strings essentially
(in one case, shown below, this results in a negative duration of a
timer).


![image](https://github.com/tgstation/tgstation/assets/13398309/f8af858f-04ef-4144-9a0b-2fae60b71272)


![Code_ZN176cpMqA](https://github.com/tgstation/tgstation/assets/13398309/a6ec7689-0171-4909-91cb-a17b56454eb6)

Plus having a keyword arg that may or may not actually be what the
keyword arg claims to be is really confusing and bad.

Instead here's what I propose: passing in an instantiated mood datum
itself, which has been modified, and copying the timeout from it before
discarding it.

It is not as clean as I'd prefer either, but at least it's logically
sound and the intent is clear, and it's the best I can think of short of
a major refactor of the entire system for this one small thing which is
only being used by food quality.


![image](https://github.com/tgstation/tgstation/assets/13398309/8560c066-bb0b-4066-af94-372d5ea62679)

## Why It's Good For The Game

Clearer, less smelly code.

## Changelog

🆑
code: removed the timeout_mod arg from add_mood_event, which was only
used for one thing and causes more issues than it's worth
/🆑
2024-01-16 20:57:42 +01:00
LemonInTheDark
a3bb400816 Optimizes Reftracking (Bigly) (Plus harddel fixes) (#80443)
## About The Pull Request

### Reftracking BS

Alllright so reftracking is slow, really really slow.
That's a problem for me, both because I want it to be fast so I can more
efficiently torture players by running it on live, but also because it
impedes both local and CI runs.

So I've set out to micro optimize the DoSearchVar proc, one of the
hottest in the game.
I've done this in a few different ways.

#### The simple shit

Removing redundant proc args
Yeeting assoc arg setting (extra cost)
Moving if statements around to prioritize the more common case
Ignoring empty lists.

#### The not simple shit

Throwing our snowflake list checking into the sun
(Background, byond has some special lists that cannot be accessed like
an assoc list, trying to will lead to runtimes)
The way we handle this involves inspecting their ref string, and it eats
a LOT of time.

Faster then to mark all the lists we know are special by var name, and
then use try/catch to detect and silence anything that sneaks through
(this is on the order of like 1/3 per run, kinda curious what they are
tbh)
Thanks to MSO for the idea for this btw.

Removes the vars and logic that tied ref searching to clients. 
It's not how this code is used, and it slows everything else down for
really no reason

Added support for handing in a known "hanging reference" count, and then
searching for that.
This lets us early exit the ref search if we find everything we were
looking for, which is REALLY powerful, and why I asked for refcount() in
the first place.

### Harddel Fixes

[Fixes some harddels w gulag stuff born of the 515 one way ref
issues](046d7daa03)

[Ensures proximity cameras clean their ref to their proximity datum if
it's
deleted](ff607e9ccb)

[Deleting a pipe connected via the gas_machine_connector datum to a
machine should also delete that machine (harddel
fix)](9eecca22e7)
## Why It's Good For The Game

All this combined speeds up refsearching massively, on the order of
hundreds of seconds, and makes it far less time consuming for both CI
and running on live.
I'll be bullying some servers semi soon, want to see what I can cut out.
2024-01-16 02:17:03 +01:00
Time-Green
95b14d05d6 [NO-GBP] Fixes radshelter not radprotecting against nebula storm (#80957)
🆑
fix: Radiation shelters (wherever they are) will protect against nebula
storms
/🆑

Oversight when I originally added the nebula. Didn't realize these were
a thing
2024-01-15 22:05:06 +01:00
Zephyr
13d2dceb31 Minor Autolathe Refactor | Material Dupe-B-Gone (#80839)
## About The Pull Request

Refactors underlying autolathe code, mostly about how it prints items
Items are now printed sequentially
Items now have their custom materials set to the the materials actually
used to create them
Items are now printed based on their design construction time instead of
a default 3.2 seconds per item always
Closes https://github.com/tgstation/tgstation/issues/80755

## Changelog
🆑
fix: Autolathes no longer allow you to duplicate materials at higher
levels of stock parts
qol: Autolathes now show name instead of typepath when selecting a
custom material
qol: Autolathe now print out items one by one instead of waiting for all
of them to print at once
/🆑
2024-01-15 13:35:02 -05:00
Hatterhat
27386bffe8 fixes a bunch of moodlets potentially lasting forever (less band-aidy) (#80800)
## About The Pull Request
In a previous PR (https://github.com/tgstation/tgstation/pull/79661), I
noted that a lot of moodlets tended to have their timeouts break because
it was passing their names and whatnot as a parameter, that gets fed
into the timeout modifier parameter, causing the timeout multiplier to
break, because BYOND type-agnosticism means that it can multiply a
number (timeout_mod) by text (a name or some other object), resulting in
0 - which makes a moodlet permanent. This is probably not intended.

This fixes that in two ways:
- Adding a `1` to potentially applicable moodlets (searched for with a
regex of `.add_mood_event(.*, .*,)`) just to make sure the timeout
doesn't get multiplied out weirdly.
- Making the add_mood_event thing CRASH() if the timeout_mod is bad.

If someone else wants to come up with a solution better than this,
please do.

## Why It's Good For The Game
Maybe having your arm permanently fall asleep after getting it
reattached sucks, moodlet-wise. (Being stuck with permanent
positive/negative moodlets is probably not intended.)

## Changelog

🆑
fix: Moodlets with parameters/effects e.g. limb reattachment moodlets
should probably disappear more appropriately.
/🆑

---------

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
2024-01-15 07:08:01 +01:00
san7890
0d91d0365e Better errors for adding element to qdeling datum (#80927)
## About The Pull Request

Got this from reading #80915

The actual name of the element is not reported anywhere in the stack
trace, and while you might be able to figure it out from context clues
based on the procs invoked in the stack trace... this isn't guaranteed
and just makes it harder to diagnose these weird sporadic runtimes.
## Why It's Good For The Game

easier to figure out a problem when you have as much useful information
as possible
## Changelog
irrelevant
2024-01-15 05:07:26 +01:00
Rhials
5970b6722b Makes lizard wine (and some other crafting menu drink recipe drinks) produce their intended reagents (#80874)
## About The Pull Request

Crafting recipes now have an arg that decides if crafting results will
retain their starting reagents, or have ingredient reagents transferred
into them.

So, previously, crafting a specialty drink (lizard wine, candycorn
liquor) from the crafting menu would immediately empty the new bottle's
reagents and replace it with the ethanol used in the recipe.

Now, recipes can be prevented from modifying their result's reagents by
setting unique_reagents to TRUE (False by default. I don't know what
recipes really use this functionality but I wanted to preserve it for
everything but the drink recipes it interferes with.)

Bonus: This changelog entry I found from 3 years ago, apparently fixing
this same issue.


![image](https://github.com/tgstation/tgstation/assets/28870487/55d8f9d7-e3d7-41db-ace3-78156ffa3778)
## Why It's Good For The Game

Closes #80870. 

Makes some more reagents accessible again.
## Changelog
🆑 Rhials
fix: Specialty drinks crafted in the crafting menu will now create the
intended reagents, instead of containing the reagents used to craft it.
/🆑
2024-01-12 04:40:48 +01:00
Paxilmaniac
c287e627a8 Fixes the deployable component rotating things it isnt supposed to (#80877)
## About The Pull Request

Actually moves the rotation part of the code under the check for if the
component is supposed to rotate things
## Why It's Good For The Game

Despite setting the variable for rotating stuff to no, the component
would still rotate stuff, this is bad
## Changelog
🆑
fix: The deployable component will now actually stop rotating things
when the variable to not do that is set
/🆑
2024-01-12 02:58:31 +01:00
MrMelbert
8734b5def8 Fixed runtime from unowned cooldown actions (carp rift) (#80895)
## About The Pull Request

This might not be the most correct fix but it *makes sense*. 

Some actions can not have an owner if it is unowned, so this check would
runtime.


![image](https://github.com/tgstation/tgstation/assets/51863163/b4787b7f-f481-4601-bdb1-ad001e0fea2a)

I assume carp rift is unowned in some places?
2024-01-11 16:22:32 -05:00
MrMelbert
2d74ac7e3e Fix supermatter component runtime on non-supermatters (#80894)
## About The Pull Request

Used the wrong var for this istype check.
2024-01-11 16:20:01 -05:00
MrMelbert
f86fcfde0e Fixes improper use of audible_message (#80897)
## About The Pull Request

`audible_message` kinda expects a message to show to other people, if
you don't give it that it runtimes. Just use show message instead.
2024-01-11 16:18:55 -05:00
Bloop
568c5119b3 Runechat color now goes by voice rather than name (#80812)
## About The Pull Request

What it says on the tin. The color you get from runechat is currently
tied to your `name`, which doesn't accurately reflect how your character
is speaking in all cases.

What this change means: now things like voice changer masks, changeling
mimicry, and voice change disease will now actually change the color of
your voice to match the mob you are speaking in the voice of.

As a result it should now be impossible to figure out whether someone is
voice changing from looking at their runechat color and knowing what the
real mob's color was.

## Why It's Good For The Game

Just feels like an oversight that it didn't do this in the first place.

## Changelog
🆑
fix: if your voice changes (e.g. through a voice changer or changeling
mimicry) your runechat will now appear as the mob you are speaking in
the voice of
fix: when doing emotes with your face obscured, your runechat color will
now appear as either that of Unknown or the mob you are wearing the id
of (if you are wearing a mask with someone else's id)
/🆑
2024-01-10 10:29:16 -08:00
MrMelbert
7b8a95cf00 Fixes some AI related runtimes (#80828)
## About The Pull Request

Namely this. 


![image](https://github.com/tgstation/tgstation/assets/51863163/c6171a4e-afd3-4c07-8a96-1952ef76a3df)

## Changelog

🆑 Melbert
fix: Carps now migrate slightly better, probably. 
fix: And Poly now talks better, probably. 
/🆑
2024-01-09 14:06:16 -05:00
DrTuxedo
9f05a79b70 Sec Biosuit craft, more bio-emergency supplies (#80622)
## About The Pull Request

Makes Security bio suit and bio hood craftable using a normal bio
suit/hood and helmet/armour vest.

Adds a box of sterile masks and latex gloves to the bio-emergency crate
from Cargo.

## Why It's Good For The Game

Security bio suit is the only one with different armour values, yet
there is only one for the entire Security department.
By giving them the ability to craft them we give more Security Officers
protection from disease without losing their red colour and armour
(which is worse in bio suits than on their armour vests). This makes
Security more likely to care about roleplaying during outbreaks, like
enforcing quarantines.
This isn't creating any new bio-suits, as to craft a Security bio-suit
you need to acquire a normal bio-suit and some spare armour.

Adding a box of sterile masks and latex gloves to the emergency
bio-emergency crate makes it more useful. There is only 1 box of sterile
gloves and 1 box of latex gloves on all of the stations at medbay at the
moment. This way they can get more sterile masks and latex gloves to
protect themselves from diseases, which is cool to see players caring
about not getting infected and being in fear.
2024-01-07 01:04:17 -06:00
Mothblocks
a140505346 Replace natural beheading with cranial fissures (splitting your skull) (#80703)
## About The Pull Request

Replaces natural beheading (doing a lot of damage to the head) with
cranial fissures, which split your skull in half.


![dreamseeker_2023-12-31T19-38-16](https://github.com/tgstation/tgstation/assets/35135081/f84dc479-6156-45b7-bb23-4e4ec7378f6b)

While you have this wound, your eyes can be pulled out of your head with
bare hands, and slipping will spill your brain out of your head.

Removes beheading objective from traitor.

Zombies can be beheaded all the same.

Any other way of beheading, such as surgery or amputation shears, is
still possible.

Closes #80439 

## Why It's Good For The Game

I've enjoyed seeing the results of the test merge to remove natural
beheading. At 947 beheadings in a week, 1 in every 7 deaths resulted in
a beheading. This makes it significantly easier to remove people from
rounds as the brain is generally critical to actually reviving someone.
While round removal is fine, it should be something that is
intentionally performed with enough effort. Mass round removals ought to
require a significant amount of effort. There are plenty of ways to
round remove someone, but it ought not be an incidental choice.

The effects of beheading removal have shown some interesting anecdotal
highlights (nothing here is backed up with stats, so take it with a
grain of salt):
1. As a whole, people did not really replace it with anything. The
biggest alternative has been lighting people on fire, but this has not
been done at a significant enough scale at all to be a noteworthy
problem, and is still fixable with enough effort.
2. Cult and rev rounds have played out far more interestingly. In one
round I was adminning a head of staff who intended to behead every
revolutionary they saw, but because they didn't, the back and forth
continues. I've also had opportunities to revive head revs that I am
skeptical would've been available to me otherwise.

Complete removal of beheading was not chosen as it does not feel right
for a repeated fire axe to the head to do basically nothing. The current
implementation is intended to be something that is just not useful
enough to do on everyone you see, but is still appreciably an effect.

## Changelog
🆑
balance: Instead of too much damage to the head beheading someone, it
will now split their skull in half. While their skull is open, you can
rip out their eyes with your hands. and they will spill their brain out
of their head if they slip.
balance: The Path of Blades ascension will accept either a beheaded
person, or someone with their skull split open.
del: Removed the beheading objectives from traitor.
/🆑
2024-01-06 13:09:53 +01: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
necromanceranne
8e75c930c1 Fixes every instance of 'kenetic' in the codebase (#80782)
## About The Pull Request

There were several instances of this being misspelled as 'kenetic'
rather than kinetic. This fixes that.

## Why It's Good For The Game

oughe

## Changelog
🆑
spellcheck: Corrects every misspelled 'kenetic' in the codebase.
/🆑
2024-01-05 17:55:09 +00:00
Bloop
4007cf7a65 Fixes some image hard dels, and adds context to qdeleting images. (#80736)
## About The Pull Request

(see https://github.com/NovaSector/NovaSector/pull/250 , credit to
capsaicinz for tracking these!).

Upstreaming the fixes for some bot hard dels likely brought up by a
recent PR.

There are a lot of them because it is qdeleting a whole list of them at
a time.

Example log:


![image](https://github.com/tgstation/tgstation/assets/13398309/defe698c-7526-4b95-b49a-5cfee32a97c2)

[link to
log](https://tgstation13.org/parsed-logs/sybil/data/logs/2024/01/01/round-221465/qdel.txt)

---

I have also included some context that I have been using to help track
image qdels locally, it might be something you want here. If not I can
just revert that part.

## Why It's Good For The Game

Should help a ton with lag spikes.

## Changelog

🆑
fix: fixes an image hard del
code: adds context to image hard dels to make them easier to track
/🆑
2024-01-05 01:53:37 +01:00
Ghom
a59cebea56 Increased odds of station traits a little. Introduced a "budget", so smaller traits only take half as much space. (#80211)
## About The Pull Request
Recently, I chatted with others about how few station traits are rolled
on a round by round basis - about 59% of the shifts go without either
positive or negative traits for example - and how the mild most of these
traits are (not a bad thing per se), which results in an underwhelming
feature, despite the more interesting bits of it. So, after sharing
opinions, I've decided to make this PR to increase the rolls and odds a
bit.

EDIT: After reading comments and taking some time to think this
thoroughfully, I've decided to push the probabilities back a little in
favor of a simple budget system for station traits, to allow for smaller
things to only count as half a station trait. This mean smaller traits
won't necessarily stop "better" ones from rolling, or at least allow for
plentier permutations of traits that do not affect the round TOO much.
I've also reduced the weight of the glitched pda beeps trait from 15 to
10, the same of scarves, wallets and colored assistant jumpsuits.

## Why It's Good For The Game

I believe the current odds of station traits to be a smidge low, and
that the lack of any sort of cost-budget for station traits to hurt the
rarer, more interesting traits (and the feature in general) if the more
common, milder ones take just as much space. It's totally within the
spirit of the feature to have small, niche traits, though they can get
quite boring pretty fast on their own, so what I'm saying is that their
cost should stay low so that other traits can roll.

## Changelog

🆑
refactor: Introduced a simple budget system to station traits, so that
smaller things only count as half a trait, for example.
balance: Increased the odds and maximum number of station traits that
can be rolled each shift.
/🆑
2024-01-04 16:53:09 +01:00
Bloop
94f76f9152 Stops qdeleting progressbar /images (#80734)
## About The Pull Request

What it says on the tin. These are getting qdeleted A LOT...
LemonInTheDark we don't need to be doing this I don't think?

## Why It's Good For The Game

Saves a bit on overhead of a very commonly qdeleted item that doesn't
need to be.

## Changelog

🆑
code: progressbars no longer qdel their /image
/🆑
2024-01-04 01:52:59 +01:00
Ghom
f3108f99be Dead code removal, redundant text macros, drying rack now applies TRAIT_FOOD_CHEF_MADE. (#80677)
I've been coding a PR these couple days, and I've noticed a few
oversights, all related to food, while working on it.

This PR removes an unused, 12 years old datum, and some redundant text
macros in a text string, for processable items, that already uses the
bold spans. It also makes it so food made with a drying rack gets the
chef made trait, similarly to other methods (though not as foolproof).
2024-01-04 00:10:36 +00:00
Ghom
81a668a727 Changes the scope component to be appliable to other items and not just guns. Binocs and the Curator's mothic cap use it. (#80445)
I've done some changes to the scope component so that it can be applied
to items other than guns.

Binoculars now use it instead of changing the player view size, and lets
them move around while the zoom is on at the cost of a moderate
slowdown. This is both more comfortable, cooler and less laggier than
the previous method. Take in mind it still takes both hands to use
binoculars, so there's no much room for exploitation anyway.

This PR also makes the mothic softcap from the curator kit special: it
too has the scope component, albeit of a much shorter range, because
it's probably the least interesting kit of them all right now and has
nothing that the curator cannot get by walking in the aux base
construction room, except for a pair of pockets in the mothic coat,
though that's superseeded by the Trailwarden kit's saddlepack. It's
pretty fitting if you ask since the softcap has some goofy-looking
googles drawn on it.

Oh, items that aren't guns also have a different mouse tracker icon of
two circles joined together, instead of a reticle.
2024-01-02 17:36:49 +00:00
_0Steven
99fcc070ee Fixes crashing through tables from a table giving you a negative offset (#80701)
## About The Pull Request

While failing to reproduce #80675, given no amount of slamming this poor
little moth creature through glass tables in any order and then
rebuilding it under them seemed to be doing anything, I found that it
_does_ cause a negative offset if the moth-to-be-slammed in question was
already on a table before being slammed into a glass table. (Don't worry
they have health insurance.)

After some debugging, this seemed to be because `Detach()` is called for
the new turf with the smashed table _before_ `on_exited()` is called for
the previous turf, causing it to first reduce one's offset by 12, and
then reduce it by 12 _again_ upon calling `on_exited()`. This seemed to
be true for whichever method was used, whether walking, dragging, or
being smashed.

![image](https://github.com/tgstation/tgstation/assets/42909981/3782776f-7153-4235-b377-8f8bd8904110)
So I introduced the same check for `TRAIT_ON_ELEVATED_SURFACE` that
`Detach()` has to `on_exited()`, making it only attempt to shift down
the movable if it still has the trait, and this seems to fix it fine!
It doesn't seem to cause issues with moving from beds onto tables or
tables onto beds, or smashing through glass tables from tables or beds.
So this should fix #80675, or at least I can't find what they would've
meant if not this.

And yes I did test this on Tramstation just in case.

![image](https://github.com/tgstation/tgstation/assets/42909981/e3d8e755-c288-4ed7-93cb-8948c6012c56)
## Why It's Good For The Game

Fixes #80675.
## Changelog
🆑
fix: slamming through a glass table while previously on a table no
longer gives you a negative offset.
/🆑
2024-01-01 21:38:20 +01:00
SyncIt21
926d000d76 Some Processing improvements (#80693)
## About The Pull Request
Got the idea from #80682. A lot of parent procs don't do anything, some
are just formatted in a bad way, and others early return and do no ops,
it's bad in general but this should give us a head start.

Some good overhead saved here
2024-01-01 20:58:34 +01:00
Mothblocks
66cf861989 Fix footsteps not working (#80704)
## About The Pull Request
Fixes #80686.

Somehow, these statics were not being initialized after the GLOBs. I
don't know how that changed. Makes them local references because they're
still used 3 times in the hot path.
🆑
fix: Fixed footstep sounds.
/🆑
2024-01-01 18:01:11 +01:00
Rex9001
f88da4bcb9 Heretic DLC: Path of Moon (#79536)
## About The Pull Request
This pull request adds a new path.
The cross path is between ash and lock.

Credit to Fury McFlurry for the following sprites:
 ring_leader_effect

The path goes as follows:
 Moonlight Troupe
 Grasp of Lunacy
 Smile of the moon
 > Sidepaths:
    Mind Gate
    Ashen Eyes
 
 Mark of Moon
 Ritual of Knowledge
 Lunar Parade
 Moonlight Amulette
 > Sidepaths:
   Curse of Paralasys
   Unfathomable Curio
   Unsealed Arts
 
Moonlight blade
Ringleaders Rise
> Sidepaths:
   Ashen Ritual
 
 Last Act


Moonlight Troupe:
The first knowledge of path of moon, lets you make Lunar Blades with 2
iron and a knife

Grasp of Lunacy:
The grasp of this path hides your name for 15 seconds after use, but
more importantly it causes the person hit with the grasp
 to hallucinate everyone as indistinct human like figures.

Smile of the Moon:
A pointed spell that causes temporary blinding, muting, deafening and
confusing on the person its targeted at, these effects
 last longer the less sanity your victim has.

https://github.com/tgstation/tgstation/assets/120136161/db7cfaaa-8fe2-4f20-aa78-c17c17be4d63

Mindgate:
Lock-Moon. This spell causes you and your victim brain damage, the
victim also suffers a short amount of hallucinations
 and also 20 oxyloss.

https://github.com/tgstation/tgstation/assets/120136161/11d15acd-11d0-4e7d-a180-6481b18e9fd9

Mark of Moon:
When applied this paths mark pacifies the victim and they remain
pacifist until attacked or until the mark is detonated, when
 detonated the victim is left confused.

https://github.com/tgstation/tgstation/assets/120136161/41e601b5-76d4-4765-8b49-ada7de09feb7

Lunar Parade:
A spell that sends out a projectile that causes people hit by it to
follow the projectile whilst being unable to move. The
projectile also bounces around and is really useful to get people off
your back during chases.

https://github.com/tgstation/tgstation/assets/120136161/cddc8390-e8aa-4d68-b1a5-ab181e941a9b

Unfathomable Curio:
Transmute 3 rods, a brain and a belt into an Unfathomable Curio a belt
that can hold blades and items for rituals. Whilst worn
will also veil the heretic, allowing them to take 1 hit without
suffering damage, this veil will recharge quickly outside of
combat. If examined the examiner suffers brain damage and temporary
brain damage, and if a non-heretic uses it once the shield is damaged
the non-heretic user suffers massive brain damage and a permanent
uncurbable brain trauma. Lock-moon

Unsealed Arts:
Allows you to transmute a canvas and an additional item to create a
piece of art, these paintings have different effects depending on the
additional item added. Lock-moon
Possible paintings: 
    The sister and He Who Wept: 
    Additional atoms: Eyes. 
When a non-heretic looks at the painting they will begin to hallucinate
everyone as heretics.

   The First Desire: 
   Additional atoms: Any bodypart.
Increases the hunger of non-heretics, when examined drops an organ or
body part at the painting.

   Great chaparral over rolling hills: 
   Additional atoms: Any grown food. 
Spreads kudzu when placed, when examined grants a flower to the heretic.
			
   Lady out of gates: 
   Additional atoms: Gloves.
Causes non-heretics to scratch themselves until they remove their
jumpsuit, when examined removes all your mutations.
   
    Climb over the rusted mountain: 
    Additional atoms: Trash. 
Causes non-heretics to rust the floor they walk on and when examined
gives you a cool moodlet

These effects are mitigated for a few minutes when a non-heretic
suffering an effect examines the painting that caused the
effect. Except for great chapparal which spawns kudzu at their feet, and
Lady out of gates which gives them a random negative mutation.

https://github.com/tgstation/tgstation/assets/120136161/1d1bdd2f-cda5-4430-b3af-4742f98a59a8

https://github.com/tgstation/tgstation/assets/120136161/4e843ae4-9786-4e9b-8681-582713f4c789

Moonlight Amulette:
Allows the heretic to transmute 2 sheets of glass, a pair of eyes, a
brain and a tie. If the amulette is used on someone with low
sanity they go berserk attacking everyone if their sanity isnt low
enough it decreases their mood. Optionally you can add a
 poppy in the ritual to further decrease their mood on hit.

https://github.com/tgstation/tgstation/assets/120136161/ab820b3f-e7e6-407a-9a1a-93d49c0d7387

Moonlight Blade:
Causes the heretics blades to do brain and sanity damage whilst causing
hallucinations. The blades also cause giggling and
 laughter on hit. 

Ringleaders Rise:
An AoE spell that deals more brain damage the lower the sanity of the
victim, also causes hallucinations that last longer the
lower the sanity of the victim. If the victims sanity is low enoughit
causes them to go insane, the spell then halves their sanity.
This spell is on a longer cooldown and is more meant to be used as a
payoff or an instigator for a fight. The AoE area is 7 tiles

https://github.com/tgstation/tgstation/assets/120136161/4de85ba2-448a-485c-b739-77fcce86c0cb

Last Act:
The ascension lowers the cooldown of all the heretics spells by 33% and
increases the AoE range of Ringleaders Rise. The main
effect of this ascension is a passive sanity drain and hallucination
aura, if you have low sanity in the aura you will start to suffer
brain damage and if you reach the bottom you gain an aura of
hallucinations thus spreading the moon heretics influence
further. Not only that but roughly 1/5th of the crew will rise in
support of you becoming mini-heretics called acolytes that will attempt
to obey your commands!

I had videos showing off everything but they were too big for github
sadly so I will have to think of some other way to showcase all this
stuff.

This pr also adds a new optional atoms system which means that you can
have rituals that can be improved by adding additional atoms, like for
example moonlight amulette.
 
Feel free to give some suggestions for further ascension effects.
## Why It's Good For The Game

I feel like heretic is really missing a playstyle around insanity and
this slots neatly in to feel that gap. For being an eldritch antag of
horrors there is surprisingly little interaction with the sanity system
and I feel like this makes up for it, heretic is also missing some
distractions which is where the paintings can really shine and the
hallucinations which breed paranoia.

## Changelog
🆑
add: A new heretic path opens up! Gaze up at the great sky for the path
of the moon opens and the lie shall be slain in pursuit of ultimate
truth!
fix: Fixes the syndicate delusion not working
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-01-01 15:03:03 +01:00
Time-Green
402f58aa10 Geared Assistants Station Trait (#80323)
## About The Pull Request
Adds a new rare positive station trait! It gives assistants some sort of
loadout, either gimmicky or to serve the station.
Below are a few I added:

![image](https://github.com/tgstation/tgstation/assets/7501474/aae59c27-8fc4-47d2-ab71-46cf4e3c2207)

<details>
  <summary>All loadouts</summary>
uhhhh im lazy, just check code. Feel free to suggest more as well to
help push away critiques
  
</details>

## Why It's Good For The Game
I think it's a fun flavor to add to station traits. The gamiest trait is
the handyman loadout that starts with a toolbelt, most are just to
support the station or to be flavorful. Bee assistant with a bee coupon,
to inspire bee shenanigans; lightbringer assistant that starts with a
lightreplacer and a lantern; mop assistant that starts with a mop
bucket; etc.

Worst case scenario the floor is a little more littered, best case
scenario is some assistants start fulfilling their purpose. When you
spawn with a mop, everything looks dirty.

We also don't have many positive station traits that don't just add 1
extra cola can to the soda vendor in escape, so something more tangible
could be fun.

## Changelog
🆑
add: Adds a geared assistant station trait! Spawn with a skateboard,
toolbelt or in your favorite bee suit!
code: Moves assistant code around
/🆑
2023-12-31 17:34:04 +01:00
Ben10Omintrix
4476689439 hygeienbots basic bots (#80435)
## About The Pull Request
turns hygenic bots into basic bots. also now PAIs and people can play as
hygeinebots. and they can wear hats

## Why It's Good For The Game
transforms hyginebots into basic bots. their old AI used to handle all
the logic. i moved some of the logic to the mob itself so players can
also clean (or burn) things. also this pr will add pathing limits to
bots, in the case the jps movement thinks it can reach something, but
actually cant, in which case the bot will give up the chase

## Changelog
🆑
refactor: hygeinebots are now basic bots. please report all the bugs
fix: fixes hygenebots not being able to patrol
add: hygeinebots can now be controlled by Players
/🆑
2023-12-30 20:24:36 -08:00
Ghom
52b0e27352 Fixing the transhumanist quirk. (#80603)
## About The Pull Request
Apparently `get_bodypart_score` was being called on simple/basic mobs
too.

## Why It's Good For The Game
I've seen a few runtimes about it on Terry.

## Changelog

🆑
fix: The transhumanist quirk now should work as intended.
/🆑
2023-12-30 19:49:27 +01:00
Bloop
f34174414d Cleans up some extra args in Destroy() (#80642)
## About The Pull Request

After https://github.com/tgstation/tgstation/pull/80628, these shouldn't
be needed anymore right?

## Why It's Good For The Game

Cleans up some vestigial code

## Changelog
EDIT: Not player-facing.
2023-12-30 03:54:07 +01:00
13spacemen
6c64f0d15e [NO GBP] Poll Alerts cleanup (#80572)
~Hopefully the candidates number and signed up overlay should show up
for everyone now and be more responsive~

Ghommie tackled most of it in
https://github.com/tgstation/tgstation/pull/80610

I think the candidate number overlay updating is done incorrectly in his
PR though.
Candidate number overlay should be updated for ALL candidates' poll
alert buttons, whenever ANY candidate enters/leaves the poll
2023-12-29 14:46:13 -06:00
Ghom
4b3c8f4bcb Fixing the constant poll alert runtimes, and the selector outline not being updated. (#80610) 2023-12-28 15:21:19 -08: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
Diamond_
37cd61c0fa Fixes AI behavior with breaking cuffs and resisting aggressive grabs (#80328)
## About The Pull Request

Makes it so that ai's recognize they're in a do_after after resisting,
preventing them from processing and interrupting the do_after while
they're in a condition that necessitates it. If it gets interrupted then
they'll process as normal, or if they finish they'll be free.
## Why It's Good For The Game

Monkeys can now resist things that they should've been, such as
aggressive grabs or cuffs, instead of having their ai completely freeze
when they're cuffed.
## Changelog
🆑
fix: ai can now tell if it is in a do_after for resisting and will not
interrupt it. monkeys also now don't freeze up when aggressively grabbed
and will resist out of those and cuffs.
/🆑
2023-12-28 15:43:19 +01:00
Mothblocks
36956cf59d Add system for safely manipulating JSON databases and apply it to photo albums and photo frames (#80519)
We frequently have issues with data loss in our long storage .json files
for various reasons, such as the file being completely blanked out on
write etc.

This introduces a system that tries to safely handle that by saving the
known working json file into a backup that will be loaded in the case a
write fails.

This system queues updates in order to send through to the next tick.
This is an improvement over the existing implementation of photo albums
and photo frames (I think all persistence, even) which do not save until
the end of a properly rebooted round, but not during a server crash.

Also saves the jsons in pretty prints, which make them easier to read
but especially make them easier to diff in a git repository, which MSO
wants to setup (and hopefully make public so I can make a dashboard on
bus.moth.fans for looking at photo albums and their history, which is
something I've wanted to do for a very long time).

## Changelog
🆑
refactor: Photo albums and photo frames are now more resilient to data
loss, especially when a server crashes.
/🆑
2023-12-28 15:40:43 +01:00
Tim
74375cb84f Add 50% graffiti speed boost to tagger quirk (#80567)
## About The Pull Request

This gives the tagger quirk a 50% speed boost when drawing graffiti.
There was also some unused variable intended to make large graffiti more
time consuming that is now fixed.

## Why It's Good For The Game

It'd be nice to be able to spraypaint messages on the floor quicker.
Especially if you are doing a gimmick that requires making a shop sign
using letters.

## Changelog

🆑
add: Add 50% graffiti speed boost to tagger quirk
fix: Fix time duration of large graffiti not applying properly
/🆑
2023-12-28 15:13:15 +01:00
SyncIt21
527ebc3451 Fixes for mat container & ORM (#80573)
## About The Pull Request
- Fixes #80559

1) The ORM now hooks onto the local container only if off station. The
ui act if statement was also messed up but that's fixed now too.

2) Creates a dedicated signal for items inserted into the silo for
clarity & uses the helper proc defined inside remote materials for
inserting items so we don't have to specify the `context` manually.

3) Properly updates the auto Doc for the container signal defines

## Changelog
🆑
fix: Off station ORM's can redeem points again.
/🆑
2023-12-28 14:58:22 +01:00
Mothblocks
404d2cb36c Optimize find_potential_targets self cost (#80602)
![image](https://github.com/tgstation/tgstation/assets/35135081/84ae20b6-5f44-4a69-bda3-0df1435dea5c)

`find_potential_targets/perform` currently has a pretty bad self cost in
part due to it running a second "loop over everything in range" check to
find turrets and mechs. This doesn't drop it down by as much as I'd like
because it still needs `hearers`, it still shows up pretty high, but
this at least cuts out some unnecessary work.

Best case is likely to minimize work AIs need to do when there are no
players on their z-level, as there are a lot of calls from Lavaland.
2023-12-28 14:14:49 +01:00
Mothblocks
712b0038e1 Fix some incorrect uses of "src" in energized component (#80613)
## About The Pull Request
Fixes this:

![image](https://github.com/tgstation/tgstation/assets/35135081/d4265136-9324-4057-992b-fbc9a6f6eb46)

Untested

## Changelog
🆑
fix: Fixed "was shocked by /datum/component/energized" message.
/🆑
2023-12-28 13:54:36 +01:00
LemonInTheDark
06f169993c Fixes wallmounted lights falling on drag (#80609)
## About The Pull Request

Being able to move around lights when using the light debugger is
important
Can't just be qdeling em whenever you try

Closes https://github.com/tgstation/tgstation/issues/78662
## Changelog
🆑
fix: Dear mappers, the light debugger tool no longer deletes dragged
wall lights
/🆑
2023-12-28 13:05:40 +01:00
Arturlang
8e8d930720 Makes immerse use weakrefs (#80594)
## About The Pull Request
Immerse was causing harddels due to it having references to mobs. Makes
it use weakrefs for mobs instead.

## Why It's Good For The Game
Immerse would cause harddels if a mob was deleted while it was in it's
list. It could probably also happen if a turf was deleted too, but doing
that here would be much harder.

no CL since nothing playerfacing
2023-12-28 02:32:20 +01:00