Commit Graph

650 Commits

Author SHA1 Message Date
MrMelbert
373cd851d8 Fix mousedrop handling on some atoms (#83971)
## About The Pull Request

One should really err on the side of caution when preventing all humans
from being mousedroppable entirely

## Changelog

🆑 Melbert
fix: Human mousedropping
/🆑
2024-06-13 23:45:58 -06:00
SyncIt21
b6369a47b4 Mouse drag & drop refactored attack chain (#83690)
## About The Pull Request
Mouse drag & drop has been refactored into its own attack chain. The
flowchart below summarizes it

![Flowchart](https://github.com/tgstation/tgstation/assets/110812394/d92047ff-d94c-44a6-9e87-354c3d525021)

Brief summary of each proc is as follows

**1. `atom/MouseDrop()`**
- It is now non overridable. No subtype should ever touch this proc
because it performs 2 basic checks
  
a) Measures the time between mouse down & mouse release. If its less
than `LENIENCY_TIME`(0.1 seconds) then the operation is not considered a
drag but a simple click

b) Measures the distance squared between the drag start & end point. If
its less than `LENIENCY_DISTANCE`(16 pixels screen space) then the drag
is considered too small and is discarded

- These 2 sanity checks for drag & drop are applied across all
operations without fail
  
**2. `atom/base_mouse_drop_handler()`**
- This is where atoms handle mouse drag & drop inside the world. Ideally
it is non overridable in most cases because it also performs 2 checks
- Is the dragged object & the drop target adjacent to the player?.
Screen elements always return true for this case
  
- Additional checks can be enforced by `can_perform_action()` done only
on the dragged object. It uses the combined flags of
`interaction_flags_mouse_drop` for both the dragged object & drop target
to determine if the operation is feasible.
     
We do this only on the dragged object because if both the dragged object
& drop target are adjacent to the player then `can_perform_action()`
will return the same results when done on either object so it makes no
difference.

Checks can be bypassed via the `IGNORE_MOUSE_DROP_CHECKS` which is used
by huds & screen elements or in case you want to implement your own
unique checks

**3. `atom/mouse_drop_dragged()`**
- Called on the object that is being dragged, drop target passed here as
well, subtypes do their stuff here
- `COMSIG_MOUSEDROP_ONTO` is sent afterwards. It does not require
subtypes to call their parent proc

**4. `atom/mouse_drop_receive()`**
- Called on the drop target that is receiving the dragged object,
subtypes do their stuff here
- `COMSIG_MOUSEDROPPED_ONTO` is sent afterwards. It does not require
subtypes to call their parent proc

## Why It's Good For The Game
Implements basic sanity checks across all drag & drop operations. Allows
us to reduce code like this


8c8311e624/code/game/machinery/dna_scanner.dm (L144-L145)

Into this

```
if(!iscarbon(target))
	return
```

I'm tired of seeing this code pattern `!Adjacent(user) ||
!user.Adjacent(target)` copy pasted all over the place. Let's just write
that at the atom level & be done with it

## Changelog
🆑
refactor: Mouse drag & drop attack chain has been refactored. Report any
bugs on GitHub
fix: You cannot close the cryo tube on yourself with Alt click like
before
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2024-06-13 13:28:41 -07: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
Afevis
129283d01c Spooky element fixes (#83795)
fixes the mood event not being applied, found in #83741

🆑 ShizCalev
fix: The spooky element will now apply the spooked mood event when
someone is spooked.
fix: Fixed spookers getting a popup message when spooking mobs not
actively controlled by a player.
/🆑

also a minor grammar fix for the name of spooky skeletons.
2024-06-08 19:26:03 -04:00
EnterTheJake
20c3b0eb3b [NO GBP] Post-Rust Heretic's Rework adjustments. (#83765)
## About The Pull Request
Fixes antimagic, not preventing the disgust builtup from standing on
rusted tiles, makes rust walkers more expensive to summon.
## Why It's Good For The Game

I'm very happy with the end result of my Rust heretic rework; but they
came up a tad stronger than i wanted them to be.

Carlac already changed the Vomit stun to knockdown, but i wanted to add
a couple of things myself.

Having anti magic now makes you fully immune to the effects of rusted
tiles, not just the spells.

Rust walkers summoning ritual now requires titanium instead of iron
sheets.

As of right now, they are way too easy to spam, Titanium is a bit harder
to come by than iron so that'll do for now.

I was planning to set a limit to how many you can summon at the time,
but i'd rather wait a few months to see how rust behaves before i add
more nerfs.
## Changelog
🆑
balance: Rust walkers' summoning ritual now requires 5 sheets of
Titanium instead of Iron.
fix: Magic resistance grants complete immunity from the passive disgust
buildup from standing on Rusted turfs.
/🆑
2024-06-07 13:35:39 -04:00
zxaber
f26e2bb58c Fixes tool-based flashes being stuck at intensity 1 (#83703)
## About The Pull Request
A long-old bug due to the use of `min(flash_strength, 1)`. The intention
was clearly to have the flash be *at least* level 1, because
flash_strength defaults to nothing but can be set to 2. However,
`min(x,y)` uses the lowest value, making it always return 1. So we
change it to `max()`.
## Why It's Good For The Game
Bugfix. Sunglasses users cope.
## Changelog
🆑
fix: Tool-based flashes (read: from welders) are no longer incorrectly
locked at flash level 1. Wear proper PPE!
/🆑
2024-06-06 00:41:40 -04:00
Rhials
ab9cc35c48 Graveyard update take two (#83567)
## About The Pull Request

**PR body copied from last PR (#83149). I fucked something up (I think
by leaving dream maker open while trying to fix the merge conflicts?)
and rather than try and walk backwards I'm just making a new branch.**

This implements the digging of graves on most soil/dirt/planetary type
turfs, and gives the coroner their own private burial ground.

**Change 1 - Gravedigging:**

You can right-click planetary/dirt/grass tiles using a shovel or shovel
subtype (or entrenching tool). Speed varies on the type of shovel you
are using. This creates a Makeshift Grave, an unmarked burial mound
(different from the ones at the elephant graveyard).

This is handled through the new gravedigger component, which is mostly
unremarkable but worth mentioning in case anyone wants to add this
behavior elsewhere.

**Change 2 - Icebox Morgue Graveyard:**


![image](https://github.com/tgstation/tgstation/assets/28870487/e154dd79-9431-49b4-b3fd-9c932448c8cd)

The icebox morgue now has private burial ground, sealed off by a fence.
Mourners are expected to keep out and perform their grieving at the
appropriate distance. This does not affect the chaplain's burial ground,
which is publicly accessible from the outside. This gives a more secure
place to bury bodies (I'm sure someone will have a reason for this some
day) and may lead to fighting over corpses, which I think is funny.

Also, there might be some goodies left in those graves, but you wouldn't
go graverobbing just for some useless loot, would you??

This also adds a new area type, graveyard, which is mostly just the
icemoon outdoors with the spooky ambiance of the morgue.


![image](https://github.com/tgstation/tgstation/assets/28870487/57a3d790-4941-4130-b4de-ef524383e560)
## Why It's Good For The Game

Now you can bury your friends in an unmarked grave! Bury people alive!
Bury your treasure, or reminders of the sins you've committed! Bury
anything, anywhere you want!

The morgue graveyard is a nice bit of flavor. I know the Chaplain
already gets one (I forgot this when I started this PR though) but the
Coroner is an equal-if-not-more-important corpsekeeper than them.
## Changelog
🆑 Rhials
add: Shovels and entrenching tools can be used to dig graves on
asteroid/dirt/etc. surfaces. Neat!
add: The Icebox Morgue has been given a fenced-off graveyard in the
back.
code: burn_tile() is no longer double-defined on asteroid turfs.
/🆑
2024-06-02 02:52:52 +01:00
AnturK
53b73559bb Fixes decals compounding on shuttles (#83548)
Fixes #83535
Fixes #76382

Just a missing UnregisterSignal.
2024-05-29 21:23:36 +02:00
Jacquerel
cb5a97c3d6 [no GBP] Corrupt organs check patient for Holy Water, not surgeon (#83500)
## About The Pull Request

Was looking into #83493 and I have no idea how that happens but I _did_
notice this unrelated runtime and logic error.
Due to the args being incorrect, we were checking the status of the
surgeon performing the operation rather than the person the organ was
being removed from.

## Changelog

🆑
fix: When removing a corrupted organ from a patient, the patient will
now be checked for Holy Water or magic resistance, rather than the
person performing the surgery.
/🆑
2024-05-29 14:22:25 -04:00
Lucy
a2f8875986 Fix issues resulting from an elevated object being created inside of a non-turf atom (#83498)
## About The Pull Request

If an elevated object is initialized inside of a non-turf atom, it'll
still make the turf it is on elevated. Permanently. Which is weird.

## Why It's Good For The Game

Randomly elevated turfs are bad. Bugs bad.

## Changelog
🆑
fix: Fix a rare issue where a turf would remain permanently "elevated"
if an elevated object was initialized inside of a non-turf object.
/🆑
2024-05-28 14:05:31 -06:00
EnterTheJake
459bf38be9 Fixes Rust Victims being permanently exiled to the puke-zone. (#83417)
## About The Pull Request

closes : https://github.com/tgstation/tgstation/issues/83375


## Why It's Good For The Game

Deleting Heretic rust you are standing on now properly deletes the
status effect.

## Changelog

🆑

fix: Rust debuffs now gets properly removed if you derust a tile you are
standing on.
/🆑
2024-05-27 10:48:14 -06:00
YesterdaysPromise
8eb3b51ad9 /icons/ folder cleansing crusade part 3 (#83420)
## About The Pull Request

In my effort to make the /icons/ folder cleaner and more intuitive
instead of having to rely on recalling names of stuff and looking them
up in code to find them for poor sods such as myself, plus in spurt of
complusion to organize stuff, here goes. I've tracked all changes in
commit descriptions. A lot still to be done, but I know these waves go
over dozens of files making things slow, so went lighter on it.
Destroyed useless impostor files taking up space and cleaned a stray
pixel on my way.

## Why It's Good For The Game

Cleaner /icons/ file means saner spriters, less time spent. Stray pixels
and impostor files (ones which are copies of actually used ones
elsewhere) are not good.

## Changelog

🆑
image: Cleaned a single stray pixel in a single frame of a bite
telegraphing accidentaly found while re-organizing the files.
/🆑
2024-05-25 21:08:08 -07:00
Ben10Omintrix
90cc66953e adds a new fish to lava and plasma rivers (#83146)
## About The Pull Request
this pr adds a new fish to lavaland and icebox, the lavaloop! i noticed
neither has any exclusive fish so im trying to add one of my own. u can
find this fish by using reinforced rods on lava or plasmarivers. this
fish is also lobstrosity's favorite delicacy as you will now often see
AI controlled lobstrosities fishing for it in lava and then eating it.

![fished](https://github.com/tgstation/tgstation/assets/138636438/03cd4095-940d-4cc0-8d1e-2064cae1921d)

because of its body's curvature and razor sharp spikes, this fish can
also be used as a make-shift boomerang weapon against mining mobs,
although it comes with some new mechanics. u can increase the damage it
does to mobs by winding up ur throw. when the bar reaches purple, this
indicates maximum damage. however, if it goes over the purple, it will
react violently and explode your arm off, so you have to time it just
right to get the best damage possible. On icebox, instead of dealing raw
damage, fish will freeze mobs depending on how long you charged ur
throw. charging it for too long will cause the fish to freeze you
instead


https://github.com/tgstation/tgstation/assets/138636438/c8ac3696-3705-45b0-bc43-c5b81d75cb1b

while its nowhere near as effective as using PKA's or crushers, it can
be a useful tool for hermits and ashwalkers.
## Why It's Good For The Game
having lobstrosities fish and hunt for it makes lavaland feel more like
an ecosystem with a food chain. also i think tossing fish at eldritch
horrors is a funny way to fight them

## Changelog
🆑
add: adds a new fish to lava and plasma rivers, the lava loop
/🆑
2024-05-22 23:11:45 -06:00
Ben10Omintrix
761b14ef7c lavaland raptors (#82537)
## About The Pull Request
adds raptors to lavaland. these are creatures that have been created
through countless xenobiological experiments by nanotrasen to breed an
animal that can withstand the harsh conditions of lavaland and aid
miners. theres now a new ranch miners can access bottom right to the
mining base

![ranch](https://github.com/tgstation/tgstation/assets/138636438/20d9e358-15a5-48e2-aee3-9364ca139e43)
this ranch starts somewhat empty as most raptors have escaped
containment and are now scattered all across lavaland, u can find them
and return them to ur ranch.

in order to tame a raptor, u first need to prove to it that ur a capable
master. when u try to ride it, a little minigame prompt will pop up

![minigame](https://github.com/tgstation/tgstation/assets/138636438/dcc13102-7100-40c8-ae7a-089cd4daf868)
in this game, the bird's icon rapidly changes direction and u have to
quickly click the arrow thats OPPOSITE to the direction its facing
several times before the direction changes. if you fail 3 times itll
knock you off and run away, however if u win it will deem u a suitable
master and listen to your orders.

There's many different breeds of raptors you can find across lavaland,
all with different capabilities:
red raptors: these excel at combat and can be very useful for dealing
with lavaland mobs or defending the node drone
yellow raptors: are very speedy mounts, theyll get u from point A to
point B in record time
green raptors: they are the tankiest type of raptor and are very good
miners. while mounted, they will clear any rock walls in their path
purple raptors: can store items in them. they have a decent storage size
allowing players to carry more items across trips
white raptors: are able to heal other injured raptors. having one in ur
party would be very useful as they can nurse the combat raptors back to
full health when they need it
blue raptors: produce very nutritious milk with healing capabilities.
having 1 or 2 of these back at ur ranch would be very useful
black raptors: by far the rarest breed, its very unlikely that ull be
able to get one of these, but in the case u do, they have the combat
capabilities of the red raptor, speed of the yellow raptor, and
tankiness of the green raptor.

Breeding different colored raptors together can net u an entirely new
colored raptor. each breed has atleast 1 guaranteed combination of
parents that it will result out of.

you will also need to maintain a good friendship bond with ur raptors,
this is done by feeding them, grooming them, and petting them. u can see
the strength of ur bond by SHIFT clicking them. more hearts indicate a
stronger bond

![hearts](https://github.com/tgstation/tgstation/assets/138636438/5662c5a7-2df3-4f98-99f4-a11faa17b569)
having higher friendship bonds means ur raptors will perform better in
combat, and in the case of blue raptors, they will produce more milk.
Maintaining friendship bonds with baby raptors and keeping them happy
will also encourage them to grow faster

U can also analyze raptors using the new raptor-dex device available at
ur ranch

![pokedex](https://github.com/tgstation/tgstation/assets/138636438/82b92c0c-b7db-4a0d-997e-384a69c0ecbe)
the inherit modifiers indicate how strong this raptor's offspring will
be. raptors inherit attack and health stats from both their parents,
breeding raptors with higher inherit modifiers means the offspring will
be stronger.

raptors will also inherit some traits from their parents that will
change how they will act around u and around other raptors, some of them
being:
Playful: raptors will play with their masters and tease them
motherly: raptors will care for baby raptors, this will encourage baby
raptors to grow quicker
depressed: means its hard to keep this raptor happy and friendship bonds
will deteriorate faster if not given enough care.
coward: makes them flee combat if severly injured, ditching u to the
wolves
trouble maker: makes them attack other raptors at the ranch. however,
trouble maker raptors will not attack other trouble maker raptors,
instead they will form posses and bully raptors together. it might be a
good idea to isolate them from the other raptors

raptors primarily consume ores. to feed raptors, you need to place ore
into the food troughs at the ranch. they are too civilized to eat ores
off the ground or directly from ur hand, they will only eat it if its in
their trough

![trough](https://github.com/tgstation/tgstation/assets/138636438/70723cc7-5743-4ace-9955-4307879e7a83)

beautiful raptor sprites by spessmenart! (rest are codersprites)

## Why It's Good For The Game
adds a new layer to lavaland mobs, and gives miners new interesting
tools and ways to tackle the challenges of lavaland.

## Changelog
🆑 sheets, spacemenart, ben10omintrix, goofball, infrared baron, aofie
add: adds lavaland raptors and the raptor ranch
/🆑

---------

Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
2024-05-16 19:54:00 -07:00
John Willard
f1a22b367d Changes how lube crawling works and fixes a bug with snails (#83238)
## About The Pull Request

This partially reverts https://github.com/tgstation/tgstation/pull/76336
- Just for slimepeople since it's the only one that felt important to be
tied to species.
Snails are currently pretty fast when they are crawling around, but on
top of that they are also able to get their legs replaced to become 3x
faster than normal humans while resting. It's a little silly, and I
thought I should fix it.

I also changed the element itself to be easier for admins to edit,
giving them control over time and wet flags, and made it work a little
better.
Instead of being hardcoded to listen to carbons and to register every
step to check if they are resting, calling add/remove movespeed modifier
every single time they move, we are told whether they have to be
resting, and update when they get up/lie down. This has an extra bonus
that admins can control whether or not they want to make simple/basic
animals have to rest to lube things (like cats).

## Why It's Good For The Game

Closes https://github.com/tgstation/tgstation/issues/78417
Makes the lube spitting element that (primarily) snails use into a more
general thing that can be used by admins or other contributors that want
to make things wet thing as they walk for some time.
Also no insanely fast snails anymore.

## Changelog

🆑
fix: Snails no longer move at normal speed while resting.
fix: Snails can no longer get insane speed from getting their legs
replaced.
fix: Humans don't become immensely slow when getting a Snail leg.
admin: lube walking element is now much easier to mess with to fit
however you want to use it for.
/🆑
2024-05-16 23:46:03 +02: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
Jacquerel
f358423a1e Replace Heretic Phobia with Cursed Organs (#83082)
## About The Pull Request

Being sacrificed by a Heretic no longer applies an incurable brain
trauma that gives you a phobia of Heretic-associated items.
Instead it does the following things:

- Removes 2-4 of your organs and leaves them behind on the sacrificial
circle, replacing them with "corrupt" organs with negative effects.
- Gives you an unremovable "curse" debuff which will cause you to
immediately cough a random organ out of your chest if you attack or are
attack by the person who sacrificed you, **if they are wearing a Focus
at the time.**

Corrupt Organs can be removed via surgery, although doing so is
dangerous.
A removed corrupt organ will often either immediately explode for a
small (but not insignificant) amount of burn damage to everyone nearby,
or it will animate itself as a haunted object and be a general nuisance
until subdued.
A patient dosed with Holy Water can always have their organs removed
without consequence.
Chugging Holy Water will also suppress most of the negative effects of
your corrupt organs.

The effects of Corrupt Organs are as follows:
- **Eyes:** All Heretics **and also a selection of additional random
people** are completely invisible to you. You can still see their
runtext (or "hear") them, but they otherwise cannot be seen. And as you
can't see them you also cannot click on them.
- **Tongue:** When you speak, your language will sometimes be replaced
by "Shadowspeak", understood only by Curators and Nightmares. This is
less of an impediment during Halloween because of the friendly
Shadowpeople.
- **Liver:** When you drink something, it will add extra reagents to
your sip from a pool largely composed of alcohol and hallucinogens.
- **Stomach:** Your hunger will deplete significantly faster if you do
not regularly ingest blood. (Fun fact: Did you know that a drinking
glass full of blood automatically relabels itself "tomato juice"?)
- **Heart:** You will continue to be intermittently tormented by
frightening hands.
- **Lungs:** You will intermittently cough out dangerous or unpleasant
gases.
- **Appendix:** Very infrequently you will vomit out several hostile
worms.

Most of these effects aren't present while you're dodging the spooky
hands in the Mansus realm.
Plasmamen never have their lungs replaced because they'd immediately
start choking on their internals and that is annoying. Ethereals _do_
have their hearts replaced so may be surprised to find that they don't
respawn when killed if they don't get a new one.
I would haved called them Cursed Organs but the Cursed Heart already
exists.

## Why It's Good For The Game

Nobody enjoys the Heretic phobia from any angle.
Phobias suck to deal with in general. and while being scared of all
Heretic stuff from that point on is mildly flavourful it's not very
interesting.
This alternative hopefully provides a more interesting answer (which
should provide more storytelling and interaction with other people) to
the problems that the original change intended to address:
Making sure that nonlethal sacrifices still feel significantly bad
enough that you're not going to volunteer, and as an extra layer of
protection to ensure that someone you sacrificed functionally ceases to
be a threat to you.

## Changelog
🆑
del: Being sacrified by a Heretic no longer gives you an incurable
phobia.
add: Being sacrificed by a Heretic will drop 2-4 of your organs on the
ground and replace them with "corrupt organs" with negative effects
which can be suppressed with Holy Water.
add: Players who have been sacrificed by Heretics will experience
additional and rapidly lethal consequences for attempting to fight
someone who previously sacrificed them, as long as that person is
wearing a focus.
/🆑
2024-05-08 19:40:16 -06:00
Ryll Ryll
8bbfd225cd Pacifists can no longer endlessly spam rocket launcher backblasts (#82992)
## About The Pull Request
Fixes: #82990 

Backblasts from a rocket launcher are often the last thing an untrained
person thinks of when they fire a rocket launcher. I did not consider
the moral stance of pacifists who nevertheless try to shoot rocket
launchers when I implemented rocket launcher backblast, because
currently pacifists trying to shoot a loaded rocket launcher can spam
backblast as much as they want, even if they aren't able to actually
shoot.

This PR filters out pacifists before they trigger the backblast, to make
sure only actual live shots deliver the hellpayload to their allies
behind them.
## Why It's Good For The Game
A magical reverse flamethrower with no ammo limit (because at no point
is the rocket in the chamber actually expended when a pacifist fails to
fire it) is bad. A weapon as destructive as that left solely in the
hands of pacifists is even worse.
## Changelog
🆑 Ryll/Shaps
fix: Pacifists can no longer endlessly spam the backblast functionality
of loaded rocket launchers that they cannot actually fire
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-05-02 20:03:41 -06:00
Joshua Kidder
7809dee900 Monkey eyes fix and noticable organ display refactor; AI monkeys no longer catatonic (#82669)
## About The Pull Request

It turns out monkeys being catatonic got broken 2 years ago in a PR that
was meant to fix something else; also, it turns out monkeys are supposed
to have primal eyes when turned into humans, and that got broken too. I
fixed both of those things, and while I was at it I did a refactor to
make it easier to give noticable organs (or anything else that you'd
want correct pronoun and verb tenses) easier to implement.

1) AI controlled mobs now properly display their noticable organs when
appropriate
2) Added some macros and a helper proc for replacing appropriate
pronouns and verb tenses in text
3) The noticable organ HTML is no longer broken, so you can pass text
with spans into it, if you want the text to be pretty or big or whatever
4) Monkeys are no longer catatonic if they have an active AI controller;
this goes for any carbon actually but I think monkeys are the only one
with AI controllers at the moment
## Why It's Good For The Game

Fixes the logic for displaying organs on AI controller mobs (currently
monkeys)
Makes it easier to add these kind of organs for carbons, AI controlled
or not, in the future

Look! An actual use-case for split editor:

![image](https://github.com/tgstation/tgstation/assets/49173900/8cd0d69e-8091-4431-9418-6bd29e1713b5)
## Changelog

Humanized monkeys now have their primal eyes again; monkeys with active
AI are no longer catatonic.
🆑 Bisar
fix: AI controlled monkeys are no longer catatonic, and they have primal
eyes again when turned into humans.
spellcheck: Noticable organs now have more modular grammar, and their
current grammar is fixed.
refactor: Refactored the code for displaying the messages for noticable
organs.
config: Added a documented define of all our pronouns
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-25 12:36:04 +01:00
Zephyr
404019dccc Revert "Borg movement now has sounds" (#82795)
Reverts tgstation/tgstation#82704

The sound ingame appears much louder than the original author intended.
Not to mention that the sound loops stack for every borg moving near
you.
2024-04-21 17:13:23 -06:00
Sadboysuss
43e850357e Borg movement now has sounds (#82704)
## About The Pull Request
adds sound effects to cyborgs when they move
Demo: 
https://imgur.com/a/7Mu98pQ

Open to feedback on this sound so please tell me what you think.
## Why It's Good For The Game
a hunk of metal moving at you without any sound is frightening
## Changelog
🆑 grungussuss
sound: cyborgs now have sounds to indicate they are moving
/🆑
2024-04-19 12:24:53 -06:00
Rhials
3af37616c9 Water tiles now put out burning atoms (#82735)
## About The Pull Request

This adds a new "watery tile" element, currently used for (you guessed
it) water turfs.

This makes a tile extinguish any atom that passes through it. It also
makes mobs wet!

![fire
test](https://github.com/tgstation/tgstation/assets/28870487/4a19c921-37f3-428d-bb94-0baef7589e1b)

This required a minor amount of under-the-hood work regarding
firestacks. Essentially, they now get put out when the atom-level
`extinguish()` proc is called, as they are now receptive to the
`COMSIG_ATOM_EXTINGUISH` signal.

## Why It's Good For The Game

It makes sense to me! If I was playing another simulation game and dived
into a pool of water on fire, only to remain on fire, I would be very
confused and disturbed.

Also, it's good for immersion. Get it? Like, because water tiles also
have the immerse element?
## Changelog
🆑 Rhials
qol: Water tiles now extinguish fires on items and people.
/🆑
2024-04-18 19:53:57 -04:00
MrMelbert
d280c9ccce Makes it EVEN EASIER to work with atom item interactions ft. "Leaf and Branch" & "Death to Chains" (#82625) 2024-04-18 05:17:39 -07:00
san7890
c1d4fbc2ba Regal Rats can now tear down posters (#82673)
## About The Pull Request

i was fixing something on bagil and someone who was playing a regal rat
(after the round ended) said they wanted to be able to tear down posters
as a regal rat so i decided to code it because it made sense.

it's an element so literally any mob can tear down posters but i can't
think of any other mobs that would make sense to let it tear down
posters so we'll leave it just for _The Champion of All Mislaid
Creatures_ for now
## Why It's Good For The Game

Regal Rats should be all about sludgemaxxing and fucking up maintenance
to make it look even more grody than it should be. Being able to tear up
those disgusting and well-drawn posters to leave behind nothing but
scraps fits that motif. The element has a `do_after()` just to make sure
His Holiness doesn't accidentally tear down his posters while clicking
(i think all mobs should have this but that's a different issue man)

also includes some code improvement and user feedback in some failure
cases that already existed in the code.
## Changelog
🆑
add: Regal Rats are now able to tear down those colorful posters those
weird grey creatures keep spackling up on the walls of their rightful
domain.
/🆑
2024-04-17 18:57:35 +01:00
LemonInTheDark
37aad4720d Reworks targeting behavior to fall back onto proximity monitors. Refactors ai cooldowns a bit (#82640)
## About The Pull Request

Nother bit ripped out of #79498
[Implements a get_cooldown() proc to get around dumb manual overrides
and empower me to optimize the findtarget
logic](7047d294dd)

[Adds modify_cooldown, uses it to optimize find_potential_targets
further](4ebc8cedce)

No sense running the behavior if we're just waiting on its output, so
let's run it once a minute just in case, then push an update instantly
if we find something

[Optimizes connect_range and
promxity_monitors](bcf7d7c5b3)

We know what turfs exist before and after a move
We can use this information to prevent trying to update turfs we don't
care about.

This is important because post these changes mobs with fields will be
moving a lot more, so it's gotta be cheap

[Implements a special kind of field to handle ai
targeting](80b63b3445)

If we run targeting and don't like, find anything, we should setup a
field that listens for things coming near us and then handle those
things as we find them.

This incurs a slight startup cost but saves so much time on the churn of
constant costs

Note:
We should also work to figure out a way to avoid waking ais if none is
near them/they aren't doing anything interesting

We don't need to do that immediately this acts as somewhat of a stopgap
(and would be good regardless) but it is worth keeping in mind)

## IMPORTANT

I am unsure whether this is worth it anymore since #82539 was merged. As
I say it was done as a stopgap because ais didn't know how to idle.
If not I'll rip er out and we'll keep the other
refactoring/optimizations.

## Why It's Good For The Game

Cleaner basic ai code, maybe? faster basic ai code, for sure faster
proximity monitors (significantly)
2024-04-16 17:37:46 -06:00
Jacquerel
4019835b3e Living Limb fixes (feat: Basic mobs attack random body zones again) (#82556)
## About The Pull Request

Reworks Living Limb code to fix a bunch of runtimes and issues I saw
while testing Bioscrambler.
Specifically, the contained mobs are now initialised via element
following attachment so that signal registration can occur at the
correct time. This allows limbs to function correctly when added from
nullspace via admin panel or bioscrambler.

Secondarily (and more wide-ranging) at some point (probably #79563) we
inadvertently made basic mobs only attack the target's chest instead of
spreading damage.
This is problematic for Living Flesh which can only attach itself to
damaged limbs but was left unable to attack damaged limbs.

I've fixed this in a way which is maybe stupid: adding an element which
randomises attack zone pre-attack.
Living limbs also limit this to _only_ limbs (although it will fall back
to chest if you have no limbs at all).
This is _technically_ still different, the previous behaviour used
`adjustBruteLoss` and `adjustFireLoss` and would spread the damage
across your entire body, but there isn't a route to that via the new
interface and this seems close enough.

## Changelog

🆑
fix: Living Limbs created by Bioscrambler will be alive.
fix: Living Limbs can once more attach themselves to your body.
balance: Living Limbs will prioritise attacking your limbs.
fix: Basic Mobs will once again spread their damage across body zones
instead of only attacking your chest.
/🆑
2024-04-13 15:30:14 -06:00
Jeremiah
1456aecdb4 [No GBP] Removes cogbar from some stealthy actions (#82593)
## About The Pull Request
Issue brought some missed hidden actions to my attention. 

I left cogbars in for _breaking_ handcuffs because resisting is sort of
a gray area. On one hand, you don't want someone to see you doing it; on
the other, there is a visible warning that you started doing it. So,
meet in the the middle, breaking handcuffs is still visible while
resisting isn't.
## Why It's Good For The Game
Closes #82583
Cogbars are not intended to ruin stealth
## Changelog
🆑
fix: Deviants buffed: Rogue shoelacing, pickpocketing and restraint
resisting no longer give cogbar icons.
/🆑
2024-04-12 13:47:52 -04:00
_0Steven
5e568288f4 Refactor renaming UNIQUE_RENAME items from the pen to an element (#82491)
## About The Pull Request

So a bit ago someone in code_general wanted to make plushies renamable,
but learnt that just adding the `UNIQUE_RENAME` flag wouldn't work as
pens would murder the plushie and only THEN let you rename it. I noted
refactoring both pens and plushies to use the new
`item_interaction(...)` procs would Just Solve This, but, well, they
didn't really have any coding experience.

But, hey, renaming being hardcoded to the pens has annoyed me ever since
I laid my eyes upon the hot mess that is paperwork code.
So here we are!

### We're making it an element.

There's not really much to this, this is mostly the same code but moved
to an element and with some minor cleanups.

First, we move it all from `/obj/item/pen` to a new element we called
`/datum/element/tool_renaming`. With this, instead of having it proc on
`/obj/item/pen/afterattack(...)`, we register it to proc on the
`COMSIG_ITEM_INTERACTING_WITH_ATOM` signal.

6e36ed9840/code/__DEFINES/dcs/signals/signals_atom/signals_atom_x_act.dm (L59-L62)
Secondly, we realize the code is just going through each if statement
regardless of whether the previous was correct.

6e36ed9840/code/modules/paperwork/pen.dm (L225-L258)
And, as we're dealing with text, just make it a switch statement
instead.
```dm
switch(pen_choice)
		if("Rename")
			(...)

		if("Description")
			(...)

		if("Reset")
			(...)
```
Then, we replace all single letter variables with descriptive ones,
replace the if-elses with early returns, and make it actually return
item interaction flags.

Finally, we slap this onto the pen, and we're done.
Now we can slap it onto other fitting renaming tools, and it uses the
proper item interaction system.
## Why It's Good For The Game

I feel it's generally better to not hardcode this to just pens, we have
plenty other writing utensils and possible renaming tools.
It's also a bit cleaner than before.
Apart from that, moves it from using `afterattack(...)` to the proper
item interaction chain by using `COMSIG_ITEM_INTERACTING_WITH_ATOM`,
which should reduce janky interactions.
## Changelog
🆑
refactor: Instead of being hardcoded to the pen, renaming items is now
an element. Currently only pens have this, and functionality should be
the same, but please report it if you find any items that were renamable
but now aren't.
/🆑
2024-04-12 03:30:32 +00:00
SyncIt21
227cdd2c7c [NO GBP] Patches & renaming for NO_DECONSTRUCTION flag (#82547)
## About The Pull Request

1. Renames `NO_DECONSTRUCTION` -> `NO_DEBRIS_AFTER_DECONSTRUCTION`. As
the name suggests when the object is deconstructed it won't drop any
items/debris. After my last refactor for this flag it now serves a new
purpose so its name has been changed to match that

2. Fixes objects that are now using `NO_DECONSTRUCTION` incorrectly.
Some of these changes include
- Removing the flag in objects where there are no means to deconstruct
them (e.g. jukebox, hydroponics soil, flora etc)
- Replacing the flags old purpose by overriding its tool procs so that
it regains its old behaviour(e.g. You once again cannot deconstruct ctf
reinforced tables, survival pods, indestructible windows etc)

## Changelog
🆑
code: renamed `NO_DECONSTRUCTION` to `NO_DEBRIS_AFTER_DECONSTRUCTION` so
its name matches its intended purpose
fix: fixes some items that incorrectly used `NO_DECONSTRUCTION` prior to
its refactor, meaning makes some objects non deconstructable again
/🆑
2024-04-10 18:58:11 -07:00
Thunder12345
920f2c6442 Explosions Part I - Directional Explosions (#82429)
## About The Pull Request

Adds the ability for explosions to be directional. This is achieved by
adding an angle check to `prepare_explosion_turfs()` to drop any turfs
outside the cone of the explosion. If the arc covers a full 360 degrees,
as is the default, it will accept all the turfs without performing the
angle check.

Uses this functionality to rework both rocket launcher backblast and X4
explosions. Rocket launcher backblast has been changed from a shotgun of
indendiary bullets to a directional explosion of similar length. X4 now
uses a directional explosion to "ensure user safety".

Apparently the old method of moving the explosion one tile away didn't
even work, as it blew up `target` before trying to check its density for
the directional behaviour.

https://youtu.be/Mzdt7d7Le2Y

## Why It's Good For The Game

Directional explosions - Useful functionality for a range of potential
use cases, which can be implemented with minimal extra processing cost
(Worst case scenario being very large directional explosions)

Backblast - Looks way cooler than a bunch of projectiles, and should be
significantly more functional in high-lag situations where projectile
code tends to get fucky

X4 - More predictable for players wanting to use it as a breaching
charge, you can actually stand near the charge and not have to worry
about being hoist upon your own petard.

## Changelog
🆑
add: Added support for directional explosions.
add: Rocket launcher backblast is now 271% more explosive, check your
six for friendlies!
add: X4 charges now explode in a cone away from the user when placed on
a sufficiently solid object.
fix: X4 charges will now behave correctly when placed on dense atoms
(note: don't try to read a variable from an atom you just blew up)
/🆑
2024-04-09 20:26:08 +02:00
MrMelbert
6a1519471d Very small atom examine tweaks (#82501)
## About The Pull Request

- Gloves and Shoes are now referred to in "pairs" rather than as "some".
- Meaning you now see "That's a pair of gloves" rather than "That's some
gloves"
- Makes it a tad easier to edit portions of an atom's examine text. 
- Gives reinforced windows a more proper description. 
- (I was examining random things to test and noticed its current
description was INCREDIBLY out of place)
- Fixes an extra space in bloody hand examination.


![image](https://github.com/tgstation/tgstation/assets/51863163/e5f771ff-d553-4a68-a34e-732f66eb24f6)

## Why It's Good For The Game

It's the little things that you tend to notice. 

When referring to shoes, you _generally_ will say "a pair of shoes"
rather than "some shoes". It's just a tad more proper.

## Changelog

🆑 Melbert
spellcheck: Shoes and Gloves are now referred to as "a pair of" rather
than "some".
spellcheck: Reinforced Window's description is less out of place. 
spellcheck: Fixed an empty space in examining a human's bloody hands. 
code: It's a tad easier to exit an atom's examine text now. 
/🆑
2024-04-07 19:54:51 -06:00
MrMelbert
f484375b6d /datum/element/skill_reward attempting to drop "itself" fix (#82489)
## About The Pull Request

`src` vs `source` moment. 

Plus some minor code cleaup. 

## Changelog

🆑 Melbert
fix: Skill rewards should properly be dropped out of unworthy player's
hands
/🆑
2024-04-06 15:24:12 -06:00
SyncIt21
6dc40ca522 Standardizes object deconstruction throughout the codebase. (#82280)
## About The Pull Request
When it comes to deconstructing an object we have `proc/deconstruct()` &
`NO_DECONSTRUCT`

Lets talk about the flag first. 

**Problems with `NO_DECONSTRUCTION`**
I know what the comment says on what it should do

b5593bc693/code/__DEFINES/obj_flags.dm (L18)

But everywhere people have decided to give their own meaning/definition
to this flag. Here are some examples on how this flag is used

**1. Make the object just disappear(not drop anything) when
deconstructed**
This is by far the largest use case everywhere. If an object is
deconstructed(either via tools or smashed apart) then if it has this
flag it should not drop any of its contents but just disappear. You have
seen this code pattern used everywhere

b5593bc693/code/game/machinery/constructable_frame.dm (L26-L31)

This behaviour is then leveraged by 2 important components.

When an object is frozen, if it is deconstructed it should just
disappear without leaving any traces behind

b5593bc693/code/datums/elements/frozen.dm (L66-L67)

By hologram objects. Obviously if you destroy an hologram nothing real
should drop out

b5593bc693/code/modules/holodeck/computer.dm (L301-L304)

And there are other use cases as well but we won't go into them as they
aren't as significant as these.

**2. To stop an object from being wrenched ??**
Yeah this one is weird. Like why? I understand in some instances (chair,
table, rack etc) a wrench can be used to deconstruct a object so using
the flag there to stop it from happening makes sense but why can't we
even anchor an object just because of this flag?

b5593bc693/code/game/objects/objs.dm (L368-L369)
This is one of those instances where somebody just decided this
behaviour for their own convenience just like the above example with no
explanation as to why

**3. To stop using tools to deconstruct the object** 
This was the original intent of the flag but it is enforced in few
places far & between. One example is when deconstructing the a machine
via crowbar.

b5593bc693/code/game/machinery/_machinery.dm (L811)

But machines are a special dual use case for this flag. Because if you
look at its deconstruct proc the flag also prevents the machine from
spawning a frame.

b5593bc693/code/game/machinery/_machinery.dm (L820-L822)

How can 1 flag serve 2 purposes within the same type?

**4. Simply forget to check for this flag altogether**
Yup if you find this flag not doing its job for some objects don't be
surprised. People & sometimes even maintainers just forget that it even
exists

b5593bc693/code/game/objects/items/piggy_bank.dm (L66-L67)

**Solution**
These are the main examples i found. As you can see the same flag can
perform 2 different functions within the same type and do something else
in a different object & in some instances don't even work cause people
just forget, etc.

In order to bring consistency to this flag we need to move it to the
atom level where it means the same thing everywhere. Where in the atom
you may ask? .Well, I'll just post what MrMelbert said in
https://github.com/tgstation/tgstation/pull/81656#discussion_r1503086862

> ...Ideally the .deconstruct call would handle NO_DECONSTRUCTION
handling as it wants,

Yup that's the ideal case now. This flag is checked directly in
`deconstruct()`. Now like i said we want to give a universal definition
to this flag and as you have seen from my examples it is used in 3 cases
1) Make an object disappear(doesn't dropping anything) when
deconstructed
2) Stop it from being wrenched
3) Stop it from being deconstructed via tools

We can't enforce points 2 & 3 inside `deconstruct()` which leaves us
with only case 1) i.e. make the object disappear. And that's what i have
done. Therefore after more than a decade or since this flag got
introduced `NO_DECONSTRUCT` now has a new definition as of 2024

_"Make an object disappear(don't dropping anything) when deconstructed
either via tools or forcefully smashed apart"_

Now i very well understand this will open up bugs in places where cases
2 & 3 are required but its worth it. In fact they could even be qol
changes for all we know so who knows it might even benefit us but for
now we need to give a universal definition to this flag to bring some
consistency & that's what this PR does.

**Problem with deconstruct()**
This proc actually sends out a signal which is currently used by the
material container but could be used by other objects later on.

3e84c3e6da/code/game/objects/obj_defense.dm (L160)

So objects that override this proc should call its parent. Sadly that
isn't the case in many instances like such

3e84c3e6da/code/game/machinery/deployable.dm (L20-L23)

Instead of `return ..()` which would delete the object & send the signal
it deletes the object directly thus the signal never gets sent.

**Solution**
Make this proc non overridable. For objects to add their own custom
deconstruction behaviour a new proc has been introduced
`atom_deconstruct()` Subtypes should now override this proc to handle
object deconstruction.

If objects have certain important stuff inside them (like mobs in
machines for example) they want to drop by handling `NO_DECONSTRUCT`
flag in a more carefully customized way they can do this by overriding
`handle_deconstruct()` which by default delegates to
`atom_deconstruct()` if the `NO_DECONSTRUCT` flag is absent. This proc
will allow you to handle the flag in a more customized way if you ever
need to.

## Why It's Good For The Game
1) I'm goanna post the full comment from MrMelbert
https://github.com/tgstation/tgstation/pull/81656#discussion_r1503086862

> ...Ideally the .deconstruct call would handle NO_DECONSTRUCTION
handling as it wants, but there's a shocking lack of consistency around
NO_DECONSTRUCTION, where some objects treat it as "allow deconstruction,
but make it drop no parts" and others simply "disallow deconstruction at
all"

This PR now makes `NO_DECONSTRUCTION` handled by `deconstruct()` & gives
this flag the consistency it deserves. Not to mention as shown in case 4
there are objects that simply forgot to check for this flag. Now it
applies for those missing instances as well.

2) No more copying pasting the most overused code pattern in this code
base history `if(obj_flags & NO_DECONSTRUCTION)`. Just makes code
cleaner everywhere

3) All objects now send the `COMSIG_OBJ_DECONSTRUCT` signal on object
deconstruction which is now available for use should you need it

## Changelog
🆑
refactor: refactors how objects are deconstructed in relation to the
`NO_DECONSTRUCTION` flag. Certain objects & machinery may display
different tool interactions & behaviours when destroyed/deconstructed.
Report these changes if you feel like they are bugs
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-04-04 18:55:51 -06:00
Ben10Omintrix
55267e1334 minebot buff (#82001)
## About The Pull Request
this pr buffs non-sentient minebots a bit to make them more helpful with
the new arcmining changes.
Minebots now have a better overall AI, they will maintain distance from
enemies and shoot while running. they will also plant landmines while
theyre running away from enemies. these landmines are carefully
programmed by the bot not to trigger when any of its miner friends step
on it. u no longer need to feed minebots an ore to get them to listen to
you, as they now automatically listen to any miners around.
minebots can now repair damaged node drones 

![image](https://github.com/tgstation/tgstation/assets/138636438/12e67eb2-3711-465c-a3ac-54fdadbed5e4)
they also have a new autodefend feature, which makes them automatically
attack any mob that attacks its miner friends or the drone. They also
have some new upgrades!
First is the regenerative shield, this shield allows minebots to tank a
limited amount of hits before breaking. minebots will then need to wait
sometime before the shield re-activates.
Second is the rocket launcher remote control, this allows players to
direct minebots to fire anti-fauna missiles at their target

https://github.com/tgstation/tgstation/assets/138636438/3ec3605e-8e11-4a31-acaa-1382bed98294

Also minebots are now highly customizable, you can rename them, change
their colors, or program their AI through their new user interface

![image](https://github.com/tgstation/tgstation/assets/138636438/d2e1c39d-f9d2-4da7-a5fa-5a41cea31d6e)


## Why It's Good For The Game
Improves minebot AI a bit, and makes it a more viable option for mining
solo players

## Changelog
🆑
balance: minebots have been buffed and have recieved new upgrades
/🆑
2024-03-29 22:26:35 -06:00
Zephyr
7b11cbadf7 Strip Menu Suit Sensors (#82253)
## About The Pull Request

Allows players to modify the suit sensors of someone else's jumpsuit
without first requiring them to disrobe them.

![image](https://github.com/tgstation/tgstation/assets/12817816/9b6ca2a3-ed23-4b46-a18b-9c5283fe8957)

## Why It's Good For The Game
It's annoying for players, usually antags, who are attempting to kidnap
someone and then disable their suit sensors they must first entirely
disrobe them, change the sensors, and then put everything back onto
them.

## Changelog

🆑
balance: You can now adjust the suit sensors of another player in the
strip menu. No longer must you first take it off.
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2024-03-27 16:49:46 -06:00
Profakos
b20c982404 Converts slimes to basic mobs (#82176)
## About The Pull Request

After months of preparation, and further months of work, I am finally
done. Please bear with me, as this is a massive refactor, but I have
already atomized everything I could. This is now ready for review.

General

- 	The hilbert hotel slimes are now a subtype instead of a varedit.
- The `use_mob_ability` subtree now also accepts non cooldown abilities.
If set_behaviours is set up properly, mobs won't keep continously
triggering it as if it were a 0 second cooldown action. The alternative
would have been turning the slime abilities into cooldown abilities.
- Wrestling off a slime now signs up to the `COMSIG_ATOM_ATTACK_HAND`
signal, instead of being part of attack_hand.
- Adds datum/ai_controller/controller as a fourth, optional argument to
`/datum/ai_behavior/find_hunt_target/valid_dinner()` to make it possible
to access blackboard keys.
- Slimes no longer attack windows if they would accidentally move into
them (when the conditions are met), since random walk behaviour ignores
tiles they can't go in. It was also not worth to keep. Did you know this
was the sole override of `ObjBump()`?
- Examine was made less snowflaky/bespoke. Also added a new element:
`/datum/element/basic_health_examine`, which is a simple bespoke element
that prints out a custom message based on how damaged the basic mob it
is attached to is.
- Slimes only perform knockdown instead of paralysis, as they can attack
more often now, and paralysis is not that fun.
- LAssailant has been removed due being archaic code. To befriend a
slime, you have to spawn a monkey with the slime console, or feed them a
sheet of plasma. Simple grabbing the monkey or stuffing them in
disposals do not work anymore. Slime console spawned monkeys will have a
visible status effect, with pheromones coming off them to make this
clearer.

Actions
- 	Feeding, reproduction and evolution is no longer a verb.
- Slime feeding is no longer an action button. You have to use right
click, or as previously, mousedrop. Slimes can always unbuckle from mobs
they are attached to.

Hunger 

- Instead randomly changing the starvation and max nutrition values
while growing up, evolution costs 200 nutrion. This makes the code more
readable, and behaviour more predictable, while still giving the
intended time between evolving and splitting. As a result, I could also
turn these into defines.
- Added a component that handles doing an effect over time while buckled
to a mob, until the mob dies or you get unbuckled.
- Slimes gained nutrition is no longer randomly multiplied by the damage
config value, but rather gain nutrition equal to twice the damage dealt.
You'll have to eat one monkey to evolve, just as before.
- Slimes do not heal passively. They only heal from eating. It was a
rather miniscule value that did not have much effect.
- Slimes generate electricity from hunger threshold, instead of the
random amount of hunger threshold + 100.

Environment

- Slimes take 15 damage from cold every second, instead of using a
complex formula (that also decreased the damage up to a point?).
- Slimes still heal from burn damage, but this is now set on the damage
coefficient list.
- Slimes instead of getting stunned by the cold, freeze in an ice cube.
BZ instead of setting them unconscious, calls the stasis status effect,
allowing you to safely stash your hungry slimes for later. They also no
longer slow down from the cold, as they are already slowed down by the
damage they get. Conversely they no longer get a speed up from a random
amount of temperature. I could be convinced to readd this either as part
of the basic sensitive component, or a similar one.

AI
- Removed the attacked_stacks system. Slimes will just perform regular
retaliation if you hit them in a harmful manner.
- Slimes now use the pet orders component. They will interrupt their
feeding when given a command by their master.
- Slimes have their own subtrees. I tried to replicate as much as I
could from the old code, dividing ancient code artifacts and intentional
stuff, so there might be some weirdness.
- Slime speech has been almost fully reduced to basic blorbing, as you
can not even understand them anymore, and most of them require the slime
to loop through all of their surroundings.
- Discipline does not have stacks either. Disciplined baby slimes have a
chance to clear their attack and hunt blackboard keys. All slimes will
stop feeding on the target otherwise.
- Since discipline is not a stack, rabidity instead gets removed at a
10% chance per disciplining.
- 	Slimes faces are a bit more randomly picked now.

## Why It's Good For The Game

- We want to convert all simple animals to basic mobs. Old slime code
was also very strange, and had some systems that have been replicated by
components.
- Slimes fully paralyzing you is not fun at all. Knockdown should give
you a fighting chance when a slime would like to eat you.
- Slimes slow down from the heavy damage they get from the cold, so I
don't think they need extra slowdown, nor do they need to speed up from
warmth, as they are already fast.
- Slimes turning into an icecube instead of becoming paralyzed from the
cold is more fun for the slimes, as they can break out for a few
moments. It is also funny.
- Slimes entering proper stasis from BZ is not just a visual indicator
of a slime that is safe to approach, but also keeps the slimes's hunger
value in check, allowing it to not starve while stopped. They can also
look around and blorble, instead of staring at a black screen, if player
controlled.
- The attack_stack and discipline_stack behaviours were rather
overcomplicated, and the xenobio mains I talked with didn't even know it
was a thing, so I argue it needed simplification.
- The bespoke friendship system of slimes was also too complicated.
Slimes slowly gained levels of trust, and at certain levels commands
costed friendship, and other levels, they did not. The binary friend/not
friend system that everything else in the game uses is much more
sensible.
- Using right click for feeding is much more sensible than using an
action, and then picking someone from a dropdown.
- Slime speech was very soulful but not only did it loop through
everything in sight, you couldn't even understand it unless you spoke
slime. Maybe it can be readded later in a different form.
- Slime's passive healing was miniscule, and having them rely on feeding
is more interesting.

also
fixes #81463

## Changelog

🆑
refactor: Slimes are now basic mobs. Please report any strange
behaviours!
balance: Slimes only stun you for two seconds when they shock you, the
rest of the duration is a knockdown.
balance: Slimes are not stunned from the cold, but rather, get frozen in
a freon icecube. BZ also puts them in complete stasis, instead of making
them unconscious. Their speed is likewise unchanged by temperatures.
balance: Slimes do not passively heal, they instead rely on feeding.
fix: Slimes can use the buckling screen alert to unbuckle and stop
feeding, along with clicking on the mob they are riding
/🆑
2024-03-27 16:40:52 -06:00
Ghom
95b7fa1fb7 Add a unit test to check that maploaded simple/basic mobs are in an environment they can survive in. (#82180)
## About The Pull Request
I've recently noticed that the maploaded penguins from the snowdin away
mission were dying from unsafe atmos/temperature. This sparked the idea
of making a (focus only) unit test that would prevent this sort of
issues from happening.

This PR also implements the usage of the `atmos_requirements` and
`body_temp_sensitive` elements for simple animals too, cutting down the
copypaste.

## Why It's Good For The Game
More unit tests to make sure things are done correctly.

## Changelog

🆑
fix: Made sure that mapped critters (i.e. penguins on the snow cabin
away mission) can survive in the environment they're spawned in.
/🆑
2024-03-27 16:01:56 -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
Contrabang
6a0365b9a4 Fixes an issue with strip menus making duplicate windows (#82055)
## About The Pull Request
Fixes an oversight in #57889, where the strip_menus list is set, but
never accessed, leading to whenever you drag to open the menu, it always
opens a new window.

## Why It's Good For The Game
Noticed this while porting the TGUI strip menu, and I figured I should
fix it here too. From the design of the strippable element, it seems
that this was the original design, but somehow got lost along the way.

## Changelog
🆑
Fix: Opening a mob's strip menu multiple times will now properly update
the window.
/🆑
2024-03-18 21:45:01 +01:00
Ghom
9cc18fe1fe [NO GBP] The deathmatch modifiers modal menu can actually be opened now. (#82041)
## About The Pull Request
I've fucked up the logic, so it requires the user to be both the host
and an admin to open it, which was the case when I tested it locally.
This PR fixes that and other issues (and **un**dumbs some of the code).
The spinning screen modifier has also been scrapped for being downright
awful and breaking my screen.

## Why It's Good For The Game
Fixing stuff I've thankfully noticed early.

## Changelog

🆑
fix: The deathmatch modifiers modal menu can actually be opened now.
Also fixed a bunch of issues it had.
/🆑
2024-03-18 21:10:57 +01:00
RikuTheKiller
ad6c2237c6 Removes remove_any from the game (#82020)
## About The Pull Request

Okay, so, turns out smoke machines, cigarettes, vapes and all sorts of
things intentionally unmix your mixes.
Why? For chaotic effects. Well sadly it just deletes chems from mixes
and makes them completely useless.
It also tends to have very little effect on deathmixes and moreso just
gimps you ability to use them for healing.
This is pretty bad, especially for machines like the smoke machine that
are specifically intended for chemists.

This PR entirely removes all uses of remove_any as well as the proc
itself from the game. It's just bad.
## Why It's Good For The Game

As it turns out, the game intentionally gimping your chem mixes just to
fuck with you is bad.
Especially when it's both obscure and not really all that fun for
gameplay.
## Changelog
🆑
balance: Smoke Machines, Showers, Vapes, etc will no longer arbitrarily
delete a random amount of the chems they are processing
/🆑
2024-03-17 15:52:41 -04:00
Ghom
7e907771fb Deathmatch modifiers (#81673)
## About The Pull Request
This PR adds the base to simple modifiers that the host can select to
make the minigame ~~worse~~ more entertaining for everyone.

Here's the screenshot of the UI (without a few modifiers I added later):

![immagine](https://github.com/tgstation/tgstation/assets/42542238/95bb9414-d93b-4c45-ab8a-ed8f28856018)

## Why It's Good For The Game
I've seen this minigame is frankly popular lately, so I thought I could
contribute to it.

## Changelog

🆑
add: Added 20+ modifiers to the deathmatch minigame, which can be
enabled by the host.
/🆑
2024-03-16 12:06:02 +00:00
xXPawnStarrXx
409527e3e3 New GaGs clothing: Part 1 - 'Dress'ing up! (#81785)
## About The Pull Request
I'm going to keep this simple, I have added four GaGs configs and the
sprites for some outfits, I intend to expand on the recolouring
abilities, so you will be able to use more than just spraycans.
The outfits are as follows; The Cardigan skirt (formerly named black
skirt), the Evening gown (It's no longer the 'RED' gown, since it can be
any colour), the striped dress and the sailor dress.


![image](https://github.com/tgstation/tgstation/assets/53197594/04c2e2ee-1d26-484e-9dde-b90cb7c33175)

![image](https://github.com/tgstation/tgstation/assets/53197594/e2ca4171-7b28-4fb2-9cc0-e6916367995e)

![image](https://github.com/tgstation/tgstation/assets/53197594/2c5a0985-b4fc-4fc3-8da1-13923f2742fb)

![image](https://github.com/tgstation/tgstation/assets/53197594/537006c0-1e67-4278-89d6-b4e294c335e8)
## Why It's Good For The Game
Customisation is always good, allowing players to express their
character how they want isn't a bad thing!
## Changelog
🆑
image: added gags sprites for; Sailor dress, Evening gown, Cardigan
skirts and striped dresses.
/🆑
2024-03-15 17:23:47 -04:00
Ghom
5d77f75ca4 [NO GBP] Fixes the larva "hide" ability not properly hiding larvas under tables. (#81921)
## About The Pull Request
This PR fixes yet another small issue with elevation.

## Why It's Good For The Game
This PR fixes yet another small issue with elevation.

## Changelog

🆑
fix: Fixed the larva "hide" ability not properly hiding larvas under
tables.
/🆑
2024-03-13 23:18:30 +00:00
John Willard
9f2d708007 Drunk people no longer feel cold (#81939)
## About The Pull Request

Simple PR, if you're drunk then you no longer feel the effects (or get
the warnings) of cold temperatures.
This makes things like cryosting and the coldness of space give you no
warning or tell of why you're being hurt, but it also means you don't
suffer its slowdown.

## Why It's Good For The Game

It's a small bit of realism that doesn't do much to change the game, but
gives some extra bonus/drawback to alcohol that isn't really changing
the game by any means.

## Changelog

🆑 JohnFulpWillard, Atlasle
balance: You no longer feel cold if you're drunk. You still take damage,
but get no warning or slowdown.
/🆑
2024-03-12 18:00:50 -04:00
Interception&?
1719ad8deb Sticker resprite and rewrite (#81893)
Stealing from Goon is bad, but stickers are actually a good feature, and
loosing those will be a disappointment. This project aims to recreate
'em from scratch without using Jimmyl's and Goon's code. Also,
suspicious icons were resprited and renamed.
2024-03-12 21:16:28 +00:00
SyncIt21
086a879d61 General maintenance for grilling related stuff. (#81647)
## About The Pull Request

Deals with `/obj/machinery/grill` & its related components & elements.

**1. Qol**
- Adds examines & screen tips for toolacts, adding fuel & food items on
the grill, Converts some chats into balloon alerts
  - Grills can be safely deconstructed with a crowbar when not anchored
- Food items can be grilled & re-grilled any number of times so you can
achieve that perfect crispiness. Its also realistic because there is
nothing physically stopping you from putting that item back on the grill
- Monkey fuel & any other reagent(see examines) can be added into the
grill from any open container & not just from glass bottles
- Grills can now be constructed in the crafting menu. Cargo pack cost
for purchasing grill has been halved

**2. Fixes**
- Grills now won't burn foods into a mouldy mess (if that item did that
that on the girdle). You can safely grill any item without worrying
about losing it. This also means grills no longer cook an item like a
girdle does, for e.g. the grill now won't both cook a meat slab into a
steak & grill it at the same time. You need the girdle for that.
This is only realistic because unlike a girdle which exposes the food to
direct heat the grill only exposes it to light heat & smoke so it does
not have that energy to cook/burn that item. Also this creates
immersion, you now need the girddle to cook the item & the grill to
smoke it so you know more gameplay

- The amount of time an item has been grilled for is now stored on that
food item & not as a locale variable in the grill. This means if you
remove & replace that item on the grill or move that item from 1 grill
to another it will correctly remember how long that item has been
grilled for so you don't have to re-grill that item on a different
machine for the same length of time
  
- Imposes a maximum limit on the amount of fuel you can put into an
grill (roughly 50 coal stacks). Unlimited space for fuel is not
realistic
 
**3. Code Improvements**
- Moved all non combat interactions to `item_interaction()` to end the
attack chain early before we even reach `attackby()`
- Removed trait `TRAIT_FOOD_GRILLED` no longer needed as we can re-grill
items as many times needed
 - Converts some constant values into `SECONDS` for accuracy
 - Autodoc for vars & procs

**4. Refactor**
- Grills now process manualy upon placing food or fuel into it & not
round start
   

## Changelog
🆑
qol: adds examines & screentips for grill (the machine for grilling
food), converts some chats to balloon alerts
qol: foods that can be re-grilled any number of times 
qol: grill (the machine for grilling food) can now be made in the
crafting menu. Cargo pack cost for purchasing grill has now been halved.
qol: monkey fuel & other reagents(see examines) can be added from any
container & not just from glass bottles to the grill (the machine for
grilling food)
fix: grills (the machine for grilling food) now don't burn foods into a
mouldy mess unlike the girdle
fix: correctly computes grill times of items that were previously
grilled
fix: grills now have an upper fixed fuel limit
code: autodoc procs & vars for the grill (the machine for grilling food)
refactor: grills (the machine for grilling food) has been refactored.
report bugs on github, also they only start processing after putting
food/fuel into them.
/🆑
2024-03-11 02:57:23 +00:00
Pickle-Coding
0a17a2d0f1 Adds and improves logging for various shit. (#81738)
## About The Pull Request
Adds logging for RCD construction and deconstruction. Hallucinated
projectiles no longer causes logs. Flamethrowers log gas mixture
information, the flamethrower, the gas tank, tank distribution pressure
and whether it was lit. Adds a lot more logging to records consoles.
Frozen objects now log when they get shattered.
## Why It's Good For The Game
Closes #68452 
Closes #71798 
Closes #78008 
Closes #81098 
Closes #81130 
## Changelog
🆑 Pickle-Coding and Rhials
admin: RCD construction and deconstruction are logged.
admin: Hallucinated projectiles no longer log.
admin: Gives more detail to flamethrower logging.
admin: More actions are logged for records consoles usage.
admin: Frozen object shattering is logged.
/🆑

---------

Co-authored-by: Rhials <Datguy33456@gmail.com>
2024-03-10 19:49:26 +00:00
MrMelbert
47dc38fee2 Let's you talk through action figures, plushies, and toy mechs with .l and .r. Also a big clean up of say because its support for non-mobs was lackluster. (#81848) 2024-03-07 09:21:12 -07:00