Commit Graph

173 Commits

Author SHA1 Message Date
SkyratBot
35581924cc [MIRROR] Turf Icons Unit Test [MDB IGNORE] (#21298)
* Turf Icons Unit Test (#75488)

unit tests turf icons to find... well, missing icons. honk.

fixes #75372
corrects a bunch of things messed up in #65504

🆑 ShizCalev
code: Made a new unit test to find turfs with broken/missing icons!
Rejoice!
fix: Fixed a bunch of incorrect and missing turf icons.
/🆑

* Turf Icons Unit Test

* Turf icon unit test modularity support update

* Should hopefully fix all of the failing turf icon tests

---------

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2023-05-31 23:31:05 -04:00
Gandalf
f2b328e14a Post Mirror Grounding (#21034)
* PT1 MAP RESET

* Lints

* [MDB Ignore] Adds a unit test for typepaths that are required to be mapped onto each station map (#74985)

Inspired by #74967 and #68459 , and the fact that Tramstation regresses
very often -

Adds a unit test, `required_map_items`, which ensures that certain
typepaths which should definitely be mapped onto every map is mapped
onto every map

It can also be used to ensure that items which should not be mapped in
multiple times are not, among other things.

I included a few examples -
- Min 1, max inf of each head of staff stamps
- Min 1, max 1 departmental order consoles
- Min 1, max inf comms console
- Min 1, max 1 Pun Pun
- Min 1, max 1 Poly
- Min 1, max 1 Ian

If, in the future, a mapper decides they (for some reason) do not want a
certain previously-required item on their map, the test can be adjusted
such that it allows excluding or something, but currently it should be
for items which require conscious thought about.

I attempted to make this a linter before realizing two things
1. Someone might make a spawner which spawns the items, or they might
get placed in a locker, in any case this accounts for everything on init
2. Linters run on every map, non-station maps included

So I went with a test

Why is it always the CMO stamp?

Not necessary (unless I find a map missing something, then this will be
updated)

* yay

* Update VoidRaptor.dmm

* Update blackmesa.dmm

* wew

* New sand and water sprites (ported from Bay) (#75254)

* e

* Update AntagInfoClock.tsx

* Update LimbsPage.tsx

* Update area_spawn_entries.dm

* Update LimbsPage.tsx

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-05-10 01:24:11 +00:00
SkyratBot
80c3fa0504 [MIRROR] Adds a unit test that all roundstart spawnable jobs have a landmark to spawn at [MDB IGNORE] (#20942)
* Adds a unit test that all roundstart spawnable jobs have a landmark to spawn at

* Update _job.dm

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-05-10 00:40:23 +01:00
SkyratBot
b44715db5d [MIRROR] ex_act() will work on basic mobs again (lol) + Unit Test [MDB IGNORE] (#20919)
* `ex_act()` will work on basic mobs again (lol) + Unit Test

* COnflict

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-05-03 22:51:49 +01:00
SkyratBot
374d002403 [MIRROR] Unit Test Font Awesome icons and Quirk icons [MDB IGNORE] (#20442)
* Unit Test Font Awesome icons and Quirk icons

* skyrat edits

* icons

* fex

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-04-21 01:57:33 +01:00
SkyratBot
4085ed014c [MIRROR] Expands conversion unit test coverage [MDB IGNORE] (#20516)
* Expands conversion unit test coverage (#74563)

## About The Pull Request

Requires #74562 and #74556 be merged first.

Unit tests cult conversion and throws in a case for rev AOE flashes

## Changelog

Not necessary

---------

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

* Expands conversion unit test coverage

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2023-04-14 14:37:53 +01:00
SkyratBot
e7a6f94460 [MIRROR] Moves revolution code of out of flash code, fixes April Fool conversion forcesay never working in any cirumstances [MDB IGNORE] (#20358)
* Moves revolution code of out of flash code, fixes April Fool conversion forcesay never working in any cirumstances (#74411)

## About The Pull Request

- Signallizes head revolutionary flash conversion code, moving it out of
core flash code.
- Removes "tacticool" flashing from head revs, but they can still
convert from any direction

- Fixes April Fools "You son of a bitch! I'm in" force say never
working.
   - Revs are muted on conversion so they couldn't talk.
       - Fixed by only muting revs on non-holidays
   - Cultists are unconscious on conversion so they couldn't talk
       - Fixed by only unconscious-ing cultists on non-holidays
- Brainwash victims are more often than not unconscious / asleep so they
couldn't talk
       - Just left this one.

- Reduced the chance of them occurring and limits it to April Fools only
- A 1% chance of the force says ocurring means they will happen pretty
much once a week, given multiple rev / cult rounds happen every week and
on average like, 20 people are converted. A little absurd, it's good
that it never worked?

## Why It's Good For The Game

Antag code in core item code is bad

It's funny this meme has existed for like 2, 3 years now? No one's
tested it, it's never worked

## Changelog

🆑 Melbert
refactor: Removes Rev code from core flash code
fix: Getting converted on April Fools now triggers the meme force say as
always intended
del: The meme force say can no longer trigger on any day (it didn't work
before anyways)
/🆑

* Moves revolution code of out of flash code, fixes April Fool conversion forcesay never working in any cirumstances

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-04-06 02:07:43 +01:00
SkyratBot
8bc4d03b14 [MIRROR] Fixes slimes not having a mischievous face [MDB IGNORE] (#20357)
* Fixes slimes not having a mischievous face (#74483)

## About The Pull Request

The icon state was improperly named, so it didn't actually exist.
This fixes that.

## Why It's Good For The Game

Fixes a bug

## Changelog

🆑
fix: Slimes' mischievous emote now works.
/🆑

* Fixes slimes not having a mischievous face

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-04-06 02:07:16 +01:00
SkyratBot
16e9175153 [MIRROR] Unit Test connected station areas [MDB IGNORE] (#20219)
* Unit Test connected station areas (#74367)

## About The Pull Request

Ensures that we don't get station areas which are disconnected
### Mapping March
Ckey to receive rewards: N/A

## Why It's Good For The Game

"Drake, why is this room depressurized?"
## Changelog

* Unit Test connected station areas

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-03-31 15:43:34 -07:00
SkyratBot
63feb20ef0 [MIRROR] Organ Unit Tests & Bugfixes [MDB IGNORE] (#19968)
* Organ Unit Tests & Bugfixes

* e

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

* e

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

---------

Co-authored-by: Dani Glore <fantasticdragons@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2023-03-31 04:04:45 +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
6e029611ac [MIRROR] Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test [MDB IGNORE] (#19959)
* Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test

* MISSED MIRROR https://github.com/tgstation/tgstation/pull/71606

* Update modules_supply.dm

* Update tgstation.dme

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-27 03:26:52 +01:00
SkyratBot
d4c8a4ed9e [MIRROR] Resolves mutant species keeping old organs they shouldn't have [MDB IGNORE] (#19958)
* Resolves mutant species keeping old organs they shouldn't have (#73728)

## About The Pull Request

regenerate organs never removed invalid organs when regenerating
## Why It's Good For The Game

Fixes https://github.com/tgstation/tgstation/issues/73640
adds a unit test to prevent regressions in the future

## Changelog
🆑
fix: Plasmamen don't have hearts, again
/🆑

* Resolves mutant species keeping old organs they shouldn't have

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

* Now everything should pass, yes, even appendixes for synths

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: Coffee <CoffeeDragon16@gmail.com>
2023-03-26 13:28:28 -04:00
lessthanthree
0d983be692 [MANUAL MIRROR] Fix: DNA Infuser & Unit Tests, Organs Bugfixes (#19211)
* Fix: DNA Infuser & Unit Tests, Organs Bugfixes (#73003)

>_"I don't remember buying tickets to Mutants on Ice."_
>-Duke Nukem

This PR is (hopefully the final) part of a series of my continuing
refactors of the DNA Infuser. This PR represents a "quality pass" which
should also iron-out the rest of the most impactful bugs.

Granular list of changes:
- This PR adds unit tests for the DNA Infuser organs and
`/datum/status_effect/organ_set_bonus` as recommended by @AnturK
- I noticed that the base `/datum/infuser_entry` was being used in the
machine for the Fly and "rejected" infusions, whereas usually we would
expect it to be a base type used only as a development template. I
corrected this issue and created `/datum/infuser_entry/fly` to be used
for that use-case instead.
- Added `/mob/proc/can_mutate()` and `/mob/living/carbon/can_mutate()`
to replace a few copied lines across several files. The proc is normally
used in the context of mutating a Human via their DNA.
- I fixed a ton of typos in organ-related code, specifically where
"receiver" was typo'd as "reciever". There are far more of those typos,
but I limited the scope of my changes to organs.
- I noticed a bug in `/datum/species/proc/regenerate_organs` wherein a
race condition caused an organ to remove itself before it's done
inserting itself. This happens because the Fly organ set bonus runs
`regenerate_organs` which calls `Remove` on the organ while `Insert` is
still in the call-stack. I added `INVOKE_ASYNC` as a workaround, and
also changed the order the signals are emitted to prevent future bugs.
This bug primarily only impacted the flyperson species transformation,
which was part of the DNA Infuser's flyperson infusion organ set bonus.
- In my last refactor PR #72745 I also introduced a bug in
`/obj/machinery/dna_infuser/proc/infuse_organ` wherein I forgot to add
the usage of `new` when attempting to implant new organs, and this PR
fixes the erroneous code.
- Fxed a bug which causes the organ set bonus to activate when mixing
organs from different sources, which is caused by a developer oversight
wherein all `/datum/status_effect/organ_set_bonus` had identical IDs.
- Added a cleaner `replacetext`-based way of handling pronouns in
`/datum/element/noticable_organ/proc/on_receiver_examine`, using custom
macros `%PRONOUN_S` and `%PRONOUN_ES` as advised by @MrMelbert
- This PR also fixes #72767

With the changes in this PR the machine will finally work as we expect
it to. By adding unit tests we will also be able to ensure that it works
as expected from now on. I feel confident saying that the completeness,
algorithmic correctness, and code health of the DNA Infuser is much
better than it was before.

🆑 A.C.M.O.
fix: Fully fixed the DNA Infuser, which will now infuse organs as
expected.
fix: Fixed flyperson species transformation and organ set bonus, which
was throwing a runtime.
fix: Fixed many typos in organ-related source code.
/🆑

---------

Co-authored-by: Time-Green <timkoster1@hotmail.com>

* *shrug

* Uncommented the line Gandalf wanted uncommented

* Properly fixes CI on this one, hopefully.

---------

Co-authored-by: Dani Glore <fantasticdragons@gmail.com>
Co-authored-by: Time-Green <timkoster1@hotmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2023-03-17 18:29:15 -04:00
SkyratBot
37953d4bcf [MIRROR] Makes Lesser Form into one ability & unit tests it [MDB IGNORE] (#19521)
* Makes Lesser Form into one ability & unit tests it

* Update headcrab.dm

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-10 06:08:19 +00:00
SkyratBot
7f29afc8ec [MIRROR] Refactors species mutanthands into human component [MDB IGNORE] (#19355)
* Refactors species mutanthands into human component

* wew

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-10 02:39:41 +00:00
SkyratBot
f5e63175ec [MIRROR] Fixes all antag datum moodlets being removed when any single antag datum is removed [MDB IGNORE] (#19237)
* Fixes all antag datum moodlets being removed when any single antag datum is removed (#73305)

## About The Pull Request

All antag datums operated under the `antag_moodlet` mood category, which
is clearly an issue when you can (and commonly) have multiple antag
datums of different types on your mob.

New antag datums of different type will now no longer override older
antag datum moodlets, now they will stack. This means traitor
revolutionaries are the most zealous folk on the station.

This has a few potential oversights down the line:
- Someone adds an antag datum players can have duplicates of, and also
has a moodlet associated
- Re-used moodlets in antag datums that can easily be stacked will be
noticed
- Most solo antags used `focused` right now, but none can stack outside
of admemes

But I don't think it's an issue for now.

## Why It's Good For The Game

Prevents a quick revolution from stripping you of your joy.

Fixes #67313

## Changelog

🆑 Melbert
fix: Revolutionary Heretics and Cultists Traitors no longer lose all of
their joy in life after being de-converted from their respective causes.
/🆑

* Fixes all antag datum moodlets being removed when any single antag datum is removed

* fix

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
2023-03-03 06:28:53 +00:00
SkyratBot
fce25b931a [MIRROR] Fixes an issue with nightmare revival, Unit tests some fully heal stuff [MDB IGNORE] (#19599)
* Fixes an issue with nightmare revival, Unit tests some fully heal stuff (#73612)

## About The Pull Request

- Same issue as Ethereals. Owner was `null`ed because the heart was
recreated. I opted for a more permanent solution, that being introducing
a new flag to avoid recreating organs.

- Adds some unit tests for fully heal stuff to make sure it works.

## Why It's Good For The Game

More cases of revival working as expected

## Changelog

🆑 Melbert
fix: Nightmare revival acts less funky - stops it from re-creating the
Light Eater.
/🆑

---------

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

* Fixes an issue with nightmare revival, Unit tests some fully heal stuff

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
2023-03-01 01:15:12 -08:00
SkyratBot
db625af910 [MIRROR] Optimize cardboard cutouts saving 1.5s+ on init times [MDB IGNORE] (#19435)
* Optimize cardboard cutouts saving 1.5s+ on init times (#73404)

New regression in init times. Closes
https://github.com/tgstation/dev-cycles-initiative/issues/32. CC @ Fikou

- Instead of creating a human and icon for *every* cardboard cutout when
initialized, only creates the one we're actually using. When you're
about to use a crayon, creates all of them.
- Instead of using getFlatIcon, uses appearances directly.

* Optimize cardboard cutouts saving 1.5s+ on init times

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-02-19 22:52:00 +00:00
SkyratBot
dfbaf63d71 [MIRROR] Fix underlying armor logic and fix bug with constructed ripleys having zero armor [MDB IGNORE] (#19310)
* Fix underlying armor logic and fix bug with constructed ripleys having zero armor (#73319)

## About The Pull Request

See title
## Why It's Good For The Game

Messed up one of the armor procs; it changed the given values but never
carried over existing values.
So you would end up with an armor of that one specific value and nothing
else.

This wasn't actually used anywhere other than mecha, lava burning, and
sentient viruses, so the issue isn't that bad.
It's still an issue however.
## Changelog
🆑
fix: Mechs no longer have zero armor when built.
/🆑

* Fix underlying armor logic and fix bug with constructed ripleys having zero armor

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-02-12 22:17:07 -08:00
SkyratBot
1fe0d145a3 [MIRROR] Converts blindness and nearsightedness to status effects, scratches some VERY dumb blindness handling that resulted in mobs becoming "incurably" blind [MDB IGNORE] (#18760)
* Converts blindness and nearsightedness to status effects, scratches some VERY dumb blindness handling that resulted in mobs becoming "incurably" blind

* Fixes the conflicts and makes shit compile!

* Fixes other things that didn't show up because I hadn't updated

* Fixes the lints.

* Okay NOW it's ready (please don't add anything else that touches blindness I beg you)

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2023-02-03 16:08:32 -05:00
Funce
60bfb76832 [MIRROR] Dynamic Human Icon Generation For Simple/Basic Mobs (& Cardboard Cutouts) [MDB IGNORE] (#18884)
* Dynamic Human Icon Generation For Simple/Basic Mobs (& Cardboard Cutouts) (#72517)

revive of #68760
this time a proc, not an element
this time supports cardboard cutouts
this time supports mob corpses

![image](https://user-images.githubusercontent.com/23585223/211064291-81070650-189f-4afa-8116-81b687e3ea35.png)

prevents these icons ever being outdated, they'll always look what they
are supposed to, saves spriting work

🆑 Fikou, a hood by Viro
refactor: humanoid mobs and cardboard cutouts automatically generate
their sprites, they no longer will be outdated
/🆑

Co-authored-by: Time-Green <timkoster1@hotmail.com>

* Modular!

* Fix signal override merge skew (#72882)

Caused by https://github.com/tgstation/tgstation/pull/72517, with
https://github.com/tgstation/tgstation/pull/72561 raising an error that
was being hidden before

This changes equip logic somewhat so that set_wearer was being called
twice.

I don't think this should be being run in visualsOnly at all, as it does
a ton of stuff like registering signals, updating UI, etc etc etc. Don't
have time to investigate further.

---------

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@hotmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-01-27 13:56:00 -05:00
GoldenAlpharex
86dc0cdf65 [MIRROR] Water will now make you wet (#72844) (#18888)
Water will now make you wet (#72844)

Water, when exposed to a mob either via `TOUCH` or `VAPOR` application,
will now apply wet stacks to said mob according to the amount of water
used. For touch application, the ratio is 0.5 wet stack per unit of
water, whereas for vapor application (so for foam and sprays), that
ratio is lowered to 0.1 wet stack per unit of water. Yes, that would
mean that you could now put someone out by spraying enough water at them
with a spray bottle (usually around 50-150u), and I think that is quite
simply hilarious.

I also updated the unit test of water's `expose_mob()` proc, to check
that wet stacks were being applied properly, hopefully making sure that
there's no regression on that part in the future.
2023-01-22 16:20:02 -08:00
SkyratBot
78cc603187 [MIRROR] Fixes strange geyser and geyser regen [MDB IGNORE] (#18808)
Fixes strange geyser and geyser regen (#72221)

Called the random reagent code after it was initialized
Registered the reagent del/remove signal on the geyser, not the reagent
datum of the geyser

Closes #72037 

🆑
fix: Strange geysers have random reagents again
fix: Geysers regen reagents again
/🆑

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2023-01-19 15:27:26 -05:00
Tastyfish
c44843b738 [MANUAL MIRROR] Abstract away stuff that acts on baseturfs directly into their own procs, and kills some dead code related to baseturfs + tests (#72117) (#18655)
Abstract away stuff that acts on baseturfs directly into their own procs, and kills some dead code related to baseturfs + tests (#72117)

Adds some new procs relating to baseturfs that replaces some code that
reads and sets them directly. Moves them to their own file. **To
reviewers: Any proc in baseturfs.dm that is snake_case is mine, anything
else is just moved**.

Adds tests for the existing procs of baseturfs.

I'm going to be doing some optimizations to baseturfs that change the
actual representation of baseturfs, and so I'm prepping these to be
implementation agnostic.

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-01-12 12:18:28 -08:00
SkyratBot
509b89f45c [MIRROR] Contextual tutorials for swapping hands and dropping items [MDB IGNORE] (#18604)
* Contextual tutorials for swapping hands and dropping items

* Fixes

* Oops

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
2023-01-10 14:26:08 +01:00
SkyratBot
be18901411 [MIRROR] [ready] unit tests all worn icons [MDB IGNORE] (#18491)
* [ready] unit tests all worn icons (#72370)

Fixes #71692

🆑 ShizCalev
code: Added a unit test for ALL worn icons.
fix: Fixed a bunch of broken worn icons!
/🆑

* [ready] unit tests all worn icons

* Should have fixed most of the failures now

* Here, hopefully that should fix what was left

* Okay maybe it just hadn't been fixed yet

* I can be a bit dumb sometimes

* Okay, now it's going to work, I promise

* I'm so tired of this

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2023-01-09 21:10:28 -05:00
Tastyfish
01b1dafbf8 [MIRROR][Cherrypicked] Reworks how legs are rendered yet again because it was very convaluted i hated it (#18557)
* Reworks how legs are rendered yet again because it was very convaluted i hated it

* merge conflicts

* correct comment

* Fixes husk appearances not working, adds a screenshot test for it (#72190)

## About The Pull Request

Fixes #72159

Before this proc used to early return when the limb was husked
The leg refactor changed it to no longer early return and as a result it
overrided the generated husk icon with a normal limb icon
So I just wrapped even more of the proc in `!is_husked`, since like most
of it is not supposed to run

Screenshot tests husks too

## Why It's Good For The Game

Husks are good(?)

## Changelog

🆑 Melbert
fix: Husked bodies look husked again
/🆑

Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-01-07 23:35:56 -08:00
SkyratBot
cf660f2b1e [MIRROR] Unit Tests Door/Airlock Access Working [MDB IGNORE] (#18568)
* Unit Tests Door/Airlock Access Working (#72461)

I screwed up with my access changes (on my local, I made sure I could
still open doors rather than be kept out of places), and #72458 fixes
that. However, let's also add a unit test to prevent that regression
again. We just do five different access "checks", and see if all five
different scenarios should work as intended.

As you can see, this PR will not pass unit tests. This is supposed to
happen, because at the time of this PR is opened, we will be in a
regression state that the aforementioned PR fixes. When the
aforementioned PR is merged, it should clear CI without any difficulties
(I know this because I ran the unit test myself)

* Unit Tests Door/Airlock Access Working

Co-authored-by: san7890 <the@san7890.com>
2023-01-07 08:29:10 -08:00
SkyratBot
625b66bd0c [MIRROR] Refactors bar drink icons into datum singletons / unit tests them [MDB IGNORE] (#18140)
* Refactors bar drink icons into datum singletons / unit tests them (#71810)

- Refactors bar drink icons.
- Juice boxes no longer have a hard-coded list of a bunch of reagent
types in their update state, and use a system similar to bar drinks.
- Glass and shot glass icon information are no longer stored on the
drink. Instead, they are now stored in glass style datums. These datums
store name, description, icon, and icon state of a certain container +
reagent type.
- Glass styles are applied via the `takes_reagent_appearance` component.
Glasses, shot glasses, and juice boxes have this component.
- This comes with support for being able to have drink icons from
different files, rather than requiring the drinks DMI.
- The britmug is now a subtype of mug.
   -  1 new icon: britmug filled.
- Various small code clean-up around drink reagents.
- Unit tests icon state setups for glass styles as well as all `/drink`
reagent container subtypes.
- Splits up the massive `drinks.dmi` into separate files.

*Disclaimer: Much of the drinking glass datums were written via script
automatically, so there may be errors present.*

- Much easier to add new drink styles, much more modular.
- It is no longer necessary for new drinks to be added to the massive
`drinks.dmi`. People working with drinks in the future can simply add
their glass style datum and point it to their file wherever it may be.
- Expandable system. Adding a new type of reagent container that works
similarly to bar drinks but for different types of icons is a breeze.
- Ensures going forward no bar drinks have invisible sprites.

🆑 Melbert
refactor: Refactored how bar drinks set their icons. Juice boxes now use
the same system.
/🆑

* Well that's all of them, unit tests prove me wrong

* now its a mapping pr lmao

* SHUT THE FUCK UP

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
2023-01-04 09:10:12 -08:00
SkyratBot
5c6c91144c [MIRROR] Changes the missing food icon test to cover ALL /obj's [MDB IGNORE] (#18139)
* Changes the missing food icon test to cover ALL /obj's

* Update implant.dm

* Hopefully fixes all the failing integration tests!

* Fixes more missing icons

* Even more icon fixes

* Hopefully that was all of them

* Okay now SURELY that's all of them

* I'm tired of this shit man

* Hopefully that's all, for real this time!

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-12-28 19:30:05 -05:00
SkyratBot
5ffc3c2dc8 [MIRROR] Fixes cursed duffelbag's permanent curse (again), unit tests it. [MDB IGNORE] (#18146)
* Fixes cursed duffelbag's permanent curse (again), unit tests it. (#71969)

## About The Pull Request

Curse of hunger did some funky stuff by checking for
`slot_equipment_priority` (which ONLY BUCKETS use) and registering
certain signals based on that

The signals they were using instead didn't pass the unequipper, so the
curse never got removed on unequip.

Replaced them with just equip and drop, as equipped and dropped work
just fine for it.

Unit tests this.

## Why It's Good For The Game

Infinite curse of clumsy and pacifism is kinda bad

## Changelog

🆑 Melbert
fix: Dufflebag Curse no longer lasts forever after the bag is destroyed.
fix: Dufflebag Cursing someone already afflicted properly doesn't try to
add the curse again
/🆑

* Fixes cursed duffelbag's permanent curse (again), unit tests it.

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-12-14 22:39:53 -08:00
SkyratBot
14b5fd6134 [MIRROR] Allows for offloaded tests to be focused [MDB IGNORE] (#17977)
* Allows for offloaded tests to be focused (#71719)

Focusing a test through TEST_FOCUS allows you to only run that one test.
It's very useful for developing. However, we have a bunch of offloaded
tests in `#ifdef UNIT_TESTS` that would not be focused. This changes it
so that those tests will now only run if either no test is focused, or
if their specific "focus only" test is focused.

This is done through a `PERFORM_ALL_TESTS` macro that replaces the
`#ifdef UNIT_TESTS`. This is completely free because `if (FALSE)`
constant folds.

Hide whitespace mode recommended.

* Allows for offloaded tests to be focused

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-09 03:52:12 +00:00
SkyratBot
13e3929ba1 [MIRROR] Food icon unit test [MDB IGNORE] (#17979)
* Food icon unit test (#71765)

I'm tired of #71736 happening

Closes #71743

![image](https://user-images.githubusercontent.com/6209658/205794116-bd87a14f-c3db-460e-8c1d-438fe9284e04.png)

* Food icon unit test

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2022-12-09 03:51:05 +00:00
SkyratBot
7fbcd4901b [MIRROR] New Station Trait: Cybernetic Revolution + Body Purist Quirk [MDB IGNORE] (#17472)
* New Station Trait: Cybernetic Revolution + Body Purist Quirk

* Mirror!

* A hidden lint!

* Properly fixes this, and ensures that it has no impact on the game should it ever be bussed in for whatever reason

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-12-01 17:09:54 -05:00
SkyratBot
4508a1cbf5 [MIRROR] Fixes dragons not dropping their consumed mobs on despawn [MDB IGNORE] (#17792)
* Fixes dragons not dropping their consumed mobs on despawn (#71537)

## About The Pull Request

This was fixed a while back, but was accidentally reverted / regressed
due to a refactor

Basically, the dragon needs to be killed before being deleted, being
killed will drop all of their stuff and handle "dragon is dead" events,
then it can be fully deleted and removed as expected

Unit tests it, since this is a regression

Fixes #71536

## Why It's Good For The Game

Having a lot of mobs deleted is kinda really bad

## Changelog

🆑 Melbert
fix: Fixes dragon despawn deleting all the people they consumed
/🆑

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

* Fixes dragons not dropping their consumed mobs on despawn

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
2022-12-01 01:01:42 +00:00
SkyratBot
3f5f271988 [MIRROR] Strange Reagent correctly revives station pets, (and humans), correctly again. [MDB IGNORE] (#17723)
* Strange Reagent correctly revives station pets, (and humans), correctly again.

* Update code/modules/mob/living/carbon/carbon_update_icons.dm

* centaur shitcode

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-28 12:24:54 -05:00
SkyratBot
1132a363ae [MIRROR] Revert "Unit tests radio, saymode, and language prefix keys" [MDB IGNORE] (#17793)
* Revert "Unit tests radio, saymode, and language prefix keys" (#71474)

Reverts tgstation/tgstation#71328 (@ Zonespace27 )

Departmental shorthand (.h/:h) is a convenience alias that should apply
to all jobs and all race types and all classifications. ITS SUPPOSE TO
FUCKING CONFLICT.

if you are ai and not in a holopad, it should go to binary.

if you are ai and in a holopad, it should go to the holopad.

if you are borg it should go to binary

if you are xeno it should go to alien

Removing it from the AI over a stupid need to made universal broad
reaching rules that can be declared upon the code was stupid.

This entire unittest is needlessly overboard and over generic putting
"rules" that are not backed up by logic on the codebase in a way that
hinders making good UX, not help.

The datumized saymode system not being able to handle this complexity
when the old hardcoded system could is a problem with the datumized
saymode system and not the fucking :h shortcut for holopad.

🆑 Common fucking sense
fix: The changes to Mafia and holopad say prefixes was reverted.
spellcheck: Mafia changeling say prefix has no longer been changed to
.1, and has been returned to .j
spellcheck: AI Holopad say has no longer been changed to .2, and has
been returned to .h
/🆑

* Revert "Unit tests radio, saymode, and language prefix keys"

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2022-11-28 06:30:50 +00:00
SkyratBot
78c1b9f456 [MIRROR] [MDB Ignore] Unit Tests for Invalid Space Turfs (Area Bullshit Edition) [MDB IGNORE] (#17626)
* [MDB Ignore] Unit Tests for Invalid Space Turfs (Area Bullshit Edition)

* should probably make tests pass

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Paxilmaniac <paxilmaniac@gmail.com>
2022-11-25 16:29:20 -05:00
Zephyr
136875a120 JSON Savefile port (#17607)
* JSON Savefiles | Player Saves use JSON

* few fixups

* yeah this will need a migration in the future to use a different tree for skyrat stuff

* this can be null

* forgot to sanitize these ones

* TM st

* get it working

* Update code/modules/client/preferences_savefile.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-11-24 20:55:17 -05:00
SkyratBot
93a9440a70 [MIRROR] Unit tests radio, saymode, and language prefix keys [MDB IGNORE] (#17650)
* Unit tests radio, saymode, and language prefix keys (#71328)

## About The Pull Request
This PR unit tests radio/saymode prefixes together, and language
prefixes on their own, for any possible overlaps and duplicates

Moved mafia saymode key to :1 and holopad key to :2, we're running out
of radio keys and i'm too afraid to move to 2-letter

## Why It's Good For The Game
1. Unit tests are good
2. https://github.com/tgstation/tgstation/pull/71326 this is bad

🆑
spellcheck: Mafia changeling say prefix is now :1, and holopad say is
now :2
/🆑

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

* Unit tests radio, saymode, and language prefix keys

* guild now uses :p

Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
2022-11-22 13:43:51 -05:00
SkyratBot
03d42cb507 [MIRROR] Unit Tests Overstuffing Reagent Containers with more than their defined volume [MDB IGNORE] (#17578)
* Unit Tests Overstuffing Reagent Containers with more than their defined volume (#71327)

## About The Pull Request

Simple Unit Test that seeks to ensure that we don't put too much of a
reagent in a container when the container doesn't have enough volume to
accept all of it. Nothing bad would happen, but it's just silly really.

I also fixed all of the instances that this was broken in.
## Why It's Good For The Game

Prevents buggy regressions, such as those found in #71206.

```txt
[2022-11-18 03:32:30.736]     FAILURE #1: Canned Laughter (/obj/item/reagent_containers/cup/soda_cans/canned_laughter) has 50 units of reagents, but only 30 units of space. at code/modules/unit_tests/container_sanity.dm:21
 -     FAILURE #2: T-Borg's tonic water (/obj/item/reagent_containers/cup/soda_cans/tonic) has 50 units of reagents, but only 30 units of space. at code/modules/unit_tests/container_sanity.dm:21
 -     FAILURE #3: The soda water (/obj/item/reagent_containers/cup/soda_cans/sodawater) has 50 units of reagents, but only 30 units of space. at code/modules/unit_tests/container_sanity.dm:21
```
## Changelog

🆑
fix: Canned Laughter, T-Borg's Tonic Water, and Soda Water cans should
all come with the expected marketed 50 units of goodness, rather than
cheaping out on materials for only 30 units of can volume.
/🆑

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

* Unit Tests Overstuffing Reagent Containers with more than their defined volume

* fix SR containers

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-21 16:24:49 -05:00
SkyratBot
24eb8217c0 [MIRROR] Builds logic that manages turfs contained inside an area [MDB IGNORE] (#17379)
* Builds logic that manages turfs contained inside an area

* Mirror Conflict

* Modular!

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-16 14:42:22 -05:00
SkyratBot
5c54f74b9c [MIRROR] /mob/living/simple_animal is now frozen. Add a unit test to block all new simple_animal subtypes. [MDB IGNORE] (#17057)
* /mob/living/simple_animal is now frozen. Add a unit test to block all new simple_animal subtypes. (#70669)

* Add a unit test to block all new simple_animal subtypes

* Remove TEST_FOCUS

* Just To Be Sure

* /mob/living/simple_animal is now frozen. Add a unit test to block all new simple_animal subtypes.

* Whitelist! Begin!

* Really

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
Co-authored-by: Funce <funce.973@gmail.com>
2022-11-14 23:49:17 -05:00
SkyratBot
0c6a40910d [MIRROR] Save 0.4s by shaving off a lot of smaller init costs [MDB IGNORE] (#17382)
* Save 0.4s by shaving off a lot of smaller init costs

* update modular

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-11-09 14:52:58 +00:00
SkyratBot
2582117684 [MIRROR] NtOS Emojipedia - PDA Emoji Messaging For All [MDB IGNORE] (#17402)
* NtOS Emojipedia - PDA Emoji Messaging For All (#70829)

An Emojipedia app has been added to tablets, given to Mimes and Curators by default, allowing anyone to know all emojis. Additionally, emojis can be used in tablets by every job now.

* NtOS Emojipedia - PDA Emoji Messaging For All

* update emoji list to be valid

* animated emojis

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-06 21:53:25 -05:00
SkyratBot
b2aec95405 [MIRROR] Monkey Business Unit Test [MDB IGNORE] (#17186)
* Monkey Business Unit Test (#70722)

* monkeying around

* 🤷

* haha oops

Co-authored-by: san7890 <34697715+san7890@ users.noreply.github.com>

* I'm an idiot

* redo this and add a blackboard to allow targeting monkies

* I'm smart

* requested changes

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

* a few fixups

* Update code/modules/unit_tests/_unit_tests.dm

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

* Nits

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

* Monkey Business Unit Test

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: san7890 <34697715+san7890@ users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
2022-10-28 21:57:59 -04:00
SkyratBot
ffb2324b0c [MIRROR] Adds unit test for items that can be equipped to suit storage slots that are missing sprites [MDB IGNORE] (#17195)
* Adds unit test for items that can be equipped to suit storage slots that are missing sprites (#70643)

* Adds unit test for items that can be equipped to suit storage slots that are missing sprites

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2022-10-26 22:03:07 -04:00
SkyratBot
7522903c16 [MIRROR] Seven Billion Hour Wait Time - Or, Expanded Job Config (TOML time) [MDB IGNORE] (#16962)
* Seven Billion Hour Wait Time - Or, Expanded Job Config (TOML time)

* conflict

* update modular

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-10-22 08:11:56 -07:00
SkyratBot
cd6af92f8d [MIRROR] Changing species now maintains Brain traumas, Cybernetic implants, Liver traits, organ damage, and Heretic Living Heart [MDB IGNORE] (#17049)
* Changing species now maintains Brain traumas, Cybernetic implants, Liver traits, organ damage, and Heretic Living Heart (#70530)

About The Pull Request

    Implements additional code in before_organ_replacement in additional places, to better maintain cohesion when species changes take place.
        Brain traumas will now carry over on species change
        Having synthetic / cybernetic organs will now carry over on species change
        Liver job traits will also carry over on species change
        Organ damage will, in most cases, carry over on species change (only if the new organ is identical to the old)
        The heretic's Living Heart will attempt to carry over to species change, if it's valid
            Some species will still not, as it will attempt to give heart -> liver or something and be invalid

    Heretic Living Heart is now a cooldown action. Still not really content with the current state of it, it could use some improvements.

Fixes #42308
Fixes #35539
Fixes #69574

Why It's Good For The Game

Removes a lot of exploits involving using forced species change to get rid of stuff like quirks / permanent brain traumas and similar.

* Changing species now maintains Brain traumas, Cybernetic implants, Liver traits, organ damage, and Heretic Living Heart

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-10-21 10:43:09 +01:00