Commit Graph

2667 Commits

Author SHA1 Message Date
Tom
5db9c4af9f Automatically adds access requirement to description of supply crates (#72748) (#20788)
1. automatically adds access requirement to description of every supply
crate
2. also adds access_view to the automatic system, which previously was
not visible

1. better code
2. now you can see what access you need to privately purchase a crate
from the supply console.

🆑
code: The access requirements at the end of supply crate descriptions
are now automatically generated
fix: Supply console now tells you what access each crate needs to be
privately purchased
/🆑

Co-authored-by: BlueMemesauce <47338680+BlueMemesauce@users.noreply.github.com>
2023-04-26 11:10:30 -04:00
SkyratBot
2293301235 [MIRROR] Burning and acid components fixes and improvements [MDB IGNORE] (#20731)
* Burning and acid components fixes and improvements

* conflicts

---------

Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-04-25 20:02:05 -07:00
SkyratBot
1f56d7a7df [MIRROR] Non-random events now provide a cause in their deadchat broadcast [MDB IGNORE] (#20757)
* Non-random events now provide a cause in their deadchat broadcast

* Update _event.dm

* change proc

* Update _event.dm

---------

Co-authored-by: Rhials <Datguy33456@gmail.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-04-25 18:44:12 -07:00
SkyratBot
fd79c7c9d5 [MIRROR] Makes ruin budget proportional to amount of space ruin z-levels [MDB IGNORE] (#20725)
* Makes ruin budget proportional to amount of space ruin z-levels (#74841)

## About The Pull Request
Adds global define for DEFAULT_SPACE_RUIN_LEVELS and
DEFAULT_SPACE_EMPTY_LEVELS

### Proportional budget
Adds proportional budget to setup_ruins
The budget is multiplied by the current amount of ruin levels over the
default amount
Smaller amounts will have less ruins, while bigger maps will have more
ruins
Should maintain the same amount of ruins per z-level

### Z-levels spawning fix
Z-levels didn't seem to spawn their intended amount of ruins
This was because the for loop added the count variable before doing the
spawning. So for example if there was only 1 level, it would count to 1
and end the loop without spawning the level.
Also removed a loop that seemed to just make the process more complex
for no reason. It even had a note to remove it. However, if it has a use
then you should tell me.

## Why It's Good For The Game

Maps with a smaller amount of ruin levels won't be completely filled
The amount of ruins will be consistent per z-level
The creator of North Star won't allow space exploration unless there's a
way to proportionally reduce the space budget see #74719
## Changelog
🆑
fix: Maps now spawn the correct amount of space levels. The bug caused
them to spawn 1 less in each category
code: The space ruins budget is now proportional to the amount of ruin
levels. This has no effect on the current default maps, but added maps
with less than the default amount of ruin levels will see less ruins.
/🆑

* Makes ruin budget proportional to amount of space ruin z-levels

---------

Co-authored-by: BlueMemesauce <47338680+BlueMemesauce@users.noreply.github.com>
2023-04-23 21:48:37 -04:00
SkyratBot
8164175aa2 [MIRROR] Turns Deer into Basic Mob - They Freeze At The Sight of Vehicles [MDB IGNORE] (#20711)
* Turns Deer into Basic Mob - They Freeze At The Sight of Vehicles (#74784)

## About The Pull Request

deers only show up in the BEPIS but i decided that they would be easy
enough to turn into a basic mob (they were). it was so easy in fact that
i decided to dip my toes into coding AI behavior, and made them freeze
up whenever they see a vehicle. this required a lot of code in a bunch
of places that i was quite unfamiliar with before starting this project,
so do let me know if i glonked up anywhere and i can work on smoothing
it out.
## Why It's Good For The Game

one less simple animal on the list. deers staring at headlights is
pretty cool i think, neato interaction for when you do get them beyond
the joke the bepis makes

i'm also amenable to dropping the whole "deer in headlights" code if you
don't like that for w/e reason- just wanted to make them basic at the
very least
## Changelog
🆑
add: If you ever happen upon a wild deer, try not to ride your fancy
vehicles too close to it as it'll freeze up like a... you know where I'm
going with this.
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Turns Deer into Basic Mob - They Freeze At The Sight of Vehicles

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2023-04-23 14:01:36 -04:00
SkyratBot
a5e70e9122 [MIRROR] Audio File Cleanup [MDB IGNORE] (#20675)
* Audio File Cleanup (#74863)

## About The Pull Request
Removes a bunch of sound files that we don't use and moves some sound
files into better locations. I'm hoping to get an archive repo for
sounds going, much like the
[map_depot](https://github.com/tgstation/map_depot) and
[SS13-sprites](https://github.com/tgstation/SS13-sprites).

EDIT: The old sound files are being moved here:
https://github.com/tgstation/SS13-sounds

Also increased the volume of the clownana rustle sound and clipped off
some dead air from shockwave_explosion

## Why It's Good For The Game
Removes a total of 1.95MB worth of unused sound files from the codebase.

## Changelog
🆑 Tattle
soundadd: increased the volume of the clownana rustle
/🆑

---------

Co-authored-by: tattle <article.disaster@ gmail.com>

* Audio File Cleanup

* Fixes the missing sound files ;)

---------

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: tattle <article.disaster@ gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2023-04-21 17:22:11 -04:00
SkyratBot
4da93b097e [MIRROR] Make sslibrary init faster by loading bookcases asynchronously in parallel [MDB IGNORE] (#20683)
* Make sslibrary init faster by loading bookcases asynchronously in parallel  (#74835)

On terry this takes 17 to 20 seconds to init (3 seconds on servers local
to the db like sybil), during which world.cpu is 4%. This is because it
waits for each bookcase to do its random books sql query before
initializing the next bookcase.

callback_select is a system to invoke a list of callbacks asynchronous
but only return once they are all finished running, Easymode pipelining
of network requests.

There is also the query side query_select that would more directly do
what we want, but the query is too detached from the loop to do it that
way.

There is also the fact that we could make this not do a query
per-bookcase, but that just makes the code more abstract for a benefit
we can get by just doing some basic pipelining of network requests using
a single proc i wrote 6 years ago

* Make sslibrary init faster by loading bookcases asynchronously in parallel

---------

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2023-04-21 17:17:05 -04:00
SkyratBot
fe47d6ba35 [MIRROR] Refactors sheet crafting to better support directional construction [MDB IGNORE] (#20594)
* Refactors sheet crafting to better support directional construction (#74572)

## About The Pull Request

0426f7ddba/code/game/objects/items/stacks/stack.dm (L449)

Ok, but can we not?

This PR refactors sheet crafting to generalize all the cases that were
previously locked behind grille/window type checks and such. In their
stead there are bitflags that can be set to achieve certain behaviors.

All the behavior from before should be preserved, but now it can be
extended to other items. E.g. if you want a railing that can be crafted
underneath directional windows, or an item that behaves like a grille
does--it's just a matter of setting the right obj_flags for it now.

This makes it very simple and painless to add new recipes that use
directional crafting! It's all modular now.

<details><summary>Details</summary>

---

### What I've done:

-Eliminated all the type checks, instead it will now be handled by
object flags and recipe vars, making for a much more configurable
system.

-Added two new obj_flags: `BLOCKS_CONSTRUCTION_DIR` and
`IGNORE_DENSITY`.
-Additionally, I renamed the existing flag `NO_BUILD` to
`BLOCKS_CONSTRUCTION`.

-Changes the proc `valid_window_location` to `valid_build_direction`,
and makes it work for things other than windows.

-Removed a deprecated `window_checks` var from the stack_recipe datum.
-Added three more vars to the stack_recipe datum: `check_direction` and
`check_density`, `is_fulltile`

-Decoupled `on_solid_ground` from the object density check. Now you can
set those separately, allowing you to make recipes that forbid/allow
building things over other things while in space.

---

### What the new flags do:

`BLOCKS_CONSTRUCTION` works as before---prevents objects from being
built on the object. I felt that the previous name was not descriptive
enough, you should know exactly what it does just from looking at the
name.
_example: dna scanner_

`BLOCKS_CONSTRUCTION_DIR` -- setting this on an object will prevent
objects from being built on it when their directions are the same.
_example: directional windows, windoors, railings_

`IGNORE_DENSITY` -- setting this on an object will cause its density to
be ignored when performing the construction density check. This could
have other potential uses as well in the future.
_example: grilles, directional windows, tables_

These three flags cover all the bases for the types of items that are
currently craftable, so there is no more need for any type checking or
weird snowflake window checks. Simply set the appropriate flag and it'll
work as you would expect.

---

### What the recipe vars do:
`check_direction` tells the recipe to check if there's something in that
direction with the `BLOCKS_CONSTRUCTION_DIR` flag set.

`check_density` tells the recipe to run the density check when set. This
is true by default. There are very few items in the game that currently
have this set to false--namely grilles. Setting this to false will make
it so that the object can be constructed regardless of what is in that
tile (unless `one_per_turf` is also set, which will make it so that you
can't craft the same thing twice in the same turf).

`is_fulltile` is used for fulltile windows, but it doesn't necessarily
have to be--you can give this to any recipe and it will adopt the same
properties as that of the fulltile window. Basically they have a special
case where they shouldn't be able to be built over directional
constructions, where normally things would be able to be. Setting this
makes check_direction true as well.

---

### In summary:

Sheet crafting still works just as it did before. But the backend of it
has gotten a glow up and will be able to more easily support new
behaviors.

</details>

## Why It's Good For The Game

This makes the crafting system much more flexible to add recipes to, and
will prevent bad code practices of stacking more conditionals down the
line whenever someone wants to add an item that behaves like grilles or
directional windows in how they are constructed.

It had to be done. Those window checks were a mess.

## Changelog

🆑
qol: added fifty stack versions of remaining glass sheet stacks for ease
of debugging
refactor: refactored sheet crafting to better support directional
constructions that aren't windows
/🆑

---------

Co-authored-by: san7890 <the@ san7890.com>

* Refactors sheet crafting to better support directional construction

* fex

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/20636

---------

Co-authored-by: Bloop <vinylspiders@gmail.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-04-21 02:14:10 +01:00
SkyratBot
244558afdc [MIRROR] Refactors and defuckulates dbcore. Adds support for min_threads rustg setting, Reduce query delay, Make unit tests faster [MDB IGNORE] (#20668)
* Refactors and defuckulates dbcore. Adds support for min_threads rustg setting, Reduce query delay, Make unit tests faster (#74852)

dbcore was very fuckulated.

It had 3 lists of queries, but they all had their own current_run style
list to support mc_tick_check (as it was already being done before with
the undeleted query check, so i can understand why they ~~cargo culted~~
mirrored the behavior) This was silly and confusing and unneeded given
two of those loops can only process at most 25 items at a time on
default config, plus these were cheap operations (ask rustg to start
thread, ask rustg to check on thread).

Because of the confusingness of the 6 lists for 3 query states, The code
to run pending/queued queries immediately during world shutdown was
instead looking at the current_run list for active queries, **meaning
those queries got ran twice.**

The queued query system only checked the current active query count in
fire(), meaning even when there was nothing going on in this subsystem
new queries had to wait for the next fire() to run (10 ticks, so 500ms
on default config)

Those have all been fixed.

the config `BSQL_THREAD_LIMIT` has been renamed to
`POOLING_MAX_SQL_CONNECTIONS` and its default was lowered to match
MAX_CONCURRENT_QUERIES .

added a new config `POOLING_MIN_SQL_CONNECTIONS`, allowing you to
pre-allocate a reserve of sql threads.

The queue processing part of SSdbcore's fire() has been made to not obey
mc_tick_check for clarity and to make the following change easier to do:

If there is less than `MAX_CONCURRENT_QUERIES` in the active queue, new
queries activate immediately.

(its ok that there are two configs that kinda do the same thing,
POOLING_MAX_SQL_CONNECTIONS maps to max-threads in the mysql crate, and
it seems to only be a suggestion, meanwhile MAX_CONCURRENT_QUERIES can't
do anything during init, which is when the highest amount of concurrent
queries tend to happen.)

🆑
config: database configs have been updated for better control over the
connection pool
server: BSQL_THREAD_LIMIT has been renamed to
POOLING_MAX_SQL_CONNECTIONS, old configs will whine but still work.
fix: fixed rare race condition that could lead to a sql query being ran
twice during world shutdown.
/🆑

I have not tested this pr.

* Refactors and defuckulates dbcore. Adds support for min_threads rustg setting, Reduce query delay, Make unit tests faster

---------

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2023-04-21 02:03:25 +01:00
SkyratBot
156f9e33ec [MIRROR] Fixes eigen lockers bypassing TP protection [MDB IGNORE] (#20609)
* Fixes eigen lockers bypassing TP protection (#74722)

## About The Pull Request
Fixes eigenlockers bypassing teleport protections.

![image](https://user-images.githubusercontent.com/41448081/231939450-42287185-48f4-4a3b-ac7a-38adc0600633.png)

Tested w/ one and multiple lockers, prevents entering or exiting from a
tp-prot eigenlocker

## Why It's Good For The Game
This came up in an away mission designed to be a "one-way-trip", the
only exit being at the very end of the away mission. However, people are
able to bypass this with eigenlockers, thanks to them performing no
teleportation checks, which I believe is an oversight.

## Changelog
🆑
fix: Eigenstasium lockers no longer bypass teleport protection
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>

* Fixes eigen lockers bypassing TP protection

---------

Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
2023-04-17 17:52:43 +01:00
SkyratBot
ac9b3c1170 [MIRROR] Fixes typo in FIRE_PRIORITY defines [MDB IGNORE] (#20558)
* Fixes typo in `FIRE_PRIORITY` defines (#74694)

IT'S `PRIORITY` NOT `PRIOTITY` WHAT THE FUCK IS A `PRIOTITY`.

FYI nothing was broken since both the subsystem and the define had the
same name so there wasn't any bullshittery going on there - just a bit
of silliness that I noticed.

* Fixes typo in `FIRE_PRIORITY` defines

---------

Co-authored-by: san7890 <the@san7890.com>
2023-04-14 23:47:29 +01:00
SkyratBot
90672a4216 [MIRROR] Station shift start time config [MDB IGNORE] (#20553)
* Station shift start time config (#74711)

## About The Pull Request

We have a config flag to set random shift start times or server sync'd
start times, but not one to simply set the shift start time.

## Why It's Good For The Game

Control over the shift start time. This way events such as breakfast can
occur during actual breakfast hours.

## Changelog

🆑 LT3
config: Station shift start time can now be set in the server config
/🆑

---------

Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>

* Station shift start time config

---------

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>
2023-04-14 23:46:31 +01:00
SkyratBot
327ebcb31c [MIRROR] Reworks burning objects to be a component [MDB IGNORE] (#20543)
* Reworks burning objects to be a component (#74688)

## About The Pull Request

Title.

## Why It's Good For The Game

Simply put, allows for atoms which are not /obj but use atom_integrity
to burn up too, which is nice and good.
But also, it allows for neat behavior like burning particle effects
(only structures use that right now to spawn smoke)

![image](https://user-images.githubusercontent.com/82850673/231595051-2a8d0574-33cc-4cd9-9d61-65566decf4ef.png)

## Changelog

🆑
add: Burning structures spawn smoke particles. Sick.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>

* Reworks burning objects to be a component

* modular

---------

Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2023-04-14 23:44:14 +01:00
SkyratBot
636b91ee0c [MIRROR] Fixes forcing night shift on/off [MDB IGNORE] (#20542)
* Fixes forcing night shift on/off (#74657)

## About The Pull Request

Fixes https://github.com/tgstation/tgstation/issues/74587
When nightshift is forced on/off by an admin the subsystem is in an idle
state, so the tick check always fails and the lights don't change.

## Changelog

🆑 LT3
fix: Fixed forcing night shift lighting on/off
/🆑

* Fixes forcing night shift on/off

---------

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-04-13 22:07:56 -07:00
SkyratBot
9a594755f3 [MIRROR] Renames delta time to be a more obvious name [MDB IGNORE] (#20507)
* Renames delta time to be a more obvious name

* updates to our code

---------

Co-authored-by: oranges <email@oranges.net.nz>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-04-12 20:45:43 +01:00
SkyratBot
ccb8a92cc9 [MIRROR] Updates paper biscuits and the paper cutter [MDB IGNORE] (#20312)
* Updates paper biscuits and the paper cutter (#74473)

## About The Pull Request

Well this started as a PR updating some of the spelling and grammar on
the biscuits... though spilled out a little into other aspects of the
relevant code.
There are a few things I've done here.

**Paper biscuits:**

- Updated spelling and grammar for paper biscuits. Confidental ->
confidential, that sort of thing.
- A little reorganisation and cleanup of the code itself.
- Preset slips are now generated on init on the parent from a var,
rather than each having its own init proc.
- Early returns, clearer vars, etc

**Paper Cutters**
Ended up doing more here, even though it wasn't the original reason I
started looking at this code.

- Added one (1) paper cutter blade to the paper cutters cargo crate.
Raised the price a little. This is just a reskinned hatchet, so I don't
think it's much of a balance concern.
- Clarifies and docs vars
- Cleans up refs on destroy
- Many `to_chat`s to `balloon_alert`s
- Removed single-letter vars
- Cancelled attack chains when trying to actually use the cutter. You
now pick it up either by having the blade secured and no paper inside,
or by dragging it into your hand.

## Changelog
🆑
spellcheck: Paper biscuits now have more proper spelling and grammar
qol: You now get one spare paper cutter blade in the paper cutter cargo
crate.
tweak: You now use right click to cut paper with a paper cutter
fix: You can now remove paper from a paper cutter if you change your
mind.
/🆑

---------

Co-authored-by: san7890 <the@ san7890.com>

* Updates paper biscuits and the paper cutter

---------

Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
2023-04-04 04:45:59 +01:00
Gandalf
150bfd23c1 Fixes discord notifications for new game (#20278)
Update ticker.dm
2023-04-02 23:50:20 +02:00
Gandalf
afa770a886 Replace Chaos Event System with ICES - Intensity Credit Event System [LT3] (#20272)
* remove chaos/event vote system

* Delete event_chaos_system.dm

* someone was using those

* Update cme.dm

* coffee before commit

* Update event_frequency.dm

* Update cme.dm

* disable changeling

* Update tgstation.dme

* Update supermatter_surge.dm

* change to weight config C, rename dm

* typo, meteor minplayer

* too high

* Update random_events.dm

* weighting updates

* better documentation

* this file is gone, SM surge start time

* reduce scrub

* min player/time for extreme CME/threat meteors

* cme

* Update cme.dm

* cme

* idk why this reverted

* event credits

* intense event credits

* Update random_events.dm

* max occurrences

* new meteor warning

* Update tgstation.dme

* intensity credits, yo

* put ICES in a module folder

* move readme

* Update readme.md

* change logging

* Update events.dm

* Update ICES_event_config.dm

* Update events.dm

* Update events.dm

* Update events.dm

* remove debug logging

* minplayer balancing

* ICES panel

* ope

* Update ICES_event_mods.dm

* tgui panel

* ices_data

* whoa useful info?

* event init

* Update configuration.dm

* Update ICES_event_config.dm

* ...

* make those vars

* Update ICES_tgui.dm

---------

Co-authored-by: lessthnthree <three@lessthanthree.dk>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
2023-04-02 16:50:17 +01:00
SkyratBot
24f300b304 [MIRROR] Removes emergency meetings [MDB IGNORE] (#20253)
* Removes emergency meetings

* 0

---------

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-04-01 21:32:34 +01:00
SkyratBot
90e8f5f70f [MIRROR] "Biscuit" cards, and also now slip papers are actually paper! [MDB IGNORE] (#20240)
* "Biscuit" cards, and also now slip papers are actually paper! (#74329)

## About The Pull Request
**This is not a literal biscuit which you eat. "Biscuit" is just a
nickname of this kind of snap-cards.**
Slip paper is now actually paper, before that, it was just literally
nothing, an object which does nothing. Because of that, the paper cutter
was useless as well, as it turned normal paper into useless paper slips.
Because of this now paper cutters are placed at:

- Bridge
- HoP office
- Warden office
- Cargo

Also adds biscuit cards. If you have no idea what it is, it's a kind of
card placed around a piece of paper usually to conceal some document and
it can be opened by cracking it with a crunchy sound (that's why it's
named a biscuit). Those are usually only opened in certain situations or
emergencies (The most famous example is the US president's nuclear
biscuit, which contains nuclear codes)

There are 2 biscuits: Normal and Confidential.
Normal is a plain biscuit with nothing really special, can be coloured
if you want as it's white.

![image](https://user-images.githubusercontent.com/42353186/229195802-4ac5ad96-6083-47dc-9ccd-13d132f690bf.png)

The confidential biscuit is blue and has "NT" on it.

![image](https://user-images.githubusercontent.com/42353186/229195753-207d64f1-1f17-418e-a01a-8bfa2c4abc51.png)

There is a not-sealed biscuit you can print in autolathe, it starts open
so you can put paper in and seal later making it a normal crackable one.

Now spare ID safe code automatically spawns in a confidential biscuit in
a new paper slip subtype - corporate slip paper. It's a plastic card
which is sturdier than the normal paper clip.

![image](https://user-images.githubusercontent.com/42353186/229195696-07075f78-c736-43a9-bd14-5cf9ca36ddc9.png)

You can also create the corporate paper slip paper using - normal paper
slip, plastic, and captain rubber stamp (making this paper having a rare
status)

![image](https://user-images.githubusercontent.com/42353186/229195599-75807483-02f9-44cb-ae24-d3388b509ccd.png)

![image](https://user-images.githubusercontent.com/42353186/229195610-5a264ed4-8b04-4452-9032-5755e2419423.png)

## Why It's Good For The Game
Paper slips being not paper is stupid and has no point in being that
way. This also made the paper cutter useless; hence, it was never placed
on any map (and never used).
This PR makes it paper, so it's usable when crew members need a paper
slip instead of a full-size sheet.

Placing paper cutters around the station makes it so the crew can
produce paper slips when they need them, this also gives it finally a
use and place on the station.

The 'biscuits' are cool and give more flavour to the spare ID safe
codes, as well as to other documents people might put in future PRs.
This also makes those paranoid captains which are scared of their spare
ID safe code being stolen and read can sleep tight, as now if someone
opens it up it's really obvious. Now also you can really make sure if
that head is lying about "not touching the spare ID", _but not as anyone
cares really._

**Okay, it's draft for now just so I can add some new things, and fix
the dupe bug:**

- [x] Being able to fax the paper biscuits
- [x] Make it impossible to cut paper slips into paper slips
- [x] Make corporate paper slips craftable or printable
- [x] Make confidential biscuits craftable or printable
- [x] Make paper cutters orderable at the cargo

_CRUNCH_
## Changelog
🆑 DrDiasyl aka DrTuxedo#0931
add: Added 'biscuit' cards! They can contain documents and can only be
accessed by cracking them open, you can't close them back. Nanotrasen
now stores spare ID safe codes in them.
add: Placed paper cutters around the station. They're in Bridge, HoP
office, Warden office, and Cargo.
add: Now you can order paper cutters at cargo.
fix: Now the paper slip is actually paper.
imageadd: The paper slips sprite was slightly tweaked to have text lay
more logically, added the corporate paper slip.
/🆑

---------

Co-authored-by: san7890 <the@ san7890.com>

* "Biscuit" cards, and also now slip papers are actually paper!

---------

Co-authored-by: DrTuxedo <42353186+DrDiasyl@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-04-01 21:19:17 +01:00
SkyratBot
3464b6bfb2 [MIRROR] Refactors Regenerate Organs, and a few organ helpers [MDB IGNORE] (#20094)
* Refactors Regenerate Organs, and a few organ helpers

* MERGE CONFLICTS

* GETORGANSLOT > GET_ORGAN_SLOT

* GETORGAN > get_organ_by_type

* lint repairs

* more lint

* Update tgstation.dme

* Update surgery_step.dm

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-04-01 02:51:06 +01:00
Gandalf
e4b4d4d3c0 MISSED MIRROR [Lints Against Unmanaged Local Defines] (#20204)
* https://github.com/tgstation/tgstation/pull/74333

https: //github.com/tgstation/tgstation/pull/74333
Co-Authored-By: tattle <66640614+dragomagol@users.noreply.github.com>

* var stuff

Co-Authored-By: tattle <66640614+dragomagol@users.noreply.github.com>

* vars

* Update sol_fed.dm

---------

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2023-04-01 01:15:22 +01:00
SkyratBot
2a89a9f3af [MIRROR] Implement TGS DMAPI 6.1.0 features [MDB IGNORE] (#20201)
* Implement TGS DMAPI 6.1.0 features

* Update ticker.dm

* E

* Revert "E"

This reverts commit 23e33ae17d0a2ff58063940ca7c115113c0a02aa.

---------

Co-authored-by: Jordan Dominion <Cyberboss@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-31 14:50:32 +01:00
SkyratBot
8dbb7f8a09 [MIRROR] Fixes lava river genertation (It was broken for 2 YEARS) [MDB IGNORE] (#20205)
* Fixes lava river genertation (It was broken for 2 YEARS) (#74359)

## About The Pull Request

Post 9ee4703133, river generation was
broken
It broke things by moving ruin loading to BEFORE world gen (river gen
happens w ruin loading for convienience), which, since rivers retain
their old area (and world gen is area based), meant that rivers just got
overriden.

I've fixed things by moving river generation to AFTER world gen, since
rivers rely on things like mineral walls existing

## Why It's Good For The Game

If we're gonna spend cpu time on these they should like, exist.
Closes #61371
## Changelog
🆑
fix: Lava and plasma rivers (openspace on icebox too) will generate now.
This was broken for 2 years wtf man
/🆑

* Fixes lava river genertation (It was broken for 2 YEARS)

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-03-30 21:56:24 -07:00
Gandalf
ffd39e1729 Missed mirrors (#20203)
* https://github.com/tgstation/tgstation/pull/74273

mirrors https://github.com/tgstation/tgstation/pull/74273

* https://github.com/tgstation/tgstation/pull/74267

mirrors https://github.com/tgstation/tgstation/pull/74267

Co-Authored-By: tattle <66640614+dragomagol@users.noreply.github.com>

* https://github.com/tgstation/tgstation/pull/74113

mirrors https://github.com/tgstation/tgstation/pull/74113

Co-Authored-By: tattle <66640614+dragomagol@users.noreply.github.com>

* Updated elgohr/Publish-Docker-Github-Action to a supported version (v5) (#74370)

elgohr/Publish-Docker-Github-Action@master is not supported anymore

---------

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: Lars Gohr <elgohr@users.noreply.github.com>
2023-03-31 03:48:57 +01:00
GoldenAlpharex
3d1a7ecff0 [MISSED MIRROR] Adds a config-optional endgame chat message (#72860) [MDB IGNORE] (#20108)
Adds a config-optional endgame chat message (#72860)

This basically does what we do for roundstart announcements, but for
round end.

With a delay between a round ending, the server rebooting, and a new
round starting, sometimes it feels like players would be more likely to
catch a roundstart when they know the previous game has just ended, and
not a few moments before the next one starts.

This idea was suggested to me several times by many people who don't
have good connections to servers and keep missing roundstart because
they just aren't given enough time to get on SS13.

I also included Round ID in this, so people who know what time they've
played a round can also now easily see which round it was, if they
wanted to go back to look at the logs for any reason they have.

🆑
config: There's now a config-optional announcer for a round ending.
/🆑

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-03-27 05:36:07 +01:00
SkyratBot
79bb4facfc [MIRROR] Removes networks from the game [MDB IGNORE] (#20083)
* Removes networks from the game (#74142)

## About The Pull Request

This is a continuation of
https://github.com/tgstation/tgstation/pull/74085 - I announced in the
comments there that this would be my next PR, and this is it.

Removes SSnetwork, ``/datum/ntnet``,
``/datum/component/ntnet_interface``, ``var/network_root_id``, the
network unit test, and a lot of other things related to networks.

- NTNet circuits now check for an Ntnet relay, and uses signals to
operate.
- Logs in Wirecarp is now only for PDA and Ntnet Relay things, so you
can no longer see what ruins exist using it (why should Wirecarp know
that Oldstation spawned? The flavor is that they dont know its there).
- Removed it from MULEbots entirely, I don't think it even did anything
for them? Botkeeper seems to work without it, so it's possibly there
from pre-tgui PDAs.
- Moves assigning random names to a base proc instead of being tied to
network, this is things like random-naming scrubbers/vents. The behavior
hasn't changed at all.
- Makes Ntos work for consoles when relays are down, as the comments
said they're supposed to (because they're wired). I think this was an
accidental change on my part, so this is a revert of that.

## Why It's Good For The Game

Ntnet is ancient code that hasn't given us much that we can't do with
already existing alternatives, we've been slowly moving away from it for
init times, and though a large portion of that was limited to airlocks,
I still don't think this is a system worth keeping around.
It's way too complex to expect feature coders to do anything with it,
and too old with better alternatives for anyone to want to improve any
of it.

## Changelog

🆑
fix: Computers are now properly connected to Ethernet, and can use Ntos
when Relays are down.
refactor: Removes Ntnet and Ntnet interfaces, which was only used by
Ntnet circuits (which now directly checks for a Relay to work) and
MULEbots, which did nothing with it.
balance: Wirecarp no longer tells you what ruins spawned in a round,
instead it's limited to PDA logs, and tells you the source too. This
means the RD can catch someone running illegal programs if they don't
make any attempt at hiding it.
qol: Wirecarp logs is now set to save 300 at once, instead of 100 and
being increased to 300 by the RD during the round. This is pretty
insignificant, since there's no reason to NOT want as many logs as
possible.
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>

* Removes networks from the game

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>
2023-03-27 03:28:18 +01:00
SkyratBot
43fde4181e [MIRROR] Saves roughly 20% off living/Life(), makes gravity event based [MDB IGNORE] (#20074)
Saves roughly 20% off living/Life(), makes gravity event based

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-27 03:28:03 +01:00
SkyratBot
e9e7d7a461 [MIRROR] Minigame DLC - Intergalactic Basketball League [MDB IGNORE] (#20048)
* Minigame DLC - Intergalactic Basketball League (#72459)

## About The Pull Request
New DLC bout to drop.

![dreamseeker_45s0qiPMXE](https://user-images.githubusercontent.com/5195984/210466427-35b90d46-6620-45e2-8b21-66d1dcada76f.png)

Lots of new things included:
- New basketball minigame that can be played between 2-7 players
- Crafting recipe for basketballs using leather sheets
- Crafting recipe for basketball hoops using metal, rods, and durathread
- New basketball sounds for the ball and hoops
- New scorecard that can be reset using CtrlClick
- Basketball hoops can be rotated using a wrench and AltClick
- Dunking and shooting animations.

### New basketball mechanics that now utilize stamina:

- Dunking costs large stamina and you must be directly adjacent to the
hoop and click on it.
- Shooting costs medium stamina and uses RMB. Shooting lets you aim the
ball over peoples heads, meaning anyone obstructing your path will be
bypassed. There is a half second delay during shooting where someone can
bump or push to prevent the shot from succeeding.
- Shooting from further away results in less accuracy. If you do not
click directly on the hoop, there is also an accuracy penalty!
- Passing costs no stamina and uses LMB. Trying to score into the hoop
via passing results in a reduced chance.
- Spinning costs medium stamina while holding the ball. It gives a
reduced chance for the ball to be stolen but decreases accuracy for
shooting.
- Pushing a player using RMB will attempt to steal the ball and drain
their stamina.
- The chance to steal the ball is based on the stamina of both players
and the direction they are facing. If the person with the ball is at low
stamina, and the person stealing is at full stamina, they will have a
higher chance. Likewise, if the person with the ball is face to face
with the stealer, then there is a higher chance for the ball to be
stolen. If the person has their back to the stealer, then it's a lower
chance.
- Shooting from more than 2 tiles away, results in 3 points. See below
picture to know the distance.

![dreamseeker_1iFLhQGx01](https://user-images.githubusercontent.com/5195984/210469319-162b9745-fcae-4261-92ef-228388eb4f6f.png)

### Now to introduce the teams:

<details>
<summary>Nanotrasen Basketball Department</summary>

![dreamseeker_baSqp2nipv](https://user-images.githubusercontent.com/5195984/210469887-9e0a92d5-d4bd-4da8-9e73-b11d91fdfcd8.png)

</details>

<details>
<summary>Greytide Worldwide</summary>

![dreamseeker_quzZ3KnwpX](https://user-images.githubusercontent.com/5195984/210469923-ed774656-f5cc-43bc-8314-f8309a01c474.png)

</details>

<details>
<summary>Lusty Xenomorphs</summary>

![dreamseeker_VDeT3JQkNF](https://user-images.githubusercontent.com/5195984/210469944-a229e0cc-4b2e-4754-a0b4-6b36953dca2e.png)

</details>

<details>
<summary>Space Surfers</summary>

![dreamseeker_Dh91fznQbN](https://user-images.githubusercontent.com/5195984/210469963-9a85b4e3-b69d-4b66-8c96-4e2ff2b3b983.png)

</details>

---

Big shoutout to the nukie round a few weeks ago where the nuke ops
challenged the crew (and clown) to a basketball match on their rebuilt
basketball shuttle. The nukies won, but it made me realize that the
basketball mechanics were very raw and needed some polishing.

#### TODO LIST

- [x] Fix bug where ball only goes over peoples heads if they are 1 tile
away
- [x] Remove leftover code comments and procs
- [x] Rebalance stamina values (maybe move this to different ball types)
- [x] Fix basketball stadium template runtiming from wall smoothing
during load
- [x] Fix space surfer stadium having an air breach somewhere
- [x] Add more sounds for when ball is passed, shot, or dunked
- [x] Make it so that holding a ball while on the floor isn't possible
(to avoid those meta cheese strats)
- [x] Drop basketball lets mobs make sounds when spinning (need to
detach signal?)
- [x] Finish adding a simple lobby menu for minigame

## Why It's Good For The Game
_If you can't slam with the best, then jam with the rest._

## Changelog
🆑
add: Add crafting recipe for basketballs (leather sheets) and basketball
hoops (metal, rods, and durathread)
add: Add new basketball minigame for 2-7 players. There are 4 different
courts and teams by default with more planned to be added later.
add: New basketball mechanics that uses stamina. Shoot with RMB, pass
with LMB, and dunk by clicking the hoop while adjacent. Spinning while
holding the ball decreases the chance for someone to steal the ball, but
it decreases your shooting accuracy. Shooting from 2 tiles away lets you
score 3 points.
qol: Basketballs now play a buzzer sound when someone scores. CtrlClick
will reset the scorecard and AltClick with a wrench will rotate the
hoop.
qol: Dunking and shooting animations for basketball.
soundadd: Added basketball bounce sound with credits attribution
imageadd: Added basketball icon to minigames. Move baseball and
dodgeball icons to toy/balls.dmi
/🆑

* Minigame DLC - Intergalactic Basketball League

* Update CentCom_skyrat_z2.dmm

* raptor

---------

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
Co-authored-by: Paxilmaniac <paxilmaniac@gmail.com>
2023-03-27 02:24:29 +01:00
SkyratBot
96be018eb1 [MIRROR] Refactors Suiciding Variable Into Trait [MDB IGNORE] (#20017)
* Refactors Suiciding Variable Into Trait

* suicide

* https://github.com/tgstation/tgstation/pull/72919

MISSED IRROR

* better suicide handling

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-27 02:03:05 +01:00
SkyratBot
8a9768cce5 515 DEPENDANCY UPDATES (#19873)
* Experiment flag for not caching ref on 515

* Update vv_outfit.dm

* MANUAL MIRROR https://github.com/tgstation/tgstation/pull/72657

* MANUAL MIRROR https://github.com/tgstation/tgstation/pull/73788

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-26 23:35:04 +01:00
SkyratBot
5cf7d03295 [MIRROR] Roundstart Xeno egg deliveries create a Captive Xenomorph team, gives regular xenos a fluff objective so their popup isn't blank. [MDB IGNORE] (#20041)
* Roundstart Xeno egg deliveries create a Captive Xenomorph team, gives regular xenos a fluff objective so their popup isn't blank. (#73852)

## About The Pull Request

Xenomorphs who are a product of the roundstart xenobio egg delivery will
now spawn as "Captive Xenomorphs", who receive an objective to break
containment. Here's how it works:

When a delivery egg is generated that area will be marked as the
"captivity area". Xenomorphs born within this area now have their own
team, and have their own section in the roundend report that will
greentext them based on if they were able to survive and escape
captivity. Xenomorphs born outside of this area will spawn as normal
Xenomorphs, with no escape objective or special fanfare.

To further encourage people from actually taking the role and
potentially resigning themselves to an hour in Xenobio CBT prison, the
first of the hive gets their own header on the roundend report.

(When I say "team" here, I mean they receive a different antag team
datum. They're still able to collaborate and cooperate with other
Xenomorphs, they just have a different title and extra objective in
addition to the bonus roundend report limelight.)

![image](https://user-images.githubusercontent.com/28870487/223782098-4659f7cc-c8d7-44d8-afbf-30ebbc17b9bb.png)

![image](https://user-images.githubusercontent.com/28870487/223765028-e285d810-a751-473f-a821-5fb2679b2f13.png)

(This also adds a basic "survive and advance the hive" objective for all
xenomorphs, since their objective popup was otherwise completely blank).

Since the captivity area is entirely dependent on the location of the
egg itself, admins can plop one of these down anywhere, and mappers
don't have to put the egg mapping helper specifically in Xenobio.

For clarification -- To be qualified for the Captive Xenomorph team, **a
delivery egg must be spawned**, and the xeno you inhabit must be born in
the same area the egg was spawned. If the queen breaks captivity and
starts nesting elsewhere on the station, their children will be born as
normal Xenomorphs, not Captive Xenomorphs.

## Why It's Good For The Game

Adds a bit of distinction, and gives bragging rights, to anyone bold
enough to take a roundstart xeno roll and escape with it.

The Xeno egg delivery is already rare enough, I think it deserves a bit
more fanfare (especially considering the dramatic impact it sometimes
has on the direction of a round).

## Changelog
🆑
add: Xenomorphs born in the room the roundstart delivery egg was spawned
in will be part of a special "captive xenomorph" team, tasked with
escaping and tracked in the roundend report.
fix: Regular Xenomorphs no longer receive a blank objectives popup on
spawn.
/🆑

* Roundstart Xeno egg deliveries create a Captive Xenomorph team, gives regular xenos a fluff objective so their popup isn't blank.

---------

Co-authored-by: Rhials <Datguy33456@gmail.com>
2023-03-24 08:52:19 -07:00
SkyratBot
acc18e5bcc [MIRROR] Removes more NTNet from Tablets and removes a ton of dead code [MDB IGNORE] (#19997)
* Removes more NTNet from Tablets and removes a ton of dead code (#74085)

## About The Pull Request

Removes NtNet softwaredownload/communication because they did nothing,
so this also removes the feature to shut them off from Wirecarp

I removed tablets from being added to networks, Tablets already generate
logs for actions they do, which is already enough for the effects it has
in-game (just being visible to Wirecarp), once NtNet is deleted from
everything else then we can move it to ModPCs and limit logging to only
ModPC actions.

Fixes shutting off ntnet relays from Wirecarp, now you can properly shut
off Ntnet, and the warning that it kicks you out of the program is now
true.

Gives the Holodeck it's own network root define and fixes Syndicate
network showing up on Wirecarp

Wirecarp's PDA logs now shows the source of an action

## Why It's Good For The Game

Moves ModPCs further from NTNet so we can move towards deleting it
entirely
Makes Wirecarp more responsible and trustworthy
Removes useless stuff that never gets used, simplifying a overthought
overcomplicated system.

## Changelog

🆑
balance: Wirecarp now properly shuts off NtNet remotely.
balance: Wirecarp now shows the source of a PDA that does an action.
fix: Wirecarp can no longer be used to see if Nukies exist through their
networks.
del: Removes Software downloading and communication Ntnet networks, as
they were pretty worthless.
/🆑

* Removes more NTNet from Tablets and removes a ton of dead code

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-03-20 20:10:48 -07:00
SkyratBot
a3f22bdcb0 [MIRROR] Adds the Janitor access keyring [MDB IGNORE] (#19993)
* Adds the Janitor access keyring

* skyrat edits

* changelog

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
2023-03-20 11:11:04 -07:00
SkyratBot
fcaffe2448 [MIRROR] Fixes inconsistent list syntax in set_status_tab [MDB IGNORE] (#19974)
* Fixes inconsistent list syntax in `set_status_tab` (#74079)

BYOND is inconsistent about whether it treats these as `"key" = value`,
or `src.key = value`, or something else. We suspect that this behavior
is fluctuating in 515, and given that this proc has been causing immense
overtime, that it might be the culprit of some recent complains of
recurring lag. And if it's not, then we at least have more consistent
code.

* Fixes inconsistent list syntax in `set_status_tab`

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-03-19 08:01:12 -07:00
SkyratBot
3a83197b22 [MIRROR] Optimize cutting part of update_icon (Saves 130+ms of init) [MDB IGNORE] (#19853)
* Optimize cutting part of update_icon (Saves 130+ms of init) (#73965)

Avoids calling `cut_overlay` if we know that we manage every overlay
we're about to remove, and short-circuits to `overlays = null`. This
saves the cost of building the appearance list and performing `-=` of
the list.

More minor change, splits validation part of `POST_OVERLAY_CHANGE` into
`VALIDATE_OVERLAY_LIMIT`. This is because there is no point checking if
we hit the overlay limit after removing overlays, since we would've
checked in `add_overlay` in reasonable cases.

* Optimize cutting part of update_icon (Saves 130+ms of init)

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-03-15 00:48:29 +00:00
SkyratBot
2693aec07c [MIRROR] Fixes ignoring space turfs in difference checks [MDB IGNORE] (#19841)
* Fixes ignoring space turfs in difference checks (#73962)

<!-- 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

I done fucked it lads. Space turfs are never initialized, so asserting
all shareable turfs have a cycle below 0 is not safe. instead we'll use
-infinity. if that ever breaks I'll eat my shoe
Closes #73961

* Fixes ignoring space turfs in difference checks

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-03-14 10:33:45 -07:00
SkyratBot
42dd487728 [MIRROR] Station Trait: Spider Infestation [MDB IGNORE] (#19813)
* Station Trait: Spider Infestation (#73893)

## About The Pull Request

Hate having your cables eaten by mice? Nanotrasen have heard your
complaints and settled on a natural, _organic_, and eco-friendly
solution.

When this station trait is active, roundstart and event mouse spawns
have a chance to instead be replaced with duct spiders (both will exist,
it doesn't remove mice).
Duct spiders are largely harmless to humans, actively hunt other
maintenance creatures (such as mice), and have only one _tiny_ downside.

![image](https://user-images.githubusercontent.com/7483112/224345781-2627be98-67f2-4cab-ac40-c6c9b35ea909.png)

These mobs can also sometimes be spawned by a minor scrubber clog event.

As a side note, all spider basic mobs with AI (except Araneus) will now
try to automatically fill a small area around them with webs.

Also I made it so that mobs will ignore their random_walking behaviour
if they're engaged in a `do_after`, just in case.

## Why It's Good For The Game

Adds a little bit of variety to things which can slightly annoy you in
maintenance.
Spiders will automatically make places they live in look like spiders
live there.

## Changelog

🆑
add: A station trait which sometimes populates maintenance with small
spiders. You can wear them as a hat if you wanted to have a spider on
your head for some reason.
add: Spider mobs will automatically start webbing up their environment.
/🆑

* Station Trait: Spider Infestation

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-03-13 02:00:22 +00:00
SkyratBot
f31dbb9ccb [MIRROR] Optimizes atmos init by 20% [MDB IGNORE] (#19810)
* Optimizes atmos init by 20% (#73926)

## About The Pull Request

Each time we intialized a turf's atmos, we checked all the turfs around
it to see if they were different. This meant each pair of turfs talked
to each other twice.

If we instead do the comparing in a second loop, we can use
current_cycle to ensure we only compare a pair once. This saves 0.5
seconds of atmos init.

## Why It's Good For The Game

Speed

* Optimizes atmos init by 20%

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-03-13 01:59:55 +00:00
SkyratBot
f141a04600 [MIRROR] Fix pre-round lobby map vote filter [MDB IGNORE] (#19759)
* Fix pre-round lobby map vote filter (#73820)

## About The Pull Request

Fixes https://github.com/tgstation/tgstation/issues/73816

## Changelog

🆑 LT3
fix: Map filter works properly in the pre-round lobby
fix: Map vote doesn't log 'not enough players' if the vote starts in the
pre-round lobby
/🆑

---------

Co-authored-by: tattle <66640614+dragomagol@ users.noreply.github.com>

* Fix pre-round lobby map vote filter

---------

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: tattle <66640614+dragomagol@ users.noreply.github.com>
2023-03-10 17:47:17 +00:00
SkyratBot
50871407e4 [MIRROR] Add config to validate admin discord commands with discord links and admin ranks [MDB IGNORE] (#19711)
* Add config to validate admin discord commands with discord links and admin ranks (#73818)

This adds a config to secure discord chat commands used by admins.

When enabled it compares the discord id the chat command came from with
the linked discords db to find their ckey, then checks they have the
correct admin rights.

The check automatically self disables if the db is down or if legacy
admin ranks are enabled. (There is no config for discord account linking
or i'd just use that.)

Moved non-admin discord commands out of the admin modules folder and
into the discord modules folder.

Deleted some defunct shit. There was a global list and admin only notify
command that was used by nothing.

There was a whole discord config section that was used by nothing.

* Add config to validate admin discord commands with discord links and admin ranks

---------

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2023-03-10 02:42:44 +00:00
SkyratBot
f4e0b14651 [MIRROR] Mice and Regal Rats won't spawn in the icebox solar panels [MDB IGNORE] (#19356)
* Mice and Regal Rats won't spawn in the icebox solar panels

* Update mobs.dm

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-10 02:39:52 +00:00
SkyratBot
f4327644a2 [MIRROR] Fixes an oopsie with the policy update [MDB IGNORE] (#19649)
* Fixes an oopsie with the policy update

* Update job.dm

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2023-03-04 19:54:22 -08:00
SkyratBot
03854f9abe [MIRROR] Vote System: Approval Voting [MDB IGNORE] (#19666)
* Vote System: Approval Voting (#73749)

## 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

![image](https://user-images.githubusercontent.com/83487515/222860681-210f2d7e-2368-4d42-84d5-6de838995e50.png)

## 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
/🆑

* Vote System: Approval Voting

---------

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-03-04 17:49:21 -08:00
SkyratBot
34ad67a4fc [MIRROR] Updates policy to better warn players for any existing antagonist policy [MDB IGNORE] (#19341)
* Updates policy to better warn players for any existing antagonist policy

* Update job.dm

* Update job.dm

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2023-03-01 17:10:54 -08:00
SkyratBot
db33d75a5e [MIRROR] Space/Changeturf fixes and optimizations [MDB IGNORE] (#19201)
Space/Changeturf fixes and optimizations

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2023-02-28 15:23:35 -05:00
SkyratBot
1f753d5d4c [MIRROR] Refactors crew records (#72725) + Medical/Security records now use the max/min age. [MDB IGNORE] (#19078)
* Medical/Security records now use the max/min age.

* merge conflict

* Refactors crew records (#72725)

I have attempted or otherwise started this project at least 4 times. I
am sick of it being on my calendar. The code needs it. I need it.

- This makes crew records a proper datum rather than assigning
properties record.fields.
- General, medical, and security records are merged.
- Did some slight refactoring here and there for things that looked
obvious.
- Wanted states are now defined (and you can suspect someone through
sechud)
- pAI (unrelated but annoying) had some poorly named exported types that
i made more specific
- Job icons are moved back to the JS side (I wanted to get icons for
initial rank without passing trim)

<details>
<summary>previews</summary>

Editable fields & security console

![CM6d74brnC](https://user-images.githubusercontent.com/42397676/213950290-af6cfd76-eb8b-48e9-b792-925949311d9a.gif)

Medical records

![bFJErsvOaN](https://user-images.githubusercontent.com/42397676/214132534-59af1f8c-9920-4b51-8b27-297103649962.gif)

Look and feel of the more current version

![cxGruQsJpP](https://user-images.githubusercontent.com/42397676/214132611-0134eef0-e74c-4fad-9cde-328ff7c06165.gif)

</details>

TGUI'd some of the worst UIs in the game.
Creating new records is made much simpler.
Manifest_inject is made readable.
Probably bug fixes

🆑
refactor: Crew records have been refactored.
refactor: Medical records -> TGUI
refactor: Security records -> TGUI
refactor: Warrants console -> TGUI
qol: Players are now alerted when their fines are paid off.
qol: Cleaned up sec hud examination text.
qol: Adding and deleting crimes is easier.
qol: Writing crimes in the console sets players to arrest.
qol: You can now mark someone as a suspect through sec hud.
/🆑

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>

* I've got something that now actually works

Just got to incorporate the records into what players can actually see.

* Turns out that client has already been transferred after all

* Adds the past records in the TGUI records (they're kinda ugly but it works, so y'know)

* Whoops

* Hate you too sometimes Prettier

* Fixes ghost roles using LITERAL records, which caused problems

* Fixes the leaks caused by ghost roles not getting their name right because of the stupid freaking special() proc

* I hate list operations man they're so stupid

* Fixes the stars on the crew manifest!

---------

Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
Co-authored-by: KathrinBailey <53862927+KathrinBailey@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2023-02-28 14:14:24 -05:00
SkyratBot
3b0d16f812 [MIRROR] Paraplegics can be Frail, too. [MDB IGNORE] (#19474)
* Paraplegics can be Frail, too.

* Update quirks.dm

* c'mon commas!

---------

Co-authored-by: sqnztb <zephyrthebreeze@gmail.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
2023-02-22 15:46:59 -08:00
SkyratBot
47839a787e [MIRROR] Meteor events won't try and run on icebox [MDB IGNORE] (#19185)
* Meteor events won't try and run on icebox

* Update mapping.dm

* Update _event.dm

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
2023-02-17 01:28:04 -08:00
SkyratBot
1365b9847d [MIRROR] Documents the_station_areas global list, fixes some things which read from it incorrectly [MDB IGNORE] (#19225)
Documents `the_station_areas` global list, fixes some things which read from it incorrectly

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2023-02-15 12:57:21 -08:00