Commit Graph

161 Commits

Author SHA1 Message Date
SkyratBot
22854490e7 [MIRROR] Replaces US Indigenous People's Day with International Indigenous People's Day (#2356)
* Replaces US Indigenous People's Day with International Indigenous People's Day (#55458)

Title. This modifies a unit test that tested the holiday I'm removing to test mother's day instead, as International Indigenous People's Day isn't an nth week holiday.

* Replaces US Indigenous People's Day with International Indigenous People's Day

Co-authored-by: interestingusernam3 <51925758+interestingusernam3@users.noreply.github.com>
2020-12-29 02:38:46 +00:00
SkyratBot
356bc047a4 [MIRROR] Add Designs Unit Test (#2352)
* Add Designs Unit Test (#55760)

* Add Designs Unit Test

Co-authored-by: Gamer025 <33846895+Gamer025@users.noreply.github.com>
2020-12-29 02:38:18 +00:00
SkyratBot
312a312dc6 [MIRROR] Fix Hanukkah (again) and refactor Moth Week and Beer Day (#2200)
* Fix Hanukkah (again) and refactor Moth Week and Beer Day (#55532)

* Fix Hanukkah (again) and refactor Moth Week and Beer Day

* Remove unnecessary changes

* Fix Hanukkah (again) and refactor Moth Week and Beer Day

Co-authored-by: Jack LeCroy <3073035+jacklecroy@users.noreply.github.com>
2020-12-17 08:05:26 +01:00
SkyratBot
548ed09ed1 [MIRROR] Temperature control unit (#2154)
* Temperature control unit

* Update tgui.bundle.js

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2020-12-13 13:54:41 +00:00
SkyratBot
afce3e2a94 [MIRROR] pass_flags handling refactor + rewrites a part of projectiles for the n-th time (#2097)
* pass_flags handling refactor + rewrites a part of projectiles for the n-th time (#54924)

Yeah uhh this'll probably need testmerging even after it's done because yeah it's a bit big.
If y'all want me to atomize this into two PRs (pass flags vs projectiles) tell me please. Pass flags would have to go in first though, in that case, as new projectile hit handling will rely on pass_flags_self.
Pass flags:

Pass flags handling now uses an atom variable named pass_flags_self.
If any of these match a pass_flag on a thing trying to pass through, it's allowed through by default.
This makes overriding CanAllowThrough unnecessary for the majority of things. I've however not removed overrides for very.. weird cases, like plastic flaps which uses a prob(60) for letting PASSGLASS things through for god knows why.
LETPASSTHROW is now on pass_flags_self
Projectiles:

Not finalized yet, need to do something to make the system I have in mind have less unneeded overhead + snowflake

Basically, for piercing/phasing/otherwise projectiles that go through things instead of hitting the first dense object, I have them use pass_flags flags for two new variables, projectile_phasing and projectile_piercing. Anything with pass_flags_self in the former gets phased through entirely. Anything in the latter gets hit, and the projectile then goes through. on_hit will also register a piercing hit vs a normal hit (so things like missiles can only explode on a normal hit or otherwise, instead of exploding multiple times. Not needed as missiles qdel(src) right now but it's nice to have for the future).

I still need to decide what to do for hit handling proper, as Bump() is still preferred due to it not being as high-overhead as something like scanning on Moved(). I'm thinking I'll make Moved() only scan for cases where it needs to hit a non-dense object - a prone human the user clicked on, anything special like that. Don't know the exact specifics yet, which is why this is still WIP.

Projectiles now use check_pierce() to determine if it goes through something and hits it, doesn't hit it, or doesn't go through something at all (should delete self after hitting). Will likely make an on_pierce proc to be called post-piercing something so you can have !fun! things like projectiles that go down in damage after piercing something. This will likely deprecate the process_hit proc, or at least make it less awful.

scan_for_hit() is now used to attempt to hit something and will return whether the projectile got deleted or not. It will delete the projectile if the projectile does hit something and fails to pierce through it.

scan_moved_turf() (WIP) will be used for handling moving onto a turf.

permutated has been renamed to impacted. Ricocheting projectiles get it reset, allowing projectiles to pierce and potentially hit something again if it goes back around.

A new unit test has been added checking for projectiles with movement type of PHASING. This is because PHASING completely causes projectiles to break down as projectiles mainly sense collisions through Bump. The small boost in performance from using PHASING instead of having all pass flags active/overriding check_pierce is in my opinion not worth the extra snowflake in scan_moved_turf() I'd have to do to deal with having to check for hits manually rather than Bump()ing things.
Movement types

UNSTOPPABLE renamed to PHASING to better describe what it is, going through and crossing everything but not actually bumping.
Why It's Good For The Game

Better pass flags handling allows for less proc overrides, bitflag checks are far less expensive in general.

Fixes penetrating projectiles like sniper penetrators

This system also allows for better handling of piercing projectiles (see above) without too much snowflake code, as you'd only need to modify on_pierce() if you needed to do special handling like dampening damage per target pierced, and otherwise you could just use the standardized system and just set pass flags to what's needed. If you really need a projectile that pierces almost everything, override check_pierce(), which is still going to be easier than what was done before (even with snowflake handling of UNSTOPPABLE flag process_hit() was extremely ugly, now we don't rely on movement types at all.)

* pass_flags handling refactor + rewrites a part of projectiles for the n-th time

Co-authored-by: silicons <2003111+silicons@users.noreply.github.com>
2020-12-09 23:44:54 +01:00
SkyratBot
ddbcca4de3 [MIRROR] Fix nth week holidays (#2061)
* Fix nth week holidays (#55364)

 fix: Holidays appearing on the nth day of the month like Thanksgiving will work now.
tweak: Columbus day is now called Indigenous Peoples' Day.

* Fix nth week holidays

Co-authored-by: Jack LeCroy <3073035+jacklecroy@users.noreply.github.com>
2020-12-07 10:32:35 +00:00
SkyratBot
2913364658 [MIRROR] Kills oldfood, Puts newfood on top. (#2041)
* Kills oldfood, Puts newfood on top. (#55160)

Slays the last of old-food, making new-food the new normal.

Co-authored-by: MrMelbert <kmelbert4@ gmail.com>
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>

* Kills oldfood, Puts newfood on top.

* Update collars.dm

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
Co-authored-by: MrMelbert <kmelbert4@ gmail.com>
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-12-04 16:46:26 +01:00
SkyratBot
2d58d386ef [MIRROR] Migrate some docs from the GitHub wiki into the repository (#2027)
* Merge pull request #55268 from AutomaticFrenzy/patch/docs-from-github-wiki

Migrate some docs from the GitHub wiki into the repository

* Migrate some docs from the GitHub wiki into the repository

Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>
2020-12-03 17:16:02 +00:00
SkyratBot
7ea03fcebc [MIRROR] Make unit tests visible to linter and IDE (#2006)
* Make unit tests visible to linter and IDE (#55270)

* Make unit tests visible to linter and IDE

Co-authored-by: Tad Hardesty <tad@platymuus.com>
2020-12-02 07:51:28 +00:00
SkyratBot
c487c73f39 [MIRROR] Grep for space indentation (#1969)
* Grep for space indentation

* aa

* Update species.dm

* Update species.dm

* Update maps.dm

* Update examine.dm

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-12-01 12:26:41 +01:00
SkyratBot
2cf928b280 [MIRROR] Init sanity unit test (#1980)
* Init sanity unit test (#55147)

https://github.com/tgstation/TerraGov-Marine-Corps/pull/5326
Stemming from
https://github.com/ParadiseSS13/Paradise/pull/14770

Basically it just checks for bad initialize calls

* Init sanity unit test

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2020-11-30 23:01:45 +00:00
SkyratBot
38bab4eecd [MIRROR] Kills the quickswap shortcut (#1923)
* Kills the quickswap shortcut (#55209)

* Kills the quickswap shortcut

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2020-11-29 16:07:15 +00:00
SkyratBot
926c5f519b [MIRROR] Fixes incapacitating sleep test failure, general test touch ups. (#1890)
* Fixes incapacitating sleep test failure, general test touch ups. (#55196)

Fixes the random incapacitating sleep test failure
Tests now provide the option to use a custom turf, by default uses plasteel tiles instead of space
Tests now reserve turf instead of just using a corner in CentCom (which had unaccounted for tiles)

* Fixes incapacitating sleep test failure, general test touch ups.

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-11-28 12:52:18 +01:00
SkyratBot
18bdebef43 Merge type variable fixes and unit test (#1867)
Co-authored-by: Arkatos1 <43862960+Arkatos1@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2020-11-27 07:46:43 +00:00
SkyratBot
65368300d2 [MIRROR] Refactors Pastries into newfood. (#1824)
* Refactors Pastries into newfood. (#54996)

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
Co-authored-by: Floyd <Floydje123@ hotmail.com>

* Refactors Pastries into newfood.

* Update collars.dm

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
Co-authored-by: Floyd <Floydje123@ hotmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2020-11-25 01:02:00 +00:00
SkyratBot
2a0cc258ee [MIRROR] Fixes #55112 - Swapping items no longer eats things (#1823)
* Fixes #55112 - Swapping items no longer eats things (#55122)

Quick swapping items no longer hides them in the mobs contents

* Fixes #55112 - Swapping items no longer eats things

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-11-25 00:01:00 +00:00
SkyratBot
7d653f1f6b [MIRROR] Moves grown food to newfood (#1794)
* Moves grown food to newfood (#55040)

Moves grown food to newfood
Gives trash element support for callbacks for item creation override

* Moves grown food to newfood

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
2020-11-23 22:35:35 +00:00
SkyratBot
51fa2dfd84 [MIRROR] Fix nearsighted glasses being able to be neutered with quick swap (#1772)
* Fix nearsighted glasses being able to be neutered with quick swap (#54916)

You can no longer quick swap another pair of glasses with nearsighted to see perfectly.

Currently you can:

    Choose nearsighted
    Quick swap to another pair of glasses
    See perfectly

This wasn't fixed by Shaps' changes since those call dropped, which do not run through unequip code.
I know one of you is abusing this, show yourself!

* Fix nearsighted glasses being able to be neutered with quick swap

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-11-22 18:22:17 +00:00
SkyratBot
aacccc22d0 [MIRROR] Cache values in TEST_ASSERT_EQUAL and TEST_ASSERT_NOTEQUAL (#1771)
* Cache values in TEST_ASSERT_EQUAL and TEST_ASSERT_NOTEQUAL (#55074)

Previously if a comparison assertion failed, it would re-evaluate the a and b parameters, which could lead to confusing output if the values passed are not fixed or are impure.

* Cache values in TEST_ASSERT_EQUAL and TEST_ASSERT_NOTEQUAL

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-11-22 18:21:56 +00:00
SkyratBot
8e554e846d [MIRROR] Unit tests for heretic knowledge (#1751)
* Unit tests for heretic knowledge (#55022)

* Unit tests for heretic knowledge

Co-authored-by: EdgeLordExe <42111655+EdgeLordExe@users.noreply.github.com>
2020-11-21 07:31:04 +01:00
SkyratBot
1c065882f7 [MIRROR] [ready] Reverts metabolism on stomachs, keep them as important to eating (#1690)
* Reverts metabolism on stomachs, keep them as important to eating (#54632)

* [ready] Reverts metabolism on stomachs, keep them as important to eating

* Merge branch 'master' into upstream-merge-54632

* Update food_reagents.dm

* Update alcohol_reagents.dm

Co-authored-by: NightRed <nightred@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-11-15 06:47:17 +01:00
SkyratBot
49df459863 [MIRROR] Test basic attacks along with the attack chain (#1570)
* Test basic attacks along with the attack chain (#54769)

Tests shoving (as well as the knock down and dropping your item), harming (both with and without an item), and the attack chain.

I can think of a few cases in very recent memory that these have been broken (devil removal breaking melee damage, attack chain breaking due to something else).

Also adds `TRAIT_PERFECT_ATTACKER` which makes your punches always hit. This is currently only used for tests, as they are meant to be reliable.

* Test basic attacks along with the attack chain

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-11-05 00:31:46 +00:00
SkyratBot
9a73dabdc0 [MIRROR] Canister max. pressure capacity display fix (#1477)
* Canister max. pressure capacity display fix (#54600)

Atmos canisters now display their correct max. pressure capacity. Game code always expects kPa, code for SI-prefix-generation only expects the base unit (here: Pa), so the displayed value was always off by the factor 1000.

* Canister max. pressure capacity display fix

Co-authored-by: MadMedicineMan <65600900+MadMedicineMan@users.noreply.github.com>
2020-10-27 09:39:40 +01:00
SkyratBot
0d6453f671 [MIRROR] Teleporter machinery now auto links with each other, removes screwdriver + wirecutter interaction (#1266)
* Teleporter machinery now auto links with each other, removes screwdriver + wirecutter interaction (#54325)

Teleporter machinery will now automatically link with each other. This makes the screwdriver + wirecutter interaction redundant, so it has been removed.

* Teleporter machinery now auto links with each other, removes screwdriver + wirecutter interaction

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-10-12 23:17:29 +02:00
SkyratBot
1dfe6e9e85 [MIRROR] Unit tests for serving trays (#1199)
* Unit tests for serving trays (#54224)

* Unit tests for serving trays

Co-authored-by: NightRed <nightred@gmail.com>
2020-10-08 02:42:27 +02:00
SkyratBot
f3f5ea78ca [MIRROR] Undefine testing only define once tests are finished (#995)
* Undefine testing only define once tests are finished (#53960)

* Undefine testing only define once tests are finished

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-09-26 16:21:43 +02:00
SkyratBot
9dcf9c59fc [MIRROR] Organ removal ends metabolizing reagents in the organ (#768)
* Organ removal ends metabolizing reagents in the organ (#53619)

If an organ contains reagents it will end metabolizing them on removal.

* Organ removal ends metabolizing reagents in the organ

Co-authored-by: NightRed <nightred@gmail.com>
2020-09-12 03:10:03 +02:00
SkyratBot
a669313e10 [MIRROR] Fix chemicals not recognizing end of metabolization (#756)
* Fix chemicals not recognizing end of metabolization (#53550)

* Fix chemicals not recognizing end of metabolization

* Make generic to all organs

* Fix chemicals not recognizing end of metabolization

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-09-11 23:21:10 +02:00
SkyratBot
daf1e33515 [MIRROR] Unit tests for expose_mob (#702)
* Unit tests for expose_mob (#53498)

This is a set of unit tests for expose_mob.
This tests that INGEST, TOUCH, VAPOR, PATCH, INJECT are triggering on standard exposure methods.

* Unit tests for expose_mob

Co-authored-by: NightRed <nightred@gmail.com>
2020-09-09 08:15:57 +02:00
SkyratBot
719e00b682 [MIRROR] Performing a head transplant will now properly preserve the appearance. (#698)
* Performing a head transplant will now properly preserve the appearance. (#53494)

* Performing a head transplant will now properly preserve the appearance.

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-09-09 08:13:54 +02:00
SkyratBot
c6007727cd Many issue fixes for stomachs and chem interactions (#53440) (#671)
This changes the has_reagent check to work with stomachs.
Several supporting procs have been added to fully support this behavior.
end_metabolization will work as expected again
expose is working with INGEST items again
on_mob_add working as intended
on_mob_life has been reviewed and worked over.

Health Analyzers now show stomach contents, same with the medical kiosk.

Included the unit test to validate reagent checks.
Unit tests for the new procs on mob

Co-authored-by: NightRed <nightred@gmail.com>
2020-09-07 04:10:16 +02:00
SkyratBot
f0b3513425 [MIRROR] Add test for emotes (#657)
* Add test for emotes (#53430)

* Add test for emotes

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-09-06 05:53:36 +02:00
SkyratBot
68e50311c9 [MIRROR] Fixes quick swapping suits creating illegal suit storage (#612)
* Fixes quick swapping suits creating illegal suit storage (#53272)

* Fixes quick swapping suits creating illegal suit storage

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-09-02 03:07:32 +02:00
SkyratBot
2bfdfbb910 [MIRROR] Change signature of BINARY_INSERT to require the full type path, add test (#611)
* Change signature of BINARY_INSERT to require the full type path, add test (#53217)

BINARY_INSERT used to only take typepaths like/this. Now, it expects them to be /like/this, to be more consistent with ther est of the code.

Adds documentation to COMPTYPE.

Adds a test for BINARY_INSERT.

* Change signature of BINARY_INSERT to require the full type path, add test

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-09-02 03:07:17 +02:00
SkyratBot
a8476938b3 [MIRROR] Fix resisting not starting stop, drop, and roll (#450)
* Fix resisting not starting stop, drop, and roll (#53079)

* Fix resisting not starting stop, drop, and roll

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-08-21 14:17:11 +01:00
SkyratBot
a8ec5f995e [MIRROR] ACTUALLY fixes circuits disappearing when disassembling machines (#344)
* Actually fix machine disassembly (#52871)

* ACTUALLY fixes circuits disappearing when disassembling machines

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-08-15 00:52:40 +02:00
SkyratBot
c5c00fc6ff [MIRROR] Confusion will no longer continue to confuse after being cured (#213)
* Confusion will no longer continue to confuse after being cured (#52286)

* Confusion will no longer continue to confuse after being cured

* Grammar comment fix

* Move to status effect

* Remove test per request

* Make confusion a status effect, confusion curing now completely neuters the confusion

* set_confusion changes, get_confusion

* Fix confusion going down twice per tick

* Change strength = to proc

* Move procs to status_procs

* Confusion will no longer continue to confuse after being cured

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-08-06 01:02:19 +01:00
Jared-Fogle
dd6e5a96c0 Fix multiple message prefixes being allowed at a time. AKA, you can now start messages with ellipses again. (#52498) 2020-07-26 22:08:27 -04:00
Ryll Ryll
82a44a1a07 Adds unit tests for suffering Wounds (#52491)
* add wound tests

* comment

* clarify

* compromise
2020-07-26 13:39:35 -04:00
ShizCalev
ea351bc9ac Merge pull request #52433 from Jared-Fogle/metabolization-tests
Add unit tests for metabolizing of all reagents and fix the ones that failed
2020-07-24 22:30:15 -04:00
Couls
dc5840dc4e keybind signal support, ported from TGMC (#52219)
* keybind signal support, ported from TGMC

* Thank you linter

* remove unused and extra defines

* move signal defines up and fix emote keybind runtimes

* Apply suggestions

* Update keybinding.dm

* Missed this one in the upstream merge

* Ignore keybindings without names

* back to the OG

* Update living.dm

* Update living.dm

* got it

* trailing newline

* Update code/datums/keybinding/living.dm

Co-authored-by: Rohesie <rohesie@gmail.com>

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-07-22 16:53:27 -04:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
Daniel Hultgren
28958169a1 Added SI unit formatting proc and applied it to canister examine (#52235)
* Added si unit formatting proc, and unit tests for it

* Added canister examine note for what their max pressure is

* Fixed the siunit proc comment abit
2020-07-15 22:29:13 +08:00
Jared-Fogle
ee5b005007 Add tests for outfits, fixes families outfits, Syndicate Ship Captain, and armored bounty hunters (#52210)
* Add tests for outfits, fixes families outfits and Syndicate Ship Captain

* Switch out captain uniform from tacticool to combat

* Consistent styling

* My weakness is I'm a pedant

* Check left and right pockets, and fix armored bounty hunter
2020-07-14 20:06:11 -04:00
Jared-Fogle
4b21913c58 Add unit tests for some surgeries, adds more APIs for unit tests to call (#52093)
* Add unit tests for medical related stuff

* Remove inaccurate assertion
2020-07-09 13:41:59 -04:00
Jared-Fogle
640ed8b5fc Fix pulling people through space breaking the chain (#51997)
Includes a unit test because TDD is good.
Why It's Good For The Game

It makes transport through space with friends much more annoying than it should be.
Changelog

cl
fix: Fixed a bug where when teleporting naturally (such as going through a z-level in space), if you were pulling someone that was then pulling another person, only you and the person you were pulling would make it through.
/cl
2020-07-07 10:48:48 +12:00
LemonInTheDark
eab31fd4d5 Adds some card unit tests, cleans up some comments (#51434)
* Adds unit tests, some more checks, and improves some comments

* sweep sweep sweep?

* Braindamage
2020-06-05 18:46:58 +08:00
Emmett Gaines
1c21534422 Adds a unit test to make sure the id_arg_index is used (#49676) 2020-03-04 00:47:48 +08:00
spookydonut
f3a99558c3 Removes some dead/unused code (#48158)
* cleans up some deadcode

* ancient

* goon icons

* rice and garlic

* more

* last one

* fuuuuuuuuuuuuuuuuuucking subtypes
2019-12-15 14:09:02 -05:00
spookydonut
2591ce17a6 Travis EOF newline detection v3 (#47539)
* scream

* aaa

* aaa

* new one
2019-11-04 19:16:50 -08:00