522 Commits

Author SHA1 Message Date
Roxy f266555b40 i know what order letters go in 2026-06-23 19:57:52 -04:00
Roxy 00b94f119f unticked files 2026-06-23 18:12:18 -04:00
Roxy de4c3b255d Merge branch 'master' of github.com:tgstation/tgstation into upstream-2026-06-23 2026-06-23 15:51:55 -04:00
mrmanlikesbt b08ec39e1b Better Unit Tests - Runs All Of Them On A Single Map (exc. map unit tests) and C&D Split-Up (#96368)
## About The Pull Request

### Don't run every single test

I've had this on my mind for several months and it being brought up
recently reminded me so here we are.

Unit tests only run on `runtimestation_minimal.dmm` now with the
exception of map tests. The following unit tests are declared as map
tests but I didn't see any map dependent logic so 🤷
- `/datum/unit_test/maptest_baseturfs_unmodified_scrape`
- `/datum/unit_test/maptest_baseturfs_placed_on_top`
- `/datum/unit_test/maptest_baseturfs_placed_on_bottom`
- `/datum/unit_test/maptest_get_turf_pixel`
- `/datum/unit_test/maptest_load_map_security`
- `/datum/unit_test/maptest_modular_map_loader`
- `/datum/unit_test/maptest_turf_icons`

`/datum/unit_test/subsystem_init` isn't really a mapping unit test but I
figured somehow, someway, maps might fuck with subsystem initializations
so I just decided to include it.

### Splits up the create & destroy test

Idk, pretty simple. Create & destroy is now split up across all
integration tests and ran in parallel.

## Why It's Good For The Game

oranges promised me "500 nzd" yo

## Changelog

No player facing changes
2026-06-09 06:00:03 +02:00
Lucy 8994933b62 Add a unit test for language key conflicts (#96382)
## About The Pull Request

simply adds a new unit test, `language_key_conflicts`, ported from my
work on monkestation.

it is exactly what it says on the tin - it ensures two languages do not
have the same exact key. i don't think that's an issue here, but better
safe than sorry.

## Why It's Good For The Game

more unit test coverage for subtle bugs that might be hard to realize is
always nice

## Changelog

No user-facing changes.
2026-06-08 04:31:33 +02:00
shayoki f601a6ddaf Merge remote-tracking branch 'tgstation/master' into upstream-6-2-2026 2026-06-03 01:23:54 -05:00
Alexis 21b4095dfd [MDB IGNORE] [IDB IGNORE] Upstream Sync - 04/17/2026 (#5453)
Upstream 04/17/2026

fixes https://github.com/Bubberstation/Bubberstation/issues/5549

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com>
Co-authored-by: loganuk <fakeemail123@aol.com>
Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com>
Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com>
Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com>
Co-authored-by: Isratosh <Isratosh@hotmail.com>
Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com>
Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Co-authored-by: Alexander V. <volas@ya.ru>
Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com>
Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com>
Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com>
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com>
Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com>
Co-authored-by: Josh <josh.adam.powell@gmail.com>
Co-authored-by: Josh Powell <josh.powell@softwire.com>
Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com>
Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com>
Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com>
Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
2026-05-16 00:56:00 +02:00
LemonInTheDark 2dfbf0b81a Adds a unit test that makes sure subsystem flags make sense (#96022)
## About The Pull Request

There's a few of these that conflict, mostly relating to timing. This
conflicting won't actually break anything but it does muddy "what is
this doing" somewhat and it's good to be clear so here we go

## Why It's Good For The Game

Makes the MC very slightly harder to confuse yourself with
2026-05-11 11:20:24 -04:00
MrMelbert cee225fecb Moves hair and eyes into standing overlays (#95781) 2026-05-04 22:50:36 +02:00
Roxy 43054c7e64 Add TEST_REPEAT unit test macro (#95384)
## About The Pull Request

Adds a macro to run a unit test a given number of times in a row, can be
combined with `TEST_FOCUS`.

## Why It's Good For The Game

Trying to debug a flaky unit test failure without the ability to easily
repeat a test over and over until you catch a fail is very annoying

## Changelog
🆑
code: added a unit test macro for running the same test multiple times
/🆑
2026-03-17 18:10:09 -04:00
MrMelbert f7d7c6f00e Fix Pun Pun's name (#95420)
## About The Pull Request

Moving Pun Pun's name handling in #94463 broke their name assignment as
it used `var/name_to_use = name`

Prior, it would save `var/name_to_use = "Pun Pun"`. But after moving it,
it would use `var/name_to_use = "monkey (842)"`, as name is randomized
in human init.

I will note that I think `use_random_name` var is broken... that may
require future investigation.

## Changelog

🆑 Melbert
fix: Pun Pun is Pun Pun again
/🆑
2026-03-16 08:36:10 +13:00
SyncIt21 56212d2712 Cleans up chemical reaction & reagent look up code (#95281)
## About The Pull Request
- Removed global list `fake_reagent_blacklist` in favour of
`abstract_type`. Saved memory
- Removed proc `get_chemical_reaction()` in favor of
`GLOB.chemical_reaction_list`. No proc overhead and faster access
- Remove unused proc `remove_chemical_reaction()`
- Removed proc `find_reagent()` in favour of
`GLOB.chemical_reagents_list`. No proc overhead and faster access
- Directly access name of reagents via `::` operator from typepaths
instead of looking up the datum in global chemical reagents list for
some operations. Faster variable access
- Removed unit test `reagent_id_typos`. The typepaths will error at
compile time because they aren't strings so there's no need for this
test

## Changelog
🆑
code: cleaned up code pertaining to reagent & reaction lookup
/🆑
2026-03-07 10:39:20 +01:00
Alexis 5c5a636485 Merge branch 'master' into upstream-feb12-2026 2026-03-02 07:42:16 -05:00
Alexis b5f6e40ea4 Digitigrade Clothes Unit Test (#5225)
## About The Pull Request
Adds a new unit test for determining whether digitigrade variants exist
for a given clothing item, and fails if they do not.
## Why It's Good For The Game
This will help us with making sure we have digi sprites for all our
modular clothes in the future.
## Proof Of Testing
It worked when I tested it ages ago.
## Changelog
N/A
2026-02-22 14:59:15 -05:00
SyncIt21 2eb4b5e0cb Adds the framework for stacked metabolization effects (#95123)
## About The Pull Request
- You can now add effects when multiple reagents are metabolized per
tick by creating a new subtype of
`/datum/stacked_metabolization_effect`. So lets say you have 3 reagents
A & B & C and you want to implement some unique effect when all 3
reagents are present at the same time. Instead of implementing those
effect inside each of those reagents like such

```dm
/datum/reagentA/on_mob_life()
    if(holder.hasReagent(/datum/reagentB) && holder.hasReagent(/datum/reagentC))
        //do stuff

/datum/reagentB/on_mob_life()
    if(holder.hasReagent(/datum/reagentC) && holder.hasReagent(/datum/reagentA))
        //do stuff

/datum/reagentC/on_mob_life()
    if(holder.hasReagent(/datum/reagentA) && holder.hasReagent(/datum/reagentB))
        //do stuff
``` 

You can now implement that effect by creating a subtype of stack reagent
effect as such

```dm
/datum/stacked_metabolization_effect/unique_effect
	requirements = list(/datum/reagent/A = 1, /datum/reagent/B = 1, /datum/reagent/C = 1)

/datum/stacked_metabolization_effect/unique_effect/apply(list/reagents_metabolized, mob/living/carbon/owner, seconds_per_tick)
	var/metabolization_ratio = average(reagents_metabolized)
       //do stuff with the ratio
``` 

The effect is applied per tick and you can check for subtypes as well
like such

```dm
/datum/stacked_metabolization_effect/unique_effect
	requirements = list(/datum/reagent/A = 3)
``` 

## Why it's good for the game
The framework of stacked reagent effects allows contributors to
implement unique effects for metabolizing multiple reagents at once. The
benefits are obvious.
Right now it's a framework that is unused but should hopefully see some
use in the future

## Changelog
🆑
code: adds a framework for implementing effects when multiple reagents
are metabolized per tick
/🆑

---------

Co-authored-by: Jordan Dominion <jordanhcbrown+github@gmail.com>
2026-02-19 15:22:57 +01:00
nevimer 00ccf0c6b5 Merge remote-tracking branch 'tgstation/master' into upstream-feb12-2026
# Conflicts:
#	.github/CODEOWNERS
#	.github/workflows/compile_changelogs.yml
#	.github/workflows/stale.yml
#	SQL/database_changelog.md
#	_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm
#	code/__DEFINES/atom_hud.dm
#	code/__DEFINES/inventory.dm
#	code/__DEFINES/mobs.dm
#	code/__DEFINES/species_clothing_paths.dm
#	code/__DEFINES/subsystems.dm
#	code/__DEFINES/surgery.dm
#	code/__HELPERS/global_lists.dm
#	code/_globalvars/lists/maintenance_loot.dm
#	code/_globalvars/traits/_traits.dm
#	code/controllers/subsystem/minor_mapping.dm
#	code/controllers/subsystem/processing/quirks.dm
#	code/controllers/subsystem/shuttle.dm
#	code/datums/components/palette.dm
#	code/datums/components/surgery_initiator.dm
#	code/datums/diseases/advance/advance.dm
#	code/datums/hud.dm
#	code/datums/mood.dm
#	code/datums/mutations/chameleon.dm
#	code/datums/quirks/negative_quirks/nyctophobia.dm
#	code/datums/status_effects/debuffs/debuffs.dm
#	code/datums/status_effects/debuffs/drunk.dm
#	code/datums/status_effects/debuffs/slime/slime_leech.dm
#	code/datums/weather/weather.dm
#	code/game/data_huds.dm
#	code/game/objects/items.dm
#	code/game/objects/items/devices/scanners/health_analyzer.dm
#	code/game/objects/items/frog_statue.dm
#	code/game/objects/items/rcd/RLD.dm
#	code/game/objects/items/robot/items/hypo.dm
#	code/game/objects/items/stacks/medical.dm
#	code/game/objects/items/stacks/wrap.dm
#	code/game/objects/items/storage/garment.dm
#	code/game/objects/items/tools/medical/defib.dm
#	code/game/objects/items/weaponry.dm
#	code/game/objects/items/weaponry/melee/misc.dm
#	code/game/objects/structures/crates_lockers/closets/secure/security.dm
#	code/game/objects/structures/curtains.dm
#	code/game/objects/structures/dresser.dm
#	code/game/objects/structures/girders.dm
#	code/game/objects/structures/maintenance.dm
#	code/game/objects/structures/mirror.dm
#	code/modules/admin/greyscale_modify_menu.dm
#	code/modules/admin/verbs/light_debug.dm
#	code/modules/antagonists/ashwalker/ashwalker.dm
#	code/modules/antagonists/heretic/knowledge/starting_lore.dm
#	code/modules/antagonists/ninja/ninjaDrainAct.dm
#	code/modules/art/paintings.dm
#	code/modules/client/preferences.dm
#	code/modules/client/verbs/ooc.dm
#	code/modules/clothing/head/wig.dm
#	code/modules/events/disease_outbreak.dm
#	code/modules/holodeck/holo_effect.dm
#	code/modules/jobs/job_types/head_of_security.dm
#	code/modules/jobs/job_types/security_officer.dm
#	code/modules/library/skill_learning/generic_skillchips/point.dm
#	code/modules/mining/lavaland/ash_flora.dm
#	code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm
#	code/modules/mob/dead/new_player/new_player.dm
#	code/modules/mob/living/basic/guardian/guardian.dm
#	code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm
#	code/modules/mob/living/carbon/carbon.dm
#	code/modules/mob/living/carbon/human/human.dm
#	code/modules/mob/living/carbon/human/human_defines.dm
#	code/modules/mob/living/carbon/life.dm
#	code/modules/mob/living/living.dm
#	code/modules/mob/living/living_defines.dm
#	code/modules/mob/mob.dm
#	code/modules/mob_spawn/ghost_roles/mining_roles.dm
#	code/modules/mod/mod_control.dm
#	code/modules/mod/modules/modules_general.dm
#	code/modules/modular_computers/computers/item/computer_ui.dm
#	code/modules/paperwork/paper.dm
#	code/modules/paperwork/paperbin.dm
#	code/modules/power/lighting/light.dm
#	code/modules/projectiles/guns/energy/kinetic_accelerator.dm
#	code/modules/projectiles/projectile.dm
#	code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
#	code/modules/reagents/chemistry/reagents/food_reagents.dm
#	code/modules/reagents/chemistry/reagents/other_reagents.dm
#	code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
#	code/modules/research/xenobiology/crossbreeding/_clothing.dm
#	code/modules/research/xenobiology/crossbreeding/prismatic.dm
#	code/modules/surgery/advanced/brainwashing.dm
#	code/modules/surgery/advanced/lobotomy.dm
#	code/modules/surgery/amputation.dm
#	code/modules/surgery/blood_filter.dm
#	code/modules/surgery/bodyparts/_bodyparts.dm
#	code/modules/surgery/brain_surgery.dm
#	code/modules/surgery/cavity_implant.dm
#	code/modules/surgery/coronary_bypass.dm
#	code/modules/surgery/gastrectomy.dm
#	code/modules/surgery/healing.dm
#	code/modules/surgery/limb_augmentation.dm
#	code/modules/surgery/organ_manipulation.dm
#	code/modules/surgery/revival.dm
#	code/modules/surgery/sleeper_protocol.dm
#	code/modules/surgery/surgery_helpers.dm
#	code/modules/surgery/surgery_step.dm
#	code/modules/unit_tests/_unit_tests.dm
#	code/modules/unit_tests/designs.dm
#	code/modules/unit_tests/icon_state_worn.dm
#	code/modules/unit_tests/screenshots/screenshot_antag_icons_cultist.png
#	code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png
#	code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png
#	code/modules/unit_tests/screenshots/screenshot_husk_body.png
#	code/modules/unit_tests/screenshots/screenshot_husk_body_missing_limbs.png
#	icons/map_icons/clothing/head/_head.dmi
#	icons/map_icons/clothing/shoes.dmi
#	icons/map_icons/items/_item.dmi
#	icons/mob/huds/hud.dmi
#	icons/mob/inhands/64x64_lefthand.dmi
#	icons/mob/inhands/64x64_righthand.dmi
#	icons/obj/machines/computer.dmi
#	tgui/packages/tgui/interfaces/OperatingComputer.jsx
#	tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferences/MainPage.tsx
#	tgui/packages/tgui/interfaces/PreferencesMenu/types.ts
#	tgui/packages/tgui/interfaces/SurgeryInitiator.tsx
#	tools/icon_cutter/check.py
2026-02-12 23:50:09 -05:00
FalloutFalcon 8042c69b4f Gives missing icon unit tests a shared parent (#95122)
## About The Pull Request
Gives the 3 main missing icon tests a shared parent for behavior. Made
the list of icon states not static because of this but that shouldn't
really matter.
Additional icon locations is made a list for evil down streams that are
grandchildren of TG rather then just children, or repos with multiple
spots for icons, `modular_downstream/master_files/icons` and
`modular_downstream/modules` can both have icons in alot of them

Was considering also making them filter out abstract_types but maybe
should be a diff pr.
## Why It's Good For The Game
All 3 present unit tests copy paste ALOT of their behavior, but very low
hanging fruit is the compiling of folders, which while claiming have
modularity support its a bit silly to require 3 separate additions just
to make sure all tests are properly working.
## Changelog
N/A

---------

Co-authored-by: Jordan Dominion <dominion@tgstation13.org>
2026-02-11 18:50:14 -05:00
MrMelbert 4839b10d8d Makes cham items slightly easier to parse through (#94901)
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2026-01-26 11:11:57 +00:00
MrMelbert 5d72f577bb Fix wallet again (#94984)
## About The Pull Request

`Moved` -> registers id card in wallet -> `dropped` -> unregisters id
card

Fixes it by registering in dropped. This does mean we register,
unregister, and register again, which is less than ideal - but I'm not
sure how else to tackle this cleanly...

## Changelog

🆑 Melbert
fix: Fix wallet (again)
/🆑
2026-01-26 00:38:21 -05:00
Leland Kemble 7fad88bb38 Makes a borg rapid construction-type tools unit test (#94864)
## About The Pull Request

Makes a unit test that checks the engineering borg's RCD & RTD to make
sure they're working.

## Why It's Good For The Game

After the issue that happened a little bit ago where these stopped
working, a unit test was suggested. This test would have prevented that
issue, and also serves as a general rcd and rtd test to some extent.
2026-01-19 15:51:09 -06:00
nevimer a33fd49968 Upstream 12 15 25 unique reskins fixes (#5019)
This branch needs help, tons of datums to make for the customizable
items.

---------

Co-authored-by: Alexis <catmc8565@gmail.com>
2026-01-10 13:14:26 -05:00
MrMelbert c1ab845ac8 Tweaks baton attack chain to be a bit easier to code with (#94452)
## About The Pull Request

Alt to #94423 , see it for more information

Currently, the `can_baton` checks disallow harmbatonning. This is an
error.
However, untangling this code wasn't super trivial thanks to the way the
chain was split across a few procs.
This PR puts all the relevant code in `pre_attack`, so we can easily see
what contexts allows a stun, a harmbaton, both, and neither.

## Changelog

🆑 Melbert
fix: You can harm people with batons that are otherwise inoperable, like
an Abductor's baton.
refactor: Batonning was refactored ever so slightly. Report any
oddities, particularly involving harmbatonning.
/🆑
2025-12-19 20:46:17 +00:00
MrMelbert e37ac402b0 Implements a proper framework for mood events with many conditions (#94334)
## About The Pull Request

The death moodlet was becoming a monster, and I knew it would happen but
I was too lazy to implement something proper for it, until now

`/datum/mood_event/conditional` now exists: 
When this moodlet is added, it iterates over all subtypes of the moodlet
and checks to see if the subtypes fulfill some condition
Each subtype has a priority set, the highest priority condition is what
is ultimately added

This makes it significantly easier and cleaner to add new conditions to
more complex moodlets, which should make new personality dev a piece of
cake

## Changelog

🆑 Melbert
refactor: Refactored death moodlet, report any oddities
/🆑
2025-12-19 19:31:07 +00:00
nevimer 1a21687143 Revert "Refactors unique_reskin, deletes retool kit (#93775)"
This reverts commit 6ebfbccebb.

# Conflicts:
#	code/modules/loadout/loadout_items.dm
#	code/modules/paperwork/clipboard.dm
2025-12-15 18:17:06 -05:00
nevimer 6e9f2ccfc0 Merge remote-tracking branch 'tgstation/master' into upstream-12-15
# Conflicts:
#	.github/workflows/compile_all_maps.yml
#	.github/workflows/run_integration_tests.yml
#	_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm
#	code/_onclick/hud/credits.dm
#	code/controllers/subsystem/networks/id_access.dm
#	code/datums/diseases/advance/advance.dm
#	code/datums/diseases/advance/symptoms/heal.dm
#	code/game/machinery/doors/door.dm
#	code/game/objects/structures/crates_lockers/closets/secure/medical.dm
#	code/game/objects/structures/crates_lockers/closets/secure/security.dm
#	code/modules/antagonists/malf_ai/malf_ai_modules.dm
#	code/modules/jobs/job_types/_job.dm
#	code/modules/loadout/categories/accessories.dm
#	code/modules/loadout/loadout_helpers.dm
#	code/modules/loadout/loadout_items.dm
#	code/modules/loadout/loadout_preference.dm
#	code/modules/mob/living/silicon/robot/robot_defense.dm
#	code/modules/mod/mod_theme.dm
#	code/modules/projectiles/ammunition/energy/laser.dm
#	code/modules/reagents/reagent_containers/cups/drinks.dm
#	code/modules/shuttle/mobile_port/variants/supply.dm
#	code/modules/surgery/organs/internal/eyes/_eyes.dm
#	code/modules/unit_tests/screenshots/screenshot_antag_icons_heretic.png
#	icons/hud/screen_full.dmi
2025-12-15 18:12:29 -05:00
MrMelbert 4c46ee0676 Fix bola slowing when held (#94335)
## About The Pull Request

We just deleted the code that read `SLOWS_WHILE_IN_HAND`

## Changelog

🆑 Melbert
fix: Bolas don't slow while in hand
/🆑
2025-12-05 14:48:04 +01:00
MrMelbert a0b271d336 Fix Flypeople before anyone realizes they're broken but me (#94264)
## About The Pull Request

After I merged #94200 I realized it blocked all attack hand interactions
on decal which means flypeople would break

Fixes that, adds some unit tests

## Changelog

🆑 Melbert
fix: Fix Flypeople's vomit interaction before anyone realizes it's
broken but me
/🆑
2025-12-02 17:07:20 -07:00
MrMelbert 0098ffca01 Makes it possible to add new mech construction steps without ruining everything (#94175)
## About The Pull Request

Currently mech construction icons correspond 1:1 with construction step

<img width="1357" height="349" alt="image"
src="https://github.com/user-attachments/assets/65763f51-776c-44a7-bc9e-b710db9342a1"
/>

This means if you want to add a new step in the middle of an existing
construction chain you are SOL and have to update everything manually

This suuuucks, and you will notice in the picture above that many states
*are identical*

So I have lightly refactored it:

- When steps are instantiated, it will automatically attempt to fill in
`icon_state`s according to the index in the list, as it does currently
- If the step specifies its own icon state, nothing happens, but index
goes up
- If the step specifies `skip_state`, it will neither set an icon state
nor increment the index

This means you can insert a step in the middle of an existing chain with
`skip_state = TRUE` if your state has no icon associated, OR you can
insert a step with `icon_state = "new_state", skip_state = TRUE` to add
your icon without needing to edit every existing icon

Now in an ideal world we get rid of this auto-setting system wholesale
and set bespoke icon states (`mecha_wires`, `mecha_internal_armor`,
etc). We would just define a step's `state = "wired"`, `state =
"armored"`, and so on. However, I feel like having the option of using
"default states" makes it easier during development.

Also I *could* go through and remove all the duplicate states and
replace them with `skip_state` instructions but I'm lazy. (Maybe I'll do
it anyways though)

Other changes

- Completing a construction step sends you a chat message about the next
step, so you don't have to examine the chassis to find out
- Changed around how the Phazon accepts its anomaly core

## Changelog

🆑 Melbert
refactor: Refactored how mech icons update mid-construction, report any
disappearing mechs please
fix: One of the Phazon's mid construction icons was not visible in the
past, now it is again. Yippee.
/🆑
2025-12-02 16:50:43 -07:00
MrMelbert 6ebfbccebb Refactors unique_reskin, deletes retool kit (#93775)
## About The Pull Request

Closes #93635

`unique_reskin` is no longer a list on `/item`, now `/datum/atom_skin`

The actual reskinning behavior has been moved out to
`/datum/component/reskinable_item`

PKC reskinning is now handled via alt-click reskin, rather than via the
retooling kit. The retooling kit has been removed.
There's no limit on how many times you can reskin your PKC (though
perhaps we limit it to one reskin and keep the retooling kit as a way to
allow a miner to reskin it a second time?)

The Ashen Skull unique reskin is still a trophy, and instead unlocks its
unique reskin option in the alt-click radial.

## Why It's Good For The Game

I'm unsure why the retooling kit exists on its own, when it's relatively
cheap and just performs the behavior of alt-click reskinning.

So to keep it consistent with all other forms of reskinning I've just
made it baseline. To accomplish that I refactored reskinning.

The new form of reskinning allows for greater potential in adding
reskins, allowing far more than just an icon state change. Also we can
put it on turfs and mobs and structures now which is cool I guess

There's also the added benefit of being able to see an item's reskins
without needing to instantiate it, which the loadout menu uses to great
effect.

## Changelog

🆑 Melbert
refactor: Refactored item reskinning (the alt-click way), report any
oddities with that
del: Deleted the crusher retool kit, now you can just reskin your
crusher with alt-click. The Skull skin is still locked behind having the
Ashen Skull trophy applied.
fix: Stunswords no longer have an incorrect lore blurb
fix: Fixed loadout item reskinning's UI
/🆑
2025-11-30 19:31:29 -07:00
nevimer baf3837ae8 Merge remote-tracking branch 'tgstation/master' into upstream-2025-11-29
# Conflicts:
#	_maps/RandomRuins/SpaceRuins/derelict_sulaco.dmm
#	_maps/RandomRuins/SpaceRuins/garbagetruck2.dmm
#	_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm
#	_maps/map_files/tramstation/tramstation.dmm
#	code/_onclick/hud/new_player.dm
#	code/datums/components/squashable.dm
#	code/datums/diseases/advance/symptoms/heal.dm
#	code/datums/diseases/chronic_illness.dm
#	code/datums/status_effects/buffs.dm
#	code/datums/status_effects/debuffs/drunk.dm
#	code/datums/status_effects/debuffs/stamcrit.dm
#	code/game/machinery/computer/crew.dm
#	code/game/objects/items/devices/scanners/health_analyzer.dm
#	code/game/objects/items/wall_mounted.dm
#	code/game/turfs/closed/indestructible.dm
#	code/modules/admin/view_variables/filterrific.dm
#	code/modules/antagonists/heretic/influences.dm
#	code/modules/cargo/orderconsole.dm
#	code/modules/client/preferences.dm
#	code/modules/events/space_vines/vine_mutations.dm
#	code/modules/mob/dead/new_player/new_player.dm
#	code/modules/mob/living/carbon/human/death.dm
#	code/modules/mob/living/carbon/human/species_types/jellypeople.dm
#	code/modules/mob/living/damage_procs.dm
#	code/modules/mob/living/living.dm
#	code/modules/mob_spawn/ghost_roles/mining_roles.dm
#	code/modules/mob_spawn/mob_spawn.dm
#	code/modules/projectiles/ammunition/energy/laser.dm
#	code/modules/projectiles/guns/ballistic/launchers.dm
#	code/modules/projectiles/guns/energy/laser.dm
#	code/modules/reagents/chemistry/machinery/chem_dispenser.dm
#	code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
#	code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
#	code/modules/reagents/chemistry/reagents/medicine_reagents.dm
#	code/modules/surgery/healing.dm
#	code/modules/unit_tests/designs.dm
#	icons/mob/inhands/items_lefthand.dmi
#	icons/mob/inhands/items_righthand.dmi
#	tgui/packages/tgui/interfaces/ChemDispenser.tsx
2025-11-29 22:49:21 -05:00
MrMelbert 4984b25cec Fixes wall mounts prioritizing TABLES (#94064)
## About The Pull Request

It checks its own turf before the turf behind it

## Changelog

🆑 Melbert
fix: Wall mounts no longer stick to tables instead of the wall behind it
/🆑
2025-11-22 17:36:07 +01:00
RikuTheKiller c7cb0674cc Preliminary blood refactor (#93854)
## About The Pull Request

Moves all blood handling into procs and adds ways to easily hook into
basically every basic blood behavior.

This PR is not meant to fix every single case of janky blood logic in
the game. The main point and motivation of this PR is to add hooks for
blood behaviors. This allows for way more flexibility with blood code.

I am not going to fix our 3000 instances of single-letter vars, wacky
blood transfers, etc. This is just the groundwork for future PRs to
build off of, and by itself, should do very little to change blood
behavior.

I also added a rigorous set of unit tests for verifying that all of the
basic blood volume procs work correctly.

## Why It's Good For The Game

Previously, blood was handled via directly reading/writing
[var/blood_volume]. This was INCREDIBLY inconsistent and there was no
way to hook into it. This PR makes blood handling way more consistent,
which is great for all sorts of features.
2025-11-13 11:45:36 -06:00
Roxy 71faa643bf Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-2025-11-12 2025-11-12 16:44:13 -05:00
paganiy b8f75406c1 Recycler minor cleaning. (#93837)
## About The Pull Request
Cleans up the recycler code to be easier to read and work better:
- Combined safety checks into one function.
- Preventing unnecessary item collection from mobs when safety mode is
active.
- Fixing issue with deleting content of holographic objects. (i think
this bug still exists in many other places in code where holograms are
being deleted)
- Unit test.
## Why It's Good For The Game
It's good, i think.
## Changelog
🆑
fix: Fixed recycler deconstruction.
fix: Holograms now properly drop their contents when processed in
recycler instead of deleting them.
code: Cleaned up recycler code.
/🆑
2025-11-11 17:34:30 -07:00
MrMelbert dc1df52bba Caps custom AAS message length to a more reasonable value (#93829)
## About The Pull Request

Reduces the max length you can set an AAS message by 83% (1024
characters -> 168 characters)

## Why It's Good For The Game

I think most people would agree it's fairly annoying when someone edits
the AAS messages to be full paragraphs, filling common up with nonsense

Ostensibly this can be handled by admins but I think allowing someone to
enter 1000 characters here is a bit excessive in the first place - The
longest default message we have is 144 characters

Alternatively I can cap message length on a per-message-type basis so
the most common messages (arrivals, weather) have a far shorter limit
than the uncommon messages (security alerts)

## Changelog

🆑 Melbert
del: Caps "Automated Announcement System" messages to 168 characters
(was: 1024 characters)
/🆑
2025-11-08 21:44:41 -07:00
Roxy d0ca474789 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-2025-11-05 2025-11-05 19:43:07 -05:00
Arturlang 526a6c3839 re-adds and re-implements the heretic unit test (#93762)
## About The Pull Request
holy shit this was agony to do.
re-implements the heretic unit test in a way that works with the new
system of multiple list while being as thorough as possible

## Why It's Good For The Game
seeing unused knowledges good, which this has already found

## Changelog

🆑
code: heretic unit test is back
/🆑
2025-11-04 21:09:01 +01:00
Roxy e28e9fbdba Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-23-10-2025 2025-10-23 17:38:23 -04:00
Ghom e5be2d0f91 Sensors can now be printed, removed and installed on jumpsuits. HANDCRAFTED jumpsuits no longer have sensors by default (also mild crafting refactor) (#93121)
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
2025-10-18 11:43:38 +02:00
Roxy d14e538393 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-15-10-2025 2025-10-15 19:34:41 -04: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
MrMelbert da10322dc1 Fix modsuits and defibs (#93373)
## About The Pull Request

Fixes #93359

Caused by #93165

Inventory screen elements were no longer considered reachable, which
broke mousedrop handing on objects that check "is dragging into
inventory slot"

I don't know the best way to fix this yet but I figured the next best
thing would be to make all of these use the `drag_pickup` element, which
skips this reach-ability check

Thus I refactored it slightly to accommodate for items which should
contextually not be drag-pick-up-abble and bam, works like a charm

## Changelog

🆑 Melbert
fix: Dragging defibs and modsuits off your back works again
/🆑

---------

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Xander3359 <66163761+Xander3359@users.noreply.github.com>
2025-10-11 18:17:23 -04:00
MrMelbert dd8af45715 Fix soup pots being unreachable (#93377)
## About The Pull Request

Caused by #93165 

I'm not sure but I think this was just missing a check for
`TRAIT_SKIP_BASIC_REACH_CHECK`, because soup pots are given that trait

## Changelog

🆑 Melbert
fix: You can interact with soup pots on stoves again
/🆑
2025-10-11 00:16:15 +02:00
MrMelbert e83fd2603f Fix buckling and probably a lot more mousedrop interactions (#93352) 2025-10-08 11:47:52 +02:00
MrMelbert 858c241ae2 Fix screen alert click (#93337)
## About The Pull Request

#93305 rearranged the logic for `alert/Click` but deleted `return TRUE`
at the end which all subtypes rely on

## Changelog

🆑 Melbert
fix: Screen alerts are clickable again
/🆑
2025-10-07 20:08:57 +02:00
SmArtKar b99bea96a8 Mining style hotswapping now respects item interactions (#93277)
## About The Pull Request

Hotswapping now hijacks the attack chain in pre_attack rather than doing
so before item_interaction, which now allows players to interact with
items in their inventories (such as stabilizing cores with serums)
without hotswapping the two items.
Also added a unit test to ensure that it works as intended.

## Changelog
🆑
fix: Mining style hotswapping now respects item interactions
/🆑
2025-10-07 02:43:07 +02:00
Tim d1cf293c58 More trash added to spawners plus unit test (#93045)
## About The Pull Request
This adds more trash: 
- Paper 
- Empty cigarette packs
- Empty lighters
- Empty food containers from snacks
- Empty can containers
- Unarmed mousetraps
- Cut wire
- Broken plates
- ~~Empty bowls~~

This slightly tweaks some existing values to make things feel fresh.
Also adds a unit test to enforce trash food types to be added to the
trash spawner.
 
## Why It's Good For The Game
The more trash we have, the less we'll feel bad about being garbage
players.

## Changelog
🆑
qol: More types of garbage (empty lighters, empty cigarette packs, empty
food, etc.) have been added to the trash spawner.
qol: Paper plane added to the paper spawner, which is now used in the
trash spawner.
/🆑
2025-10-05 07:31:21 +02:00
xPokee 8aa39b75f0 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-10-04 05:28:09 -04:00
SimplyLogan 57028c78f8 Neurine Trauma Exploit - Unit Test & Fix (#93208)
## About The Pull Request

I was a solo doctor when someone chem factorised this and killed most of
the crew :)

Fixes #93133 
temp_trauma was declared as an instance reference but stored a type path

Store the actual trauma better and direct delete it, then cleans it up.

Also adds a unit test.
## Why It's Good For The Game

- Exploit farming bad
## Changelog
🆑
fix: Fixes endless Neurine trauma farming & adds unit test to keep it
safe
/🆑

Co-authored-by: loganuk <falseemail@aol.com>
2025-10-04 04:41:39 +02:00
xPokee 5e629dff04 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-10-03 07:05:54 -04:00