Commit Graph

603 Commits

Author SHA1 Message Date
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
Ghom
88bdabe53b Adds a small cafeteria behind the right wing shutters of the museum. (#81465)
## About The Pull Request
I was thinking to contribute something to the new away mission map to
make it better. Mapping and all takes too much time for me, so I could
do little. Though it comes with its own unique gimmicks.

To reach the cafeteria, one has to complete a couple puzzles.
The first set is opened by inputing the correct PIN on the password
panel beside it. There're several clues to help you guess this fairly
easy puzzle, in the form of several number graffitis, a scrapped piece
of paper full of numbers, and a board filled with colored dots also
found just beside the panel.
The second one is opened by a keycard, and is generally lazier. To find
it, you'll need to do a bit of (toilet) searching.

As for the unique things this PR adds:
- A fire extinguisher... that actually contains welding fuel
- A (dirt-cheap) hotdog vending machine*
- A completely ornamental maneki-neko (that's the name of the
luck-bringing, paw-waving cat figurine)
- A piggy bank that carries money between rounds. It has a cap of 10k
credits worth of holochips, cash and coins, which is pretty high, but
I'm confident people will just destroy it for its contents the moment
they find it. His name is Pigston Swinelord VI.
- More, totally legit and not actually fake bombable walls :^)

*By the by, you can also find it during the national hotdog day.

Screenshots of the new location:
![museum
cafe](https://github.com/tgstation/tgstation/assets/42542238/1c0d93b7-90d5-4459-a48d-81430f0d3613)
![museum
restrooms](https://github.com/tgstation/tgstation/assets/42542238/5a9e049d-6acc-464b-998d-901e43154bae)


## Why It's Good For The Game
You know how most away missions are not that special at all? Yeah,
@mc-oofert set an example of a pretty decent one actually, if not a tad
small. I thought it could use a touch of another mind actually
contributing to it too, because it deserves it.

Also, this sets the basis for other persistent piggy banks. I don't
think they should all have that 10k cap like this one, perhaps 1k is
enough. Beside, the code that mothblocks did for json database datum is
pretty good, so there is not a whole lot of shitcode here.

## Changelog

🆑
add: Added a cafeteria to the museum away mission, with a few special
things to it. To reach it, you'll have to complete a couple puzzles
however.
map: The museum away mission now has a couple restrooms.
add: Hotdog vending machines may spawn during the National Hot Dog Day.
/🆑
2024-03-05 18:19:39 -07:00
LemonInTheDark
1f249fbf0f Autotucking On Map Load (#81782)
## About The Pull Request

Doesn't really do much currently but without it wallening beds look
fuckin DUMB
Plus I think this better matches what is intended

## Why It's Good For The Game


![image](https://github.com/tgstation/tgstation/assets/58055496/d5e4c372-3e84-435a-88b9-b5be442049b2)

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2024-03-03 19:55:23 +00:00
Ben10Omintrix
fcc87b4801 virtual pets (#81342)
players can now download their very own virtual pet through a new PDA
app. this pet is called orbie and u can interact with him in alot of
unique ways

happiness can be increased by regularly grooming ur pet, feeding him, or
u can arrange with other players playdates for ur pets, they can play
with each other and both their happiness will increase

u can get food from ur pet through ur pda, it will assign u a random
drop zone location in the station u need to go to, after which u can
obtain ur pet's food then ur PDA will spawn a virtual chocolate bar that
ur pet loves to eat. it wont assign u dropzone locations that are
restricted or hard to reach, however if the area it assigns u is a bit
difficult to get to, u can reroll the location after a small cooldown

u can also level up ur pet to make it gain new helpful abilities and
more cosmetic options. the main way to level up ur pet is by walking it,
so u can have it follow u while u are doing ur job on the station and it
will passively get exp. u get an increased exp modifier per step if ur
pet is happy and not hungry. At level 2, ur pet will gain an ability to
toggle lights and will also read outloud to u any PDA messages u
recieve. at level 3, ur pet gains a camera ability. u can command it to
take a photo afterwhich the picture will be saved directly in ur pda

u also have alot of customization options for ur pet!

u can change its color, name, gender, and u can make it wear hats! u can
unlock more hats for ur pet if u level it up further. these
customizations change ur pet's hologram appearance as well as its
profile picture on the pet network.

u can view how other player's virtual pets are progressing through the
pet network. each time ur pet reaches a new milestone, an update will
automatically be sent out on the network

if ur pet's milestones gets likes from other players, it will become
happier

this app also allows u to program new tricks for ur pet. U can create a
custom trick sequence, and change the trick's name. If u say the trick's
name outloud to ur pet it will do the sequence u programmed.
2024-02-29 04:24:10 +00:00
lessthanthree
73733d44cf Tram mob throwing adjustments (#81617)
## About The Pull Request

- Corrects grille breaking related to PR
https://github.com/tgstation/tgstation/pull/81594
- Throw chance moved to a var on the controller instead of hardcoded
- Corrects a bit of documentation on tram controller landmarks
- Fixes the collision multiplier being set to a static value during
malfunction instead of the intended multiplier
- Includes throw chance in tram malfunction
- Cursed mobs now guaranteed to be thrown

## Changelog

🆑 LT3
code: Tram throwing now breaks grilles consistently
code: Tram malfunction lethality/throw chance are now a multiplier
instead of flat value
code: Tram throw chance can be adjusted
code: Unlucky trait is now used in tram throw calculation 
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-27 01:33:12 +00:00
13spacemen
db9cd93cc8 [NO GBP] fixes item blood overlays "leaking" onto other objects (#81662)
Looks like KEEP_TOGETHER is necessary after all

before
![Screenshot 2024-02-24
144648](https://github.com/tgstation/tgstation/assets/46101244/e973b372-8391-4678-bc26-28b9d32f05af)

after
![Screenshot 2024-02-24
144001](https://github.com/tgstation/tgstation/assets/46101244/b6c25fcd-9c7f-4f3a-8b8f-69d98b81d424)


## Changelog
🆑
fix: Blood overlays on items no longer leak onto other objects
/🆑
2024-02-26 18:04:37 +01:00
13spacemen
5348a0ba64 Item Blood Overlay Optimization (#81577)
## About The Pull Request
Previously it cached by (icon and icon state) of the item and modified
the blood decal overlay with icon procs

Now there is no cache and everything is done with MAs and overlays,
except for reading the width and height of the item's icon in order to
scale the blood splatter
## Why It's Good For The Game
There was no need to cache the blood splatter since it is exactly the
same sprite for every item
## Changelog
🆑
refactor: Bloody item overlays no longer use icon procs to generate the
overlay
/🆑
2024-02-23 07:59:03 +13:00
lessthanthree
909a1a692a Adds tram throwing mobs through glass windows (#81284)
## About The Pull Request

- Adds a PASSWINDOW flag so that you can throw mobs through window
panes, smashing them
- Being thrown into the tram window by event only (not player thrown)
has a chance to break through the window
- Reduced throw range of tram emergency stop

## Why It's Good For The Game

Sometimes you don't want them to bounce off the window when they hit,
rather comically fly through it.

## Changelog

🆑 LT3
add: The tram has been equipped with enhanced safety glass to reduce the
severity of crew injuries
/🆑
2024-02-18 02:52:36 +00:00
Ghom
7e8328c0d2 Cardboard cutouts are now tactical. (#81245)
## About The Pull Request
Basically, this means players holding cardboard cutouts will now assume
their appearance, just like for potted plants. Good for pranking.

I've had to tweak the tactical component and the waddling element a bit
to get them to work as intended while dealing with the multiple sources
of the waddling element.

## Why It's Good For The Game
![](https://media1.tenor.com/m/X1GimXmuByYAAAAd/tom-cruise-doorbell.gif)

## Changelog

🆑
add: Players holding cardboard cutouts will now assume their appearance,
just like for potted plants.
/🆑
2024-02-17 17:17:18 +00:00
John Willard
d604a87b06 Revenants no longer make noise walking into gibs (#81420)
## About The Pull Request

Turns the hardcoded sound that plays when you walk into some gibs into
an Element and adds a check for flying to avoid playing the sound,
fixing Revenants, Holoparasites, and other mobs that fly from making
noise when "walking" into a pool of blood.

## Why It's Good For The Game

I was observing a revenant and heard them making noise from walking over
blood, thought it was kinda f*cked up

## Changelog

🆑
fix: Revenants (and other flying mobs) will not make noise when walking
into pools of gibs,
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-13 17:07:16 +01:00
LemonInTheDark
70651816c2 Fixes complex lights not handling moving well, renames lighting defines (#81423)
## About The Pull Request

[Fixes static lights not
moving](ffef43c05a)

Worked fine when the owner moved, but if the owner was inside something
else, it would try and trigger an update on the PARENT's lights, which
are obviously not us.

[Renames MOVABLE_LIGHT and STATIC_LIGHT to better describe what they
do](de73a63bd4)

People keep trying to change the lighting system of lamps and it makes
me mad.
I choose OVERLAY_LIGHT and COMPLEX_LIGHT here, I couldn't figure out a
better name for turf matrix lighting. Suggestions welcome

## Why It's Good For The Game

Closes #80005
Hopefully improves understanding of lighting at a glance
## Changelog
🆑
fix: Fixes fancy lights not updating their source location when picked
up and moved
/🆑
2024-02-12 20:50:20 +01:00
MrMelbert
afb29836a7 Fix Flaky Failure From Fire (#81399)
## About The Pull Request

Closes #81396 , Closes #81391 , Closes #81403, Closes #81402

I don't know why but I thought this proc was only called once, when the
mob entered the turf. That was silly.

And going back at it, I'm not entirely sure why I tied
`TRAIT_NO_EXTINGUISH` to the element anyways, rather than the lava like
it originally was.

While going back over this, I cleaned up the proc a bit. 

## Changelog

Not necessary
2024-02-10 13:39:01 -08:00
John Willard
fdcd4d3979 Adds a signal to buying items from the uplink (& fixes TC misinfo) (#81372)
## About The Pull Request

Adds a signal when someone buys an item from the uplink and removes
single-letter vars from the ``spawn_item`` proc, and adds/standardizes
add/removing of telecrystals from uplinks (and admin setting how much TC
they have) to ensure the UI always has the right amount of telecrystals
displayed in it.

## Why It's Good For The Game

There are reasons why someone would want to hook up to a traitor's
uplink and listen to items they purchase to do any special effect
on-purchase, so this adds support to do anything in the future with it.
Also tells players how much TC they actually have without forcing them
to close/reopen the UI every time they insert some TC in it by hand.

## Changelog

🆑
fix: Uplinks now update their UI when you add telecrystals in them, so
you don't need to close and reopen it.
/🆑
2024-02-10 18:57:19 +01:00
MrMelbert
d9243d1016 Refactors fire overlays once again to make it not get stuck so often (#81367)
## About The Pull Request

Maybe finally fixes #77701 

A big reason why this kept happening is because fire uses standing
overlays. But fire isn't managed by mobs anymore. Meaning in some
situations, fire can cease to exist but the overlay can still be on the
mob. So it gets stuck.

So like, why use standing overlays anymore? We can just hook
`update_overlays` signal.
Isn't that neat. 

## Changelog

🆑 Melbert
refactor: Fire effects get added to mobs in a different way now. Maybe
it will get stuck less. Report any oddities.
/🆑
2024-02-09 17:26:00 -07:00
Bloop
c190f9d44f Fixes a decal hard del (#81093)
## About The Pull Request

Attempting to fix this hard del here: 


![firefox_1QHRZHx9GY](https://github.com/tgstation/tgstation/assets/13398309/871d50e4-1bfc-4b16-82af-972162e8d2e4)

I think the cause is from the turf changing, which
`/datum/elements/connect_loc` does not seem to take into consideration.
Now it should.

Also cleans up the signals in `/datum/component/infective/` which may be
another potential cause of issues.

## Why It's Good For The Game

Code that cleans up after itself is nice.

## Changelog

🆑
fix: fixes a hard del with decals
/🆑
2024-01-26 02:23:24 +01:00
Ghom
0e3c83ff3a Revert "Makes immerse use weakrefs", prioritizing some ref removal lines instead. (#80707)
## About The Pull Request
For a moment, I had forgot about saying I'd take a look into it, but it
seems the new fix to hard dels is causing some runtimes with empty
weakrefs. Beside, WEAKREF() doesn't work well with qdeleting atoms (so
you'd have to access the weak_reference var directly).
How immersion works is quite confusing even for me who coded it, trying
to work around some of the hefty limitations of the engine truly blows.
I could even ask MrMelbert to make a proc-chain chart for it.

But yeah, long story short, I only have a bare idea where the uncleared
refs would be. I suspect it could be `immersed_movables`. It's totally
possible since the proc can early return in a few cases, thus skipping
the ref removal, hence the title.

## Why It's Good For The Game
I didn't like the PR that implemented weakref usage into the element,
but I let it pass because "hard dels = bad". However, the runtimes
aren't that much more pleasant either.

## Changelog
N/A
2024-01-17 04:38:13 -05:00
Ghom
68677dc721 Disarm refactor, plus shoving people with shields (#80123)
## About The Pull Request
I wanted to add the ability to shove people with shields by
right-clicking your target, just like how it works barehanded.

This also required a solid refactor of disarm code, effectively bringing
down the core of it to `mob/living` from `mob/living/carbon` or
`mob/living/carbon/human`. This also means you can shove simple mobs
inside closets, bins and on tables.

Xenos and borgs are pretty much immune to regular disarms, but using a
shield will work (borgs and royal xenos are immune to the knockdown).

The riot shield armor has been balanced. It now tanks melee attacks
pretty well, but will break against bullets in just about 2 to 4 hits
depending on the bullet damage. I've always found the lack of sturdiness
of the riot shields for what they're supposed to be good for a bit
detrimental.

Because I've refactored an item flag into a trait, I've had to add a new
MOD module that grants protection from shove knockdown and staggering;
found pre-installed in the administrative MODsuit, but I've also added
it to the black market to make it cooler.

You can bash people with the strobe shield on combat mode.

## Why It's Good For The Game
Currently, shields are simply items that take a held slot in return of
some block chance without being anything special, save for the strobe
shield's integrated flash I guess, but are also a botherance as most
crumple under the duress of less than half a dozen attacks. Meanwhile
swords and other weapons with blok chance just don't care.
TL;DR, I want them a bit more remarkable, and flexible as a tool.

Of course, this ended up in a larger refactor because the right-click /
disarm code was inconsistent.

## Changelog

🆑
add: Shields (and pillows) can be used to shove people around the same
way barehanded right-clicking does. Xenos and borgs can actually be
moved this way.
add: Added a new MODsuit module, the bulwark module, which prevents
knockdown and staggering from shoving, and getting pushed away by thrown
objects. Inbuilt for the safeguard MODsuit, but one might also it in the
black market.
refactor: Disarming has been refactored. You can now shove simple
critters onto tables and into bins and closets
balance: Shields now take their own armor values and the armor
penetration of the attack they blocked when damaged. This means shields
are a bit sturdier now.
balance: Riot shields can tank a lot more damage against melee weapons,
but less against bullets.
qol: strobe shields can now be used to bash people while combat mode is
on.
/🆑
2024-01-16 19:35:56 -06:00
Bloop
fc0a1f4068 Removes timeout_mod arg from add_mood_effect (#80964)
## About The Pull Request

Partial Revert of https://github.com/tgstation/tgstation/pull/80800

Assuming every num passed in the parameters of `add_mood_effect` is a
`timeout_mod` is incorrect, because there can be mood events that take a
numeric arg which is not meant to be multiplied against the timeout.

This leads to the same issue as multiplying it with strings essentially
(in one case, shown below, this results in a negative duration of a
timer).


![image](https://github.com/tgstation/tgstation/assets/13398309/f8af858f-04ef-4144-9a0b-2fae60b71272)


![Code_ZN176cpMqA](https://github.com/tgstation/tgstation/assets/13398309/a6ec7689-0171-4909-91cb-a17b56454eb6)

Plus having a keyword arg that may or may not actually be what the
keyword arg claims to be is really confusing and bad.

Instead here's what I propose: passing in an instantiated mood datum
itself, which has been modified, and copying the timeout from it before
discarding it.

It is not as clean as I'd prefer either, but at least it's logically
sound and the intent is clear, and it's the best I can think of short of
a major refactor of the entire system for this one small thing which is
only being used by food quality.


![image](https://github.com/tgstation/tgstation/assets/13398309/8560c066-bb0b-4066-af94-372d5ea62679)

## Why It's Good For The Game

Clearer, less smelly code.

## Changelog

🆑
code: removed the timeout_mod arg from add_mood_event, which was only
used for one thing and causes more issues than it's worth
/🆑
2024-01-16 20:57:42 +01:00
Hatterhat
27386bffe8 fixes a bunch of moodlets potentially lasting forever (less band-aidy) (#80800)
## About The Pull Request
In a previous PR (https://github.com/tgstation/tgstation/pull/79661), I
noted that a lot of moodlets tended to have their timeouts break because
it was passing their names and whatnot as a parameter, that gets fed
into the timeout modifier parameter, causing the timeout multiplier to
break, because BYOND type-agnosticism means that it can multiply a
number (timeout_mod) by text (a name or some other object), resulting in
0 - which makes a moodlet permanent. This is probably not intended.

This fixes that in two ways:
- Adding a `1` to potentially applicable moodlets (searched for with a
regex of `.add_mood_event(.*, .*,)`) just to make sure the timeout
doesn't get multiplied out weirdly.
- Making the add_mood_event thing CRASH() if the timeout_mod is bad.

If someone else wants to come up with a solution better than this,
please do.

## Why It's Good For The Game
Maybe having your arm permanently fall asleep after getting it
reattached sucks, moodlet-wise. (Being stuck with permanent
positive/negative moodlets is probably not intended.)

## Changelog

🆑
fix: Moodlets with parameters/effects e.g. limb reattachment moodlets
should probably disappear more appropriately.
/🆑

---------

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
2024-01-15 07:08:01 +01:00
san7890
0d91d0365e Better errors for adding element to qdeling datum (#80927)
## About The Pull Request

Got this from reading #80915

The actual name of the element is not reported anywhere in the stack
trace, and while you might be able to figure it out from context clues
based on the procs invoked in the stack trace... this isn't guaranteed
and just makes it harder to diagnose these weird sporadic runtimes.
## Why It's Good For The Game

easier to figure out a problem when you have as much useful information
as possible
## Changelog
irrelevant
2024-01-15 05:07:26 +01:00
MrMelbert
7b8a95cf00 Fixes some AI related runtimes (#80828)
## About The Pull Request

Namely this. 


![image](https://github.com/tgstation/tgstation/assets/51863163/c6171a4e-afd3-4c07-8a96-1952ef76a3df)

## Changelog

🆑 Melbert
fix: Carps now migrate slightly better, probably. 
fix: And Poly now talks better, probably. 
/🆑
2024-01-09 14:06:16 -05:00
Ghom
f3108f99be Dead code removal, redundant text macros, drying rack now applies TRAIT_FOOD_CHEF_MADE. (#80677)
I've been coding a PR these couple days, and I've noticed a few
oversights, all related to food, while working on it.

This PR removes an unused, 12 years old datum, and some redundant text
macros in a text string, for processable items, that already uses the
bold spans. It also makes it so food made with a drying rack gets the
chef made trait, similarly to other methods (though not as foolproof).
2024-01-04 00:10:36 +00:00
_0Steven
99fcc070ee Fixes crashing through tables from a table giving you a negative offset (#80701)
## About The Pull Request

While failing to reproduce #80675, given no amount of slamming this poor
little moth creature through glass tables in any order and then
rebuilding it under them seemed to be doing anything, I found that it
_does_ cause a negative offset if the moth-to-be-slammed in question was
already on a table before being slammed into a glass table. (Don't worry
they have health insurance.)

After some debugging, this seemed to be because `Detach()` is called for
the new turf with the smashed table _before_ `on_exited()` is called for
the previous turf, causing it to first reduce one's offset by 12, and
then reduce it by 12 _again_ upon calling `on_exited()`. This seemed to
be true for whichever method was used, whether walking, dragging, or
being smashed.

![image](https://github.com/tgstation/tgstation/assets/42909981/3782776f-7153-4235-b377-8f8bd8904110)
So I introduced the same check for `TRAIT_ON_ELEVATED_SURFACE` that
`Detach()` has to `on_exited()`, making it only attempt to shift down
the movable if it still has the trait, and this seems to fix it fine!
It doesn't seem to cause issues with moving from beds onto tables or
tables onto beds, or smashing through glass tables from tables or beds.
So this should fix #80675, or at least I can't find what they would've
meant if not this.

And yes I did test this on Tramstation just in case.

![image](https://github.com/tgstation/tgstation/assets/42909981/e3d8e755-c288-4ed7-93cb-8948c6012c56)
## Why It's Good For The Game

Fixes #80675.
## Changelog
🆑
fix: slamming through a glass table while previously on a table no
longer gives you a negative offset.
/🆑
2024-01-01 21:38:20 +01:00
Mothblocks
66cf861989 Fix footsteps not working (#80704)
## About The Pull Request
Fixes #80686.

Somehow, these statics were not being initialized after the GLOBs. I
don't know how that changed. Makes them local references because they're
still used 3 times in the hot path.
🆑
fix: Fixed footstep sounds.
/🆑
2024-01-01 18:01:11 +01:00
Mothblocks
404d2cb36c Optimize find_potential_targets self cost (#80602)
![image](https://github.com/tgstation/tgstation/assets/35135081/84ae20b6-5f44-4a69-bda3-0df1435dea5c)

`find_potential_targets/perform` currently has a pretty bad self cost in
part due to it running a second "loop over everything in range" check to
find turrets and mechs. This doesn't drop it down by as much as I'd like
because it still needs `hearers`, it still shows up pretty high, but
this at least cuts out some unnecessary work.

Best case is likely to minimize work AIs need to do when there are no
players on their z-level, as there are a lot of calls from Lavaland.
2023-12-28 14:14:49 +01:00
Arturlang
8e8d930720 Makes immerse use weakrefs (#80594)
## About The Pull Request
Immerse was causing harddels due to it having references to mobs. Makes
it use weakrefs for mobs instead.

## Why It's Good For The Game
Immerse would cause harddels if a mob was deleted while it was in it's
list. It could probably also happen if a turf was deleted too, but doing
that here would be much harder.

no CL since nothing playerfacing
2023-12-28 02:32:20 +01:00
Mothblocks
e90e8fdb3c Fix "/datum/element/damage_threshold looks unharmed!" (#80546)
Fixed a bug that would give you the chat message
2023-12-24 20:44:44 +00:00
Ghom
1b882991ca Updating elevation.dm to fix a recursion issue. (#80341)
## About The Pull Request
I thought `ADD_TRAIT`, like `REMOVE_TRAIT`, supported using a list of
trait sources, but I was wrong.

## Why It's Good For The Game

![immagine](https://github.com/tgstation/tgstation/assets/42542238/c992d19b-816c-4f8e-b05c-651ce12d158d)

Should fix #80338.


## Changelog
N/A
2023-12-16 17:21:34 -08:00
Jacquerel
29590d467c Throwing a bee at someone injects reagents (#80354)
## About The Pull Request

Throwing a bee at someone injects that bee's reagents.
This has a larger code footprint than you might expect because venom
injection is done via an element which in turn gives a callback to a
component.
While I was touching that I also separated `COMSIG_MOVABLE_IMPACT` into
`COMSIG_MOVABLE_PRE_IMPACT` because a lot of effects trigger from
`COMSIG_MOVABLE_IMPACT` despite the fact that the throw impact can be
cancelled after the signal is sent.

I also added an inject check onto the venomous element for mob attacks,
so thick clothing can now protect you from venom injection.
I elected that Giant Spiders have big enough fangs to ignore this such
that this isn't a major balance change, as do moonicorns (that horn is
massive), Fire Sharks, and Clowns (no idea how they are applying chems
at all to be honest).

## Why It's Good For The Game

I thought about someone throwing a bee at someone like a little dart and
thought "hee hee"

## Changelog

🆑
add: If you throw a bee at someone it will hit them sting-first and
inject that bee's reagent
balance: Thick clothing can now protect you from the venom of bees,
snakes, frogs, and (small) spiders
/🆑

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-12-17 01:10:06 +01:00
LemonInTheDark
f03084c1ca FOV is Dead (Long Live FOV) (#80062)
## About The Pull Request

FOV as it is currently implemented is incompatible* with wallening.
I'm doin wallening, so we gotta redo things here.

The issue is the masking of mobs. Wallening relies on sidemap (layering
based off physical position), which only works on things on the same
plane (because planes are basically sheets we render down onto)
So rather then masking mobs, let's reuse the masking idea from old fov,
and use it to cut out a bit of the game render plane, and
blur/over-saturate the bit that's masked out.

My hope is this makes things visible in light, but not as much in
darkness, alongside making more vivid shit more easily seen (just like
real life)

Here's some videos, what follows after is the commits I care about
(since I had to rip a bunch of planes to nothing, so the files changed
tab might be a bit of a mess)

Oh also I had to remove the darkness pref since the darkness is doing a
lot of the heavy lifting now. I'm sorry.

Edit:
NEW FOV SPRITES! Thanks dongle your aviator glasses will guide us to a
better future.


https://github.com/tgstation/tgstation/assets/58055496/afa9eeb8-8b7b-4364-b0c0-7ac8070b5609


https://github.com/tgstation/tgstation/assets/58055496/0eff040c-8bf1-47e4-a4f3-dac56fb2ccc8

## Commits I Care About

[Implements something like fov, but without the planes as layers
hell](a604c7b1c8)

Rather then masking out mobs standing behind us, we use a combo color
matrix and blur filter to make the stuff covered by fov harder to see.

We achive this by splitting the game plane into two, masking both by fov
(one normally and one inversely), and then applying effects to one of
the two.

I want to make the fov fullscreens more gradient, but as an effect this
is a good start

[Removes WALL_PLANE_UPPER by adding a WALL_PLANE overlay to material
walls (init cost comes
here)](2548933739)

@Mothblocks see this. comment in commit explains further but uh, we need
to draw material walls to the light mask plane so things actually can be
seen on them, but we can't do that and also have them be big, so they
get an overlay. Sorry, slight init time bump, about 0.5 seconds. I can
kill it with wallening.

[Moves SEETHROUGH_PLANE above
ABOVE_GAME_PLANE](beec4c00e0)

I don't think it actually wants to draw here
@Time-Green I think this was you so pinging for opinion

[Resprites FOV masks to be clean (and more
consistent)](f02ad13696)

[f02ad13](f02ad13696)

This is 100% donglesplonge's work, he's spent a week or so going back
and forth with me sharpening these to a mirror shine, real chill

## Why It's Good For The Game

Walls are closing in

## Changelog
🆑 LemonInTheDark, Donglesplonge
image: Redoes fov "mask" sprites. They're clean, have a very pleasant
dithering effect, and look real fuckin good!
del: Changed FOV, it no longer hides mobs, instead it blurs the hidden
area, and makes it a bit darker/oversaturated
/🆑

###### * It's technically possible if we start using render targets to
create 2 sets of sources but that's insane and we aren't doing it
2023-12-13 15:52:24 +01:00
Ghom
87bd1cfcd1 Prevents something fucky with elevation and glass tables (#80187)
## About The Pull Request
Objects can be destroyed during a movement loop before the abstract
entered signal can be sent, so we need to make sure only mobs that have
been elevated are dropped down.

## Why It's Good For The Game
Fixes #80169

## Changelog

🆑
fix: climbing or being shoved into a glass table won't cause elevation
issues.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-12-11 20:03:36 -07:00
MrMelbert
1e76fd70b4 Attack chain refactoring: Broadening tool_act into item_interact, moving some item interactions to... atom/item_interact / item/interact_with_atom (#79968)
## About The Pull Request

Implements half of this (with some minor changes): 


![image](https://github.com/tgstation/tgstation/assets/51863163/bf5cc4bb-5a1f-42e3-921d-9a57bc6096cc)

The ultimate goal of this is to split our attack chain in two: 
- One for non-combat item interactions
  - Health analyzer scanning
  - using tools on stuff
  - surgery
  - Niche other interactions
- One for combat attacking
  - Item hit thing, item deal damage. 
  - Special effects on attack would go here.  

This PR begins this by broadining tool act into item interact. 

Item interact is a catch-all proc ran at the beginning of attack chain,
before `pre_attack` and such, that handles the first part of the chain.

This allows us to easily catch item interaction and cancel the attack
part of the chain by using deliberate bitflag return values, rather than
`TRUE` / `FALSE`*.

*Because right now, `TRUE` = `cancel attack`, no matter what, which is
unclear to people.

Instead of moving as much as possible to the new proc in this PR, I
started by doing some easy, obvious things. More things can be moved in
the future, or technically they don't even need to move in a lot of
cases.

## Changelog

🆑 Melbert
refactor: Refactored some methods of items interacting with other
objects or mobs, such as surgery and health analzyers. Report if
anything seems wrong
/🆑
2023-12-08 23:50:19 -07:00
san7890
5ce9d5806d Scopes NODECONSTRUCT_1 from flags_1 to obj_flags (#80104)
This flag only worked on the `/obj/structure` and `/obj/machinery`
level, so let's rescope it from `flags_1` and put it where it belongs -
`obj_flags`.
Bitflag operators should be scoped to their subtype specific bitfield,
not really useful to have this take up a spot on the `/atom` level if
absolutely nothing other than `/obj`s use it.
2023-12-08 08:49:14 +00:00
Tim
71a1f9b40d Fix cult halo and eyes affecting deconverted cultists (#80148)
## About The Pull Request

Fixes #69423

Cult halo and eyes were appearing on deconverted cultists due to a delay
when the element gets attatched. This lead to a small window of
oppurtunity where someone could get converted, then deconverted, and
still have the cult icons appear on them later.

## Why It's Good For The Game

The Antichrist is dead.

## Changelog

🆑
fix: Fix cult halo and eyes affecting deconverted cultists
/🆑
2023-12-06 19:52:57 -07:00
Ben10Omintrix
a97daec876 [no gbp] some medbot fixes (#80150)
## About The Pull Request
medbots now drop hats when tipped closes #80134 
medbots now drop their items when they explode 
player controlled bots now have their normal speed back 

## Why It's Good For The Game
they will now correctly drop their hats when tipped

## Changelog
🆑
fix: medbots now drop hats when tipped and drop their items when they
explode
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-12-06 18:05:44 -07:00
Ghom
349adbb438 [NO GBP] Fixing elevation furthermore (#80099)
## About The Pull Request
fixes #80059
fixes #80085.

The tram transportation doesn't use `forceMove()`, instead it just
changes the location of the objects directly. What's more, it doesn't
call `oldloc.Exited()` or `loc.Entered()` but only for areas. The
abstract exited/entered signals are from `Moved()` though, which is
called.

df4bc6d948/code/modules/transport/transport_module.dm (L519-L527)

About beds, well, I just happened to put a minus symbol where it
shouldn't be.

## Why It's Good For The Game
Truly one of the fuckups of the year. Now tested. I'll make a unit test
later.


## Changelog

🆑
fix: Fixed some oopsie whoopsie with elevation, trams and beds causing
people to visually ascend or descend to heaven or hell.
/🆑
2023-12-03 15:44:33 -07:00
Ben10Omintrix
a3c24dd74e Basic bots (medibots) (#79955)
## About The Pull Request
refactors bots into basic bots. i decided to do medibots first because
they were the most complex bots and wanted to get them out of the way
first. if this pr gets merged then i will be rolling out the rest of the
bot refactors over the next months

medibots can now wear any type of hats! some of these hats can trigger
unique new recorded voicelines and interactions!

![chickembot](https://github.com/tgstation/tgstation/assets/138636438/09d4519d-0a34-4b7f-898b-260f894bfdce)

![hatbot](https://github.com/tgstation/tgstation/assets/138636438/088e0618-108d-4fb4-a29b-771cfa027fb3)


## Why It's Good For The Game
converts medbots into basic medbots. they are now a bit more responsive
than before but overall they should act similarly to how they did. also
adds the basic bot ai framework which has all the generic bot behaviors
that the next bots may or may not need to have in their ai. i tried my
best to improve their code and turned some of their bitflags into define
bitfields. this pr may need a careful review because i did it from
scratch as the old bot project branch was too outdated for me to use
## Changelog
🆑
refactor: medbots are now basic bots. please report any bugs
add: medbots can wear hats!
/🆑
2023-12-01 22:49:18 -07:00
Ghom
bb76600b95 Fixes riding vehicles on tables and lying on beds (#80053)
## About The Pull Request
Fixes #80027. My bad.
EDIT: Also fixes #80050.

## Why It's Good For The Game
See the issues above.

## Changelog
🆑
fix: Fixed an issue with the offsets of ridden vehicles on tables, and
another when buckled to a bed.
/🆑
2023-12-01 14:55:21 -07:00
san7890
39d9c45b4a Meat Hook Rework (Accidental Features) (#80002)
## About The Pull Request

Or, how I tried to kill `/datum/forced_movement` but got absolutely
clonged.

Actually, I did kill `/datum/forced_movement`. It was only used in one
spot so I just went ahead and cooked it into a special utility datum
that should only be used in one spot. We can optimize the code later or
something, but I like the way it is right now (pretty much status quo
without the potential of someone using a depreciated framework).

Alright, there were also like 3 `TODO`s (4 if you count the move loop
comment (which is ehhhh)). I naively tried to tackle them a very hard
way, but then I just realized I could use the fancy new datum I cooked
up and wow they're all solved now. The hook looks so fucking good now.

* The code is overall more streamlined, with all of the post-projectile
work being handled by a special datum (I wanted it to be handled by the
hook but the timings were all based on SSFastprocess so datum it is).
Forced movement is killed but we just salvaged whatever we needed from
it.
* More traits to ensure we don't cheese in a way we're not supposed to
* A very sexy chain will spawn when you drag your kill in (this wasn't
there before but I fixeded it :3)
* The firer will actually get grounded when they try and shoot the chain
out. They get grounded for 0.25 seconds unless they hit something. I
don't know how the timing is but I think it's fair.
* We also add a unique suicide act, because I noticed we did the
"magical" one previously, which big-league sucked.
* More traits to ensure less cheese! I like how nice it is now.
## Why It's Good For The Game

The meat hook really makes you _feel_ like Roadhog from Overwatch.
Resolves a bunch of old TODOs while getting rid of a completely obsolete
framework in a really neat way. I don't typically like mixing balances
and refactors but these TODOs were getting crusty man i just wanted to
get them out of the way
## Changelog
🆑
balance: The Meat Hook will now "ground" you whenever you fire it out at
someone. You get a very small immobilization every time you fire, which
"upgrades" to a full immobilization whenever you actually hit an atom
and start to drag it in.
fix: A chain should now show up as you drag in something with the meat
hooks.
fix: Meat hooks should no longer play the "magical gun" suicide if you
were to use it, but instead do their own unique thing.
/🆑
2023-11-30 00:59:42 +00:00
Ben10Omintrix
ce6f2724cd basic cats and mini kitchen helpers (#79800)
## About The Pull Request
this pr transforms cats into basic pets! cats now have some new
behavior. they can carry fish and hunted mice in their mouths to deliver
it to kittens, and kittens will eat them.


![catmouse](https://github.com/tgstation/tgstation/assets/138636438/8f146be4-c7b2-41d3-8301-734be49b5efc)

![catfish](https://github.com/tgstation/tgstation/assets/138636438/f8df54f2-9183-406d-afbd-f90f415f7f3d)

if a kitten sees you holding food, it will point at you and meow loudly
until u give it the food.
becareful when putting male cats near each other, there is a small
chance they get into a heated argument and meow loudly at each other
until one of them flees.
also added a new small cat house for cats. cats will use these homes if
u build one near them (using 5 wood planks)


![cathouse](https://github.com/tgstation/tgstation/assets/138636438/9515a78c-fdfe-461b-bad2-6b497117c694)

Chefs can craft the cake cat and breadcat. these are useful cats because
they can help the chef around in the kitchen. they will turn stoves and
grills off when food is ready, so they dont burn. and the cake cat will
help the chef decorate his donuts

## Why It's Good For The Game
refactors cats into basic mobs and gives them a deeper ai

## Changelog
🆑
refactor: cats are now basic pets. please report any bugs.
add: the cake cat and bread cat can now help the chef around in the
kitchen
/🆑
2023-11-28 21:51:37 -07:00
Ghom
837ddf7d00 Standing on structures such as crates, tables and bed will now look like it. (#79797)
## About The Pull Request
From the creator of 'cosmetic' elements such as footstep_override and
immerse...

I've made an element called elevation that nudges mobs a few pixels up
while standing on things like tables, crates and beds.

Screenshots of many clones of the same character standing on different
objects:
![the clone
army](https://github.com/tgstation/tgstation/assets/42542238/43ecdc25-f0d2-47fd-96dc-acafcf63483c)

## Why It's Good For The Game
It makes it look like the mob is actually standing on an elevated
surface.

## Changelog

🆑
add: Standing on structures such as crates, tables and bed will now look
like it.
/🆑
2023-11-28 15:44:54 -07:00
Bloop
521247110a [NO GBP] Fixes footsteps runtimes, part 2 (#79936)
## About The Pull Request

https://github.com/tgstation/tgstation/pull/79903 Fixed the most common
one, but there are still more of these runtimes it seems.


![image](https://github.com/tgstation/tgstation/assets/13398309/3574d756-d6d6-4c0a-84fa-8512f610bf8d)

This should take care of all the rest. It turns out that any one of the
step types keys in the list returned by `prepare_step()` can have `null`
values—not just the barefoot one—so we have to check for that in every
instance where we read from it.

(Shown here: the list that gets returned. Note that any one of these
turf vars can be `null`, aka these are the values that we need to
nullcheck for)


4a6d2b9297/code/datums/elements/footstep.dm (L96)

## Why It's Good For The Game

Bugfix

## Changelog

🆑
fix: fixed remaining footstep runtimes
/🆑
2023-11-28 14:47:34 -05:00
Bloop
f7eb3956a2 Fixes a footsteps runtime (#79903)
## About The Pull Request

Tin. Fixes the following runtime:


![image](https://github.com/tgstation/tgstation/assets/13398309/e4cd087f-3c6e-49f7-aaa4-2a91ca1b9a79)

Which happened because `barefoot_type` can potentially be null if
`turf.barefootstep` is null.


![Code_KnExLVOSD4](https://github.com/tgstation/tgstation/assets/13398309/1b3c97d5-500b-4d3d-a104-8dac7071fae0)

This results in trying to access `GLOB.barefootstep[null]`, which
results in a runtime, which prevents the `play_fov_effect()` from
executing.

## Why It's Good For The Game

Less CI failures, and fixes a bug.

## Changelog

🆑
fix: fixes a runtime in footstep code that would prevent the fov effect
from playing to nearby mobs
/🆑
2023-11-25 04:15:54 +01:00
Y0SH1M4S73R
376781879c Different pen types have unique behavior when used in foam darts. (#79587)
## About The Pull Request

This PR makes the following changes:
- Refactors inserting items into foam darts into a component on items
that can be inserted into darts
- Adds the aforementioned component to pens
- Provides an inspection tip for how to modify a foam dart
- Gives different pen types specific behavior when used in a foam dart

Pens typically give a foam dart 5 brute and 50% embed chance (affected
by falloff). The following types of pens give the specified properties
(usually directly derived from the pen's stats and additional
functions):
- Red pen (and four-color pen set to red): Slightly faster dart
- Captain's fountain pen: Slightly faster dart, and 75% base embed
chance
- Sleepypen: Tries to inject its reagents into the hit mob, but doesn't
penetrate thick clothing like syringe guns do
- Energy Dagger: 35 brute, 100% base embed chance, and slightly faster
dart
- Survival Pen: Mines rocks on impact
- Fine Tip Pen (if someone somehow manages to get one): 100 bare wound
bonus and 9000 demolition modifier

## Why It's Good For The Game

Expands the emergent gameplay possibilities of using pens in foam darts.

While there are balance risks involved with traitors being able to buy
the equivalent of reusable 45u syringe shots and 35 brute bullets, you
are not likely to get your pen back once it hits its target, unless you
somehow have the recall spell and have bound the pen to it. There are
probably more TC-efficient ways to achieve comparable projectile
weaponry, but foam dart guns have an air of subtlety to them... at least
until your skin is pierced by a pointy writing implement that may also
be something more deadly. If maintainers still have balance concerns,
please let me know.

## Changelog

🆑
add: Certain types of pens now function like you expect they would when
inserted into a foam dart
qol: Examining a foam dart closely will show you how to modify it, or
what it is modified with
/🆑
2023-11-21 20:34:41 -05:00
MrMelbert
c1ed62915b Adds UPSIDE_DOWN movetype for negative gravity / makes Atrocinator affected by less things (#79785)
## About The Pull Request

Fixes #79764

I was going to tackle this issue by slamming `TRAIT_NO_SLIP_ALL` on
Atrocinator users and calling it a day, but like, that didn't feel
proper.

So I thought hey, we could just give them the flying movetype, even
though they technically aren't flying it means they're unaffected by
things that flying would make you unaffected by.

Nope, this means the mob technically "negates gravity", so no falling
and no feetsteps.

Let's try floating - this give us feetsteps but no falling upwards. 

So instead of going back to square one, with `TRAIT_NO_SLIP_ALL`, I
decided to go for the more complex route of just adding a movetype.

Hence, move type `UPSIDE_DOWN`. This covers situations where a mob would
be "floating" above the ground, but still walking. ...Negative gravity.

This means overall the Atrociator acts more as you'd expect - you don't
slip on ice, you don't trigger bear traps or mouse traps, you can walk
over railings, unaffected by conveyor belts, etc.

## Why It's Good For The Game

Makes the Atrocinator a lot more consistent with how you'd expect for it
to work.

Admittedly it is a bit niche use of movetypes, but it can possibly be
expanded to more things in the future, who knows? I applied it to mobs
on meat spikes (even though they don't move), just for proof of concept.

## Changelog

🆑 Melbert
fix: Atrocinating mobs will now behave more as you'd expect. Meaning
they don't slip on wet patches, can't trigger bear traps / landmines /
mouse traps, ignore conveyors, and can walk over tables and railings.
fix: Floating mobs are unaffected by conveyor belts, acid (on the
ground), glass tables
fix: Floating mobs won't squish stuff like roaches anymore 
fix: Fixes bear traps triggering on floating / flying mobs 
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-11-20 21:19:13 +00: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
san7890
b251b9dbb0 Refactors Parrots into Basic Mobs (ft. Ben10Omintrix/Kobsamobsa) (#79762) 2023-11-18 19:24:32 -08:00
MrMelbert
6ae59ebf52 Fixes some fried food exploits (#79789)
## About The Pull Request

I would've been content to leave these, but you guys just haaaad to
overdo it

- Plates now respect weight class of items on top
- Fried food now respect volume of existing items

## Why It's Good For The Game

These exploits are not intended and have potential and, if abused, can
severely detract from rounds.

## Changelog

🆑 Melbert
fix: Plates now respect the weight class of items on top.
fix: Fried items now respect existing volume cap.
fix: Smartfridges now don't accept bulky food items, good thing we have
none of those right guys?
/🆑
2023-11-17 23:52:22 -07:00