Commit Graph

137 Commits

Author SHA1 Message Date
SmArtKar
8915a62a22 Fixes some storages runtiming when trying to dump their contents into other storages (#92247) 2025-07-27 15:49:19 -04:00
MrMelbert
d3a0728ea2 Fixes bad storage News (#92023)
## About The Pull Request

Fixes this


![image](https://github.com/user-attachments/assets/0affb316-3b5d-47e4-bbc1-cc1355bd03be)

## Changelog

🆑 Melbert
fix: Fixes some storage items having potentially broken holdable
selections
/🆑
2025-07-08 15:48:15 -06:00
grungussuss
613581897e /obj/item/clothing/head/mob_holder -> /obj/item/mob_holder (#91893)
## About The Pull Request
title
## Why It's Good For The Game
it inherits a lot of behavior from clothing which leads to lots of bugs
when it isn't actually clothes, for example: shredded overlays. this
should be better.
probably fixes a bunch of bugs
## Changelog
🆑
code: mob holders are no longer subtypes of clothes, report any issues
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2025-07-01 14:20:48 +01:00
grungussuss
0a3185d26c Cig pack sounds (#91860) 2025-07-01 11:06:35 +02:00
John Willard
096c032402 Adds a new halloween species: Spirits (#90711)
## About The Pull Request

Adds 2 new species: Spirits and Ghosts

Spirits are available roundstart during Halloween, Wabbajack and
Xenobio's black slime extract
Ghosts are available through Magic mirrors

They fly around, and don't have legs and instead float around. They also
can't get legs implanted onto themselves.

They also do have organs, so they are affected by flashbangs, they do
get hungry, they do need oxygen to survive (they don't take damage in
space but they do suffocate & get slowdown), and can process chems.
Gibbing a ghost gives ectoplasm, an ingredient for ghost burgers.

Chaplains also got a buff here, null rod-type weapons' bane is now
against Spirit mobs, rather than hardcoded revenants. This means it now
includes Spirits/Ghosts, but also Soulscythes & Cult shades.

Also re-adds https://github.com/tgstation/tgstation/pull/81630 which was
reverted in https://github.com/tgstation/tgstation/pull/86506 which I
assume was accidental.

### The difference between Spirits and Ghosts

Ghosts have an innate ability to become incorporeal, which allows them
to phase through walls and stuff. Using this will immediately make them
drop any non-ghost limb/organ (not implants cause I thought it would be
funny). This ability is not available if they have holy water in their
system, and like revenants they also can't walk over blessed tiles with
it. They are also invisible to cameras while using this (not the obscura
though).

Sprites taken from observers directly, if anyone wants to make custom
sprites for them feel free. If anyone wants to make this obtainable
somehow in-game as well I wouldn't be opposed, halloween is just where I
thought it would fit most.

This also adds a lot of fixes that I encountered trying to add this,
from systems that have been neglected throughout the years.


https://github.com/user-attachments/assets/e368d710-80a0-4c63-b271-1abe3dd41a5e

## Why It's Good For The Game

We haven't gotten a new halloween species in a long time and thought it
would be fun if you can play as an actual ghost, the soul that remains
after a person passes, so Halloween feels more haunted. It's overall
made in just good fun, with a bonus that Ghosts are a cool species to
play with as well for Wizards & maybe Chaplains in the future (Dead sect
when?)

## Changelog

🆑
add: Added a new halloween species: Spirits, a species without legs and
instead floats.
add: Added a new magic mirror species: Ghosts, like spirits but with the
ability to become incorporeal, traversing through solid wall.
fix: Mobs unable to use storage items now can't use storage items.
fix: Mobs unable to use items can now not open airlocks & closets
fix: Mobs unable to pick items up can no longer pick items up and
immediately drop, moving one tile at a time.
fix: Mobs with intentional missing limbs (Alien larva) no longer show
their limbs as missing on examine (again)
fix: Golems' pref page had a missing icon, it now has one.
/🆑

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2025-06-22 10:02:06 +02:00
throwawayuseless
f02819360b Diagnosis: The Diagnosing (#91361)
## About The Pull Request
Adds more analog diagnostic stuff, and expands on what's already there.
Current content added:

- Custom text for when you examine different kinds of organs with
stethoscopes and penlights.
- Examining eldritchly corrupted organs too closely (stethoscope and
penlight) is a bad idea.
- If you place a metal disk against a guy sparking like a tesla coil,
you get shocked. Go figure.
- If someone has an actively damaging zombie infection (ie. got clawed
by a zombie, not romerol), you can see it on penlight.
- New Hemoanalytic Scanner, for use in places where real health scanners
with actual useful features are too high class. It's able to scan for
medicines in the blood, check blood and oxygen levels, determine if the
scannee has tox damage, and even check their blood type. It's printable
roundstart for iron and glass, so that medbay isn't completely fucked if
science doesn't do their job and they lose their health analyzers
somehow.
- Nifty status effect messages for those tools!

## Why It's Good For The Game
Fun, rarely used systems are being improved, and seeing as how the
easily available, faster health analyzer is basically the end-all be-all
of diagnostic tools anyways, it's not going to unbalance anything unless
i literally make them just a health analyzer but better.
## Changelog
🆑
add: Vaguely estimate what kinds of hearts and lungs people have from a
variety of weird stethoscope noises! (Or just look it up on the pr, I
won't judge.)
add: Using analog diagnostic tools on eldritch organs from beyond the
waking world or people whose hearts cause their skin to arc like a tesla
coil is a bad idea. Examine people, ya goof.
add: You can see if someone has an actively damaging (read: contracted
straight from the groaning hungry source) zombie infection by using a
penlight. Act out highly emotional headshot hesitation scenes today!
add: New Hemoanalytic Scanner (read: really shitty but roundstart
printable chem scanner), which tells you all about someone's blood, and
can also detect medicines in their bloodstream! Not toxins or
miscellaneous reagents though.
refactor: Refactored and added some penlight, stethoscope, and organ
code. If shit is fucked, please report it on the github issue tracker
ASAP.
fix: X-Ray vision generically causes eyes to glow under penlight, not
just specifically the mutation X-Ray vision.
fix: Reflex Hammers now fit in medical storage items, IE. medbelts and
medkits.
balance: People with welding-eyes or similar will not have their pupils
react to penlight examination.
/🆑

---------

Co-authored-by: ThrowawayUseless <notarealemail@emailservice.fake>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2025-06-19 09:36:02 +02:00
_0Steven
3804b5fe43 Refactors book attackby into item interaction procs, adding screentips, minor qol (#91273)
## About The Pull Request

This mostly just refactors the book `attackby(...)` proc into
`item_interaction(...)`, with some side-effects and screentips.
Notable ones follow here:

We move carving away from combat mode, and instead based it on whether
our tool is a pure writing utensil, a pure carving tool, or both at once
like the captain's fountain pen. If it's a pure tool, both left click
and right click are its respective primary action. If it's both,
however, left click is vandalizing and right click is carving.
This tries to ensure the expected primary interaction is always
left-click, without blocking anything if it could do both.

We move the barcode scanner interaction to the barcode scanner instead.
There's no good reason for this to stay on the book itself.

We add `can_vandalize(...)` as a proc and move all checks in there, so
we can call it after every tgui input. We don't replace the
`to_chat(...)` calls here with balloon alerts because the additional
clarifying info is needed, and it keeps the 'soulful' blind message.

We add `get_attack_self_context(...)` as a proc for getting screentips
on hovering over it in your active hand, because both the bible subtype
and the syndicate bible _bible subtype_ want different screentips there
in different situations, and so while it's clunky it's much less clunky
than the alternatives I considered.

Making it use actual storage datums avoids subtypes needing to make
manual changes to it in the `carve_out(...)` proc, and is just good for
organization.

This doesn't add screentips to most bible-specific interactions, as I
deemed them outside of the scope of this pr.
Those are better off done atomized into another pr.
## Why It's Good For The Game

less attackby, more item interaction
screentips good

I think having the carving interaction on combat mode is unintuitive,
especially when that's the only interaction it can do.
This ensures the expected primary interaction is always left-click.
## Changelog
🆑
refactor: Refactored the book interaction chain. Please report any
issues.
fix: You can no longer vandalize carved out books if you carve it after
opening the input menu but before entering anything.
qol: Added screentips to book interactions.
qol: Added screentips to barcode scanner interactions.
qol: Carving out books no longer uses combat mode, instead using
left-click by default and right-click if your tool can also write.
Screentips account for this.
/🆑

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
2025-06-08 09:19:15 +02:00
John Willard
c51ee7efa5 Cyborgs now use storage datum (#90927)
## About The Pull Request

This moves Cyborgs onto using storage datums, removing the remenants of
the shitcode that was Cyborg inventory. It's now done mostly by
equipping/unequipping/storage items, much like how other mobs do.
This allows borgs to take advantage of more hand support stuff and
things like ``dropped()``, so borgs no longer have to copy paste drop
code to ``cyborg_unequip``

It also:
- Removes ``CYBORG_ITEM_TRAIT``
- Removes all borg items being ``NODROP``


https://github.com/user-attachments/assets/11442a10-3443-41f2-8c72-b38fb0126cdb

## Why It's Good For The Game

Currently borgs are able to have their entire inventory open and a bag
below it, which I thought was a little weird. I always assumed they WERE
storage items, so I guess I'm doing it myself.
Cyborgs using storage code makes it easier for contributors to actually
do stuff with, without risking breaking everything. It also hopefully
will make borg items more resilient against breaking in the future, now
that we're not relying on nodrop.
Also just brings them more in line with other mobs, all of which make
use of storages.

## Changelog

🆑
refactor: Cyborg's modules now use storage (so opening a bag will close
modules instead of overlap one over the other).
qol: Observers can now see Cyborg's inventories (like they can for
humans).
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-06-01 01:26:53 +00:00
_0Steven
8101de5c3f Shuffle around fancy storage code, fix some stuff, minor changes (#91316)
## About The Pull Request

So this is all because of a leftover bit making all fancy holders set
their `max_slots` to the `spawn_count`, which of course would override
the custom storage datums.

526e006583/code/game/objects/items/storage/fancy.dm (L33-L36)
This just moves all of the fancy storage items away from
auto-calculating storage based on those vars entirely, making new
storage datums for all of the ones which didn't have one yet.
We also move this out of the misc file, because a misc file is
meaningless if everything together makes it bloated.

We also do some minor fixes and changes.
- The pickle jar could only hold seven small items, even though it'd
take ten pickles, so we make it hold ten small items.
- Coffee cartridge racks started with the sprite for 4 of them, so we
make it start with the sprite for 1 of them.
- Nugget fish in the bugget box :)
- We make a few of the visual storages with even amounts above 7 split
their storage up into two even rows, so their UI actually looks full
when full.
## Why It's Good For The Game

Less jank good 👍 

It feels kinda awkward when you have a full box of stuff, visually full
of stuff, and the storage UI is for a significant portion empty- but you
can't put in more.
This makes it so the full storage UI actually matches the object looking
full.

It's funny if Fryish, the nugget fish, can be stored in a nugget box.
## Changelog
🆑
balance: Egg boxes' storage UI is now 6 slots wide, such that it
contains an even dozen slots when full.
balance: The storage UIs for heart-shaped chocolate boxes, pickle jars,
and rolling paper packs are now 4, 5, and 5 slots wide respectively,
such that they fill the whole storage UI when full.
balance: Fryish and its fried snack cousins can now be stored in nugget
boxes.
fix: Pickle jars can actually hold the ten pickles they spawn with.
fix: Fertile egg boxes, coffee condiment displays, and coffee cart racks
have the right amount of slots.
fix: Coffee cart racks spawn with the sprite for holding 1 cartridge
like they do, rather than looking like they're holding 4 cartridges.
/🆑
2025-05-25 12:27:08 +03:00
LT3
c84e70b606 Fixes sterilizine in surgery tray (#91111)
## About The Pull Request

Fixes the list of allowed items in the surgery tray. The tray starts
with sterilizine, but you can't put it back on the tray because it's not
whitelisted.

## Why It's Good For The Game

Fixes bug

## Changelog

🆑 LT3
fix: You can put sterilizine back in the surgery tray after removing it
/🆑
2025-05-15 03:58:48 +03: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
_0Steven
c9a3d43492 Egg boxes can hold other egg-shaped items, like chocolate, boiled, and surprise eggs (#91019)
## About The Pull Request

While reviewing a storage refactor pr I noticed egg boxes can only hold
standard eggs, despite having multiple other egg-shaped things that
could also fit in the same things.
So! In this pr we just add chocolate, boiled, and surprise eggs to the
list of holdables.
2025-05-09 12:57:15 -05:00
Joshua Kidder
86f2347892 Further advances in the pioneering field of animation-ing; putting stuff in machines, taking stuff out of machines, putting stuff in nearby containers (#90895)
## About The Pull Request

Putting stuff into and removing things from machine now plays a little
animation, and putting stuff INTO nearby containers now also plays an
animation. Putting stuff into containers on your person still does not
play an animation.
## Why It's Good For The Game



https://github.com/user-attachments/assets/68cd7db8-1349-4ae3-a5bc-7082839749dd
## Changelog
🆑 Bisar
image: Animations have been added to inserting/removing items from
machines, and to inserting things into containers that are not on your
person.
/🆑
2025-05-08 09:38:51 +12:00
Joshua Kidder
d94e865ce2 Construction bag can now hold stacks of rods and stacks of sheets up to size 'small', can also now hold RCD ammo (#90947)
## About The Pull Request

The pull requests's details are captured in the title. The construction
bag can now hold these things.
## Why It's Good For The Game

The construction bag being unable to carry the fundamental materials for
construction makes no damn sense at all. This makes them able to carry
around up to a 'small' size stack of a given material, to facilitate the
bag being used for, uh, construction.



https://github.com/user-attachments/assets/a8a7adce-48f3-44da-9221-048d171af501
## Changelog
🆑 Bisar
balance: Construction bags can now carry stacks of material up to size
'small', and can now also carry RCD ammo.
/🆑
2025-05-03 02:39:15 +02:00
John Willard
57693b319c Fixes HUDs for people with 4 hands (#90921)
## About The Pull Request

Just found out we actually had 4 handed people in-game now and looked at
it in-game just to find out the basic things of the drop button and
opening inventories were off, so this fixes that.


https://github.com/user-attachments/assets/5521d5f8-a16e-4ce4-8cf1-92b70d154a94

6 hands works too

![image](https://github.com/user-attachments/assets/12db43b3-84af-402d-8c7a-8aa342296225)

Before:

![image](https://github.com/user-attachments/assets/400e652a-55fa-4583-8e7c-1dffca7a4d16)

## Why It's Good For The Game

Four hands work a little better wahoo

## Changelog

🆑
fix: Four handed wizards now have a drop button & open inventory above
their hands.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-05-02 22:51:51 +00:00
SyncIt21
455fe545e0 Part 4: Storage Improvements (#90783)
## About The Pull Request
- Address
https://github.com/tgstation/tgstation/pull/90476#discussion_r2051701283.
Makes pill bottle code cleaner
- Datumized some more storage values(monkey guncase toolbox & crafter
toolbox) making their init slightly faster
- Moved all standard storage subtypes(bags, boxes, lockboxes etc) that
is scattered across various files & folders in the codebase into their
respective files under `code/game/objects/item/storage` folder.
This means for e.g. if you want to see all boxes in the game you can
find them in `code/game/objects/item/storage/boxes` folder & don't have
to go looking for hidden subtypes in various module files or folders
where they were hidden away.
  Makes looking for stuff & modifying these storages much saner & easier

## Changelog
🆑
code: organized storage subtypes under the same files & folders
/🆑

---------

Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
2025-05-02 23:25:58 +02: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
SyncIt21
9bd45e2f3a Part 3: Storage Improvements (#90476)
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2025-04-20 12:02:29 +00:00
SyncIt21
0893f4f945 Part 2: Storage Improvements (#90390)
## About The Pull Request
Continuation of #90365

- Formatted some usages of `set_holdable()` to be more readable
- `exception_hold` list now stores its values inside `
GLOB.cached_storage_typecaches`. This means we don't have to manage a
static typecache list per storage but can share the value across all
storages making memory management slightly more efficient
- Monkey cube boxes now cannot hold gorilla cubes cause that would make
gorilla cube boxes obsolete also now gorilla cube boxes can now only
hold gorilla cubes & not general monkey cubes(which gorilla cubes is a
subtype of) cause that would make monkey cube boxes obsolete. We are
specializing each box for that specific use case

## Changelog
🆑
code: further improved storage code
fix: monkey cube boxes can no longer hold gorilla cubes & vice versa
/🆑
2025-04-07 13:19:16 +02:00
SyncIt21
aee65d742d Part 1: Storage Improvements (#90365)
## About The Pull Request
- Removed duplicate definition of
`/obj/item/storage/contents_explosion()`
- Removed var `rummage_if_nodrop`. It's always `TRUE` and nowhere in
game is it modified so we implement its value directly
- Autodoc for procs `PopulateContents()` & `emptyStorage()`
- Deconstructing storages is faster as it drops the contents directly on
the turf instead of refreshing views, animating parent, updating
appearance & other stuff done in `removeAll()`. It also has no side
effects as presently indestructible contents is moved to the turf inside
`Destroy()`

## Changelog
🆑
code: improved storage code
/🆑
2025-04-07 10:49:57 +02: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
SmArtKar
6b83a91956 Revert "Refactor for storage initialization & organization (#89543)" (#90332)
## About The Pull Request

Reverts the storage initialization refactor and all subsequent related
PRs.
The original PR is below our standards both for code quality and
testing, and is majorly flawed at its core. This has been discussed with
other maintainers and headcoder(s?) over on discord. A lot of changes
from the PR could be brought over later, but in its current state it
should not have been merged.

- Closes #90322
- Closes #90313
- Closes #90315
- Closes #90320
- Closes #90312
- Closes #90344

## Why It's Good For The Game

This PR causes a series of major issues which cannot be resolved without
either completely rewriting a lot of the original PR, or bad code.
Not matching our standards is grounds for not merging a PR, and the fact
that a PR should not have been merged is a reason for a revert.

## Changelog
🆑
fix: Fixed a series of storage-related bugs caused by a refactor PR.
/🆑
2025-03-30 21:30:31 +00:00
SyncIt21
f31b94c6af [NO GBP] Fixes holdables of some storages (#90313)
## About The Pull Request
- Fixes #90312
- Fixes #90320
- Gorilla cube boxes now only hold gorilla cubes & not monkey cubes

## Changelog
🆑
fix: cigarette donut & gorilla cube boxes hold the correct stuff again
/🆑
2025-03-30 21:14:31 +02:00
Goat
2fc6583b2c Fix Tiziran supply boxes not having the proper contents (#90267)
## About The Pull Request
Tiziran canned goods boxes used the farm fresh list while the farm fresh
box only gave three items. The farm fresh box now gives eight food items
and the canned goods now actually give canned goods. Adds a storage type
for tiziran goods.

## Why It's Good For The Game
Canned goods should have canned goods. Farm fresh should provide plenty
of items due to the amount of different things it can roll. (It's also
how it used to be)

## Changelog
🆑 Goat
fix: The Tiziran Empire has now actually puts canned goods in their
canned good exports along with putting more food in their farm fresh
boxes.
/🆑
2025-03-28 18:25:33 +01:00
SmArtKar
78a7e4fec6 Fixes toolbelts being able to hold far too many unintended things (#90262)
## About The Pull Request

Closes #90261

## Changelog
🆑
fix: Fixed toolbelts being able to unintended items
/🆑
2025-03-27 20:33:25 +01:00
SyncIt21
021189c8af Minor nits for storage subtypes (#90263)
## About The Pull Request
Just moves the code into one place & use multiline/remove extra line
where needed

Nicer readability

## Changelog
N/A
2025-03-27 20:32:19 +01:00
MrMelbert
4a4f6db8f9 Fix storage whitelists / blacklists being ignored in some contexts (#90231)
## About The Pull Request

It did not return FALSE unless it was set to print messages.

Fixes #90226

## Changelog

🆑 Melbert
fix: Fix storage whitelists / blacklists being ignored in some contexts
(hotkeys)
/🆑
2025-03-25 21:24:39 -07:00
SyncIt21
0f57a23830 Refactor for storage initialization & organization (#89543)
## About The Pull Request
A Huge chunk of changes just comes from moving existing storage code
into new files & seperating `atom_storage` code into its own subtype
under the already existing `storage/subtypes` folder.

With that the changes in this PR can be organized into 3 categories.

**1. Refactors how `/obj/item/storage/PopulateContents()` initializes
storages**
- Fixes #88747 and every other storage item that has a similar variant
of this problem

The problem with `PopulateContents()` is that it allows you to create
atoms directly inside the storage via `new(src)` thus bypassing all the
access restrictions enforced by `/datum/storage/can_insert()` resulting
in storages holding stuff they shouldn't be able to hold.

Now how this proc works has been changed. It must now only return a list
of items(each item in the list can either be a typepath or a solid atom
or a mix of them in any order) that should be inserted into the storage.
Each item is then passed into `can_insert()` to check if it can fit in
the storage.

If your list contains solid atoms they must be first moved
to/Initialized in nullspace so `can_insert()` won't count it as already
inserted. `can_insert()` has now also been refactored to throw stack
traces but explaining exactly why the item could not fit in the storage
thus giving you more debugging details to fix your stuff.

A large majority of changes is refactoring `PopulateContents()` to
return a list instead of simply creating the item in place so simple 1
line changes & with that we have fixed all broken storages(medical
toolbox. electrical toolbox, cruisader armor boxes & many more) that
hold more items they can handle

**2. Organizes initialization of `atom_storage` for storage subtypes.**
All subtypes of `/obj/item/storage` should(not enforced) create their
own `/datum/storage/` subtype under the folder `storage/subtypes` if the
default values are not sufficient. This is the 2nd change done across
all existing storages

Not only does this bring code cleanliness & organization (separating
storage code from item code like how `/datum/wire` code is separated
into its own sub folder) but it also makes storage initialization
slightly faster (because you are not modifying default values after
`atom_storage` is initialized but you are directly setting the default
value in place).

You now cannot & should not modify `atom_storage` values inside
`PopulateContents()`. This will make that proc as pure as possible so
less side effects. Of course this principle is not enforced and you can
still modify the storage value after `Initialize()` but this should not
be encouraged in the future

**3. Adds support for automatic storage computations**
Most people don't understand how `atom_storage` values work. The comment
here clearly states that

55bbfef0da/code/game/objects/items/storage/toolbox.dm (L327-L329)
Because of that the linked issue occurs not just for medical toolbox but
for a lot of other items as well.

Which is why if you do not know what you doing, `PopulateContents()` now
comes with a new storage parameter i.e. `/datum/storage_config`

This datum allows you to compute storage values that will perfectly fit
with the initial contents of your storage. It allows you to do stuff
like computing `max_slots`, `max_item_weight`, `max_total_weight` etc
based on your storage initial contents so that all the contents can fit
perfectly leaving no space for excess.

## Changelog
🆑
fix: storages are no longer initialized with items that can't be put
back in after taking them out
refactor: storage initialization has been refactored. Please report bugs
on github
/🆑
2025-03-23 22:20:23 +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
MrMelbert
1b404098fd Fix some new sound runtimes (#89822)
## About The Pull Request

- This sound was lower than the min


![image](https://github.com/user-attachments/assets/4447ac03-33ea-41f9-9ea6-99e3e0c9725d)

- Mechanical surgery seemed to cause a `null` preop sound runtime. This
fix might be silencing a runtime, I'll have to look closer.

- And `rustle_sound` could be `null`. I think this is actually a
mistake, and the correct way to mute rustling is `do_rustle = FALSE`,
but I feel like we could just delete that var and let people dictate it
by setting it to `null` or not? For a follow up PR nevertheless

## Changelog

🆑 Melbert
fix: You can hear looping computer sounds again
/🆑
2025-03-05 20:46:46 -08:00
SmArtKar
437166c83a Adds fishing bags, resprites fishing lines and bobber (#89300)
## About The Pull Request

Adds two new fishing bags: normal and carpskin. Normal fishing bag can
be bought from the fun vendor in the library, and is capable of holding
up to 10 normal fish (and only fish), but it does not preserve them
unlike stasis containers or portable aquariums. Carpskin fishing bag can
hold up to 14 normal-sized fish and needs to be crafted using 3 carp
skins, but is also capable of fitting fishing lines, hooks and lures.


https://github.com/user-attachments/assets/80e333f5-4388-40c7-a31b-3384b96c21a1

Also resprited four normal reels and the fishing bobber:


![image](https://github.com/user-attachments/assets/d518d5ab-2081-46bb-b088-4f6a2e8be6be)


![image](https://github.com/user-attachments/assets/97f9686c-1209-458a-893a-cd7c2f08f714)

Additionally, while I'm at it I've added the generator aquarium upgrade
to service and science lathes.

## Why It's Good For The Game

There's currently no good way to store smaller fish, especially when
you're planning to use it as bait, so you usually end up making a mess
of the room you're currently in. Carpskin bag is also a good way to
organize your fishing gear without cluttering up your bag.

While the aquarium upgrade is technically only used to generate power,
it doesn't make sense to restrict it to engineering lathe only as its
usually service and sometimes science who do fishing instead.

## Changelog
🆑
add: Added fishing bags, found in fun vendors or made from carpskin.
balance: Added the generator aquarium upgrade to service and science
lathes.
image: Resprited reels and bobber
/🆑
2025-02-01 20:53:01 +01:00
SyncIt21
03203d50f4 Fixes atom_storage breaking pockets when moving its item to hand (#89141) 2025-01-21 19:28:08 +01:00
_0Steven
9d7c406abd Pre-filled test tube rack fixes (#88728) 2025-01-07 14:42:02 +01:00
SyncIt21
fa421c5ff7 Changing gather mode on storage's won't drop its items (#88629)
## About The Pull Request
- Fixes #88606

## Changelog
🆑
fix: Changing gather mode on storage items won't drop it's stored items
/🆑
2024-12-27 18:46:39 -08:00
SyncIt21
9a83905608 General maintenance for RPED (#88074)
## About The Pull Request
 **1. Code Improvements**
- Converted vars for playing RPED sounds into defines & proc overrides.
saved some memory
- Created separate storage type for bluespace RPED(cyborg variant had
the same values so it shares this type)
 - Improved its datum storage code
- Moved RPED into its own file out of stock parts. Better file
organization
 - Autodoc for some procs

**2. Refactor**
- Strictly separates bluespace RPED interaction from normal one. What
this means is
- Removed var `works_from_distance` we now typecheck for bluespace RPED
specifically
- Moved `ranged_interact_with_atom()` from normal RPED into its
bluespace subtype. We now play the beam animation from inside this proc
rather than redundantly checking for its bluespace variant inside
machines `exchange_parts()` & playing it there
- No more snowflacky check for frames. That's handled inside its
`ranged_item_interaction()` proc

Just overall cleaner code

## Changelog
🆑
code: improved code for RPED
refactor: RPED attack chain has been refactored. Reports bugs on github
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-12-16 17:06:35 +01:00
Ghom
7663b39cc8 Refactoring aquariums into components (feat: portable fish tanks) (#87866)
## About The Pull Request
I've been meaning to do this for some time. I need this for
portable/handheld aquariums/fishtanks to be possible. I'll sprite and
code them before I call this PR ready, however suggestions and code
reviews are welcome in the meantime.

Being a pretty heavy refactor, some things might break (we have more
than a few unit tests so perhaps not) while others, coincidentally,
might be fixed without me knowing. Anyway I'm sure this PR fixes
aquarium beauty, which wasn't really working to begin with because the
code was so fucking bad. Nothing really worth of a CL entry tho.


TODO:
- [x] handheld aquariums, craftable with a kit and little plastic or
buyable from the fun vendor ig.
- [x] an aquarium upgrade for handheld aquariums to bypass possible
restrictions.
- [x] update the beauty element to consider items, which shouldn't
contribute to the area beauty when held or otherwise not on a turf.

## Why It's Good For The Game
This should make handheld aquariums possible.

## Changelog

🆑
refactor: refactored aquariums heavily. Please report any fishy bug.
add: Added portable/handheld fish tanks to the game. They can be crafted
with an aquarium kit and 5 sheets of plastic. While portable, they
cannot store fish that are too big or if there're too many already. This
restriction can be removed by using the new "bluespace fish tank kit"
techweb item.
map: Replaced the lawyer's stationary pet aquarium with a fish tank, so
you can carry McGill around.
balance: Reduced the iron cost of stationary aquariums a little.
/🆑
2024-11-21 09:45:49 +13:00
SyncIt21
1df5339db0 Fixes storage & evidence bag pre attack (#87793)
## About The Pull Request
- Fixes #87788

Usually when you force move an item anywhere `obj/item/doMove()` is
responsible for removing the item from the players hand & updating the
visuals. When you move that item from say your pocket to your hand we
call `attempt_pickup()` which also updates visuals.

The one case where these 2 procs don't help is when that item is
equipped from anywhere else but the hand(pockets for e.g) into a storage
medium that is held in hand. For this edge case we have to drop the item
to ground to update the visuals of whatever inventory slot it was
attached to

Now evidence bag uses the storage pre attack mode rather than
implementing its own item interaction thus fixing the visual glitch not
just for it but for all items that have `allow_quick_gather = TRUE`

## Changelog
🆑
fix: Fixed visual glitches when inserting items from an slot other than
the hands into evidence bags & other storages that have quick gather
mode enabled
/🆑
2024-11-14 19:52:04 +01:00
grungussuss
aa53f8aecb evidence bag sounds (#87790)
## About The Pull Request
completes
https://github.com/orgs/tgstation/projects/19/views/1?pane=issue&itemId=84398285


https://github.com/user-attachments/assets/5f4e92eb-3d65-4da7-ba76-24d30f1eddc3
## Why It's Good For The Game
immershun
## Changelog
🆑 grungussuss
sound: evidence bags have more sounds now
/🆑
2024-11-10 17:46:24 -05:00
Fikou
0f684bd7db fixes issues with the separate modsuit part activation (#87482)
## About The Pull Request

generally cleans up the code a bit. fixes the issue where if you had
clothing on yourself already and you tried extending when active it
still went through the sealing process even though it didnt extend the
part, causing weird desyncs. fixes the issues with part enabled modules
that would not activate, makes stealth and radproof modules require the
whole suit to be out cause thinking about it they wouldnt really work
without that i think
reverts quick activation to try put parts on you instead of removing
them as priority, i think that plays nicer with separate part activation

fixes #87413
2024-10-31 12:12:49 -05:00
SyncIt21
475e716bd6 [NO GBP] Fixes drone toolbox issues (#87073)
## About The Pull Request
- Fixes #87071 as in
 a) Dropping a drone tool will put it back in the toolbox again
 b) You can manually put the tool back in the toolbox via mouse click
 c) You cannot dump the contents of the drone toolbox on anything

## Changelog
🆑
fix: you can drop/put drone tools back in the toolbox
fix: you cannot dump the contents of the drone toolbox
/🆑
2024-10-09 02:09:16 +02:00
SmArtKar
057135702d Fixes storage UI breaking upon an observer detaching while having your storage UI open under odd circumstances (#86842)
## About The Pull Request
This is one of the stupidest issues I had the displeasure of working
with and I still do not know concrete details behind the issue because
some of the code introduced in this (supposed-to-be) debug PR
accidentally fixed said issue. Essentially, under odd circumstances of
the user either being SSD or having their storage focus stolen by
something else, an observer who had their storage UI open via
autoobserve could break their UI by moving away because that improperly
removed the user from some lists. This is the primary theory judging
from what fixed the issue, but sadly there is no concrete info behind it
as all attempts to reproduce the bug, both locally and on live, have
failed.

Closes #85259

## Changelog
🆑
fix: Storage UI should no longer (not so much) randomly disappear,
hooray!
/🆑
2024-09-24 19:30:07 +00:00
Ben10Omintrix
4e4a904a3b [no gbp] reverts some unintended duplicate checks (#86674)
## About The Pull Request
when working on #86031 , i added some checks that were already being
handled earlier in the chain, serving nothing. thanks to melbert for
catching these

## Why It's Good For The Game
removes some duplicated checks
2024-09-16 08:42:34 +02:00
MrMelbert
8486f2f7e2 Storage / table interactions at the bottom of the interaction chain (#85512)
Because the wings were in fact made of wax 

## About The Pull Request

Storage goes to the very bottom of the interaction chain, hardcoded in
on `/atom`.
This is not preferred, obviously, but it ends up being a lot less
snowflaking overall.

Tables also go at the very bottom by extending `base_item_interaction`. 

Fixes #83742
Fixes #84434 
Fixes #83982
Fixes #85516
Fixes #84990
Fixes #84890
Closes #85036
Closes #84025 (RMB places it on the table.)
Closes #86616

Other changes:

Refactored pod storage to be less jank. Patches some exploits around it.

## Why It's Good For The Game

Should make a lot more interactions a lot more reliable... hopefully

## Changelog

🆑 Melbert
refactor: Storage and Tables are now a lower priority action, meaning
some uses of items on storage should work... better, now. Here's hoping
at least, report any oddities.
refactor: Note: For an overwhelming majority of items, **combat mode**
will attempt to attack/insert into the target, while **non-combat-mode**
will attempt to use on a target. This means screwdrivering or emagging a
MODsuit must be done on non-combat-mode, as combat mode will simply put
the screwdriver or emag into its storage. Same applies to tables, though
when in doubt, RMB may help (for things which are also weapons, like
mops).
refactor: Refactored escape pod storage, now they actually properly show
as unlocked on red alert and above.
/🆑
2024-09-12 23:48:19 +02:00
Ben10Omintrix
91baa94ac5 event based incapicated and able_to_run (#86031)
## About The Pull Request
this is a revival of #82635 . i got permission from potato to reopen
this, he did almost all the work. i only just solved the conflicts and
fixed all the bugs that were preventing the original from being merged
(but it should be TMed first)

## Why It's Good For The Game
slightly improves the performance of basic mob AI

## Changelog
🆑
LemonInTheDark
refactor: able_to_run and incapacitated have been refactored to be event
based
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: ZephyrTFA <matthew@tfaluc.com>
2024-09-04 10:02:49 -04:00
lessthanthree
594fd069ab Fixes Skub not fitting in Skub box (#86155)
## About The Pull Request

Fixes the exceptions_hold list not being checked when trying to put an
item in the box

## Changelog

🆑 LT3
fix: You can now put Skub back in the Skub box, as intended
/🆑
2024-09-03 17:41:36 +02:00
Ghom
ff3b73dc82 Refactored the fish case and examining fish. New bluespace fish case to fit large fish inside a backpack. (#85271)
## About The Pull Request
I've refactored the FISH_SAFE_STORAGE trait into an element, mainly
because there were a few problems with how it worked: It wasn't stopping
hunger from raising, ditto with the breeding wait, and it offered no
healing whatsoever, which I find kind of a bummer. The new element will
keep the fish from getting any hungrier or ready to reproduce and will
heal them up to 65% of their base health.

Also, I've added a new bluespace fish case as a techweb design, found
along with other stuff in the advanced fishing node, though if you want
I can move it to a bluespace node. This should make it possible to
reasonably store and carry around larger fish.

Examining a fish will no longer give out readings on weight and size if
you haven't at least attempted fishing once (you can get to novice level
in less than a minute). While examining a fish with apprentice level or
higher will also give readings on the general conditions of the fish (is
it starving? drowning? has it lost a considerable chunk of health?). The
fishing skillchip also gives you these traits.

I've also converted two fish variables into traits, because fish have
waaaay too many variables. and gave some topdown shading to the
pre-existing fishbox sprite.

## Why It's Good For The Game


## Changelog

🆑
add: Added a bluespace fish case to the advanced fishing node.
balance: Fish cases will keep a fish from getting hungrier or ready to
reproduce, while also healing it up to 65% health.
balance: Examining a fish with zero fishing skill whatsoever won't give
a reading on its size and weight. Conversely, examining one with the
skill leveled two times will give general information on if it's
starving, sick, hungry, or dead.
/🆑
2024-08-18 06:06:17 -07:00
grungussuss
a4a92eb84c Toolbox, medkit, cardboard box sounds. (#85337)
## About The Pull Request


https://github.com/user-attachments/assets/155210d1-d0ae-404e-b69c-a0d185306db6

### Added container rustle sounds for:
- medkit
- box
- toolbox

### Added container open sounds for:
- box
- toolbox

### De-hard coded container rustle sounds so now you can change the
sound path on subtypes.
## Why It's Good For The Game
- Hearing the same cloth rustling SFX for boxes, toolboxes and medkits,
when they're clearly not made of cloth is immersion breaking, let's fix
that.
- giving players satisfying sounds when they open containers and an
overall diversity of sounds will reduce ear fatigue
- rustle SFX were previously hard coded and you couldn't change them or
change the `vary` boolean, we should keep the code customizable and
allow contributors to add more rustle sounds by implementing this
framework.
## Changelog
🆑 grungussuss
sound: added rustle sounds for: toolbox, medkit, box
sound: added open sounds for: toolbox, box
code: added support for giving container items rustle sounds
/🆑
2024-08-14 13:46:51 +02:00
SmArtKar
2e8f45737c Players can now reorder items inside storages by dragging them (#85318)
## About The Pull Request


https://github.com/user-attachments/assets/8949965f-a78a-4f3d-b528-afcdfe5c4e72

Drag'n'dropping items inside of an open storage that you can access will
reorder them. I had to register dropping onto items themselves instead
of cells as they ignore icon transparency when in storage for QOL
reasons, so bear with that.
## Why It's Good For The Game

Reordering your storage currently requires taking out all items in front
of position that you want a certain item to be and putting them back in
which could be rather annoying with large storages.

## Changelog
🆑
qol: You can now reorder items inside storages by dragging them
/🆑
2024-07-31 14:58:43 +01:00
Vekter
5b23db8a2c Fixes exploit allowing players to open Bag of Holding rifts in the Heretic dimension (#85330)
## About The Pull Request

This PR prevents players from opening a BoH tear in the Heretic
dimension areas. It also introduces a new area flag, "NO_BOH", which can
be added to areas to replicate this behavior.

## Why It's Good For The Game

This prevents the (very unlikely) edge case that someone manages to open
a BoH tear in one of the funny hand rooms, which is bad not only because
it fucks over anyone else who gets sacrificed, but could also interfere
with other things on that z-level (shuttles, other Lazy Template areas,
etc).

Messing with some new code here, so if there's better ways to handle
this, by all means, chime in. This is a much more elegant method than
just banning anything but the station.
## Changelog
🆑 Vekter
fix: Fixes an exploit that allowed players to open a Bag of Holding rift
in the Heretic dimension.
/🆑

---------

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
2024-07-28 21:26:34 -06:00
SyncIt21
976c830a5b Fixes runtime with storage datum & portable chem mixer beaker insertion (#84966)
## About The Pull Request
- Fixes this when hiding the storage ui
![Screenshot
(436)](https://github.com/user-attachments/assets/a5e2e512-bbf6-4b55-a7e4-01a9e89afe39)

- Fixes #84963

## Changelog
🆑
fix: fixes runtime in storage datums when hiding the ui
fix: you can insert the withdrawal beaker into the portable chem mixer
when locked
/🆑
2024-07-17 20:29:49 +02:00