-
Notifications
You must be signed in to change notification settings - Fork 379
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
Conversation
But... why an emote and not a keybind, or button, or anything else that would make more sense for an action that affects gameplay? |
I agree with the above comment. This should be an action alongside sleeping, screaming, and harm mode |
"Affects gameplay" Now code wise an action for a mere emote that can simply be keybinded like any other emote would require: 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. |
Not sure why we're filled with hatred towards actions but this:
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 |
This system has some issues which I’ve mentioned on discord here. 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. |
Pretty much ready for review. |
Co-authored-by: DEATHB4DEFEAT <[email protected]> Signed-off-by: Adrian16199 <[email protected]>
Co-authored-by: DEATHB4DEFEAT <[email protected]> Signed-off-by: Adrian16199 <[email protected]>
There was a problem hiding this 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>))] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont need = false
There was a problem hiding this comment.
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>))] |
There was a problem hiding this comment.
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!; |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
test how this interacts with different kinds of stunning too |
About the PR
Ports laying down.
Why / Balance
Because its the greatest thing known to man. (And woman)
Technical details
Media
Delta-v.2024-04-15.22-57-35.mp4
Breaking changes
Changelog
🆑