Commit Graph

822 Commits

Author SHA1 Message Date
MrMelbert
6fea9d999d Small playsound audit, particularly involving portal sounds (#83893)
## About The Pull Request

I was looking at sounds (as you do) and I noticed this


![image](https://github.com/tgstation/tgstation/assets/51863163/25b298ca-31ac-48a0-9f86-c65a8becd532)

These sounds don't exist

We have `portal_open_1`, not `portal_open1`. 
This wasn't caught on compile because they used `""` and not `''`.

So I went through and audited a bunch of playsound uses that don't use
`''`. Only one error, fortunately

Likewise there was a ton of places running `get_sfx` pointlessly
(because `playsound` does it for you) so I clened that up.

However while auditing the portal stuff I noticed a few oddities, so I
cleaned it up a bit.

Also also I added the portal sounds to the wormholes event and gave it a
free ™️ optimization because it was an in-world loop

## Changelog

🆑 Melbert
sound: Portals made by portal guns now make sounds as expected
sound: Wormholes from the wormhole event now make sounds when formed
/🆑
2024-06-13 23:47:37 -06:00
MrMelbert
ff6b41aa07 Afterattack is dead, long live Afterattack (#83818)
## About The Pull Request

- Afterattack is a very simple proc now: All it does is this, and all
it's used for is for having a convenient place to put effects an item
does after a successful attack (IE, the attack was not blocked)


![image](https://github.com/tgstation/tgstation/assets/51863163/1e70f7be-0990-4827-a60a-0c9dd0e0ee49)

- An overwhelming majority of afterattack implementations have been
moved to `interact_with_atom` or the new `ranged_interact_with_atom`

I have manually tested many of the refactored procs but there was 200+
so it's kinda hard

## Why It's Good For The Game

Afterattack is one of the worst parts of the attack chain, as it
simultaneously serves as a way of doing random interactions NOT AT ALL
related to attacks (despite the name) while ALSO serving as the defacto
way to do a ranged interaction with an item

This means careless coders (most of them) may throw stuff in afterattack
without realizing how wide reaching it is, which causes bugs. By making
two well defined, separate procs for handing adjacent vs ranged
interactions, it becomes WAY WAY WAY more easy to develop for.

If you want to do something when you click on something else and you're
adjacent, use `interact_with_atom`
If you want to do something when you click on something else and you're
not adjacent, use 'ranged_interact_with_atom`

This does result in some instances of boilerplate as shown here:


![image](https://github.com/tgstation/tgstation/assets/51863163/a7e469dd-115e-4e5b-88e0-0c664619c878)

But I think it's acceptable, feel free to oppose if you don't I'm sure
we can think of another solution

~~Additionally it makes it easier to implement swing combat. That's a
bonus I guess~~

## Changelog

🆑 Melbert
refactor: Over 200 item interactions have been refactored to use a
newer, easier-to-use system. Report any oddities with using items on
other objects you may see (such as surgery, reagent containers like cups
and spray bottles, or construction devices), especially using something
at range (such as guns or chisels)
refactor: Item-On-Modsuit interactions have changed slightly. While on
combat mode, you will attempt to "use" the item on the suit instead of
inserting it into the suit's storage. This means being on combat mode
while the suit's panel is open will block you from inserting items
entirely via click (but other methods such as hotkey, clicking on the
storage boxes, and mousedrop will still work).
refactor: The detective's scanner will now be inserted into storage
items if clicked normally, and will scan the storage item if on combat
mode
/🆑
2024-06-11 21:58:09 -07:00
lizelive
dd9504d4c2 remove human requirement for invisible_wall (#83751)
mime borg is hilarious
## About The Pull Request

remove human requirement for invisible_wall

## Why It's Good For The Game

mime borg is hilarious

## Changelog

🆑
balance: remove human requirement for invisible wall
/🆑
2024-06-07 13:42:46 -04:00
EnterTheJake
154837240d Rust Heretic rework: THE PUKENING. (#83006)
## About The Pull Request
Turf rusting is now based on knowledge instead of RNG; toxic damage on
spells has been replaced with disgust; rust walkers are a bit easier to
summon and show up early in the tree.

Rust ascension spread has been massively increased and immunities while
on Rust have been updated.
## Why It's Good For The Game

This is a massive list of changes, but the tl:dr is Rust heretic design
is pretty barebones and dated in its current state. I'm going to try my
best to explain why that is and why it needs to change.

###  RNG on rusting is bad

**Problem** : quite a lot of turfs cannot be rusted, and reinforced
turfs rusting is tied to RNG, the emergency shuttle floors are also
unrustable, making an ascended heretic not threatening at all to an
escaping crew.

**Solution**: Heretic rusting prowess is now tied to knowledge
progression; reinf wall rusting is no longer tied to RNG; the emergency
shuttle is now rustable if you have accrued enough knowledge.

**Explanation** : I've been adopting the code from a previous PR that
sadly didn't make the light of day.

Link: https://github.com/tgstation/tgstation/pull/65361

The goal is to have Heretic rusting be more consistent, so that if you
ascend the shuttle is no longer a safe refuge.

**Grasp Of Rust**: Basic floors and walls.
**Mark Of Rust**: Reinf floors and walls (takes 3 applications of rust
to fully destroy).
**Toxic Blade** Titanium and Plastitanium( still takes 3 applications of
rust to destroy).
**Ascension**: almost everything save for admin walls, glass, and
silver.

### A territorial antagonist with no tools to defend its turf

**Problem**: Rust heretic is forced into a territorial playstyle, but
it's heavily diminished by rusted turfs not having any negative effect
on the crew whatsoever, Toxic damage on plume and blade is also kind of
bad and has no synergy with the rest of the kit.

Lastly, while fitting to the theme of Rust; mark detonation destroying
clothes and items can end up being more harmful to the heretic, as
destroying a secoff's flashbang will result in you getting stunned and
killed.

**Solution**: Rusted floors are no longer safe for the crew; walking
over Rust will add a small buildup of disgust, silicons will receive
ticking damage, Toxic damage on Rust skills has been replaced with
disgust buildup and a chem purge effect to prevent the crew from
cheesing the debuff with sol dry.

**Explaination** "The goal behind this change is to prevent the crew to
just be able to walk willy nilly into an eldritchly decayed area without
repercussions, plus I feel like disgust is a fitting debuff for Rusties
for a number of reasons.

1) Lore wise, your goal is to turn the entire station into a garbage
dump.

2) It fits for fighting a territorial antagonist, it's not immediately
threatening on its own, but if you overstay your welcome, it has dire
consequences.

3) We don't really do much with disgust as a status effect, far as i
know, this'll be the first iteration of it being used for an antagonist
toolset.

4) It gives reason to the crew to act hostile towards the Heretic, as
you are essentially making their work area inhabitable.

I've also Slightly increased the healing on leeching walk and gave it
some minor temperature regulation (you won't be able to outtemp space
cold).

### Rust Walkers 

**Problem**: Rust walkers might as well not exist in their current
state; they are one of the latest heretic unlocks, and the recipe for
summoning one is INSANE now that you cannot decapitate mobs anymore.

**Solution**: Rust walkers pop up a bit earlier in the tree; the ritual
to summon them has more reasonable reagents (wires, pools of vomit, iron
sheets) and they have increased health.

**Explanation**: : There is not a lot to add to this. without walkers,
Rust heretics are fairly slow at spreading rust, by making rust walkers
have reasonable summoning reagents, we ease that problem; lastly i've
slightly bumped their hp, as i felt 75 hp was a bit low.

### Underwhelming ascension

**Problem**: The spread rate from the ascension is downright ATROCIOUS
in its current state, i actually ran multiple tests on different maps,
on Metastation it can take up to 40 minutes for the rust to spread to
the entire station, considering an ascended heretic results in an
immediate shuttle call, it's unecceptable in its current form.

Solution: Rust spread is now a hybridization between old ascension and
Wizard tranformation ritual.

**Explanation**: The spread rate in its current form is painstakingly
slow and has a tendency to reach one corner of the map and compound on
itself, i've borrowed the code from the wizard final ritual
"transformation" and gave it my own spin so that given enough time it
will cover the station more or less evenly, it can now spread through
all z levels.

Video example: https://www.youtube.com/watch?v=jZ5zMrNM6Jw

I've also updated the immunities you gain on ascension to ignore
slowdown and stasis from Cryogelidia.

The whole point of rust ascension is to become immune to crowd control,
i've seen far too many ascended heretics die to a single bola or cryo
syringe, that's pretty lame so i fixed that.

Lastly, aggressive spread has had its radius reduced in exchange for the
spread being consistent now; cooldown is also halved when you ascend, to
better help the heretic go on the offensive.
2024-05-16 18:53:05 +00:00
Afevis
0308430832 Fixes logging runtime when admins trigger summon events (#83109)
Admin secrets panel passes a client to this proc, which only had
handling for being passed a mob.

```
[17:23:21] Runtime in code/modules/spells/spell_types/right_and_wrong.dm, line 250: undefined proc or verb /client/log message(). 
proc name: summon events (/proc/summon_events)
usr: ShizCalev/(Gratian Hunter)
usr.loc: (Engineering SMES (115,96,2))
src: null
call stack:
summon events(ShizCalev (/client))
/datum/secrets_menu (/datum/secrets_menu): ui act("events", /list (/list), /datum/tgui (/datum/tgui), /datum/ui_state/admin_state (/datum/ui_state/admin_state))
/datum/tgui (/datum/tgui): on act message("events", /list (/list), /datum/ui_state/admin_state (/datum/ui_state/admin_state))
/datum/callback/verb_callback (/datum/callback/verb_callback): InvokeAsync()
```
2024-05-08 19:16:29 -06:00
Rhials
3892e8d8de Gives shadow walk a new, spookier, and shorter sound effect that no longer ignores walls (#82689)
## About The Pull Request

This gives shadow walk a snazzy new sound effect for entering/exiting
jaunt.


https://github.com/tgstation/tgstation/assets/28870487/c25f720f-5bad-4063-8d6e-140fd41bd740

This also has the sounds it plays no longer passes through walls.
## Why It's Good For The Game

The ethereal_entrance/exit sound effects are drawn out, and pretty
grating. They work for the other jaunts they're used for because a jaunt
typically lasts longer than the sound itself. Nightmares are frequently
dancing in and out of jaunt, and the sound effects for entering/exiting
tend to overlap. It gets loud and annoying really fast.

This sound effect is quicker, spookier, and more distinct.

As for making the sound not ignore walls, I think it's pretty dumb how
easy it is to detect the spooky scary shadow antag just by sitting in
your department. It takes a lot of the initial fear and paranoia they
have the potential for is wasted when Joe Geneticist can hear them
messing around in their territory without having to leave their chair.
## Changelog
🆑 Rhials
sound: Nightmare has a new sound effect for entering/exiting shadow
jaunt. It also no longer can be heard through walls.
/🆑
2024-04-16 17:30:27 -06:00
jimmyl
b851b54b2f slaughter/laughter demon roundend report consume count + you cant bodyslam yourself (#82481)
## About The Pull Request

you cant bodyslam yourself as a slaughter/laughter demon
also
![2024-04-05 18_46_26-Space Station
13](https://github.com/tgstation/tgstation/assets/70376633/2f67747f-fbd4-471a-a8bf-b7c0df6948eb)

also moved antag datum stuff to mind init which means easier spawning


## Why It's Good For The Game

i wanted to brag in OOC about my supreme robust killcount but then i
realized theres no way to verify this
also hurting yourself is stupid

## Changelog
🆑
qol: slaughter/laughter demons have a cooler round end report
qol: you may not bodyslam yourself as a demon
code: slaughter and laughter demons are given their antag datum when
their mind initializes
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-07 19:56:08 -06:00
Bilbo367
466b3df048 Refactor removing unused defines. (#82115)
## About The Pull Request

Refactors a lot of the unused defines.

## Why It's Good For The Game

Refactors a lot of the unused defines.

## Changelog
Nothing player facing

---------

Co-authored-by: san7890 <the@san7890.com>
2024-03-22 21:29:35 -06:00
Ben10Omintrix
0a0c1260b5 Cultist pets (#80595)
## About The Pull Request
cultists can now convert pets on their side. when you convert a pet, it
will become much more dangerous and obedient to you, it will also gain a
new dangerous AI. cultist pets will look for fellow dead cultists, and
revive them by dragging them to nearby revival runes and activating it.
if there is no revival runes around them then they will create their own
and drag u to it. u can give them commands to follow, attack, or to
create revival runes. they will also go around to crit non cultists so
cultists can convert them

![pughealed](https://github.com/tgstation/tgstation/assets/138636438/8cd10a4f-2a30-40d9-b4fb-c9ff70bdcddd)

they will also now feed on organs and blood for healing

## Why It's Good For The Game
adds a extra layer to cult, u can now command non-sentient pets to aid
you

## Changelog
🆑
add: cultists can now convert pets to their side
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-03-21 18:47:04 -06:00
Jacquerel
86c8df6a55 [no GBP] Reference handling for Summon Simians (#81988)
## About The Pull Request

I merged #81875 when there was still an open review.
As penance I have completed the requested review because the PR should
not actually have been merged yet.

Additionally while I was there I generated different icons for both
"Summon Simians" and its granted gorilla transformation spell.

![image](https://github.com/tgstation/tgstation/assets/7483112/a541bf96-f277-445a-8019-f1bb88fcf1c6)

They aren't really original art, they're composites of existing sprites,
but I think they look better than what they were before.

## Why It's Good For The Game

This might have caused some small reference management issues if left
unaddressed.

## Changelog

🆑
image: Updated button icon for Summon Simians and Gorilla
Transformation.
/🆑

Other change isn't user-facing.
2024-03-14 14:17:46 +01:00
IndieanaJones
d890c9b747 Summon Simians Max Level Reward Change (#81875)
## About The Pull Request

Summon Simian now, as opposed to summoning actual gorillas at max level,
the caster is instead granted a free gorilla transformation spell
instead.

## Why It's Good For The Game

I wasn't exactly aware that Summon Simians could summon actual gorillas
when I buffed gorillas mainly for traitors, so wizards could use the max
level spell to spam powerful gorillas who could easily wipe the station
in a very short amount of time. Ideally, this change should reign in max
level Summon Simians while still giving users a reason to max it out.

## Changelog
🆑
balance: Max level Summon Simians now grants the wizard a free gorilla
transformation spell as opposed to allowing the wizard to summon
fully-grown gorillas.
/🆑
2024-03-13 22:37:47 +00:00
Waterpig
b067f3857a Prevents polymorph using specific mobs for deleting items/people (#81528) 2024-03-06 05:26:48 -07:00
MrMelbert
bb77f65c49 Fix finger gun chat messages (#81347)
## About The Pull Request

It should not say "[the guy that you're aiming at] fires their gun"

## Changelog

🆑 Melbert
fix: Fixed Finger Guns giving a misleading chat message
/🆑
2024-02-09 02:35:51 +01:00
Wallem
fb83617ff9 Adds a suicide_act() to the smite spell (#81252)
## About The Pull Request
What it says on the tin
## Why It's Good For The Game

https://youtu.be/cvfLHTyDv9o?t=4
## Changelog
🆑 Wallem
add: Adds a new suicide_act() to the smite spell
/🆑
2024-02-08 13:32:57 +01:00
MrMelbert
d4db0b9da8 Fixes the Wizarditis Timestop joke (#81136)
## About The Pull Request

I made it so Wizarditis Timestop just freezes yourself but forgot
timestop makes you immune to timestop.

So now I added some vars to timestop both to fix this and also for
admins to mess around with.

## Changelog

🆑 Melbert
fix: Wizarditis Timestop now has the desired effect. 
admin: Admins can now VV Timestop to make the caster not immune to their
own Timestop. If they really wanted.
/🆑
2024-01-28 23:37:08 +01:00
Bloop
f34174414d Cleans up some extra args in Destroy() (#80642)
## About The Pull Request

After https://github.com/tgstation/tgstation/pull/80628, these shouldn't
be needed anymore right?

## Why It's Good For The Game

Cleans up some vestigial code

## Changelog
EDIT: Not player-facing.
2023-12-30 03:54:07 +01:00
tralezab
27916beb81 A Mime's Vow to Silence Cannot be Repaired Once Broken. (Mimes can Write Under the Vow Again.) (#80332)
## About The Pull Request

Breaking your Vow is now a permanent action. Here's the changes that
come with that:

- Renamed "Speech" to "Break Vow" and changed description to match.
- You no longer get a permanent bad moodlet, just a temporary, lighter
one. I calculated that breaking your vow of silence provides roughly the
same emotional damage as getting your eyes stabbed out.
- Breaking vow now comes with a confirm alert.
- Mimes can once again write while under the vow.

## Why It's Good For The Game

After all this recent hullabaloo about mimes breaking and repairing
their vow, and what the moodlets for that action should be, it was
decided by a headcoder majority that mime vow breaking should be a
permanent action.


![image](https://github.com/tgstation/tgstation/assets/40974010/8e945095-7244-4071-8fdd-8a1529b5a4fb)

But beyond headcoder decisions, I myself agree with it being permanent.
Making vow breaking a temporary action that can be repaired after only 5
minutes makes ignoring the main gimmick of mime not only viable but
essentially expected. When silence can usually cause moments where you
NEED to explain yourself or else risk possibly dying, we're essentially
pushing players to break a vow. Now, it will be seen as less of a
potential option, because you can't undo it after 5 minutes.

## Changelog
🆑
qol: Added a confirmation prompt to breaking your vow of silence.
balance: Mimes can no longer repair the vow of silence once broken.
balance: The negative moodlet from breaking your vow of silence is now
lighter, and no longer permanent.
balance: Mimes are back to being able to write while under a vow of
silence.
/🆑

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-12-17 09:20:41 +13:00
Time-Green
54ab1e3936 Organ movement refactor *Un-nullspaces your organs* (#79687)
<!-- 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. -->

closes #53931, #70916, #53931

## About The Pull Request

Organs were previously stored in nullspace. Now they are stored in their
prospective bodyparts. Bodyparts are now stored in the mob.

I've also had to refactor a lot of code concerning organ movement.
Previously, organs were only moved into bodyparts once the bodyparts
were removed. To accomodate this change, two major distinctions have
been made:

**Bodypart removal/insertion**
Called only when an organ is taken out of a bodypart. Bodypart overlays,
damage modifiers or other changes that should affect a bodypart itself
goes here.

**Mob insertion/removal**
Called when an organ is removed from a mob. This can either be directly,
by taking the organ out of a mob, or by removing the bodypart that
contains the organ. This lets you add and remove organ effects safely
without having to worry about the bodypart.

Now that we controle the movement of bodyparts and organs, we can fuck
around with them more. Summoning someones head or chest or heart will
actually kill them now (and quite violently I must say (chest summoning
gibs lol)).


https://github.com/tgstation/tgstation/assets/7501474/5efc9dd3-cfd5-4ce4-b70f-d0d74894626e

I´ve also added a unit test that violently tears apart and reconstructs
a person in different ways to see if they get put toghether the right
way

This will definitely need a testmerge. I've done a lot of testing to
make sure interactions work, but more niche stuff or my own incompetence
can always slip through.

## Why It's Good For The Game

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

A lot of organ work is quite restricted. You can't C4 someones heart,
you cant summon their organs and a lot of exceptions have to be made to
keep organs in nullspace. This lets organs (and bodyparts) play more
nicely with the rest of the game. This also makes it a lot easier to
move away from extorgans since a lot of their unique movement code has
been removed and or generalized.

I don't like making PRs of this size (I'm so sorry reviewers), but I was
in a unique position to replace the entire system in a way I couldn't
have done conveniently in multiple PRs

## 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. -->

🆑
refactor: Your organs are now inside your body. Please report any issues
with bodypart and organ movement, including exotic organ, on github and
scream at me
fix: Cases of unexpected organ movement, such as teleporting bodyparts
and organs with spells, now invokes a proper reaction (usually violent
death)
runtime: Fixes HARS runtiming on activation/deactivation
fix: Fixes lag when species swapping
/🆑

<!-- 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. -->
2023-12-09 17:50:46 +00:00
distributivgesetz
274eb2a52e Removes Clone Damage (#80109)
<!-- 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

Does what it says on the tin. We don't have any "special" sources of
clone damage left in the game, most of them are rather trivial so I
bunched them together into this PR.

Notable things removed:
- Clonexadone, because its entire thing was centered around clone damage
- Decloner gun, it's also centered around cloning damage, I couldn't
think of a replacement mechanic and nobody uses it anyways
- Everything else already dealt clone damage as a side (rainbow knife
deals a random damage type for example), so these sources were removed

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

Consider the four sources of normal damage that you can get: Brute,
Burn, Toxins and Oxygen. These four horsemen of the apocalypse are very
well put together and it's no surprise that they are in the game, as you
can fit any way of damaging a mob into them. Getting beaten to death by
a security officer? Brute damage. Running around on fire? Burn damage.
Poisoned or irradiated? Toxin damage. Suffocating in space? Brute, burn
and oxygen damage. Technically there's also stamina damage but that's
its own ballpark and it also makes sense why we have a damage number for
it.

Picture this now: We have this cool mechanic called "clone pods" where
you can magically revive dead people with absolute ease. We don't want
it to be for free though, it comes at a cost. This cost is clone damage,
and it serves to restrain people from abusing cloning.

Fast forward time a bit and cloning is now removed from the game. What
stays with us is a damage number that is intrinsically tied to the
context of a removed feature. It was a good idea that we had it for that
feature at the time, but now it just sits there. It's the odd one out
from all the other damage types. You can easily explain why your blade
dealt brute damage, but how are you going to fit clone damage into any
context without also becoming extremely specific?

My point is: **clone damage is conceptually a flawed mechanic because it
is too specific**. That is the major issue why no one uses it, and why
that makes it unworthy of being a damage stat.
Don't take my word for it though, because a while ago we only had a
handful of sources for this damage type in the game. And in most of the
rounds where you saw this damage, it came from only one department. It's
not worthwhile to keep it around as a damage number. People also didn't
know what to do with this damage type, so we currently have two ways of
healing clone damage: Cryotubes as a roundstart way of healing clone
damage and Rezadone, which instantly sets your clone damage to 0 on the
first tick. As a medical doctor, when was the last time you saw someone
come in with clone damage and thought to yourself, "Oh, this person has
clone damage, I cannot wait to heal them!" ?

Now we have replacements for these clone damage sources. Slimes? Slime
status effect that deals brute instead of clone. Cosmic heretics? Random
organ damage, because their mechanics are already pretty fleshed out.
Decloning virus? The virus operated as a "ticking timebomb" which used
cloning damage as the timer, so it has been reworked to not use clone
damage. What remains after all this is now a basically unused damage
type. Every specific situation that used clone damage is now relying on
another damage type. Now it's time to put clone damage to rest once and
for all.

Sure, you can technically add some form of cellular degradation in the
future, but it shouldn't be a damage number. The idea of your cells
being degraded is a cool concept, don't get me wrong, but make it a
status effect or maybe even a wound for that matter.

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

🆑
del: Removed clone damage.
del: Removed the decloner gun.
del: Removed clonexadone.
/🆑

<!-- 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. -->
2023-12-04 14:42:43 -08:00
KittyNoodle
df2c5a8678 Fixes a major heretic exploit. (#80082)
## About The Pull Request
As it turns out, doing a refactor without testing to see if the thing
you refactored works is bad.
Heretics should probably not be able to hover around someone and cast
cleave on them until they loose all their blood.

Fixes:
- https://github.com/tgstation/tgstation/issues/79648

## Why It's Good For The Game
Exploit bad

## Changelog
🆑
fix: Heretics can no longer cast all of their spells while in jaunt
/🆑
2023-12-03 19:16:12 +01:00
distributivgesetz
f8b41f9442 Changes occurrences of recieve in code to receive (#80065)
## About The Pull Request

I've stumbled across this enough to finally go through the entire
codebase and fix it. I left out changelogs simply because rewriting
history logs is bad.
## Why It's Good For The Game

I find it pretty annoying because I stumble across words that are
misspelled for a few seconds, and I'm likely not the only one who feels
like this. Less spelling mistakes in code are better.
## Changelog
🆑
spellcheck: Occurrences of "recieve" has been changed to "receive".
/🆑
2023-12-02 14:50:57 -07:00
san7890
87f32e149f Patches Up Gifts In Anticipation Of The Holidays (#80035)
## About The Pull Request

I decided to look at why everyone loves (and I despise) Christmas too
much, and was met with a lot of smelly code. In fact, some of it was
completely busted! Let's fix several things.

* We no longer use a GLOB for "every possible item you can cram into a
gift box", we now use static lists scoped to the proc. That saves us
some pollution for something that really didn't need it (and only was
set up that way for cacheing I believe). We also static-cache stuff that
we weren't doing previously, to save even more work (in anticipation for
entropic heat death of universe).
* Repaths `/obj/item/a_gift` to `/obj/item/gift`. I never liked the old
path and this new one is cleaner. This also uncovered a bug.
* Mappers would var-edit gifts to have a unique mapped-in type, but the
code never respected this. I fixed it so the behavior should now respect
that rather than override the variable on Initialize(). Now the goat
plushie gift will always have said goat plushie rather than just any
toy.
* Procs should now have the proper arg nomenclature.
* Also just cleans up a lot of single letter variables and the like.
There was some cooked shit that's now alphabetized and nicely
multilined.
## Why It's Good For The Game

Ho ho ho.
## Changelog
🆑
fix: Some mapped-in gifts that were supposed to guarantee a certain gift
weren't spawning that exact gift type, this has been patched to reflect
the mapper's intent.
/🆑
2023-12-01 23:11:35 -05:00
Jeremiah
7a1b1fa9ad Splits placeontop proc (#79702)
## About The Pull Request
I find the proc hard to read honestly. There's no reason we can't split
this into two functions - the secondary functionality is used only once,
in reader.dmm.
## Why It's Good For The Game
Code improvement
Glorious snake case
## Changelog
N/A nothing player facing

---------

Co-authored-by: san7890 <34697715+san7890@users.noreply.github.com>
2023-11-19 04:58:31 +01:00
MrMelbert
1a204ec4eb Fix split personality commune being unusable I think (#79631)
## About The Pull Request

Likely fixes #79586 and likely fixes #78081 . 

Split persons's loc is their parent mob, so they were being disallowed
from casting due to not being loc's in a turf.

Further testing required

## Changelog

🆑 Melbert
fix: Split persons can talk to their host once again
/🆑
2023-11-10 21:06:16 -07:00
Jacquerel
a1e46c5d31 Basic Guardians/Holoparasites (#79473)
## About The Pull Request

Fixes #79485
Fixes #77552

Converts Guardians (aka Holoparasites) into Basic Mobs.
Changes a bunch of their behaviours into actions or components which we
can reuse.
Replaces some verbs it would give to you and hide in the status panel
with action buttons that you may be able to find more quickly.

They _**should**_ work basically like they did before but a bit
smoother. It is not unlikely that I made some changes by accident or
just by changing framework though.

My one creative touch was adding random name suggestions.
The Wizard federation have a convention of naming their arcane spirit
guardians by combining a colour and a major arcana of the tarot. The
Syndicate of course won't truck with any of that mystical claptrap and
for their codenames use the much more sensible construction of a colour
and a gamepiece.

This lets you be randomly assigned such creative names as "Sparkling
Hermit", "Bloody Queen", "Blue World", or "Purple Diamond".
You can of course still ignore this entirely and type "The Brapmaster"
into the box if so desired.

I made _one_ other intentional change, which is to swap to Mothblocks'
nice leash component instead of instantly teleporting guardians back to
you when they are pulled out of the edge of their range. They should now
be "dragged" along behind you until they can't path, at which point they
will teleport. This should make the experience a bit less disorienting,
you have the recall button if you _want_ to instantly catch up.

This is unfortunately a bumper-sized PR because it did not seem
plausible to not do all of it at once, but I can make a project branch
for atomisation if people think this is too much of a pain in the ass to
review.

Other changes:
- Some refactoring to how the charge action works so I could
individually override "what you can hit" and "what happens when you hit"
instead of those being the same proc
- Lightning Guardian damage chain is now a component
- Explosive Guardian explosive trap is now a component
- Added even more arguments to the Healing Touch component to allow it
to heal tox/oxy damage and require a specific click modifier
- Life Link component which implements the Guardian behaviour of using
another mob as your health bar
- Moved some stuff about deciding what guardians look and are described
like into a theming datum
- Added a generic proc which can return whether your mob is meant to
apply some kind of damage multiplier to a certain damage type. It's not
perfect because I couldn't figure out how ot cram limb modifiers in
there, which is where most of it is on carbons. Oh well.
- Riders of vehicles now inherit all movement traits of those vehicles,
so riding a charging holoparasite will let you cross chasms. Also works
if you piggyback someone with wings, probably.

## Changelog

🆑
refactor: Guardians/Powerminers/Holoparasites now use the basic mob
framework. Please report any unexpected changes or behaviour.
qol: The verbs used to communicate with, recall, or banish your Guardian
are now action buttons.
balance: If (as a Guardian) your host moves slightly out of range you
will now be dragged back into range if possible, rather than being
instantly teleported to them.
balance: Protectors now have a shorter leash range rather than a longer
one, in order to more easily take advantage of their ability to drag
their charge out of danger.
balance: Ranged Guardians can now hold down the mouse button to fire
automatically.
balance: People riding vehicles or other mobs now inherit all of their
movement traits, so riding a flying mob (or vehicle, if we have any of
those) will allow you to cross chasms and lava safely.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-11-10 21:04:52 -07:00
Ben10Omintrix
42c8e1adf9 new wizard ability and basic leaper refactor (#79237)
## About The Pull Request
refactors leapers into basic mobs and adds a new ability for wizards.
for 2 points wizards can buy their own leaper pet. they will get a
contract which lets them pick their pet's name and color

![thefrogs](https://github.com/tgstation/tgstation/assets/138636438/8df9b893-d07d-4e51-a9fa-644830cc7a81)

after they sign the contract they will get a frog statue which is used
to contain the leaper. players can use this statue to release or recall
the leaper into the statue. when its in the statue it will slowly regain
health or even revive from the dead, but if it gets gibbed then the
statue will be useless.

also adds a new ai behavior for leapers which lets them go swim in water
(and splash around) for a period of time. i gave this behavior to frogs
and crabs too

when riding the leaper, the players will get access to all its
abilities, it now has new abilities, it can create frog minions that
suicide bomb the enemies and it can also create a shower of poisonous
structures.


https://github.com/tgstation/tgstation/assets/138636438/931aa7b4-09f0-493f-bdb6-f3bdd0915b22

also when riding the leaper, players can point at walls near it so it
will destroy it. alternatively players can give commands to their
leapers to use abilities and to follow them if they are not riding it.
wizards cant be force dismounted from their frogs, and only wizards can
ride the frogs.

this also removes leapers from cytology as they now are much more
dangerous and have a new home


## Why It's Good For The Game
refactors leapers into basic mobs, and gives more gameplay opportunities
for wizards
## Changelog
🆑
refactor: leapers have been refactored into basic mobs please report any
bugs
add: wizards can now summon a leaper pet
removal: removes leapers from cytology
/🆑
2023-11-06 00:05:29 +00:00
lessthanthree
312cd8880d Station announcements cleanup (#79315)
## About The Pull Request

- As the size of the announcement proc has grown over the past few PRs,
did a pass over them for readability and consistency
- Include the arg names for coders unfamiliar with the new announcement
format
- Replaced leftover hardcoded Central Command text with the command name
proc, so all announcements reflect the command name if changed by an
admin
- Replaced hard coded emergency shuttle timer text with the actual
timeleft vars, so it's correct if the timers are changed for any reason
- Darkens the dark mode blue/red headers to be more red less pink, while
staying in accessibility standards
- Adds a lower profile grey colour for automated non-Central Command
announcements

## Changelog

🆑 LT3
code: Emergency shuttle announcements no longer use hardcoded values
code: Central Command announcements now correctly use its new name when
changed
spellcheck: Consistency pass on event announcements
/🆑
2023-11-04 18:38:52 -06:00
san7890
22de4d8b3b Prevents Mindswapping on Bitrunners (#79323)
## About The Pull Request

Fixes #79310

Adds a new trait to prevent mindswaps (which is just useful for any
future cases when we don't wanna rely on the blacklist typecache) while
also accounting for bitrunners (who you can't mindswap because their
mind is elsewhere) and their avatars (because that's not a real mind now
is it).

this does mean that bitrunners while bitrunning are immune to all
mindswaps but i don't have a good answer on how to fix it. i don't even
much like the idea of VR but I think that having these traits are useful
enough for future utilization.
## Why It's Good For The Game

prevent big breakage.
## Changelog

🆑
fix: Bitrunners can no longer get mass-mindswapped out of their avatar
when the wizard does the event. Something about machinery and magic not
going well together.
/🆑
2023-10-30 15:16:59 -07:00
Jacquerel
5b7bcb9a9e Remove shapeshift if the mob tries to turn into a different mob (#79270)
## About The Pull Request

Fixes #78250

Bileworms, baby chicks, and various kinds of young spider automatically
try to change into a different mob after some time.
This bricks shapeshift spells because you can't transform back after
being turned into another kind of mob (and sometimes also ghosts you by
deleting your original body).
Now we have a signal before we try to call `change_type` on a mob which
is intercepted by the shapeshift status effect and cancels both things.

Unfortunately this doesn't make turning into a Bileworm fun to play,
their movement is always random because it's designed for an AI not a
player 😔

## Changelog

🆑
fix: If a mob you are shapeshifted into attempts to grow up into a
different kind of mob then you will stop being shapeshifted
/🆑
2023-10-26 21:47:23 -06:00
Jacquerel
0d5f9907a2 Shapechange health transfer tweaks (#79009)
## About The Pull Request

Fixes #78721
This PR does a handful of things behind the scenes to increase the
consistency of shapechange health tracking.

First of all we adjust the order of operations taken when you restore
the original body. The implementation as-was would remove the status
effect midway through and null a bunch of variables we tried to continue
using. This would result in several runtimes and code failing to run,
with the upshot that untransforming upon death would leave the caster
completely alive, with the corpse of its transformed shape at its feet.
Oops.

Additionally while testing this I realised that transferring the damagew
as also kind of fucked.
We wouldn't bother to do it at _all_ if you died, which is a shame, so I
made it simply heal you instead of reviving you so we can always do it.
Then as noted in the linked issue, we were applying all transferred
damage to a single limb, which could exceed the health of the limb and
remove damage. Now we spread it around the body.

Finally, applying damage to a human using the "force" flag would often
actually apply less damage to their _health_ than expected. This is
because arms and legs contribute only 75% of their damage taken to a
mob's overall health.
Now instead of reading `health` we read `total damage` which ignores the
limb damage modifier.

The end result of this is that if you transform into a corgi, take 50%
of your health, and transform back then you will have 50% of your health
as a human.
Previously the result would be that you'd have ~63%, then transforming
into a corgi would leave you with ~63% of a corgi's health, then
transforming back into a human would leave you at about 71%... and so on
and so forth. Now it doesn't do that.

## Changelog

🆑
fix: Dying when using (most) shapeshift spells will now kill you rather
than having you pop out of the corpse of your previous form.
fix: Damage will now be accurately carried between forms rather than
being slightly reduced upon each transformation.
/🆑
2023-10-26 01:30:53 +00:00
lizardqueenlexi
6dde9e4c4e Basic Constructs: Juggernaut (#79170)
## About The Pull Request

Converts juggernaut constructs to basic mobs. These guys are really
simple, so this is a pretty straightforward one.

The one notable thing about this PR is that I got annoyed that
projectile reflection code was copy-pasted in two different places (the
main one for things like the ablative trenchcoat, and right here on the
juggernaut). So, trenchcoat-style reflection is now a proc on
`/obj/projectile`, which is used in both places.

AI-controlled juggernauts are as simple as befits these big lugs, doing
nothing but slowly walking toward mobs and beating them to death with
their giant fists.
## Why It's Good For The Game

Removes another 5 simple animals.

Not too much else to say about this one, but it's easier to make
projectiles bounce off of things now if anyone wants to do that.
## Changelog
🆑
refactor: Juggernaut constructs now use the basic mob framework. Please
report any bugs.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-10-23 23:53:19 -06:00
MrMelbert
93ec5a72f7 A comprehensive refactor / cleanup of bullet_hit and on_hit to cut out a single bad species / mob proc (#79024)
## About The Pull Request

- Refactored `bullet_act`. Adds `should_call_parent` and refactors
associated children to support that.
   - Fixes silicons sparking off when hit by disabler fire. 
- Desnowflakes firing range target integrity and cleans up its
bullet-hole code a bit.
- Cleans up changeling tentacle code a fair bit and fixes it not taking
off throw mode if you fail to catch something.
   - The Sleeping Carp deflection is now signalized 
- Nightmare projectile dodging is now signalized and sourced from the
Nightmare's brain rather than species
- Refactored how cardboard cutouts get knocked over to be less
snowflaked / use integrity
- Also adds projectile `on_hit` `should_call_parent` and cleans up a bit
of that, particularly their arguments.
- On hit arguments were passed wrong this entire time, it's a good thing
nothing relied on that.

## Why It's Good For The Game

This is cringe. 


1863eb2cd8/code/modules/mob/living/carbon/human/_species.dm (L1430-L1442)

Bullets should overall act more consistent across mob types and objects.

## Changelog

🆑 Melbert
fix: Silicons don't spark when shot by disablers
fix: Changelings who fail to catch something with a tencacle will have
throw mode disabled automatically
fix: Fixes occasions where you can reflect with Sleeping Carp when you
shouldn't be able to
fix: Fixes some projectiles causing like 20x less eye blur than they
should be
refactor: Refactored bullet-mob interactions
refactor: Nightmare "shadow dodge" projectile ability is now sourced
from their brain
/🆑
2023-10-18 23:08:13 -06:00
Jacquerel
504e6acfa3 Basic Mob Gorillas (#78918)
## About The Pull Request

Now we can make basic mobs with hands easily so I did, they don't
actually use their hands for anything with AI.
In the future we can come back and share the monkey AI where they pick
up items to hit people with, but frankly few weapons are more deadly
than a gorilla's fists.

IIRC I didn't really change their behaviour much, this is mostly just a
straight conversion. Main difference is that they will prioritise eating
nearby bananas and fruit salads over punching people.

When I make these conversions nowadays I need to decide between "does
this attack at the speed that it did as an NPC mob or the speed it did
as a player?"
I am arbitrarily deciding that gorillas are usually not players and
electing for the former, but tell me if you disagree.

I also made "show basic inhand sprites" into a component shared by
Gorillas, Drones, and Dextrous Guardians (all also now available to
become basic, once I get around to it),

And I added an AI behaviour to run a basic emote. This is similar but
different to "random speech", which kind of sucks and needs rewriting
anyway.
Gorillas don't speak, only ooga.

## Why It's Good For The Game

https://www.youtube.com/watch?v=npuuTBlEb1U

## Changelog

🆑
refactor: Gorillas now use the basic mob framework. Please report any
unusual side effects.
/🆑
2023-10-11 16:58:29 -06:00
Tim
d6f79f4427 Refactor gib code to use bitflags and have documentation (#78754)
## About The Pull Request
This takes all the gib related procs:
- `gib()`
- `spawn_gibs()` 
- `spill_organs()`
- `spread_bodyparts()`

And adds heavy documentation that communicates what the procs are used
for and how the different bitflags affect them. The difference is
noticeable:

`gib(TRUE, FALSE, FALSE, null)` vs `gib(DROP_ORGANS|DROP_BODYPARTS)`

The code is now much more legible which is important considering it's
used in a lot of places!

Another robust change, is that we had several places in the code where
there were double negatives like so:

```
/mob/living/carbon/spill_organs(no_brain, no_organs, no_bodyparts)
	if(!no_bodyparts) // DOUBLE NEGATIVES ARE BAD M'KAY?!?
		// do stuff here
```

This is a mindfuck to untangle. I inverted a lot of these parts so we
don't lose our sanity.

Last thing that was changed was a big `if()` loop in the `spill_organ()`
proc. This was refactored to just be a simple `for` loop with `continue`
statements where we needed to skip enabled bitflags. It's now shorter
and cleaner than before.

The only slight gameplay change this affects is that gibbing a mob now
guarantees to drop all items unless the `DROP_ITEMS` bitflag is
deliberately omitted. Some places like admin gib self, we don't want
this to happen.

## Why It's Good For The Game
Gib code is very old. (~15 years) People kept adding more arguments to
the procs when it should have been a bitflag initially. By doing it this
way, there is more flexibility and readability when it comes to adding
new code in the future.

## Changelog
🆑
refactor: Refactor gib code to be more robust.
qol: Gibbing a mob will result in all items being dropped instead of
getting deleted. There are a few exceptions (like admin gib self) where
this will not take place.
/🆑
2023-10-06 13:12:22 +01:00
GPeckman
04435f9449 The AI can no longer turn off shapeshifted robots (#78766)
## About The Pull Request

If you shapeshifted into a robot (beepsky, ED-209, etc.) using the
shapechange spell or other means, silicons could just turn you off. Now
all shapeshifted robots are considered to be emagged, meaning that
silicons can't interact with them. Closes #44505.
## Why It's Good For The Game

Bugfixes good
## Changelog
🆑
fix: The AI can no longer turn you off if you shapeshift into a robot.
/🆑
2023-10-06 12:41:25 +01:00
GPeckman
a50d199456 Fixes an issue with COMSIG_MOB_ABILITY_STARTED for spells (#78775)
## About The Pull Request

The signal `COMSIG_MOB_ABILITY_STARTED` is used by both cooldown actions
and spells, which are a subtype of cooldown actions. However, cooldown
actions pass two values, `src` and the action's target. Spells only
passed `src`, even though its the exact same signal. This caused issues
with the ability telegraph component, as it has to interrupt the casting
of spells and actions to add a delay, and most if not all spells won't
work without the target being passed with the signal. Closes #78715.
## Why It's Good For The Game

It caused bugs and is just bad design in general.
## Changelog
🆑
fix: Ice whelps can now use spells given to them by admins, and people
who have polymorphed into ice whelps can now polymorph back to normal.
/🆑
2023-10-06 12:28:16 +01:00
Bloop
68b798efa0 A thorough audit of damage procs and specifically their use in on_mob_life() (with unit tests!) (#78657) 2023-10-03 04:01:32 -04:00
Jacquerel
7d7f55ee53 Heretic Ascension Tweaks (#78472)
## About The Pull Request

Some changes to Cosmic and Knock heretic ascensions, in response to
feedback.

- Cosmic Heretics can no longer control their summon while jaunted. 
- Additionally the death link element the Star Gazer used... wouldn't
work if there was more than one cosmic heretic. I refactored it into a
component, so that it would.

Frankly there are probably a lot of _other_ abilities which shouldn't be
usable while jaunted but are, but I have been burned in the past by
adding defaults which were applied too widely so we'll leave it
case-by-case for now.

- The Knock rift can no longer summon Flesh Worms of any kind.
- But it _can_ summon fire sharks (we really need to reflavour these...)
and any future "basic mob" heretic mobs (or ones which are converted).
- Additionally the rift can't be clicked by ghosts while it's polling
ghosts automatically because that would create funky empty-minded mobs.
- Finally it goes away when the heretic dies.

## Why It's Good For The Game

For Cosmic Heretics, controlling the Star Gazer in conjunction with
Space Jaunt essentially meant that the heretic was playing an RTS as an
invincible observer with an invulnerable unit, now they have to actually
be present and killable in order to sic The Beast on you.

For Knock Heretics, Minor Flesh Worms are a proof of concept which was
never meant to be used except by admins. They're _barely_ weaker than a
normal flesh worm, extraordinarily tanky, delete walls, and generally
devalue the Flesh path ascension.
Vanishing upon heretic death is because every _other_ ascension is at
least theoretically stoppable except this one. Now this one is too.
It's still _very hard_ to kill the heretic because every _10 seconds_
they can transform into a heretic mob which acts as an extra health
pool.

## Changelog

🆑
fix: If two cosmic heretics ascend in the same round, their star gazer
survival will be linked to each individual heretic and not shared by
just one of them.
fix: You can't click the Knock heretic portal to join as a mob while
already signed up to become a mob.
balance: Cosmic heretics can't order the Star Gazer around while
jaunting.
balance: The Knock Heretic portal cannot summon Flesh Worms, but can
summon Fire Sharks.
balance: The Knock Heretic portal will disperse if its creator is
killed.
/🆑
2023-09-29 16:52:19 -04:00
necromanceranne
5f9cabe20e Splattercasting sets your blood levels to a normalized volume when you transform into a vampire; swapping species caps your blood up to the normal volume unless lower (#78464)
## About The Pull Request

What is says on the tin.

## Why It's Good For The Game

Prevents an exploit able to give you an exceptionally large blood head
start due to a series of magic mirror race choices and raceswapping,
allowing for almost unlimited casting due to how some species handle
blood volume and generation.

## Changelog
🆑
fix: Splattercasting resets your blood to normal values when you
transsform into a vampire.
fix: Gaining a new species will set your blood volume down to the normal
volume levels if higher than normal.
/🆑
2023-09-28 20:32:03 +02:00
Jacquerel
b2ecd81be4 Basic Mob Brimdemon (#78424)
## About The Pull Request

Fixes #71330

The brimdemon was basically already perfect (well, it has a novel means
of attacking) so I didn't get too fancy with this one, it's _largely_
just a straightforward conversion.
Following this change it's a little slower to back off, but better at
lining up with people in order to blast them. Additionally, its beam is
now a mob ability so you can give it to other mobs if you so desire.

Because I can't help doing a _little_ tinkering, Brimdemons now explode
2.5 seconds after they die, after a brief warning animation.

## Why It's Good For The Game

Simple mobs must die

## Changelog

🆑
add: Brimdemon corpses release an explosion shortly after death, just to
keep you on your toes.
refactor: Brimdemons now use the basic mob framework which (should)
improve their pathfinding somewhat. Please bug report any unusual
behaviour.
admin: The brimdemon's beam ability can be given to any mob, for your
Binding of Isaac event
/🆑
2023-09-22 19:12:43 -06:00
MrMelbert
c61e3c8baa Tongueless humans cannot cast vocal spells, handless humans cannot invoke emote spells (#78334) 2023-09-17 19:16:05 -04:00
nikothedude
009af8c2ce [TEST-MERGE FIRST] Wound refactor number two: Full synthetic support (#78124)
## About The Pull Request

Heavily refactors wounds AGAIN.

The primary thing this PR does is completely change how wounds are
generated and added - while the normal "hit a guy til they bleed" stuff
works about the same, asking for a specific type of wound, say, like how
vending machines try to apply a compound fracture sometimes, isnt going
to work if we ever get any non-organic wounds, which the previous
refactor allowed.

With this PR, however...
* You can now ask for a specific type of wound via
get_corresponding_wound_type(), which takes wound types, a limb, wound
series, etc. and will try to give you a wound fitting those
specifications - but also, a wound that can be applied to a limb.
* This will allow for a vending machine to apply a compound fracture to
a human, but a collapsed superstructure (assuming my synth wounds go in)
to a robot

There are now new "series types" and "wound specific types" that allow
us to designate what series are "mainline" and randomly generatable, and
what are "alternate types" and must be generated manually - you can see
the documentation in wounds.dm.

The behavior of limping and interaction delays has been abstracted to
datum/wound from bone wounds to allow just, general ease of development

Pregen data now allows for series-specific wound penalties. Example: You
could set a burn wound's series wound penalty to 40, which would make
wound progression in the burn category easier - but it would not make it
any easier to get a slashing wound. As it stands wound penalties are for
wounds globally

Scar files are now picked in a "priority" list, where the wound checks
to see if the limb has a biostate before moving down in said list.
Example: Wounds will check for flesh first, if it finds it - it will use
the flesh scar list. Failing that, they then check bone - if it uses
that, it will use the bone scar list. This allows for significantly more
modular scars that dont even need much proc editing when a new wound
type is added

Misc changes: most initial() usage has been replaced by singleton
datums, wound_type is now wound_types and thus wounds can accept
multiple wound types, wounds can now accept multiple tool behaviors for
treatment, wounds now have a picking weight so we can make certain
wounds rarer flatly,

This PR also allows for wounds to override lower severity wounds on
generation, allowing eswords to jump to avulsions - but in spirit of
refactoring, this has been disabled by default (see pregen data's
competition_mode var).
## Why It's Good For The Game

Code quality is good!

Also, all the changes above allow wounds to be a MUCH more modular
system, which is one of its biggest problems right now - everything is
kinda hardcoded and static, making creative work within wounds harder to
do.

## Changelog
🆑
refactor: Refactored wounds yet again
fix: Wounds are now picked from the most severe down again, meaning
eswords can jump to avulsions
fix: Scar descs are now properly applied
/🆑
2023-09-09 19:20:21 -04:00
san7890
4b8de7b79f Refactors the notransform variable into a trait. (#78146)
## About The Pull Request

Hey there,

There were more than a few times (like in cinematic code) where we might
need to accurately know the source of what's adding this trait (or have
multiple sources for the whole 'we don't want this mob to do shit while
we transform this mob'), so in order to rectify this potential issue,
let's refactor it into a trait.

## Why It's Good For The Game

Some code already declared that there might be issues with this being a
boolean var (with no way of knowing _why_ we don't want this mob to not
transform (or not do anything idk). Let's remove those comments and any
future doubt in those instances with the trait macros. Also, stuff like
`TRAIT_IMMOBILIZED` which does a similar thing in many contexts was
already a trait that was regularly added in conjunction with flipping
the variable, so we're able to flatten all that stuff into
`add_traits()` and `remove_traits()` now. nice

I also cleaned up quite a bit of code as I saw it, let me know if it
should be split out but I guarantee that if I didn't do it- no one will
for the next two years.

## Changelog

🆑
refactor: If you transform into another mob and notice bugs with
interacting with the game world, please create a bug report as this
framework was recently refactored.
/🆑

Probably fucked up somewhere, lmk

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-09-07 16:45:50 +01:00
Sealed101
d93dfbc35c Adds Summon Cheese (#77778)
oh apparently this is my 100th PR on tg, which is weird because github
reports 99 total, and i made at least one to the old voidcrew repo, and
filtering tg prs by my name still shows 99. weird. here's to 100 more i
guess?

<sub>could have been better if it was a get, jhonflupwliiard watch ur
back 🔫 </sub>

## About The Pull Request

Adds a new spell granter book to the Wizard's Den - Summon Cheese, which
grants the spell by the same name, which summons 9 heads of cheese.
That's about it, I think.

## Why It's Good For The Game

Wizards are a hungry bunch, so why can't they just summon food? They can
even share, if they'd like, since the notion of a friendly wizard still
exists

<details>
<summary>... </summary>

alright fine
i'm slightly malding over not getting the 77777 get so no more
roleplaying in the pr body

Wizard Grand Ritual now has a hidden goal of sacrificing 50 cheese
wheels. Sacrificing a cheese wheel is done with invoking the grand rune,
and each invocation/pulse of the rune will whisk away more cheese until
all cheese on the rune is taken by whichever entity lurks in the other
realm. The sacrifice will be hinted at in an _ancient parchment_ which
will be on the bookshelf (when i add it lmao) alongside the spell book.

Meeting this cheese goal will lock the wizard's grand finale rune and
grand finale effect to special ones. The cheese rune is mostly identical
to the normal grand rune, barring the custom sprites/animations.
The cheese finale consists of the wizard getting permanent Levitation
(nogravity + free space movement), a 0.5 modifier(reducing incoming
damage in half) to every damage type, a comically strong mood buff and
**The Wabbajack**(separate sprite pending) - a juiced up chaos staff
which can fire a lot more projectiles than a normal one can (it will get
more, I may even make a few just for it).
Everybody else (including any invader antags) gets hallucinations, 175
brain damage and a comically strong mood debuff, as well as a vendetta
against the wizard. If the victim was already suffering from
hallucinations from a trauma (including the quirk), they are instead
healed.

if you didn't catch the obvious reference, this entire shtick is a
tribute to Sheogorath. the rune makes use of daedric script, and most of
the catchphrases are a direct quotation of the Daedric Prince of
Madness, so if any of those things can get us in trouble somehow, let me
know. i will be sad but i will comply.

This shtick is intended as an easter egg, really, so I wasn't really
planning on expanding the wizard grand finale into heretic paths thing
or whatever.

Oh, and finale grand runes now allow the wizard to select the effect
even if it's time-gated. If it is, you just won't be able to invoke it
until the time comes. The rune will tell you how much time is left until
you can invoke it. And grand finale runes with a finale effect selected
also glow in the color of their effect. I also think I fixed some step
of the grand rune animation not triggering but I'm not sure.

<details><summary>Some rune animations (some are subject to
change)</summary>


![rune_cheese_activate](https://github.com/tgstation/tgstation/assets/75863639/62ae184d-b6fc-4883-a169-4d8ca7636b40)


![rune_cheese_flash_2](https://github.com/tgstation/tgstation/assets/75863639/619545c8-3c55-4264-bfa4-d40067ef7406)


</details> 

## Why It's Great For The Game

it's funny

</details> 

## Changelog


🆑 Sealed101, EBAT_BASUHA for spritework
add: Wizard's Den now has a book of Summon Cheese in the Studies Room
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-08-31 10:31:33 -06:00
nikothedude
554edc60e9 [TEST-MERGE FIRST] Allows all limbs to be dismembered and significantly refactors wounds (#77813)
## About The Pull Request
**_THIS PR UPDATES THE SCAR VERSION - ALL EXISTING SCARS WILL BE
WIPED_**

Expands the wound system functionality to support any type of limb at
all.

To do this, wounds have been significantly refactored. For starters,
wounds now use limb biotype instead of wound type for determining what
they can be applied to. They also use singleton instances for most "can
we apply this" checks instead if copy pasted initial().

Wounds now use a "wound series" instead of wound_type for determining
the, well, series. Previously, all WOUND_BLUNT wounds were considered
bone wounds, making it impossible to have multiple WOUND_BLUNT wounds at
once. Now, its based on wound series - bone wounds are of the blunt bone
wound series, and use the typical logic.
One change that results from this is the ability for everything with a
jointed limb to get a dislocation. Yes, this includes things like
prosthetics.

On the note of external and internal biotypes: Exterior are bones,
Interior is flesh. Interior protects exterior from slash until its
mangled, at which point it either exposes exterior to slash or allows
dismemberment if theres no exterior.
Basically - it acts the exact same way, except its not hardcoded, and
its more modular.

A lot, lot more changes were made - I cant name them all, but if youre
interested, you can read up. Wounds have more procs, more
modularization, and less hardcoding.

Sadly, scars have been updated in such a way so that the wound version
must be updated. Scars will be deleted.

## Why It's Good For The Game

As it stands, half the limbs in the game can't be dismembered. This
changes that, allowing every single limb to be dismembered.

The two dismemberment critera are now:

1. If able to get mangled flesh or bone, it can be dismembered once it
gets mangled flesh and bone (or JUST flesh if it only has a internal
biostate, vice vers afor bone if external only)
2. If it cant be dismembered by the above, it will have a chance to
dismember when at or above 80% of its total max damage

Finally, code being better is usually a good thing.

## Changelog
🆑
balance: Prosthetics and slimepeople can now have limbs dismembered
balance: Slimepeople can now receive slash wounds, but cannot bleed
balance: Most limbs can now be dislocated
refactor: Scar backend reworked, scars will be wiped as they update to
the new format
/🆑
2023-08-29 21:00:36 -04:00
MrMelbert
b83f115501 Fixes Shadow Walk (#77518)
## About The Pull Request

Phased mobs are not turfs so the new check failed.

Fixes this and adds a unit test for it.

Also makes shadow walk VV-able to any level of lightness.

## Changelog

🆑 Melbert
fix: Fixes Shadow Walk
/🆑
2023-08-11 20:44:31 -06:00
Jacquerel
497f18ea32 Spiders don't automatically grant an antag datum (#77523)
## About The Pull Request

Fixes #77501

Spider egg ghost role spawners grant the spider antag datum, rather than
the act of being a spider.
This means that gold core, mapstart, polymorph belt, and other spiders
will not have an antagonist datum.

While doing this I also made a new abstract `mob/living/basic/spider`
type which all three kinds of spider life stage (`spiderling`, `young`,
`giant`) extend from, because there was a gross amount of copied code.
Now there isn't.

Also the Flesh Spider and Event Midwife eggs now simply hatch adult
spiders instead of child ones.
This is because there is no reason for either of these to have a two
minute wait time before they get going. Midwife spiders spawned by the
event should just start spidering immediately, and Flesh Spiders are
made by changelings and shouldn't be effected by measures introduced to
balance the spider gamemode.
Eggs which are laid during a round and _can_ hatch into midwife spiders
still hatch baby spiders.

Also I swapped some white pixels on the animation of the ambush
spiderling for a different colour because they looked bad.

## Why It's Good For The Game

While the policy is always "if you turn yourself into something, you're
not an antagonist" the presence of the antag datum still confuses
people. Plus that code was gross and I didn't like it.

## Changelog

🆑
fix: Giant Spiders only have an antag datum if created by the round
event.
balance: Flesh spider eggs hatch into adult spiders instead of baby
spiders.
balance: The eggs spawned by the start of the spider infestation event
hatch into adult Midwife spiders instead of baby ones.
/🆑
2023-08-11 20:43:04 -06:00
carlarctg
66b8748091 Adds Summon Simians & Buffs/QoLs Mutate (#77196)
## About The Pull Request

Adds Summon Simians, a spell that summons four monkeys or lesser
gorillas, with the amount increasing per upgrade. The monkeys have
various fun gear depending on how lucky you get and how leveled the
spell is. If the spell is maximum level, it only summons normal
gorillas.

Added further support for nonhuman robed casting: Monkeys, cyborgs, and
drones can all now cast robed spells as long as they're wearing a
wizardly hat as well.

Made monkeys able to wield things again.

Wizard Mutate spell works on non-human races. It also gives you
Gigantism now (funny). If the Race can't support tinted bodyparts, your
whole sprite is temporarily turned green.

Made Laser eyes projectiles a subtype of actual lasers, which has
various properties such as on-hit effects and upping the damage to 30.

Improved some monkey AI code.

## Why It's Good For The Game

> Adds Summon Simians, a spell that summons four monkeys or lesser
gorillas, with the amount increasing per upgrade. The monkeys have
various fun gear depending on how lucky you get and how leveled the
spell is. If the spell is maximum level, it only summons normal
gorillas.

It's criminal we don't have a monky spell, and this is a really fun spin
on it. Total chaos, but total monky chaos. It's surprisingly strong,
but! it can very well backfire if you stay near the angry monkeys too
long and your protection fades away. Unless you become a monkey
yourself!!

> Wizard Mutate spell works on non-human races. 

This spell is great but it's hampered by the mutation's human
requirement, which is reasonable in normal gameplay. Wizards don't need
to care about that, and the human restriction hinders a lot of possible
gimmicks, so off it goes. Also, wizard hulk does't cause chunky fingers
for similar reasons

> Made Laser eyes projectiles a subtype of actual lasers, which has
various properties such as on-hit effects and upping the damage to 30.

Don't really caer about the damage so much, this is more so that it has
effects such as on-hit visuals. Can lower the damage if required, but
honestly anything that competes against troll mjolnir is good.

> Added further support for nonhuman robed casting: Monkeys, cyborgs,
and drones can all now cast robed spells as long as they're wearing a
wizardly hat as well.

SS13 is known for 'The Dev Team Thinks of Everything' and I believe this
is a sorely lacking part of this or something. It's funny.
I want to see a monkey wizard.

> Made monkeys able to wield things again.

I really don't know why this was a thing and it was breaking my axe and
spear wielding primal monkeys. Like, why?

## Changelog

🆑
add: Adds Summon Simians, a spell that summons four monkeys or lesser
gorillas, with the amount increasing per upgrade. The monkeys have
various fun gear depending on how lucky you get and how leveled the
spell is. If the spell is maximum level, it only summons normal
gorillas.
balance: Wizard Mutate spell works on non-human races. It also gives you
Gigantism now (funny). If the Race can't support tinted bodyparts, your
whole sprite is temporarily turned green.
balance: Made Laser eyes projectiles a subtype of actual lasers, which
has various properties such as on-hit effects and upping the damage to
30.
add: Added further support for nonhuman robed casting: Monkeys, cyborgs,
and drones can all now cast robed spells as long as they're wearing a
wizardly hat as well.
balance: Made monkeys able to wield two-handed things again.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-08-09 21:28:46 +01:00
Jacquerel
b159edcc2f Anomaly gear: Polymorphic Field Inverter (#77383)
## About The Pull Request

Adds a new device you can research called the "Polymorphic Field Inverter".
It requires Advanced Biotechnology and Anomalous Research to unlock.

Completing that research lets you print out a fancy belt. Using it for 5
seconds on a mob (dead or alive) which is organic in nature and isn't
some kind of human or megafauna (monkeys are fine) will store a copy of
its DNA. Scanning another creature will replace the original stored DNA.
Storing DNA does absolutely nothing unless you have also inserted an
active Bioscrambler core.

If the item is activated with a Bioscrambler core then equipping it
grants you the ability to transform into the same kind of creature as
the one you scanned (and back). As in spells such as Wildshape you share
health with your transformed form and if you die while transformed then
you die, so be careful when turning into something like a cockroach
which has one hit point.

It has an associated experiment which makes the research free, which is
to scan two humans with (non-prosthetic) organs that they didn't have
when the round started. You can accomplish this through surgery, DNA
infusion, or a bioscrambler anomaly. You can do it on some monkeys if
nobody is cooperating with you.
I copied a teeny bit of this code from #73969 although I didn't actually
end up needing most of it.

These are absolutely codersprites so if anyone wanted to make cooler
ones, let me know.
2023-08-09 12:23:01 -05:00
MrMelbert
7721e96d3d Abductor / general "Summon Item" spell QoL (#77419)
## About The Pull Request

- Abductor Baton Recall now starts linked to the Abductor's Baton
- Did some misc. spell changed to the abductor baton recall to make it
less spell-like
- Fixes Instant Summon's name not changing to "Recall whatever item"
when an item is marked
- Instant Summons now displays the item marked on the button 

## Why It's Good For The Game

Having to mark the abductor baton is bad UX, when making it start marked
is pretty trivial.

Also this just helps it be a lot more obvious what is linked to what if
you end up having more than one instant summons known.

## Changelog

🆑 Melbert
qol: Abductor Baton Recall now starts linked to their baton, and you can
no longer unlink your baton
qol: Instant Summons now shows what item is marked over the icon
fix: Fixes Instant Summon's name not updating when marking an item
/🆑
2023-08-08 17:56:21 +01:00