Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ports Laying down from Cosmatic Drift. #1098

Closed
wants to merge 10 commits into from

Conversation

Adrian16199
Copy link
Contributor

@Adrian16199 Adrian16199 commented Apr 15, 2024

About the PR

Ports laying down.

Why / Balance

Because its the greatest thing known to man. (And woman)

Technical details

Media

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase
Delta-v.2024-04-15.22-57-35.mp4

Breaking changes

Changelog

🆑

  • add: You can now lay down and stand up.

@github-actions github-actions bot added Changes: C# Changes any cs files Changes: YML Changes any yml files labels Apr 15, 2024
@Mnemotechnician
Copy link
Contributor

Mnemotechnician commented Apr 16, 2024

But... why an emote and not a keybind, or button, or anything else that would make more sense for an action that affects gameplay?

@Timemaster99
Copy link
Contributor

I agree with the above comment. This should be an action alongside sleeping, screaming, and harm mode

@Adrian16199
Copy link
Contributor Author

"Affects gameplay"
Im just gonna ask, how exactly compared to:
Harm mode: Decides whether you are playing TDM (team deatch match), RDM if you are feeling funny or roleplayin game.
Scream: Somethin to indicate you are in distress that isnt neccesarily you spamming emotes or copy pastin scream line while someone is beating you upside the head. Also the sound itself can be heard better than anything else.
Sleeping: Used to cure diseases most of the time and revenants are capable of eating people who are sleeping like a sleeping demon, can only be done in bed.
Closest thing that I can think of affectin gameplay is the fact that you lock yourself in place... and then maybe pretend that you seized up, falled limb, your eyes, dead and lifeless.

Now code wise an action for a mere emote that can simply be keybinded like any other emote would require:
-A sprite for said action
-Coding the action itself
-Coding the fact that it would need to toggle between laying down and THEN standing up.

I cant be bothered for somethin that im simply portin, wantin it ingame as fast as possible because I adore this emote by itself and for somethin that I cant agree with wholeheartedly when it can be done with a simple keybind that already exists for emotes.

@DangerRevolution
Copy link
Contributor

DangerRevolution commented Apr 16, 2024

"Affects gameplay" Im just gonna ask, how exactly compared to: Harm mode: Decides whether you are playing TDM (team deatch match), RDM if you are feeling funny or roleplayin game. Scream: Somethin to indicate you are in distress that isnt neccesarily you spamming emotes or copy pastin scream line while someone is beating you upside the head. Also the sound itself can be heard better than anything else. Sleeping: Used to cure diseases most of the time and revenants are capable of eating people who are sleeping like a sleeping demon, can only be done in bed.

Not sure why we're filled with hatred towards actions but this:

Closest thing that I can think of affectin gameplay is the fact that you lock yourself in place... and then maybe pretend that you seized up, falled limb, your eyes, dead and lifeless.

is the actual reason why this shouldn't be an action, this is a half-cooked feature that shouldn't be an action and should be relegated to being an HRP emote

@LankLTE
Copy link
Contributor

LankLTE commented Apr 16, 2024

This system has some issues which I’ve mentioned on discord here.
https://discord.com/channels/968983104247185448/1150555473699934370/1229875767043686410

There’s also a lack of other phrases as I hadn’t fully finished it as of you deciding to port this. As for an action, entirely possible (and pretty easy, actually), but I personally think that filling your sidebars with actions that all just do an emote is a bad idea. Especially when roles like engineers already frequently have 6-8 actions. You may disagree.

@Adrian16199 Adrian16199 marked this pull request as draft May 10, 2024 16:55
@Adrian16199 Adrian16199 marked this pull request as ready for review May 27, 2024 10:45
@Adrian16199
Copy link
Contributor Author

Pretty much ready for review.

Resources/Prototypes/_CD/Voice/lay_emotes.yml Outdated Show resolved Hide resolved
Resources/Prototypes/_CD/Voice/lay_emotes.yml Outdated Show resolved Hide resolved
Resources/Prototypes/_CD/Voice/lay_emotes.yml Outdated Show resolved Hide resolved
Content.Server/_CD/Traits/LayEmoteSystem.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@NullWanderer NullWanderer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like I might be missing something, so I'd appreciate it if another maintainer also approved this prior to it being merged. I feel like some horrible bug will reveal itself after this is merged triggered by unique edge cases like the noospheric zap and just result in horrible problems, but I might be overthinking it

[RegisterComponent, Access(typeof(LayEmoteSystem))]
public sealed partial class LayEmoteComponent : Component
{
[DataField("layEmote", customTypeSerializer: typeof(PrototypeIdSerializer<EmotePrototype>))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[DataField] and use ProtoId

[DataField("standEmote", customTypeSerializer: typeof(PrototypeIdSerializer<EmotePrototype>))]
public string StandEmoteId = "StandUp";

[ViewVariables]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont need = false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what?

[DataField("layEmote", customTypeSerializer: typeof(PrototypeIdSerializer<EmotePrototype>))]
public string LayEmoteId = "LayDown";

[DataField("standEmote", customTypeSerializer: typeof(PrototypeIdSerializer<EmotePrototype>))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above

public sealed class LayEmoteSystem : EntitySystem
{
[Dependency] private readonly MovementSpeedModifierSystem _modifier = default!;
[Dependency] private readonly StandingStateSystem _standingSystem = default!;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort alphabetically + rename to not have System as its redundant

// If buckled, make sure someone is standing. Unbuckling while laying down should keep someone laying down and vice versa.
private void OnBuckleChange(EntityUid uid, LayEmoteComponent component, ref BuckleChangeEvent args)
{
if (args.Buckling && component.Laying)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!component.Laying) return; then remove from the other if statements

if (component.Laying)
args.ModifySpeed(component.CrawlSpeed, component.CrawlSpeed); // Delta V- crawl, baby, crawl!

if (!component.Laying)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else

private void OnBuckleChange(EntityUid uid, LayEmoteComponent component, ref BuckleChangeEvent args)
{
if (args.Buckling && component.Laying)
_standingSystem.Stand(args.BuckledEntity);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will still leave you laying down after unbuckling which is weird

private void OnMobStateChanged(EntityUid uid, LayEmoteComponent component, MobStateChangedEvent args)
{
// Hoping this should work fine as going crit - dead or dead - crit shouldn't matter, and crit - alive would stand you up anyways.
component.Laying = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i imagine this could possibly troll your movement speed, add a SetLaying function that 1. checks if arg isnt the same as Laying and 2. does the Stand Down update movespeed etc
then use that everywhere

then here call SetLaying(ent, false);

}

// On shutdown, make sure people are standing and reset movement speed
private void OnShutdown(EntityUid uid, LayEmoteComponent component, ComponentShutdown args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for all these handlers use Entity<LayEmoteComponent> and ref args

@deltanedas
Copy link
Member

test how this interacts with different kinds of stunning too

LaryNevesPR pushed a commit to LaryNevesPR/Estacao-Andromeda that referenced this pull request Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: YML Changes any yml files S: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants