-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 :cl: - add: Added an alert on the UI for when the user is walking or running. --------- Signed-off-by: gluesniffler <[email protected]> Co-authored-by: DEATHB4DEFEAT <[email protected]>
- Loading branch information
1 parent
e59c144
commit 62dfbfc
Showing
17 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ public enum AlertType : byte | |
Internals, | ||
Toxins, | ||
Muted, | ||
Walking, | ||
VowOfSilence, | ||
VowBroken, | ||
Essence, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.Movement.Components; | ||
|
||
/// <summary> | ||
/// Indicates if the entity can toggle walking or not. | ||
/// </summary> | ||
[NetworkedComponent, RegisterComponent] | ||
public sealed partial class CanWalkComponent : Component | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,6 +220,7 @@ | |
understands: | ||
- GalacticCommon | ||
- RobotTalk | ||
- type: CanWalk | ||
|
||
- type: entity | ||
id: BaseBorgChassisNT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1309,6 +1309,7 @@ | |
tags: | ||
- VimPilot | ||
- DoorBumpOpener | ||
- type: CanWalk | ||
|
||
- type: entity | ||
name: monkey | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,7 @@ | |
understands: | ||
- GalacticCommon | ||
- Mouse | ||
- type: CanWalk | ||
|
||
- type: entity | ||
id: MobRatKingBuff | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,6 +229,7 @@ | |
- CanPilot | ||
- FootstepSound | ||
- DoorBumpOpener | ||
- type: CanWalk | ||
|
||
- type: entity | ||
save: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,7 @@ | |
- type: GuideHelp | ||
guides: | ||
- Robotics | ||
- type: CanWalk | ||
|
||
- type: entity | ||
id: MechRipley | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"version": 1, | ||
"license": "CC-BY-SA-3.0", | ||
"copyright": "Walking/Running icons modified by Mocho, original taken from /tg/station https://github.com/tgstation/tgstation/pull/52691/commits/6a1261187c108c8f151c99ebfa567bd1ec34044c", | ||
"size": { | ||
"x": 32, | ||
"y": 32 | ||
}, | ||
"states": [ | ||
{ | ||
"name": "walking0" | ||
}, | ||
{ | ||
"name": "walking1" | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.