Commit Graph

438 Commits

Author SHA1 Message Date
Tostah
9ca522d4dd Fixes ninja camera vision module so it provides welding protection (#91428)
## About The Pull Request

The ninja camera vision module now provides the same welding protection
as the welding module, as intended.

This was due to the camera vision module not inheriting the function
which applied the welding protection in on_part_activation()

## Why It's Good For The Game

The camera vision module was not providing any flash protection to the
ninja, despite its description clearly stating;

"...as well as automatically dimming incoming flashes of light to
protect the user's eyes. Become the unseen."

In fact, the night vision goggles provided to the ninjas made them weak
to flashes.

## Changelog
🆑
fix: Ninja Camera Vision module now correctly applies welding
protection.
/🆑
2025-06-02 18:57:04 +00:00
Ghom
4f6727024d Crafting refactor, implementing materials (#89465)
## About The Pull Request
My original plan was to just implement materials into crafting so that
items would inherit the materials of their components, allowing for some
interesting stuff if the material flags of the item allow it. However to
my dismay crafting is a pile of old tech debt, starting from the old
`del_reqs` and `CheckParts` which still contain lines about old janky
bandaids that are no longer in use nor reachable, up to the
`customizable_reagent_holder` component which has some harddel issues
when your custom food is sliced, and items used in food recipes not
being deleted and instead stored inside the result with no purpose as
well as other inconsistencies like stack recipes that transfer materials
having counterparts in the UI that don't do that.

EDIT: Several things have come up while working on this, so I apologise
that it ended up changing over 100+ files. I managed to atomize some of
the changes, but it's a bit tedious.

EDIT: TLDR because I was told this section is too vague and there's too
much going on. This PR:
- Improves the dated crafting code (not the UI).
- replaced `atom/CheckParts` and `crafting_recipe/on_craft_completion`
with `atom/on_craft_completion`.
- Reqs used in food recipes are now deleted by default and not stored
inside the result (they did nothing).
- Renames the customizable_reagent_holder comp and improves it (No
harddels/ref issues).
- Adds a unit test that tries to craft all recipes to see what's wrong
(it skips some of the much more specific reqs for now).
- In the unit test is also the code to make sure materials of the
crafted item and a non-crafted item of the same type are roughly the
same, so far only applied to food.
- Some mild material/food refactoring around the fact that food item
code has been changed to support materials.

## Why It's Good For The Game
Improving the backbone of the crafting system. Also materials and food
code.

## Changelog

🆑
refactor: Refactored crafting backend. Report possible pesky bugs.
balance: the MEAT backpack (from the MEAT cargo pack) may be a smidge
different because of code standardization.
/🆑
2025-06-01 16:37:43 -07:00
Jeremiah
9db2f6916b Sets prettier to run on the repo (#91379)
## About The Pull Request
Prettier (an auto formatter) is set to only run within the tgui folder
currently. This removes that limitation, allowing it to automatically
format all supported files in the repo (.js, .html, .yml
[etc](https://prettier.io/docs/))

I made a few exceptions for bundled and generated files
## Why It's Good For The Game
I'm of the opinion that code should look uniform and am lazy enough to
want CTRL-S to format files without having to think beyond that
## Changelog
2025-05-29 21:23:59 -07:00
Y0SH1M4S73R
c4897e7c03 [NO GBP] Fixes the MOD Soul Core saying it has no charge in the UI while worn (#91244)
## About The Pull Request

I made an oopsie and forgot a single NOT operation in the line that
checks if the suit is being worn.
This also almost certainly fixes a runtime that I assume would happen
when looking at the interface of a suit not currently being worn.

## Why It's Good For The Game

The soul core isn't supposed to tell you there's no charge source when
it is clearly fully functioning.

## Changelog

🆑
fix: The MOD soul core no longer tells you there's no charge source
while worn.
/🆑
2025-05-26 13:35:30 +00:00
Bloop
cb51a652a9 Adds automatic GAGS icon generation for mapping and the loadout menu (#90940)
## About The Pull Request

Revival of https://github.com/tgstation/tgstation/pull/86482, which is
even more doable now that we have rustg iconforge generation.

What this PR does:

- Sets up every single GAGS icon in the game to have their own preview
icon autogenerated during compile. This is configurable to not run
during live. The icons are created in `icons/map_icons/..`
- This also has the side effect of providing accurate GAGS icons for
things like the loadout menu. No more having to create your own
previews.


![FOuGL6ofxC](https://github.com/user-attachments/assets/e5414971-7f13-4883-9f7f-a8a212b46fe8)

<details><summary>Mappers rejoice!</summary>


![StrongDMM_1oeMSoRHXT](https://github.com/user-attachments/assets/83dcfe4c-31be-4953-98f3-dff90268bbc4)


![StrongDMM_uyqu3CggPn](https://github.com/user-attachments/assets/7896f99e-2656-40e1-a9da-3a513882365a)

</details>

<details><summary>Uses iconforge so it does not take up much time during
init</summary>


![dreamdaemon_u4Md3Dqwge](https://github.com/user-attachments/assets/17baaff8-5d5e-4a4d-ba8f-9dd548024155)

</details>

---

### Copied from https://github.com/tgstation/tgstation/pull/86482 as
this still applies:

Note for Spriters:

After you've assigned the correct values to vars, you must run the game
through init on your local machine and commit the changes to the map
icon dmi files. Unit tests should catch all cases of forgetting to
assign the correct vars, or not running through init.

Note for Server Operators:

In order to not generate these icons on live I've added a new config
entry which should be disabled on live called GENERATE_ASSETS_IN_INIT in
the config.txt


## Why It's Good For The Game

No more error icons in SDMM and loadout.

## Changelog

🆑
refactor: preview icons for greyscale items are now automatically
generated, meaning you can see GAGS as they actually appear ingame while
mapping or viewing the loadout menu.
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2025-05-24 15:21:02 -07:00
MrMelbert
5261efb67f Re-refactors batons / Refactors attack chain force modifiers (#90809)
## About The Pull Request

Melee attack chain now has a list passed along with it,
`attack_modifiers`, which you can stick force modifiers to change the
resulting attack

This is basically a soft implementation of damage packets until a more
definitive pr, but one that only applies to item attack chain, and not
unarmed attacks.

This change was done to facilitate a baton refactor - batons no longer
hack together their own attack chain, and are now integrated straight
into the real attack chain. This refactor itself was done because batons
don't send any attack signals, which has been annoying in the past (for
swing combat).

## Changelog

🆑 Melbert
refactor: Batons have been refactored again. Baton stuns now properly
count as an attack, when before it was a nothing. Report any oddities,
particularly in regards to harmbatonning vs normal batonning.
refactor: The method of adjusting item damage mid-attack has been
refactored - some affected items include the Nullblade and knives.
Report any strange happenings with damage numbers.
refactor: A few objects have been moved to the new interaction chain -
records consoles, mawed crucible, alien weeds and space vines, hedges,
restaurant portals, and some mobs - to name a few.
fix: Spears only deal bonus damage against secure lockers, not all
closet types (including crates)
/🆑
2025-05-19 13:32:12 +10:00
Y0SH1M4S73R
429a3bbf04 Adds the craftable MOD soul shard core. (#91023)
## About The Pull Request

If you examine a soul shard closely, you can learn to craft the MOD soul
shard core. It takes the same basic ingredients as other MOD cores, but
uses a soul shard. It is powered by your own soul, which drains your
sanity to provide charge (if mood is disabled in the config, it's
practically equivalent to an infinite core).

Crafting one ejects any shades in the shard (because that's the simplest
behavior that doesn't require a substantial refactor to crafting or
modsuit code).

Depending on the kind of shard used, certain roles get negatively
impacted by using a modsuit with such a core.
- Cult soul shards wrack non-magical roles (anyone that isn't a cultist,
heretic, heretic minion, or wizard) with horrible agony (a -20 moodlet
that expires 10 seconds after turning the suit off)
- Holy soul shards wrack cultists and heretics with horrible agony,
while wizards are put at unease (-3 mood)
- Wizard soul shards have no negative impact on anyone
- If someone were to VV a soul shard to have the heretic theme (only
used by rusted harvesters), it would be functionally identical to the
cult shard

Soulless mobs (liches, people who lost with the cursed russian revolver,
and people who died from casting Soul Tap too many times) have no soul
for the core to draw power from.

Also gives the wizard modsuit a soul core.

## Why It's Good For The Game

Provides a neat but caveat-rich way to utilize soul shards, especially
for players who have no way to obtain construct shells absent a cult or
wizard to create them.
2025-05-16 21:49:23 -05:00
SmArtKar
f06738eff2 Fixes MODsuit control units not updating their worn icons when activating with no parts deployed (#91068)
## About The Pull Request

``update_clothing`` by default doesn't update anything. Also fixed a
missing return in ``allow_attack_hand_drop`` that always failed the
proc.
2025-05-16 13:24:16 -05:00
SmArtKar
352c7ecdd7 Refactors ITEM_SLOT_BACKPACK and ITEM_SLOT_BELTPACK out of inventory code (#90869)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

So yesterday I've spotted that we had wrong SLOTS_AMT value set, and
went a bit down a rabbit hole and found how abhorrent our
ITEM_SLOT_BACKPACK and ITEM_SLOT_BELTPACK usage is. They're not real
inventory slots, but just "hints" at items being located in backpacks or
belts, or instructions to put an item into a belt/backpack. This PR
rewrites all usages of them as "hints", and adds an equip_to_storage
proc used to equip an item into a storage positioned in a certain slot,
so ``equip_to_slot_if_possible(item, ITEM_SLOT_BACKPACK)`` is now
``equip_to_storage(item, ITEM_SLOT_BACK)``

## Why It's Good For The Game

Its really stupid and we shouldn't have those as slot flags,
ITEM_SLOT_HANDS at least makes sense but those two are just absurd.
Should make equipping things into non-backpack storage a bit easier too,
in case we end up going through with the idea of suit/uniform pockets
being a major part of player inventory.

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and its effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
refactor: Refactored how backpack and belt contents are handled in mob
inventory code, report any issues with lingering item effects or
inability to equip things into them!
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2025-05-15 01:07:41 +01:00
Ghom
339616ae78 You can now interact with held mobs beside wearing them (feat: "minor" melee attack chain cleanup) (#90080)
## About The Pull Request
People can now pet held mothroaches and pugs if they want to, or use
items on them, hopefully without causing many issues. After all, it only
took about a couple dozen lines of code to make...

...Oh, did the 527 files changed or the 850~ lines added/removed perhaps
catch your eye? Made you wonder if I accidentally pushed the wrong
branch? or skewed something up big time? Well, nuh uh. I just happen to
be fed up with the melee attack chain still using stringized params
instead of an array/list. It was frankly revolting to see how I'd have
had to otherwise call `list2params` for what I'm trying to accomplish
here, and make this PR another tessera to the immense stupidity of our
attack chain procs calling `params2list` over and over and over instead
of just using that one call instance from `ClickOn` as an argument. It's
2025, honey, wake up!

I also tried to replace some of those single letter vars/args but there
are just way too many of them.

## Why It's Good For The Game
Improving old code. And I want to be able to pet mobroaches while
holding them too.

## Changelog

🆑
qol: You can now interact with held mobs in more ways beside wearing
them.
/🆑
2025-04-23 20:18:26 +00:00
FlufflesTheDog
a490e7afd4 Fix passive modsuit modules (#90719)
## About The Pull Request
Fixes https://github.com/NovaSector/NovaSector/issues/5311
Fix some unreachable code and some broken invariants
## Why It's Good For The Game
bug bad modsuit good
## Changelog
🆑
fix: Passive modsuit modules (radiation protection, welding protection,
etc) should work reliably again.
/🆑
2025-04-20 08:21:50 +02:00
Lucy
0445bee0a7 MODlink scryers now alert the user if they try to call without a charged cell (#90682)
## About The Pull Request

This makes it so if you try to use a MODlink scryer without a power
cell, or with an empty cell, it'll show a balloon alert to the user
saying "no cell installed!" or "no charge!", rather than silently
failing.

## Why It's Good For The Game

when I ported modlinks downstream, a few people got confused bc they
didn't realize they needed cells after being printed.
this makes it more clear what the issue is.

## Changelog
🆑
qol: MODlink scryers now alert the user if they try to call without a
charged power cell.
/🆑
2025-04-19 10:49:36 +02:00
SmArtKar
b49553bdf4 Refactors MODsuit module rendering and allows overslotted parts to show items they overslot when unsealed (#90414)
## About The Pull Request

MODsuit modules now render on the part they're attached to, that being
first part if required_slots is set, otherwise defaulting to the control
module. Instead of using icon ops and a cache, module masking (used by
armor boosters and insignias) will instead render the module on all
parts, each overlay alpha filtered using the worn piece as the mask. To
do this we also migrate modules to separate_worn_overlays, which fixes
the issue where they'd always get painted the same color as the back
piece, ignoring use_mod_colors's value (which is FALSE by default). So
now modules that inherit MOD's color like armor booster will be painted
accordingly to their piece.
This also means that modules actually layer properly, and don't go ontop
of items that they should be under.

Additionally, whenever gloves or boots overslot an item, the overslotted
item will still render underneath them if they're unsealed. Because it
looks weird when your gloves disappear when you extend your MODsuit
ones.


![dreamseeker_BaWjJBcMVO](https://github.com/user-attachments/assets/2b374913-7761-4b54-9bbd-cbd57d343fd6)

Look at that hip look, she'd have bare hands and ankles without this PR.

Closes #90370

## Why It's Good For The Game

Fixes a bunch of visual jank that looks weird, and overslotting
displaying overslotted item is just behavior you'd expect normally.

## Changelog
🆑
add: When a MODsuit piece overslots an item, it will now render beneath
that piece as long as its unsealed.
refactor: Refactored how MODsuit modules are rendered, report any bugs
on GitHub!
/🆑
2025-04-15 20:21:10 +12:00
Ghom
a2e141c859 Locking a storage item now locks you out of other storage items inside it. (#90243)
## About The Pull Request
This PR introduces the `set_locked()` proc, which I'll also need for
something else later.

## Why It's Good For The Game
I could still interact with the storage of a box I placed into a secure
safe after I locked the latter.

## Changelog

🆑
fix: Locking a storage item now locks you out of other storage items
inside it.
/🆑
2025-04-07 07:49:39 +02:00
Maximal08
71109381ef Mod overslot fix (#90201)
## About The Pull Request

close: https://github.com/tgstation/tgstation/issues/90199

Demonstration how it works:


https://github.com/user-attachments/assets/5eea856f-ebfb-4670-8e43-dad32ad01e95

## Why It's Good For The Game
Well it's a bug fix.
## Changelog
🆑
fix:Fix the overlap of 2 different modsuits on each other
/🆑
2025-04-06 22:27:21 +02:00
Waterpig
d3d3a12540 The big fix for pixel_x and pixel_y use cases. (#90124)
## About The Pull Request

516 requires float layered overlays to be using pixel_w and pixel_z
instead of pixel_x and pixel_y respectively, unless we want
visual/layering errors. This makes sense, as w,z are for visual effects
only. Sadly seems we were not entirely consistent in this, and many
things seem to have been using x,y incorrectly.

This hopefully fixes that, and thus also fixes layering issues. Complete
1:1 compatibility not guaranteed.

I did the lazy way suggested to me by SmArtKar to speed it up (Runtiming
inside apply_overlays), and this is still included in the PR to flash
out possible issues in a TM (Plus I will need someone to grep the
runtimes for me after the TM period to make sure nothing was missed).
After this is done I'll remove all these extra checks.

Lints will probably be failing for a bit, got to wait for [this
update](4b77cd487d)
to them to make it into release. Or just unlint the lines, though that's
probably gonna produce code debt

## Why It's Good For The Game

Fixes this massive 516 mess, hopefully.

closes #90281

## Changelog
🆑
refactor: Changed many of our use cases for pixel_x and pixel_y
correctly into pixel_w and pixel_z, fixing layering issues in the
process.
/🆑

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: SmArtKar <master.of.bagets@gmail.com>
2025-03-28 14:18:45 +00:00
Aylong
2df73da53e Fix ByondUI small map preview (#90277)
## About The Pull Request
This PR should fix the problem of small previews in TGUI once and for
all (I hope).

What was causing it? Because TGUI takes a long time to open, that's why
previews were generated broken (small).

On Byond 515 this problem was not so noticeable as the interfaces opened
faster, but with the release of 516 it became much worse.
Previews were generated inside a window that was not yet open, so the
scale was broken, sometimes the window would open before the preview was
done and sent, usually with small interfaces, or when reopening.

I'm not very good at working with signals, and to tell the truth this is
my second experience with them, so I hope I did it right.

## Why It's Good For The Game
No more small map previews

<details> <summary> Video </summary>


https://github.com/user-attachments/assets/834f3820-cc6a-4f65-90e5-d6bb2a118bcf

</details>

## Changelog

🆑
fix: Fixed small character preview, color matrix preview, mech preview,
and other previews with uses ByondUI map
/🆑

---------

Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>
2025-03-28 05:26:48 +01:00
SmArtKar
b7383bc503 Refactors MODsuit slowdown calculations (#90116)
## About The Pull Request

MODsuits now calculate their slowdown by querying modules by sending a
signal on themselves instead of having modules try and keep up with
control unit's speed updates (which broke in a fabulous fashion after
MODsuits were allowed to deploy by piece)
Also added a separate trait to prevent objects from being speed
potion-ed to combat stabilized red crossbreed issues, and removed a
duplicate list helper (40 lines down in the same file lol)

Closes #89979
Closes #90036

## Changelog
🆑
fix: MODsuits should now be affected by stabilized red crossbreeds
fix: MODsuit slowdowns should no longer behave weirdly with ash
accretion/magboots/armor booster modules.
refactor: Refactored MODsuit slowdown calculations to be query-based
instead of modules directly modifying part speed values.
/🆑
2025-03-26 17:55:32 +01:00
SmArtKar
431bf75d53 Color Code Audition: Human rendering hates me (#89702)
## About The Pull Request

This trainwreck of a PR is (hopefully) a final solution to all rendering
jank stemming from the new filter-based coloring system. I went over
every single instance of RESET_COLOR, either adding KEEP_APART or
rewriting them entirely so they render properly. I've also fixed blood
rendering issues by utilizing alpha filters and adding an abstract
"holder" appearance for worn items, which holds blood overlays on worn
clothing as to avoid coloring it. I've also fixed horrible
inconsistencies with atmos pipe coloring as a result (of getting sucked
down that rabbit hole) and converted all uses of COLOR_VERY_LIGHT_GRAY
in atmos code to ATMOS_COLOR_OMNI to avoid confusion.

MODsuit modules still get colored into MOD unit's color, need to
refactor their rendering for this.

Closes #88989
Closes #87526
Closes #89837

## Changelog
🆑
refactor: Audited all remaining coloring code - among noticeable
changes, blood should no longer get colored or "leak out" of item
bounds, atmos pipes no longer color weirdly and repairbots are white
again.
/🆑
2025-03-24 15:05:33 +01:00
FlufflesTheDog
3c8bd2b1ac Fix del loop in modsuit devices (#90127)
## About The Pull Request
When the device of a modsuit module (eg foam mister) is the first thing
to be deleted, it causes a del loop runtime. Chain is:
- device qdel, hasn't yet run destroy() which would normally move the
device to nullspace
- signal runs on_device_deletion, destroys the module
- module destroy(), calls parent which deletes contents, including the
still-deleting device

Fixed by moving device to nullspace in on_device_deletion
## Changelog
N/A
2025-03-20 12:02:15 +01:00
SmArtKar
845ed7459e Bravo Six, Going Dark: Refactors client colors to fix dupe issues and support filters (#89843)
## About The Pull Request

Completely refactored how client colors are handled. Now they're similar
to traits, having a source associated with them. Instead of adding and
removing by strict type (which makes client colors prone to getting
duplicated and not cleaned up) you remove a filter associated with a
specific source. Adding another client color with the same source as an
already existing one will replace the existing one if its of a different
type, or do nothing if they're the same (unless force is set to TRUE).
Client colors can also force filter splitting, putting all colors that
come before them, themselves, and all colors after them into separate
filters - this is useful to prevent mixing in filters which are supposed
to remove a certain color.

<details>

<summary>Example of how Perceptomatrix and nightmare vision goggles
combined before this PR:</summary>


![dreamseeker_fBOse2i0jq](https://github.com/user-attachments/assets/fb164e1f-ce8b-4a8c-8820-5db25e710056)

And this is after, as you can see nightmare vision effect's red is only
slightly tinted by perceptomatix instead of being literally halved.


![dreamseeker_U6A24fetK8](https://github.com/user-attachments/assets/8d8b3eb5-9f53-4646-bc56-0f5897013c6f)

</details>

Additionally, added support for custom filters (and not just colors) to
client color code to allow us to work with more colorspaces.

Also fixed weird blindness behavior, so this also 
Closes #89787

## Why It's Good For The Game

Makes code less ass to work with, fixes weird color mixing, etc.

## Changelog
🆑
fix: Fixed perceptomatix helmet allowing you to see even when
unconscious
refactor: Refactored how client colors are handled, ensuring that
certain effects like nightmare goggles don't disappear when another
vision-affecting piece of clothing is worn.
/🆑
2025-03-17 11:35:11 +00:00
Hatterhat
3f37def18e small fixes for the armor booster module (glitch, dark paladin MODs) (#90070)
## About The Pull Request
fixes tgstation/tgstation#90064
also "fixes" the MODsuit UI for the glitch mod not being cyber terminal
green (like how it is for the UI popups. this is kind of garish though.
i'm willing to undo this) (the code seems to indicate it was supposed to
be like this but then it wasn't)
also fixes the gauntlets' right-facing sprite being one tile off
armor booster off

![image](https://github.com/user-attachments/assets/57770b21-acdb-4e18-ae33-0e4d3bd395ad)
armor booster on

![image](https://github.com/user-attachments/assets/56d2e3a2-97af-40b0-bec4-4b40f224b1c4)

fixes extended to dark paladin mod
visor becomes red when booster active

![image](https://github.com/user-attachments/assets/a516eb74-c09c-4c3c-be46-8cc1f62ee082)

## Why It's Good For The Game
drip check.

## Changelog

🆑
fix: The Cyber Tac Glitch MODsuit now has appropriately offset
gauntlets.
fix: The Cyber Tac Glitch MODsuit now has visor overlays instead of the
menacing white void. Red eyes, take warning (because that's when the
armor booster is active).
fix: The Cyber Tac Glitch MODsuit's interface theme is now an
appropriately terminal-esque.
fix: Dark Paladin MODsuits from the Dead Money bundle are no longer
menacingly white.
fix: Armor boosters in MODsuits in general are no longer menacingly
white voids.
/🆑

---------

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
2025-03-17 11:33:20 +01:00
SmArtKar
eb2796831b [MDB Ignore] Refactors pills, patches, and generalizes stomach contents, nothing to see here. (#89549)
## About The Pull Request

Currently patches are a subtype of pills, and while they have the
``dissolveable`` var set to FALSE, barely anything checks it (because
people don't expect patches to be pills in disguise) so we end up
patches being dissolveable and implantable, which is far from ideal.
Both have been moved into an ``/obj/item/reagent_containers/applicator``
class, which handles their common logic and helps handling cases where
either one fits. As for gameplay changes:
* Pills no longer dissolve instantly, instead adding their contents to
your stomach after 3 seconds (by default). You can increase the timer by
dropping sugar onto them to thicken their coating, 1s per 1u applied, up
to a full minute. Coating can also be dissolved with water, similarly
-1s per 1u applied. Pills with no coating will work like before.
* Patches now only take half as long to apply (1.5s), but also slowly
trickle in their reagents instead of instantly applying all of them.
This is done via embedding so you could theoretically (if you get lucky)
stick a ranged patch at someone, although they are rather quick to rip
off. The implementation and idea itself are separate, but the idea for
having a visual display has been taken from
https://github.com/Monkestation/Monkestation2.0/pull/2558.

![dreamseeker_Ywd4jQcy3t](https://github.com/user-attachments/assets/7ce0e549-9ecd-4a8a-98ea-12e00754bdd9)
* In order to support the new pill mechanics, stomachs have received
contents. Pills and items that you accidentally swallow now go into your
stomach instead of your chest cavity, and may damage it if they're
sharp, requiring having them surgically cut out (cut the stomach open
with a scalpel, then cauterize it to mend the incision). Or maybe you
can get a bacchus's blessing, or a geneticist hulk to gut punch you,
that may also work. Alien devour ability also uses this system now. If
you get a critical slashing wound on your chest contents of your cut
apart stomach (if a surgeon forgot to mend it, or if you ate too much
glass shard for breakfast) may fall out. However, spacemen with the
strong stomach trait can eat as much glass cereal as they want.

Pill duration can also be chosen in ChemMaster when you have a pill
selected, 0 to 30 seconds.

![image](https://github.com/user-attachments/assets/1f40210e-74dd-49c2-8093-432a747ac8dd)

## Why It's Good For The Game

Patches and pills are extremely similar in their implemenation, former
being a worse version of sprays and pills, with only change being that
pills cannot be applied through helmets while patches and sprays ignore
both. This change makes them useful for separate cases, and allows
reenactment of some classic... movie, scenes, with the pill change. As
for stomach contents, this was probably the sanest way of implementing
pill handling, and everything else (item swallowing and cutting stomachs
open to remove a cyanide pill someone ate before it dissolves) kind of
snowballed from there. I pray to whatever gods that are out there that
this won't have some extremely absurd and cursed interactions (it
probably will).

## Changelog
🆑
add: Instead of dissolving instantly, pills now activate after 4
seconds. This timer can be increased by using a dropper filled with
sugar on them, 1s added per 1u dropped.
add: Patches now stick to you and slowly bleed their reagents, instead
of being strictly inferior to both pills and sprays.
add: Items that you accidentally swallow now go into your stomach
contents.
refactor: Patches are no longer considered pills by the game
refactor: All stomachs now have contents, instead of it being exclusive
to aliens. You can cut open a stomach to empty it with a scalpel, and
mend an existing incision with a cautery.
/🆑
2025-03-13 17:31:37 +01:00
SmArtKar
50ed8cbb52 Fixes most mining mobs being unaffected by additional damage against them (#89682)
## About The Pull Request

#89619 introduced a MOB_MINING biotype which allows us to get rid of
jank that the ismining() macro was. This fixes soulscythes, cursed
katanas, mining bombs, strongarm implants and junk hunter bullets not
getting their buffs against a good chunk of mining fauna.

Closes #89597

## Why It's Good For The Game

You'd expect items explicitly designed against fauna to actually fare
well against it.

## Changelog
🆑
fix: Fixed most mining mobs being unaffected by additional damage
against them
/🆑
2025-03-07 19:20:17 -08:00
SmArtKar
4dd6cdeb72 Refactors how item actions are handled (#89654)
## About The Pull Request

This PR tackles our piss-poor item action handling. Currently in order
to make an item only have actions when its equipped to a certain slot
you need to override a proc, which I've changed by introducing an
action_slots variable. I've also cleaned up a ton of action code, and
most importantly moved a lot of Trigger effects on items to do_effect,
which allows actions to not call ui_action_click or attack_self on an
item without bypassing IsAvailible and comsigs that parent Trigger has.
This resolves issues like jump boots being usable from your hands, HUDs
being toggleable out of your pockets, etc. Also moved a few actions from
relying on attack_self to individual handling on their side.

This also stops welding masks/hardhats from showing their action while
you hold them, this part of the change is just something I thought
didn't make much sense - you can use their action by using them in-hand,
and flickering on your action bar can be annoying when reshuffling your
backpack.

Closes #89653

## Why It's Good For The Game
Makes action handling significantly less ass, allows us to avoid code
like this
```js
/obj/item/clothing/mask/gas/sechailer/ui_action_click(mob/user, action)
	if(istype(action, /datum/action/item_action/halt))
		halt()
	else
		adjust_visor(user)
```
2025-03-01 12:02:07 -06:00
SmArtKar
06bac24391 Sphere transform module no longer makes you spin permanently (#89655)
## About The Pull Request

Closes #89635
Ugly solution but this is the best we can have until full 516 support
with animation tags.

## Changelog
🆑
fix: Sphere transform module no longer makes you spin permanently
/🆑
2025-02-26 11:01:29 +01:00
Jacquerel
13df417ab4 Some modsuits have a very small slowdown when equipped (#89657) 2025-02-25 07:58:58 +01:00
Jacquerel
61a29444a8 MODSuits don't slow you down when they're not deployed (#89632)
## About The Pull Request

MODSuits now slow you progressively as parts are deployed, and not at
all when no parts are deployed.
Previous to this change MODsuits would slow you _more_ for having a part
not deployed than for having it deployed and powered, meaning you would
be slower using it as a backpack than you would be when using it as a
suit. This leads to people typically taking it off entirely and holding
it in their hands instead of wearing it.

## Why It's Good For The Game

We talked about this in the coderbus meeting and the general reasoning
is;

- We want people to use MODsuits for the utility they provide. It's good
when people think these items are desirable and ask the roboticist to
make one for them.
- MODsuits being slower when unpowered makes sense but is _mostly_ just
that way for flavour reasons.
- Moving slower is (perhaps unintuitively?) one of the strongest
detriments we have in the game for using something.
- MODsuits when used as backpacks are _already_ worse than a standard
backpack (less storage space unless complexity is dedicated to increase
it again) and it's not necessarily clear that they need an additional
downside.
- It feels odd to be penalised _more_ strongly penalised when just
wearing a backpack and not benefiting from any utility aspect of the
suit than you are when actively benefiting from having the suit.
- It also feels odd to be penalised at all for having it while not
benefiting from it.
- The fact that they have a deployment time already reduces their
effectiveness in terms of being "snapped" on and off in response to loss
of atmosphere.
- The "juggling" behaviour that players resort to when they can't just
wear their suit as a backpack (swapping between a held backpack and a
held modsuit control with keybindings) is the kind of powergaming trick
I don't really like but is reasonably easy to do in order to bypass the
downside anyway, removing this removes any need to train players to do
this.
- Personally I feel that if people are wearing their MODsuit undeployed
while wandering around the station that's actually preferable to me than
if they had it deployed full-time, which is what they are more likely to
be doing if leaving it undeployed makes them slower (even if the
undeployed speed was the same as the deployed speed). At that point,
they might as well simply have it powered in order to benefit from being
atmospherics-proof and deal with having to charge it every so often.

**Doesn't this just make a MODsuit into a better backpack?**
No, it has lower capacity.
A standard MODsuit storage has a max weight capacity of 15 split across
up to 7 items.
A regular backpack has a max weight capacity of 21 split across up to 21
items (significantly more granularity).

**Won't this make people wear MODsuits all the time?**
Apart from ones that you get with your job, the Roboticist only starts
with a handful of mod cores to make more suits out of.
If we achieved even 1/3rd crew saturation on a busy round that would
mean a significant use of cargo to acquire more cores, which is a design
goal. I think the idea that it would reach total crew saturation is
basically unthinkable, we already limit the number of suits that can
exist at once via cargo.

Also, most suits with good utility _still_ make you slower _when
deployed_ so any time you are actually benefiting from its utility you
are experiencing a drawback.

## Changelog

🆑
balance: MODSuit parts now slow you only when deployed, regardless of
whether they are sealed.
balance: MODSuit parts no longer slow you when they aren't deployed.
/🆑
2025-02-24 10:55:39 +01:00
Jacquerel
d26e197f11 Some Loadout Additions (#89500) 2025-02-21 16:48:06 +01:00
MrMelbert
ffd97819c1 Pixel adjustments to mobs are now sourced / Refactors riding (#89320)
## About The Pull Request

Fixes #85980

- Pixel adjustments are now sourced

When tweaking a mob's pixel w, x, y, z, is is now done via `add_offsets`
and must have a source string associated

- Refactors riding

Refactors how riding component selects the offsets to use. It's now all
done via the getter rather than a weird mix of a var, a cache, and a
getter.

- Moves a bunch of animations to use `pixel_w` / `pixel_z`

Largely to prevent conflicts with adjustments to a mob's pixel position,
but also as many animations are not actual movements, but visual
movements. Floating is one such example.

## Why It's Good For The Game

It just works

## Changelog

🆑 Melbert
fix: Fixed grab offsets not showing for anything but passive grab
fix: Fix jank with mob offsets when riding things
refactor: Refactored riding component, particularly how it selects layer
and offsets. Report any oddities
refactor: Refactored pixel offsets of mobs. Report any oddities
/🆑
2025-02-12 17:16:13 -07:00
Likteer
62a658b942 Adds the resin mister module to the (single?) roundstart atmos MODsuit (#89334)
![obraz](https://github.com/user-attachments/assets/21c80f72-21bc-4375-b030-10aa166ca7c0)

![obraz](https://github.com/user-attachments/assets/d7495ea2-80c7-4804-98d6-91fdd436483b)

![obraz](https://github.com/user-attachments/assets/94e77fb7-a240-4223-aaa6-d57d2ba63ed0)


_They don't know I don't have enough GBP to feed my kids & make it
through winter..._ 😔
Can I pass this off as QoL?
## About The Pull Request
So you see, the suit locker DOES contain a resin mister... the backpack
one... the one that's in every other locker... and goes in the same slot
as the MODsuit...

![obraz](https://github.com/user-attachments/assets/983adce0-5cda-4dee-b537-15d3ca312ff3)
It's like a spit in the face, isn't it?
## Why It's Good For The Game
I feel it's exasperating how neglected this was.
Sure, the original resin mister isn't that commonly used because it
takes up the backslot.
Neither is the MODsuit, because it has little to offer and slows you
down.

But first someone kept that resin backpack in the same suit storage
instead of giving it the module...
And then a quick carry module was added instead & it's seemingly the
only thing that differentiates it from the engineering MODsuit!
Why?
## Changelog
🆑
qol: Added the resin mister module to the roundstart atmos MODsuit.
/🆑

---------

Co-authored-by: GuillaumePrata <55374212+GuillaumePrata@users.noreply.github.com>
2025-02-08 15:25:03 -08:00
Lucy
bc19447758 Fix blades equipped to a void cloak having visible sprites (#89343)
## About The Pull Request

Fixes https://github.com/tgstation/tgstation/issues/87345

This adds a new item trait, `TRAIT_NO_WORN_ICON`, which is exactly what
it says on the tin - the worn overlay for said item will not be added
when the trait is present, so we give it to items hidden by the hood.

I also refactored the `EXAMINE_SKIP` item flag into
`TRAIT_EXAMINE_SKIP`.

![2025-02-03 (1738625986) ~
dreamseeker](https://github.com/user-attachments/assets/5e6fec83-580b-419c-a2c6-9dd388471fec)

## Why It's Good For The Game

stealth thing having an obvious sprite tell is bad. bugfix good.

## Changelog
🆑
fix: Void Cloaks now properly hide blades and such in the suit storage
from the wearer's sprite.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2025-02-05 18:51:43 +01:00
necromanceranne
3f46e2f0d0 Fixes MOD holster having required slots which prevent it from working without basically fully deploying anyway (#89239)
## About The Pull Request

Originally, this module could be activated while the core was inactive.
Now, it doesn't because it needs you to deploy the vast majority of your
modsuit even while inactive. Kind of lame.

This corrects that so you can still deploy your firearm without the suit
being more or less deployed.

## Why It's Good For The Game

Looks like a copy-paste job to me. Or not understanding what this module
was. Hard to say.

## Changelog
🆑
fix: Allows MOD holsters to once again activate while the modsuit is
inactive and undeployed.
/🆑
2025-02-03 01:47:59 +00:00
SmArtKar
cb1bf1431e Springlock MODule now only activates when you have at least a single sealed piece (#89222)
## About The Pull Request

Springlocks no longer trigger when you only have a back piece deployed,
only damages bodyparts covered by deployed pieces, and prevents you from
retracting them when it's been set off

Closes #89218

## Changelog
🆑
fix: Springlock MODule now only activates when you have at least a
single sealed piece
fix: Springlock MODule no longer damages bodyparts not covered by your
MODsuit
/🆑
2025-01-29 17:56:55 +01:00
Penelope Haze
4c2a76ede3 Fix a large number of typos (#89254)
Fixes a very large number of typos. A few of these fixes also extend to
variable names, but only the really egregious ones like "concious".
2025-01-28 22:16:16 +01:00
SmArtKar
e6aa18531a Tether improvements and fixes (#89174)
## About The Pull Request

Fixes tether stacking via beacons, you can freely cut your tether while
moving, and cutting/snapping MODsuit tethers now also snaps the beacon
they're connected to if said beacon was generated by a MODsuit
projectile. Retracting the gloves or deactivating your MODsuit also
snaps MODtethers you've created using it.

Closes #88869
Closes #88866
Closes #89170

## Changelog
🆑
qol: Snapping tethers now also removes their beacons
qol: You can now cut tethers that you're attached to while in motion
qol: Tethers now snap when you retract your gloves or disable your
MODsuit
fix: Fixed tether stacking issues
/🆑
2025-01-23 19:14:30 +01:00
Paxilmaniac
a0473dc9b5 makes the plasma visor overlay a lighter color and also actually work for modsuits (#88751)
## About The Pull Request

the module doesn't actually show the visor thanks to the fact that the
module is not actually active at any point, which the visor attempts to
check for

also the color of purple was like WAY too dark it was practically black
on every modsuit
## Why It's Good For The Game

it'd be cool if it actually worked and you could actually see it
## Changelog
🆑
fix: fixes plasma stabilizer module not showing a visor on modsuits
fix: makes the plasma stabilizer module actually visible
fix: makes rave module grey by default as it was meant to be
/🆑
2025-01-13 17:49:23 +01:00
Jacquerel
9c8954cda5 Fix some inverted teleport validation checks (#88967)
## About The Pull Request

A bunch of places in code were recently updated to use a helper proc for
validating teleportation.
Unfortunately a lot of them also got the return value inverted, and
would only let you teleport to illegal locations. Most notably this
effected the hand teleporter, but also several other items.

Fixes #88966 

what is a "dull universal force" supposed to be anyway
2025-01-09 13:50:02 -06:00
_0Steven
ed5b045ce8 Fixes rave visor deleting its music player on deactivation (and spamming runtimes) (#88925) 2025-01-07 18:32:03 +01:00
Paxilmaniac
ff713680d3 uses the nt frequency define for loaded modlinks instead of just "NT" (#88813)
## About The Pull Request

see title
## Why It's Good For The Game

if the frequency is ever changed from NT by default for any reason,
pre-loaded scryers wont be able to call normal modsuits because they
dont use the define without this
## Changelog
🆑
code: modlink scryers use the nt frequency define rather than just plain
text doing it themselves
/🆑
2025-01-06 17:11:59 +01:00
carlarctg
d7460f97d7 Adds a new area flag, LOCAL_TELEPORT, given to virtual domains and deathmatch arenas. (#88756)
## About The Pull Request

Adds a new area flag, LOCAL_TELEPORT.

This flag allows teleports ONLY in the same area that the teleport is
used. This allows for short range hijinks without enabling long range
exploits, and thus it's given to DMs and domains.

Changed almost all area_flags & NO_TELEPORT checks to use
check_teleport() (as now areas may use local_teleport instead, and this
lets them check for multiple things instead)

Thus I re-added Void Phase to the heretic scribe in DM and shuffled some
stuff around

(realizing now i neglected to doublecheck if blade breaking tps you to
station. need to check just in case)
## Why It's Good For The Game

It sucks you can't use teleporting abilities in temporary areas, so this
is a good way to allow this to still happen without opening the way for
gamebreaking exploits.
## Changelog
🆑
code: Adds a new area flag, LOCAL_TELEPORT, given to virtual domains and
deathmatch arenas.
code: Re-added Void Phase to Heretic Scribes in Deathmatch's Ragnarok
map.
/🆑
2025-01-06 08:55:58 -05:00
SmArtKar
3499727a6d Implements datumized embedding handlers in place of element-component-datum triad (#88511)
## About The Pull Request

This PR completely rewrites our embedding system in favor of embedding
datum handlers which acts as containers for all embedding-related data
and logic.

Currently embedding logic relies on an element-component-datum triad,
where elements on the items handle embedding logic, singleton datums
store embedding data and components (which get assigned to ***mobs*** in
whom the item embedded) handle pain and the item being ripped out. How
do we access all the procs? By using comsigs as procs, which is really
bad. This code was written back in 2020 when DCS was hot stuff but in
hindsight this implementation was a mistake, as it heavily restricts
custom embedding behaviors unless you're willing to constantly run
GetComponent (bad, ugly, incarnation of evil)

This PR rewrites all that logic to be handled by lazyloaded
``/datum/embedding``, which is stored similarly to current
``/datum/embed_data``. Upon being requested, it is initialized and
assigned to a parent from whom all the logic is handled, from being
embedded to pain and having the item ripped out. On projectiles this
only handles one proc, after which it copies itself down to the shrapnel
item instead and runs the chain further from there.
Ideally, most embedding-related logic now should be handled purely
datum-side - in most cases items should not be hooking up to themselves
like they did before (unless said logic is for when the item is made
sticky or smth) and instead the code should be handled by the embedding
datum (see sholean grapes implementation in this PR). This should allow
us to do fancy stuff like syringe guns embedding syringes into targets
and injecting them that way, and fix some bugs along the way.

Closes #88115
Closes #87946

Also fixed a bug with scars not displaying when examined closely from
#86506 because i was in the area anyways
2025-01-02 23:18:27 +00:00
LemonInTheDark
91719a400a 516 Compile Compatibility (#88611)
Renames all uses of caller, as they (currently) shadow the new byond var
and will in future error
Ups our "wan if compiled after" experiement compile version to 516
Adds an alternate 516 unit test
2024-12-27 01:04:50 +00:00
SmArtKar
d4d106c97d Rave and plasma stabilizer MODules now utilize theme-specific visors (#88369)
## About The Pull Request

Rave and plasma stabilizer MODules now use per-theme visors so they no
longer look like an ugly blob (because their sprite only works with the
"standard" MODsuit theme)


![dreamseeker_gav0TXaQOF](https://github.com/user-attachments/assets/15f5a7e5-eb6e-4d03-b2fd-40181d199a78)

Armor booster modules use a signal to change the visor when they're
activated

## Why It's Good For The Game

Currently they use the base helmet visor sprite which doesn't look very
good on non-standard MODsuits

## Changelog
🆑
add: Rave and plasma stabilizer MODules now utilize theme-specific
visors
/🆑
2024-12-15 13:15:37 +00:00
SmArtKar
a27949d5f5 Advanced Color Shifting: Spraypaint Edition (#88201)
## About The Pull Request

"If GAGS is such a good system, why isn't there GAGS 2?" - Sun Tzu

GAGS is very neat but it has one glaring issue: it needs sprites to be
greyscaled in advance to be used. On the other hand we have color
matrices, but they're hard to use and even harder to get good results
from. The logical solution grew out of a discord argument about colors
this morning after @LemonInTheDark decided to toy around with HSL
matrices using filters on live servers.

This PR implements Color Transition Filters as an additional option for
atom colors - passing a transition filter matrix into
``add_atom_colour`` will "recolor" the atom into the passed color by
using an HSL filter (since color only supports RGB values and matrices).
Normal color matrices are now also supported in atom colors, in case
anyone needs to use them there. ``color_transition_filter`` has 2 modes:
``SATURATION_MULTIPLY`` which only changes the hue and shifts saturation
of the original icon, and ``SATURATION_OVERRIDE`` which changes
saturation and light values to more correctly fit the passed color.
Multiply mode does a far better job at recoloring clothing or objects
with obvious highlights, but fails to color pale or white objects, while
Override mode is closer to what we have right now (just doesn't produce
rancid blobs of color nearly as much)

Here are some examples of colored clothes, mechs, items and tiles using
the new system.

Green RD? Sure.

![image](https://github.com/user-attachments/assets/6d79cac3-15a5-4850-abae-19219e1d4bdb)

Atmos MODsuit colored with a speed potion

![4cTKpeu](https://github.com/user-attachments/assets/9106e74c-8d60-489a-9ef7-4d154ddbbdf9)

Why override mode exists in the first place

![dreamseeker_fAKn811LXT](https://github.com/user-attachments/assets/3d3bea8c-5e27-4390-a924-0c243265fa6a)

Aftermath of a colorful reagent grenade.

![image](https://github.com/user-attachments/assets/ba4c78c5-cba5-42da-ac4d-7861bb329b68)

As you can see, the colors are far brighter and significantly less
acidic, since they're no longer just used as multipliers for existing
colors but instead shift the palette of the sprite towards themselves.

In order to bypass the main downside of "default" Multiply mode,
spraycans have received a new right click function "coat with paint",
which will color the item using the Override mode. Left Click mode lost
its coloring restrictions (RMB still has them), and color
sampling/prosthetic recoloring has been moved to Ctrl Click instead.
Here's the full list of all systems/items that now use color transition
filters:
 * Drying items
 * Deep frying items
 * Slime blueprints/potions/coloring crossbreeds
 * Colorful reagent
 * Spraycans
 * Paint buckets

## Why It's Good For The Game

Our coloring system is ***really*** bad, to the point where we're
preventing players from using any dark colors because item icons become
unintelligible when colored into them.

## Changelog
🆑 SmArtKar, LemonInTheDark
add: Changed how spraycans color items - "old" mode is still availible
via right click.
refactor: Refactored how some items and effects color things so that
they look prettier.
/🆑
2024-12-13 00:12:14 -08:00
SmArtKar
c1129369c7 [NO GBP] Fixes moths only being able to fly if they spawn in zero gravity (#88450)
## About The Pull Request
Moth wings prevent you from flying in gravity -> same check is used for
activation -> they're activated upon implanting -> unless you spawn or
get wings in zero-g you're screwed
Closes #88460
Closes #88457

## Changelog
🆑
fix: Fixed moths only being able to fly if they spawn in zero gravity
/🆑
2024-12-12 19:33:08 +01:00
jimmyl
43e5ad44e1 janitor modsuit space cleaner mister (#87973)
## About The Pull Request
![2024-11-17
10_33_43-Window](https://github.com/user-attachments/assets/93f3f0f4-9475-4537-9a75-a973a9886eea)

generates 2u of space cleaner per second if active
it shoots space cleaner
janitor ert gets it

## Why It's Good For The Game

at long last janitors get some actually useful modsuit module

## Changelog
🆑
add: janitor modsuit space cleaner mister module
/🆑
2024-12-06 23:24:36 +01:00
SmArtKar
00ab18a3b1 [NO GBP] Fixes atrocinator not yeeting you up (#88350)
## About The Pull Request
Closes #88338

## Changelog
🆑
fix: Fixed atrocinator not yeeting you up
/🆑
2024-12-05 02:21:27 +01:00
Time-Green
a0d47d999e Fixes harddels, reduces unneccessary update body calls (#88300)
Closes #88283
Closes https://github.com/tgstation/tgstation/issues/88320

Fixes a harddel caused by the limp status effect not being properly
deleted

Reduces update-body calls in:
- Initialize from 4 to 1
- On z-level change from 2 to 1
- On move with bloody shoes from 1 to 0

Mostly by just passing along the proper argument and removing seemingly
unnecessary update body calls
2024-12-04 01:34:57 +01:00
SmArtKar
7c01aea7dc Modsuits no longer horrifically screech when taken off (#88326)
## About The Pull Request
Closes #87979
***FSZZHHHH***

## Changelog
🆑
sound: Modsuits no longer horrifically screech when taken off
/🆑
2024-12-04 01:11:00 +01:00