* Fix APC related issues (#77005)
## About The Pull Request
Fixes a bunch of stuff broken by #76822, including APC control console,
malf blackout ability, shunted malf pinpointing, Admin APC recharge and
others.
## Why It's Good For The Game
Yes.
## Changelog
:cl:Thebleh
fix: Fixed several APC related issues.
/🆑
* Fix APC related issues
---------
Co-authored-by: thebleh <43266738+rdragan@users.noreply.github.com>
* Machine list is now stored in SSmachines | Remove excessive use of global lists for specific machine types
* Resolve merge conflicts
* Modular adjustments
* destroy this double return on destroy
---------
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
* New planetary exclusive random event/unfavorable situation, Chasmic Earthquake (#75864)
## About The Pull Request
https://github.com/tgstation/tgstation/assets/28870487/2451bc69-db1e-420d-9a18-2f899ca65427
This introduces a new unfavorable situation (non-antagonist random
events that dynamic triggers under certain circumstances), restricted to
planetary maps (Icebox). An earthquake occurs, felt by everyone on the
map, forming a fault that tears the a hole somewhere on the station.
The fault zone is indicated by shaking tiles, which gives a chance
(about 30 seconds) for you to move your machinery/property/crewmembers
out of the way. If you're on those tiles when the fault forms, get ready
to take a nasty fall.
Anything caught in the fault zone as it collapses inward will be
destroyed, violently, _before_ being dropped down into the z-level
below.

These can also happen as a random event, however their rarity is on-par
with that of a meteor storm.
This also adds a helper for finding a midpoint turf between two provided
turfs, thanks to ZephyrTFA.
This idea basically possessed me over the course of a few days, and I
found myself unable to work on anything else until I had it complete.
I'm glad its done.
## Why It's Good For The Game
Gives Icebox its own big "environmental disaster" event. I'm hoping it
isn't received as being too destructive, but mind that this is meant to
be an equal to the dreaded meteor storm.
Also makes it so that unfavorable events aren't a coinflip between a
portal storm/rod on planetary maps.
## Changelog
🆑 Rhials
add: Chasmic Earthquake random event, exclusive to Icebox. Tears a huge
chasm in the hull of the station. Watch out for shaking tiles!
sound: Adds sounds for distant rumbling, metal creaking, and rubble
shaking.
imageadd: Achievement icon for getting sucked up in an earthquake chasm.
/🆑
* New planetary exclusive random event/unfavorable situation, Chasmic Earthquake
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
We've successfully lowered threat by altering the threat curve centre before, this commit redoes that. It's needed as rounds have been utter crazy, one or two seccies have to deal with not only equal numbers of traitors, but sentient diseases, heretics and other stuff on top.
* Ashwalker Tribe roundend reporting revamp (#75506)
## About The Pull Request
This PR changes how ashwalkers are listed in the roundend report.
Originally, they would be listed as individual "other" antagonists,
which isn't a particularly great way of handling it and leads to
weirdness like this:

_(That's an authentic ninja greentext from a live server, by the by)_
Now, the roundend report gives each ashwalker team their own section
within the report, whether or not they succeeded, and some bonus stats.

This new roundend report handling also supports having multiple
Necropolises (Necropoli?) in the same round. Each tribe has their stats
and success reported individually.
This also slightly modifies the protect_object objective, preventing
hard deletes when linked to objects that don't clear their own
references.
## Why It's Good For The Game
Gives Ashwalkers a much better roundend report, and handles how the
reporting is done in a much more sensible manner.
Reduces how much space that large nests take up with their individual
listings.
## Changelog
🆑 Rhials
qol: Ashwalker roundend reporting has been revamped. Glory to the
Necropolis!
/🆑
* Ashwalker Tribe roundend reporting revamp
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
* Adjust stowaway changeling requirements to look more like roundstart Changelings (#75499)
Copies the weights of roundstart changelings, these were too low and I
was linked some reasonably low threat rounds on low pop getting them.
## Changelog
🆑
balance: Adjusted stowaway changeling requirements to be closer to
roundstart Changelings.
/🆑
* Adjust stowaway changeling requirements to look more like roundstart Changelings
---------
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* fixes clown planet report (#75508)
## About The Pull Request
it looked if a typepath was in the list of station traits instead of an
instance
## Why It's Good For The Game
we did it
## Changelog
🆑
fix: fixes clown planet report
/🆑
* fixes clown planet report
---------
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
* Fixes screwed up latejoin roll checks (#75493)
## About The Pull Request
Messed up changing this to an early returns, results in latejoins
triggering much earlier than they should be.
## Why It's Good For The Game
Oops
## Changelog
🆑 Melbert
fix: Latejoins triggering before the minimum time set
/🆑
* Fixes screwed up latejoin roll checks
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* New Nanotrasen Advisory Level Reports (#75339)
## About The Pull Request
White Dwarf report = For 0 threat rounds.
Pulsar Star report = For random chance of Nanotrasen having no intel.
## Why It's Good For The Game
This adds extra flavor to Nanotrasens advisory level reports, showing
Nanotrasens incompetence and adding this for the lore. Also I thought it
was funny.
## Changelog
🆑
add: Add new White Dwarf and Pulsar Star reports.
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* New Nanotrasen Advisory Level Reports
---------
Co-authored-by: Comxy <tijntensen@gmail.com>
Co-authored-by: san7890 <the@ san7890.com>
* Tweaks Dynamic Latejoin Ruleset Execution (#75428)
## About The Pull Request
### Before:
Dynamic wants a latejoin.
Dynamic will collate all latejoin rulesets that are eligible to execute.
The latejoin-er is guaranteed to become an antagonist, so long as any
ruleset is valid.
It runs down the list of rulesets and tries to apply it until it
succeeds
Then the latejoin injection timer is incremented for the next time.
<Details>
<Summary> This leads to the following: </Summary>

</Details>
### After ( with this pr ):
Dynamic wants a latejoin.
Dynamic will collate all latejoin rulesets that are eligible to execute.
Dynamic will then select **one** of the valid rulesets, based on weight,
to attempt to apply to the incoming latejoiner.
If the latejoiner is not a valid candidate, such as not having that
antagonist enabled in their preferences, it will not reroll the ruleset.
Do not pass go, do not collect 200 dollars, do not get antag.
The latejoin injection timer will not be incremented, so the very next
latejoin will be checked the same, until one eventually succeeds.

## Why It's Good For The Game
Dynamic latejoin handling is kinda poor, I believe Mothblocks has talked
about this a bit before but hasn't done much to it yet.
Compared to roundstart and latejoin, which can select out of everyone
which has the preference enabled, latejoin rulesets are not spoiled for
choice, which makes weighting the rulesets useless.
If you only have traitor enabled, the only latejoin antag you can be is
traitor. And if dynamic wants a latejoin, while you can only be traitor,
**you will ALWAYS become a traitor**. The weight of the traitor ruleset
or any other ruleset doesn't matter, because at the end of the day, the
only valid ruleset is traitor.
This makes latejoins much less of a guaranteed thing, and will
(hopefully) spread it out a bit more, reducing likelihood of rarer
latejoin antags.
## Changelog
🆑 Melbert
balance: You are now slightly less likely, statistically, to get an
antag role on latejoin
fix: Fixed latejoin antags being logged as "midround" antags
/🆑
* Tweaks Dynamic Latejoin Ruleset Execution
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Stowaway Changelings (Latejoin Changelings) (#74670)
## About The Pull Request
Adds a latejoin form of Changeling flavored as a stowaway.
## Why It's Good For The Game
We don't have a latejoin form of Changelings. It ups the paranoia that
anyone can be a Changeling, latejoin or not. They're also one of the few
non-progression antagonists which would work perfectly as a late join.
## Changelog
🆑
add: Stowaway Changelings will now appear as a late join form of
Changeling.
/🆑
---------
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
* Stowaway Changelings (Latejoin Changelings)
* Delete screenshot_antag_icons_stowawaychangeling.png
---------
Co-authored-by: iwishforducks <65363339+iwishforducks@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Fixes AIs having incorrect laws and being useless on nations (#74843)
## About The Pull Request
Fixes#74842
So this issue is multi-part
1. Separatist antag datum used the wrong mob for applying laws to.
`mob_override` is not passed usually and should default to the antag
datum owner's mob if not passed
Fixes this by passing the right mob. AI still doesn't get law datums,
the issue is deeper - they don't even become separatists!
2. Separatists only iterates over human mobs, and not silicon mobs
Okay, fixes this by iterating over all living players. Still not
entirely fixed, new AIs don't have UN laws!
3. Changes the default law datum when nations executes to United Nations
so new unlinked silicons gain the lawset
Closer, would you believe it if this still doesn't fix everything, but
going further is out of scope.
Changing the round default lawset as a part of roundstart execution does
not update anything that set it from atom initialize. If we wanted we
could hook signals into "default lawset changed" and then update it
conditionally to circumvent ALL of these issues but whatever, someone
can do that later.
## Why It's Good For The Game
AIs stop crying on nations
## Changelog
🆑 Melbert
fix: AIs now get their proper lawset, and an objective related to said
lawset, on Nations
/🆑
* Fixes AIs having incorrect laws and being useless on nations
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Adds two new helper procs for finding a maintenance/space spawn turf (#74598)
## About The Pull Request
Adds two new global helper procs, find_maintenance_spawn and
find_space_spawn. These check the list of maintenance/space carp spawn
landmarks, and return the turf of a random one.
The find_maintenance_spawn helper has two arguments, for atmos safety
checks and making sure the spawn is properly shrouded in darkness.
This also includes some tidiness changes to the ghost_role event file,
because the helper was originally just going to be a proc on ghost role
events.
**Stuff moved to find_maintenance_spawn:**
- Spiders
- Nightmares
- Fugitives
- Paradox clones
- Morph
**Stuff moved to find_space_spawn:**
- Space Dragon
- Loneop
- Ninja
- Slaughter Demon
- Revenant backup spawn location
If we ignore all of the autodocing, this should remove about a dozen or
two lines of code.
## Why It's Good For The Game
Reduces an amount of duplicated code. Also makes future implementation a
bit easier and less copy-pastey.
## Changelog
🆑 Rhials
code: Adds two new super-duper helpful helper procs for finding a
maintenance/space spawn location, for all of your
event/midround/whatever needs!
code: Moves all midrounds/ghost_role events that hinged on
maintenance/space carp spawns to the aforementioned helpers.
code: The ghost_role event module file is now autodoced.
/🆑
* Adds two new helper procs for finding a maintenance/space spawn turf
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
* Replaces xeno_spawn with the generic_maintenance_landmark, adds atmos safety checks to remaining midrounds that need them (#74374)
## About The Pull Request
The xeno_spawn landmark, used to pick spawn locations for many different
midrounds (but NOT xenomorphs, ironically), has been killed and been
replaced with the generic_maintenance_landmark landmark.
This also adds atmos safety checks to some of the midround spawn
location selections that were missing them:
- Paradox Clone
- Nightmare
- Fugitives
- Morph
I decided to do both of these at the same time, since I'd be touching
most of the same files anyways.
This includes an updatepaths that, if you are on a downstream running a
custom map, should probably definitely run.
## Why It's Good For The Game
It may not be a secret that these landmarks aren't used for spawning
xenomorphs anymore, but the name is still deceptive. This should
communicate what they're used for a bit better to both coders and
mappers.
Atmos safety checks (for the midrounds I hadn't yet added them to) make
sure people can play the game.
Closes#74372.
## Changelog
🆑
code: The xeno_spawn landmark is now the generic_maintenance_landmark
landmark.
fix: Certain midrounds will now check for atmos safety before spawning.
/🆑
* Replaces xeno_spawn with the generic_maintenance_landmark, adds atmos safety checks to remaining midrounds that need them
* 0
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Splits Pirates into Two Subgroups, One For Light Midrounds And Another For Heavy (#73881)
## About The Pull Request
This PR splits the Pirate midround antagonists into two separate groups,
normal and dangerous. Normal pirates are the human, silverscale, and
psycker groups, and they are all light antagonists now, meaning they can
show up early in the round, similar to when a revenant or nightmare can
spawn. Dangerous Space Pirates only consist of the Skeleton Crew, and
they will remain as heavy weight antagonists with the same spawning
restrictions as it is currently. I also fudged with the crew required
value some for both, not that it makes a huge difference.
Since pirates were split into two separate groups, both versions have a
reduced dynamic weight of 3, from 4.
Also added a sanity check to the pirate's dynamic ruleset to make sure
there are remaining pirates to be spawned for the ruleset to be allowed.
Also added a check to the pirate event itself to prevent runtimes when
no pirate team is available to be chosen, unless an admin specifies what
pirate team they want to use.
## Why It's Good For The Game
As it is right now, there is a massive difference between the skeleton
pirates and the rest of the pirate types. Skeleton Pirates have cannons,
innate space immunity and other small benefits which make them much more
threatening than the other pirate crews. In our current system,
something like Psycker pirates can spawn in lieu of something like blob
or xenomorphs when they aren't anywhere near the same level of
threatening, so moving the less dangerous pirates off to be light weight
midrounds seems like a good move, especially since we need more
lightweight midrounds to keep the variety up anyway.
Keep in mind these designations are not permanent and may change at the
request of maintainers or as the pirate teams get nerfed/buffed.
## Changelog
🆑
balance: The pirate gangs have been split into two subcategories, one
which can spawn earlier in a shift and one that spawns later as they
currently do. While skeleton pirates will still be only seen later into
the shift, expect to see the other pirate gangs earlier on.
fix: Prevented the pirate event from runtiming when no possible pirate
gangs were available.
fix: Pirates can no longer be selected by Dynamic if there are no more
pirates gangs that can be used.
/🆑
* Splits Pirates into Two Subgroups, One For Light Midrounds And Another For Heavy
---------
Co-authored-by: IndieanaJones <47086570+IndieanaJones@users.noreply.github.com>
* Limit theft/destroy secondary objectives to items which at least one person cares about
* Update objective_items.dm
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Buff Abductor Spawn Weight From 2 to 4 (#73819)
## About The Pull Request
This PR buffs abductor spawn weight from 2 to 4. With this, abductors
have the same weight as revenant and most other light midround
antagonists, and matches their spawn weight prior to getting moved to
being light weight antagonists as opposed to heavy.
## Why It's Good For The Game
Abductors in my opinion are currently needlessly too rare. This will
resolve the issue.
## Changelog
🆑
balance: Abductors' midround spawn weight has been increased. Expect to
see them more often
/🆑
* Buff Abductor Spawn Weight From 2 to 4
---------
Co-authored-by: IndieanaJones <47086570+IndieanaJones@users.noreply.github.com>
* [no gbp] Latejoin Rulesets sync (#73772)
## About The Pull Request
Syncs the codebase inherent values for dynamic rulesets with the current
config-side values used on our LRP servers.
## Why It's Good For The Game
This is technically irrelevant for the game as these numbers are the
ones currently used on the servers - it's more for the good of the
codebase than the game.
## Changelog
🆑
balance: Latejoin dynamic rulesets have been rebalanced to reduce the
frequency of midround revolution spawns.
/🆑
* [no gbp] Latejoin Rulesets sync
---------
Co-authored-by: Spookuni <70739420+Spookuni@users.noreply.github.com>
* Fixes hijacked shuttles not counting as escaped, cleans up associated code (#73623)
## About The Pull Request
Fixes#72240
So, in the past, `onCentCom` ran a check at the end that said "if we're
on centcom z, in centcom area, or in shuttle that is endgame launched:
return TRUE"
Meanwhile its brother `onSyndieBase` did not need to run the same
checks, because it was also on the centcom z-level.
This meant that for the purposes of `considered_escaped`, `onCentCom`
pretty much entirely eclipsed `onSyndieBase`, only mattering for, well,
Nuke Ops
So the fix was simple - add the check for "in shuttle that is engame
launched" to `onSyndieBase`.
I took this opportunity to do a quick audit of associated "escaped" and
"alive" code. Did you know that hardcore random only checked that you
were on centcom to award survival points? Instead of any other checks
for escaped like stat?
Also the ancient "romerol zombies can't be used as an easy way to
greentext escape" was broken, because it checked the wrong species ID?
Bonus performance optimization: `in area` -> `in
area.get_contained_turfs()`
## Why It's Good For The Game
Hijack does not turn around to become an L
## Changelog
🆑 Melbert
fix: Hijacked shuttles now count as "escaping alive" once agian
fix: Hardcore random survival now actually checks that you've escaped
alive, and not just made it to centcom
fix: Intelligent zombies can now escape.
fix: Infectious zombies now don't count as escaped as intended.
/🆑
* Fixes hijacked shuttles not counting as escaped, cleans up associated code
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Adds enemy_roles to all midround and latejoin antags
Add: enemy_roles to all midround antags
* Fixes formatting for latejoins
* Fixes formatting on midround
* Write roundstart logout report to admin log (#73672)
## About The Pull Request
- Writes the roundstart logout report to the admin log
- Increases the threshold for the report, clients > 10 minutes are
deemed AFK
## Why It's Good For The Game
While the report is broadcasted in chat, it's not actually saved in the
log. Sometimes we want to go back and read this later.
## Changelog
🆑 LT3
admin: Roundstart logout report is written to the admin log
admin: Roundstart report threshold is now 10 minutes
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Write roundstart logout report to admin log
* timer
---------
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
* Adds required template keys to some midround rulesets, fixes midround nuclear operative leaders from spawning on arrivals (#73620)
## About The Pull Request
`/datum/antagonist/nukeop/leader/move_to_spawnpoint()` overrides
`/datum/antagonist/nukeop/move_to_spawnpoint()`, which is responsible
for calling `SSmapping.lazy_load_template(LAZY_TEMPLATE_KEY_NUKIEBASE)`
Nuke op leaders also get created first thing, so they always got sent to
arrivals
`move_to_spawnpoint` now is not overridden by anything, location is now
obtained though `get_spawnpoint`
But this doesn't solve the entire issue! Seemed like there was a race
condition in that, on nukie team creation, it looked for the nuke to
generate the nuke code. But it created the team before creating the nuke
(and template). So it runtimed and broke, no nukies.
So I had to go deeper.
Rulesets have this list, `ruleset_lazy_templates`, that none of the
midround rulesets used. CC @ ZephyrTFA on this, but it seemed like it
caused a few issues related to lazyloading by missing them?
I added the keys to abductor and nukies. and also ninja even though
it'll probably never be used
I also also made the kidnapping objective for traitors pre-emptively
load the holding facility on objective *taken*, rather than waiting for
the exact moment which the victim is kidnapped.
(Should) Fix#72248
## Why It's Good For The Game
LATE FOR WORK
## Changelog
🆑 Melbert
fix: Nuke Ops Leaders midround don't spawn on Arrivals Shuttle late for
work
fix: (Maybe) fixes some additional issues related to midround nukie /
abductor spawns
/🆑
---------
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Adds required template keys to some midround rulesets, fixes midround nuclear operative leaders from spawning on arrivals
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Console Hack / Unfavourable Events won't run ghost roles which don't have time to do anything
* nya
* Update dynamic_unfavorable_situation.dm
* Update dynamic_unfavorable_situation.dm
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
[NEW GHOST ANTAG] The Paradox Clone (#71141)

[DESIGN DOC]
https://hackmd.io/@tGKknGe5Q7qtddEspif79g/BJ3w9QLri/edit
Bluespace technology has destabilized the very fabric of reality, even
time itself!
Sometimes during a shift, it's possible for a PARADOX CLONE to spawn
somewhere on the station (usually maintenance). This paradox clone has
the exact appearance and DNA as a random crew member on the station,
wearing the same clothes they were at the start of the shift, including
their ID.
To maintain timeline coherency, the paradox clone must now hunt down and
kill the original and take their place or die trying, if the original
survives they have failed.
The only thing the paradox clone spawns with is a mechanical toolbox
that helps them from being stuck in maints if their ID doesn't have
maints access.
The inclusion of this antag encourages good crew coordination and adds a
less destructive, more personalized antag to the roster.
This antag rewards good detective work, as both the clone and the
original are identical in every way, and will therefore require a
detective to break out their detective skills to figure out who the
clone is.
Also a possible tie-in with the Chrono Legionnaires in the future.
🆑
add: Time and space has destabilized even further due to Nanotrasen
bluespace research, now, on occasion, clones from different timelines
can appear on the station and hunt you down to maintain timeline
stability! Beware the Paradox Clone!
/🆑
---------
Co-authored-by: 1bw0kopy <xz2rbf23@protonmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
(cherry picked from commit 214174874c)
Co-authored-by: Shadyyy66 <114319683+Shadyyy66@users.noreply.github.com>