<!-- 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
Blade Heretic has received a few changes.
The cost of crafting a Dark blade has been reduced in exchange for a
lower blade capacity, The Dark blade itself has received a new sprite.

Realignment pulls you out stuns a bit faster and grants baton resistance
while active.
You may now infuse your blades with a (weaker) mansus grasp upon
unlocking the ability to dual wield, they also gain increased demolition
modifier.
Mawed Crucible now slowly refills and requires fewer organs to brew a
potion; you may now use a charge to refill your eldritch flask.
The potion themselves have also received changes more on that below.
The cooldown on the cursed curio shield has been reduced.
Lionhunter's rifle no longer does increased damage on scoped targets,
instead it marks them with Mansus grasp and teleports the heretic to
them.
Lastly Blade ascension has been fixed, you once again get the Ring of
Blades.
<!-- 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
Oh boy, here we go.
# **Blade Heretic changes**
Blade Heretic sits in a pretty decent spot, I wouldn't call the path
weak by any stretch of imagination, but there are few aspects that could
be reasonably improved without changing the overall strength of the path
significantly.
**Sundered Blade**
I think these are too expensive to craft, especially compared to the
other blades which require very basic materials.
It's not uncommon to run into situations where you just cannot afford to
make more than a set of blades, and i'd argue it's not fun for the crew
to have their titanium or silver deposit drained every time a blade
heretic rolls around.
As a solution, i'm halving the cost in exchange of lowering the cap from
5 to 4 blades.
**Realingment**
This spell is lowkey awful; 25 stamina regen per second really doesn't
make much of a difference when you are getting chain batoned, I have
footage of blade heretics dying to a single shove stun while this abilty
was active.
The stamina regen and reduce immobility timer has been buffed on top of
granting baton resist so long as it stays active, so you can properly
get in fighting position without getting constantly knocked down.
Mind you, It's still no CNS rebooter, so stuns will still yield a few
seconds of vulnerability.
**Swift Blades reworked into Empowered Blades**
You may now use your Mansus grasp to infuse your Dark blades.
It comes with the tradeoff of losing the knockdown and the stamina
damage, you still retain the backstab.
Video Demonstration: https://www.youtube.com/watch?v=9cO9BOD8Zz4
Dark Blades also gain increased demolition modifier.
Dual wielding puts the heretic in the annoying position of having to
switch between the second Blade and an empty hand to use Mansus grasp.
Blade is supposed to be a master of melee combat, but they are still a
dark mage, so why shouldn't they be able to infuse their blades?
It still comes with a tradeoff, I'd reckon super sweaty players will
still want to hotswap, but hey, the option is there.
The added demolition modifier is to provide Blade with some way of
breaking in and out of places, given the path has no jaunts or utility
whatsoever, this seems reasonable to me.
Lastly Malestrom of Silver finally works now; you once again get the
blade aura upon ascending.
# **Side Knowledge changes**
**Mawed Crucible**
The crucible now passively refills, and has a special interaction to
refill the Eldritch Flask, the potion themselves have received changes.
- Xray Potion: duration bumped from 60 to 90 seconds.
- Wall phasing potion: Duration bumped from 15 to 40 seconds, you may
now recall to your original location at will.
- Potion of the Wounded soldier: Upon expiring, it heals your wounds and
regrows missing limbs.
**Reasoning**: Let's be honest here, noone ever makes this thing, the
cost of making 1 potion is exorbitant and the potion themselves are not
even that good to begin with.
I'm not gonna explain every change in detail, but considering the
crucible is one of the OG side knoweldges and you hardly hear anyone
talk about it, we can safely give it a few buffs.
**Unfathomable Curio**
Cooldown on the shield has been halved.
**Reasoning**: discussed it with Rex (the guy who created it), 60
seconds for 1 block is a bit excessive , 30 seconds seems reasonable
enough.
**Lionhunter's Rifle**
Made a bit easier to craft and maintain, it can now be stored in the
vest slot of the Eldritch Robes.
The homing projectile now fully penetrates armor instead of having bonus
damage; it also marks the victim with Mansus grasp and teleports the
Heretic directly to them, the homing on the projectile itself has been
improved.
**Reasoning**: another side knowledge that sadly barely sees any play.
Frankly this gun just doesn't have a purpose to exist, long range
weaponry don't really mix with Heretic toolkit all that well, as you
want to get close to your target to drag em to the spook dimension, not
snipe 'em from a distance
Lionhunter now works as an initiation tool, upon marking the target, the
Heretic transforms into the fired bullet until it connects, applying
mansus grasp on the victim.
Keep in mind you still need xray or thermals to use the rifle to its
full potential, either from the Crucible or the ashen medallion.
Video Demonstration: https://www.youtube.com/watch?v=AXmidKrx-Fg
As a trade off, the damage has been halved from 60 to 30.
<!-- 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. -->
🆑
balance: Sundered Blades now require 1 Titanium or Silver bar to craft
and their capacity has been reduced to 4.
balance: Realignment pulls you out of stuns a bit faster and grants
baton resist while active.
balance: Blade Heretic dual wielding now let's you infuse Your Dark
Blades with a weaker mansus grasp and grants an increase in demolition
modifier.
fix: Malestrom of Silver grants the ring of protective blades once
again.
balance: Mawed Crucible requires 3 organs to brew one potion, passively
refills overtime and can be used to refill the Eldritch Flask
balance: Brew of Crucible soul effect bumped to 40 seconds and can be
ended early.
balance: Brew Of Dusk and Dawn effect bumped to 3 minutes.
balance: Brew of the wounded soldier now offers a very minor passive
heal and fully heals your wounds and limbs upon expiring.
balance: Cursed Curio shield now recharges faster.
balance: Lionhunter's rifle has been reworked, it now fits on the
eldritch robes vest slots, it's cheaper to craft it and its ammunition
and works as an initiation tool.
/🆑
<!-- 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. -->
---------
Co-authored-by: Xander3359 <66163761+Xander3359@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
## About The Pull Request
I've added an action granted by the fishing skillchip that dispenses a
fishign tip from the fishing tips text file when activated, allowing
players who have it to receive fishing-related tips and info on demand.
Also backend stuff: this PR adds action types support to skillchips and
moves all the simple generic skillchips still lingering in the
skillchip.dm file into the generic_skillchips folder. Maybe it
classifies as a small code improvement.
## Why It's Good For The Game
I think the skillchip should both aid mobs without fishing skill (IC),
and players with little experience with the feature (OOC)
## Changelog
🆑
add: The fishing skillchip now grants an action that dispenses fishing
tips.
/🆑
## 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
## About The Pull Request
The idea was born from a small conversation about bepis nodes having low
visibility, which somehow degressed into the idea of announcing
researched nodes to the channels of the interested departments thru the
announcement system machine, which is what I'm doing here, while also
adding documentation, defines and purging some, not all, instances of
camel cases from announcement_system.dm.
Oh, by the by, like the arrival and new head arrival messages, it can be
customized or disabled by interacting with the announcement system.
## Why It's Good For The Game
I think it's helpful to let players know when the research of their dept
is researched, and I think it's kinda interesting to announce bepis tech
on common like it's some hot stuff while it actually isn't just because
it's often missed out and miscellaneous.
## Changelog
🆑
add: Automated announcement systems now announce researched nodes to
their respective departments. You can stop this by either disabling the
announcement systems or by using a multitool on the circuitboard of the
console you're researching nodes from.
/🆑
## About The Previous Pull Request
#85308 reverted by #85929

~~Causes the round to not start when a player isn't eligible for any
jobs at a specific priority level due to runtimes trying to `pick()`
from an empty list aborting the entire job assignment stack.~~
(Fixed???? by
e0e9f2f430)
Maybe we should test merge this for a mo just to make sure no more
cheeky runtimes pop up before merging.
## About The Pull Request
This PR does a couple of minor things:
Makes the job debug logging a bit easier to follow.
Minorly brings some SSjob code up to code standards, converting proc
names to snake_case and doing some otherm is cleanup.
Refactored some stuff into different procs, updated some comments.
And some major things:
Changes the job assignment logic.
Old behaviour
> Assign dynamic priority roles
> Force one Head of Staff (if possible)
> Assign all AIs
> Assign overflow roles (bugged in 2 ways)
> Shuffle the available jobs list once, at the start of the random job
assignment loop
> Pick and assign random jobs for random players from High prefs down,
with a priority on Head of Staff roles
> Handle everyone that couldn't be assigned a random job
New behaviour
> Assign dynamic priority roles
> Assign all Head of Staff roles to players with High prefs
> If no Head of Staff was made in the above way, force one Head of Staff
(if possible)
> Assign all AIs
> Assign overflow roles (fixed)
> Prioritise and fill unfilled head roles at each job priority pref
level, from High prefs down.
> Build a list of all jobs that each unassigned player could be eligible
for at the above pref level.
> Pick a job from that list at random and assign it to the player.
> Handle everyone that couldn't be assigned a random job.
In reality there should be little impact on overall job assignment, the
code changes read more as semantics. For example, the priority check for
filling Head slots will have the same candidate pool in both old and new
versions, but in the new version we're more clearly saying that Heads
are important and we want to prioritise filling them for the sake of
round progression even though the outcome in new and old is the same.
A key change will lead to an increase in assistants - Overflow fixes.
Currently the code block to do early assignments to the Overflow role
doesn't work - or works but not as you'd expect. The idea was is that
because enabling the Overflow role in the prefs menu is an On/Off toggle
that sets the job to High priority when enabled and prevents any other
High priority pref, players that have the Overflow role enabled will
**always** get it. It's their highest priority job with infinite slots.
So we do a pass right at the start to give everyone with the Overflow
role enabled that role and save us wasting time later on in random job
code giving them that same role but with more work.
The problem is the code for this only assigns the Overflow role to
people with it set to Low priority in their prefs, resulting in log
readouts like:
```
[2024-07-27 09:49:43.469] DEBUG-JOB: DO, Running Overflow Check 1
[2024-07-27 09:49:43.469] DEBUG-JOB: Running FOC, Job: /datum/job/assistant, Level: Low Priority
[2024-07-27 09:49:43.472] DEBUG-JOB: FOC player job enabled at wrong level, Player: Radioprague, TheirLevel: Medium Priority, ReqLevel: Low Priority
[2024-07-27 09:49:43.472] DEBUG-JOB: FOC player job enabled at wrong level, Player: Caluan, TheirLevel: High Priority, ReqLevel: Low Priority
[2024-07-27 09:49:43.473] DEBUG-JOB: FOC player job enabled at wrong level, Player: Caractaser, TheirLevel: High Priority, ReqLevel: Low Priority
[2024-07-27 09:49:43.473] DEBUG-JOB: FOC player job enabled at wrong level, Player: Apsua, TheirLevel: High Priority, ReqLevel: Low Priority
[2024-07-27 09:49:43.475] DEBUG-JOB: FOC player job enabled at wrong level, Player: Bebrus2, TheirLevel: Medium Priority, ReqLevel: Low Priority
[2024-07-27 09:49:43.475] DEBUG-JOB: AC1, Candidates: 0
```
Where nobody gets pre-assigned the overflow role because their prefs are
all set to the High priority from being toggled... Except wait a second,
some people have it at Medium priority when it should just be a No
Role/High Priority Role toggle?
And herein we meet a problem. My hypothesis is that traits and stuff
that change the overflow have allowed players to set the "ordinary"
overflow role of Assistant to Medium and/or Low priority.
This still shows as enabled in the prefs menu, but leads to an outcome
where a player with assistant enabled is assigned Cook instead.
```
[2024-07-27 09:49:47.775] DEBUG-JOB: DO, Running Overflow Check 1
[2024-07-27 09:49:47.775] DEBUG-JOB: Running FOC, Job: /datum/job/assistant, Level: Low Priority
...
[2024-07-27 09:49:43.475] DEBUG-JOB: FOC player job enabled at wrong level, Player: Bebrus2, TheirLevel: Medium Priority, ReqLevel: Low Priority
...
[2024-07-27 09:49:47.987] DEBUG-JOB: Running AR, Player: Bebrus2, Job: /datum/job/cook, LateJoin: 0
```
So players with the Overflow job pref set to Low (an unexpected state,
should be disabled or High) would be guaranteed to get that role if none
of the higher priority Head of Staff/AI/Dynamic roles took over via the
bugged "force overflow for people with the pref enabled" proc.
Players with the Overflow job pref set to High would be guaranteed to
get that role if none of the higher priority Head of Staff/AI/Dynamic
roles took over via the random job assignment code giving them their
Highest priority role thanks to the infinite job slots of the Overflow.
And players with the Overflow job pref set to Medium (an unexpected
state, should be disabled or High) would get Assistant if the shuffle
step of the available jobs list put Assisstant before any of the other
jobs they had prefs enabled for at Medium that weren't already filled,
otherwise they'd get another random job.
This code is now changed to ignore the priority the player has set when
looking for people to fill the overflow role. As long as it **is**
enabled, the player will get it unless they're forced into a dynamic
ruleset role (AI when malf rolls) or a Head of Staff role due to their
other prefs (they have RD set to med or low, and no other player has a
Head of Staff at high so they get randomly picked and miss the overflow
role).
This will increase the number of assistants in shifts where their pref
state has Assisstant in the bugged Medium priority, but doesn't change
it for bugged Low and not-bugged High/On priority.
On the other side of the coin, we have how the random jobs are picked.
They're kinda not random, and I noticed this reading the logs then
reading the code.
The list of available jobs to pick from is randomly shuffled - but only
**once**. All players pull from a list of jobs in the same order. So you
end up with a log block like this:
```
[2024-07-27 09:49:47.985] DEBUG-JOB: DO pass, Player: Pierow, Level:3, Job:Botanist
[2024-07-27 09:49:47.985] DEBUG-JOB: Running AR, Player: Pierow, Job: /datum/job/botanist, LateJoin: 0
[2024-07-27 09:49:47.985] DEBUG-JOB: Player: Pierow is now Rank: Botanist, JCP:0, JPL:2
[2024-07-27 09:49:47.986] DEBUG-JOB: DO pass, Player: Daddos, Level:3, Job:Botanist
[2024-07-27 09:49:47.986] DEBUG-JOB: Running AR, Player: Daddos, Job: /datum/job/botanist, LateJoin: 0
[2024-07-27 09:49:47.986] DEBUG-JOB: Player: Daddos is now Rank: Botanist, JCP:1, JPL:2
[2024-07-27 09:49:47.986] DEBUG-JOB: FOC job filled and not overflow, Player: Bebrus2, Job: /datum/job/botanist, Current: 2, Limit: 2
[2024-07-27 09:49:47.987] DEBUG-JOB: FOC player job not enabled, Player: Bebrus2
[2024-07-27 09:49:47.987] DEBUG-JOB: DO pass, Player: Bebrus2, Level:3, Job:Cook
[2024-07-27 09:49:47.987] DEBUG-JOB: Running AR, Player: Bebrus2, Job: /datum/job/cook, LateJoin: 0
[2024-07-27 09:49:47.988] DEBUG-JOB: Player: Bebrus2 is now Rank: Cook, JCP:0, JPL:1
[2024-07-27 09:49:47.988] DEBUG-JOB: FOC player job not enabled, Player: Redwizz
[2024-07-27 09:49:47.988] DEBUG-JOB: FOC job filled and not overflow, Player: Redwizz, Job: /datum/job/cook, Current: 1, Limit: 1
```
The list is shuffled into an order of something like `list("Scientist",
"Botanist", "Cook", "Sec Officer", ...)` then iterated over for each
player. So every random job selection goes:
> "Does Player1 have Scientist enabled and at the right priority? No?
Okay, Botanist? Yes? You get botanist."
> "Does Player2 have Scientist enabled and at the right priority? No?
Okay, Botanist? Yes? You get botanist."
> "Does Player3 have Scientist enabled and at the right priority? No?
Okay, Botanist has no slots left so we'll remove it from the list. Okay,
Cook? Yes? You get cook."
> "Does Player4 have Scientist enabled and at the right priority? No?
Okay, Cook has no slots left so we'll remove it from the list. Okay, Sec
Officer? ..."
This can lead to stacked individual departments if it gets randomly
rolled to the start of the list in the shuffle, and completely empty
departments if they end up at the end.
On high pop shifts this is probably less of an issue. Player prefs add
noise to this and as departments at the front fill up, those at the back
pick up some of the lower pref players.
But have you ever had a shift where there's just like... No fucking sec
even though there's tons of players? The logging (before I made changes
in this PR) was a bit ass, but my hypothesis there is that sec officer
was shuffled right at the end of the random job list, so every other
department was filled up before sec officers were picked.
To mitigate this, I made the list shuffle every single time the game
picks a random available job for the player. This should lead to a more
balanced selection of available jobs by avoiding situations where the
code is biased towards packing some departments by accident.
## Why It's Good For The Game
Overflow fixes mean people who go to their prefs and see the Overflow
Role is On will all have the same experience - They will be the Overflow
role.
More random random job selection should prevent individual departments
having a jobs be stacked when it would have otherwise been possible for
a more balanced selection but the code unintentially biased random
departments to be overstaffed and understaffed each shift.
## Changelog
🆑
fix: Having the Overflow Role set to On will properly ensure you get
that role at a High priority as intended by the game code.
fix: Job selection is now a little bit more random. Fixes an
unintentional bias in random job assignment that could lead to
feast-or-famine for roles where everyone is assigned one job and nobody
is assigned another job.
/🆑
## About The Pull Request
This PR does a couple of minor things:
Makes the job debug logging a bit easier to follow.
Minorly brings some SSjob code up to code standards, converting proc
names to snake_case and doing some otherm is cleanup.
Refactored some stuff into different procs, updated some comments.
And some major things:
Changes the job assignment logic.
Old behaviour
> Assign dynamic priority roles
> Force one Head of Staff (if possible)
> Assign all AIs
> Assign overflow roles (bugged in 2 ways)
> Shuffle the available jobs list once, at the start of the random job
assignment loop
> Pick and assign random jobs for random players from High prefs down,
with a priority on Head of Staff roles
> Handle everyone that couldn't be assigned a random job
New behaviour
> Assign dynamic priority roles
> Assign all Head of Staff roles to players with High prefs
> If no Head of Staff was made in the above way, force one Head of Staff
(if possible)
> Assign all AIs
> Assign overflow roles (fixed)
> Prioritise and fill unfilled head roles at each job priority pref
level, from High prefs down.
> Build a list of all jobs that each unassigned player could be eligible
for at the above pref level.
> Pick a job from that list at random and assign it to the player.
> Handle everyone that couldn't be assigned a random job.
In reality there should be little impact on overall job assignment, the
code changes read more as semantics. For example, the priority check for
filling Head slots will have the same candidate pool in both old and new
versions, but in the new version we're more clearly saying that Heads
are important and we want to prioritise filling them for the sake of
round progression even though the outcome in new and old is the same.
A key change will lead to an increase in assistants - Overflow fixes.
Currently the code block to do early assignments to the Overflow role
doesn't work - or works but not as you'd expect. The idea was is that
because enabling the Overflow role in the prefs menu is an On/Off toggle
that sets the job to High priority when enabled and prevents any other
High priority pref, players that have the Overflow role enabled will
**always** get it. It's their highest priority job with infinite slots.
So we do a pass right at the start to give everyone with the Overflow
role enabled that role and save us wasting time later on in random job
code giving them that same role but with more work.
The problem is the code for this only assigns the Overflow role to
people with it set to Low priority in their prefs, resulting in log
readouts like:
```
[2024-07-27 09:49:43.469] DEBUG-JOB: DO, Running Overflow Check 1
[2024-07-27 09:49:43.469] DEBUG-JOB: Running FOC, Job: /datum/job/assistant, Level: Low Priority
[2024-07-27 09:49:43.472] DEBUG-JOB: FOC player job enabled at wrong level, Player: Radioprague, TheirLevel: Medium Priority, ReqLevel: Low Priority
[2024-07-27 09:49:43.472] DEBUG-JOB: FOC player job enabled at wrong level, Player: Caluan, TheirLevel: High Priority, ReqLevel: Low Priority
[2024-07-27 09:49:43.473] DEBUG-JOB: FOC player job enabled at wrong level, Player: Caractaser, TheirLevel: High Priority, ReqLevel: Low Priority
[2024-07-27 09:49:43.473] DEBUG-JOB: FOC player job enabled at wrong level, Player: Apsua, TheirLevel: High Priority, ReqLevel: Low Priority
[2024-07-27 09:49:43.475] DEBUG-JOB: FOC player job enabled at wrong level, Player: Bebrus2, TheirLevel: Medium Priority, ReqLevel: Low Priority
[2024-07-27 09:49:43.475] DEBUG-JOB: AC1, Candidates: 0
```
Where nobody gets pre-assigned the overflow role because their prefs are
all set to the High priority from being toggled... Except wait a second,
some people have it at Medium priority when it should just be a No
Role/High Priority Role toggle?
And herein we meet a problem. My hypothesis is that traits and stuff
that change the overflow have allowed players to set the "ordinary"
overflow role of Assistant to Medium and/or Low priority.
This still shows as enabled in the prefs menu, but leads to an outcome
where a player with assistant enabled is assigned Cook instead.
```
[2024-07-27 09:49:47.775] DEBUG-JOB: DO, Running Overflow Check 1
[2024-07-27 09:49:47.775] DEBUG-JOB: Running FOC, Job: /datum/job/assistant, Level: Low Priority
...
[2024-07-27 09:49:43.475] DEBUG-JOB: FOC player job enabled at wrong level, Player: Bebrus2, TheirLevel: Medium Priority, ReqLevel: Low Priority
...
[2024-07-27 09:49:47.987] DEBUG-JOB: Running AR, Player: Bebrus2, Job: /datum/job/cook, LateJoin: 0
```
So players with the Overflow job pref set to Low (an unexpected state,
should be disabled or High) would be guaranteed to get that role if none
of the higher priority Head of Staff/AI/Dynamic roles took over via the
bugged "force overflow for people with the pref enabled" proc.
Players with the Overflow job pref set to High would be guaranteed to
get that role if none of the higher priority Head of Staff/AI/Dynamic
roles took over via the random job assignment code giving them their
Highest priority role thanks to the infinite job slots of the Overflow.
And players with the Overflow job pref set to Medium (an unexpected
state, should be disabled or High) would get Assistant if the shuffle
step of the available jobs list put Assisstant before any of the other
jobs they had prefs enabled for at Medium that weren't already filled,
otherwise they'd get another random job.
This code is now changed to ignore the priority the player has set when
looking for people to fill the overflow role. As long as it **is**
enabled, the player will get it unless they're forced into a dynamic
ruleset role (AI when malf rolls) or a Head of Staff role due to their
other prefs (they have RD set to med or low, and no other player has a
Head of Staff at high so they get randomly picked and miss the overflow
role).
This will increase the number of assistants in shifts where their pref
state has Assisstant in the bugged Medium priority, but doesn't change
it for bugged Low and not-bugged High/On priority.
On the other side of the coin, we have how the random jobs are picked.
They're kinda not random, and I noticed this reading the logs then
reading the code.
The list of available jobs to pick from is randomly shuffled - but only
**once**. All players pull from a list of jobs in the same order. So you
end up with a log block like this:
```
[2024-07-27 09:49:47.985] DEBUG-JOB: DO pass, Player: Pierow, Level:3, Job:Botanist
[2024-07-27 09:49:47.985] DEBUG-JOB: Running AR, Player: Pierow, Job: /datum/job/botanist, LateJoin: 0
[2024-07-27 09:49:47.985] DEBUG-JOB: Player: Pierow is now Rank: Botanist, JCP:0, JPL:2
[2024-07-27 09:49:47.986] DEBUG-JOB: DO pass, Player: Daddos, Level:3, Job:Botanist
[2024-07-27 09:49:47.986] DEBUG-JOB: Running AR, Player: Daddos, Job: /datum/job/botanist, LateJoin: 0
[2024-07-27 09:49:47.986] DEBUG-JOB: Player: Daddos is now Rank: Botanist, JCP:1, JPL:2
[2024-07-27 09:49:47.986] DEBUG-JOB: FOC job filled and not overflow, Player: Bebrus2, Job: /datum/job/botanist, Current: 2, Limit: 2
[2024-07-27 09:49:47.987] DEBUG-JOB: FOC player job not enabled, Player: Bebrus2
[2024-07-27 09:49:47.987] DEBUG-JOB: DO pass, Player: Bebrus2, Level:3, Job:Cook
[2024-07-27 09:49:47.987] DEBUG-JOB: Running AR, Player: Bebrus2, Job: /datum/job/cook, LateJoin: 0
[2024-07-27 09:49:47.988] DEBUG-JOB: Player: Bebrus2 is now Rank: Cook, JCP:0, JPL:1
[2024-07-27 09:49:47.988] DEBUG-JOB: FOC player job not enabled, Player: Redwizz
[2024-07-27 09:49:47.988] DEBUG-JOB: FOC job filled and not overflow, Player: Redwizz, Job: /datum/job/cook, Current: 1, Limit: 1
```
The list is shuffled into an order of something like `list("Scientist",
"Botanist", "Cook", "Sec Officer", ...)` then iterated over for each
player. So every random job selection goes:
> "Does Player1 have Scientist enabled and at the right priority? No?
Okay, Botanist? Yes? You get botanist."
> "Does Player2 have Scientist enabled and at the right priority? No?
Okay, Botanist? Yes? You get botanist."
> "Does Player3 have Scientist enabled and at the right priority? No?
Okay, Botanist has no slots left so we'll remove it from the list. Okay,
Cook? Yes? You get cook."
> "Does Player4 have Scientist enabled and at the right priority? No?
Okay, Cook has no slots left so we'll remove it from the list. Okay, Sec
Officer? ..."
This can lead to stacked individual departments if it gets randomly
rolled to the start of the list in the shuffle, and completely empty
departments if they end up at the end.
On high pop shifts this is probably less of an issue. Player prefs add
noise to this and as departments at the front fill up, those at the back
pick up some of the lower pref players.
But have you ever had a shift where there's just like... No fucking sec
even though there's tons of players? The logging (before I made changes
in this PR) was a bit ass, but my hypothesis there is that sec officer
was shuffled right at the end of the random job list, so every other
department was filled up before sec officers were picked.
To mitigate this, I made the list shuffle every single time the game
picks a random available job for the player. This should lead to a more
balanced selection of available jobs by avoiding situations where the
code is biased towards packing some departments by accident.
## Why It's Good For The Game
Overflow fixes mean people who go to their prefs and see the Overflow
Role is On will all have the same experience - They will be the Overflow
role.
More random random job selection should prevent individual departments
having a jobs be stacked when it would have otherwise been possible for
a more balanced selection but the code unintentially biased random
departments to be overstaffed and understaffed each shift.
## Changelog
🆑
fix: Having the Overflow Role set to On will properly ensure you get
that role at a High priority as intended by the game code.
fix: Job selection is now a little bit more random. Fixes an
unintentional bias in random job assignment that could lead to
feast-or-famine for roles where everyone is assigned one job and nobody
is assigned another job.
/🆑
---------
Co-authored-by: san7890 <the@san7890.com>
## About The Pull Request
The proc `can_perform_action()` now
- Accepts atoms & not just movables without runtiming. Fixes#83985
- It now uses `CanReach()` instead of `Adjacent()`. Allows you to
- Check if the target object is placed on top & not hidden
- Is the object inside another storage atom & such
- Properly checks for recursive locs. Before we were passing the direct
atom & not the type to `recursive_loc_check()` causing this proc to
always return true & giving us false positives. Now this proc has been
adjusted to accept both type paths & real atoms
- Removes `can_perform_turf_action()` since its now obsolete
## Changelog
🆑
fix: no more runtimes when dragging turfs onto other stuff
code: most actions now properly check for recursive locs & better
adjacency
/🆑
## About The Pull Request
Okay so turns out, the only thing stopping the exterior sm chamber from
being shut down by a grid check are the filters being marked as
critical. There's SUPPOSED to be an area based check, but that wasn't
being set up properly, so it only protected a single area, no subtypes.
Beyond fixing the very rare case that the sm room becomes vulnerable
when the filters are removed/replaced, the atmos engine and ai sat foyer
are also now protected. AI upload is NOT protected.
Also, I don't believe it has any impact now that the area check is
working, but I've made sure that the canister filters are also marked as
critical- They were already on all but northstar and birdshot.
Fixes#80852
## Why It's Good For The Game
fix bug, throw insect into sm
## Changelog
🆑
fix: Certain areas are now properly protected against grid check. Namely
the supermatter should consistently be protected.
/🆑
## About The Pull Request
Revived my old PR https://github.com/tgstation/tgstation/pull/68901
Replaces the annoying tgui alert popup "Do you want to be X? | Yes | No
| Never for this round" that is hard to read and steals window focus,
with a nice clean alert in the top right that counts down. If it's the
same event/mob they stack with 2x, 3x, etc. It also shows how many
candidates/ghosts are signed up.
The poll alerts have screentips too, they countdown and show if you're
signed up, how many people are signed up, if you chose "never for this
round" (which is cancelable)
## Why It's Good For The Game

Way easier to see what role is available, you get a nice pic of the role
and get it's name in big text, you can cancel "never for this round",
and you can cancel signing up for a role before the timer is up
## Changelog
🆑
refactor: Ghost roles now offer ghosts a clickable poll button. Ghosts
can select a role, deselect it, alt-click it for "Never For This Round",
can cancel "Never", can see the countdown, and can see how many other
people are signed up for the role poll.
/🆑
## About The Pull Request
Morgue trays will now appear green if there's a revivable person within
the morgue tray with a key/ghost attached. They will make periodic beeps
every minute, which can be turned off.
Morgue trays and freezers now have an internal gasmix which
automatically cools down to -60 celsius degrees. As a result of this,
organs will not take damage when temperatures are below 0 celsius
degrees.
If an organ is within a carbon, it will take from the carbon's body
temperature instead of the external temperature. This means that if they
are covered in insulating wear, organs can still take damage if in a
freezer or morgue since their body temperature won't decrease
immediately.
## Why It's Good For The Game
Morgue trays are in a somewhat bad place with how they require you to
stay in your body if you are revivable so that they appear green. This
changes that. They're also supposed to preserve organs but they fail at
doing that, so organ preservation has been overhauled completely to be
more interesting.
## Changelog
🆑
balance: Organs can now be preserved by putting them in freezing
temperatures.
balance: Morgue trays and freezers will now cool down the contents
placed inside of them.
balance: Morgue trays will now properly display if someone stored within
them is revivable and make periodic beeps every minute.
/🆑
---------
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
## About The Pull Request
#76937 introduced a temporary movable `flick_visual` to act as an image
for overlays and whatnot.
this used to be handled by images and i'm not sure whether images were
mouse transparent or were just inheriting parent ID but i'm assuming
since images are kinda virtual (from what i know anyway) they don't
interrupt clicks.
since flick_visual is an atom, it intercepts mouse clicks, which caused
#77142
this PR gives flick_visual `MOUSE_OPACITY_TRANSPARENT` during
`flick_overlay_view()`, which makes it no longer intercept clicks
## Why It's Good For The Game
Fixes#77142 and possibly some other things that use that proc to show
animations or overlays
## About The Pull Request
Rather then using images and displaying them with client.images, we can
instead simply make an object, give it the passed in image/MA's
appearance, and then vis_contents it where we want.
If you want to animate things, you can just use the atom we return from
the proc call.
This ends up costing about 25% of the best case scenario (one guy
online)
It will save more time with more users, but it also allows us to avoid
the hypersuffering that is passing GLOB.clients into the flick proc. So
I think I'm happy enough with this.
For context, here's average per call cost for flick_overlay_view() right
now.
It winds between 5e-5 and 1e-4. With these changes we should pretty
consistently hit the low end of this, because none of our work really
varies all that much.

(I was using sswardrobe for this, but it ends up being a lot slower so
like, why yaknow)
```
/atom/movable/flick_visual
New: 3.65625ms
Provide: 7.4375ms
Qdel: 9.4375ms
Stash: 9.46875ms
```
## Why It's Good For The Game
Using our tools should not make your code eat cpu time for no reason.
Hearers is expensive, iterating clients is expensive, let's not be
expensive.
## About The Pull Request
Removes all of the duplicate global lists for specific machine types
where the only thing they do is store all machines of that type.
Adds machine tracking to SSmachines in the form of a list for all
machines, and then an associative list for machines by their type.
Previously we have machines in multiple global lists, such as airlocks
being in GLOB.doors, GLOB.airlocks, GLOB.machines.
This makes that not a thing, and also means that iterating through
GLOB.machines looking for a specific type is no longer as expensive.
The check queue is 5 minutes long because that's the longest a client
can hold onto a reference. Without clients, we can drastically decrease
the time we have to wait. This lowers the time down to 10 seconds
(though everything right now deletes in 5).
This will represent a 5 minute decrease in CI across the board, freeing
up runners.
Makes a few changes to stuff that was being held for more than 10
seconds.
- `VARSET_CALLBACK` now works through weakrefs, to allow for pAIs to
have their holochassis init timers.
- Nar'Sie cleans herself up in GLOB.cult_narsie if she's deleted.
- "Spooky portals" no longer hold onto a reference for 2 minutes.
- `poll_candidates` short circuits to an empty list if there are no
candidates, to avoid several 30 second+ long timers
Originally this was going to be a more clever hack from @MrStonedOne
about short circuiting if everything deletes before the wait, but we
realized that basically nothing actually holds onto references for that
long without clients, and that nothing really should anyway
Internal_organs now also contains external organs, so the naming was
incorrect
Requested by @tralezab in #72734
Also removed some now incorrect 'as anythings' that assumed everything
in the internal_organs list was an internal_organ (which is a lie since
I put extorgans in there which means runtimes and unintentionakl
behaviour
🆑
fix: fixes deadly harvesting just taking harmless extorgans
code: renames internal_organs to organs now that it can also contain
external_organs
/🆑
## About The Pull Request
Approval Voting is a system in which voters can select as many maps as
they want, instead of selecting only one. Final tallies show how many
votes each map received, and the winner is the map with the most
support.
## Changes since https://github.com/tgstation/tgstation/pull/73413
- Custom votes can now be started using either system
- Icon during AV votes indicating your selections
- Map population filter counts active players and participating ghosts
https://user-images.githubusercontent.com/83487515/222580901-61506cc3-dc42-4435-9775-1e6291a3f734.mp4
## Why It's Good For The Game
First-past-the-post (our current voting system) has flaws such as
creating a bunch of wasted votes, in that a large number of selections
ultimately have no impact and for example, a map can win a 3 way race
11/10/10, even though 2/3 of the votes were not for that map. This leads
to people having to vote strategically, and perhaps not what their true
choice is.
Approval Voting solves this by instead allowing the player to select all
the maps they would like to play, so they can vote for their true
preferred choice, as well as alternates.
For example, a player that wants Metastation, is okay with Icebox, and
doesn't want Delta may feel pressured to vote Icebox if it's in a 2 way
race with Delta.
AV lets them vote for Meta, and Icebox or as many others as they want as
their alternates and creates a more fair outcome of a map vote.
Map population filter removing AFK/lobby screen dwellers gives a better
number of active players so as to not trip the map filter's population
cap earlier than it should.
tl;dr: Less of this

## Changelog
🆑 LT3
rscadd: Added new multi-vote system
balance: Map votes are now calculated using multi-vote instead of the
old single-vote system
admin: Admins can now use either multi-vote or single-vote for custom
votes
code: Map choice filtering uses active player count, not all connected
clients
/🆑
## 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.
/🆑
## About The Pull Request
Mecha speech indicators mistakenly passed ALL hearers in view to
`flick_overlay_global`, rather than just mobs with clients, so it
runtimed when it meant to disappear.
I also added some client sanity to the associated procs... I'm not sure
if they're needed but it seems like they'd be valuable there?
## Changelog
🆑 Melbert
fix: Mecha speech indicators actually go away
/🆑
## About The Pull Request
- Fixes "power failure" secret not working.
`GLOB.the_station_areas` is a list of types, not list of areas.
This `as anything` was causing runtimes, as it was accessing values on
types, and not area instances.
Swaps it over to use `GLOB.areas` + location check that the areas are on
station Z level.
- Fixes "power failure" secret having no announcement if no grid check
has occurred
`GLOB.power_failure_message_cooldown` starts at 0, so it was always
lower than `world.time` if an admin uses it when no grid check has
occurred. Delving deeper, these should not have been linked whatsoever.
The power failure spam prevention is now tied to the grid check event
itself. I also don't believe it to be necessary, as we fixed discounts
having infinite stock, but I'll keep it just cause.
## Why It's Good For The Game
Secrets work as advertised
## Changelog
🆑 Melbert
fix: Admins, "All areas unpowered" in the secrets menu will now function
again.
/🆑
## About The Pull Request
We do two major things here.
First, instead of having every turf need to ask all the turfs in "front"
of it for its blast resistance, we have blast resistance carry back in a
cache, so they only need to ask the one directly in front of them.
Much faster, such wow
The other thing we do is totally remove the idea of "building" a turf's
explosion resistance. Instead, a turf's full resistance is stored on it
at all times.
We use an element to manage objects that want to block explosives, and
that's it simple as.
As an optimization, turfs handle block differently, using a system where
we imply that a turf's own block is just the initial of their
explosive_resistance, unless proven otherwise
This also saves a significant amount of time
To be honest with you, I did this mostly cause I wanted to well make
explosions faster
This doesn't really fufil that. They are faster, but not by much
The bulk of explosion cost comes from actually exploding things, rather
then figuring out what/how to delete.
This code is much faster for larger blastwave sizes, because calculating
protection is constant.
We save maybe 60% of propogate_blastwave, but unfortunately
propogate_blastwave for one maxcap on the top left of icebox's chapel is
only 28ms, so while 11ms is good, it's not everything I could want when
the cost of explosion/fire is 555ms.
I'm happy about it still tho, because doing things like this means I can
expand on how explosive blocking works without needing to make things
seriously expensive in here.
Also it's faster for meme admin explosions and mega burgers
## Why It's Good For The Game
Speeds up explosives slightly, opens the door to better blast resistance
projection
- Add roundstart tip to let new doctors now that morgue trays and
freezers prevent organ decay
- Renamed organ decay proc to be `toggle_organ_decay` instead of
`recursive_organ_check`
Similar vein to #37116
This is supposed to be standard, yet here we are.
SHOULDN'T change anything, but there's likely something out there that's
bound to behave different because of it.
These were done manually, regex to find things that MIGHT need to be
corrected;
`^#define.+\+((?!\)).)*$`
`^#define.+-((?!\)).)*$`
`^#define.+\*((?!\)).)*$`
`^#define.+\/((?!\)).)*$` (yeah that's a lot of stuff.)
`^#define.+%((?!\)).)*$`
`^#define.+SECONDS((?!\)).)*$`
`^#define.+MINUTES((?!\)).)*$`
## About The Pull Request
Moves flick_overlay and flick_overlay_view to atom instead of being a
global proc
## Why It's Good For The Game
General performance and syntaxical improvements, makes it easier to
retrieve iconstates
## Changelog
🆑
fix: flick_overlay is an atom proc
/🆑
Co-authored-by: etherware-novice <candy@notarealaddr.com>
Co-authored-by: Candycaneannihalator <candycane@thisisnotarealaddr.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Makes the code compatible with 515.1594+
Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword
And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.
@tgstation/commit-access Since the .proc/stuff is pretty big change.
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
A pretty heavy refactor for pAIs that just spilled into a rework.
Attempts to fully document and organize backend code.
Fixes a large number of bugs left untouched for a decade.
Breaks down the frontend into subcomponents.
Rebalances their software modules.
(should) fix pAI faces get removed if you activate them during alert #68242
Hey there,
Ever since November of 2021, I've wanted something where I could simply not get any ghost roles while adminned. Some people also do not want to get any ghost rolls whatsoever when they play, for it is their personal preference. This PR seeks to resolve both of these issues with two new preferences.
The first preference will show up to everyone, Suppress All Ghost Rolls. It will return on the main proc that pops up the window, does the sound, all that. You will not hear a peep of a word out of your game. This is dangerous if you like playing as ghost roles, but if you abhor the thought of it... it's just for you.
The second preference is for admins. You can selectively suppress ghost roles while adminned. This is useful because when you're running an event or doing stuff where you need to offer multiple ghost roles (or you need to focus on a ticket and someone is spamming Xenobiology mob spawns), this is absolutely perfect for suppressing. Same return as the player option, but it checks to see if you are currently adminned via the client.holder variable. This is just because some admins (i'm some admins) don't want to turn in on just in case they forget to turn it off down the line because they actually play the game (lying).
There's probably a much cleaner way to do this code-wise, but I couldn't figure it out. Any help is appreciated. I tested it extensively on my local (even using a guest account), and everything seems to work rather nicely after about an hour of trial-and-error.
Why It's Good For The Game
Players who want to just alt-tab or maybe chill in deadchat (or have an extreme loathing of ghost roles) can just simply not get any of that. Admins who want to focus on tickets and not have windows pop up to interfere in good administrative work (and be the most annoying thing in the world) can also do that. Everyone is happy.
Changelog
cl
qol: There is now a new preference in Game Preferences, Suppress All Ghost Rolls. If you tick this preference, you will not get a singular window pop-up whenever a Ghost Role is available. Intended for the few who really do need it.
admin: Admins get another additional preference where Suppress All Ghost Roles only works while they are currently in an adminned state. They will still get ghost rolls normally when they are in a deadminned state.
/cl
* adds examine_block class and a define for it
made some outputs in chat use examine_block
* add examine block to tip of the round
clean up some ------ and ***** seperators
added <hr> tags to divide sections
cleaned up botany plant analyzer text outputs
* bullet points for reagents
* removes <hr> from mobs examines
fixes AIs and borgs having a double "That's Default Cyborg!"
removed some \n newlines
minor code edits
* removes all <hr>
bold names in get_examine_name()
cleaned up plant analyzer output formatting
adjust colors and margins of examine_block class
remove \a from borg examine()
* remove max-width from css
* changed margin and padding units from px to em
* minor edit
a month or two ago i realized that on master the reason why get_hearers_in_view() overtimes so much (ie one of our highest overtiming procs at highpop) is because when you transmit a radio signal over the common channel, it can take ~20 MILLISECONDS, which isnt good when 1. player verbs and commands usually execute after SendMaps processes for that tick, meaning they can execute AFTER the tick was supposed to start if master is overloaded and theres a lot of maptick 2. each of our server ticks are only 50 ms, so i started on optimizing this.
the main optimization was SSspatial_grid which allows searching through 15x15 spatial_grid_cell datums (one set for each z level) far faster than iterating over movables in view() to look for what you want. now all hearing sensitive movables in the 5x5 areas associated with each spatial_grid_cell datum are stored in the datum (so are client mobs). when you search for one of the stored "types" (hearable or client mob) in a radius around a center, it just needs to
iterate over the cell datums in range
add the content type you want from the datums to a list
subtract contents that arent in range, then contents not in line of sight
return the list
from benchmarks, this makes short range searches like what is used with radio code (it goes over every radio connected to a radio channel that can hear the signal then calls get_hearers_in_view() to search in the radios canhear_range which is at most 3) about 3-10 times faster depending on workload. the line of sight algorithm scales well with range but not very well if it has to check LOS to > 100 objects, which seems incredibly rare for this workload, the largest range any radio in the game searches through is only 3 tiles
the second optimization is to enforce complex setter vars for radios that removes them from the global radio list if they couldnt actually receive any radio transmissions from a given frequency in the first place.
the third optimization i did was massively reduce the number of hearables on the station by making hologram projectors not hear if dont have an active call/anything that would make them need hearing. so one of hte most common non player hearables that require view iteration to find is crossed out.
also implements a variation of an idea oranges had on how to speed up get_hearers_in_view() now that ive realized that view() cant be replicated by a raycasting algorithm. it distributes pregenerated abstract /mob/oranges_ear instances to all hearables in range such that theres at max one per turf and then iterates through only those mobs to take advantage of type-specific view() optimizations and just adds up the references in each one to create the list of hearing atoms, then puts the oranges_ear mobs back into nullspace. this is about 2x as fast as the get_hearers_in_view() on master
holy FUCK its fast. like really fucking fast. the only costly part of the radio transmission pipeline i dont touch is mob/living/Hear() which takes ~100 microseconds on live but searching through every radio in the world with get_hearers_in_radio_ranges() -> get_hearers_in_view() is much faster, as well as the filtering radios step
the spatial grid searching proc is about 36 microseconds/call at 10 range and 16 microseconds at 3 range in the captains office (relatively many hearables in view), the new get_hearers_in_view() was 4.16 times faster than get_hearers_in_view_old() at 10 range and 4.59 times faster at 3 range
SSspatial_grid could be used for a lot more things other than just radio and say code, i just didnt implement it. for example since the cells are datums you could get all cells in a radius then register for new objects entering them then activate when a player enters your radius. this is something that would require either very expensive view() calls or iterating over every player in the global list and calling get_dist() on them which isnt that expensive but is still worse than it needs to be
on normal get_hearers_in_view cost the new version that uses /mob/oranges_ear instances is about 2x faster than the old version, especially since the number of hearing sensitive movables has been brought down dramatically.
with get_hearers_in_view_oranges_ear() being the benchmark proc that implements this system and get_hearers_in_view() being a slightly optimized version of the version we have on master, get_hearers_in_view_as() being a more optimized version of the one we have on master, and get_hearers_in_LOS() being the raycasting version currently only used for radios because it cant replicate view()'s behavior perfectly.
About The Pull Request
Basically just removes a null check in get_active_player_count which was introduced in PR:
#61859
Code_bY4RSsI7gZ
Which meant you were missing out on any random event that required a player count, which includes:
Abductors
Alien infestation
Bluespace anomaly
Flux anomaly
Gravity anomaly
Pyroclastic anomaly
Vortex anomaly
Brain trauma
Aurora caelus
Blob
Bureaucratic error
Camera failure
Carp migration
Creep awakening
Disease outbreak
Electrical storm
Fake virus
False alarm
Fugitive spawning
Heart attack
Immovable rod
Ion storm
Major spacedust
Normal meteor wave
Moderate meteor wave
Major meteor wave
Mice migration
Nightmare
Lone operative
Pirates
Portal storm
Prison break
Processor overload
Radiation storm
Shuttle catastrophe
Shuttle loan
Space ninja
Space vine
Spider infestation
Spontaneous appendicitis
Swarmers
Wisdom cow
Wormholes
Why It's Good For The Game
You like having a game to play, right?
fixes#63191
Changelog
cl
fix: You will once again see events that required a playercount to run.
/cl
Bring _HELPERS/_lists.dm to latest standards by:
-Adding proper documentation and fixing existing one
-Giving vars proper names
-Procs now use snake case as per standard (many files that use those procs will be affected)
bring code up to latest standards, move many procs to named files inside _HELPERS
no idea where to put some of these procs, help is appreciated
made more files to contain some unique code, deleted unsorted.dm, we can rest now
About The Pull Request
Rewrites the entire preferences menu in tgui. Rewrites the entire backend to be built upon datumized preferences, rather than constant additions to the preferences base datum.
Splits game preferences into its own window.
Antagonists are now split into their individual rulesets. You can now be a roundstart heretic without signing up for latejoin heretic, as an example.
This iteration matches parity, and provides very little new functionality, but adding anything new will be much easier.
Fixes#60823Fixes#28907Fixes#44887Fixes#59912Fixes#58458Fixes#59181
Major TODOs
Quirk icons, from @Fikou (with some slight adjustments from me)
Lore text, from @EOBGames (4/6, need moths and then ethereal lore from @AMonkeyThatCodes)
Heavy documentation on how one would add new preferences, species, jobs, etc
A lot of specialized testing so that people's real data don't get corrupted
Changelog
cl Mothblocks, Floyd on lots of the design
refactor: The preferences menu has been completely rewritten in tgui.
refactor: The "Stop Sounds" verb has been moved to OOC.
/cl
There are methods that let players spam the everloving shit out of ghosts with BONG BONG BONG BONG BONG BONG BONG etc. through being able to constantly poll ghosts for roles with no restriction or cooldown.
Examples are laughter and slaughter demon antag_spawners.
It makes no sense to be able to concurrently poll for the same mob. As a result, I've now added a guard against this. The proc has been given a static list of mobs it's polling for ghost roles for. If it's already polling for ghost roles for a given mob, then it just early returns with an empty list, otherwise it adds the mob to the static list when the poll starts and removes it when the poll ends.
I've also done a little cleanup in var names and the proc name, with a find-and-replace done. There weren't many things calling it and none used named keywords in the args so should be fine.
There is also poll_candidates_for_mobs (also included in my cleanup) - This proc is basically only called by admins via sentience balloons and they have their own guards against spamming (the balloon pops and thus can only be used once)
Also fixes an issue in /mob/living/silicon/robot/proc/replace_banned_cyborg() where incorrect args were used in the proc call to poll for candidates.
fixes#60197
woke up today with a ridiculous idea of semi-automatic compile time loop unrolling, wasnt worth the complexity in the least but it made the basis of this PR which i then continued work on. makes area_sensitive_contents into a more general system of important_recursive_contents where we can define reasonable uses to replace recursive contents iteration of the type found in get_hearers_in_view() as long as everything that uses it isnt something incredibly common to the point that it noticeably increases memory usage.
Simply puts species IDs into defines ("lizard" turns into #define SPECIES_LIZARD "lizard"). This does not affect any gameplay, and is purely for making sure future code doesn't go all fucked up because someone accidentally misspells something
I only changed code that was spelt correctly, so if there actually is a typo somewhere, it isn't changed
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.
Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.
(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
Currently only applies to beakers changing amounts as a proof of concept of an action that we can't really provide any non-text feedback on, as opposed to something you could have different sounds for.
Inspired by SS14.
Why It's Good For The Game
In the right place, balloon alerts will let you keep your eyes on the game itself, rather than constantly looking at the chat. This is especially important when chat messages will collapse into each other. This is in most cases warranted, but can make other cases (such as changing beaker amounts) confusing.
Changelog
cl
qol: Changing a reagent container's transfer amount will now give you feedback in the form of text on the container itself.
/cl