Commit Graph

4679 Commits

Author SHA1 Message Date
Bloop 183c5af2e4 Adds flag for virtual areas, fixes being able to send funds from virtualspace to real accounts (#94071)
## About The Pull Request

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

Eliminates worries over virtualspace currency being sent to real
accounts.

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

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

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

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

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

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

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

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

</details>

## Why It's Good For The Game

Fixes an exploit, improves the area flags situation slightly.

## Changelog

🆑
fix: you can no longer send money from virtualspace to a real account
code: adds a flag for virtual areas so they can easily be checked, as
well as an easy helper proc, 'is_area_virtual(your_area)'
/🆑
2025-11-22 12:24:41 -07:00
trickyfox-inc 4a6daa0785 New CENT_OFFICER access and mapping helpers (#94019)
## About The Pull Request

Have you ever wondered, why CentCom officers' IDs have the same access
as those of ERT commanders? Tired of ERT members trying on stylish
officer's apparel? Well, it's time to change that.

This PR adds centcom officer's access (cent_officer), as well as mapping
helpers for cent_officer and cent_specops access. Death Commando
officers and ERT Commanders don't have this access. It also changes
access of administrative office doors to cent_officer.

<details>
<summary>screenshots</summary>
<img width="630" height="838" alt="PR - Admiral"
src="https://github.com/user-attachments/assets/a7dd48fc-4fb5-4a98-878b-a28abfadfb24"
/>
<img width="628" height="838" alt="PR - CentCom Commander"
src="https://github.com/user-attachments/assets/6ef9dd9f-49e1-409c-8d90-75201aa21ebd"
/>
<img width="627" height="835" alt="PR - Special Ops officer"
src="https://github.com/user-attachments/assets/055fcdb5-4f6a-4c51-b52a-7848666c7c59"
/>
<img width="626" height="841" alt="PR - Death Commando"
src="https://github.com/user-attachments/assets/9786331f-b3c4-4c0f-bed2-831eada3a05c"
/>
<img width="627" height="847" alt="PR- ERT Commander"
src="https://github.com/user-attachments/assets/92ff59f4-a1ea-4b43-8749-1a4bd3ac6c46"
/>
<img width="430" height="445" alt="PR - Mapping helpers"
src="https://github.com/user-attachments/assets/ead91df7-a872-4ecc-9088-58c0a719deed"
/>

</details>

## Why It's Good For The Game

ERT commanders will have a hard time getting CentCom apparel from the
vending machine in the office. It could also be useful for custom maps
and shuttles (or even new CentCom map).
## Changelog
🆑
add: Added centcom officer's access (cent_officer)
add: Added mapping helpers for cent_officer and cent_specops access
map: Changed access on the administrative office doors (cent_officer)
/🆑

---------

Co-authored-by: AlexTheEng1neer <128976622+AlexTheEng1neer@users.noreply.github.com>
2025-11-20 18:38:12 -07:00
Bloop 8b66328e4d [NO GBP] Fixes sswardrobe not deleting modsuit parts after failing to stash them (#93901)
## About The Pull Request

Should fix https://github.com/tgstation/tgstation/issues/93897

This implements a restock blacklist for SSwardrobe. If an item type is
in the blacklist, then SSwardrobe will never try to restock that item,
instead just deleting them.

## Why It's Good For The Game

Fixes ever-expanding pile of modsuits in nullspace, and lets modsuits
actually be wardrobed properly

## Changelog

🆑
fix: fixes an where modsuits would accumulate in nullspace over the
course of a round
/🆑
2025-11-19 03:52:07 +00:00
Sarah C ad50b792a5 Moves the HFR from process() to process_atmos() (#93902)
## About The Pull Request

This pull request makes the HFR process at the same rate as other
atmospheric components. Because its temperature changes previously
didn't take `seconds_per_tick` into account, heat output and a few
things related to it had to be adjusted to compensate. This also fixes a
bug preventing the moderator from being able to leak its gases from
cracked parts.

## Why It's Good For The Game

The HFR not processing with the rest of atmospheric machinery can
occasionally cause odd behavior such as pressure spikes in the waste
output every 1 in 4 atmos ticks, which this PR corrects.

## Changelog
🆑
fix: Fixed cracked HFR parts not being able to leak moderator gases.
code: The HFR now processes at the same rate as other atmos machinery.
/🆑
2025-11-19 04:09:42 +01:00
MrMelbert 9e3d50a162 Heretic latejoin cleanup (#94003)
## About The Pull Request

Dead path 
Closes #93757
2025-11-19 02:59:03 +01:00
MrMelbert b62ee3c6a9 Partial language understanding actually works as intended (#93999)
## About The Pull Request

So, partial language understanding scaled the % chance to translate
something based on the ranking in the most common words list

But the ranking isn't real the list is in alphabetical order

So, adds a new list of the 1000 most common words sorted by *frequency*,
which I found on a random github page.
Is it scientifically found? I have no idea, but it looks good enough to
work.

This list doesn't share the same 1000 words as our existing one, so I
added all the differing words (amounted to ~400) to the original list.

So now partial language understanding correctly translates words based
on frequency.

## Changelog

🆑 Melbert
fix: Partial language understanding now correctly has a higher chance of
translating more common words.
qol: Aphasia got slightly more words to work with 
/🆑
2025-11-18 17:26:19 -07:00
FalloutFalcon c2dfa647a0 kills Debug and Debug2 all hail debugging_enabled (#94002)
## About The Pull Request
renames Debug2 and kills Debug as its last use (atleast the one
described in its comment) was removed
added it to the check to print to print stack traces to chat in the
instance your debugging without a debugger attached for some reason (if
this var is enabled on live it already causes random to_world messages,
kinda fuck it we ball at that point)
## Why It's Good For The Game
The first one was ENTIRELY unused now
this name makes more sense
## Changelog
N/A
2025-11-18 17:24:36 -07:00
FalloutFalcon b0ecc87d79 saftey checks for play_ambience (#93942)
## About The Pull Request
first part with the 1 minute return is so you can have a area without an
ambience without insane runtimes

second part: In the course of making
https://github.com/DarkPack13/SecondCity/pull/246 I experienced some
weird bugs where it was playing the sound but failing to get the length.
This notifies you why the fuck its happening cause its otherwise really
confusing
## Why It's Good For The Game
I spent a while debugging it, still REALLY confused why the bug is
actually happening in the first place, its somehow referencing a file
that's both gone, and no longer being referenced anywhere in the repo.
Either way this shit annoyed me lol.
2025-11-15 18:26:41 +01:00
Neocloudy 045836192d Ties security level looping sounds to ambience volume (#93877) 2025-11-13 08:53:37 +01: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
RikuTheKiller fecd354054 Fixes every single high-priority status effect in the game running twice as fast (#93883)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Fixes #93875

Removes an obsolete SS_TICKER flag from SSpriority_effects, which was
originally put there by Absolucy for a priority bump. The original issue
with status effects pausing for long periods of time was very likely
caused by the SS_BACKGROUND flag on both SSprocessing and
SSfast_process, which SSpriority_effects doesn't have.

The reason why this issue surfaced is because of #93694, which caused
the inconsistency between the real wait time of 0.1s and passed
seconds_per_tick of 0.2s to become apparent in the duration of status
effects. Previously, duration was based on world.time, which was
unaffected by this inconsistency, even though it existed before my PR as
well.

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

Fixing all stun times being halved for no raisin is pretty good for the
game.

It's also better for the SSpriority_effects subsystem to respect the
subsystem priority order. If we need it to be higher in the order, then
make it that way, instead of using SS_TICKER to bypass it entirely.

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and its effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
fix: High-priority status effects like stuns no longer process (and thus
expire) twice as quickly as they should.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2025-11-12 03:25:13 +01:00
FalloutFalcon b0ddbf2fb1 Refactors sound file checking (#93734) 2025-11-10 08:58:26 -07:00
Roxy d84a87f668 Rewrites to fix compiler errors on 516.1670+ (#93801)
## About The Pull Request

Fixes all instances of numbers being used as assoc list keys in things
that aren't alists, either by turning them into alists or changing the
keys to something else. Also adds new macros to support creating global
alists, as a few global lists became alists. Most of these are pretty
simple and self-explanatory but
- The GLOB.huds one necessitated rewriting because code depended on it
being a non-assoc list, which it technically was because the defines it
used as keys were numbers so BYOND turned it into a regular list, most
of this was for loops through all the subtypes of
`/datum/atom_hud/data/diagnostic` of which there's only one, so I just
changed it to get that type directly by key
- NT Frontier used number indexes which it looped through for some
reason and also passed to TGUI, changed these to strings and adjusted
the TGUI to match, I tested this and it works fine

## Why It's Good For The Game

Makes the code compile, I couldn't test everything but I tried to check
all usages of affected vars to make sure they wouldn't break from being
switched to alists, a TM might be in order just to be sure nothing's
fucked

## Changelog
🆑
refactor: rewrote all cases of numbers being used as keys in non-alist
associative lists
/🆑
2025-11-08 14:19:55 -08:00
MrMelbert 5146cfd403 Moves camera update handling to background subsystem, (maybe) fixing lag (#92208)
## About The Pull Request

When a camera update is triggered, it is instead added to a queue on a
background subsystem

An AI entering a camera chunk which is queued to update will force the
update immediately (bypassing the queue)

While the root problem of this is, ultimately, not addressed...

<img width="554" height="58"
alt="467828777-eff3f0e5-49d6-4997-b4d7-05eff6432155"
src="https://github.com/user-attachments/assets/c2d6a5f5-d958-463e-959f-116bd0dab475"
/>

...the change will ultimately prevent update spam from consuming all of
the server's resources - instead allocating updates to the backburner in
times of high server stress (or on multi-z maps)

## Changelog

🆑 Melbert
refactor: Refactored the way camera updates are handled to hopefully
reduce some lag. Report any oddities
/🆑
2025-11-08 01:43:48 +01:00
Bloop 69b2e3ea71 Prevents SSwardrobe from messing with modsuit parts (#93779)
## About The Pull Request

If you have an outfit with a modsuit control, and are equipping it to a
dummy for previews, when you unequip it SSwardrobe tries to delete the
individual parts when stashing the mod control since they are in the
suit's `contents`.

The control is then stashed, and the parts all cause hard deletes after
a while since the suit itself is still holding a ref to all of them.

Since there is currently no good fast way of checking all the modsuit
parts outside of a nest of istypes I added an item flag for it.

## Why It's Good For The Game

Fixes an oversight, should not have any performance impact.

## Changelog

🆑
fix: fixes an oversight where the wardrobe system tries to delete
modsuit parts when stashing the modsuit
/🆑
2025-11-07 03:10:00 +01:00
harry f8e6d91d3c moves clientside storage to an iframe instead of byondstorage (#93044)
## About The Pull Request

this converts the dependency on byondstorage, which is laggy (due to
being a large json file written to disk every 10 seconds), to using
indexeddb, like we did prior to 516. this is achieved by using an iframe
to give us a persistent origin, as the web is evil and has invented
same-origin policy
https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy.

this also hosts the iframe page on the github pages site for a secondary
repository (see tgstation/byond-client-storage) so it works OOTB without
requiring server operators to setup the webroot cdn (which i don't
believe is configured on the tg servers at the moment)

however, if a server is using the webroot cdn, it will use that instead
of github pages

you could also host the iframe.html page on a separate host from your
cdn or github pages if you wanted to

if we can't access the configured cdn at all, it failovers to use
byondstorage anyway, if the internet stops working and you still want
your chat history to save, i guess

## Why It's Good For The Game

saving this enormous json file is laggy, and this solution would fix
https://github.com/tgstation/tgstation/issues/89988 and fix
https://github.com/tgstation/tgstation/issues/92035

i am open to other solutions, but this does seem to require the least
amount of external dependencies of posed solutions

## Changelog

🆑
fix: you should experience less stutters every 10 seconds
server: server operators can now configure an alternative storage domain
for clientside data storage, read the example configuration for more
/🆑

---------

Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
2025-11-06 10:07:33 +00:00
Roxy eb6d02fdb0 Fixes for 585b02c325 2025-11-06 00:18:59 -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
ArcaneMusic 635661c510 Adds minimum player count of 2 to GMM Station Spotlight Trait (#93740)
## About The Pull Request

What it says on the tin, the GMM Station Spotlight trait will not
generate a spotlight if there isn't more than 1 player on the station.

## Why It's Good For The Game

People have been running into the GMM Trait triggering during offline
testing, and functionally it makes sense to not apply the effect if
there's no-one around to potentially act on that information. If you're
alone, and the richest person on the station, that's functionally not
going to change any time soon.

## Changelog
🆑
qol: The GMM Spotlight station trait will not create a lightbeam if
there's not more than 1 player alive.
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2025-11-04 00:59:46 +01:00
MrMelbert 6395f12833 Adds a rewards bonus for nohitting combat bitrunning domains (#93531)
## About The Pull Request

Completing a combat bitrunning domain grants 0.8 score bonus per player
that escaped without being hit

## Why It's Good For The Game

I figured it be a fun challenge to try to nohit these things, especially
the megafauna ones. For a bonus.

## Changelog

🆑 Melbert
add: Nohitting a combat bitrunning domain rewards a higher score.
/🆑
2025-11-01 13:39:08 +01:00
MrMelbert 585b02c325 Reduces species feature boilerplate (#93570)
## About The Pull Request

Rather than having 100 separate list variables on `SSaccessories`, have
1 list for all feature keys that are associated with sprite accessories

This way you can get a feature by doing
`SSaccessories.feature_list[key]`, instead of necessitating
`SSaccessories.ears_list`, `SSaccessories.tail_list`, etc.

This lets us cut back on a lot of boilerplate in prefs, dna, and organs

## Why It's Good For The Game

We can see the benefit in this example: This is all the code for horn
DNA, bodypart overlay, and preference
```dm
/datum/dna_block/feature/accessory/horn
	feature_key = FEATURE_HORNS
```
```dm
/datum/bodypart_overlay/mutant/horns
	layers = EXTERNAL_ADJACENT
	feature_key = FEATURE_HORNS
	dyable = TRUE

/datum/bodypart_overlay/mutant/horns/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
	return !(bodypart_owner.owner?.obscured_slots & HIDEHAIR)
```
```dm
/datum/preference/choiced/species_feature/lizard_horns
	savefile_key = "feature_lizard_horns"
	savefile_identifier = PREFERENCE_CHARACTER
	category = PREFERENCE_CATEGORY_FEATURES
	main_feature_name = "Horns"
	should_generate_icons = TRUE
	relevant_organ = /obj/item/organ/horns

/datum/preference/choiced/species_feature/lizard_horns/icon_for(value)
	return generate_lizard_side_shot(get_accessory_for_value(value), "horns")
```

## Changelog

🆑 Melbert
refactor: Refactored species unique organs slightly, particularly how
they are set up at game start. Report any oddities, like invisible tails
or wings
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-10-30 03:46:32 +01:00
Bloop 6e032a6aca Improves debugging for events config + fixes inconsistencies in events.json (#93595)
## About The Pull Request

If an event is not found in the list, it will be null, so the stack
trace when there is an invalid one in there will always return "Invalid
event attempting to be configured." AKA nothing useful to indicate which
event in the config is actually causing the failure.

Also stops stack trace from declaring 'invalid' config when they are
simply not loaded due to the current map.

It should be printing out [variable] instead.

Also removes a bunch of non existent events from the events.json and
fixes a few inconsistencies with the default weights.

## Why It's Good For The Game

Stack traces with useful information are good.

## Changelog

Nothing player-facing
2025-10-29 01:01:14 +01:00
FlufflesTheDog 0f3d4596f3 Dullahan fixes (#93365)
## About The Pull Request
Fixes up some of the blaring problems with the woefully unloved
dullahans, making them at least playable in time for halloween. List of
individual fixes in the changelog, but notable code changes include that
visible/audible messages can (currently exists for dullahan heads and
holopad projections) now be proxied, so that detached cameras can
optionally relay TTS, emotes, and other messages to the proper client.
## Why It's Good For The Game
Its spooky month!
## Changelog
🆑
fix: Dullahans spawn with their intended organs
fix: Dullahans can hear/see emotes
fix: Dullahan heads properly have preferences applied to them
fix: Dullahan heads no longer appear eyeless
fix: Dullahans can hear things from their head regardless of if their
body is nearby
fix: Dullahans can hear TTS messages
fix: Dullahans have a TTS voice
qol: Dullahans have a head in the character preview, for the sake of
easier customization
/🆑
2025-10-29 00:20:58 +01:00
FalloutFalcon 060d4a65ba valid_subtypes proc (#93541)
## About The Pull Request
discussed in #93439, a generic proc for getting a list of all types
minus abstract types.
applies this to most instances of a for loop that currently filters out
abstract types

it SHOULD be a nothing burger for performance, however I have not bench
marked the difference. (also testing, there is a total of 7 calls in
init to it)
2025-10-28 12:49:18 -05: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
Aliceee2ch ee388c204f More love to paramedic: revamping/adding paramedic offices, new access and more! (#93457)
## About The Pull Request

most of info in changelog, here i'll pin some screenshots. 
(also didnt touch catwalk on purpose since its medbay in process of
rework)

<details><summary>Screenshots</summary>


### Example of paramedic dispatch area, before it was used only on 2
maps:
<img width="479" height="490" alt="image"
src="https://github.com/user-attachments/assets/ca6f0ba6-93ed-4386-a94d-63b90985ef27"
/>
   
### Example of how I changed pallete to match paramedic outfit: dark
color mixed with blue
<img width="479" height="490" alt="image"
src="https://github.com/user-attachments/assets/e7acef94-2fd3-4fb4-9abf-5b83fd5cd738"
/>

### Icebox
<img width="463" height="320" alt="image"
src="https://github.com/user-attachments/assets/3e12aa10-caac-4b6e-89e8-81690d979150"
/>

(moved chem storage south)
<img width="534" height="476" alt="image"
src="https://github.com/user-attachments/assets/863a0644-520b-40a7-9deb-f1174b252757"
/>


### Tramstation
<img width="518" height="504" alt="image"
src="https://github.com/user-attachments/assets/f410f6c8-e2ee-423e-838c-03643ea1499f"
/>

(removed elevator and replaced with some public atmos equipment)
<img width="353" height="727" alt="image"
src="https://github.com/user-attachments/assets/df635bb5-5692-4367-b2b6-7c8df3c6c9a4"
/>

(theres new hall to replace the elevator path)
<img width="857" height="725" alt="image"
src="https://github.com/user-attachments/assets/15d12685-c9a0-44b5-a916-41766b12677c"
/>


### New locker that has all kind of stuff for emergencies!
<img width="186" height="155" alt="image"
src="https://github.com/user-attachments/assets/c1e40fd6-44f7-48e0-a5e4-ecb9fc562627"
/>


</details>

## Why It's Good For The Game

Since paramedic got more attention now, I feel it would be wise to
separate paramedic content (jaws and medical suit) from general medbay
and doctors.
<img width="382" height="135" alt="image"
src="https://github.com/user-attachments/assets/750e0d4c-7011-41e5-8ec4-d5f05f6c3515"
/>

For locker part: I think paramedic should have own locker with all kind
of emergency items/drip items instead of bloating items on the tables.


## Changelog

🆑
add: Added new medical access for paramedics.
map: Added paramedic dispatch on: TramStation and IceBox, removed
elevator from Tram and moved chemstorage on IceBox.
map: Paramedic dispatch area is used on every paramedic office now.
map: Medical MODsuit and Jaws of Recovery moved to paramedic office.
map: Redesigned northern medbay on MetaStation.
sprite: Paramedic locker was added.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-10-22 23:37:24 +00:00
MrMelbert 8b8bcfd674 Adds two heavy midround rulesets, mass traitors and mass changelings (#93447)
## About The Pull Request

- [ ] I tested this pr

Adds "Midround Mass Traitors" and "Midround Mass Changelings" heavy
rulesets

Midround Mass Traitors will turn a number of the crew into sleeper
agents

Midround Mass Lings will spawn a number of changeling meteors 

BY DEFAULT:
- Traitors will spawn 2-4 sleeper agents
- Lings will spawn 2-3 changeling meteors
- They won't run without >=2 candidates
- They have no config blacklist (so the HoP can roll mass midround
traitor, despite not being able to roll normal midround traitor. However
default blacklisted roles like security officers are still blocked)
- They're weighted impossible on tier 0, same weight as most midrounds
on tier 1, and fairly high on tiers 2 and 3
- They're repeatable but very unlikely to repeat
- Significantly higher min pop brackets than their solo counter part

## Why It's Good For The Game

Adds more options for lategame antags than big midrounds

## Changelog

🆑 Melbert
add: Two new heavy dynamic rulesets: "Midround Mass Traitors" and
"Midround Mass Changelings"
/🆑
2025-10-18 19:06:29 +02:00
SyncIt21 749643cddb Reworks cargo market elasticity (#93235)
## About The Pull Request
What it says on the tin. Cargo now has new math for market elasticity,
each parameter and what it does is explained below

**1. Refactor**
1. **k_elasticity**: This is the elasticity as before applied on all
exports except now this is a floating-point value that swings from
`0->1` instead of 10e-10 like is the current case. This in laymen terms
is the percentile of an items actual cost that is sold on cargo [0 means
you get no credits, 0.5 means you get 50% of the items cost, 1 means you
get 100% of the items cost]. Whenever an item is sold on cargo this
value decreases by an amount that is determined by the next variable

2. **k_hit_percentile(default 5%)**: This is the value by which an
export `k_elasticity` decreases whenever an export is successful for
every unit of an item sold. The real formulae by which the exports
elasticity decreases is dependent on the total amount sold and is as
follows
<pre>k_elasticity -= amount sold (1 for most cases except stacks) *
k_hit_percentile</pre>
So subsequent exports yield lesser profits cause the elasticity
decreases. Now the rate at which the elasticity recovers is as follows

3. **k_recovery_time(default 10 minutes)**: This is the time (minimum
unit should be seconds) it takes for the elasticity to rebound back to
100% after it has reached full 0 but recovery process starts immediately
if it decreases at any point. So if elasticity becomes say 50% it means
it would take 5 minutes to reach 100% again

**2. Some Balance changes**
1. Profits earned from exporting gas is linear per mole sold so the more
gas you put in the more profits you get HOWEVER the max number of
credits you can make per canister is 15000 cr
2. Selling fish yields higher prices because it's no longer subject to
the old elasticity formula
3. Selling 50 sheets of anything will decrease future sale price by 10%
and will take 8 minutes to rebound back to 100% if it reaches 0

**3. Improvements:**
- `SSProcessing` subsystem no longer processes more than 180+ export
datums from round start itself but now starts out empty. It instead
processes only those exports whose elasticity has been impacted and
later cancels it after elasticity has reached 100% so performance of
this subsystem has been drastically improved
- export datums now respect `abstract_type` meaning they won't be
created and can be used as a skeleton body for subtypes. So datums like
`datum/material` & `datum/material/market` are not created anymore but
only their subtypes are so we save processing power & memory
 - Shaved of a lot of dead exports that went unused

## Changelog
🆑
balance: cargo exports now have different prices with applied elasticity
code: Improved performance of export code
qol: stock blocks can be recycled for materials & show up as stock
blocks in order console sold items
refactor: refactored cargo export code in whole. Report bugs on GitHub
/🆑

---------

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
2025-10-18 04:36:09 -04: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
Roxy f3848f1ef2 Renames flatten_list proc to assoc_to_values (#93453)
## About The Pull Request

`/proc/flatten_list()` -> `/proc/assoc_to_values()`, also changes the
code doc to mirror the language of `assoc_to_keys()`'s code doc

## Why It's Good For The Game

Having a proc called `assoc_to_keys` that takes an associative list and
returns a list of the keys, and also having a proc that takes an
associative list and returns a list of the values, and the latter not
being called `assoc_to_values` is very funny

## Changelog
🆑
code: renamed flatten_list proc to assoc_to_values
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-10-14 21:01:09 +00:00
MrMelbert de0393e642 Dynamic Tester differentiates lights and heavies (#93089) 2025-10-06 13:25:45 +02:00
die 680f02c45b absolute minimum compile flag (#93255)
loads a smaller centcomm and map, this reduces init time to like 10
seconds.
## Why It's Good For The Game
for when you want to test something real quick and you don't need a full
environment
2025-10-04 08:13:50 -04:00
xPokee 8aa39b75f0 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-10-04 05:28:09 -04:00
John Willard e9e3df89d9 Latejoiners are buckled in again. (#93250)
## About The Pull Request

Not reported yet but I noticed this and immediately knew I broke it, my
bad.
Fixes latejoiners not being buckled into their chairs & Hangover station
trait effects, also merges the two hangover landmarks into one cause i
dont see why they had to be two, I put it in the same updatepaths as the
PR this is a fix to.

## Why It's Good For The Game

Bug fixes

## Changelog

🆑
fix: Latejoiners are buckled in to their chairs & Hangover station trait
now kicks their effects in again.
/🆑
2025-10-04 04:43:06 +02:00
MrMelbert d664be4c78 Ensures personalities are loaded before prefs are loaded (#93265)
## About The Pull Request

Aaaaa if you load fast personalities aren't instantiated so personality
loading wipes everything out.

I don't know the best way to ensure personalities are loaded before
anyone could load in unfortunately, so I just threw it in. Will need to
ask around.

## Changelog

🆑 Melbert
fix: Fixed personality wiping
/🆑
2025-10-04 04:40:16 +02:00
ArcaneMusic f74b725961 Ore vent sizes are now divided up based on their distance to the mining base (#92943) 2025-10-03 18:07:52 +02:00
xPokee 5e629dff04 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-10-03 07:05:54 -04:00
MrMelbert 3ea7b03369 Accentuate the positive with **Personality**: A (soft) mood rework (#92941)
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2025-10-02 19:00:13 +00:00
Bloop a7b1f8f77a Adds more detailed logging data to dynamic (#93060)
## About The Pull Request

Tin. It annoyed me how useless the logging was for forcing a dynamic
ruleset. "but preparation failed!" (ok, but why?)

So this just adds more detailed explanations for why the preparation
failed.

<img width="640" height="47" alt="image"
src="https://github.com/user-attachments/assets/cc1f9e94-293e-422d-bd16-0ae5f28fd1eb"
/>

## Why It's Good For The Game

Better logging and clearer admin messages.

## Changelog

🆑
qol: improves admin logging of forced dynamic events.
/🆑
2025-10-02 20:51:13 +02:00
John Willard d3dd437437 Lobby TV screen shows an icon of the overflow job (#93023)
## About The Pull Request

Hey so remember that TV thing I added, and I wanted it to be useful for
overflow jobs so I added it in, but couldn't make it look good with
runechat so I made it only appear post-roundstart, rendering it utterly
useless?

Yeah, I do too, so I've come back to fix it with the help of stealing
other people's code (I'm a lazy individual) - Taking Absolucy's work in
https://github.com/Monkestation/Monkestation2.0/pull/4589 for this.

Now it shows an icon of the job with an active overflow under the TV's
effects, and has a tooltip if you hover over in case you don't
understand what it's demonstrating.


https://github.com/user-attachments/assets/97489f93-f40d-47f9-aea2-6cc32c8fcba3

## Why It's Good For The Game

The TV shows overflow information before the round starts, allowing
people to actually see and react to the information rather than only
being shown to latejoiners. I prefer it this way as I don't want to have
to ensure the different things we may put on the TV's runetext all shows
up properly.

## Changelog

🆑 Absolucy, JohnFulpWillard
image: The Lobby TV now shows an icon of the overflow job.
/🆑
2025-10-02 20:04:39 +02:00
John Willard fd752f043d Easy multi-z support for alarm console (+spawn changes) (#93198)
## About The Pull Request

Station alarm consoles now register to all Station Z levels+Areas if
they were created on a station Z level (this doesn't include mining, but
station ones will see mining areas), otherwise will be a "local" console
to that Z level only.

Mostly the same applies for Cyborg/AI, but if they were built on a
non-station Z level then they have their Z level added on top of Station
Z levels, so example Nukie saboteur borgs will see alarms they might
need, while a Golem/Oldstation AI will also be able to see their own
alarms.

Because of how alarms and spawning in worked, Cyborgs/AIs had CentCom's
Z level as something it would detect, so we simply create the mob at the
spawn location rather than on the title screen during Initialization,
fixing that issue as well.

## Why It's Good For The Game

Adds easy multi-z support for station alarms and removes the previous
bandaid of having to deconstruct your board and multitool it or map in
every single station alarm console to allow station alerts (which is
quite silly) which was done in
https://github.com/tgstation/tgstation/pull/88343.

Closes https://github.com/tgstation/tgstation/issues/61592
Closes https://github.com/tgstation/tgstation/issues/83042
Closes https://github.com/tgstation/tgstation/issues/69314

I find this solution better since it catches pretty much all use cases
without the need for special subtypes and needing players to actually
know the difference between these things.

## Changelog

🆑
fix: Cyborgs and AIs will now see alerts of the whole station rather
than solely the Z level they were spawned on.
fix: Cyborgs and AIs will no longer get alerts about Thunderdome.
/🆑
2025-10-02 18:12:57 +02:00
SimplyLogan 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
Ghom c957a46a5d Whether something is thrown by a nearby explosion depends on its move_resist now. (#92958)
## About The Pull Request
Objects other than those that are either anchored or have infinity
move_resist can now avoid being thrown by explosions if their
move_resist is high enough for the "tier" of explosion they're subjected
to. This means anchored/bolted AIs are no longer thrown by explosions,
and anything other than 'devastating' (point-blank sorta) explosions
won't chuck mechs around, for example.

You can view the values by looking at the code, the PR is overall pretty
small.

## Why It's Good For The Game
Mechs are sturdy and, as well as many other mobs and objects, shouldn't
be thrown around if they're standing by the rim of a weak-ass explosion.

## Changelog

🆑
balance: Some sturdy objects that you cannot just grab drag around, like
mechs, are more resilient against being thrown around by weaker
explosions.
fix: Some things, like bolted AIs, aren't thrown around by explosions at
all.
/🆑
2025-09-27 01:20:57 +00:00
xPokee b308ee9d78 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-09-24 10:13:01 -04:00
MrMelbert 750ca9d2ec Two as anything greps (and some other cleanup) (#92974) 2025-09-20 13:44:28 -04:00
xPokee 75557c2c79 Merge remote-tracking branch 'upstream/master' into upstream-sync 2025-09-18 08:57:11 -04:00
SyncIt21 beb50296b6 Ensures uniform distribution of minerals across ore vents & non zero material boulders (#92996)
## About The Pull Request
- Fixes #92972

There were multiple problems with code that I can't be asked to explain
but here is the intended output(`ore_vent_minerals` contains the copy of
the list `ore_vent_minerals_lavaland` which we actually modify & not the
global list itself)

<img width="481" height="241" alt="Screenshot (512)"
src="https://github.com/user-attachments/assets/ed4d2659-b78c-4b99-ae68-e6fad4f116e4"
/>

All ore vents will now have at most 4 minerals but because we use an
associative list it is possible for a mineral to get picked more than
once in the same iteration resulting in old values getting replaced
which isn't a problem but just a point to be known so you don't always
get vents with 4 minerals

Another problem i ran into debugging is that some vents churn out 0
material boulders. That had to do with rounding down of the logarithmic
function which returned 0. We now ensure that never happens

## Changelog
🆑
fix: ore vents have unique distribution of at most 4 minerals without
rare ones being repeated
fix: ore vents should no longer be produce 0 material boulders
/🆑
2025-09-17 21:28:40 -04:00
Tojo 0ae0fced62 Umbrellas for Rimpoint | A funny name for a funny PR (#4682)
## About The Pull Request
Working Umbrellas, printed with Plastic and Iron, at autolathes. 
## Why It's Good For The Game

I'm unsure as to why we didn't have these to begin with for species that
can't stand in rain such as slimes.
## Proof Of Testing
<details>
<summary>Screenshots/Videos</summary>




https://github.com/user-attachments/assets/e9702747-0092-4d86-bf91-6c3429c656fc



</details>

## Changelog
🆑
add: Added umbrellas for Rimpoint at Autolathes and Service Protolathes
which block rain reagants.
/🆑

---------

Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com>
2025-09-18 02:24:00 +03:00
xPokee 9b282a850e Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-09-17 11:45:44 -04:00