Commit Graph

279 Commits

Author SHA1 Message Date
Kyle Spier-Swenson
b7387ec345 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
/🆑
2022-11-27 22:17:01 -08:00
MrMelbert
1b63289e36 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>
2022-11-27 21:32:15 -08:00
Zephyr
1900eb9484 Unit Tests use a consistent human subtype (#71515)
title
2022-11-26 20:36:20 +01:00
Mothblocks
7da9403aa0 Remove explicit runtime check in monkey business test (#71513)
I knew this was redundant at first but kept it anyway because I thought
it was fine.

However, for some code I'm writing to make issues for flaky tests, this
is going to be an issue. I'm making sure it can intelligently create
collated issues for multiple failures (rather than generating an issue
for every individual shapeshift failure, for instance), but also a more
obviously titled issue if it's only one failure. With this assertion, it
always guarantees multiple failures, and would make issues harder to
read.

To be clear, runtimes during a test ALWAYS mean failure. This check was
never necessary, I just didn't mind it.
2022-11-26 12:18:10 +01:00
Zephyr
4ee7995b9c Strange Reagent correctly revives station pets, (and humans), correctly again. (#71430)
Also makes the healing factor non hardcoded

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Strange Reagent had a callback to call /mob/living/revive; however the
arguments for that proc were changed but the callback arguments were not
changed.

Also makes it so that the healing per unit is no longer hardcoded,
although its still kept at the stock 5 healing per unit.
Also, the max health cutoff was also hardcoded, even though we have a
getter for a mob's max health?

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

resolves https://github.com/tgstation/tgstation/issues/71417

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
fix: Strange Reagent is once again Strange! (it works at all)
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2022-11-24 11:30:15 -08:00
AnturK
84f69359a0 More horrible 515 proc compatibility. (#71333)
So i left over some basic `/whatever/proc/format` uses in the original
PR this fixes it.

Notable exceptions to the rule:
- Paths in add_verb/remove_verb, we need full path instead of a name
there to access verb metadata so we can't use proc ref macros there.
- regex.Replace, found out that it does not accept call by name. Instead
i added new REGEX_REPLACE_HANDLER so we can at least try to mark these.

There's still leftover global procs that do not use GLOBAL_PROC_REF but
they functionally equivalent so that's for later.

I don't see any reasonable way to grep for this. But if you got any
ideas please share.
2022-11-22 07:55:43 +00:00
Zonespace
dccbf7e5a6 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>
2022-11-21 20:44:55 -08:00
san7890
cb20ec99f9 [MDB Ignore] Unit Tests for Invalid Space Turfs (Area Bullshit Edition) (#70967)
## About The Pull Request

So, there's some bullshit with the map loader(?) sometimes where it'll
let space turfs spawn in spots where we REALLY don't want space turfs.
Or, it could also just be a mapper screwing up. Anyways, we might miss
these, so let's set up a broad Unit Test that checks and verifies that
these round-ruining snagglers do _not_ exist.

In order to help me to do this, I standardized and fixed the
nomenclature such that `/area/ruin/space` is default for any map file in
`_maps/RandomRuins/SpaceRuins`, as well as it's subtypes. I also touched
up how we handle shuttle areas in these scenarios. This got a lot of
Unit Test noise filtered out, and is crucial for its functioning. It
should also be how we did it from the start anyways. I added in an
UpdatePaths for any compatible change, but it was completely
non-workable for some of the area type updates.

I also fixed any organic bugs that didn't require an areas type update.
Cool.

Placing space turfs on IceBox:

![image](https://user-images.githubusercontent.com/34697715/199177940-21c64964-1808-41b0-9a92-bf5b82eee2fa.png)

Organically found issues:

![image](https://user-images.githubusercontent.com/34697715/199177972-b27a89de-0e1a-41e5-8fa4-3bee1763b9da.png)

I also added a `planetary` variable to `/datum/map_config` because I
didn't like the hack I was using to see if we had a planetary map, and
I'd rather it just be an explicit variable in the map's JSON.

## Why It's Good For The Game

The less times we get Space Turfs showing up on IceBoxStation, the
better. It also standardizes areas a bit more, which I like (we were
using some incorrect ones in the wrong spots, so those were touched up
in this PR as well). Like, if it's a space ruin, we don't need to use
the lengthy `/area/ruin/unpowered/no_grav` when `/area/ruin/space` does
the same thing.
## Changelog
Nothing in here should concern a player (unless I broke something)

Expect a few commits as I spam unit tests a few times and play
whack-a-mole with bugs.
2022-11-21 07:59:54 +00:00
MrMelbert
56cf6ed3e5 Adds more logging to shapeshift test failure (#71384)
Maybe will help us find the source of the spontaneous test failure.

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-21 07:39:07 +00:00
oranges
74e43bc556 Improve the naming of the element argument hash index selector (#71319)
So confusing name
2022-11-19 17:04:28 -08:00
Andrew
3c7870b7f6 Better Seed Extractor UI (#71204)
## About The Pull Request

Added icons to the seed extractor, indicators that show the stat value
relative to maximum possible value, tooltips to the stats, list of
traits and reagents.


![image](https://user-images.githubusercontent.com/3625094/201560469-7d44122b-7abd-4c3d-a76d-79fd26d36cb7.png)

There is also an ability to sort and filter the table now:


https://user-images.githubusercontent.com/3625094/201498368-9d620f99-28d3-4197-b73e-cd65d8285334.mp4

And an ability to scrap unneeded seeds:


https://user-images.githubusercontent.com/3625094/202563846-420f395b-d4a0-4ebc-88a9-df74c9c8ca1c.mp4

## Why It's Good For The Game

It wasn't very informative with just numbers, especially if you don't
know is it 5 out of 10 or 5 out of 100.

## Changelog

🆑
qol: new seed extractor UI 
/🆑

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2022-11-19 21:23:28 +00:00
san7890
b55d7c2350 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>
2022-11-18 23:11:23 -08:00
Zephyr
47ba13033f JSON Savefiles | Player Saves use JSON (#70492)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->
TODO:

- [x] DOCUMENT SHIT
- [x] UPDATE DOCUMENTATION

## About The Pull Request

Adds a new datum, which is intended to be a replacement for the stock
savefile type, json_savefile
As you can imagine, this is essentially just a wrapper around a json
file for reading/writing/manipulation that is intended to be a dropin
replacement for savefiles
It also have the ability to import stock savefiles and parse them into a
json tree

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

Permission obtained from MSO and Mothblocks.

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->
Not player facing, tested locally exhaustively to ensure it doesnt break
shit
🆑
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2022-11-17 21:45:18 -08:00
MrMelbert
79ffefa06d Allows Fully Heal to be passed a series of flags, fixes Adminordrazine being horrible (#71123)
## About The Pull Request

- Fully heal can be passed a series of flags detailing what all is
healed by the proc. This allows for things to provide
almost-but-not-quite fully heals.
- Uses this in Adminordrazine, so that it stops being a pain to update
every time fully heal is updated.

This includes some small balance changes which i'll go over, nothing
extremely noticable.

## Why It's Good For The Game

Allows for more precise control over full heals. 

## Changelog

🆑 Melbert
refactor: Fully heal can be passed a series of flags. As a result, some
things which previously did a full heal might heal slightly less, or
some things which did partial full heals might do slightly more.
fix: Adminordrazine will no longer completely break every facet of a
person
admin: Ahealing a changeling will refill all of their chems.
/🆑
2022-11-17 10:09:00 -08:00
LemonInTheDark
a0728e66e0 Fixes horrible CI times (#71295)
## About The Pull Request
Ok so like, I was using an assoc list in the unit test to map turfs to
their tracked area parent.

This was foolish because unless the test fails we will be doing this for
EVERY TURF IN THE GAME.

Assoc lists are red black tress, so insert time, more then just the list
expansion cost, also just scales with the amount of keys, since we need
to binary search them all to ensure we don't already exist.

This is really slow, and was costing us like actually 300 seconds or
something.

I've switched to storing this information in just the turf. It should
bring this down to like 6 seconds instead of 6 minutes.

Remember, assoc lists are dumb for high scales kids
2022-11-16 21:13:50 +00:00
san7890
1d256b5506 Refactors Rabbits to be a Basic Mob (#71205)
## About The Pull Request

Back in #64175, I reworked rabbits such that their base behavior was
just a cute fluffy snuggle monster, and not have the "easter" variant be
the default. Now that we're transitioning everything from simple_animal
to basic, I figured now was the time to shift that over too.

Pretty much everything should be the same as it was before, I even took
some time to add behavior to some elements to allow it to work (let me
know if I should handle it a different way) but rabbits as a
simple_animal and rabbits as a basic mob should now not be very
distinguishable (beyond the fact that they only speak via subtrees).

I also got rid of the single-letter icon_states in the DMI and
accomodated the code to fix because I finally got irritated enough to do
something about that.
## Why It's Good For The Game

Although I didn't really have any pressing urge to add more complex AI
behavior to rabbits than just pretty much re-implementing what they had
as a simple_animal, this is an excellent first-step to allowing much
more extensible behaviors to these fuzzy creatures.

Also, it takes three more mobs off "the frozen list". Whoopie!
## Changelog
🆑
fix: Dead Black Space Rabbits should now properly have a sprite.
/🆑

The UpdatePaths is useless for the maps we have on our repository
(holodecks use a spawner code-side), but I'm going to be nice to
downstreams who need it.
2022-11-15 23:40:39 -08:00
Fikou
d402ce4ee2 New Station Trait: Cybernetic Revolution + Body Purist Quirk (#71229)
## About The Pull Request
Adds a new station trait, the Cybernetic Revolution
It causes every crewmember to spawn with a cybernetic implant/organ (it
depends on their job).
For example. the bartender has an upgraded cybernetic liver, security
officers have extendable flashes, prisoners have flash shielded eyes.
For AIs, they get the surveillance upgrade.
The trait also lowers research costs for the cybernetic designs, triples
the price of EMP kits and EMP flashlights, doubles price of EMP bombs,
and allows traitors to buy autosurgeons, so they can implant themselves
with whatever they ripped out of the crew.
If you do not wish to partake, you can also take the Body Purist quirk,
which prevents you from getting a cybernetic, but everytime you have a
mechanical limb/organ from some other source, you will take a severe
mood penalty.

## Why It's Good For The Game
This could be a cool modifier to rounds once in a while, slightly
modifying the gameplay of all the crew.
Also our implant system is very barely used, so why not?

![image](https://user-images.githubusercontent.com/23585223/201492290-2043bbe8-8270-4114-add2-a612eafa0ec7.png)


## Changelog
🆑
add: New Station Trait: Cybernetic Revolution
add: Body Purist Quirk
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 21:50:30 +00:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
san7890
f45347bff2 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.
2022-11-06 06:06:50 -05:00
Mothblocks
910b97cd37 Save 0.4s by shaving off a lot of smaller init costs (#71007)
Starts shaving off a lot of less than 0.1s performance killers by, in
nearly every case, just writing better code.

Numbers are amount saved.

- /obj/machinery/bluespace_vendor/LateInitialize -> 29.4ms
Changes a loop over all machines to a specialized list.

- /obj/structure/table/glass/Initialize -> 42.53ms
Stops every table from initializing glass shards and table frames before
any destruction.

- /obj/structure/chair/Initialize -> 24.64ms
Removes an unnecessary addtimer that existed for chairs that weren't
anchored in emergency shuttles. Didn't do anything.

- /datum/orderable_item/New -> 44.3ms 
Instead of initializing every item to get its desc, just uses initial.
Added a unit test to make sure none are dynamic.

- /obj/machinery/computer/slot_machine/Initialize -> 26.19ms
Currently goes through every coin subtype, creates it, calls a proc,
then qdels it. Changes that to only run once. Could be optimized further
by making the coin info on a datum to avoid creating the object, but it
currently sits at 7.82ms, far below worth caring about for now.

- /obj/machinery/door_buttons/airlock_controller/findObjsByTag -> 3.51ms
Loops over just doors instead of typechecking airlock in machines.

- /obj/structure/closet/Initialize -> 60.57ms
Moves the code for taking everything on the tile from a next-tick timer
to LateInitialize.

- /obj/machinery/rnd/experimentor/Initialize -> 36.92ms
Changes a list that is generated by going through every item in the game
and getting information from a large amount of them to only run when
needed.

- /obj/structure/tank_dispenser/Initialize -> 20.81ms
No longer initializes every tank in it right away, only when needed.

- /obj/machinery/telecomms/LateInitialize -> 16.63ms
Removes `urange` to instead just loop over telecomms machines and check
distance. There's not that many of them.

- /mob/living/simple_animal/hostile/carp/cayenne/Initialize -> 3.17ms
Defers a GAGS overlay creation until its needed. BTW GAGS is
*horrendous* on init costs, and is the root cause for a lot of pretty
terrible performance. I investigated precompiling but the gains weren't
crazy, but likely could be the more stuff is GAGS'd.

- /turf/open/floor/engine/cult/Initialize -> 14.64ms
Temporary visual effect that is created is no longer done on mapload,
since nobody will see it.

- /datum/techweb/specialized/autounlocking/proc/autounlock -> 5.55ms
Changes some loops to shorter checks. This whole proc is pretty bad and
it's still 14.21ms for 17 calls.

- /matrix/New -> 13.41ms
- /matrix/proc/Translate -> 42.06ms
~~Changed the mineral matrice to only generate once, then take it from a
static.~~ An extra ~0.05s taken off by avoiding setting icon and
transform every Initialize.
2022-11-05 02:15:40 -07:00
LemonInTheDark
5b4ba051a0 Builds logic that manages turfs contained inside an area (#70966)
## About The Pull Request

Area contents isn't a real list, instead it involves filtering
everything in world
This is slow, and something we should have better support for.

So instead, lets manage a list of turfs inside our area. This is simple,
since we already move turfs by area contents anyway

This should speed up the uses I've found, and opens us up to using this
pattern more often, which should make dev work easier.

By nature this is a tad fragile, so I've added a unit test to double
check my work

Rather then instantly removing turfs from the contained_turfs list, we
enter them into a list of turfs to pull out, later.
Then we just use a getter for contained_turfs rather then a var read

This means we don't need to generate a lot of usage off removing turf by
turf from space, and can instead do it only when we need to

I've added a subsystem to manage this process as well, to ensure we
don't get any out of memory errors. It goes entry by entry, ensuring we
get no overtime.
This allows me to keep things like space clean, while keeping high
amounts of usage on a sepearate subsystem when convienient

As a part of this goal of keeping space's churn as low as possible, I've
setup code to ensure we do not add turfs to areas during a z level
increment adjacent mapload. this saves a LOT of time, but is a tad
messy

I've expanded where we use contained_turfs, including into some cases
that filter for objects in areas. need to see if this is sane or not.

Builds sortedAreas on demand, caching until we mark the cache as
violated

It's faster, and it also has the same behavior

I'm not posting speed changes cause frankly they're gonna be a bit
scattered and I'm scared to.
@Mothblocks if you'd like I can look into it. I think it'll pay for
itself just off `reg_in_areas_in_z` (I looked into it. it's really hard
to tell, sometimes it's a bit slower (0.7), sometimes it's 2 seconds
(0.5 if you use the old master figure) faster. life is pain.)

## Why It's Good For The Game

Less stupid, more flexible, more speed

Co-authored-by: san7890 <the@san7890.com>
2022-11-04 20:13:54 -07:00
itseasytosee
8e4bc80d92 Easy's Super Omega "unarmed strike based species var moved to limbs" refractor, unarmed strike striking with specific body parts rather than it just being flavor, and brain based attacking limb selection extra chunky edition. And also bodypart traits. (#70422)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Ok first if you don't want to read any further explanation you can watch
these two videos and you will understand all of the mechanical depth of
this change.


https://user-images.githubusercontent.com/55666666/194788103-8019dad8-7e44-4cc8-bc8f-0a4f8f00a357.mp4


https://user-images.githubusercontent.com/55666666/194788109-345a3146-fb4b-4a2e-9c2a-e2ee786ba97d.mp4

### **Disclaimer: Effect on gameplay extremely limited and niche read at
your own risk**

Starting at the top, regarding the species datum, the vars attack_type,
punchdamagelow, punchdamagehigh, punchstunthreshold, attack_verb,
attack_effect, attack_sound, and miss_sound have been removed.

All bodyparts (not just arms) now have corresponding variables for how
they should act if utilized in an unarmed attack. The bodyparts vars are
correlated to their corresponding species. All arm type bodyparts have
been repathed through a common parent for the purposes of keeping
variables consistent. The same is true for the legs.

When a carbon begins an unarmed attack, it will check the carbon's brain
to see what limb should be used for the attack.
If the brain has no answers it will default to the arm that corresponds
to the active hand of the attacker. Currently in all brains except
monkeys, it check to see if the attackers target target is laying down,
and if so, call for a kick with the leg that corresponds with the
attackers active hand. If the attacker has no useable legs, or the
attacker does not have a corresponding leg to the active hand, or the
target is not laying down, the brain will simply default for an attack
with the active hand.

Monkeys brains (take note the difference between having a monkey brain
and being controlled by monkey AI) are the exception, they will simply
always choose their heads, and by default an attack with the head is a
bite attack.

As an example:
Previously ethereal would make attacks that used the verb "burn" and did
burn damage despite what limbs they possessed.
Now anybody with an ethereal limb will make an unarmed attack that does
burn damage and has all the same verbs as an ethereal would.

And finally, the chunky finger species trait has been moved over to the
species arms. Effect on other sources like insuls remains unchanged.
<!-- 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 main motivation is moving direct mechanical elements off of species
to, quoting tralezab here, "Make species like a blueprint."
Opens more opportunities for coders to add specific elements to limbs,
perhaps we could see a buff to unarmed strikes from robot arms, or a
species that headbutts people to death.
Also undeniably cool, and fixes some weirdness like fully auged
ethereals still doing their normal ethereal attack.
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑 itseasytosee
refactor: Elements of unarmed strikes are now limb dependent instead of
species dependent. Go rip off an ethereal arm, sew it onto yourself, and
burn some people.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

Co-authored-by: itseasytosee <noodlenymphftw@gmail.com@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2022-11-01 23:06:21 +00:00
MrMelbert
70db96c46f Convert mouse and rat to basic mobs (#70728)
* Converts mice and rats to basic mobs

* Update paths

* Fixes

* Tweaks

* .

* Use helpers

* Unit test

* Correct the targeting

* Fixes the unit test?

* Fixes the unit test

* Docs

* update the path script with pr id

* Faction check tweak

* Review

* AHH
2022-10-28 08:49:17 -04:00
Watermelon914
6b49b63d39 Refactors how duplicate handling with traitor objectives work. Adds a 'can_generate_objective' function. Adds a limit to kidnapping objectives (#70758)
* Refactored how duplicates are handled in traitor objective code. This will fix destroy heirloom and eyesnatching objectives from only ever being available once.
* Fixed destroy heirloom and eyesnatching objectives never generating
* Kidnapping objective can only be taken a maximum of 3 times within 15 minutes. This puts it in line with the assassinate and eyesnatching objectives.
2022-10-28 05:41:50 -04:00
ShizCalev
f9c07743d4 Adds unit test for items that can be equipped to suit storage slots that are missing sprites (#70643) 2022-10-26 18:21:58 -07:00
Zephyr
2ee2920284 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>
2022-10-26 12:09:07 -04:00
ShizCalev
6bb879a599 sets pdas to use the pda worn icon again (#70748)
* PDA tablets now have a worn PDA icon again, which was lost in the transition to tablets.
2022-10-26 06:22:57 -04:00
Mothblocks
71450ef923 /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
2022-10-20 20:04:42 -07:00
ShizCalev
85e24c154f Inhand unit test modularity support p2 (#70497) 2022-10-20 17:33:53 -07:00
MrMelbert
f1215a12b4 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.
2022-10-20 14:57:07 -07:00
san7890
db66590e7e Fixes Some Incredulously Fucked Up Recycler Behavior (#70638)
* test one

Hey there!

Did you know that if you toss someone into a recycled emagger, that we delete _all_ of that mob's contents? You probably didn't because this shit is broken broken. Like, ow.

That's because we manually moved an item to nullspace, which caused a _slew_ of odd behavior in the Destroy chain for `obj/item` since it moves it to nullspace at a very specific point in time and makes all of it's assumptions on when you move the thing to nullspace. If it's in nullspace before you call qdel, you would shit out the ass with hanging references stuck on the mob (like `w_uniform` pointing to something in nullspace, like the image above).

All fixed now, though.

* I FUCKING LOVE UNIT TESTS

THIS SHIT WILL NEVER BREAK AGAIN!!!

* i blanked

my guy hasn't moved for twenty minutes

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

* wrong documentation

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-10-19 20:46:37 -04:00
LemonInTheDark
a625fc8038 Cleans up the fallout from plane cube (#70235)
* Cleans up the fallout from plane cube

Alright.
Makes cleaning bubbles respect planes
Adds support for updating overlays on move, fixing an issue with pointing at items
Adds better error messages for failing to provide args for mutable_appearance()
Fixes a bug where string overlays were not respecting insertion order

* Adds documentation for offset spokesman and offset_const

* Better stack trace

* Removes some redundant uses of cached MAs

At this scale, attempting to cache MAs like this has 0 impact on anything
And just makes things more messy then they need to be

* ensures fullscreen objects START offset, so things are always proper

* ensures chatmessages always have the right offset

* fixes compile

* whoops, the above lighting plane should actually be ABOVE the lighting plane

* fixes compile, also cleans up the fire overlay a tad

* Adds a unit test for plane masters that are shrunk by multiz being double shrunk

This is slightly hacky because of how I'm handing the plane master
group, but it's not THAT bad, and gives me some real good coverage

* Properly targets the seethrough plane at the game world plate. This fixes unit tests, and also just makes more sense

* whoops

* oh

* adds datum support for allocate(), cleans up a harddel from testing

* Makes camera chunks index at 1, and also makes them support non powers of two sizes, since that was unneeded

* fixes runtime in allocate
2022-10-20 09:00:02 +13:00
san7890
2878345ebb Swaps sleep() to use SECONDS define, changes some sleep(1) to sleep(1 TICKS) (#70452) 2022-10-18 21:25:23 -07:00
san7890
901662f59b Changes job config format to use TOML, and add tools for migrating existing format (#70199) 2022-10-18 14:51:24 -07:00
Mothblocks
00de33c827 Collect log lines in unit tests (#70362)
* Collect log lines in unit tests
2022-10-16 05:47:43 -04:00
san7890
89a95f6eb3 Unit Tests Mice Biting Wires (bonus proc cleanup) (#70488) 2022-10-14 08:53:20 -07:00
GoblinBackwards
eced3408b2 Fixes permanent sechud from ablative trenchcoat hood (#70441)
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-10-12 07:08:00 +00:00
ShizCalev
c2e8fa6a4e Adds clearer modularity support to the inhands unit test. (#70440)
cl ShizCalev
server: Added clarified downstream modularity support for the inhands unit test.
/cl

Sorry to our downstreams for not being clear about how to add additional locations for the test.

You can now just set a var with the path (example provided) and add make sure you also add the path to your deploy.sh.

If you need additional locations ontop of that, just add another line with generate_possible_icon_states_list("your/inhands/folder/path"), and make sure that path is also in deploy.sh
2022-10-12 14:37:29 +13:00
AnturK
ed3bade706 Adds unit test to check for spritesheet issues (#70351)
* Adds a new spritesheet unit test to catch edge-cases that caused problems in the past.
2022-10-11 11:42:05 -04:00
pizzie11
7f97330b48 Updates the Reagent Name unit test to also ensure searching by reagent name returns the correct reagent (#70223) 2022-10-06 21:51:29 -07:00
Wallem
2e6d27b81f Adds some chilling hallucinations (#70253)
Adds some new ice-based hallucinations
2022-10-06 00:54:10 -05:00
ShizCalev
1a32f60cf4 [ready] adds unit test for missing inhand icons. fixes a bunch of missing inhand icons (#70037)
fix: Fixed a bunch of missing inhand icons.
fix: Fixed cables in electrical toolboxes not randomizing their colors.
fix: Fixed the wrong colored icon showing when trying to make cable cuffs out of cables.
fix: The collectable SWAT helmet is now using the proper icon again!
refactor: Pipecleaners and power cables now share a unified color system, so they're once again available in ALL the same colors.
imageadd: Updated the screwdriver belt overlay to represent the newer sprite.
imageadd: Added a bunch of new inhand icons. Special thanks to Twaticus for doing the helmets! <3
fix: Wirecutters now have an icon when inside a belt again!
admin: Added a new omnitool subtype that allows you to spawn all items in a typepath!
fix: Explorer gaskmasks now properly reflect their adjusted state when held.
fix: Fixed balaclavas having the wrong icon when pulled up.
fix: Fixed the base energy sword (admin spawn only) being invisible.
fix: The rainbow energy sword is now a little bit more rainbowy!
fix: Fixed an tk exploit with orange handcuffed shoes.
fix: The traitor outfit in the select equipment panel is now actually functional!
2022-10-04 10:20:24 -07:00
Kyle Spier-Swenson
241c1d19c0 Bump byond up to 514.1588 (#70168)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-09-28 11:54:22 -07:00
John Willard
be450e12c8 Unit tests powernets to make sure the whole station is connected. (#70090) 2022-09-27 22:33:56 -07:00
Time-Green
3c6cf9bc8d Adds a unit test for dupe planes (#70129) 2022-09-27 15:13:55 -07:00
John Willard
7c990173e0 Removes network cards and printers from tablets (#70110) 2022-09-26 11:18:58 -07:00
LemonInTheDark
72a5b79555 Removes overlay queuing, saves 6/7 seconds of initialize. Lightly modifies stat tracking macros (#69696)
* Removes overlay queuing, saves 6/7 seconds of initialize. Lightly modifies stat tracking macros

So we have this overlay queuing system right? It's build with the assumption
that the "add to overlay list" operation is real expensive, and is
thus useful to queue removals or additions.

It turns out that it just isn't, at least during init. In my testing the
operation of queuing took LONGER then the actual overlay add/remove did.

That's ignoring the cost of the subsystem's work.

I've also modified part of the stat tracking macro, since it took a good
bit of cpu time, and didn't seem to well, do anything. So far as I can
tell it always evaluates to 1
2022-09-26 08:46:46 -07:00
GoldenAlpharex
95cd5d9f58 Gets rid of an annoying sporadic CI failure on closets by actually properly checking if they're qdeleted or not, no matter their typepath (#70116) 2022-09-25 17:01:47 -07:00
Kapu1178
ab6dcbf4ca Virtual Limbsanity (#69841)
* virtual limbsanity

* remove old file

* indent fail

* dumbassery cleanup

* unlint + tweak

* stop coding while high

* internal screaming

* kill another species dependancy

* make sure it has a default

* makes the unit test actually work

* fix monkeys
2022-09-21 20:07:10 -07:00
John Willard
a0442ee002 Removes persistence of items through changing species when not allowed to (#70008)
* Removes persistence of species-restricted items through changing

Makes use of item's mob_can_equip instead of mob's can_equip, making it take the item's restrictions into account.

Also, fixes the inventory's color, so it's properly red when you can't equip such an item, by making it also use mob_can_equip.

Finally, expands the species clothing unit test to take that into account, to prevent it breaking in the future.
2022-09-21 10:32:33 -07:00