-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expose team changes and settings to APIs #46
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
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c0b6076
feat: Added multiplayer button hooks to UiManager
Liparakis 8b43601
Merge branch 'Extremelyd1:main' into main
Liparakis 2c63b38
chore: Suggested fixes
Liparakis d4d8ffb
Merge remote-tracking branch 'origin/main'
Liparakis c3f7931
Merge branch 'Extremelyd1:main' into main
Liparakis 909dbeb
feat(api): expose local player ID and settings and change events
Liparakis 188fe8c
Merge remote-tracking branch 'origin/main'
Liparakis 68d9248
chore: LINQ -> forloops and handled SettingsAlias edge case.
Liparakis 3983a78
fix: Observable-backed server settings reflection
Liparakis 0ca3b39
chore: rollback
Liparakis be80006
chore: rollback
Liparakis c353eb5
rollback
Liparakis dace531
chore: rollback
Liparakis e1e56a6
feat: simplification
Liparakis dd4e79a
chore: small rollback
Liparakis abd06ad
chore: Removed Ambiguous comment
Liparakis 735df9a
Merge branch 'Extremelyd1:main' into main
Liparakis 2e17a96
fix: Reverted ID exposure, implemented & exposed IModSettings interfa…
Liparakis d8afcce
chore: Seperate Teams 'Eventing' for Local player and Remote.
Liparakis 08f3690
chore: Changes requested
Liparakis 934ee46
Various cleanup changes
Extremelyd1 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| using System; | ||
|
|
||
| namespace SSMP.Api.Client; | ||
|
|
||
| /// <summary> | ||
| /// Settings related to the client/mod that are accessible to addons. | ||
| /// </summary> | ||
| public interface IModSettings { | ||
| /// <summary> | ||
| /// Event triggered whenever any of the mod settings are changed. | ||
| /// </summary> | ||
| event Action<string>? ChangedEvent; | ||
|
|
||
| /// <summary> | ||
| /// The last used address to join a server. | ||
| /// </summary> | ||
| string ConnectAddress { get; } | ||
|
|
||
| /// <summary> | ||
| /// The last used port to join a server. | ||
| /// </summary> | ||
| int ConnectPort { get; } | ||
|
|
||
| /// <summary> | ||
| /// The last used username to join a server. | ||
| /// </summary> | ||
| string Username { get; } | ||
|
|
||
| /// <summary> | ||
| /// Whether to display a UI element for the ping. | ||
| /// </summary> | ||
| bool DisplayPing { get; } | ||
|
|
||
| /// <summary> | ||
| /// Whether full synchronisation of bosses, enemies, worlds, and saves is enabled. | ||
| /// </summary> | ||
| bool FullSynchronisation { get; } | ||
| } |
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,25 @@ | ||
| using System; | ||
| using SSMP.Game; | ||
|
|
||
| namespace SSMP.Api.Client; | ||
|
|
||
| /// <summary> | ||
| /// Player manager that handles information about players, such as the local player's team or changes to other players' | ||
| /// teams. | ||
| /// </summary> | ||
| public interface IPlayerManager { | ||
| /// <summary> | ||
| /// The team that our local player is on. | ||
| /// </summary> | ||
| Team LocalPlayerTeam { get; } | ||
|
|
||
| /// <summary> | ||
| /// Event that is called when the local player's team changes. | ||
| /// </summary> | ||
| event Action<Team>? LocalPlayerTeamChangeEvent; | ||
|
|
||
| /// <summary> | ||
| /// Event that is called when any player's (including the local player's) team changes. | ||
| /// </summary> | ||
| event Action<IClientPlayer, Team>? PlayerTeamChangeEvent; | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| using System; | ||
| using SSMP.Api.Client; | ||
| using SSMP.Internals; | ||
| using UnityEngine; | ||
|
|
||
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.