summaryrefslogtreecommitdiff
path: root/Impostor-dev/src/Impostor.Api/Net/Inner/Objects/IInnerPlayerControl.cs
blob: 04558b96e5c1e18968d6be22d8f8bdd455d1e50c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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
    {
        /// <summary>
        ///     Gets the <see cref="PlayerId"/> assigned by the client of the host of the game.
        /// </summary>
        byte PlayerId { get; }

        /// <summary>
        ///     Gets the <see cref="IInnerPlayerPhysics"/> of the <see cref="IInnerPlayerControl"/>.
        ///     Contains vent logic.
        /// </summary>
        IInnerPlayerPhysics Physics { get; }

        /// <summary>
        ///     Gets the <see cref="IInnerCustomNetworkTransform"/> of the <see cref="IInnerPlayerControl"/>.
        ///     Contains position data about the player.
        /// </summary>
        IInnerCustomNetworkTransform NetworkTransform { get; }

        /// <summary>
        ///     Gets the <see cref="IInnerPlayerInfo"/> of the <see cref="IInnerPlayerControl"/>.
        ///     Contains metadata about the player.
        /// </summary>
        IInnerPlayerInfo PlayerInfo { get; }

        /// <summary>
        ///     Sets the name of the current <see cref="IInnerPlayerControl"/>.
        ///     Visible to all players.
        /// </summary>
        /// <param name="name">A name for the player.</param>
        /// <returns>Task that must be awaited.</returns>
        ValueTask SetNameAsync(string name);

        /// <summary>
        ///     Sets the color of the current <see cref="IInnerPlayerControl"/>.
        ///     Visible to all players.
        /// </summary>
        /// <param name="colorId">A color for the player.</param>
        /// <returns>Task that must be awaited.</returns>
        ValueTask SetColorAsync(byte colorId);

        /// <param name="colorType">A color for the player.</param>
        /// <inheritdoc cref="SetColorAsync(byte)" />
        ValueTask SetColorAsync(ColorType colorType);

        /// <summary>
        ///     Sets the hat of the current <see cref="IInnerPlayerControl"/>.
        ///     Visible to all players.
        /// </summary>
        /// <param name="hatId">An hat for the player.</param>
        /// <returns>Task that must be awaited.</returns>
        ValueTask SetHatAsync(uint hatId);

        /// <param name="hatType">An hat for the player.</param>
        /// <inheritdoc cref="SetHatAsync(uint)" />
        ValueTask SetHatAsync(HatType hatType);

        /// <summary>
        ///     Sets the pet of the current <see cref="IInnerPlayerControl"/>.
        ///     Visible to all players.
        /// </summary>
        /// <param name="petId">A pet for the player.</param>
        /// <returns>Task that must be awaited.</returns>
        ValueTask SetPetAsync(uint petId);

        /// <param name="petType">A pet for the player.</param>
        /// <inheritdoc cref="SetPetAsync(uint)" />
        ValueTask SetPetAsync(PetType petType);

        /// <summary>
        ///     Sets the skin of the current <see cref="IInnerPlayerControl"/>.
        ///     Visible to all players.
        /// </summary>
        /// <param name="skinId">A skin for the player.</param>
        /// <returns>Task that must be awaited.</returns>
        ValueTask SetSkinAsync(uint skinId);

        /// <param name="skinType">A skin for the player.</param>
        /// <inheritdoc cref="SetSkinAsync(uint)" />
        ValueTask SetSkinAsync(SkinType skinType);

        /// <summary>
        ///     Send a chat message as the current <see cref="IInnerPlayerControl"/>.
        ///     Visible to all players.
        /// </summary>
        /// <param name="text">The message to send.</param>
        /// <returns>Task that must be awaited.</returns>
        ValueTask SendChatAsync(string text);

        /// <summary>
        ///     Send a chat message as the current <see cref="IInnerPlayerControl"/>.
        ///     Visible to only the current.
        /// </summary>
        /// <param name="text">The message to send.</param>
        /// <param name="player">
        ///     The player that should receive this chat message.
        ///     When left as null, will send message to self.
        /// </param>
        /// <returns>Task that must be awaited.</returns>
        ValueTask SendChatToPlayerAsync(string text, IInnerPlayerControl? player = null);

        /// <summary>
        ///     Sets the current to be murdered by an impostor <see cref="IInnerPlayerControl"/>.
        ///     Visible to all players.
        /// </summary>
        /// /// <param name="impostor">The Impostor who kill.</param>
        /// <returns>Task that must be awaited.</returns>
        ValueTask SetMurderedByAsync(IClientPlayer impostor);
    }
}