Commit Graph

255 Commits

Author SHA1 Message Date
Bloop 2ab2be0f37 Guards against qdeletion in afterattack (#94211) 2025-12-10 11:33:06 +01:00
Ghom 0b0c5ea91e Unit test material checks are now performed on all crafting recipes by default. All stack recipes now transfer mats to the results (#92620)
## About The Pull Request
Extends the part of the crafting unit test that ensures consistency
between the total mats of the components of a recipe (or rather, the
result of said recipe) and a generic instance of the same type as its
result, previously only implemented on food recipes.

## Why It's Good For The Game
This ensures a degree of consistency with the material composition of
various objects in the game. I couldn't do it in the original PR as that
one was too big already and it took months to get it merged, and have
the relative bugs fixed.

Currently a WIP as I slowly deal with the unit test reports.

## Changelog

🆑
refactor: Follow-up to the crafting/material refactor from months ago.
All objects crafted with stacks now inherit their mat composition (not
necessarily the effects and color) by default, while previously only a
few things like chair, sinks and toilets did. Report any object looking
or behaving weirdly as a result.
fix: The material composition of ammo boxes is no longer a 1/10 of what
it's supposed to be. It was a shitty hack to make it harder to recycle
empty ammo boxes. Instead, they lose materials as they're emptied now.
/🆑
2025-12-02 18:29:01 -05:00
SyncIt21 39a196824a Enhances algorithm for finding an atom mount (#94076)
## About The Pull Request
Depends on #94064 for the unit test but offers a better method for
finding an atom to mount on
- Finding a mount now takes into consideration the objects pixel x & y
offsets meaning diagonal mounting is now supported. Gives great
flexibility for mappers
- If you don't want to use pixel offsets but default back to using the
objects direction that behaviour is still preserved. Useful if your
object uses directional icon states(lights & cameras for now) AND don't
use offsets
- If no direction could be specified then as the last resort it defaults
back to the objects local turf for mounting

## Changelog
🆑
fix: all mounted objects on tables, fences, windows & walls should fall
of correctly when the atom it is placed on is destroyed
fix: security telescreen now falls off when their mounted wall is
destroyed
fix: defib wall mount falls off when their mounted wall is destroyed
fix: floor lights are mounted to the ground/catwalk/tram floor they are
sitting on meaning destroying it will destroy the light
fix: wall mounted plaques now fall off when their mounted wall is
destroyed
/🆑
2025-12-01 00:50:16 +01:00
MrMelbert 5765f259ef Fixes human skeleton pirates, Refactors ghost spawns (#94138)
## About The Pull Request

`create_from_ghost` can be called from stuff like... dynamic executing a
ruleset, so putting a sleep/user input within it causes problems

So I refactored ghost spawns a fair bit, creating a clear delineation
between where you can and can't put user input

## Changelog

🆑 Melbert
fix: Pirates will no longer randomly spawn as human
fix: Servant Golems have numbered names again
refactor: Refactored ghost spawns (like spider eggs or pirate spawners),
report any oddities
/🆑
2025-11-25 19:52:19 -07:00
Bloop 183c5af2e4 Adds flag for virtual areas, fixes being able to send funds from virtualspace to real accounts (#94071)
## About The Pull Request

Fixes https://github.com/tgstation/tgstation/issues/90641
Fixes https://github.com/tgstation/tgstation/issues/88366

Eliminates worries over virtualspace currency being sent to real
accounts.

When I was looking into why there were no flags for bitrunning areas.
Then I saw this mess:

<img width="929" height="889" alt="Code_2we2QjDyFp"
src="https://github.com/user-attachments/assets/8a807bfe-b566-4057-a8ea-2b306325687d"
/>

Not having enough space / being too lazy to refactor this is a silly
reason to not include flags for something like these virtual areas where
it can be quite helpful. Fortunately I am not too lazy ~~in this
moment~~ so here we go:

It was fairly logical to move over some of these to a separate flag,
which I've called `area_flags_mapping` since they pertain to maploading
things and terrain generation mostly. `area_flags` stays reserved for
general properties and now has more room than it did before for you
people to fill it with.

In doing this it's also neatened up the code quit a bit, as UNIQUE_AREA
was kind of everywhere and now that it's implied by default less areas
need to have it defined (or explicitly un-defined).

<details> <summary> Working as intended </summary>

<img width="787" height="448" alt="dreamseeker_p0Qts36tG1"
src="https://github.com/user-attachments/assets/25056f34-8d43-4be2-a293-e53df7a7d1db"
/>

<img width="383" height="59" alt="dreamseeker_Ek7TXCcpbA"
src="https://github.com/user-attachments/assets/89622974-9467-4cdb-8345-d684f7c9004b"
/>

</details>

## Why It's Good For The Game

Fixes an exploit, improves the area flags situation slightly.

## Changelog

🆑
fix: you can no longer send money from virtualspace to a real account
code: adds a flag for virtual areas so they can easily be checked, as
well as an easy helper proc, 'is_area_virtual(your_area)'
/🆑
2025-11-22 12:24:41 -07:00
Thunder12345 006605caf9 Adds time defines to a couple of shooting related delay vars (#93966)
## About The Pull Request

Converted `fire_delay` and `shot_delay` vars to use time defines

## Why It's Good For The Game

Code readability

## Changelog
🆑
code: Converted some gun related variables to use time defines, make an
issue report if anything shoots abnormally fast/slow.
/🆑
2025-11-17 23:22:34 -07:00
FalloutFalcon c36bcabe8b Non-tiled floor dont have tiled water overlays (#93853)
## About The Pull Request
changes tiled_dirt to just tiled_turf and expands its use slightly to be
the "i have a 2x2 tile sprite"
<img width="864" height="691" alt="image"
src="https://github.com/user-attachments/assets/78a7ba96-fffe-42e1-9eef-35b96b22481b"
/>


https://github.com/user-attachments/assets/7a273302-a331-48b2-a06f-d65bddf13bfd

## Why It's Good For The Game
its silly for things that arent visually tiled to use the tiled water
sprite
## Changelog
🆑
fix: stuff like carpet and wood tiles dont use the 2x2 tiled sprite
fix: similarly, floors that dont use the tiled sprite now can have
permafrost sprites (as they are not tiled)
/🆑
2025-11-09 23:59:27 +01:00
MrMelbert e9339f4f7e You can't use null as a grouped status effect source (#93782)
## About The Pull Request

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

1. Grouped status effects will throw a stack trace if trying to pass
null as a source
2. Fishing hooks will not proceed to hook if they fail to hook (lol)
3. Replaced cursed slot machine "grouped effect" with a normal effect
(since it didn't use the group aspect at all)

## Changelog

🆑 Melbert
fix: Fishing hooks will no longer hook even though the hook failed
/🆑
2025-11-07 03:08:43 +01:00
EnterTheJake a2c7c8e57b Heretic Antagonist Full Overhaul. (#92119)
## About The Pull Request

Heretic has received a complete overhaul. This PR touches nearly every
aspect of the antagonist. For readability's sake, not every change is
going to be listed in this pull request.

For the full list of changes please refer to the design doc:
https://hackmd.io/@BiST8PJVRjiwVPY86U3bLQ/B11HyChz1g.

Code by Me, @Xander3359 and @Arturlang 

TGUI by @Arturlang 

Sprites by OrcaCora and GregorDM

Writing bits by @necromanceranne 

### Core changes

- Cross-pathing has been removed. Main knowledge spells are now
exclusive to their path (for the most part).

- For every main knowledge unlocked (save for the robes and the blade
upgrade), Heretics can choose one option from a draft of 3 random side
knowledges (this is a free point).

- Heretics can now purchase side knowledges from a new tab, the
"Knowledge Shop". Side-knowledges have been divided by tier (Stealth,
Defense, Summons, Combat and Main). Tiers are unlocked as you progress
toward your main path.

- Heretics now gain the grasp and mark upgrade immediately, but their
main knowledge choices cost twice as much (except for the first spell,
the robes and the blade upgrade).

- Path specific robes have been introduced! They come with their own set
of quirks.

- Each Path has received a passive ability. This passive is upgraded
when you first create your robes, and again when you complete the Ritual
of Knowledge.

- Paths have been rebalanced as a result of the removal of cross-path
progression. Cosmic and Moon paths have received soft reworks.

- Upon unlocking the path 2nd level or reaching a total of 8 points
worth of knowledge, Heretics will lose the ability to blade break (and
the limit on blades all together).

- Ascension now automatically calls the shuttle with no possibility of a
recall.

- Late join Heretic has been removed.

### New UI 
<img width="750" height="635" alt="moon path ui"
src="https://github.com/user-attachments/assets/184ef783-5c9c-48a1-a2f7-4807ca93e990"
/>


### Knowledge shop

<img width="787" height="669" alt="Knowledge shop"
src="https://github.com/user-attachments/assets/3dc89b84-8c70-4d47-b612-54396e3ea6e7"
/>




### Quality of life //General balance changes

- Heretics will now gain X-ray vision for a few seconds when nearby an
eldritch essence (this effect has a cooldown).

- Ritual of knowledge now requires 1 uncommon item instead of 2. You may
now use a stunprod instead of a baton to complete the ritual. Beartraps
have been removed from the list of possible reagents.

- The maximum number of possible sacrifices required to ascend has been
reduced from 6 to 5 while the minimum has been upped to 4.

- Codex Cicatrix no longer requires a special pen to be made.

### Passive abilities

- Heretics now start with a passive ability. You can find what it does
on the path info tab after a path has been selected, and what they gain
when upgraded.

- Crafting your first set of Eldritch robes will bump your passive to
level 2.

- Unlocking the 2nd level will subsequently unlock your "Ritual Of
Knowledge"

- Completing the ritual of knowledge or ascending will net you the final
level.

### Path Specific Robes

- Armorer's Ritual is no longer a side knowledge. Each path will have
their own unique version of the ritual. This is placed after the 2nd
spell in the tree.

- Robes can no longer be destroyed by fire and acid, grant t4 flash
protection (Moth Heretics stay winning) and protection against basic
syringes, to bring them on par with other antagonist's armor sets.

- The recipe to craft the robes is now a set of armor/vest, a mask (any
mask will do now, not just gas masks), plus the unique reagent required
for the blades (Plasma for Cosmic, Trash For Rust, match for Ash and so
on)

- Wearing the robes as a non-heretic may yield some unfortunate
side-effects.

### Moon Path Rework

Moon path  rework.

Moon Heretics gain immunity to brain traumas and slowly regenerate brain
health. Equipping the moon amulette channels its effects through the
moon blade; making it unblockable and cause sanity damage instead of
brute. Ring leader's Rise now summons an army of harmless clones that
explode when attacked; the explosion briefly stuns non-heretics and
cause sanity and brain damage to them. Moon blade can also now be used
when pacified and Moon spells are no longer blocked by regular anti
magic, only mind magic protection.


**Cosmic Path Rework**

Cosmic path has received the biggest batch of changes alongside Moon.
The path has been dead last in ascension and pickrate (less than 5%) for
almost 2 years. It did gain some popularity over the last few months,
reaching the highest ascension rate in the game (12%) while mantaining a
relatively low pickrate.

Cosmic sits in a weird spot, where pretty much every knowledge
surrounding the path is either mediocre or, in the case of the
ascension, dysfunctional. Yet it has maintained a smidge of relevancy
due to how quickly Cosmic heretics can capture and sacrifice targets
thanks to Star Touch.

As a result, the best course of action would be to rebalance the
entirety of the kit; granting the heretic more tools to manipulate space
and dictate the flow of a fight, while lessening their ability to end a
confrontation by instantly sleeping their opponents.

lastly The Star Gazer is now ghost controlled ; And they shoot lazers!

<img width="636" height="451" alt="gazer gag 3"
src="https://github.com/user-attachments/assets/601d6881-c042-4e42-8ce6-ac90cd27848b"
/>


## Why It's Good For The Game


### Ok...but why do we want this?

Again, if you want my full reasoning, please check my doc
https://hackmd.io/@BiST8PJVRjiwVPY86U3bLQ/B11HyChz1g.

To keep it short and concise; Heretic is too complex and unintuitive for
its own good. Too impenetrable for new players and too abusable for
experienced players. This can be chalked up to a lot of poor design
decisions. But ultimately, what I believe being the biggest contributor
to the current status of Heretic is the ability to move into different
paths, also known as "Cross-Pathing".

### Cross Pathing my beloathed.

Cross-pathing, while cool in theory, overcomplicates the antagonist and
overloads them with power. Players dealing with the heretic are
incapable of working out what a given heretic can do. This also leads to
late game heretics having 3 rows Worth of action buttons and virtually
no weakness.

Over the last year, I've often received the understandable but also kind
of unfair accusations of making Heretic too powerful without a clear aim
or purpose.

My goal with the paths I've reworked over the last year (Rust,Void and
Blade) wasn't necessarily to just make them stronger (although that was
also part of the goal, as they were paths that were underperforming),
but for them to have more interactions with the sandbox and to better
live up to the fantasy presented to the player.

If an harbringer of frost gets countered by a cup of coffee, we probably
messed something up.


Unfortunately, the current incarnation of Heretic doesn't really allow
for surgical balance changes to specific paths. Every time a knowledge
gets buffed, we make every path that can easily tap onto that knowledge
stronger by default. It doesn't take a genius to understand why this
system is ultimately unsustainable.

### Blade Breaking

I feel that after a heretic has reached the near peak of their power,
they no longer need the ability to instantly escape any encounter. Check
my doc for my full reasoning.

## Less versatile, more specialized paths.

By removing cross-pathing, we remove a huge maintainability burden from
the antagonist. Paths can now be designed around clearer strengths and
weaknesses. They become easier to balance and less of an headache to
understand for everyone.

It also means we can give paths some needed quality of life quirks
without having to worry how such a change might have a knock-on effect
for other paths.

Ash heretics can finally let loose without dying by their own flames.
Cosmic Heretic can go to space without having to carry a modsuit. Moon
Heretic can use their abilities without fear of one random trauma
ruining their day, and so on.

### What a horrible night to have a curse...., wait how do I curse
people again?

As of right now the heretic tree has quite a hefty amount of trinkets
that pretty much never see use.

Partly because the tree itself is a nightmare to navigate. And partly
because why would anyone set up an elaborate plan or scheme when they
can unleash 2 rows of spell in the span of bunch of seconds.

Heretics mostly gravitate towards powers that push them towards greater,
more potent combat strength. If it doesn't contribute to killing people
quicker, it isn't worth doing for most. And given the opportunity cost
associated for taking those powers, they will remain that way so long as
there are better choices to be poached.

The new draft system encourages Heretics to play more with the tools at
their disposal. If you want to go for a specific combo from the side
path options, you may now do so by tapping into the knowledge shop.

Yes, the shop does include a few knowledges from the other paths. But
these are limited to 1 per path, are very expensive and can only be
unlocked very late into the shift.

## Drip Of the Mansus

The iconic heretic robe is actually sequestered to a side path that is
most easily access by only two paths at a time. Since heretic paths are
being made to be much more specialized, the most obvious way in which
this can be showcased is through an easily
identifiable outfit.

By using the robes, we can both telegraph WHAT heretic you are looking
at, and just how much power they've accumulated and when it is
reasonable to take the kid gloves off and treat them as a genuine
threat. If a heretic is in their
robes, that heretic is now a significantly more prominent danger to the
station.

It also serves as a useful means for gating some of the more powerful
effects of a heretic's path behind the robes, AND enable options for
disarming them of that power should they be captured without making it
something endemic to their mob.

A major problem with heretics is a lack of certainty as to how powerful
they have become. A heretics robes is one of the milestones to help
players dealing with heretics identify that.

### Will this be 100% fair and balanced?

This is a massive overhaul to a pretty complex and bloated antagonist.
I've done my best to show the changes to several maintainers and other
members of the community for their feedback. But at some point we'll
have to see how this behave in the environment to get a feel if
something is over or undertuned. (that's my way of saying, yes this is
likely gonna require a testmerge or two).

What I will say is that I'm not trying to change the core identity of
Heretic.

Heretics should have the upperhand in single encounters early on, be
able to joust a small group of players after they unlock their final
spell, and end the round when they ascend. They're a progression
antagonist. They should retain their payoff as well as pose a danger as
they grow stronger.

But if more players feel like they are more reliably able to play the
antagonist in more varied and interesting ways, rather than the
antagonist largely existing as a measuring stick for 'robustness' due to
its elitist design philosophy, then the rework has been a success. There
should be something for
everyone in the antagonist, as is true for all of our antagonist roles.
2025-10-15 22:34:51 +00:00
Bloop 0e06e2f48f Adds the 'mob_possessor' argument to all the instances of special() (#93410)
## About The Pull Request

a spooky special possession pr for october appears~~

(This is just some code cleanup)
Before, some procs had the `mob_possessor` arg, and some didn't. Which
made it a nightmare to add more positional args to it down the line.
This PR just ensures that all positional args are present in all the
instances of the proc.

## Why It's Good For The Game

Makes this proc chain slightly less of a mess to deal with.

## Changelog

N/A
2025-10-14 22:34:50 +02:00
die 0204ab8fdd Canreach refactor (#93165)
## About The Pull Request
ports https://github.com/DaedalusDock/daedalusdock/pull/1144
ports https://github.com/DaedalusDock/daedalusdock/pull/1147

full credit to @Kapu1178 for the juice

instead of `reacher.CanReach(target)` we now do
`target.CanBeReachedBy(reacher)`, this allows us to give special
behavior to atoms which we want to reach, which is exactly what I need
for a feature I'm working on.
## Why It's Good For The Game
allows us to be more flexible with reachability
## Changelog
🆑
refactor: refactored how reaching items works, report any oddities with
being unable to reach something you should be able to!
/🆑
2025-10-07 20:28:59 +02:00
MrMelbert 3ea7b03369 Accentuate the positive with **Personality**: A (soft) mood rework (#92941)
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2025-10-02 19:00:13 +00:00
John Willard 3cb0b239b7 Merges ghosts into spirits & a rework (#92879)
## About The Pull Request

Having 2 different species with similar names, looks, attributes etc.
seemed like it would be confusing so I thought we should probably trim
it down to 1, however since I'm doing that I thought of other changes to
go along with it:

- The passthrough ability was replaced, now while you're passing through
things you no longer drop stuff, but you put a tombstone where you start
phasing, and are pulled back to it while done. You still can't interact
with anything in this form. Having the tombstone dug out will be raiding
your grave, so you'll be pulled out as a dead skeleton.

- Removes holy water interactions

- Ghosts now have organic limbs & are a Humanoid, so they can have
surgery and other forms of healing used on them.


https://github.com/user-attachments/assets/5db0c204-0070-466b-8b6c-1702ff0fd94e

## Why It's Good For The Game

Ghosts being available to Wizards is okayish but is a rather big buff
for one you get free, yes you can still be caught up to if you're in
hallways and such but it's way easier to get away with than like, your
default teleport scroll even. Being available to Miners though was a big
mistake because it opened them to be quite an annoyance with it. The
only counter was the fact no healing worked on them, which I don't think
is how it should be balanced.
I thought I could trust players with such tools but apparently I had too
high hopes.

Anyway this makes it more bearable for it to be given out at the low
cost it currently is at, it's still good as flavor, to spook people or
ghost around, and I think while it doesn't make 100% sense why you lose
access to your hands, inventory, and UI when you supposedly "drop" your
tombstone, I think it's still a good advantage for "scouting", sorta
like a lesser spirit realm rune.

Closes https://github.com/tgstation/tgstation/issues/91849

## Changelog

🆑
del: Merged ghosts and spirits into one species.
balance: Spirit's passthrough ability is now tied down 7 tiles from a
tombstone, but is no longer affected by holy water nor does it make them
drop their equipped gear.
balance: Ghosts can now be healed.
/🆑
2025-09-12 16:55:47 +02:00
Thunder12345 d1b8145ad2 Icebox ruin: RoroCo glove factory (#92473)
## About The Pull Request

Adds a new surface ruin to icebox, the RoroCo factory. Contains a couple
of puzzles, and a small amount of loot in the form of ~~3 total pairs of
insulated gloves~~ a pair of insulated gloves, two adorable roros and a
cool unique labcoat. Just don't ask where the gloves come from...

Puzzles can of course be avoided/brute-forced by breaking down the walls
but that's for chumps.

<img width="1152" height="1024" alt="Space Station 13 2025-08-06 221903"
src="https://github.com/user-attachments/assets/21050aa6-9b27-494d-a949-7496aeda18cf"
/>

## Why It's Good For The Game

The upcoming 1x3 icebox surface calls for more ruin content to help fill
that space.

## Changelog
🆑
add: A new insulated glove factory has popped up on the ice moon.
add: Freezer floor tiles now come in the full range of shapes.
/🆑
2025-08-15 00:10:01 +00:00
Thunder12345 260960d6f4 Converts a bunch of time/delay vars to use time defines (#92495)
## About The Pull Request

Converts as many time vars expressed in deciseconds as I could find to
use time defines.

## Why It's Good For The Game

Makes these values neater and more readable.

## Changelog
🆑
code: Converted a lot of time-based variables to be expressed with time
defines.
/🆑
2025-08-12 18:30:25 -04:00
SyncIt21 0b6101a37e General maintenance for vending machines (#91987)
## About The Pull Request
**1. Code Improvements**
- Removed unused vars `coin`, `bill` & other stuff
- Removed duplicate definition of `on_deconstruction()`
- Autodoc for a lot of procs
- Merged smaller procs into larger ones to avoid scrolling in the code
editor & reduced overhead
- Split the vending machine file into several smaller files for easy
code management

**2. Qol**
- Implemented vending machine ads. They now display random stuff on the
UI


https://github.com/user-attachments/assets/9720ea60-f268-4ca2-940d-243e3d0ac75f
- More error messages for custom & normal vendors as to why an item
could not be loaded
- Custom vending machines can be deconstructed safely via crowbar
without any explosion only after unlinking your account from the machine
else you get the same explosion. Upon deconstruction all loaded items
are moved into its restock canister meaning the machine can be safely
moved with all its products just like a regular vending machine to a new
location

**3. Fixes**
- Fixes #81917. Any returned items in the vending machine now show up as
free in the UI & won't cost credits to buy them
- Fixes #87416. Custom & normal vendors now keep track of products
removed via `Exited()` so the UI gets always updated
- Fixes #83151. Items with different names & custom prices now show up
in unique rows
- Fixes #92170 Custom vendors now show the correct icon for inserted
items
- Closes #80010. From the above fix this situation is impossible so it's
safe to close this as a duplicate
- Closes #78016 same problem as above with `Exited()` duplicate
- Custom vendors can now actually be used by players who are not the
owner instead of locking down the UI
- Vending machines keep track of `max_amount` of stocked items by hand
as well & not just RPED

**4. Refactor**
- Separates custom vending machine code from normal vending machine
code. This prime Marely focus on the `vending_machine_input` list which
now only exists inside the custom vending machine
- Compressed the UI code for vending machine so both custom & normal
vending machines can send the same data instead of separating the 2.
Overall less code
- Moved attack chain from `attackby()` to `item_interaction()` for
loading items

## Changelog
🆑
code: cleaned up vending machine code
qol: vending machines now have more product slogans you never heard
before
qol: custom & normal vending machines now have more feedback on why an
item could not be loaded
qol: vending machines now display random ads on the UI
qol: custom vending machines can be deconstructed via crowbar safely
only after unlinking your account from the machine.
qol: upon deconstructing a custom vendor all its products are moved into
its refill canister & it will be restored when reconstructing the
machine elsewhere
fix: Returned items to the vending machine now show up as free in the UI
and won't be greyed out if you don't have credits to get them back
fix: items that leave the vending machine by any means will update the
UI in all cases
fix: loading items by hand to the vending machine now respects the
max_amount for that category
fix: custom vendors can now actually be used by players who are not the
owner thus enabling them to transfer credits to the owner during
purchases & basically they do their job again
fix: custom vendors now show the correct icon for inserted items
fix: Items with different names & custom prices now show up in unique
rows in custom vendors
refactor: separated custom & normal vending machine code. Reduced UI
code & improved attack chain
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2025-08-11 14:37:13 +02:00
Arturlang 0bc42d6940 Fixes the issue of usr pointing to admins by making Trigger pass down clicker (#92354)
## About The Pull Request
Fixes the issue of usr pointing to admins by making Trigger pass down
clicker, as usr is fucky and can be passed down by other unrelated
procs. Fun.
Added the clicker arg to all usages of Trigger as well
Also changes isobserver check in antagonist ui_act code that prevents
observers from clicking UI's instead to check if the ui.user is
owner.current
## Why It's Good For The Game
Fixes admins giving heretic to people opening the heretic UI for the
admin instead
2025-08-05 22:58:40 -05:00
MrMelbert d838bff525 Adds some throwing datum nullchecks (#91720)
## About The Pull Request

A few places seem to call `hitby` or `throw_impact` without a throwing
datum to mimic the effect of colliding with something, which is cringe,
but I guess we should support it.

So we need to nullcheck for `get_thrower`, else it runtimes and cancels
the whole proc.

## Changelog

🆑 Melbert
fix: Glass shards from colliding with vendors or glass table hurt you
again.
/🆑
2025-06-20 11:25:16 -06:00
SyncIt21 ff13dcadab Stacks check for invalid amounts (#91656)
## About The Pull Request
Alleviates #91603

As in it does not fix it because i have not been able to reproduce it.
It now checks for invalid values and defaults to `amount`(which is 1)
during `Initialize()` and not null so we don't have to pass the number
`1` when creating a single sheet.
 
A stack trace is thrown for <= 0 sheet amounts so we can debug & fix
stuff

## Changelog
🆑
code: stacks error on invalid amounts, removed manual passing of number
`1` when creating a single stack in many cases
/🆑
2025-06-18 15:28:35 +02:00
Roxy 1f52245e54 Un-hardcode door ID on derelict vault door computer (#91528)
## About The Pull Request

Change the code for the Russian derelict vault to use a var instead of
having a hardcoded value for the door ID to link to, also change the
default value to a define

## Why It's Good For The Game

Enables mappers and var editors to make use of these things for
shenanigans

## Changelog

🆑
code: the russian derelict vault computer now uses a variable for the
door id
/🆑
2025-06-11 19:40:45 -06:00
Ghom 14fb86e3e8 Mutation code cleanup, mutations now have sources to avoid concurrency problems. (#91346)
## About The Pull Request
This PR aims to clean or bring up to date portions of code about dna,
the dna console and mutations. This includes taking care of or removing
some of the awful choices like the pratically useless
`datum/mutation/human` pathing, or the class variable, in favor of using
sources to avoid potential issues with extraneous sources of a mutation.

The files changed are over a hundred just because I removed the
`datum/mutation/human` path, but the actual bulk of the code is mainly
shared between the datum/dna.dm, _mutations.dm and dna_console.dm.

## Why It's Good For The Game
Mutation shitcode is hurting my future plans for infusions a little.
Also it's a much needed refactor. Drafted 'till I'm sure it works
without issues.

## Changelog

🆑
refactor: Refactored mutation code backend. Report any issue.
/🆑
2025-06-08 13:57:10 +02:00
Bloop 4250ecb14c Removes a couple of duplicate gag map_icons + fixes the gags_recolorable component + most lootpanel gags previews (#91341)
## About The Pull Request

Turns out there were a couple of black mask subtypes that I missed as
well as a prisoner uniform subtype.

Also fixes some bugs that are not related to the map icon pr to further
improve the situation with GAGS previews.

## Why It's Good For The Game

Smaller .dmis, working previews

## Changelog

🆑
fix: spraycan can now be used to recolor the gi, glow shoes, striped
dress, H.E.C.K. suit
fix: most GAGS items should now be showing up in the lootpanel again
/🆑
2025-06-01 19:44:15 -07:00
SmArtKar b4061f1800 [MDB IGNORE] Blood Refactor Chapter 2: Collector's Edition (#91054)
## About The Pull Request

Refactors most of blood handling code untouched by #90593 and completely
rewrites all blood decals, components and reagents.

- Blood types now have behavioral flags which allow them to control
where they leave decals/DNA/viruses. Oil no longer transfers DNA and
viruses with it, while podpeople water-blood doesn't leave visible
decals on turfs and items, but still can be picked up by DNA scanners.
- Multiple blood types have received unique handling - liquid
electricity blood now glows in the dark, oil trails are flammable and
lube ones are slippery. Oil blood can be restored with fuel, lube with
silicon and slime with stable plasma (as normal plasma already passively
regenerates their blood), instead of everything using iron. Saline
solution only supplements on iron-based blood and won't do anything to
help with bloodloss for species who rely on different blood types.
(Roundstart this applies only to Ethereals)
- All blood logic has been moved away from the blood reagent itself into
a blood element that is assigned to the blood reagent by default, and to
any reagent that's drawn from a mob as their "blood" (in
``transfer_blood_to``). This means that blood you draw from lizards will
be green and have lizard's blood description instead of mentioning red
blood cells, Ethereal "blood" will actually contain their DNA and genes,
etc.
- Refactored all blood decals. Blood states are no more, everything is
now handled via blood DNA. Credits to MrMelbert and Maplestation, as a
significant amount of code has been taken from
https://github.com/MrMelbert/MapleStationCode/pull/436 and many of his
followup PRs. Oil and xenomorph splatters are now subtypes of blood,
blood drying is now animated, blood trails now curve and can be
diagonal.
- Rewrote bloodysoles and bloody_spreader components, credits to Melbert
again for the former, while latter now makes more sense with its
interactions. Bloody soles no longer share blood DNA with your hands.
- Ported Melbert's bloody footprint sprites and bot-blood-spreading
functionality.
- Removed all species-side reagent interactions, instead they're handled
by said species' livers. (This previously included exotic blood
handling, thus the removal)
- Slightly optimized human rendering by removing inbetween overlay
holders for clothing when they're not needed.
- Blood-transmitted diseases will now get added to many more decals than
before.
- Cleaned up and partially refactored replica pods, fixed an issue where
monkeys/manipulators were unable to harvest mindless pods.
- Exotic bloodtype on species now automatically assigns their blood
reagent, without the need to assign them separately.
- Clown mobs now bleed (with colorful reagent instead of blood during
april fools), and so do vatbeasts (lizard blood)
- Implemented generic procs for handling bleeding checks, all sorts of
scanners now also correctly call your blood for what it is.
- Podpeople's guts are now lime-green like their organs, instead of
being weirdly greyish like their water-blood. (Their bleeding overlays
are still grey, as they're bleeding water)
- Slimepeople now can bleed. Their jelly is pale purple in color, but
their wound overlays copy their body color.
- Injecting/spraying/splashing/etc mob with a reagent preserves its
data, so you could theoretically recycle fine wines from someone's
bloodstream
- Fixed burdened chaplain's sect never actually giving a blessing when
applying effects, and giving a blessing when nothing can be healed.
Inverted check strikes again.

- Closes #91039 

#### Examples

A lot of blood here has dried, visually the blood colors are almost
exactly the same as before either of the blood refactors.


![dreamseeker_BSP7FE9pRB](https://github.com/user-attachments/assets/45711fa0-ae65-4ec2-9e89-753fa7dd876f)

![dreamseeker_zyv9ssh5VN](https://github.com/user-attachments/assets/7b112854-b7e3-4bfe-b78b-199a55b5b051)
2025-05-31 19:38:07 -05: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
Nick 03a935f939 Adds a new expansion card to nukie base, and buffs nukie ordnance (#90967)
## About The Pull Request

Rearranges some stuff in nukie base and adds a freezer line into the
chamber, with a electrizer for hydrogen.
Adds a pipe scrubber so nukies can clean the pipeline out faster
and adds a new keycard the janitorial closet for 10 TC coming with
neccesary janitor equipment and a water vapour canister!

![image](https://github.com/user-attachments/assets/c3e63b1c-c343-43d1-b6ca-3028927353f9)


## Why It's Good For The Game

Crew can already make hydrogen pretty fast and usually suicide bomb
nukies with it, this allows nukies (who think a little out of the box to
do the same with the crew, adding more setups possible with the ordnance
section and some quality of life aswell like a door letting the person
trough it

## Changelog

🆑 Ezel
add: Nuke ops can now buy a keycard to access their new custodial
closet!
map: Rearranges nuke ordnance room, and adds the custodial closet
/🆑
2025-05-13 18:44:11 -07:00
Lucy 37ec7f8054 Changes all uses of notify_ghosts to use the real names of mobs (#90919)
## About The Pull Request

Quite simple - this changes every direct mention of a mob in a
`notify_ghosts` message to use `[mob.real_name]` instead of just `[mob]`

## Why It's Good For The Game

makes things less confusing - ghosts can see easily their actual
identity anyways, so it's not like there's much of a reason _not_ to do
this.

## Changelog
🆑
qol: Ghost notifications will now use the real names of mobs when
something happens (i.e no more "Unknown has completed an ascension
ritual!")
/🆑
2025-05-08 00:48:52 +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
John Willard 853c9196b6 Removes 'thrownby' var on items (#90877)
## About The Pull Request

Fully removes thrownby as a var on items, and is now instead handled by
throwingdatums' ``get_thrower()`` proc

Also replaces the early return for throwing things at yourself (it now
only prevents the call for check_block and therefore hit reaction
stuff), since the only way to throw things at yourself is with
boomerangs, which currently only works because it doesn't pass you as
the thrower for boomerang's return

Speaking of, boomerangs now see the thrower as thrower on returns

Before (Boomerangs don't pass you as the thrower, so it shows you as
being hit by nothing):

![image](https://github.com/user-attachments/assets/44c17c02-5618-44c6-b821-2089752946c8)

After (Boomerangs pass you and you can affect yourself, so it sees you
hitting yourself & it still batons you):

![image](https://github.com/user-attachments/assets/dafe6212-cf58-4a9d-aae1-3ef97faa5dbd)

This is gonna be used for
https://github.com/tgstation/tgstation/pull/90689 as well.

## Why It's Good For The Game

Better logging for boomeranged items, removes a deprecated var and
better consistency for thrown items leaving better readability.

## Changelog
🆑
admin: People throwing boomeranged items and hitting themselves now logs
it as them hitting themselves (rather than being hit by the air).
/🆑
2025-04-30 10:29:29 +01:00
Jacquerel f2b07029ef Readds Cloning (#90754) 2025-04-29 08:35:02 -06:00
Ghom ec20e7fac2 Aquariums have now three different modes (Manual/Assisted/Stasis) (#90605)
## About The Pull Request
This PR replaces the toggleable safe mode with Manual, Assisted and
Stasis.

Manual and Stasis mode works much like the old safe mode being off and
on respectively. The real addition here is the new default assisted
mode, which automatically sets fluid and temperature based on what
combination of these two settings would keep the most fish alive. It can
also temporarily enable stasis if over half of the fish population is at
risk of dying.
The main difference with stasis is that it doesn't necessarily prevent
fish death if it's a minority of the general population, rather just
make aquarium easier for players to manage.

Also added a line about fluid and temp when examining aquariums.

Still have to test it, definitely a WIP.

## Why It's Good For The Game
I want to make aquariums a bit easier and more accessible, since the
benefits are fairly meager for the efforts needed to maintain one,
excluding the power generator. I'll probably look into fish traits and
fish reproduction next, who knows...

## Changelog

🆑
add: Aquariums can now be switched between three different modes
(Manual/Assisted/Stasis) to replace the old Safe Mode toggle.
/🆑
2025-04-28 16:09:44 +01:00
Bloop 3d01e86e29 There will be (colorful) blood: datumizes bloodtypes, greyscales blood sprites, and fixes a lot of inconsistencies with gibs and forensic data (#90593)
## About The Pull Request


This PR:

- Converts all of the blood types into their own datums, which can be
set up to have their own colors, descriptions, and other fun unique
properties. For example, the clown blood that is constantly randomizing
itself.

- Converts all the blood decals into greyscale, which in turn eliminates
the need for separate xeno sprites. They both use the same ones now.

- Audit of blood splatters/gibs/bodyparts/organs to make sure that they
are getting the correct forensic data applied to them.

- For the admins: Adds a clown blood smite.

My primary goal with was to make the appearance of the new sprites look
almost indistinguishable to the original ones.

I consider this a "first pass", as in there are still some further
refactors I would like to do on the backend side, but am satisfied with
it enough to push it forward as a first step towards a better blood
system! I didn't want to do too much at once because of A) fatigue and
B) easier to test things to make sure I'm not breaking something
important this way.

This has been test-merged on Nova for over a week now and has been going
great, so I finally got around to upstreaming the bones to TG. Although
I did test it a bit you may want to TM it just in case I missed some
things when copying it over.
2025-04-28 00:57:59 -05: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
Nick 4f42ce9500 New sprites for Envy Knife (#90527) 2025-04-10 12:00:34 -04:00
SmArtKar 7a6e8e08ab Fixes runtimes caused by get_atom_on_turf and reverts an unintentional balance change to stabilized crossbreeds (#90500)
## About The Pull Request

get_atom_on_turf would return the last movable in chain, even if it was
passed a type, which is not the behavior most people would expect and
thus had led to errors in multiple other segments of code. Additionally,
#90436 also has unintentionally made stabilized crossbreeds work
regardless of their storage depth which was an intentional limiter -
this restores said behavior.

- Closes #90498
- Closes #90497

## Why It's Good For The Game

Runtimes bad, and so are unintentional change to game's balance. 

## Changelog
🆑
fix: Fixed runtimes caused by stabilized crossbreeds
fix: Fixed an unintentional buff to stabilized crossbreeds, they now
once again need to be put in your backpack or pockets.
/🆑
2025-04-09 21:34:06 +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
Ben10Omintrix 7c81098d33 Cain & Abel (new mining loot) (#89455)
## About The Pull Request
adds the Cain & Abel to the lootpool of the colossus!

![daggerpic](https://github.com/user-attachments/assets/d0e0c5f9-bace-4010-854a-3ea65e764499)

these are a set of angelic twinblades bound together by some chains. The
long chains allow u to attack mobs from a distance (2 tiles max) and at
very FAST speed, and come with a few new mechanics:

-Attacking a mob with the cain and abel grants you a special whisp that
follows your character. these whisps empower ur next melee attacks u can
collect a maximum of up to 6 whisps, (their bonuses stack), after which
they reset. If u get hit by a mob once, you'll lose ur whisps (and ur
melee bonus), so ull have to regain them by rebuilding up ur combo. u
can also choose to sacrifice ur whisps by firing them at mobs (by right
clicking them) for some hefty damage (this again means u'll lose them)



https://github.com/user-attachments/assets/0a1738db-9fa4-4226-ac80-334f5e97cfa5

-u can also choose to hurl one of ur daggers at enemies, there's 2 throw
modes u can toggle between by pressing Z while holding ur weapon.
1- On launch mode, u can throw one of ur daggers at a tile, afterwhich
the chains will rapidly pull u towards it, making for some cool getaways
in tense situations. this puts throw mode on a 7 second cooldown
2- On crystal mode, u can hurl a dagger at an enemy or at a tile. Spiked
crystals will errupt on nearby floors, dealing some damage to nearby
mobs and stunning them for 2 seconds (bosses dont get stunned tho). puts
throw mode on a 15 second cooldown


https://github.com/user-attachments/assets/665b9cf4-c5a1-4263-a36b-86e3f35d0ae5

-Lastly is the swing ability. This will swing ur daggers around u,
dealing AOE damage to nearby mobs, and makes u block all melee attacks,
tentacle attacks, and deflect incoming projectile attacks (could for
example be used to deflect the colossus' shotgun blast back to it). ull
only block attacks while the animation is active, which lasts a good
1.75 seconds, and is at a 20 second cooldown.



https://github.com/user-attachments/assets/073e5324-af5b-45ab-912e-5bcaa13fc728

Here's a short clip of me using them to fight a colossus and a bubblegum
https://www.youtube.com/watch?v=kp5Hu16dHPQ&ab_channel=Kobsa

## Why It's Good For The Game
adds a new fun weapon with a few deep mechanics to the game. also makes
taking down colossi alot more rewarding.

## Changelog
🆑
add: adds the cain and abel to the colossus lootpool!
/🆑
2025-03-29 04:28:51 +01: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](https://github.com/SpaceManiac/SpacemanDMM/commit/4b77cd487d0a7b6a069df20356b701af5b20489d)
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
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

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
/🆑
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
Singul0 14a1b5e1e8 Adds Film Studio space ruin (+ Actor/Director Space roles) (#89419)
## About The Pull Request
Adds a space ruin revolving around a studio where ghost roles can
provide entertainment to the station, the studio has a bunch of
construction stuff and costume vendors to create any set and portray any
character you'd want. Features 3 stages and a radio station (neutral
aligned syndie comms agent?) there's a total of 4 ghost roles, 3 actors.
1 director.

![image](https://github.com/user-attachments/assets/d78c3565-b5b1-494b-a566-7a6c451a62a3)
Studio also has a sizable living quarters and a mini-medbay for basic
provisions. a couple of paper fluff texts are strewn about on the
noticeboards

The cast:

![image](https://github.com/user-attachments/assets/5a56273e-8665-4daa-b8b0-77c8ede4d0f0)


In terms of things that can be balance-breaking, I can only name the gas
masks and agent ID actors/directors spawns in. But I think its a
necessary sacrifice for them to play "characters"
## Why It's Good For The Game
I think too many of the ghost roles have too little interactions with
the main station, this is for good reasons obviously, balance and
metagrudges and all that. But, say. what if we can have a ghost role
that interacts and give something to the station besides being their own
little isolated game? it can't be anything material of course. so what
if we have the ghost role centered around giving entertainment? which is
how this PR came to be
## Changelog
🆑
add: After some light bit of restructuring, the local TV station,
serving SPACE SECTOR 13 has opened up again!
/🆑
2025-02-19 17:48:10 -07:00
Jacquerel 23ac16411d Removes Secondary & Final Objectives from Traitors (#89466)
## About The Pull Request


![image](https://github.com/user-attachments/assets/cb0bffb3-33be-4fb1-baec-a4d0f4a4cd57)
Pre-discussed with @Watermelon914, this PR removes Secondary & Final
Objectives from all Traitors, rather than just midround ones. It also
removes all of the surrounding supporting code.
Randomly assigned Primary Objectives still exist, I just used the
ability to rewrite mine to take the screenshot.

In terms of final objectives, the surrounding items that were available
still exist but don't necessarily have sources.
If anyone has good ideas for readding these in some other form it can be
done in future PRs.

It also allows all traitors to buy the Contractor kit, previously
limited to midround traitors which lacked secondary objectives, because
now all traitors lack secondary objectives.

This essentially limits all traitors to a maximum of 20 TC (16 if they
spawn with an uplink implant). Currently I don't foresee that they
strictly need any additional way of gaining TC during a round as 20 is
quite sufficient, but it may take some time to adjust and get used to it
after such a long time of having access to more. If we need to adjust
the starting value or add a slow drip of more points over time or
something, that can be done in followup PRs.

This also removes the ability to recreate your uplink added by my
beautiful wife in #74315
This was part of the progression traitor design document, but ultimately
probably a bad idea as it essentially made traitors impossible to
properly disarm. You will once more just need to carefully protect your
uplink.

**This does not remove the threat/progression system**. 
Like midround traitors, all Reputation requirements on gear are now
simple timelocks, most of which will have elapsed by the time 30 minutes
have passed.

**Finally** this PR also adds Romerol to the traitor uplink for 25 TC
and 30 minutes of reputation, as a treat (and because I removed the
final objective that previously granted it).

## Why It's Good For The Game

We've tried this system for a long time (3 years last month!) and while
I think it had a lot of promise, enabled some cool moments, and also
solved several of the problems it set out to solve, overall I think some
of the behaviours it has encouraged in players have been overall
negative for the game.
While the _game systems_ are fine, even quite fun and cool (especially
final objectives) I am of the opinion that having them in the game
creates a net negative purely in the way that they react with players'
_brains_, creating incentives towards behaviour we don't actually want
people to pursue.

While it's hard-to-impossible to prove any of this with hard data, there
has been a prevailing feeling for some time among many (though certainly
not all) people that the simple fact of _having_ a constant drip-feed of
objective available to players leads directly to less interesting
antagonist play. While certainly nobody is _forced_ to do secondary
objectives you are directly and quite strongly rewarded for doing so,
doing so efficiently, and doing so in a way which makes sure that nobody
(alive) sees you do it. This leads to a tendency to play defensively and
try to maximise the number of tasks you can complete in one round, which
also has a knock-on effect of generally minimising the number of people
you attempt to interact with in a round (unless you are killing them).

Even people who _intend_ on doing some more interesting gimmick can fall
into this trap, as "having more tools" is always useful for anyone who
is intending on any kind of plan at all, but then executing on the
secondary objectives again incentivises you to lay low, not interact
with anyone, be efficient, and then reduces the time you are spending
doing the thing that's your actual plan for the round. Removing the
ever-present temptation to fish for extra TC leaves "doing whatever your
actual plan is" as the sole thing to optimise.

Final Objectives too have created unfortunate psychological effects
between crewsided players and other antagonists. Because of the _threat_
(no matter how remote, Final Objectives have always been tuned to be
appropriately rare) that leaving any antagonist alone will cause them to
snowball by acquiring more power, it starts to feel foolish to respond
to any threat with less than the maximum possible level of force even if
they seem relatively innocuous in the moment. This even has an effect on
other non-progression antagonists, as traitors are the most common
antagonist type and how people treat them is going to be their default
level of reaction to most other station threats.

While there has always been the promise of expanding the system with
novel and exciting objectives that leverage appearing mid-round to do
something unique, we've taken very little advantage of that over time.
Most objectives we have added that didn't boil down to "kill someone,
with a twist" have been somewhat unsuccessful, serving either as ways to
get yourself arrested and killed for no reason or ways to get free
telecrystals by doing something the crew don't really care about
stopping you from doing. The option still exists to add more roundstart
objectives to traitors, if someone suddenly has a great idea that would
fit in this space.

The ideal outcome of making this change is a slight relaxation of crew
attitude towards feeling like their only option after catching an
antagonist that isn't sandbagging is to permanently remove them from the
round (although it's fine to do this still in many scenarios), and a
broadening of traitorous activity which is not purely focused on
collecting as many checkboxes as possible and might give people more
time to roleplay with other players, not worrying that this time could
have been more efficiently spent pursuing a different secondary goal.
I don't anticipate or desire that this will prevent traitors from
killing anyone (or even stop them from killing people they don't have a
specific objective to kill), I just want to remove the FOMO from
people's minds.

Also this gives us something to talk about at the coder townhall meeting
on the 22nd.

## Changelog

🆑
del: Misplaced or stolen traitor uplinks can no longer be recreated
using a radio code and special device, guard yours carefully or buy a
backup implant.
del: Roundstart traitors can no longer take on additional objectives in
order to earn additional Telecrystals and fast-forward any unlock timers
on items. They also cannot earn the ability to complete a Final
Objective.
balance: Roundstart traitors can now buy the Contractor Kit from their
traitor uplink, rather than only midround traitors.
add: Traitors can buy Romerol for 25 TC, after 30 minutes of time has
passed in a round.
/🆑
2025-02-14 12:46:56 +00:00
Arceniu 1a0dc51e93 fix: oldstation fluff microfix (#89281)
## About The Pull Request

Replaced "Singularity Generation Disk" with "Supermatter Crystal Shard"
(and the space in front of the "prototype modsuit" has been removed,
because it doesn't look pretty.)

## Changelog
🆑
spellcheck: Replaced the words "Singularity Generation Disk" with
"Supermatter Crystal Shard" on a paper found by the old station ruin, to
match the contents of the inventory room.
/🆑
2025-02-01 21:29:08 +01:00
necromanceranne bc01d6eefe Gets rid of mobile hollow bioscramblers spawning in the anomaly research ruin. (#89303)
## About The Pull Request

What it says on the tin. Mobile anomalies still spawn in and around the
ruin, but never bioscramblers.

## Why It's Good For The Game

A) These fucking things cannot be disabled by conventional means. It
needs anomaly research.

B) They drift through space away from the ruin literally every single
time the ruin spawns. They are meant to be an environmental hazard for
the ruin, not for the entire playing space because a remote ruin
spawned.

C) Because they are not blocked by walls, they will keep drifting until
eventually arriving on the station, where they will stay there.
Typically occupying a space perpetually until a scientist comes and
fixes the problem with their anomaly neutralizer.

The only reason this happened was because of bioscramblers being
reworked into the state they are now. I don't imagine the original
creator intended for the ruin to create problems for the wider round
like this.

## Changelog
🆑
del: Mobile hollow bioscramblers no longer spawn from the anomaly
research ruin, sparing everyone from the inevitable unannounced arrival
of a permanent hollow bioscrambler aboard the station. You maybe still
encounter immobile bioscramblers in the ruin, however.
/🆑
2025-02-01 21:18:34 +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 7ddc30783a Adds better attack animations and alternate attack modes (#88418)
## About The Pull Request

This is the first PR in a series attempting to modernize our damage and
armor, both from a code and a gameplay perspective. This part implements
unique attack animations, adds alternate attack modes for items and
fixes some minor oversights.

Items now have unique attack animation based on their sharpness - sharp
items are now swung in an arc, while pointy items are thrust forward.
This change is ***purely visual***, this is not swing combat. (However,
this does assign icon rotation data to many items, which should help
swing combat later down the line).

Certain items like knives and swords now have secondary attacks - right
clicks will perform stabbing attacks instead of slashing for a chance to
leave piercing wounds, albeit with slightly lower damage - trying to
stick a katana through someone won't get you very far!

https://github.com/user-attachments/assets/1f92bbcd-9aa1-482f-bc26-5e84fe2a07e1

Turns out that spears acted as oversized knives this entire time, being
SHARP_EDGED instead of SHARP_POINTY - in order for their animations to
make sense, they're now once again pointy (according to comment,
originally they were made sharp because piercing wounds weren't very
threatening, which is no longer the case)

Another major change is that structure damage is now influenced by armor
penetration - I am not sure if this is intentional or not, but attacking
item's AP never applied to non-mob damage.

Additionally, also fixes an issue where attack verbs for you and
everyone else may differ.
2024-12-17 12:35:52 -06:00
Waterpig 408fd1fe90 Prevents the overcharged smes from runtiming when the timer ss falls behind (#88376) 2024-12-13 21:43:26 +01:00
Waterpig 051d705b6d Fixes necropolis gates being pushable by fauna (#88483)
## About The Pull Request

Turns out some fauna can walk their way over to the necropolis gates an
shove them aside. This should prevent that, or any other force of
nature, from moving these ancient gates anywhere.

## Why It's Good For The Game

It's silly that this is even possible

## Changelog

🆑
fix: Fauna can no longer push necropolis gates
/🆑
2024-12-12 19:30:14 +01:00
Tim 6da4462e14 Fix gravity for areas in space near station (#88176)
## About The Pull Request
- Fixes #76827

This removes gravity from the following areas:
- Solars
- Nearstation
- Space
- Ordnance bomb testing

##### Note - Asteroid areas (Tram) or planet areas (Ice) are not
affected.

<details>
<summary>Examples of outside gravity turfs</summary>


![dreamseeker_Mml3HmRaIK](https://github.com/user-attachments/assets/b6e410b7-e242-4c77-8cc8-34e15bd96b42)

</details>

Now stepping on floor plating in those areas will result in mobs
drifting. (like they do inside the station when gravity is offline)
Stepping on or near catwalks, lattices, or walls stills controls your
movement. Also refactored a little bit of the `has_gravity` code to use
defines instead of `TRUE/FALSE`.

## Why It's Good For The Game
Consistency. Mag boots are highly recommended when performing EVA.

## Changelog
🆑
fix: Fix gravity for areas in space near station (solars, nearspace,
bomb testing, etc.)
/🆑
2024-12-06 23:02:21 +01:00
Tim 58a0794fa6 Fix drink labels for alcohol bottles (#88355)
## About The Pull Request
- Fixes #88351

An examine proc used bitflags to determine the contents of a bottle
despite whatever reagents are inside. I went and changed the examine
message to use `The label says it contains` instead of `It is` which is
more appropriate. Also the empty bottle parent type was listed as
`ALCOHOL` despite spawning with no reagents. A lot of alcohol subtypes
relied on this to give them the correct bitflag.

## Why It's Good For The Game
Drink consistency.

## Changelog
🆑
fix: Fix drink labels for alcohol bottles
/🆑
2024-12-05 22:31:55 -08:00