## About The Pull Request
<img
width="612" height="185" alt="dreamseeker_SNMvxqCRiR"
src="https://github.com/user-attachments/assets/1d3103e9-edc1-4e50-8793-c8c2ace53aea"
/>
This is a small expansion to narcotics, their production, and presence
in the game! For my esteemed Terry and Manuel/Sybil sector colleagues
I've added:
- 2 new solid drug items: **crystal meth and opium**!
- A **precipitation reaction** for meth after it's been cooled,
producing a solid crystal form, 2u sulfuric acid, 10u meth. **Above 90%
purity, the meth will gain an increasingly blue tint!**
- A production method for opium! Slice a well developed poppy pod with
any sharp item, **before it's fully mature and flowered** to extract a
small amount of opium to enjoy! It's a small container for morphine. Can
be pressed together to combine the concentrations up to 10u, as each
extraction contains trace amounts. Scales off poppy's potency.
- Populated narcotics/contraband spawners with new items, and items that
really should have been on there.
- Added a brand new smoking apparatus, the glass pipe! Can be crafted.
Fixed the transparent pixel.
- **Fixed methsplosions so that now spacemen can finally smoke meth
without exploding!!!** Omegaweed too. Normal methsplosions are
untouched!
- **Expanded the ability for players to insert all drug items into
pipes**, so now players can smoke moon rocks, SaturnX, and my new items!
Previously, only 'dried' items were.
- Fentanyl patch box for narcotics spawner, also for a new ruin I've
made.
- **Expanded these changes to the black market uplink.**
<img width="640" height="256" alt="demo"
src="https://github.com/user-attachments/assets/c8a0eb2c-b0fa-4e70-b6c1-2e741cd170a2"
/>
Now, players can precipitate meth into a solid form, and produce opium.
I added a lot of these substances and the ones that didn't exist into
spawners that they were partially in, or could reasonably be in. The
opium poppy extraction required a new variable that can be used for
similar interactions too. Crystal sprites are transparent, smoked sprite
has a nice little animation and glow.
These items are now on the black market uplink, in both expensive dealer
shipments of varying rarities for different narcotics, as well as
personal use quantities on a different rotation, at a steeper price.
Expanded randomized spawners to give the black market and ruins more
teeth and edge, without adding another weapon.
Credit to the moon rock guy, I'm just happy I made your stuff smokable!!
<img width="219" height="201" alt="dreamseeker_N8x9bsN3kS"
src="https://github.com/user-attachments/assets/64d23c27-92b9-423b-91ac-903b8476d0b4"
/>
tl;dr added opium and meth
## Why It's Good For The Game
For **too long**, narcotics, chems and stims have been mere integers or
buffs/debuffs in pills or syringes, so I introduced two new methods for
making them and populated niche, criminal vectors with them. These are
real items now, with more interactions. Allowing these to be smoked also
allowed moon rocks and SaturnX to be smoked too, including them into
this and enticing players to have another reason to make them as well.
Buffs with drawbacks, addictions and problems are actually great.
It's a new venue for flavor. I've put thought into the balance for
addition and quantity. It'll add a criminal, or exotic tone to a round,
provide new business opportunities, and new access to stims and chems
without going over the top. Perhaps something peaceful antagonists can
do. More proverbial floor pills give security or command something to
selectively enforce, and absolutely provide novel opportunities for
medical staff!
Also, methsplosions now don't happen in cigarette items! You can smoke
omegaweed without fucking dying!
## Changelog
🆑
add: Added meth, opium, and their production! Also added to black market
uplink.
add: Added a craftable glass pipe.
add: Added to contraband spawners.
qol: Can now insert any drug item into a pipe.
fix: Spacemen can now smoke meth without exploding!!
/🆑
---------
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
## 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.
/🆑
## 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
https://github.com/tgstation/tgstation/blob/55bbfef0da70d87455ca8d6fd5c95107eb8dbefb/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
/🆑
## About The Pull Request
This box type has a maximum of 3 slots, and can be hidden beneath
floortiles. It can be crafted by *jump emoting ontop of a regular, empty
box.
https://github.com/user-attachments/assets/d7ab52ec-2b47-4ab4-b2af-05ce00b0ae4bhttps://github.com/user-attachments/assets/30dd5de3-1f4d-4cb4-8d9c-8625379e76bf
## Why It's Good For The Game
Hiding beneath tiles is a fun, yet not broken method of stowing
contraband. The toiletbasin or moisturizer trap remains a better option,
so I want to open up the space between the floorboards as quick
alternative for stowing or making cache drop-offs.
Smuggle satchels have a lot more going for them than their ability to be
hidden beneath tiles, so I don't feel like this is intruding on their
turf.