* Updates space verification unit test to use new proc (#73322)
## About The Pull Request
At San's request, updates the space verification unit test to use the
new "are we a planetary map" proc instead of having its own
implementation of the same thing.
## Why It's Good For The Game
If it gets broken in one place it will break in all of them, most
importantly the unit test, which is what we want because that's what the
test is for.
## Changelog
Not player facing.
* Updates space verification unit test to use new proc
---------
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Completing experiments after their associated nodes have been researched gives back a partial refund of the discount lost (#73814)
## About The Pull Request
So we're like simultaneously moving two vague directions with research.
One being "experisci grants discounts for prohibitively expensive nodes
so you want to do the experiments to discount them" and the other being
"Let's give Heads of Staff a way to research anything they want without
any communication to the research department, including the very
expensive nodes that scientists may be working on"
You already see the issue, right? You can't have your cake and eat it
too.
It sucks for scientists to be working on a complex experiment like
weapons tech for that huge 90% discount only for the HoS to stumble onto
the bridge and research it anyways. Your time is wasted and RND is
slowed down massively.
We can do something to assuage that.
This PR makes it so completing an experiment which discounts already
completed nodes will refund a partial amount of the discount that
would've applied.
For example, researching industrial engineering without scanning the
iron toilets will refund ~5000 points.
This can only apply once per experiment, so if an experiment discounts
multiple technologies, they will only get a refund based on the first
technology researched.
## Why It's Good For The Game
This accomplishes the following:
- Expensive research nodes with difficult experiments remain expensive
without completing the experiments. If no one does the experiment, they
act the same as before.
- Expensive research nodes with very easy experiments (but time
consuming) no longer put RND on a time crunch to beat the itchy trigger
finger of the Heads of Staff. Stuff like scanning lathes allow the
scientists to work more at their own pace: they can talk to people or
maybe stop at the bar or kitchen between departments without feeling
pressure to get it done urgently.
- Scientists are able to complete experiments which previously were no
longer deemed relevant if they need a point injection. Experiments left
behind are no longer completely useless bricks. Maybe even gives
latejoin scientists something to do.
- Scientists mid experiment can still complete it to not feel like their
time is wasted.
Overall I think this has many benefits to the current science system
where many have complaints.
## Changelog
🆑 Melbert
qol: Completing an experiment which discounts a researched tech node
will give a partial refund of the discount lost. For example,
researching the industrial engineering research without scanning iron
toilets will refund ~5000 points if you complete it afterwards. This
only applies once per experiment, so experiments which discount multiple
nodes only refund the first researched.
/🆑
---------
Co-authored-by: san7890 <the@ san7890.com>
* Completing experiments after their associated nodes have been researched gives back a partial refund of the discount lost
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* Refactors abstract traitor objectives to be more abstract and enforces this by using unit tests. Rebalances some traitor objectives (#73777)
## About The Pull Request
In this PR, some of the traitor objectives are rebalanced to be more
consistent with scaling risk.
Abstract traitor objectives have had their telecrystal reward and
progression rewards moved to their non-abstract types and it's now
enforced that abstract objectives should not have these values set.
Additionally, it's encouraged that people don't set progression_minimum
on abstract types either, but I can see the usecase in doing so with
final objectives and assassinate objectives. This is why it's fine to
set progression_minimum on an abstract type as long as any of the
derivatives of that abstract type do not redefine the progression
minimum to avoid consistency errors when tweaking progression minimum
values. Setting the progression minimum on an abstract type means that
all derivatives of that abstract type should be unlocked at roughly the
same time.
## Why It's Good For The Game
The rebalances are so that same risk objectives of different types are
worth around the same amount. Repeatables should roughly award the same
amount of TC when it comes to comparing the risk, but the progression
rewards can vary.
The new standard enforcement on abstract traitor objectives is more so
for robustness and ease of balance, as it's easier to lose consistency
when rebalancing values between two objectives, because one of the
objectives derive their rewards from an abstract type. Generally
speaking, rewards from objectives of different risk level should not be
the same and it's easier to enforce this if developers have to
explicitly declare the rewards of the objectives they add.
This doesn't mean each objective has to declare explicitly what their
reward is. Derivatives that subtype off of non-abstract types can still
copy the rewards from their parent.
The progression minimum is fine to be set on abstract objectives as long
as derivatives don't change the progression minimum. If they do, then
it's better for consistency to declare the progression minimum on each
type rather than the abstract type so that higher-tier objectives don't
accidentally end up with a lower progression minimum when it comes to
rebalancing. Of course, this isn't a set rule on, but it's something I'm
going to try and enforce, when it makes sense, going forward, even if it
may increase the number of lines of code each traitor objective file may
have. Maintainability and robustness beat optimization.
## Changelog
🆑
code: Abstract types don't hold telecrystal rewards or progression
rewards anymore, this has been moved to the non-abstract types.
balance: Rebalances rewards from repeatable traitor objectives to be
more consistent with each other.
/🆑
---------
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Refactors abstract traitor objectives to be more abstract and enforces this by using unit tests. Rebalances some traitor objectives
---------
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* [No GBP] Fixes double esword discounts (#73847)
## About The Pull Request
In a recent PR, I have inverted the sales values to make it easier to
calculate and modify the discounts. I did not notice that double eswords
overrode this function, thus, deswords got terrifying discounts. This PR
fixes that. Sorry about that.
I am not happy about the current solution (adding an assoc list directly
to the uplink_item datum has not worked for some reason, it initialized
as an odd value), but I will soon refactor discounts anyways.
## Why It's Good For The Game
There is a good reason double eswords have smaller discounts.
## Changelog
🆑
fix: the double esword sales are now smaller than regular sales
/🆑
* [No GBP] Fixes double esword discounts
---------
Co-authored-by: Profakos <profakos@gmail.com>
* Fix lung stirfry to use a bowl and non-cybernetic lungs (#73687)
🆑 coiax
fix: Tiziran lung stirfry now correctly uses a bowl in its construction,
and is left over after eating. It also can only be constructed with
organic lungs, because cybernetic lungs don't fry as well.
/🆑
Sprite has a bowl, but no bowl involved in the crafting or left behind.
Using cybernetic organs also seems like an oversight, given the whole
"lizards love the raw meat" vibe they have with Tiziran food.
* Fix lung stirfry to use a bowl and non-cybernetic lungs
---------
Co-authored-by: Jack Edge <yellowbounder@gmail.com>
* Corgis now show their ID on examine (#73662)
## About The Pull Request
Lost feature when they were moved to basic mob
## Why It's Good For The Game
The intended feature is now back again !
## Changelog
🆑
fix: Corgis show their ID on examine.
/🆑
* Corgis now show their ID on examine
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* Fixes russian fugitive hunter to_chats, adds missing one for bounty hunters (#73826)
## About The Pull Request
Upon taking a fugitive spawner, you were SUPPOSED to receive a quick
lore blurb to help get you into character, or something. This only
worked for the spacepol hunters, however, as the to_chat's for the
Russian spawner would send to the user's antag datum rather than their
chat, and the bounty hunters were missing theirs entirely.
## Why It's Good For The Game
Reading and text is really good for your eyes and brain.
## Changelog
🆑 Rhials
spellcheck: Fixes the Russian/Bounty Hunter fugitive hunter spawn
backstory messages.
/🆑
* Fixes russian fugitive hunter to_chats, adds missing one for bounty hunters
---------
Co-authored-by: Rhials <Datguy33456@gmail.com>
* Fixes slime processor taking in slimes from behind glass panes/otherwise blocked locations (#73811)
## About The Pull Request
Title; also removes an unnecessary `isslime` check
## Why It's Good For The Game
Fixes#42334
## Changelog
🆑
fix: slime processor no longer sucks in slimes that it can't reach
(glass panes, blocked by other machines etc)
/🆑
* Fixes slime processor taking in slimes from behind glass panes/otherwise blocked locations
---------
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
* Fixes pirates and starfury assailants transferring minds (#73833)
## About The Pull Request
Same issue as before, these skipped the spawn step and snowflaked their
own creation process.
So I split off the create part of attack ghost so these could share.
Fixes#73823 , may fix also #73822 but I don't *think* it will, whatever
changed spawners a few months ago is a little sus
## Why It's Good For The Game
Changeling pirate bad
## Changelog
🆑 Melbert
fix: Fixes pirates and starfury assailants keeping minds of past lives
/🆑
* Fixes pirates and starfury assailants transferring minds
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Fixes some invisible inhands from the transforming component (#73807)
## About The Pull Request
The original issue caused by #70037
Esword issue caused by #73716
Originally the transforming component did not override the inhand icon
state of the the item on its own (instead putting the onus on the item
itself if they wanted unique behavior). It was changed to always update
inhand icon state, most of which don't have one
I don't really like this fix, it should be explicit "I want inhand to
change" and not default, but this will work for now
Also the PR that fixed the Jaws issue didn't actually set the var they
created
Fixes#73805Fixes#73711 (Actually)
## Why It's Good For The Game
Invisible sword bad
## Changelog
🆑 Melbert
fix: Fixed a eswords, some tools, and some other misc. items from being
invisible while extended / active
fix: Teleshields and other misc items not extending in hand when active
fix: Switchblades click on extend again
fix: Pendrivers click on extend
/🆑
* Fixes some invisible inhands from the transforming component
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* [no gbp] orm correctly displays borg id data (#73808)
## About The Pull Request
this is a minor thing i forgot to add in my last PR, now the borg's name
will be displayed as well when interacting with the ORM rather than
displaying "no id detected"
## Why It's Good For The Game
## Changelog
🆑
qol: Borgs are now acknowledged by the orm
/🆑
* [no gbp] orm correctly displays borg id data
---------
Co-authored-by: SMOSMOSMOSMOSMO <95004236+SmoSmoSmoSmok@users.noreply.github.com>
* Fixes the 20+ TC items' discounts being applied incorrectly (#73597)
## About The Pull Request
When #22429 was added, the author's expressed intention was to make 20+
TC items discount less. However, by accident, it has been instead
doubled. I have fixed this problem, while also inverting the values in
`get_discount` to make the calculations easier, and make it clearer what
the return value of the proc is for.
This way, if the 140 TC mauler rolls 75% off, it will be 38% off instead
for 87.5 TC, instead of 87% off for 17 TC.
Also autodocced some procs.
## Why It's Good For The Game
Makes the code work as originally intended.
## Changelog
🆑
fix: 20+ item's discounts are properly smaller, instead of being larger
/🆑
* Fixes the 20+ TC items' discounts being applied incorrectly
---------
Co-authored-by: Profakos <profakos@gmail.com>
* Fixes Luminescence actions (#73802)
## About The Pull Request
- Add Component was supposed to use a named arg, quick fix
- While testing the fix I noticed it doesn't properly remove the
appearance when the item is lost, cuts the overlay on failures
## Why It's Good For The Game
Mothblox said this broke things (it was making a weakref of a callback
on accident)
## Changelog
🆑 Melbert
fix: Luminsecent slime actions correctly update their appearance when
integrating or ejecting slime cores
/🆑
* Fixes Luminescence actions
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Fixes bread dog butchering producing error bread and adds some warnings to bread that shouldn't appear in-game. (#73783)
## About The Pull Request
Fixes https://github.com/tgstation/tgstation/issues/73765
Also adds some warnings and description to bread/breadslice so you can
more easily notice that something is wrong.
Not much to discuss i think.
## Why It's Good For The Game
You can get normal bread from butchering bread dog. And potentially less
issues with bread in future.
## Changelog
🆑
fix: fixed butchering bread dog spawning error bread.
/🆑
---------
Co-authored-by: Jacquerel <hnevard@ gmail.com>
* Fixes bread dog butchering producing error bread and adds some warnings to bread that shouldn't appear in-game.
---------
Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
* Adds logic to regal rat butchering, will now produce mouse meat. (#73715)
## About The Pull Request
Okay, I had fun with the alert system. Simply, this just adds 2 meat to
the butcher completion of regal rats. It's a pretty low amount of meat
considering that they look like this.

I chose a low number for the meat considering that players will still be
able to get a massive influx of meat from butchering the small rats.
## Why It's Good For The Game
Regal Rats are often dragged to the kitchen immediately upon being
killed, leaving confused chefs/assistants wondering why they only
received a crown upon successful butchering. Hopefully, this change will
leave people less baffled by the lack of meatiness from the huge
creatures.
## Changelog
🆑
qol: Regal Rats produce meat on butchering, reducing player confusion.
/🆑
* Adds logic to regal rat butchering, will now produce mouse meat.
---------
Co-authored-by: carshalash <carshalash@gmail.com>
* Refactor egg to chick logic into component (#73537)
Refactored how eggs growing into chicks is implemented, and
how the number of chickens and chicks are tracked. It's now possible for
admins to make anything into an egg.
- Instead of the "fertility" of an egg being whether or not it's
processing (along with the ugliness of adding a variable to a item
defined in another file), fertile eggs are now implemented via
components.
- The number of chickens in the world, and the number of chicks hatched
from egg throwing are now global variables, rather than static variables
on the class.
I've tried very hard to keep these changes completely feature freeze
compatible, any variation in the old behaviour is non-intended (at this
point).
* Refactor egg to chick logic into component
---------
Co-authored-by: Jack Edge <yellowbounder@gmail.com>
* Fixes humanoid examine easter egg's pronoun game (#73766)
Fixes#41175 - it's in the issue, I can't come up with anything funny to
put in the PR body.
## Changelog
🆑
spellcheck: fixed humanoid examine easter egg's pronoun usage
/🆑
* Fixes humanoid examine easter egg's pronoun game
---------
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
* Fixes heirloom objective deduplication (#73793)
## About The Pull Request
When looking for duplicate objectives, removed the currently targeted
heirloom items from the list of possible targets, resulting in an
unchanged list. I chose to store the mind of the heirloom's owner, to
solve this, and try to remove those from the possible targets.
## Why It's Good For The Game
Fixes#70925. Can't get the same objective active at the same time for
free TC and Rep.
## Changelog
🆑
fix: You can no longer have multiple copies of the same heirloom theft
objective
/🆑
* Fixes heirloom objective deduplication
---------
Co-authored-by: Profakos <profakos@gmail.com>
* Removes Cult perms from Survival pods (#73757)
## About The Pull Request
Removes Cult permitted from survival pods, as it's very uninteresting to
have cult bases in places no one will check.
This doesn't affect the mining base itself.
## Why It's Good For The Game
One of the drawbacks of Cult is that they get stronger at the cost of
being more easy to spot, so being to completely bypass the negative part
makes it unfair to fight cult if there's a single shaft miner, or
literally anyone if it's icebox.
## Changelog
🆑
balance: Cult can no longer draw runes in survival pods.
/🆑
* Removes Cult perms from Survival pods
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* Adds a martial artist gi to the AutoDrobe. (#73794)
## About The Pull Request
On a dark and stormy night, @ Cheshify asked in OOC if anyone would be
down to make a martial arts gi of no known origin for an event idea they
had.
Naturally, I decided to put my talent (CITATION NEEDED) to use, and I
have both sprited and coded in (the latter with the help of Cheshify
ofc) the aforementioned gi of no known origin.
<details>
<summary>Picture</summary>

</details>
## Why It's Good For The Game

## Changelog
🆑 dessysalta, Cheshify
add: Nanotrasen has added a martial artist gi to the AutoDrobe for those
who want to go even further byond.
imageadd: Aforementioned gi sprites.
/🆑
* Adds a martial artist gi to the AutoDrobe.
---------
Co-authored-by: Rem/Dess <117083785+dessysalta@users.noreply.github.com>
* Updates Coderbus and Adminbus Ruin (#73675)
## About The Pull Request
Updates the people inside the coderbus and adminbus. Removes the
meatballs, because... well, they used to be called something that
actually accurately describes the admin team but now they're just
meatballs. The banhammer now takes the driver seat of adminbus, with a
sacrificial altar in the back. RIP to all the good players lost when
they became admin
## Why It's Good For The Game
It was really out of date lol
## Changelog
🆑
add: Updated the bus ruin
/🆑
* Updates Coderbus and Adminbus Ruin
---------
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
* Fix admin lookup/follow on disease outbreak [NO GBP] (#73717)
## About The Pull Request
In https://github.com/tgstation/tgstation/pull/73599 my copy/paste
screwup removed the admin lookup in Disease Outbreak: Advanced. Puts it
back.
## Why It's Good For The Game
Admins are supposed to have a link to jump/follow, not message the ckey.
## Changelog
🆑 LT3
fix: Admins can jump to/follow patient zero of a disease outbreak again
/🆑
* Fix admin lookup/follow on disease outbreak [NO GBP]
---------
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Brings back Bartenders fountain pen (#73775)
## About The Pull Request
When PDAs were switched over to tablets, it seems that the bartender's
fountain pen was forgotten. This PR will add it back as the round start
pen of choice for bartenders, replacing the old generic one.
Bardic bartenders rejoice.
## Why It's Good For The Game
A lot of bartenders are snobby and would use fountain pens. Non-snobby
bartenders would still be able to write vulgar words with precise
calligraphy abilities. Both sides win.

## Changelog
🆑
fix: Bartender's fountain pen was omitted during the swap over to
tablets, this has been amended.
/🆑
* Brings back Bartenders fountain pen
---------
Co-authored-by: carshalash <carshalash@gmail.com>
* basement
* change a variant of adminhelp converting. like on screenshots
* Removing mentor converting. More modularisation. More describe to proc
* Small part in mentorhelp which i forget to remove
* Comment
* Another comment about skyrat.
* Update modular_skyrat/master_files/code/modules/admin/admin.dm
Good Idea
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
---------
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
* The chief engineer can now appear as a kidnap target, fixes kidnapping time period limit component (#73759)
## About The Pull Request
CE was missing from the list of kidnappable people, so I have added
them.
I have looked over the original PR, but could not find any reasoning why
they were not included, so it must have been an oversight, but I have
marked this as balance because I could have also added prisoners,
another missing job, but decided not to, because it would be rather
difficult, and a prison break should be a separate objective.
I have also organized the kidnap lists' job department sections and the
jobs inside them alphabetically.
I have also noticed, that the kidnap objectives signed up for the
incorrect `/datum/component/traitor_objective_limit_per_time`. It was
trying to make sure you have not taken 3 assassinate objectives in the
last 15 minutes while generating, instead of three kidnaps.
## Why It's Good For The Game
No reason why the CE should be excluded from being kidnapped. After all
they should know more secrets than an average engineer.
## Changelog
🆑
balance: the syndicate realized Chief Engineer is important enough to
kidnap
fix: kidnap objectives will now properly be unavailable for you for 15
minutes after you take three, instead of after you take three
assassinations.
/🆑
* The chief engineer can now appear as a kidnap target, fixes kidnapping time period limit component
---------
Co-authored-by: Profakos <profakos@gmail.com>
* Optimizes INVOKE_ASYNC by making it a macro and avoiding a proc call (#73264)
## About The Pull Request
This is quite literally the same behavior but faster, and also catches
improper arguments better than the old macro/proc approach.
Credit to Lohikar for writing the macro.
Port of https://github.com/DaedalusDock/daedalusdock/pull/196
Also, `world.ImmediateInvokeAsync()` never set a return value, so
expecting one was never valid behavior.
At MSO's request, the documentation of `spawn(-1)`:
As per the reference, calling `spawn()` with a negative value will
execute the spawned code until a blocking action (such as `sleep()`) is
encountered. Then, it will step outside of the spawned code, and
continue the proc. This is the same behavior as calling a `waitfor =
FALSE` proc. Specifically, under the hood, `spawn(-1)` creates a copy of
the callstack like `sleep()`, incase the spawned code is blocked and
needs to be rescheduled.
As an added bonus, `spawn(-1)` silences SHOULD_NOT_SLEEP errors, whereas
`waitfor = FALSE` does not.
## Why It's Good For The Game
ITS FREE FUCKING CPU TIME
---------
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>
* Optimizes INVOKE_ASYNC by making it a macro and avoiding a proc call
---------
Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>
* Thermomachines no longer self-destruct when built on blocked ports (#73580)
## About The Pull Request
Ever felt the utter pain when you make a new thermomachine, hook it up
perfectly and then screwdriver it only for it to immediately become a
pile of iron and components without warning? This PR fixes that.
Instead of doing what it did previously, it unanchors itself and opens
its panel.
Right, almost forgot to mention, failing to wrench down a thermomachine
no longer bonks it with the wrench.
Due to not being allowed to use visual messages for when the port is
blocked, I've added a mob/user variable to all on_construction() procs.
(This allowed me to use balloon messages instead.)
## Why It's Good For The Game
Saves a lot of unnecessary headaches when working with thermomachines.
## Changelog
🆑
fix: Atmosians have finally convinced the thermomachines to not
self-destruct when built on blocked ports.
fix: Failing to wrench down a thermomachine no longer hits it with the
wrench.
/🆑
* Thermomachines no longer self-destruct when built on blocked ports
---------
Co-authored-by: RikuTheKiller <88713943+RikuTheKiller@users.noreply.github.com>
* this code is so fucking funny it makes me want to merge w/o looking
* safety component stuff
* safeties should be finished
* I loooove safety component
* I swear that's all for gun safety
* manufacturer component
* cant forget this
* this is so awful
* 1100 line long gun file
* ok it actually compiles now
* that should not be an addition of any sort
* these defines should not be used anymore
* why?? the fuck??? are there var edited fire modes on black mesa?????
* how did that even happen
* maybe ci will shut up now
* oh man so many guns are lacking autofire now
* probably fixes safety toggling
* that should reference the gun not the component
* that should probably return
* makes it replicate current behavior, defaults safeties to being ON
* and that is all i have to say about that
* its automagically
* new smite: deadchat control (#73725)
## About The Pull Request
I played around with the deadchat control component for some stuff
downstream and then decided to turn it into a smite, something that is
harsh but really funny especially with all of the inputs that ghosts
have.
The emotes are ones that have the character do something, coordinated
spins and flips have their usual consequences probably, drop causes them
to drop their held items, fall causes them to fall over (and drop their
held items), throw makes them throw whatever item they are holding in
their active hand in a random direction, shove causes them to shove a
random person or mob around them, sit and stand make them buckle and
unbuckle themselves from a chair, and run and walk change their speed
intent. Seven second cooldown and on anarchy ruleset because it _is_ a
smite.
There is a large range of smites from the small pay docking to the
instant and absolute gib but it doesn't feel like there's a lot in for a
nuisance. This would give an option that lets all of the ghosts annoy
one person in particular as they struggle to play while ghosts interfere
with them and constantly make them drop their items and interfere with
their movements, which is obviously fun for the ghosts.
Also I personally think that it is very funny.
* new smite: deadchat control
---------
Co-authored-by: Sol N <116288367+flowercuco@users.noreply.github.com>
* Fixes a major source of papercode lag and optimises paper for less (but still some) lag. (#73628)
## About The Pull Request
Doesn't quite fix but helps mitigate #71697 - The issue report is still
valid, just less so.
Marked.js is just... Slow when used in BYOND's web browsing environment.
New markdown elements **and HTML tags** add significant fractions of a
millisecond to parsing time on my local.
However, I suspect I messed up with using the custom extensions and
every parsing pass it may have be appending a new extension to the
extension list.
I'm not sure why this never manifested in my 6 minutes of testing gif
from the original PR, mind you. I checked out that commit and local and
everything worked the same as I remember. Perhaps a change or version
bump in the interim modified the behaviour.
That aside, on current master it's MASSIVELY obvious something is
fucked.
Spamming 1000 characters of
```
# Slow
## Slower
### Slowest
```
then saving it, then puting **another** 1000 characters of the same
thing for 2000 previewed characters total gave the following performance
metrics:

The marked.js parse time was about 150-180ms for the saved text and
220+ms for the input box text.
Moreso, if you leave the paper open for for a few minutes...

Yeah. That's 500+ms per parse (with 2 per render - one from the paper's
saved text and one from the input box) and the game will basically
crash.
Similar results using this template provided to me for testing purposes:
```
<center><b>Department Psychological Evaluation Survey</b></center>
<center><i>Test Log 230126-01</i></center>
<b>Question 1</b>
What department do you work in?
[_____________________________________]
<b>Question 2</b>
Which department are you least likely to recommend to a friend that they should work in?
<i>Please only choose one</i>
* Command [__]
* Security [__]
* Service [__]
* Cargo [__]
* Medical [__]
* Science [__]
* Engineering [__]
<b>Question 3</b>
Which department are you most likely to recommend to a friend that they should work in?
<i>Please only choose one</i>
* Command [__]
* Security [__]
* Service [__]
* Cargo [__]
* Medical [__]
* Science [__]
* Engineering [__]
<b>Question 4</b>
What is your favorite animal?
[_____________________________________]
---
Please sign here to confirm you are completing this survey voluntarily:
[_____________________________________]
<i>All Nanotrasen brand pens have an automatic signature system. Please write % s to automatically sign it.</i>
```
On first input + save, render time is normal but you can see it clearly
rising each second...


You get the idea.
Fixing the problem by using the proper markdown method for accomplishing
the same thing:
Markdown # Slow # Slower # Slowest test:

HoPaperwork Form

And these numbers don't increase over time. So I think I nailed an
interim fix.
Ultimately, marked.js in tgui/BYOND just seems slow as molasses. But it
can at least be **usable** for now and this should majorly mitigate or
even eliminate problems players have been having with paper (depending
on how loaded it is with HTML and markdown tags).
All the features we had before seem to still work after I feex. So
hopefully good for now?

## Beeg edit
I decided I'd go a step further and implement some basic caching logic.

This means that you don't pay a parsing cost from already saved text
while writing new text, allowing complex forms to be created in multiple
saved or one big copy-paste.
This means that reading paper and filling in input boxes in paper is
free after the first parse, using the cache afterwards.
This is a workaround for the fact a parse can take longer than we'd like
for complicated paper forms.
## Why It's Good For The Game
Paper good.
## Changelog
🆑
fix: Papercode has been significantly improved and trivially filled
paper forms should no longer lag or crash players' game clients.
/🆑
* Fixes a major source of papercode lag and optimises paper for less (but still some) lag.
---------
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* 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>
* Allows mob spawners to be infinite (#73726)
## About The Pull Request
Gives a more 'proper' way for mob spawners to be infinite than just "set
a very large number".
## Why It's Good For The Game
Useful for admins
## Changelog
not really player facing
* Allows mob spawners to be infinite
---------
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* Feature Request: Bunny crate (#73714)
## About The Pull Request
A common player on manual recently requested the ability to more easily
have rabbits as crewmembers. This feature introduces a reasonably priced
rabbit crate to cargo to amend it.
## Why It's Good For The Game
Bunnies are cool I guess.
## Changelog
🆑
add: Introduces orderable rabbit crate to cargo livestock.
/🆑
---------
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Feature Request: Bunny crate
---------
Co-authored-by: carshalash <carshalash@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Fixes an erroneous khinkali recipe in the cooking menu (#73742)
## About The Pull Request
Removes erroneous khinkali recipe that was using a microwave. The true
way to make khinkali in spess is by grill.
## Why It's Good For The Game
Fixes#73677
## Changelog
🆑
fix: fixed erroneous khinkali microwave recipe in the cooking menu. use
a grill like a normal chef
/🆑
* Fixes an erroneous khinkali recipe in the cooking menu
---------
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
* Removes the pipegun's chance to misfire and make you shoot yourself (#73738)
## About The Pull Request
As the title might imply, the increasing percentage chance that a
pipegun misfires and fires at the user has been removed.
## Why It's Good For The Game
The pipegun already has a large number of other downsides, like a 1
round ammo capacity, it being bolt action, the fact it can get dirty and
have the bolt jam, and the 3/4 damage modifier. While these all make
sense and can make for a pretty fun improvised weapon, the chance to
misfire brings it from 'interesting' to 'unusuable in 99% of
situations'.
## Changelog
🆑
balance: The pipegun's chance to misfire and shoot at you rather than
the person you're pointing it at has been removed
/🆑
* Removes the pipegun's chance to misfire and make you shoot yourself
---------
Co-authored-by: Paxilmaniac <82386923+Paxilmaniac@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
* Frozen tanks now release the gasses inside them when shattered (#73475)
## About The Pull Request
Instead of simply being qdel'ed, shattered items have their deconstruct
proc called (with flags set to prevent items from being dropped in the
process). This means that if an object has code that should run before
it's destroyed in order to maintain in-game consistency, that will be
called instead of ignored.
As a result:
- Internals tanks release gasses inside of them (what I wanted to fix)
- Frozen containers only destroy themselves, not everything inside of
them (unintended side effect -- I think it's good but others might
disagree)
- Grenades detonate (unintended side effect -- can be disabled by
changing the disassembled flag to true instead of false)
- Gas crystals release their contents (because theyre grenades)
- Hot Ice does NOT release anything, since it's a datum and not an
object
Also, fixes a potential bug where holodeck canisters wouldn't be
destroyed when their deconstruct was called, making them (possibly?)
indestructible. I doubt this would ever have shown up, but... it's fixed
now!
## Why It's Good For The Game
Fixes https://github.com/tgstation/tgstation/issues/71121, adds
potential support for similar future cases.
Fixes an issue where holodeck canisters (should those ever exist) would
be indestructible.
## Changelog
🆑
fix: frozen gas tanks now release their contents upon shattering
fix: holodeck gas tanks can now be deconstructed
/🆑
* Frozen tanks now release the gasses inside them when shattered
---------
Co-authored-by: skylord-a52 <skylord-a52@users.noreply.github.com>