* Fixes footprint stacking, replace_decal needed to return parent, and just, didn't. I'm not sure where the fuck
this came from, or even how to test for it, but here you are
* Adds a unit test to prevent regressions on this error in future
* Uses TEST_ASSERT_EQUAL instead of TEST_ASSERT
Thank you moth man
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Updates a comment to more accurately describe my pain
* maybe fixes it?
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Ref Tracking: Revengance
Fixes reference tracking ignoring self references due to a poorly thought out tick checking system.
Fixes reference tracking ignoring the contents of assoc lists
Makes the reference tracking printouts actually describe what list the ref is in, rather then just saying "list"
Adds REFERENCE_TRACKING_DEBUG, a define which toggles tracking info for the ref tracking procs, which allows for
oversight on how the proc is working
Allows for direct calls of qdel_and_find_ref_if_fail(), makes it use ref rather then REF(), fixing it breaking
for mobs. (Ditto for the qdel hint which does the same thing)
Moves REAGENTS_TESTING out of the reftracking define block
Makes unit tests define REFERENCE_TRACKING, REFERENCE_TRACKING_DEBUG, and FIND_REF_NO_CHECK_TICK
Adds a unit test that sanity checks the reference finder proc
Security officers will now be paired up together in the same department, across departments. This means that, instead of 4 officers being split across 4 departments, there'll now be 2 groups of 2.
Late-join officers will be put into any department with only 1 officer. If none exist, the least populous department will be chosen, with their preference having priority.
Updates the maps to have more spawns for departmental officers. Delta previously had none, and now has some. Fixed a bug where MetaStation's security departmental officer was a supply one instead.
Removes the "random" departmental preference. All security officers are now given a department. The "none" preference still exists, but just to show that you don't care which department you're put into.
Updates the config to comment out SEC_START_BRIG. This is what the configuration was already on live servers.
This is something that should likely be test merged, but it mucks with savefiles. Luckily, the only damage it does is changing random departments to none, so if a TM is reverted, only that will have to be changed.
* Raises the quantize threshold from 1E-7 to 1E-4.
This makes gas dissipate as expected, and should help with the amount of useless gas floating around the station
at highpop
Adds a garbage_collect() call to the portion of pipeline code where all gasmixes are in one place, this should
clean things up properly.
Changes BREATH_VOLUME from 2 to 1.99. This is imperative
Documents a FUCKING HELLBUG in quantize/breathcode that can lead to breaths just not working sometimes. I'm not
sure how to fix this totally, so I'll document it and pray.
See <https://www.desmos.com/calculator/5icdlnktus>
Adds a unit test to check for this sort of failure.
Addendum for people tweaking this value in the future.
Because o2 tank release values/human o2 requirements are very strictly set to the same pressure, small errors
can cause breakage
This comes from QUANTIZE being used in /datum/gas_mixture.remove(), forming a slight sawtooth pattern of the
added/removed gas, centered on the actual pressure
Changing BREATH_VOLUME can set us on the lower half of this sawtooth, making humans unable to breath at standard
pressure.
There's no good way I can come up with to hardcode a fix for this. So if you're going to change this variable
graph the functions that describe how it is used/how it interacts with breath code, and pick something on the
upper half of the sawtooth
NOTE: I've made this change with a focus on o2 requirements. Changing this will effect other settings, but most
all of them can be ignored, as none will notice.
* Thank you moth man
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Docs the purpose of the breath unit test, and better explains partial pressure
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Adds unit test for spawned food having reagents
- Adds stack trace for biting food failing due to a lack of reagents
- Adds checks for seed var being set under food/grown's initialize() in grown.dm
- Fixes issue with gondola meat code duplicated for penguin meat slabs resulting in a runtime and being unable to slice penguin meat
- Adds seeds for bombananas
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
About The Pull Request
Dynamic 2021, among much other things, splits the threat level into two separate budgets, one for round start and one for midround/latejoin. You can read the design doc, plus methodology and charts here: https://hackmd.io/@tgstation/S1C4dYJkO.
To server owners: this is incompatible with current dynamic.json configurations. This is not just because some fields have different values now, but because the older values are not balanced towards this system.
Inidividual list of changes (as I remember them):
Threat level is now split into two separate budgets, one for round start and one for midround/latejoin.
In TESTING, you can now run dynamic simulations to see the roundstart picks.
antag_cap is now based on an equation rather than a fixed list of antags per indice--the old system is not scalable. You can now pass it either a number for a fixed constant, or a list with "denominator" and an optional "offset" to fit the equation ceil(x / denominator) + offset, with x being population.
Midround/latejoin timers are now vars on /datum/game_mode/dynamic itself, and thus can be configured by head admins per server.
Removes some older, as far as I can tell completely unused admin tools relating to dynamic.
autotraitor_cooldown is now properly respected from config, and is based on an exact time rather than on ticks (450 used to be 15 minutes, now it's just 15 MINUTES).
The rulesets dynamic chooses are now in a dynamic.json file in round logs. Relies on tgstation/tgstation13.org#64 to be public.
Adds more logging to the autotraitor ruleset for admins.
Midround/latejoin chance modifiers are now configurable.
Labelled "Do Not Merge", as the design doc outlines the specific playtesting schedule I would like to perform.
Note to self: Remove the custom MOTD before merge.
Why It's Good For The Game
(Copied from design doc)
Dynamic currently dumps as much threat as it can into round start threats. This means that rounds at ~50 threat can have an absurd amount of antagonists round start, while leaving very little threat for midround/latejoin antagonists. What inevitably happens is just one of those picked decides to murderbone, leading to the inevitable 20 minute shuttle call. Furthermore, once those antagonists are dead, Dynamic doesn’t have any threat left to spend on new antagonists that keep the round flowing, promoting the mentality of “antags dead, I’m bored, let’s leave”.
The proposed solution of Dynamic 2021 is to split threat level into two separate budgets, one for round start and one for midround/latejoin. This split, like threat level, will also be done on a lorentz curve–meaning that while most rounds will have them evenly split, there is still the possibility of chaotic high antagonist round start rounds, or the possibility of a midround onslaught.
* Reverts #56205
* Allow things without density to bypass checks
* The rest of the owl
* The rest of the owl
* Doc and tweak
* More feex
* RCD machine frame unit test
* I suck
* AAAAA
* Bad at unit tests
* Revert unit tests (for including in another PR)
* Fix windoor_assembly return logic
* Comment /mob/living/proc/PushAM logic
* Windoor assembley logic tweak
* Fix frame stacking
* Unit test
* Better wording from macros?
Link to the test explorer: https://marketplace.visualstudio.com/items?itemName=Donkie.vscode-tgstation-test-adapter
The test explorer adapter lets you compile and run the code in one click of a button, with no messing about with defines necessary
The extension supports reading test results from the unit test logs, but its shitty having to parse logs for that, so this PR also adds support for a somewhat standardized method of logging unit test results to a json file instead.
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.)
This PR fixes a case where certain materials caused issues when working with stacking machines, because they did not have set merge_type from the get go, which meant that initial() of that variable returned null.
To clarify further - if /obj/item/stack does not have set merge_type, it is generated merge_type upon Initialize(), which is the same as its typepath. For example, currently /obj/item/stack/sheet/bluespace_crystal does not have any merge_type set, and it is given merge_type = /obj/item/stack/sheet/bluespace_crystal upon Initialize(). Each Initialize(). Again and again.
There are quite a bit of these cases in the codebase, especially if its some older code. I have gone through them and set all of them their set merge_type, which they would inevitably receive anyway upon initializing and it fixes a bug mentioned above.
To prevent this happening again, I have also included unit test to check if merge types are set for stacks, included exceptions are usually abstract paths like /obj/item/stack/sheet/mineral, which contains zero behavior on its own and does not spawn unless done via admin tools.
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.
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.
Teleporter machinery will now automatically link with each other. This makes the screwdriver + wirecutter interaction redundant, so it has been removed.
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
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.
* 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
* 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>
* 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
* 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
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