Commit Graph

426 Commits

Author SHA1 Message Date
nevimer 6e9f2ccfc0 Merge remote-tracking branch 'tgstation/master' into upstream-12-15
# Conflicts:
#	.github/workflows/compile_all_maps.yml
#	.github/workflows/run_integration_tests.yml
#	_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm
#	code/_onclick/hud/credits.dm
#	code/controllers/subsystem/networks/id_access.dm
#	code/datums/diseases/advance/advance.dm
#	code/datums/diseases/advance/symptoms/heal.dm
#	code/game/machinery/doors/door.dm
#	code/game/objects/structures/crates_lockers/closets/secure/medical.dm
#	code/game/objects/structures/crates_lockers/closets/secure/security.dm
#	code/modules/antagonists/malf_ai/malf_ai_modules.dm
#	code/modules/jobs/job_types/_job.dm
#	code/modules/loadout/categories/accessories.dm
#	code/modules/loadout/loadout_helpers.dm
#	code/modules/loadout/loadout_items.dm
#	code/modules/loadout/loadout_preference.dm
#	code/modules/mob/living/silicon/robot/robot_defense.dm
#	code/modules/mod/mod_theme.dm
#	code/modules/projectiles/ammunition/energy/laser.dm
#	code/modules/reagents/reagent_containers/cups/drinks.dm
#	code/modules/shuttle/mobile_port/variants/supply.dm
#	code/modules/surgery/organs/internal/eyes/_eyes.dm
#	code/modules/unit_tests/screenshots/screenshot_antag_icons_heretic.png
#	icons/hud/screen_full.dmi
2025-12-15 18:12:29 -05:00
archbtw cd1d8f8b25 Corrects not being able to sit on all stools (#94310)
Corrects not being able to sit on all stools
Since it's a chair

Also fixes a mob's offset when sitting on a stool - if the chair is
facing north, the mob should be behind the chair sprite.

## Why It's Good For The Game

Stools are chairs
People sit on chairs
RP level 100

## Changelog

🆑 ArchBTW
fix: Fix sitting on stools (it's a chair)
fix: Fix offset when sitting on a stool
/🆑

---------

Co-authored-by: glue0000 <230859540+glue0000@users.noreply.github.com>
2025-12-05 00:12:07 +01:00
Ghom 0b0c5ea91e Unit test material checks are now performed on all crafting recipes by default. All stack recipes now transfer mats to the results (#92620)
## About The Pull Request
Extends the part of the crafting unit test that ensures consistency
between the total mats of the components of a recipe (or rather, the
result of said recipe) and a generic instance of the same type as its
result, previously only implemented on food recipes.

## Why It's Good For The Game
This ensures a degree of consistency with the material composition of
various objects in the game. I couldn't do it in the original PR as that
one was too big already and it took months to get it merged, and have
the relative bugs fixed.

Currently a WIP as I slowly deal with the unit test reports.

## Changelog

🆑
refactor: Follow-up to the crafting/material refactor from months ago.
All objects crafted with stacks now inherit their mat composition (not
necessarily the effects and color) by default, while previously only a
few things like chair, sinks and toilets did. Report any object looking
or behaving weirdly as a result.
fix: The material composition of ammo boxes is no longer a 1/10 of what
it's supposed to be. It was a shitty hack to make it harder to recycle
empty ammo boxes. Instead, they lose materials as they're emptied now.
/🆑
2025-12-02 18:29:01 -05:00
MrMelbert 42f4df09a7 Tweaks ai escape_captivity behavior (#94224)
## About The Pull Request

Now: AI will break chairs they're buckled in
After PR: Ai will prefer to resist out of chairs if possible

Fixes #94222 , partially

Really I think this shouldn't be a subtree, orrrrr if it is it should be
enabled by combat.
It's weird that buckling a pet into a pet bed encourages them to get up
ASAP.
If a mob is completely docile or otherwise not trying to act, they
shouldn't freak out and break whatever they're sat in.

Alternatively pets need a behavior for seeking out a bed (but that's
more effort)

## Changelog

🆑 Melbert
fix: AI mobs will prefer to resist out of simple buckles (like being sat
in a chair or bed) rather than try to break the chair.
/🆑
2025-11-30 17:26:11 -07:00
Roxy e28e9fbdba Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-23-10-2025 2025-10-23 17:38:23 -04:00
SmArtKar 6ddbe65101 Fixes glow bleeding through chair and sofa armrests (#93552)
## About The Pull Request

Closes #93375

## Changelog
🆑
fix: Fixed glow bleeding through chair and sofa armrests
/🆑
2025-10-23 02:39:59 +02:00
Roxy d14e538393 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-15-10-2025 2025-10-15 19:34:41 -04:00
Ghom f72eb75a6f Handcuffs can now be used to bind certain items (briefcases, toolboxes, etc.) to your hand. (#93305)
## About The Pull Request
Technically, this PR introduces the cuffable_item element and the
cuffed_item status effect and their relative code.

In more player-friendly terms, this allows the ability to use handcuffs
to bind certain items to your hands by right-clicking it with a pair of
handcuffs in your active hand. This makes the item unable to be dropped,
for better or worse, until you or someone else remove said cuffs. And
no, this doesn't conflict with the ability to be handcuffed if you're
silly enough to think that.

There are more than one way to remove the cuffs. For the player with the
item cuffed to their hand, to remove the cuffs they can either click the
status alert, or examine the item and click the relative hyperlink. The
second option is good to have if for some reason the status alert
doesn't show up (too many alerts etc.).

For other people, they can remove the cuffs by opening the strip
inventory menu (the one you open by click-dragging the sprite of person
with the item onto yours). It's an alternative action specific to this
status effect (therefore only held items). Until the cuffs are removed,
trying to remove the item **directly** will bring you nowhere **because
the item is stuck to their hands**, duh. Alternatively you can just chop
their arm off. You do what you do.

For a list of items that can be bound with cuffs (suggestions welcome):
- briefcases
- toolboxes
- lockboxes
- first aid kits
- shields (they generally have handles and all. gameplay-wise they
already take away one hand slot to use. Using cuffs seals the deal: no
swapping items on the go, so no two-handed weapons, but you won't drop
the shield until it's broken)
- jerrycans (Kryson's suggestion)
- soup pots (ditto, kinda weird)
- coffee mugs, and the mauna mug (ditto)
- buckets
- plushes (silly stuff, if you ever want to arrest a plush or test the
feature)
- pet carriers
- mining drills
- swords with closed guards (ERT chainsaw-sword, cap's sabre, parsnip
sabre, cutlass, e-cutlass...)
- crutches and the white cane
- baskets
- flashlights and lamps (not subtypes like flares, glowsticks and
torches)
- TTVs
- chairs

## Why It's Good For The Game
This opens up for some emergent use for handcuffs beside people (or
prisoner shoes). Inspired by a scene of some 1998 action movie, where
one of the bad guys had the mc guffin briefcase latched to his wrist
with a pair of handcuffs.

Codewise, it was also a reason to refactor bits of code like handcuffs
and screen alerts slightly. On a sidenote, actual sprites for
cult/heretic shackles.

## Changelog

🆑
add: You can now bind certain items like briefcases, toolboxes, medkits,
shields, jerrycans etc. to your hand with a pair of handcuffs,
preventing them from being dropped. You can remove said binds at any
time unless incapacitated, and so can others through the strip inventory
menu.
qol: The appearance of a screen alert now updates if the object it
represents (like, an item offered by another player) changes appearance.
imageadd: The shadow shackles item (from cult magic and heretic
sacrifices) now has its own icon.
/🆑
2025-10-07 05:24:20 -06:00
MrMelbert cb3468a5ce Handrails, visual shuttle buckles, and buckling feedback changes (#91504)
## About The Pull Request

1. Adds Handrails, currently mapper only. [Sprite ported from
Baystation](https://github.com/Baystation12/Baystation12/blob/dev/icons/obj/structures/handrail.dmi).
This is just a small fluff object designed to be put onto shuttles.
Players can click on it (or mouse drop) to buckle to it (grab it),
keeping them from being thrown around on shuttle launch.


![image](https://github.com/user-attachments/assets/b5bba651-d6ad-4e12-bb13-988ad5bc64ca)

2. Adds Shuttle chair restraints. [Sprite ported from
Aurora](https://github.com/Aurorastation/Aurora.3/blob/master/icons/obj/structure/chairs.dmi),
though altered a decent amount. They flip up with no one seated and flip
down when someone buckles, but they have no gameplay effects (ie, they
don't require a do-after, they don't block hands, etc etc)


![image](https://github.com/user-attachments/assets/4118a174-2443-4da2-8126-649dccfdcb65)


![image](https://github.com/user-attachments/assets/d40fb7b4-f7d2-4052-8f6c-41dfda62cf95)

3. Some objects now have unique feedback messages for buckling - you sit
on chairs, or lay down on beds. This message will change depending on if
the mob is restrained, so it's a bit more obvious when someone is tied
to a chair vs just sitting down.


![image](https://github.com/user-attachments/assets/9ea1da9f-ae25-4008-8ca4-8202f7508290)

4. If you're buckled on a shuttle which has "knockdown" force, you won't
be paralyzed - instead, just knocked down and immobilized for a short
period (so you can still use your hands / act).

## Why It's Good For The Game

1. Gives mappers some additional fluff for shuttles, especially if their
shuttle has knockdown force.

2. Adds muh immersion to shuttle rides. Just a flavor thing.

3. Adds muh immersion to sitting down at the bar. Again just a flavor
thing.

4. I did this to make handrails work, but I can find an alternate
workaround if so desired.

## Changelog

🆑 Melbert, sprites from Baystation / Aurorastation
add: Adds grabbable handrails (mapper only for now)
image: Adds a visual effect to buckling to shuttle seats
qol: Different objects have different chat messages for buckling. 
qol: If you're buckled in on a violent shuttle ride, you will be knocked
down and immobilized, but not fully stunned (ie: can still use hands).
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2025-06-15 15:53:27 -04:00
MrMelbert 0343a41b42 Handrails, visual shuttle buckles, and buckling feedback changes (#91504)
## About The Pull Request

1. Adds Handrails, currently mapper only. [Sprite ported from
Baystation](https://github.com/Baystation12/Baystation12/blob/dev/icons/obj/structures/handrail.dmi).
This is just a small fluff object designed to be put onto shuttles.
Players can click on it (or mouse drop) to buckle to it (grab it),
keeping them from being thrown around on shuttle launch.


![image](https://github.com/user-attachments/assets/b5bba651-d6ad-4e12-bb13-988ad5bc64ca)

2. Adds Shuttle chair restraints. [Sprite ported from
Aurora](https://github.com/Aurorastation/Aurora.3/blob/master/icons/obj/structure/chairs.dmi),
though altered a decent amount. They flip up with no one seated and flip
down when someone buckles, but they have no gameplay effects (ie, they
don't require a do-after, they don't block hands, etc etc)


![image](https://github.com/user-attachments/assets/4118a174-2443-4da2-8126-649dccfdcb65)


![image](https://github.com/user-attachments/assets/d40fb7b4-f7d2-4052-8f6c-41dfda62cf95)

3. Some objects now have unique feedback messages for buckling - you sit
on chairs, or lay down on beds. This message will change depending on if
the mob is restrained, so it's a bit more obvious when someone is tied
to a chair vs just sitting down.


![image](https://github.com/user-attachments/assets/9ea1da9f-ae25-4008-8ca4-8202f7508290)

4. If you're buckled on a shuttle which has "knockdown" force, you won't
be paralyzed - instead, just knocked down and immobilized for a short
period (so you can still use your hands / act).

## Why It's Good For The Game

1. Gives mappers some additional fluff for shuttles, especially if their
shuttle has knockdown force.

2. Adds muh immersion to shuttle rides. Just a flavor thing.

3. Adds muh immersion to sitting down at the bar. Again just a flavor
thing.

4. I did this to make handrails work, but I can find an alternate
workaround if so desired.

## Changelog

🆑 Melbert, sprites from Baystation / Aurorastation
add: Adds grabbable handrails (mapper only for now)
image: Adds a visual effect to buckling to shuttle seats
qol: Different objects have different chat messages for buckling. 
qol: If you're buckled in on a violent shuttle ride, you will be knocked
down and immobilized, but not fully stunned (ie: can still use hands).
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2025-06-09 17:40:48 +00:00
Bloop 655b66bdd0 Adds automatic GAGS icon generation for mapping and the loadout menu (#90940)
Revival of https://github.com/tgstation/tgstation/pull/86482, which is
even more doable now that we have rustg iconforge generation.

What this PR does:

- Sets up every single GAGS icon in the game to have their own preview
icon autogenerated during compile. This is configurable to not run
during live. The icons are created in `icons/map_icons/..`
- This also has the side effect of providing accurate GAGS icons for
things like the loadout menu. No more having to create your own
previews.

![FOuGL6ofxC](https://github.com/user-attachments/assets/e5414971-7f13-4883-9f7f-a8a212b46fe8)

<details><summary>Mappers rejoice!</summary>

![StrongDMM_1oeMSoRHXT](https://github.com/user-attachments/assets/83dcfe4c-31be-4953-98f3-dff90268bbc4)

![StrongDMM_uyqu3CggPn](https://github.com/user-attachments/assets/7896f99e-2656-40e1-a9da-3a513882365a)

</details>

<details><summary>Uses iconforge so it does not take up much time during
init</summary>

![dreamdaemon_u4Md3Dqwge](https://github.com/user-attachments/assets/17baaff8-5d5e-4a4d-ba8f-9dd548024155)

</details>

---

this still applies:

Note for Spriters:

After you've assigned the correct values to vars, you must run the game
through init on your local machine and commit the changes to the map
icon dmi files. Unit tests should catch all cases of forgetting to
assign the correct vars, or not running through init.

Note for Server Operators:

In order to not generate these icons on live I've added a new config
entry which should be disabled on live called GENERATE_ASSETS_IN_INIT in
the config.txt

No more error icons in SDMM and loadout.

🆑
refactor: preview icons for greyscale items are now automatically
generated, meaning you can see GAGS as they actually appear ingame while
mapping or viewing the loadout menu.
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2025-05-29 16:14:43 -04:00
Bloop cb51a652a9 Adds automatic GAGS icon generation for mapping and the loadout menu (#90940)
## About The Pull Request

Revival of https://github.com/tgstation/tgstation/pull/86482, which is
even more doable now that we have rustg iconforge generation.

What this PR does:

- Sets up every single GAGS icon in the game to have their own preview
icon autogenerated during compile. This is configurable to not run
during live. The icons are created in `icons/map_icons/..`
- This also has the side effect of providing accurate GAGS icons for
things like the loadout menu. No more having to create your own
previews.


![FOuGL6ofxC](https://github.com/user-attachments/assets/e5414971-7f13-4883-9f7f-a8a212b46fe8)

<details><summary>Mappers rejoice!</summary>


![StrongDMM_1oeMSoRHXT](https://github.com/user-attachments/assets/83dcfe4c-31be-4953-98f3-dff90268bbc4)


![StrongDMM_uyqu3CggPn](https://github.com/user-attachments/assets/7896f99e-2656-40e1-a9da-3a513882365a)

</details>

<details><summary>Uses iconforge so it does not take up much time during
init</summary>


![dreamdaemon_u4Md3Dqwge](https://github.com/user-attachments/assets/17baaff8-5d5e-4a4d-ba8f-9dd548024155)

</details>

---

### Copied from https://github.com/tgstation/tgstation/pull/86482 as
this still applies:

Note for Spriters:

After you've assigned the correct values to vars, you must run the game
through init on your local machine and commit the changes to the map
icon dmi files. Unit tests should catch all cases of forgetting to
assign the correct vars, or not running through init.

Note for Server Operators:

In order to not generate these icons on live I've added a new config
entry which should be disabled on live called GENERATE_ASSETS_IN_INIT in
the config.txt


## Why It's Good For The Game

No more error icons in SDMM and loadout.

## Changelog

🆑
refactor: preview icons for greyscale items are now automatically
generated, meaning you can see GAGS as they actually appear ingame while
mapping or viewing the loadout menu.
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2025-05-24 15:21:02 -07:00
MrMelbert bc2215667f Re-refactors batons / Refactors attack chain force modifiers (#90809)
Melee attack chain now has a list passed along with it,
`attack_modifiers`, which you can stick force modifiers to change the
resulting attack

This is basically a soft implementation of damage packets until a more
definitive pr, but one that only applies to item attack chain, and not
unarmed attacks.

This change was done to facilitate a baton refactor - batons no longer
hack together their own attack chain, and are now integrated straight
into the real attack chain. This refactor itself was done because batons
don't send any attack signals, which has been annoying in the past (for
swing combat).

🆑 Melbert
refactor: Batons have been refactored again. Baton stuns now properly
count as an attack, when before it was a nothing. Report any oddities,
particularly in regards to harmbatonning vs normal batonning.
refactor: The method of adjusting item damage mid-attack has been
refactored - some affected items include the Nullblade and knives.
Report any strange happenings with damage numbers.
refactor: A few objects have been moved to the new interaction chain -
records consoles, mawed crucible, alien weeds and space vines, hedges,
restaurant portals, and some mobs - to name a few.
fix: Spears only deal bonus damage against secure lockers, not all
closet types (including crates)
/🆑
2025-05-22 21:30:07 -04:00
MrMelbert 5261efb67f Re-refactors batons / Refactors attack chain force modifiers (#90809)
## About The Pull Request

Melee attack chain now has a list passed along with it,
`attack_modifiers`, which you can stick force modifiers to change the
resulting attack

This is basically a soft implementation of damage packets until a more
definitive pr, but one that only applies to item attack chain, and not
unarmed attacks.

This change was done to facilitate a baton refactor - batons no longer
hack together their own attack chain, and are now integrated straight
into the real attack chain. This refactor itself was done because batons
don't send any attack signals, which has been annoying in the past (for
swing combat).

## Changelog

🆑 Melbert
refactor: Batons have been refactored again. Baton stuns now properly
count as an attack, when before it was a nothing. Report any oddities,
particularly in regards to harmbatonning vs normal batonning.
refactor: The method of adjusting item damage mid-attack has been
refactored - some affected items include the Nullblade and knives.
Report any strange happenings with damage numbers.
refactor: A few objects have been moved to the new interaction chain -
records consoles, mawed crucible, alien weeds and space vines, hedges,
restaurant portals, and some mobs - to name a few.
fix: Spears only deal bonus damage against secure lockers, not all
closet types (including crates)
/🆑
2025-05-19 13:32:12 +10:00
Ghom 11d82b7995 You can now interact with held mobs beside wearing them (feat: "minor" melee attack chain cleanup) (#90080)
People can now pet held mothroaches and pugs if they want to, or use
items on them, hopefully without causing many issues. After all, it only
took about a couple dozen lines of code to make...

...Oh, did the 527 files changed or the 850~ lines added/removed perhaps
catch your eye? Made you wonder if I accidentally pushed the wrong
branch? or skewed something up big time? Well, nuh uh. I just happen to
be fed up with the melee attack chain still using stringized params
instead of an array/list. It was frankly revolting to see how I'd have
had to otherwise call `list2params` for what I'm trying to accomplish
here, and make this PR another tessera to the immense stupidity of our
attack chain procs calling `params2list` over and over and over instead
of just using that one call instance from `ClickOn` as an argument. It's
2025, honey, wake up!

I also tried to replace some of those single letter vars/args but there
are just way too many of them.

Improving old code. And I want to be able to pet mobroaches while
holding them too.

🆑
qol: You can now interact with held mobs in more ways beside wearing
them.
/🆑
2025-04-29 18:22:44 -06:00
Ghom 339616ae78 You can now interact with held mobs beside wearing them (feat: "minor" melee attack chain cleanup) (#90080)
## About The Pull Request
People can now pet held mothroaches and pugs if they want to, or use
items on them, hopefully without causing many issues. After all, it only
took about a couple dozen lines of code to make...

...Oh, did the 527 files changed or the 850~ lines added/removed perhaps
catch your eye? Made you wonder if I accidentally pushed the wrong
branch? or skewed something up big time? Well, nuh uh. I just happen to
be fed up with the melee attack chain still using stringized params
instead of an array/list. It was frankly revolting to see how I'd have
had to otherwise call `list2params` for what I'm trying to accomplish
here, and make this PR another tessera to the immense stupidity of our
attack chain procs calling `params2list` over and over and over instead
of just using that one call instance from `ClickOn` as an argument. It's
2025, honey, wake up!

I also tried to replace some of those single letter vars/args but there
are just way too many of them.

## Why It's Good For The Game
Improving old code. And I want to be able to pet mobroaches while
holding them too.

## Changelog

🆑
qol: You can now interact with held mobs in more ways beside wearing
them.
/🆑
2025-04-23 20:18:26 +00:00
Waterpig 753d8e5ba4 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-25-04a 2025-04-08 18:58:45 +02:00
LemonInTheDark b59132ad60 Removes Corner Smoothing (Mild Bitmask Improvements) (#90002)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

[Removes all remaining users of SMOOTH_CORNER + dirt
automation](https://github.com/tgstation/tgstation/commit/71d120511a372501ac546b2571ef570eb4426a56)

Removes all remaining instances of overlay smoothing (the deprecated
system that stitches corners together IN ENGINE) from the game.

This amounts to:
The test smoothing wall, which I converted to just bitmask + diagonals 
Stationary canisters, which I've done the same to (alongside adding all
the states to gags, which around doubled their gags count). These
autocut now.

I've also given dirt icons autocutting, for spriter convieneince (I
would have done this before but I didn't know they smoothed)

[Removes corner smoothing from the
codebase](https://github.com/tgstation/tgstation/commit/98ebe5815223a3078c2e591fd277b9418ed03278)

This code is OLD, and has been functionally deprecated for as long as
I've been here. It basically does what bitmask smoothing does, but
instead of prebaking connections they're formed in engine with overlays.

This is... fine, and does TECHNICALLY allow for unique effects, but
none's gonna use it because the details are so niche, so it just becomes
a risk factor for someone fucking up and using overlays for some reason.

What it does do then is clutter up our smoothing code with 2 different
async systems, one of which functions SLIGHTLY differently from its
brother. IMO it just works to confuse people trying to read smoothing
code (already quite confusing).

I've removed it, alongside its bespoke code/variables, excluding
area_limited_icon_smoothing, a var on areas that prevents smoothing out
of network, which I have instead integrated into bitmask smoothing.

I've updated snowflake's documentation to be more up to date with modern
systems, and earmarked where explanations/automation for the more...
underdeveloped bits of smoothing should go in the future.

## Why It's Good For The Game

I relapsed and needed something to put that energy towards.

We don't really want people to use this, and none knows enough about it
to take advantage of its theoretical uses.
Really its only purpose right now is making understanding diagonal
smoothing easier, and that's not all that hard of a task.
Better to remove and integrate then to let rot and confuse.

## Changelog

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

🆑
add: Smoothed objects on shuttles now will only smooth with other
shuttles (added support for extensions of this system)
refactor: I've funked around with our smoothing system, cutting out some
older code. Lemme know if anything is weird PLEASE
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2025-03-20 15:42:16 +13:00
MrMelbert 5a16f74fb3 Pixel adjustments to mobs are now sourced / Refactors riding (#89320)
Fixes #85980

- Pixel adjustments are now sourced

When tweaking a mob's pixel w, x, y, z, is is now done via `add_offsets`
and must have a source string associated

- Refactors riding

Refactors how riding component selects the offsets to use. It's now all
done via the getter rather than a weird mix of a var, a cache, and a
getter.

- Moves a bunch of animations to use `pixel_w` / `pixel_z`

Largely to prevent conflicts with adjustments to a mob's pixel position,
but also as many animations are not actual movements, but visual
movements. Floating is one such example.

It just works

🆑 Melbert
fix: Fixed grab offsets not showing for anything but passive grab
fix: Fix jank with mob offsets when riding things
refactor: Refactored riding component, particularly how it selects layer
and offsets. Report any oddities
refactor: Refactored pixel offsets of mobs. Report any oddities
/🆑
2025-03-12 16:00:01 -04:00
SmArtKar f55435a6f5 [NO GBP] Fixes exceptionally dark armrests on chairs (#89409)
## About The Pull Request

Closes #89037
color goes through KEEP_APART

## Changelog
🆑
fix: Fixed exceptionally dark armrests on chairs
/🆑
2025-03-12 15:45:43 -04:00
Majkl-J b6b8306fda Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-25-02a 2025-02-20 00:00:19 -08:00
MrMelbert ffd97819c1 Pixel adjustments to mobs are now sourced / Refactors riding (#89320)
## About The Pull Request

Fixes #85980

- Pixel adjustments are now sourced

When tweaking a mob's pixel w, x, y, z, is is now done via `add_offsets`
and must have a source string associated

- Refactors riding

Refactors how riding component selects the offsets to use. It's now all
done via the getter rather than a weird mix of a var, a cache, and a
getter.

- Moves a bunch of animations to use `pixel_w` / `pixel_z`

Largely to prevent conflicts with adjustments to a mob's pixel position,
but also as many animations are not actual movements, but visual
movements. Floating is one such example.

## Why It's Good For The Game

It just works

## Changelog

🆑 Melbert
fix: Fixed grab offsets not showing for anything but passive grab
fix: Fix jank with mob offsets when riding things
refactor: Refactored riding component, particularly how it selects layer
and offsets. Report any oddities
refactor: Refactored pixel offsets of mobs. Report any oddities
/🆑
2025-02-12 17:16:13 -07:00
SmArtKar 31a08dc73d [NO GBP] Fixes exceptionally dark armrests on chairs (#89409)
## About The Pull Request

Closes #89037
color goes through KEEP_APART

## Changelog
🆑
fix: Fixed exceptionally dark armrests on chairs
/🆑
2025-02-11 00:07:48 +01:00
Runi-c d7130a4598 Make slips eligible for shove stuns (#89313)
## About The Pull Request

Adds slips to the list of existing shove stun methods originally set in
https://github.com/tgstation/tgstation/pull/84640 (wall shoves,
telebaton, mansus grasp), and also reifies this concept as the "dazed"
status effect.

This makes it so that being knocked down from a slip from any source
(e.g. wet floor, clown stuff, lube, foam, oil, butterdog) gives the
dazed visual effect and makes you eligible for being shove stunned. The
status always lasts for 3 seconds even if e.g. slipping on lube knocks
you down for 15, but this can be customized per slip.

## Why It's Good For The Game

Further rewards environmental play and provides another feasible means
of fighting back against better equipped opponents, both in line with
the original PR. Also the visual cue fits well as an immediate signal
that you're dazed and can't get up.

## Changelog
🆑
balance: slips now make you eligible for being shove stunned
/🆑

---------

Co-authored-by: Roryl-c <5150427+Roryl-c@users.noreply.github.com>
2025-02-06 15:37:22 +11:00
Penelope Haze d0a7f955f8 Fix various issues with names in string interpolation (#89246)
## About The Pull Request
Commit messages should be descriptive of all changes.
The "incorrect `\The` macro capitalization" was intentional when it was
added, but as far as I know TG says "the supermatter" rather than "The
Supermatter," so it's incorrect now.
This is completely untested. I don't even know how you'd go about
testing this, it's just a fuckton of strings.
Someday I want to extract them and run NLP on it to catch grammar
problems...

## Why It's Good For The Game
Basic grammar pass for name strings. Should make `\the` work better and
avoid cases like `the John Smith`.
2025-01-29 17:46:03 +01:00
Penelope Haze 4c2a76ede3 Fix a large number of typos (#89254)
Fixes a very large number of typos. A few of these fixes also extend to
variable names, but only the really egregious ones like "concious".
2025-01-28 22:16:16 +01:00
grungussuss 1e78f0d3c5 Buckling sound for chairs and medical beds (#88871)
## About The Pull Request
completes
https://github.com/orgs/tgstation/projects/19/views/1?pane=issue&itemId=90852039
### Adds a buckle and unbuckle sound for:
- shuttle seats
- medical beds
- emergency medical beds

All sounds are normalised to -23 LUFS
## Preview 
<details>
<summary> Click me! </summary>


https://github.com/user-attachments/assets/04f172d5-38a1-4af1-8972-8667cc97654d


https://github.com/user-attachments/assets/e38f4122-9fc0-4c45-97de-633d7aa0c5e2

</details>

## Why It's Good For The Game
immershun
## Changelog
🆑 grungussuss
sound: added sounds for buckling to shuttle seats and medical beds
/🆑

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
2025-01-06 08:06:18 -08:00
SmArtKar 488ded213e [NO GBP] Fixes chair, echair, wheelchair and vehicle overlays on painted objects (#88745)
## About The Pull Request

Closes #88644
Insanity

## Changelog
🆑
fix: Fixed chair, echair, wheelchair and vehicle overlays on painted
objects
/🆑
2024-12-28 07:41:27 +00:00
necromanceranne eac26852da The Chairening: Chairs can break when used to block. Alters how chairs stun when smashed over someones head. (#88480)
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2024-12-26 15:58:23 +00:00
SmArtKar 7ddc30783a Adds better attack animations and alternate attack modes (#88418)
## About The Pull Request

This is the first PR in a series attempting to modernize our damage and
armor, both from a code and a gameplay perspective. This part implements
unique attack animations, adds alternate attack modes for items and
fixes some minor oversights.

Items now have unique attack animation based on their sharpness - sharp
items are now swung in an arc, while pointy items are thrust forward.
This change is ***purely visual***, this is not swing combat. (However,
this does assign icon rotation data to many items, which should help
swing combat later down the line).

Certain items like knives and swords now have secondary attacks - right
clicks will perform stabbing attacks instead of slashing for a chance to
leave piercing wounds, albeit with slightly lower damage - trying to
stick a katana through someone won't get you very far!

https://github.com/user-attachments/assets/1f92bbcd-9aa1-482f-bc26-5e84fe2a07e1

Turns out that spears acted as oversized knives this entire time, being
SHARP_EDGED instead of SHARP_POINTY - in order for their animations to
make sense, they're now once again pointy (according to comment,
originally they were made sharp because piercing wounds weren't very
threatening, which is no longer the case)

Another major change is that structure damage is now influenced by armor
penetration - I am not sure if this is intentional or not, but attacking
item's AP never applied to non-mob damage.

Additionally, also fixes an issue where attack verbs for you and
everyone else may differ.
2024-12-17 12:35:52 -06:00
Rimi Nosha 6439785b10 [EARLY PULL] Fixes benches attempting to add a nonexisting armrest overlay (#87368) (#2655)
## About The Pull Request

https://github.com/tgstation/tgstation/pull/87368

Fixes the error overlay when buckled to a bench!

## Why It's Good For The Game

Bug bad, fix good!

## Proof Of Testing
<details>
<summary>Screenshots/Videos</summary>


![image](https://github.com/user-attachments/assets/8df42276-10df-401c-912b-d2e9e563ed17)

</details>

## Changelog
🆑 Profakos
fix: Benches no longer produce an Error overlay when buckled
/🆑

Co-authored-by: Profakos <profakos@gmail.com>
2024-12-08 22:24:56 +02:00
SmArtKar 359187e086 Fixes electrified chair overlay layering (#87228)
## About The Pull Request

Closes #87221 by changing overlay layers when a mob is buckled to the
chair.

## Changelog
🆑
fix: Fixed electrified chair overlay layering
/🆑
2024-12-01 22:06:24 -08:00
SmArtKar 52237447d6 Improves armrest code for chairs, fixes bronze chairs not spinning around (#87225)
## About The Pull Request

Closes #87222
armrest code doesnt have to be copied thrice if it can be on chairs with
a var to control if its actually used

## Changelog
🆑
fix: Bronze chairs will automatically spin once more
/🆑
# Conflicts:
#	code/game/objects/structures/beds_chairs/chair.dm
#	code/game/objects/structures/beds_chairs/sofa.dm
2024-12-01 21:58:30 -08:00
Tim c0e3ba7320 Fix infinite metal holodeck exploit (#87806)
## About The Pull Request
This stops people from using chairs to create free metal. It was
possible to pick up a chair or place it down and it would lose it's
hologram status since a new object is created.

Now anyone that attempts to place down or pick up a chair will have it
vanish.

## Why It's Good For The Game
No more free metal.

## Changelog
🆑
fix: Fix using chairs in holodeck to create infinite metal 
/🆑
2024-11-13 10:16:03 -05:00
Ghom 778ed9f1ab The death or internal/external organ pathing (ft. fixed fox ears and recoloring bodypart overlays with dye sprays) (#87434)
## About The Pull Request
This PR kills the abstract internal and external typepaths for organs,
now replaced by an EXTERNAL_ORGAN flag to distinguish the two kinds.

This PR also fixes fox ears (from #87162, no tail is added) and
mushpeople's caps (they should be red, the screenshot is a tad
outdated).

And yes, you can now use a hair dye spray to recolor body parts like
most tails, podpeople hair, mushpeople caps and cat ears. The process
can be reversed by using the spray again.

## Why It's Good For The Game
Time-Green put some effort during the last few months to untie functions
and mechanics from external/internal organ pathing. Now, all that this
pathing is good for are a few typechecks, easily replaceable with
bitflags.

Also podpeople and mushpeople need a way to recolor their "hair". This
kind of applies to fish tails from the fish infusion, which colors can't
be selected right now. The rest is just there if you ever want to
recolor your lizard tail for some reason.

Proof of testing btw (screenshot taken before mushpeople cap fix, right
side has dyed body parts, moth can't be dyed, they're already fabolous):

![immagine](https://github.com/user-attachments/assets/2bb625c9-9233-42eb-b9b8-e0bd6909ce89)

## Changelog

🆑
code: Removed internal/external pathing from organs in favor of a bit
flag. Hopefully this shouldn't break anything about organs.
fix: Fixed invisible fox ears.
fix: Fixed mushpeople caps not being colored red by default.
add: You can now dye most tails, podpeople hair, mushpeople caps etc.
with a hair dye spray.
/🆑
2024-10-30 08:03:02 +01:00
r3dj4ck0424 c63c34330b Makes office chairs named "office chair" (#87505)
## About The Pull Request

Adds a name to the office chair obj and its light variants describing
them as "office chair". Additionally removes the custom name "blue" from
the blue variant of light office chair in birdshot.

## Why It's Good For The Game

Chairs are not lights and therefore need names that include "chair"
Fixes #87501 

## Changelog
🆑
fix: certain office chairs are now properly labelled
/🆑
2024-10-28 22:59:10 +01:00
Majkl-J e59d8ba64b Merge commit '179a607a90ad7ec62bdaff4e6fe72af60ee56442' of https://github.com/tgstation/tgstation into upstream-24-10b 2024-10-23 23:27:16 -07:00
Profakos 13edecad37 Fixes benches attempting to add a nonexisting armrest overlay (#87368)
## About The Pull Request

Benches produced an error overlay when you buckled to them, due to them
inheriting `has_armrest = TRUE` from sofas. This PR fixes that.

## Why It's Good For The Game

Closes #87364

~~There is also #87338 but that is a duplicate.~~  Closed.

## Changelog

🆑
fix: Benches no longer produce an Error overlay when buckled
/🆑
2024-10-23 14:01:36 +02:00
Waterpig bb70889f6e TG Upstream Part 1
3591 individual conflicts

Update build.js

Update install_node.sh

Update byond.js

oh my fucking god

hat

slow

huh

holy shit

we all fall down

2 more I missed

2900 individual conflicts

2700 Individual conflicts

replaces yarn file with tg version, bumping us down to 2200-ish

Down to 2000 individual conflicts

140 down

mmm

aaaaaaaaaaaaaaaaaaa

not yt

575

soon

900 individual conflicts

600 individual conflicts, 121 file conflicts

im not okay

160 across 19 files

29 in 4 files

0 conflicts, compiletime fix time

some minor incap stuff

missed ticks

weird dupe definition stuff

missed ticks 2

incap fixes

undefs and pie fix

Radio update and some extra minor stuff

returns a single override

no more dupe definitions, 175 compiletime errors

Unticked file fix

sound and emote stuff

honk and more radio stuff
2024-10-19 08:04:33 -07:00
SmArtKar 46e3edc788 Fixes electrified chair overlay layering (#87228)
## About The Pull Request

Closes #87221 by changing overlay layers when a mob is buckled to the
chair.

## Changelog
🆑
fix: Fixed electrified chair overlay layering
/🆑
2024-10-18 20:45:34 +03:00
SmArtKar 2bb20aab0c Improves armrest code for chairs, fixes bronze chairs not spinning around (#87225)
## About The Pull Request

Closes #87222
armrest code doesnt have to be copied thrice if it can be on chairs with
a var to control if its actually used

## Changelog
🆑
fix: Bronze chairs will automatically spin once more
/🆑
2024-10-17 19:41:58 +00:00
Ghom cffe5ffc33 Mixed bag of fishing adjustments. (#87201)
## About The Pull Request
This more or less ties with my previous PR where I fix some of the
issues I've seen with fishing, because both are the result of some live
playtesting in which I assessed some flaws and nits. So, let's get
started:

Lowered the number of fish to scan for each fish scanning experiment:
This is the most time-gating feature of fishing. As a scientist you're
usually better off doing anything else than this anyway, which is
understandable, but for whoever else that plans to get some nice ocean
fish, this is going to be a huge bummer. From 4, 8, 14, 21 to 3, 7, 11,
17.

Switched the ocean and chasm portal setting: Right now, the ocean portal
has the largest amount of catchable creatures, which can also help
progress the experiments, while the chasm setting only has two and is
only mildly useful for chasm chrabs --> lobstrosities (which suffer a
bit from not having a good enough AI right now). I hope I'll have the
time to add some late fishes to the chasm setting at some point.

Added a premapped fishing portal generator to the common service room of
every map: It takes quite some time to setup fishing. Making a fishing
portal is by far what I consider to be the most tedious part. Also Wawa
and Birdshot were also missing the aquarium kit. On a side-note I
realized some days ago that service jobs receive very good discounts on
the fishing items sold by the good clean vendor.

Added the fish puns speech modifier to fish-infused gills: I forgot to
do it when I made the PR. Shrimple as that.

Mild fish infusion tweaks: Lowered the crawling speed very sightly, but
buffed showers and water healing slightly. Drinking water now wets you
by about 1/4 of what splashing it would do.

Buffed fishing difficulty modifiers for items and chairs a little: For
the time and credits invested, buying a carp costume or whatever to be
slightly better at fishing doesn't seem that profitable, and I reckon I
was being a bit conservative with the values. Fishing is a considerable
time investment already, especially in the initial stage with the setup.
Also idk why sunglasses and thermals buff fishing while fish are
technically cold-blooded creatures so I removed the comp from them.

Added fishing rods and fish cases designs to cargo and science lathes:
Other base fishing designs are shared between the three departments,
while these two are only available for service (and autolathes
obviously).

Fishing skill now affects completion gain and not only completion loss:
Fishing as a feature has a slower pace than most things in the game. It
feels right that by the time you reach about legendary level, you get to
complete the minigame a bit faster.

## Why It's Good For The Game
To put it briefly, the feature feels right as a casual experience,
however time is very much against you and getting something done takes
some effort (especially on tram, where moving to and fro' departments is
almost like playing froggers at times)

## Changelog

🆑
map: Added a premapped fishing portal generator to every map.
balance: Lowered the requirements for fish scanning experiment. Swapped
the rewards of the second and third experiments.
balance: Buffed fishing difficulty modifiers for several items and
chairs.
balance: Fishing skill now affects completion speed of the minigame more
actively.
balance: Mild fish infusion tweaks. Crawling is a smidge slower, but
healing from showers and drank water is a bit better.
qol: Fishing rods and fish cases can now be printed by cargo and science
lathes.
add: Gills now give the fish puns speech modifier.
/🆑
2024-10-16 20:45:57 -04:00
SmArtKar d4ac95a0e1 Nobody expects the span inquisition: replaces most <span>s with macros (#86798)
## About The Pull Request
123 changed files and multiple crashes after writing broken regex, I
replaced most remains of direct spans with macros. This cleans up the
code and makes it easier to work with in general, see justification for
the original PR. I also fixed a bunch of broken and/or unclosed spans
here too.
I intentionally avoided replacing spans with multiple classes (in most
cases) and spans in the middle of strings as it would impact readability
(in my opinion at least) and could be done later if required.

## Why It's Good For The Game

Cleaner code, actually using our macros, fixes borked HTML in some
places. See original PR.

## Changelog
Nothing player-facing
2024-09-26 19:36:13 +00:00
grungussuss 58501dce77 Reorganizes the sound folder (#86726)
## About The Pull Request

<details>

- renamed ai folder to announcer

-- announcer --
- moved vox_fem to announcer
- moved approachingTG to announcer

- separated the ambience folder into ambience and instrumental
-- ambience --

- created holy folder moved all related sounds there
- created engineering folder and moved all related sounds there
- created security folder and moved ambidet there
- created general folder and moved ambigen there
- created icemoon folder and moved all icebox-related ambience there
- created medical folder and moved all medbay-related ambi there
- created ruin folder and moves all ruins ambi there
- created beach folder and moved seag and shore there
- created lavaland folder and moved related ambi there
- created aurora_caelus folder and placed its ambi there
- created misc folder and moved the rest of the files that don't have a
specific category into it

-- instrumental --

- moved traitor folder here
- created lobby_music folder and placed our songs there (title0 not used
anywhere? - server-side modification?)

-- items --

- moved secdeath to hailer
- moved surgery to handling

-- effects --

- moved chemistry into effects
- moved hallucinations into effects
- moved health into effects
- moved magic into effects

-- vehicles --

- moved mecha into vehicles


created mobs folder

-- mobs --

- moved creatures folder into mobs
- moved voice into mobs

renamed creatures to non-humanoids
renamed voice to humanoids

-- non-humanoids--

created cyborg folder
created hiss folder
moved harmalarm.ogg to cyborg

-- humanoids --




-- misc --

moved ghostwhisper to misc
moved insane_low_laugh to misc

I give up trying to document this.

</details>

- [X] ambience
- [x] announcer
- [x] effects
- [X] instrumental
- [x] items
- [x] machines
- [x] misc 
- [X] mobs
- [X] runtime
- [X] vehicles

- [ ] attributions

## Why It's Good For The Game

This folder is so disorganized that it's vomit inducing, will make it
easier to find and add new sounds, providng a minor structure to the
sound folder.

## Changelog
🆑 grungussuss
refactor: the sound folder in the source code has been reorganized,
please report any oddities with sounds playing or not playing
server: lobby music has been repathed to sound/music/lobby_music
/🆑
2024-09-23 22:24:50 -07:00
Ghom ba4fa8fe07 What you wear and on what chair you sit on can now influence fishing difficulty (#86646)
## About The Pull Request
A foreword, I had to refactor a few bits of shitcode my past self added
first. For context, the "gone fishing" and "actively fishing" traits
only had one source, which is the fishing challenge itself, ad there was
no way to access the challenge from outside its code, except for a few
weakrefs which were being used as sources for the aforementioned traits
(the shitcode in a nutshell). There were also a few signals that I
didn't like because they were being sent to the harder-to-access
challenge datum rather than the user. So I scrapped the traits for a
couple signals to send to the user, then added a global list as a mean
to easily access the challenge datum, and lastly changed the code to
accomodate the titled feature (and allow the challenge to recalculate
its difficulty DURING the minigame phase)

Moving on to the actual feature: I've added a component that can be
added to objects on which mobs can be buckled to or items. When equipped
in the right slots or buckled to, the object will adjust the difficulty
of current and future fishing challenges by a certain amount (more often
than not positive, but there're many exceptions) as long as the object
isn't equipped or the user is unbuckled.

I've been having some fun adding component to a ton of clothes in the
game as well as chairs. Way too many objects to enumerate, so I'll give
you the general idea:
- each carp-themed article provides a slight positive modifier (easier)
- some (not all) doctor-related garbs provide a marginal positive
modifier each (fish doctor jokes)
- floortile camo clothes have positive modifiers
- Tuxedo, laceups, gowns provide negative modifier (more difficult)
- utility garbs such as bio/bomb/rad hoods and suits are quite bad. Riot
armor too.
- boxing gloves are very, very bad. Insulated gloves and haul gauntlets
are also very bad, to a lesser degree.
- **tackle** gloves are good. (pun intended)
- wizard garbs are good, because wizards are good at casting. (also a
pun)
- magboots slightly bad. Space suits bad.
- Blindfolds and welding protection are also bad. Gas masks marginally
bad.
- Pirate attire is nice to have. (I just vibed a little on this one)
- plastic chairs are quite versatile because they can be carried around,
but the mime chair is the best, followed by ratvarian chairs.
- Fishing toolboxes, analyzers and the fish catalog are a plus, because
they can be held.
- And the fishing hat, obviously (not as great as you'd think)

Some of these may be subject to change depending on what people say.

## Why It's Good For The Game
A hundred lines of fishing challenge code made ever-so-slightly less
awful, and a way to modify fishing diffculty beside skills and bait.

## Changelog

🆑
add: Your current clothes and what chair you sit on can now influence
the difficulty of fishing minigames. Having a bare minimum of fishing
skill will let you distinguish which objects can help and which won't,
so keep an eye out. Holding fishing toolboxes, fish analyzers or fish
catalogs can also help.
/🆑
2024-09-17 22:33:04 +00:00
_0Steven 74936ad639 Allow beds to define what side their headrest is on, fixing medical/roller bed buckling and bed_tuckable directions (#86556)
## About The Pull Request

So previously I put out a pr that made beds alternate their
`buckle_lying` angle based on their current direction, such that you
would always use the headrest as a headrest.
However, the medical/roller beds have their sprites flipped, and so
these would instead always use the headrest as a footrest.
This wasn't obvious before as both regular and medical/roller beds would
use the headrest on half their directions, just different halves.

While we could have fixed this by flipping the sprites on the
medical/roller beds, I think it's better to flip their buckling angles
instead so that the medical/roller beds maintain how they look while
being pulled, so my first thought was to override the
`update_buckle_vars(...)` proc with the other directions.

However, during testing I realized that these flipped sprites would also
affect the `bed_tuckable` element interactions with the code, used to
work out how to place certain items onto beds.
So instead of just overriding the proc, we add a new var
`left_headrest_dirs` that defines the directions for which the headrest
faces left, change its value for medical/roller beds, and use this for
the `update_buckle_vars(...)` proc and `bed_tuckle` element.

This fixes our issues.
As a side-effect, this also fixes an issue where `bed_tuckable` would
consider north-facing regular beds as if their headrest was on the right
rather than on the left.

<details>
  <summary>Images</summary>
  

![image](https://github.com/user-attachments/assets/450a3cd5-eed9-4fd1-9d19-ab155d47efaa)

![image](https://github.com/user-attachments/assets/864b28a7-b073-4291-8c21-fcf49c012894)


![image](https://github.com/user-attachments/assets/27016b04-2daa-4cb6-b9c9-5b0557a50a45)

![image](https://github.com/user-attachments/assets/e8af12ce-ad89-4844-b331-478dc0f4ba0d)
</details>

## Why It's Good For The Game

Fixes part of #86521.
Good to not use the headrest as a footrest all the time.
## Changelog
🆑
fix: Fixed being buckled to medical/roller beds making you always use
the headrest as a footrest.
fix: Fixed bedsheets/diskies/plushies/etc put on medical/roller beds
facing the wrong direction.
fix: Fixed bedsheets/diskies/plushies/etc put on any bed facing the
wrong direction on some beds.
/🆑
2024-09-10 17:06:09 +02:00
Waterpig 4c4930c71d Merge branch 'master' of https://github.com/tgstation/tgstation into pulls-tg-to-fix-shit 2024-09-08 00:59:39 +02:00
SkyratBot 5580bea20a [MIRROR] Fixes buckling to beds in some situations making you use the pillow as a footrest (#29624)
Fixes buckling to beds in some situations making you use the pillow as a footrest (#86003)

## About The Pull Request

Previously, buckling yourself to a bed would always tilt you by 90
degrees, meaning you would always have your head to the east regardless
of the actual position of the pillow.
We fix this by updating `buckle_lying` to 270 degrees when in the
`NORTH` or `EAST` positions.

Then, I noticed being buckled to a bed sets your dir to that of the bed,
which just unintuitively rotates you. _Especially_ so given there's only
two visual directions, but building a bed may grant it any of the four
directions.
We resolve this by adding a `buckle_dir` parallel to `buckle_lying`,
which allows objects to override what dir we should be set to face when
buckling. This defaults to `BUCKLE_MATCH_DIR`, being the current
behaviour of matching the atom dir.

This fixes our issues.

<details>
  <summary>Images</summary>
  

![image](https://github.com/user-attachments/assets/0053c5f8-b64d-459d-a626-00c43e896ded)

![image](https://github.com/user-attachments/assets/164371b8-5fbe-4973-839a-d96972ad45b8)

![image](https://github.com/user-attachments/assets/dc86797e-50ff-49e9-afd0-87c1c3c6f205)

![image](https://github.com/user-attachments/assets/46468b0a-af77-4249-a05f-3bc0a56d9fe2)
  
</details>

## Why It's Good For The Game


Looks a bit awkward to be forced to use your pillow like a footrest if
your bed's a certain direction.
Also, awkward to have your dir upon being buckled be dependent on the
direction it was built in, when this is not intuitive at all.

Fixes #84017.

## Changelog
🆑
fix: Buckling yourself to a bed or stasis bed will now make you actually
use the headrest/pillow and face up.
/🆑

Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
2024-09-05 23:47:21 +07:00
Ben10Omintrix 91baa94ac5 event based incapicated and able_to_run (#86031)
## About The Pull Request
this is a revival of #82635 . i got permission from potato to reopen
this, he did almost all the work. i only just solved the conflicts and
fixed all the bugs that were preventing the original from being merged
(but it should be TMed first)

## Why It's Good For The Game
slightly improves the performance of basic mob AI

## Changelog
🆑
LemonInTheDark
refactor: able_to_run and incapacitated have been refactored to be event
based
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: ZephyrTFA <matthew@tfaluc.com>
2024-09-04 10:02:49 -04:00
_0Steven 1aa6d02003 Fixes buckling to beds in some situations making you use the pillow as a footrest (#86003)
## About The Pull Request

Previously, buckling yourself to a bed would always tilt you by 90
degrees, meaning you would always have your head to the east regardless
of the actual position of the pillow.
We fix this by updating `buckle_lying` to 270 degrees when in the
`NORTH` or `EAST` positions.

Then, I noticed being buckled to a bed sets your dir to that of the bed,
which just unintuitively rotates you. _Especially_ so given there's only
two visual directions, but building a bed may grant it any of the four
directions.
We resolve this by adding a `buckle_dir` parallel to `buckle_lying`,
which allows objects to override what dir we should be set to face when
buckling. This defaults to `BUCKLE_MATCH_DIR`, being the current
behaviour of matching the atom dir.

This fixes our issues.

<details>
  <summary>Images</summary>
  

![image](https://github.com/user-attachments/assets/0053c5f8-b64d-459d-a626-00c43e896ded)

![image](https://github.com/user-attachments/assets/164371b8-5fbe-4973-839a-d96972ad45b8)

![image](https://github.com/user-attachments/assets/dc86797e-50ff-49e9-afd0-87c1c3c6f205)

![image](https://github.com/user-attachments/assets/46468b0a-af77-4249-a05f-3bc0a56d9fe2)
  
</details>

## Why It's Good For The Game


Looks a bit awkward to be forced to use your pillow like a footrest if
your bed's a certain direction.
Also, awkward to have your dir upon being buckled be dependent on the
direction it was built in, when this is not intuitive at all.

Fixes #84017.

## Changelog
🆑
fix: Buckling yourself to a bed or stasis bed will now make you actually
use the headrest/pillow and face up.
/🆑
2024-09-03 17:53:53 +02:00