Files
wwdpublic/Content.Shared/Alert/AlertType.cs
gluesniffler 62dfbfc000 Display an Alert when the User Is Walking or Running. (#528)
# Description

First PR. Adds an alert on the user UI whenever they toggle between
walking or running. No more second guessing whether you will slip or not
when walking over that puddle of water, or if your usage of Shift on
chat toggled your movement speed.

The alert is displayed for entities with the component
'CanWalkComponent', which is added to the following prototypes:
- All genetic ancestors (MobBaseAncestor)
- Human controlled mechs (BaseMech, wont display on VIMs or HAMTRs
because rats or hamsters can't walk, and the edge case is not worth the
trouble)
- All human/player species (BaseMobSpeciesOrganic)
- All slimes/geras (BaseMobAdultSlimes)
- Reagent Slimes (ReagentSlime)
- Rat Kings (MobRatKing - yes they can fucking walk lmao)
- Borgs (BaseBorgChassis)
---
<details><summary><h1>Media</h1></summary>
<p>


https://github.com/Simple-Station/Einstein-Engines/assets/159397573/1a60711b-d048-444d-bd08-6a9eadeccc8a


</p>
</details>

---

# Future Stuff

I also wanted to make it toggle the user's speed on click like it would
in ss13, but sadly the majority of the input management/prediction seems
to be done exclusively client-side, making it a hassle to work around
the alert. **Will revisit if there's improvements or refactors to the
movement code.**

---

# Changelog

🆑
- add: Added an alert on the UI for when the user is walking or running.

---------

Signed-off-by: gluesniffler <159397573+gluesniffler@users.noreply.github.com>
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
2024-07-16 17:39:46 -04:00

61 lines
1.2 KiB
C#

namespace Content.Shared.Alert
{
/// <summary>
/// Every kind of alert. Corresponds to alertType field in alert prototypes defined in YML
/// NOTE: Using byte for a compact encoding when sending this in messages, can upgrade
/// to ushort
/// </summary>
public enum AlertType : byte
{
Error,
LowOxygen,
LowNitrogen,
LowPressure,
HighPressure,
Fire,
Cold,
Hot,
Weightless,
Stun,
Handcuffed,
Ensnared,
Buckled,
HumanCrit,
HumanDead,
HumanHealth,
BorgBattery,
BorgBatteryNone,
PilotingShuttle,
Peckish,
Starving,
Thirsty,
Parched,
Stamina,
Pulled,
Pulling,
Magboots,
Internals,
Toxins,
Muted,
Walking,
VowOfSilence,
VowBroken,
Essence,
Corporeal,
Bleed,
Pacified,
Debug1,
Debug2,
Debug3,
Debug4,
Debug5,
Debug6,
SuitPower,
BorgHealth,
BorgCrit,
BorgDead,
Offer,
}
}