From e9ea621b93fbb58d9edfca8375918791637bbd52 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 Dec 2020 20:59:04 +0800 Subject: +init --- .../Components/IInnerCustomNetworkTransform.cs | 15 +++ .../Objects/Components/IInnerPlayerPhysics.cs | 6 ++ .../Net/Inner/Objects/IInnerGameData.cs | 6 ++ .../Net/Inner/Objects/IInnerLobbyBehaviour.cs | 6 ++ .../Net/Inner/Objects/IInnerMeetingHud.cs | 6 ++ .../Net/Inner/Objects/IInnerPlayerControl.cs | 116 +++++++++++++++++++++ .../Net/Inner/Objects/IInnerPlayerInfo.cs | 53 ++++++++++ .../Net/Inner/Objects/IInnerShipStatus.cs | 7 ++ .../Net/Inner/Objects/IInnerVoteBanSystem.cs | 7 ++ .../Impostor.Api/Net/Inner/Objects/ITaskInfo.cs | 14 +++ 10 files changed, 236 insertions(+) create mode 100644 Impostor-dev/src/Impostor.Api/Net/Inner/Objects/Components/IInnerCustomNetworkTransform.cs create mode 100644 Impostor-dev/src/Impostor.Api/Net/Inner/Objects/Components/IInnerPlayerPhysics.cs create mode 100644 Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerGameData.cs create mode 100644 Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerLobbyBehaviour.cs create mode 100644 Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerMeetingHud.cs create mode 100644 Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerPlayerControl.cs create mode 100644 Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerPlayerInfo.cs create mode 100644 Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerShipStatus.cs create mode 100644 Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerVoteBanSystem.cs create mode 100644 Impostor-dev/src/Impostor.Api/Net/Inner/Objects/ITaskInfo.cs (limited to 'Impostor-dev/src/Impostor.Api/Net/Inner/Objects') diff --git a/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/Components/IInnerCustomNetworkTransform.cs b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/Components/IInnerCustomNetworkTransform.cs new file mode 100644 index 0000000..6d867e7 --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/Components/IInnerCustomNetworkTransform.cs @@ -0,0 +1,15 @@ +using System.Numerics; +using System.Threading.Tasks; + +namespace Impostor.Api.Net.Inner.Objects.Components +{ + public interface IInnerCustomNetworkTransform : IInnerNetObject + { + /// + /// Snaps the current to the given position . + /// + /// The target position. + /// Task that must be awaited. + ValueTask SnapToAsync(Vector2 position); + } +} diff --git a/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/Components/IInnerPlayerPhysics.cs b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/Components/IInnerPlayerPhysics.cs new file mode 100644 index 0000000..9378c5b --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/Components/IInnerPlayerPhysics.cs @@ -0,0 +1,6 @@ +namespace Impostor.Api.Net.Inner.Objects.Components +{ + public interface IInnerPlayerPhysics : IInnerNetObject + { + } +} diff --git a/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerGameData.cs b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerGameData.cs new file mode 100644 index 0000000..6e41020 --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerGameData.cs @@ -0,0 +1,6 @@ +namespace Impostor.Api.Net.Inner.Objects +{ + public interface IInnerGameData : IInnerNetObject + { + } +} diff --git a/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerLobbyBehaviour.cs b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerLobbyBehaviour.cs new file mode 100644 index 0000000..f05f4cf --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerLobbyBehaviour.cs @@ -0,0 +1,6 @@ +namespace Impostor.Api.Net.Inner.Objects +{ + public interface IInnerLobbyBehaviour : IInnerNetObject + { + } +} diff --git a/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerMeetingHud.cs b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerMeetingHud.cs new file mode 100644 index 0000000..9c89d05 --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerMeetingHud.cs @@ -0,0 +1,6 @@ +namespace Impostor.Api.Net.Inner.Objects +{ + public interface IInnerMeetingHud + { + } +} diff --git a/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerPlayerControl.cs b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerPlayerControl.cs new file mode 100644 index 0000000..04558b9 --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerPlayerControl.cs @@ -0,0 +1,116 @@ +using System.Threading.Tasks; +using Impostor.Api.Innersloth.Customization; +using Impostor.Api.Net.Inner.Objects.Components; + +namespace Impostor.Api.Net.Inner.Objects +{ + public interface IInnerPlayerControl : IInnerNetObject + { + /// + /// Gets the assigned by the client of the host of the game. + /// + byte PlayerId { get; } + + /// + /// Gets the of the . + /// Contains vent logic. + /// + IInnerPlayerPhysics Physics { get; } + + /// + /// Gets the of the . + /// Contains position data about the player. + /// + IInnerCustomNetworkTransform NetworkTransform { get; } + + /// + /// Gets the of the . + /// Contains metadata about the player. + /// + IInnerPlayerInfo PlayerInfo { get; } + + /// + /// Sets the name of the current . + /// Visible to all players. + /// + /// A name for the player. + /// Task that must be awaited. + ValueTask SetNameAsync(string name); + + /// + /// Sets the color of the current . + /// Visible to all players. + /// + /// A color for the player. + /// Task that must be awaited. + ValueTask SetColorAsync(byte colorId); + + /// A color for the player. + /// + ValueTask SetColorAsync(ColorType colorType); + + /// + /// Sets the hat of the current . + /// Visible to all players. + /// + /// An hat for the player. + /// Task that must be awaited. + ValueTask SetHatAsync(uint hatId); + + /// An hat for the player. + /// + ValueTask SetHatAsync(HatType hatType); + + /// + /// Sets the pet of the current . + /// Visible to all players. + /// + /// A pet for the player. + /// Task that must be awaited. + ValueTask SetPetAsync(uint petId); + + /// A pet for the player. + /// + ValueTask SetPetAsync(PetType petType); + + /// + /// Sets the skin of the current . + /// Visible to all players. + /// + /// A skin for the player. + /// Task that must be awaited. + ValueTask SetSkinAsync(uint skinId); + + /// A skin for the player. + /// + ValueTask SetSkinAsync(SkinType skinType); + + /// + /// Send a chat message as the current . + /// Visible to all players. + /// + /// The message to send. + /// Task that must be awaited. + ValueTask SendChatAsync(string text); + + /// + /// Send a chat message as the current . + /// Visible to only the current. + /// + /// The message to send. + /// + /// The player that should receive this chat message. + /// When left as null, will send message to self. + /// + /// Task that must be awaited. + ValueTask SendChatToPlayerAsync(string text, IInnerPlayerControl? player = null); + + /// + /// Sets the current to be murdered by an impostor . + /// Visible to all players. + /// + /// /// The Impostor who kill. + /// Task that must be awaited. + ValueTask SetMurderedByAsync(IClientPlayer impostor); + } +} diff --git a/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerPlayerInfo.cs b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerPlayerInfo.cs new file mode 100644 index 0000000..6cb3302 --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerPlayerInfo.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using Impostor.Api.Innersloth; + +namespace Impostor.Api.Net.Inner.Objects +{ + public interface IInnerPlayerInfo + { + /// + /// Gets the name of the player as decided by the host. + /// + string PlayerName { get; } + + /// + /// Gets the color of the player. + /// + byte ColorId { get; } + + /// + /// Gets the hat of the player. + /// + uint HatId { get; } + + /// + /// Gets the pet of the player. + /// + uint PetId { get; } + + /// + /// Gets the skin of the player. + /// + uint SkinId { get; } + + /// + /// Gets a value indicating whether the player is an impostor. + /// + bool IsImpostor { get; } + + /// + /// Gets a value indicating whether the player is a dead in the current game. + /// + bool IsDead { get; } + + /// + /// Gets the reason why the player is dead in the current game. + /// + DeathReason LastDeathReason { get; } + + IEnumerable Tasks { get; } + + DateTimeOffset LastMurder { get; } + } +} diff --git a/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerShipStatus.cs b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerShipStatus.cs new file mode 100644 index 0000000..c0a05ae --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerShipStatus.cs @@ -0,0 +1,7 @@ +namespace Impostor.Api.Net.Inner.Objects +{ + public interface IInnerShipStatus : IInnerNetObject + { + + } +} \ No newline at end of file diff --git a/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerVoteBanSystem.cs b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerVoteBanSystem.cs new file mode 100644 index 0000000..d0a816d --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerVoteBanSystem.cs @@ -0,0 +1,7 @@ +namespace Impostor.Api.Net.Inner.Objects +{ + public interface IInnerVoteBanSystem : IInnerNetObject + { + + } +} \ No newline at end of file diff --git a/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/ITaskInfo.cs b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/ITaskInfo.cs new file mode 100644 index 0000000..2b6dd86 --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/ITaskInfo.cs @@ -0,0 +1,14 @@ +using Impostor.Api.Innersloth; +using Impostor.Api.Net.Messages; + +namespace Impostor.Api.Net.Inner.Objects +{ + public interface ITaskInfo + { + uint Id { get; } + + TaskTypes Type { get; } + + bool Complete { get; } + } +} -- cgit v1.1-26-g67d0