* [no gbp] removes all duplicate armor datums (#72354)
closes#72348
Title
My bad
Heres the script I used this time if you want to
```cs
var baseDir = Environment.CurrentDirectory;
var allFiles = Directory.EnumerateFiles($@"{baseDir}\code", "*.dm", SearchOption.AllDirectories).ToList();
var known = new Dictionary<string, List<KeyValuePair<string, int>>>();
foreach (var file in allFiles)
{
var fileLines = File.ReadAllLines(file);
for (var i = 0; i < fileLines.Length; i++)
{
var line = fileLines[i];
if (line.StartsWith("/datum/armor/"))
{
var armorName = line.Replace("/datum/armor/", "").Trim();
if (!known.ContainsKey(armorName))
known[armorName] = new List<KeyValuePair<string, int>>();
var knownList = known[armorName];
knownList.Add(new KeyValuePair<string, int>(file, i));
}
}
}
Console.WriteLine($"There are {known.Sum(d => d.Value.Count)} duplicate armor datums.");
var duplicates = new Dictionary<string, List<int>>();
foreach (var (_, entries) in known)
{
var actuals = entries.Skip(1).ToList();
foreach (var actual in actuals)
{
if (!duplicates.ContainsKey(actual.Key))
duplicates[actual.Key] = new List<int>();
duplicates[actual.Key].Add(actual.Value);
}
}
Console.WriteLine($"There are {duplicates.Count} files to update.");
foreach (var (file, idxes) in duplicates)
{
var fileContents = File.ReadAllLines(file).ToList();
foreach (var idx in idxes.OrderByDescending(i => i))
{
string line;
do
{
line = fileContents[idx];
fileContents.RemoveAt(idx);
}
while (!String.IsNullOrWhiteSpace(line));
}
File.WriteAllLines(file, fileContents);
}
```
* modular
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
* Implements Cooldown On Uploading Books to Newscaster (#72112)
## About The Pull Request
Hey there,
Pretty much on the tin. We implement a cooldown on the backend for a set
amount of time to prevent people spamming the newscaster channel with a
shitload of books (rather than have absolutely no safeguards against
it), and then pipe information to the UI for user feedback.
## Why It's Good For The Game
Fixes#71290
In case you weren't already aware, letting users absolutely wreck the
shit out of player's chat via newscaster spam (all newscasters forcesay
a message when something's uploaded to it) as well as just fill the shit
up of a channel with various vulgarities isn't a really good thing.
## Changelog
🆑
fix: To prevent spam, there is now a cooldown on being able to upload
assorted books into the newscaster's channel feed.
/🆑
Let me know if the cooldown seems too long, not hard to change.
* Implements Cooldown On Uploading Books to Newscaster
Co-authored-by: san7890 <the@san7890.com>
* Adds falling hazard element, beware of falling tools, wear your hardhat, comically timed piano falling on the clown (#70970)
## About The Pull Request
https://user-images.githubusercontent.com/82386923/199180691-6605c8cc-e8aa-490e-ab65-909d45d12ca0.mp4
Do note that the damage in this video is extremely exaggerated compared
to what the normal value is.
## Why It's Good For The Game
All these signs about engineers needing to wear their hardhat, and for
what? For the assistant dropping toolboxes onto them from above, that's
what! Also allows people to do as god intended by allowing them to drop
pianos on people.
## Changelog
🆑
add: A variety of items, mainly tools, around the station might hurt if
they fall on your head, remember to wear your hardhat and to avoid
standing under large red X marks on the ground with a piano hanging
above them.
/🆑
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
* Adds falling hazard element, beware of falling tools, wear your hardhat, comically timed piano falling on the clown
* Made anvil and large mortar falling hazards
Co-authored-by: Paxilmaniac <82386923+Paxilmaniac@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
Adds Sabrage (#70755)
This PR adds an interaction to champagne bottles that allows the user to
pull off the cork with an edged (for code purposes, sharp) item. The
sharper the item, the better your chance is to pull the stunt off.
Minimum force is 5, which lets you do it with a captain's pen, for
instance. It's slower than just removing the cork by hand, as to
simulate the player removing the foil before taking the swing. Heads of
staff get a +20% chance to succeed due to being officers in some
capacity. A skillchip that can be bought from the Library Play Room
vendor increases the chance by +35%. Failing the stunt will smash the
bottle in your hands, spilling the contents all over you. This will
produce a bottle with the neck broken off, instead of its bottom.
Pulling the stunt off provides a weak mood buff for the user, and a
weaker mood buff for any witnesses. However, if someone else pulls the
sabrage off after you, you will get your success buff removed. Think of
it like pulling any other stunt and challenging someone else to do it,
only for them to succeed as well. Makes you bitter, doesn't it? Failing
the stunt also produces a weak mood debuff to the user.
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
* Fixes issues with printing posters from the library management computer (#70471)
## About The Pull Request
Posters are kind of insane and they require that the poster item have
either a poster_type defined in the type or that you pass the structure
version of the poster to /new() otherwise they don't work. The weird
thing is that the structure needs to be in the contents of the item too,
or it again won't work (it won't remove the poster from your hands when
placing it). I fixed it so all you need to do is pass the structure
version of the poster to /new() on the item and it will move the
structure to the contents of the item if needed. It's still a bit insane
but it's better than it was and it fixed the bug.
Also SSLibrary.printable_posters was grabbing the directional mapping
helper of the random poster and so when you printed it and placed it,
you'd get confusing results. I made a quick fix to stop that from
happening.
## Why It's Good For The Game
Bug fixes are generally good things.
Fixes#70382Fixes#66504
## Changelog
🆑 VexingRaven
fix: Fixed posters printed from the library console staying in your hand
when you place them
fix: Fixed Random Official Poster printed from the library console
always placing the west-facing variant no matter where you place it
/🆑
* Fixes issues with printing posters from the library management computer
Co-authored-by: VexingRaven <msgerbs@users.noreply.github.com>
* BCIs are now stored in the manipulation chamber's contents, instead of nullspace (#70350)
Fixes a bug where MMIs would be sent into the nullspace room when in an MMI component inside of a BCI that is inserted into a BCI manipulation chamber.
Stores the BCI in the chamber's contents, instead of nullspace, allowing the MMI to talk, the BCI to still act as it would normally and overall just solves the issue and maybe some others alongside it.
Fixes#70349
* BCIs are now stored in the manipulation chamber's contents, instead of nullspace
Co-authored-by: RikuTheKiller <88713943+RikuTheKiller@users.noreply.github.com>
* Bureaucracy logging (#69554)
Sent fax messages' contents and printing out books is now logged to paper.log.
Renaming fax machines is logged to game.log (and to individual players' logs).
Mostly because I was annoyed earlier looking for who printed out books. And then faxes seemed like a logical continuation.
Plus it seems like an interesting way to see how often certain books are printed out!
* Bureaucracy logging
Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
* Fixes runtime from bookshelves being maploaded in after SSlibrary is done instantiating (#69425)
* Fixes runtime with bookshelves loading.
- If a bookshelf is maploaded after the library subsystem is instantiated, it runtimes due to shelves_to_load being null, and no books are loaded. So, if a bookcase is maploaded after SSinit is done initializing, just load the shelf in init.
* Needs to be asyncronous.
* Fixes runtime from bookshelves being maploaded in after SSlibrary is done instantiating
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Updates the book scanner sprite (#69176)
Improves the book scanner sprite and adds a sound when scanning a book
* Updates the book scanner sprite
Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
* Replaces the mood component with a mood datum
* Fixes merge conflicts and updates all of our mood events to use the new mood datums
Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Fixes 118(give or take) cases of mapload not being passed to initilaize (#69107)
fixes 114 cases of mapload not being passed to initilaize
* Fixes 118(give or take) cases of mapload not being passed to initilaize
* Fixes a lot (give or take) cases of mapload not being passed to initilaize
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* [MDB Ignore][Bounty][Complete Refactor] Papercode Redux: Too Many Damn Files <Map Conflict Edition>
* Fixes merge conflicts and compilation errors, alongside fixing the joker card to make it fully functional again
* Fixed a bunch of info variables in map files
* Alright this is why I wanted this merged yesterday
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Tsu's Brand Spanking New Storage: or, How I Learned To Pass Github Copilot As My Own Code
* Delete storage.dm
* yippee
* shit
* holy shit i am stupid
* more fixes
* fuck
* woops
* This tail refactor turned into an organ refactor. Funny how that works.
* Firstly, fixing all the conflicts.
* Fixes all our maps (hopefully)
* Actually, this should fix pod people hair :)
* Almost everything is working, just two major things to fix
* Fixed a certain kind of external organ
* Cleaning up some more stuff
* Turned tail_cat into tail because why the fuck are they separate?
* Moved all the tails into tails.dmi because that was just dumb to have like 3 in a different file
* Adds relevant_layers to organs to help with rendering
* Makes stored_feature_id also check mutant_bodyparts
* Fixes the icon_state names of ALL the tails (pain)
* Fixes wagging, gotta refactor most mutant bodyparts later on
* I Love Added Failures
* Fixed some organs that slipped through my searches
* This could possibly fix the CI for this?
* It doesn't look like it did fix it
* This will make it pass, even if it's ugly as sin.
* Fixed Felinids having a weird ghost tail
* Fixes instances of snouts and tails not being properly colored
Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Fix books to only give mood bonus when read the first time (#66371)
* Fix book rereading exploit
* Refactor book_title_read to be for mind datum
* Remove reader var from on_read
* Add sanity check for mind
* Fix books to only give mood bonus when read the first time
Co-authored-by: Tim <timothymtorres@gmail.com>
* Anomaly expansion - part 1 - Hallucination anomaly (#66392)
New anomaly, the hallucination anomaly. It has small bursts of hallucinations while alive followed by a big one in the moment of the end.
More anomalies are fun, i'm planning to add more of these
added the hallucination anomaly, spawnrate similar to the flux one, can spawn from the SM if eer are over 5000, can spawn when the SM delams (higher rate than the grav one), you can make the hallucination reactive armor
* Anomaly expansion - part 1 - Hallucination anomaly
* Update hud.dm
Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
* Arconomy Adjacent Content: Newscaster Refactor Omega
* Fixed all of the issues that resulted from the repathing
* Fixed our modularized priority_announce.dm
* Deleted newscaster.dm because it was still there due to two comments that weren't overly important
* Fixed merge conflicts for delta
* Fixed a bunch of skyrat maps so they compile :)
* I forgor a few more maps
* Add newscaster_bounty for our newscaster sprite (#12344)
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
* [No GBP] Makes adding additional modular bookstates easier for downstreams (#65357)
* easy books
* moved it to the parent to fix it
* removes redundant var
* [No GBP] Makes adding additional modular bookstates easier for downstreams
Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
* Modernizing Radiation -- TL;DR: Radiation is now a status effect healed by tox healing, and contamination is removed
* Fixing conflicts
* Makes it compile, yeet all the RAD armor from everywhere (thanks RegEx!)
* Removing more lingering rad armor (woo)
* Damnit powerarmors
* Bye bye rad collectors!
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Removes "Singularity and Tesla for Dummies" manual book (#62308)
This PR removes the manual "Singularity and Tesla for Dummies" from the game. It also removes it from the two places it spawns: Engineering in DeltaStation and an Ice Ruin.
Also this is my first PR and I have little experience with DM so please be nice
Why It's Good For The Game
The Singularity and Tesla engines were removed from the game a while ago, so having these books in game is unnessessary
Also, opening the book shows a huge-ass "Tesla and singularity engines have been removed!" message front and center.
* Removes "Singularity and Tesla for Dummies" manual book
* book burning 1984
Co-authored-by: malton33 <44654353+malton33@users.noreply.github.com>
Co-authored-by: Kat <evesovereign@hotmail.co.uk>
* Adds The Secret Brainwashing Technique-Chip (#62295)
Adds a skillchip found in maint that lets you put brains in washing machines, and scrub em back into good health. Brains now get maximum damage if put in a washing machine OTHERWISE.
VERY heavily inspired by this video:
https://www.youtube.com/watch?v=88po7PY14E8
> I believe having a brain successfully washed should give its brainmob an achievement for exposure of this feature.
can be done in a separate pr
* Adds The Secret Brainwashing Technique-Chip
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
* Soapstone messages are coloured by vote count instead of randomly (#60570)
## About The Pull Request
- Each soapstone message receives one of six colours based on its vote count (plastic, iron, bronze, silver, gold, diamond)
- The colours rename the message (e.g. "iron engraved message") to make the system self-explanatory
<!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! -->
## Why It's Good For The Game
The only quality indicator we have for these is the vote count. There are a lot of engravings to examine to find the ones with high vote counts. This makes it so you can spot them at a glance and rewards players for making contributions people like.
* Soapstone messages are coloured by vote count instead of randomly
Co-authored-by: cacogen <25089914+cacogen@users.noreply.github.com>
* Fix soapstone and engraved messages (#60055)
This PR fixes and improves a few things regarding soapstones and engraved messages:
- Observers can now interact with the engraved messages from any distance instead of having to be next to them to rate them, which was rather unintuitive and unnecessary. This also solves problems where admin observers were unable to delete them without being next to them or activating AI interact mode.
- Fixed a case where you could make more engraved messages than your soapstone had uses by queing them fast enough.
- Cleaned up engraved message UI code a little bit - removed an unnecessary section and replaced deprecated <Grid> with <Stack>. Looks practically the same.
- Minor code improvements.
* Soapstone & engraved message fixes
Co-authored-by: Arkatos1 <43862960+Arkatos1@users.noreply.github.com>