Commit Graph
224 Commits
Author SHA1 Message Date
Alexis 88e84645b1 Merge commit '6b52b564a50e4f3091470529c683587e5de15d49' into upstream-sync-7-22-2026 2026-07-22 13:39:09 -04:00
SmArtKarandGitHub 8f6c36dc76 Fixes particle weather bleeding through z-levels when different weathers are present (#96802)
## About The Pull Request

The original implementation was flawed as it added all particle holders
to vis_contents and displayed/masked all of them at once if the z-level
had any weather present. This caused "bleed-through" if two z-levels
with the same z-stack offset had particle weather running at the same
time (such as ash storm on lavaland and a weather anomaly rain on
station's first z-level) causing particles from both z-stacks to display
on both z-levels. By tracking holder's assigned z-levels we can filter
holders not affecting any levels in the current plane z-stack, which
solves this issue. There's still the problem of multiple particle
weathers running on the same z-level, but this is so insanely rare (and
also some other code would break anyways) I don't think its worth
currently bothering with as it would require some insane code to
resolve.

## Changelog
🆑
fix: Fixed particle weather bleeding through z-levels when different
weathers are present
/🆑
2026-07-07 09:32:15 +02:00
SmArtKarandGitHub 940d21740b Fixes rain overlay rendering (only) with particle weather enabled (#96776)
## About The Pull Request

This achieved opposite of the desired effect, making the overlay render
only with the particle weather pref ON, not OFF

## Changelog
🆑
fix: Fixed rain overlay rendering (only) with particle weather enabled
/🆑
2026-07-04 19:51:09 +02:00
SmArtKarandGitHub 06fcea20e4 Fixes radstorms rendering above HUDs and other weather bugs (#96623)
## About The Pull Request

Closes #96601
Also fixes pref button breaking one of the modes permanently when
swapped within a round, rain not displaying (due to missing overlay
states) when particle weather is disabled, and weather particle plates
having the same name as weather planes (causes dupe entries in the
planecube debugger)

## Changelog
🆑
fix: Radstorms (and other weather) no longer go over your hud on multi-z
maps
fix: Rain is no longer invisible when you have particle weather disabled
fix: Changing the particle weather pref no longer permanently breaks
some weathers for the round
/🆑
2026-06-26 00:21:30 +02:00
Roxy de4c3b255d Merge branch 'master' of github.com:tgstation/tgstation into upstream-2026-06-23 2026-06-23 15:51:55 -04:00
SmArtKarandGitHub a4dcdebf39 Invests /tg/station Foundation funds into NVIDIA stocks (Adds a particle weather toggle) (#96510)
## About The Pull Request

Due to a BYOND bug, large amounts of particles will cause immense lag
and framedrops on AMD GPUs, no matter how good the GPU itself is.
Unfortunately this is most noticeable with new particle weather, to the
point where storms reduce framerate to single digits for players who
haven't invested into NVIDIA before the AI market boom.

By rendering overlays twice and only enabling one of the planes, we can
allow players to toggle between new particle weather (semi-transparent
overlays + particles) and old (fully opaque overlays)
Unfortunately we don't have a way to check the player's GPU (at least
not easily) so players will have to change it themselves


https://github.com/user-attachments/assets/0c36fca4-c8a4-42ed-895f-42e853b10f44

(Particle weather is a bit more dense without ghost vision but i'm too
lazy to re-record)

Closes #96460 (Sort of)

## Changelog
🆑
qol: Particle weather can now be disabled in favor of old weather. !!!
AMD GPU USERS NEED TO SWITCH TO OLD WEATHER TO FIX THE LAG!!!
/🆑
2026-06-15 21:57:30 +02:00
SmArtKarandGitHub d9ef40604c Fixes broken area overlays for particle weather (and speeds up fadeout animation) (#96450)
## About The Pull Request

Missing END_STAGE check caused mask overlays to remain when the weather
ended and bleed through the blackness if you did not have mesons
equipped (which i did during testing, and did not spot the issue. Oops)

## Changelog
🆑
fix: Fixed broken area overlays for particle weather 
/🆑
2026-06-12 20:10:11 +02:00
67bbc096a8 Introduces particle weather, converts rain and ash storms to it (#96297)
Co-authored-by: Lucy <lucy@absolucy.moe>
2026-06-06 19:33:45 -04:00
+37 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
1c94ccfe69 Maintenance Pill Rebalance / Random reagent spawning refactor (XENOMICROBE MAINTPILLS!!) (#95320)
## About The Pull Request
Refactors random reagent spawning to be divided into bitflags. This mean
you can now decide from which random sources a reagent is allowed to
spawn. Rejoice, now maintenance pills can have fun reagents without
having to deal with the balance implications of a botanist producing
1000u of it!

**SO NOW MAINTPILLS CAN HAVE CYBORG NANITES AND XENOMORPH MICROBES!!
REJOICE, MY ABOMINATIONS!!!**

Code stuff:
CAN_SYNTH is now only for copying reagents, which is what it was
originally intended for. A new randomized_spawns var has been added to
reagents that decided where it can spawn.

I've also changed some unsanitary reagent spawners to obey the spawn
flags. This was the beebox kit (which could spawn literally every
reagent in the game, including adminordrazine) and traitor bees, which
now can't spawn the two spider toxins and gatfruit toxin (why do we even
have gatfruit toxin?? shit does nothing).

Balance overview:
- Beeboxes no longer spawn everything
- Traitor bees no longer spawn venom, viper venom and gatfruit toxin
- Maintenance pills now spawn cyborg nanites and xenomorph microbes

When I say maintpills, I mean REAL maintpills. The ones of which only a
few spawn per round in maintenance, and not the fake ones that feature
creepers added to cargo, blackmarket and that got mapped in

## Why It's Good For The Game
We're limited to which reagents we can spawn randomly because sources
like strange seeds, geysers and fake maintpills are infinitely
reproducible, and can be used to get an infinite amount of every random
spawnable reagent in every round (to be fair this is quite labor
intensive, but never underestimate autism).

Only about 3-6 maintenance pills spawn per round and there's about 700
spawnable reagents. There's simply no way to force the odds to get the
reagent you want. I think the crew can have a little maintxenomicrobes
and a little maintpill borgnanites

As to why these two specifically: 
borgnanites are already only randomly obtainable, are cured easily and
the effects of it are just one more cyborg player. It's a fun story, and
not particularly disruptive to the round
Xenomicrobes are admin only, so I would not be lessening any other
features. Otherwise it's pretty much gonna cause an incident in-game
when this happens, but who cares!!!
I can make maintpills secretely reroll if the reagents are extracted
instead of eaten to keep these always contained to the person eating
them, but our playerbase so prefers eating over grinding that I think
it's fine

I have not included inverse reagents, blob spores etc because I respect
them as their own features. I would however like to add some new, wacky
maintpill reagents that can lead to some fun stories.

## Changelog
🆑
fix: Fixes beebox and traitor bees not obeying the reagent blacklist
balance: Maintenance pills (the achievement variety that only spawns in
maint) can now generate with xenomorph microbes and cyborg nanites
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2026-03-14 07:55:38 +00:00
SyncIt21andGitHub 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
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
MrMelbertandGitHub a9b0ecb7d0 Weather anomaly (#94509)
## About The Pull Request

A weather anomaly can spawn on the station, causing a sandstorm,
snowstorm, or rainstorm to affect the room (and nearby rooms). These
weathers range from "harmless" to "mildly damaging".

They last for around five minutes.
The weather doesn't start immediately, giving people time to neutralize
it before it causes damage.
Neutralizing the anomaly stops the weather. 
If they detonate, it just throw objects away from itself.

<img width="407" height="225" alt="image"
src="https://github.com/user-attachments/assets/2de1b797-2b17-442c-9023-11085b4849cf"
/>

<img width="991" height="674" alt="image"
src="https://github.com/user-attachments/assets/afe5a21d-9cf8-4e9d-95ec-adef6fd12a93"
/>

A rarer version of the anomaly can also occur, which brings a lightning
storm, which may damage the station itself.

Also, reactive weather armor. When you are hit, it summons a lightning
strike below nearby assailants.

## Why It's Good For The Game

With the added rain mechanics I wanted to use them, but it's kinda hard
to shoe them into the station because, "why is it raining on a space
station that makes no sense"

However, anomalies are weird, so this fits perfectly

## Changelog

🆑 Melbert
add: Weather anomalies, in four variants: Rain, snow, sand, and the rare
lightning storm.
add: Reactive Weather Armor
/🆑
2025-12-20 12:33:10 -05: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
Joshua KidderandGitHub 7a3ad79506 All camelCase (Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss) procs now use snake_case. UNDERSCORES RULE! (#94111)
## About The Pull Request
It's just a partial cleanup of
anti-[STYLE](https://github.com/tgstation/tgstation/blob/master/.github/guides/STYLE.md)
code from /tg/'s ancient history. I compiled & tested with my helpful
assistant and damage is still working.

<img width="1920" height="1040" alt="image"
src="https://github.com/user-attachments/assets/26dabc17-088f-4008-b299-3ff4c27142c3"
/>


I'll upload the .cs script I used to do it shortly.

## Why It's Good For The Game
Just minor code cleanup.

Script used is located at https://metek.tech/camelTo-Snake.7z

EDIT 11/23/25: Updated the script to use multithreading and sequential
scan so it works a hell of a lot faster
```
/*
//
Copyright 2025 Joshua 'Joan Metekillot' Kidder

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
//
*/
using System.Text.RegularExpressions;
class Program
{
    static async Task Main(string[] args)
    {
        var readFile = new FileStreamOptions
        {
            Access = FileAccess.Read,
            Share = FileShare.ReadWrite,
            Options = FileOptions.Asynchronous | FileOptions.SequentialScan
        };
        FileStreamOptions writeFile = new FileStreamOptions
        {
            Share = FileShare.ReadWrite,
            Access = FileAccess.ReadWrite,
            Mode = FileMode.Truncate,
            Options = FileOptions.Asynchronous
        };
        RegexOptions regexOptions = RegexOptions.Multiline | RegexOptions.Compiled;
        Dictionary<string, int> changedProcs = new();
        string regexPattern = @"(?<=\P{L})([a-z]+)([A-Z]{1,2}[a-z]+)*(Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss)([A-Z]{1,2}[a-z]+)*";
        Regex camelCaseProcRegex = new(regexPattern, regexOptions);

        string snakeify(Match matchingRegex)
        {
            var vals =
            matchingRegex.Groups.Cast<Group>().SelectMany(_ => _.Captures).Select(_ => _.Value).ToArray();
            var newVal = string.Join("_", vals.Skip(1).ToArray()).ToLower();
            string logString = $"{vals[0]} => {newVal}";
            if (changedProcs.TryGetValue(logString, out int value))
            {
                changedProcs[logString] = value + 1;
            }
            else
            {
                changedProcs.Add(logString, 1);
            }
            return newVal;
        }
        var dmFiles = Directory.EnumerateFiles(".", "*.dm", SearchOption.AllDirectories).ToAsyncEnumerable<string>();

        // uses default ParallelOptions
        // https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.paralleloptions?view=net-10.0#main
        await Parallel.ForEachAsync(dmFiles, async (filePath, UnusedCancellationToken) =>
        {
            var reader = new StreamReader(filePath, readFile);
            string oldContent = await reader.ReadToEndAsync();
            string newContent = camelCaseProcRegex.Replace(oldContent, new MatchEvaluator((Func<Match, string>)snakeify));
            if (oldContent != newContent)
            {
                var writer = new StreamWriter(filePath, writeFile);
                await writer.WriteAsync(newContent);
                await writer.DisposeAsync();
            }
            reader.Dispose();
        });
        var logToList = changedProcs.Cast<KeyValuePair<string, int>>().ToList();
        foreach (var pair in logToList)
        {
            Console.WriteLine($"{pair.Key}: {pair.Value} locations");
        }
    }
}

```

## Changelog
🆑 Bisar
code: All (Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss) procs now use
snake_case, in-line with the STYLE guide. Underscores rule!
/🆑
2025-11-27 15:50:23 -05: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
tontyandGitHub 14d2514aa9 [MDB IGNORE] Refactors away /area/station/ai_monitored and its subtypes (with bonus neat repathing) (#93704)
## About The Pull Request

/area/station/ai_monitored's behaviour was isolated into a component,
`/datum/component/monitored_area`, which itself uses
`/datum/motion_group`s to query cameras. Functionally, it (should) work
identically to the old implementation. I'm sure that behaviour could
have been further cleaned up, camera code is quite dreadful, but it's
better to focus on isolating the behaviour first. Baby steps.

Areas that want to opt into monitoring can set `var/motion_monitored` to
TRUE (this approach was taken to make subtyping easier).

The following non-AI areas were changed:
- /area/station/ai_monitored/security/armory ->
/area/station/security/armory
- /area/station/ai_monitored/command/nuke_storage ->
/area/station/command/vault
- /area/station/ai_monitored/command/storage/eva ->
/area/station/command/eva

All other `/area/station/ai_monitored` subtypes were repathed into
`/area/station/ai` and cleaned up in a way that I thought made logical
sense. It is **much** more readable now. For example:

- /area/station/ai_monitored/turret_protected/aisat ->
/area/station/ai/satellite
- /area/station/ai_monitored/command/storage/satellite ->
/area/station/ai/satellite/maintenance/storage
- /area/station/ai_monitored/turret_protected/ai ->
/area/station/ai/satellite/chamber
2025-11-03 11:27:14 -06:00
TimandGitHub d1df06460e Change thunder to not damage objects and smelt ores (#93093) 2025-10-30 14:26:59 +11:00
xPokee 5e629dff04 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-10-03 07:05:54 -04:00
721428c65a Status Display Automation & NT Logo Change (#93088)
## About The Pull Request

- Status Displays update automatically for emergency alerts and show
round start logos by default instead of a blank screen.
- Tested in game with manual graphics and with triggered events.
- There is also a priority system, some emergencies will display
temporarily if a higher priority (shuttle call) is in progress.
- It also has checks on when something ends, i.e if radiation storm
happens, the alert for that goes away after the storm passes instead of
staying on the display.
- The manual buttons on the comms console to update the screens are
still there and work with this.
- BLOB file tweaks - All blob features works but with non blocking
cleanup as Linter threw errors.
- Also found a nicer sprite from AI core to use for the NT logo on the
displays since we'll be seeing it on more, the current one is just a bit
too bright

| Default logo | Alert Level Auto Switch | Events "can" interrupt
shuttle call display but only for 30 seconds |
|--------|--------|--------|
| <img width="443" height="182" alt="image"
src="https://github.com/user-attachments/assets/4027d8cc-041a-4e26-8120-742bf38f9c8a"
/>| <img width="444" height="181" alt="image"
src="https://github.com/user-attachments/assets/267363be-7f3a-4b63-a412-ea74c9d23c60"
/> | <img width="432" height="172" alt="image"
src="https://github.com/user-attachments/assets/842b9bfd-6e32-4833-8c06-42518dd8c0d2"
/> |

**Nanotrasen Logo Replacement - Left is original - Right is new**

<img width="181" height="82" alt="image"
src="https://github.com/user-attachments/assets/ac78d1c2-059b-4ab5-9d2c-3e59bec87620"
/>


## Why It's Good For The Game

- Status displays leave an empty void on the walls in rounds, this adds
a bit more value to them
- Should make the screens feel busier/more dynamic and the game a little
more engaging
## Changelog
🆑
add: Status displays now show logo at round start - Status displays now
change more often for alerts and other key events
fix: Blob non blocking cleanup - Should have no change in player
experience
image: Replaces bright blue NT logo with the more subtle slightly
animated sprite from AI core, fits nicer.
/🆑

---------

Co-authored-by: loganuk <falseemail@aol.com>
2025-09-30 19:50:24 +02:00
Thunder12345andRoxy e7c25d4c40 The Glitterening (#92226)
## About The Pull Request

Adds a number of new capabilities to glitter.

- It can be any colour.
<img width="657" height="398" alt="image"
src="https://github.com/user-attachments/assets/60e80c04-8eee-470c-8953-47f6eda9f83e"
/>

- It can be made in chemistry and dyed by combining it with acetone and
other reagents to give it the average colour of the non-glitter,
not-acetone reagents.
- Multiple colours can be mixed into one reagent datum, randomly
depositing a colour from those in the datum on the floor.
<img width="554" height="507" alt="image"
src="https://github.com/user-attachments/assets/9cc7d1d5-9bec-4b28-af06-310ffb24de49"
/>

- Anyone with glitter reagent in them will cough glitter onto the floor
- Glittery crates will leave a trail of appropriately coloured glitter
when moved
<img width="960" height="259" alt="image"
src="https://github.com/user-attachments/assets/71cc1176-23f9-4ae7-b500-1744b752c014"
/>

Resprited glitter to support these changes and make it not look like gas
(or ass).

## Why It's Good For The Game

It looks cool and raises the bar for chemists maximally pissing off the
janitor as they fill a room with multicoloured glitter and all the
occupants run off to cough more up all over the surrounding area.

## Changelog
🆑
add: Glitter can now be made from plastic polymers and aluminium.
add: Plastic polymer can be made at any temperature, and then heated to
produce sheets.
add: Glitter can now be made any colour, mix 10 units each of glitter
and acetone to change its colour to that of the other reagents in the
beaker.
add: Mixing different colours of glitter will cause a random selection
of those colours to appear on the floor when released.
add: Being exposed to glitter in reagent form causes you to cough up
more glitter onto the floor
add: Dragging glittery crates will now spread a trail of glitter and
angry janitors behind them.
image: Added new glitter sprites (that don't look like gasses)
/🆑
2025-08-04 20:53:39 -04:00
Thunder12345andGitHub d97c57b263 The Glitterening (#92226)
## About The Pull Request

Adds a number of new capabilities to glitter.

- It can be any colour.
<img width="657" height="398" alt="image"
src="https://github.com/user-attachments/assets/60e80c04-8eee-470c-8953-47f6eda9f83e"
/>

- It can be made in chemistry and dyed by combining it with acetone and
other reagents to give it the average colour of the non-glitter,
not-acetone reagents.
- Multiple colours can be mixed into one reagent datum, randomly
depositing a colour from those in the datum on the floor.
<img width="554" height="507" alt="image"
src="https://github.com/user-attachments/assets/9cc7d1d5-9bec-4b28-af06-310ffb24de49"
/>

- Anyone with glitter reagent in them will cough glitter onto the floor
- Glittery crates will leave a trail of appropriately coloured glitter
when moved
<img width="960" height="259" alt="image"
src="https://github.com/user-attachments/assets/71cc1176-23f9-4ae7-b500-1744b752c014"
/>

Resprited glitter to support these changes and make it not look like gas
(or ass).

## Why It's Good For The Game

It looks cool and raises the bar for chemists maximally pissing off the
janitor as they fill a room with multicoloured glitter and all the
occupants run off to cough more up all over the surrounding area.

## Changelog
🆑
add: Glitter can now be made from plastic polymers and aluminium.
add: Plastic polymer can be made at any temperature, and then heated to
produce sheets.
add: Glitter can now be made any colour, mix 10 units each of glitter
and acetone to change its colour to that of the other reagents in the
beaker.
add: Mixing different colours of glitter will cause a random selection
of those colours to appear on the floor when released.
add: Being exposed to glitter in reagent form causes you to cough up
more glitter onto the floor
add: Dragging glittery crates will now spread a trail of glitter and
angry janitors behind them.
image: Added new glitter sprites (that don't look like gasses)
/🆑
2025-08-03 00:25:58 +10:00
LT3andGitHub a091c5e86a Radiation storm event fixes/improvements (#3905)
## About The Pull Request

Fixes and tweaks to the radiation storm event.
- Actually enables/revokes emergency maintenance access like the
announcement says
- Removes the part of the announcement telling people to go to medbay at
the START of the radstorm
- Adjusts the announcement text to match the audio
- Fixes a check in minimum_security_level to ignore if emergency access
is already enabled
- Updated our alert proc with a new arg added by TG
- The weather alert sound plays to people on the impacted Z level,
making you aware the weather event started
- Deletes a duplicate radiation.ogg that exists for some reason

## Proof Of Testing

<details>
<summary>Screenshots/Videos</summary>

Shorter event announcement (No more 'please go to medbay')


https://github.com/user-attachments/assets/552e4eeb-a09e-4467-b69c-f10add7ecdb1

</details>

## Changelog

🆑 LT3
fix: Radiation storm event actually enables maintenance access
qol: Improved feedback and notifications for the radiation storm event
/🆑
2025-05-26 15:33:38 -07:00
d34d1f8af9 Lightning strikes thrice: Stops lightning from causing spurious CI failures (#91036)
## About The Pull Request

So Thor was very displeased with this one particular CI run, and decided
to strike the same turf with lightning four consecutive times.


![image](https://github.com/user-attachments/assets/4de88c60-7dd7-44ce-ab44-2b93d565a198)

This resulted in trying to hit the same wire that already had been long
since nuked by an initial blast. _three more times_.

Fixes that from happening in the future.

## Why It's Good For The Game

Less flaky CI failures from the wrathful gods

## Changelog

Nothing player facing

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2025-05-22 21:17:29 -04:00
SmArtKarandRoxy ed26964f0b Fixes holoparasites taking damage from ash storms inside of immune hosts, miner holoparas are now storm immune (#91133)
## About The Pull Request
Closes #91040 by making the check on the ash storm be inside of the
recursive parent checking, makes power miners (holoparasites) spawned
from the dusty shard ash and snowstorm immune

## Why It's Good For The Game

Fixes bug, latter makes you take double damage if you don't have
protection, and if you do it prevents your miner from going outside of
your body during a storm. Them having protection from storms is kinda
fitting.

## Changelog
🆑
balance: Power Miners are now ash and snowstorm immune
fix: Holoparasites no longer take damage from ash storms inside of
storm-protected hosts
/🆑
2025-05-22 21:12:29 -04:00
54a23c787b Lightning strikes thrice: Stops lightning from causing spurious CI failures (#91036)
## About The Pull Request

So Thor was very displeased with this one particular CI run, and decided
to strike the same turf with lightning four consecutive times.


![image](https://github.com/user-attachments/assets/4de88c60-7dd7-44ce-ab44-2b93d565a198)

This resulted in trying to hit the same wire that already had been long
since nuked by an initial blast. _three more times_.

Fixes that from happening in the future.

## Why It's Good For The Game

Less flaky CI failures from the wrathful gods

## Changelog

Nothing player facing

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2025-05-16 22:55:22 -07:00
SmArtKarandGitHub 768c4d86b9 Fixes holoparasites taking damage from ash storms inside of immune hosts, miner holoparas are now storm immune (#91133)
## About The Pull Request
Closes #91040 by making the check on the ash storm be inside of the
recursive parent checking, makes power miners (holoparasites) spawned
from the dusty shard ash and snowstorm immune

## Why It's Good For The Game

Fixes bug, latter makes you take double damage if you don't have
protection, and if you do it prevents your miner from going outside of
your body during a storm. Them having protection from storms is kinda
fitting.

## Changelog
🆑
balance: Power Miners are now ash and snowstorm immune
fix: Holoparasites no longer take damage from ash storms inside of
storm-protected hosts
/🆑
2025-05-16 17:07:11 +03:00
SmArtKarandShadow-Quill e14634872e Fixes weather getting stuck and not affecting mobs (#90691)
## About The Pull Request

Weather subsystem code mixed up defines and indexes resulting in broken
behavior when you only had mobs and thunder defined in a subsystem.
Solved this by converting currentpart from define to active task index

Closes #90677

## Changelog
🆑
fix: Ash storms do damage again
/🆑
2025-04-29 18:03:35 -06:00
e732a19949 Add wizard event - Magical Rain (#90495)
## About The Pull Request
Adds a new wizard event - Magical Rain

This selects a random reagent from a curtailed list that is rained down
on the station. The only safe spaces are in maintenance and containers
like lockers. Of course the wizard is not directly affected by the
reagent, although side effects may still apply. For example, if it is
raining lube, it will cause turfs to get slippery which can slip the
wizard. You can also collect the rain in containers, which might be
funny or useful depending on what it is. (Alcoholics love booze rain)

I did have to trim down the list of reagents since there are over +700
and most of them do nothing to mobs/turfs when they `TOUCH`. The list is
~50 reagents that are:

```dm
	// most medicine do nothing when it comes into contact with turfs or mobs (via TOUCH) except for a few
	var/list/allowed_medicine = list(
		/datum/reagent/medicine/c2/synthflesh,
		/datum/reagent/medicine/adminordrazine,
		/datum/reagent/medicine/strange_reagent,
		// include a random medicine
		pick(subtypesof(/datum/reagent/medicine)),
	)
	GLOB.wizard_rain_reagents |= allowed_medicine

	// One randomized type is allowed so the whitelist isn't spammed with subtypes
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/glitter))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/carpet))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/mutationtoxin))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/plantnutriment))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/uranium))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/luminescent_fluid))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/impurity))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/drug))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/water))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/fuel))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/colorful_reagent))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/ants))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/lube))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/space_cleaner))

	// lots of toxins do nothing so we need to be picky
	var/list/allowed_toxins = list(
		/datum/reagent/toxin/itching_powder,
		/datum/reagent/toxin/polonium, // radiation
		/datum/reagent/toxin/mutagen,
		// all the acids
		/datum/reagent/toxin/acid,
		/datum/reagent/toxin/acid/fluacid,
		/datum/reagent/toxin/acid/nitracid,
		// include a random toxin
		pick(subtypesof(/datum/reagent/toxin)),
	)
	GLOB.wizard_rain_reagents |= allowed_toxins

	// too many food & drinks so blacklist most of them
	var/list/allowed_food_drinks = list(
		/datum/reagent/consumable/ethanol/wizz_fizz,
		/datum/reagent/consumable/condensedcapsaicin,
		/datum/reagent/consumable/frostoil,
		// include a random food or drink
		pick(subtypesof(/datum/reagent/consumable)),
		// include a random regular drink (vodka, wine, beer, etc.)
		pick(/obj/machinery/chem_dispenser/drinks/beer::beer_dispensable_reagents),
	)
	GLOB.wizard_rain_reagents |= allowed_food_drinks

	var/list/allowed_exotic_reagents = list(
		// fire
		/datum/reagent/clf3,
		/datum/reagent/phlogiston,
		/datum/reagent/napalm,
		// cosmetic
		/datum/reagent/hair_dye,
		/datum/reagent/barbers_aid,
		/datum/reagent/baldium,
		/datum/reagent/mulligan,
		/datum/reagent/growthserum,
		// op shit
		/datum/reagent/romerol,
		/datum/reagent/gondola_mutation_toxin,
		/datum/reagent/metalgen,
		/datum/reagent/flightpotion,
		/datum/reagent/eigenstate,
		/datum/reagent/magillitis,
		/datum/reagent/pax,
		/datum/reagent/gluttonytoxin,
		/datum/reagent/aslimetoxin,
		// misc
		/datum/reagent/blood,
		/datum/reagent/hauntium,
		/datum/reagent/copper,
	)
	GLOB.wizard_rain_reagents |= allowed_exotic_reagents

	// add a few randomized reagents not listed above so they at least have a chance
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent))
```

## Why It's Good For The Game
More interesting effects for weather. The wizard events are always
supposed to be silly and wacky, so having stuff like raining ants or
booze is hilarious. Several OP chems are included like napalm, strange
reagent, and flight potion which can lead to some chaos.

## Changelog
🆑
add: Add wizard magical rain event. A random reagent is selected to rain
down across the station. The only places to escape are in maintenance
and inside containers such as lockers. The wizard is not directly
affected by the reagent, but the side effects might still apply. (ie.
raining lube, will make the floors slippery, which can slip the wizard)
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2025-04-29 17:54:00 -06:00
TimandShadow-Quill 1883d5d35d Add rare chance of thunder for ash storms on lavaland (#90488)
## About The Pull Request
This adds `THUNDER_CHANCE_VERY_RARE` for a thunder strike to occur on
lavaland during ash storms. The chance is 1 in 50,000, which is rare
enough for it to occur a few times during an ash storm. The emberfalls
storm does not have thunder strikes applied. I also went ahead and
colored the thunder red, to go with the red color of the mining turf
colors as requested by:


![Discord_zBq1WlovrU](https://github.com/user-attachments/assets/11ea9b16-4cea-468d-adae-0607da88edd2)


## Why It's Good For The Game
Fun little rare event to make ash storms cool. 

You might wonder why we don't increase the chance? Since lavaland is
really only used by a few players during a round, it is a good idea to
minimize the amount of turf processing that is done. By making it very
rare, the calculations average about ~`1.18` turfs being processed per
tick for the entire z-level.


![Code_HdVqgjWtnN](https://github.com/user-attachments/assets/ec576348-b85f-4db5-97eb-4c6bbb5de118)


## Changelog
🆑
add: Add rare chance of thunder strikes during ash storms on lavaland
/🆑
2025-04-29 17:45:29 -06:00
1f855eb9ff Weather DLC - Make it Rain Anything! (#89550)
Introducing more weather types! And yes, you can now have rain be
reagent based!

<details>
<summary>Regular Rain</summary>

![dreamseeker_9S1WzdBW8Z](https://github.com/user-attachments/assets/83aaa1fe-9105-4e15-8455-0337c5c592ef)

</details>

<details>
<summary>Blood Rain</summary>

![dreamseeker_SZufAoXDFt](https://github.com/user-attachments/assets/209404dc-34dd-4381-9bab-9b84eaec2658)

</details>

<details>
<summary>Acid Rain</summary>

![dreamseeker_ngiOqdB5n2](https://github.com/user-attachments/assets/0ab953c6-a215-444a-bdbd-addfc2b1ddbb)

</details>

You can even make it rain ants, plasma, or drugs. All of their effects
get applied to turfs, objects, and mobs depending on the weather options
you select.

Did I mention... there is thunder?

<details>
<summary>Thunder Strikes</summary>

![Untitled video - Made with
Clipchamp](https://github.com/user-attachments/assets/7c5c5930-6e0a-4706-a41b-3cbcc277bfd5)

</details>

<details>
<summary>Sand Storms</summary>

![dreamseeker_ZEFUS73dSA](https://github.com/user-attachments/assets/4a754f2d-c4e5-4b2f-9add-4742628cfa74)

</details>

Despite all this new stuff, none of it has been directly added to the
game but the code can be used in the future for:
- Wizard event - Similar to lava on floor, but this time make the
reagent random or picked from a list and give wizard immunity
- Chaplain ability - Maybe make this a benefit or ability once enough
favor has been obtained
- Admin events - I have added a BUNCH of admin tooling to run customized
weather events that let you control a lot of options
- New station maps/biomes for downstreams (Jungle Station, etc.)
- Change Ion storms to use the new weather system that triggers
EMP/thunder effects across the station
- IceBox could get plasma rain
- Lavaland could get thunder effects applied to ash storms

Relevant PRs that removed/added some of the weather stuff I used:
- #60303
- #25222

---

- Rain sprites were added via [novaepee](https://github.com/novaepee) in
https://github.com/tgstation/TerraGov-Marine-Corps/pull/9675
- Sand sprites were added via [TiviPlus](https://github.com/TiviPlus)
(who commissioned them from bimmer) in
https://github.com/tgstation/TerraGov-Marine-Corps/pull/4645
- Rain sounds [already existed on
tg](https://github.com/tgstation/tgstation/pull/25222#discussion_r106794579)
and were provided by provided by Cuboos, using Royalty Free sounds,
presumed under default tg sound license - Creative Commons 3.0 BY-SA
- Siren sound is from siren.wav by IFartInUrGeneralDirection --
[Freesound](https://freesound.org/s/46092/) -- License: Attribution 4.0

The original `siren.ogg` sound used on a lot of SS13 servers doesn't
seem to have any attribution that I could locate. The sound was added
about 15 years ago. So I just looked for a somewhat similar sounding
siren noise on Freesound.

More weather customization!

🆑
add: Added new weather types for rain and sandstorms. Rain now uses a
reagent that gets exposed to the turfs, mobs, and objects. There is also
a thunder strike setting you can apply to any weather.
add: Hydro trays and soil will now add reagents to their trays when
exposed to a chemical reaction. (weather, shower, chem spills, foam
grenades, etc.)
add: Weather temperature now affects weather reagents and mobs body
temperature.
bal: Snowstorm temperature calculations were tweaked to allow universal
weather temperature effects.
sound: Added weather sounds from TGMC for rain and sirens (attributed to
Cuboos and IFartInUrGeneralDirection )
image: Added weather images from TGMC for rain and sand storms
(attributed to Novaepee and Bimmer)
refactor: Refactored a lot of the weather code to be more robust
admin: Admins can now control more weather related options when running
weather events. The weather admin verbs have been moved to their own
"Weather" category under the Admin tab.
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-04-29 17:44:46 -06:00
SmArtKarandGitHub 13a3d24984 Fixes weather getting stuck and not affecting mobs (#90691)
## About The Pull Request

Weather subsystem code mixed up defines and indexes resulting in broken
behavior when you only had mobs and thunder defined in a subsystem.
Solved this by converting currentpart from define to active task index

Closes #90677

## Changelog
🆑
fix: Ash storms do damage again
/🆑
2025-04-18 11:29:53 -04:00
8aa86fb326 Add wizard event - Magical Rain (#90495)
## About The Pull Request
Adds a new wizard event - Magical Rain

This selects a random reagent from a curtailed list that is rained down
on the station. The only safe spaces are in maintenance and containers
like lockers. Of course the wizard is not directly affected by the
reagent, although side effects may still apply. For example, if it is
raining lube, it will cause turfs to get slippery which can slip the
wizard. You can also collect the rain in containers, which might be
funny or useful depending on what it is. (Alcoholics love booze rain)

I did have to trim down the list of reagents since there are over +700
and most of them do nothing to mobs/turfs when they `TOUCH`. The list is
~50 reagents that are:

```dm
	// most medicine do nothing when it comes into contact with turfs or mobs (via TOUCH) except for a few
	var/list/allowed_medicine = list(
		/datum/reagent/medicine/c2/synthflesh,
		/datum/reagent/medicine/adminordrazine,
		/datum/reagent/medicine/strange_reagent,
		// include a random medicine
		pick(subtypesof(/datum/reagent/medicine)),
	)
	GLOB.wizard_rain_reagents |= allowed_medicine

	// One randomized type is allowed so the whitelist isn't spammed with subtypes
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/glitter))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/carpet))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/mutationtoxin))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/plantnutriment))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/uranium))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/luminescent_fluid))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/impurity))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent/drug))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/water))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/fuel))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/colorful_reagent))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/ants))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/lube))
	GLOB.wizard_rain_reagents |= pick(typesof(/datum/reagent/space_cleaner))

	// lots of toxins do nothing so we need to be picky
	var/list/allowed_toxins = list(
		/datum/reagent/toxin/itching_powder,
		/datum/reagent/toxin/polonium, // radiation
		/datum/reagent/toxin/mutagen,
		// all the acids
		/datum/reagent/toxin/acid,
		/datum/reagent/toxin/acid/fluacid,
		/datum/reagent/toxin/acid/nitracid,
		// include a random toxin
		pick(subtypesof(/datum/reagent/toxin)),
	)
	GLOB.wizard_rain_reagents |= allowed_toxins

	// too many food & drinks so blacklist most of them
	var/list/allowed_food_drinks = list(
		/datum/reagent/consumable/ethanol/wizz_fizz,
		/datum/reagent/consumable/condensedcapsaicin,
		/datum/reagent/consumable/frostoil,
		// include a random food or drink
		pick(subtypesof(/datum/reagent/consumable)),
		// include a random regular drink (vodka, wine, beer, etc.)
		pick(/obj/machinery/chem_dispenser/drinks/beer::beer_dispensable_reagents),
	)
	GLOB.wizard_rain_reagents |= allowed_food_drinks

	var/list/allowed_exotic_reagents = list(
		// fire
		/datum/reagent/clf3,
		/datum/reagent/phlogiston,
		/datum/reagent/napalm,
		// cosmetic
		/datum/reagent/hair_dye,
		/datum/reagent/barbers_aid,
		/datum/reagent/baldium,
		/datum/reagent/mulligan,
		/datum/reagent/growthserum,
		// op shit
		/datum/reagent/romerol,
		/datum/reagent/gondola_mutation_toxin,
		/datum/reagent/metalgen,
		/datum/reagent/flightpotion,
		/datum/reagent/eigenstate,
		/datum/reagent/magillitis,
		/datum/reagent/pax,
		/datum/reagent/gluttonytoxin,
		/datum/reagent/aslimetoxin,
		// misc
		/datum/reagent/blood,
		/datum/reagent/hauntium,
		/datum/reagent/copper,
	)
	GLOB.wizard_rain_reagents |= allowed_exotic_reagents

	// add a few randomized reagents not listed above so they at least have a chance
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent))
	GLOB.wizard_rain_reagents |= pick(subtypesof(/datum/reagent))
```

## Why It's Good For The Game
More interesting effects for weather. The wizard events are always
supposed to be silly and wacky, so having stuff like raining ants or
booze is hilarious. Several OP chems are included like napalm, strange
reagent, and flight potion which can lead to some chaos.

## Changelog
🆑
add: Add wizard magical rain event. A random reagent is selected to rain
down across the station. The only places to escape are in maintenance
and inside containers such as lockers. The wizard is not directly
affected by the reagent, but the side effects might still apply. (ie.
raining lube, will make the floors slippery, which can slip the wizard)
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2025-04-15 11:36:39 +01:00
TimandGitHub 342f8a1250 Add rare chance of thunder for ash storms on lavaland (#90488)
## About The Pull Request
This adds `THUNDER_CHANCE_VERY_RARE` for a thunder strike to occur on
lavaland during ash storms. The chance is 1 in 50,000, which is rare
enough for it to occur a few times during an ash storm. The emberfalls
storm does not have thunder strikes applied. I also went ahead and
colored the thunder red, to go with the red color of the mining turf
colors as requested by:


![Discord_zBq1WlovrU](https://github.com/user-attachments/assets/11ea9b16-4cea-468d-adae-0607da88edd2)


## Why It's Good For The Game
Fun little rare event to make ash storms cool. 

You might wonder why we don't increase the chance? Since lavaland is
really only used by a few players during a round, it is a good idea to
minimize the amount of turf processing that is done. By making it very
rare, the calculations average about ~`1.18` turfs being processed per
tick for the entire z-level.


![Code_HdVqgjWtnN](https://github.com/user-attachments/assets/ec576348-b85f-4db5-97eb-4c6bbb5de118)


## Changelog
🆑
add: Add rare chance of thunder strikes during ash storms on lavaland
/🆑
2025-04-09 05:08:56 +02:00
36788ee05f Weather DLC - Make it Rain Anything! (#89550)
## About The Pull Request
##### Disclaimer - Some of the code/icons/sounds were ported from TMGC. 

Introducing more weather types! And yes, you can now have rain be
reagent based!

<details>
<summary>Regular Rain</summary>


![dreamseeker_9S1WzdBW8Z](https://github.com/user-attachments/assets/83aaa1fe-9105-4e15-8455-0337c5c592ef)

</details>

<details>
<summary>Blood Rain</summary>


![dreamseeker_SZufAoXDFt](https://github.com/user-attachments/assets/209404dc-34dd-4381-9bab-9b84eaec2658)

</details>

<details>
<summary>Acid Rain</summary>


![dreamseeker_ngiOqdB5n2](https://github.com/user-attachments/assets/0ab953c6-a215-444a-bdbd-addfc2b1ddbb)

</details>

You can even make it rain ants, plasma, or drugs. All of their effects
get applied to turfs, objects, and mobs depending on the weather options
you select.

Did I mention... there is thunder?

<details>
<summary>Thunder Strikes</summary>

![Untitled video - Made with
Clipchamp](https://github.com/user-attachments/assets/7c5c5930-6e0a-4706-a41b-3cbcc277bfd5)

</details>

<details>
<summary>Sand Storms</summary>


![dreamseeker_ZEFUS73dSA](https://github.com/user-attachments/assets/4a754f2d-c4e5-4b2f-9add-4742628cfa74)

</details>

Despite all this new stuff, none of it has been directly added to the
game but the code can be used in the future for:
- Wizard event - Similar to lava on floor, but this time make the
reagent random or picked from a list and give wizard immunity
- Chaplain ability - Maybe make this a benefit or ability once enough
favor has been obtained
- Admin events - I have added a BUNCH of admin tooling to run customized
weather events that let you control a lot of options
- New station maps/biomes for downstreams (Jungle Station, etc.)
- Change Ion storms to use the new weather system that triggers
EMP/thunder effects across the station
- IceBox could get plasma rain
- Lavaland could get thunder effects applied to ash storms

Relevant PRs that removed/added some of the weather stuff I used:
- #60303
- #25222

---

#### Attribution
- Rain sprites were added via [novaepee](https://github.com/novaepee) in
https://github.com/tgstation/TerraGov-Marine-Corps/pull/9675
- Sand sprites were added via [TiviPlus](https://github.com/TiviPlus)
(who commissioned them from bimmer) in
https://github.com/tgstation/TerraGov-Marine-Corps/pull/4645
- Rain sounds [already existed on
tg](https://github.com/tgstation/tgstation/pull/25222#discussion_r106794579)
and were provided by provided by Cuboos, using Royalty Free sounds,
presumed under default tg sound license - Creative Commons 3.0 BY-SA
- Siren sound is from siren.wav by IFartInUrGeneralDirection --
[Freesound](https://freesound.org/s/46092/) -- License: Attribution 4.0

The original `siren.ogg` sound used on a lot of SS13 servers doesn't
seem to have any attribution that I could locate. The sound was added
about 15 years ago. So I just looked for a somewhat similar sounding
siren noise on Freesound.

## Why It's Good For The Game
More weather customization!

## Changelog
🆑
add: Added new weather types for rain and sandstorms. Rain now uses a
reagent that gets exposed to the turfs, mobs, and objects. There is also
a thunder strike setting you can apply to any weather.
add: Hydro trays and soil will now add reagents to their trays when
exposed to a chemical reaction. (weather, shower, chem spills, foam
grenades, etc.)
add: Weather temperature now affects weather reagents and mobs body
temperature.
bal: Snowstorm temperature calculations were tweaked to allow universal
weather temperature effects.
sound: Added weather sounds from TGMC for rain and sirens (attributed to
Cuboos and IFartInUrGeneralDirection )
image: Added weather images from TGMC for rain and sand storms
(attributed to Novaepee and Bimmer)
refactor: Refactored a lot of the weather code to be more robust
admin: Admins can now control more weather related options when running
weather events. The weather admin verbs have been moved to their own
"Weather" category under the Admin tab.
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-04-07 18:46:28 +02:00
MrMelbertandRoxy 024ee4508d Adds snowstorm sounds (#89463)
## About The Pull Request

Unfortunately, the sound only plays when you're outside, under the
storm. I would love for it to play when you're near a window or
something, but that would vastly over-complicate things. Maybe later.


https://github.com/user-attachments/assets/6ca4bdb8-b1da-4644-bb71-6ca18cf3daec

## Why It's Good For The Game

Some free immersion. And in particular in the dark sometimes I don't
notice a snowstorm is raging so it adds some nice feedback.

## Changelog

🆑 Melbert
sound: Snowstorms now have sounds associated.
/🆑
2025-03-12 16:37:17 -04:00
TimandRoxy 1116dc8e7c Convert weather duration to use time defines (#89441)
## About The Pull Request
This converts many of the deciseconds numbers into using the proper time
defines `SECONDS` and `MINUTES`.

## Why It's Good For The Game
Cleaner code.

## Changelog
🆑
code: Convert weather duration to use time defines
/🆑
2025-03-12 16:00:06 -04:00
MrMelbertandGitHub 9f1b82d722 Adds snowstorm sounds (#89463)
## About The Pull Request

Unfortunately, the sound only plays when you're outside, under the
storm. I would love for it to play when you're near a window or
something, but that would vastly over-complicate things. Maybe later.


https://github.com/user-attachments/assets/6ca4bdb8-b1da-4644-bb71-6ca18cf3daec

## Why It's Good For The Game

Some free immersion. And in particular in the dark sometimes I don't
notice a snowstorm is raging so it adds some nice feedback.

## Changelog

🆑 Melbert
sound: Snowstorms now have sounds associated.
/🆑
2025-02-20 15:15:54 +01:00
Majkl-J b6b8306fda Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-25-02a 2025-02-20 00:00:19 -08:00
TimandGitHub 6f88be4901 Convert weather duration to use time defines (#89441)
## About The Pull Request
This converts many of the deciseconds numbers into using the proper time
defines `SECONDS` and `MINUTES`.

## Why It's Good For The Game
Cleaner code.

## Changelog
🆑
code: Convert weather duration to use time defines
/🆑
2025-02-12 19:30:19 -05:00
MrMelbertandGitHub 75696ab873 Fixes random stuff spilling into ooc tab (#88221)
## About The Pull Request

`boldannounce` is NOT for use ICly it's only for OOC stuff. `bolddanger`
is identical it just doesn't carry the same baggage

## Changelog

🆑 Melbert
fix: Stuff like the SM exploding will no longer output to your OOC tab
/🆑
2024-11-27 17:41:52 +01:00
18aa09b7e4 Fix weather effects not applying to areas like space (#88119)
## About The Pull Request
Weather effects were ignoring certain areas like space. This was due to
checking the area's `z` position. Some areas like `area/space` are in
many different z-levels and the `z` position defaults to Centcomm `z=1`.

The solution is to loop through `area.turfs_by_zlevel` and check if it
has any turfs in that z-level.

CC @LemonInTheDark the mutable overlay for weather effects is not
applying to space.


https://github.com/tgstation/tgstation/blob/7e27663517731fe8f3d955477b1a97ace5a6ff83/code/datums/weather/weather.dm#L253-L271

I'm assuming this is due to plane master shengians. I could just add the
effects like the radiation nebula:


https://github.com/tgstation/tgstation/blob/7e27663517731fe8f3d955477b1a97ace5a6ff83/code/datums/station_traits/negative_traits.dm#L486-L493

But this doesn't appear reversible. I'm open to suggestions.

## Why It's Good For The Game
Rad storms now affect space outside the station. Other weather effects
should also be consistent and not be ignored by certain misc. areas
types.

## Changelog
🆑
fix: Fix weather effects ignoring certain areas like space. 
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-11-24 20:54:11 +01:00
ChubbygummibearandMajkl-J eb3a0d4777 Weather planes from The Wallening to fix multi-z weather overlays (#86733)
## About The Pull Request

I started doing this for Yogstation, but ended up doing all my testing
on TG code since there's more debug tools to use, and @LemonInTheDark
said I should upstream it when I was done. So I'm just gonna start here.
The whole point of this is to stop multi-z maps from stacking weather
overlay effects like

![dreamseeker_FBUu3nPLCJ](https://github.com/user-attachments/assets/52559dfc-68d2-403d-8148-b410750f78c4)
Old pic I know, but you get the point

Now it behaves as expected


https://github.com/user-attachments/assets/6d737eae-2493-4b48-8870-e4ac73dcbbeb



https://github.com/user-attachments/assets/b253aa97-c90d-4049-a97d-940b0ec386d0


<details>

<summary>Note: this does not fix the issue of areas out of your view not
updating their appearance. 90% sure that's a Byond™️ issue</summary>


https://github.com/user-attachments/assets/3db5ce28-2623-4d3e-a5f4-bd561d96010a

</details>



## Why It's Good For The Game

Isolating weather to its own planes is good for having better control
over how it behaves. Since weather overlays are tied to areas it makes
them kinda hacky to begin with, but this is a step in reigning them in.

## Changelog
🆑
fix: fixed multi-z weather overlays stacking and not hiding overlays
above you
/🆑
2024-11-11 00:40:23 -08:00
Majkl-J e59d8ba64b Merge commit '179a607a90ad7ec62bdaff4e6fe72af60ee56442' of https://github.com/tgstation/tgstation into upstream-24-10b 2024-10-23 23:27:16 -07:00
Majkl-J f8faccd70a Merge branch 'master' of https://github.com/Skyrat-SS13/Skyrat-tg into upstream-24-10a 2024-10-20 04:12:02 -07:00
WaterpigandMajkl-J bb70889f6e TG Upstream Part 1
3591 individual conflicts

Update build.js

Update install_node.sh

Update byond.js

oh my fucking god

hat

slow

huh

holy shit

we all fall down

2 more I missed

2900 individual conflicts

2700 Individual conflicts

replaces yarn file with tg version, bumping us down to 2200-ish

Down to 2000 individual conflicts

140 down

mmm

aaaaaaaaaaaaaaaaaaa

not yt

575

soon

900 individual conflicts

600 individual conflicts, 121 file conflicts

im not okay

160 across 19 files

29 in 4 files

0 conflicts, compiletime fix time

some minor incap stuff

missed ticks

weird dupe definition stuff

missed ticks 2

incap fixes

undefs and pie fix

Radio update and some extra minor stuff

returns a single override

no more dupe definitions, 175 compiletime errors

Unticked file fix

sound and emote stuff

honk and more radio stuff
2024-10-19 08:04:33 -07:00
LT3andGitHub 21668da48b Adds radiation storms and scrubber overflows to event Enhanced Roleplay Check (#2180)
## About The Pull Request

Same as https://github.com/Skyrat-SS13/Skyrat-tg/pull/29682, but on a
repo that is active.

Adds the Enhanced Roleplay Check protection to the radiation storm and
scrubber overflow events.

In the case of radiation storms, the protection is only triggered if the
dorm is occupied at the time of event init. (No cop-out running into a
dorm after you hear the announcement! Find a real maintenance hallway,
scrub.)

Additionally, only plays the giant red warning text only if you are in
an area that will be impacted by the radiation, so that people aren't
second guessing if the area they are in is protected or not.

## Why It's Good For The Game

Getting mutated and/or dying while in the middle of enhanced roleplay
tends to interrupt the intended roleplay

## Proof Of Testing
<details>
<summary>Screenshots/Videos</summary>
  

![image](https://github.com/user-attachments/assets/e747f78d-020d-40fa-a39e-671d0abeeccb)

</details>

## Changelog

🆑 LT3
code: Radiation storm warning only sent to players who are in an area
without radiation protection
balance: Occupied dorms are protected from radiation storms and
scrubbers
/🆑
2024-10-06 22:44:52 +00:00
ChubbygummibearandGitHub 22d319fa86 Weather planes from The Wallening to fix multi-z weather overlays (#86733)
## About The Pull Request

I started doing this for Yogstation, but ended up doing all my testing
on TG code since there's more debug tools to use, and @LemonInTheDark
said I should upstream it when I was done. So I'm just gonna start here.
The whole point of this is to stop multi-z maps from stacking weather
overlay effects like

![dreamseeker_FBUu3nPLCJ](https://github.com/user-attachments/assets/52559dfc-68d2-403d-8148-b410750f78c4)
Old pic I know, but you get the point

Now it behaves as expected


https://github.com/user-attachments/assets/6d737eae-2493-4b48-8870-e4ac73dcbbeb



https://github.com/user-attachments/assets/b253aa97-c90d-4049-a97d-940b0ec386d0


<details>

<summary>Note: this does not fix the issue of areas out of your view not
updating their appearance. 90% sure that's a Byond™️ issue</summary>


https://github.com/user-attachments/assets/3db5ce28-2623-4d3e-a5f4-bd561d96010a

</details>



## Why It's Good For The Game

Isolating weather to its own planes is good for having better control
over how it behaves. Since weather overlays are tied to areas it makes
them kinda hacky to begin with, but this is a step in reigning them in.

## Changelog
🆑
fix: fixed multi-z weather overlays stacking and not hiding overlays
above you
/🆑
2024-10-02 22:49:09 -07:00
SmArtKarandGitHub d4ac95a0e1 Nobody expects the span inquisition: replaces most <span>s with macros (#86798)
## About The Pull Request
123 changed files and multiple crashes after writing broken regex, I
replaced most remains of direct spans with macros. This cleans up the
code and makes it easier to work with in general, see justification for
the original PR. I also fixed a bunch of broken and/or unclosed spans
here too.
I intentionally avoided replacing spans with multiple classes (in most
cases) and spans in the middle of strings as it would impact readability
(in my opinion at least) and could be done later if required.

## Why It's Good For The Game

Cleaner code, actually using our macros, fixes borked HTML in some
places. See original PR.

## Changelog
Nothing player-facing
2024-09-26 19:36:13 +00:00
grungussussandGitHub 58501dce77 Reorganizes the sound folder (#86726)
## About The Pull Request

<details>

- renamed ai folder to announcer

-- announcer --
- moved vox_fem to announcer
- moved approachingTG to announcer

- separated the ambience folder into ambience and instrumental
-- ambience --

- created holy folder moved all related sounds there
- created engineering folder and moved all related sounds there
- created security folder and moved ambidet there
- created general folder and moved ambigen there
- created icemoon folder and moved all icebox-related ambience there
- created medical folder and moved all medbay-related ambi there
- created ruin folder and moves all ruins ambi there
- created beach folder and moved seag and shore there
- created lavaland folder and moved related ambi there
- created aurora_caelus folder and placed its ambi there
- created misc folder and moved the rest of the files that don't have a
specific category into it

-- instrumental --

- moved traitor folder here
- created lobby_music folder and placed our songs there (title0 not used
anywhere? - server-side modification?)

-- items --

- moved secdeath to hailer
- moved surgery to handling

-- effects --

- moved chemistry into effects
- moved hallucinations into effects
- moved health into effects
- moved magic into effects

-- vehicles --

- moved mecha into vehicles


created mobs folder

-- mobs --

- moved creatures folder into mobs
- moved voice into mobs

renamed creatures to non-humanoids
renamed voice to humanoids

-- non-humanoids--

created cyborg folder
created hiss folder
moved harmalarm.ogg to cyborg

-- humanoids --




-- misc --

moved ghostwhisper to misc
moved insane_low_laugh to misc

I give up trying to document this.

</details>

- [X] ambience
- [x] announcer
- [x] effects
- [X] instrumental
- [x] items
- [x] machines
- [x] misc 
- [X] mobs
- [X] runtime
- [X] vehicles

- [ ] attributions

## Why It's Good For The Game

This folder is so disorganized that it's vomit inducing, will make it
easier to find and add new sounds, providng a minor structure to the
sound folder.

## Changelog
🆑 grungussuss
refactor: the sound folder in the source code has been reorganized,
please report any oddities with sounds playing or not playing
server: lobby music has been repathed to sound/music/lobby_music
/🆑
2024-09-23 22:24:50 -07:00