-
Notifications
You must be signed in to change notification settings - Fork 450
Morale System (Port From White Dream) #620
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
Merged
OldDanceJacket
merged 67 commits into
Simple-Station:master
from
VMSolidus:Port-Morale-System
Aug 20, 2024
Merged
Changes from 48 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
e84b656
Port Morale System
VMSolidus 06f42f0
Update MoodSystem.cs
VMSolidus 9fca6e1
Most of the basic code cleanup done. Still need to Respace
VMSolidus 051c4fa
Update MoodSystem.cs
VMSolidus 7044022
Merge branch 'master' into Port-Morale-System
VMSolidus b3abc9a
More updates
VMSolidus ad90ff1
Merge branch 'Port-Morale-System' of https://github.com/VMSolidus/Ein…
VMSolidus 79eae2d
More cleanup
VMSolidus eb9bc51
Finally DONE
VMSolidus a9cfd44
Move MoodSystem to Shared
VMSolidus df773bd
Missed these to respace
VMSolidus 8ede5d9
Update ContestsSystem.cs
VMSolidus bdfb9de
Updating for Netcode
VMSolidus f9631b2
Finish Shared Split?
VMSolidus c6dfa42
Update ContestsSystem.cs
VMSolidus be90b99
Intellisense shit itself while I was working on this
VMSolidus 65851e7
Update MoodSystem.cs
VMSolidus acb1c3d
Merge branch 'master' into Port-Morale-System
VMSolidus 6aba01f
Update traits.ftl
VMSolidus e1ae6f6
Merge branch 'master' into Port-Morale-System
VMSolidus e7d0d39
Update SaturationScaleComponent.cs
VMSolidus 358a0ad
Merge branch 'Port-Morale-System' of https://github.com/VMSolidus/Ein…
VMSolidus c1c6255
Revert "Update MoodSystem.cs"
VMSolidus 25d9922
Revert "Intellisense shit itself while I was working on this"
VMSolidus 1ce0dd2
Revert "Update ContestsSystem.cs"
VMSolidus e8223c7
Revert "Finish Shared Split?"
VMSolidus a98fb1f
Revert "Updating for Netcode"
VMSolidus 46772aa
Revert "Update ContestsSystem.cs"
VMSolidus 7c19016
Revert "Move MoodSystem to Shared"
VMSolidus e7e82f1
Apply suggestions from code review
VMSolidus 73656bf
Take 2 at Secretive Netcode
VMSolidus 28b4050
Finishing up some touches.
VMSolidus 1f8d97a
Movement Modifiers Refactored
VMSolidus ccb418f
More updates to hunger and thirst, making mood's bypass optional
VMSolidus 190148e
Merge branch 'master' into Port-Morale-System
VMSolidus 99fd5de
move shader
VMSolidus a541405
Merge branch 'Port-Morale-System' of https://github.com/VMSolidus/Ein…
VMSolidus ece207a
Update traits.ftl
VMSolidus 49c1af9
Update shaders.yml
VMSolidus f5a1edf
Merge branch 'master' into Port-Morale-System
VMSolidus 36e8d96
Merge branch 'master' into Port-Morale-System
DangerRevolution d74d914
fix(mood): apply PetAnimal moodlet to petter instead of pet
angelofallars 6dc028f
Merge pull request #3 from angelofallars/fix-petting
VMSolidus 3e4ef88
fix(mood): improve mood calculation
angelofallars b058957
Merge branch 'Port-Morale-System' of https://github.com/VMSolidus/Ein…
angelofallars 086ba65
Merge pull request #4 from angelofallars/mood-slight-refactor
VMSolidus 4331bdf
Tighten mood thresholds for movement speed
VMSolidus 0c47056
Update SlippingTest.cs
VMSolidus a9203ec
Merge branch 'master' into Port-Morale-System
VMSolidus 07adcaa
Apply suggestions from code review
VMSolidus a38fe1e
Apply suggestions from code review
VMSolidus e911bff
Apply suggestions from code review
VMSolidus 53373dd
Apply suggestions from code review
VMSolidus e95fda1
Change DoMoodSystem cvar
VMSolidus 1cc0cb4
Apply suggestions from code review
VMSolidus 5794a00
Update ContestsSystem.cs
VMSolidus 2edb97e
Merge branch 'Port-Morale-System' of https://github.com/VMSolidus/Ein…
VMSolidus bd7dc18
Update Prototype per feedback
VMSolidus 70bb2eb
More feedback
VMSolidus 096bbb4
Apply suggestions from code review
VMSolidus b506380
Fix missing usings....
VMSolidus 14b1f86
Update SaturationScaleSystem.cs
VMSolidus 378184a
Fix last test fails
VMSolidus 678ac76
Merge branch 'master' into Port-Morale-System
VMSolidus 418e695
MoodCategory Proto
VMSolidus 8811d83
Figured out how to make Creampied mood only remove when the pie is re…
VMSolidus a4eb156
More small code cleanup, fancy new Record Structs
VMSolidus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,37 @@ | ||
| using Robust.Client.Graphics; | ||
| using Robust.Shared.Enums; | ||
| using Robust.Shared.Prototypes; | ||
|
|
||
| namespace Content.Client.Overlays; | ||
|
|
||
| public sealed class SaturationScaleOverlay : Overlay | ||
| { | ||
| [Dependency] private readonly IPrototypeManager _prototypeManager = default!; | ||
|
|
||
| public override bool RequestScreenTexture => true; | ||
| public override OverlaySpace Space => OverlaySpace.WorldSpace; | ||
| private readonly ShaderInstance _shader; | ||
| private const float Saturation = 0.5f; | ||
|
|
||
| public SaturationScaleOverlay() | ||
| { | ||
| IoCManager.InjectDependencies(this); | ||
| _shader = _prototypeManager.Index<ShaderPrototype>("SaturationScale").InstanceUnique(); | ||
VMSolidus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
|
|
||
| protected override void Draw(in OverlayDrawArgs args) | ||
| { | ||
| if (ScreenTexture == null) | ||
| return; | ||
|
|
||
| _shader.SetParameter("SCREEN_TEXTURE", ScreenTexture); | ||
| _shader.SetParameter("saturation", Saturation); | ||
|
|
||
| var handle = args.WorldHandle; | ||
|
|
||
| handle.UseShader(_shader); | ||
| handle.DrawRect(args.WorldBounds, Color.White); | ||
| handle.UseShader(null); | ||
| } | ||
| } | ||
This file contains hidden or 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,61 @@ | ||
| using Content.Shared.GameTicking; | ||
| using Content.Shared.Overlays; | ||
| using Robust.Client.Graphics; | ||
| using Robust.Client.Player; | ||
| using Robust.Shared.Player; | ||
|
|
||
| namespace Content.Client.Overlays; | ||
|
|
||
| public sealed class SaturationScaleSystem : EntitySystem | ||
| { | ||
| [Dependency] private readonly IPlayerManager _player = default!; | ||
| [Dependency] private readonly IOverlayManager _overlayMan = default!; | ||
|
|
||
| private SaturationScaleOverlay _overlay = default!; | ||
|
|
||
VMSolidus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public override void Initialize() | ||
| { | ||
| base.Initialize(); | ||
|
|
||
| SubscribeLocalEvent<SaturationScaleComponent, ComponentInit>(OnInit); | ||
| SubscribeLocalEvent<SaturationScaleComponent, ComponentShutdown>(OnShutdown); | ||
|
|
||
| SubscribeLocalEvent<SaturationScaleComponent, PlayerAttachedEvent>(OnPlayerAttached); | ||
| SubscribeLocalEvent<SaturationScaleComponent, PlayerDetachedEvent>(OnPlayerDetached); | ||
|
|
||
| SubscribeNetworkEvent<RoundRestartCleanupEvent>(RoundRestartCleanup); | ||
|
|
||
| _overlay = new(); | ||
VMSolidus marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
VMSolidus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| private void RoundRestartCleanup(RoundRestartCleanupEvent ev) | ||
| { | ||
| _overlayMan.RemoveOverlay(_overlay); | ||
| } | ||
|
|
||
| private void OnPlayerDetached(EntityUid uid, SaturationScaleComponent component, PlayerDetachedEvent args) | ||
| { | ||
| _overlayMan.RemoveOverlay(_overlay); | ||
| } | ||
|
|
||
| private void OnPlayerAttached(EntityUid uid, SaturationScaleComponent component, PlayerAttachedEvent args) | ||
| { | ||
| _overlayMan.AddOverlay(_overlay); | ||
| } | ||
|
|
||
| private void OnShutdown(EntityUid uid, SaturationScaleComponent component, ComponentShutdown args) | ||
| { | ||
| if (_player.LocalSession?.AttachedEntity != uid) | ||
| return; | ||
|
|
||
| _overlayMan.RemoveOverlay(_overlay); | ||
| } | ||
|
|
||
| private void OnInit(EntityUid uid, SaturationScaleComponent component, ComponentInit args) | ||
| { | ||
| if (_player.LocalSession?.AttachedEntity != uid) | ||
| return; | ||
|
|
||
| _overlayMan.AddOverlay(_overlay); | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.