Skip to content

Commit

Permalink
fake appearance (#2428)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladislav-CS <[email protected]>
  • Loading branch information
NaoUnderscore and VladTheCow authored Feb 3, 2024
1 parent d9d98b9 commit 469561b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Exiled.API/Features/Roles/FpcRole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Exiled.API.Features.Roles
using System.Collections.Generic;

using Exiled.API.Features.Core.Generic.Pools;

Check failure on line 12 in Exiled.API/Features/Roles/FpcRole.cs

View workflow job for this annotation

GitHub Actions / build

Using directives should be ordered alphabetically by the namespaces. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1210.md)

Check failure on line 12 in Exiled.API/Features/Roles/FpcRole.cs

View workflow job for this annotation

GitHub Actions / build

Using directives should be ordered alphabetically by the namespaces. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1210.md)

Check failure on line 12 in Exiled.API/Features/Roles/FpcRole.cs

View workflow job for this annotation

GitHub Actions / build

Using directives should be ordered alphabetically by the namespaces. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1210.md)

Check failure on line 12 in Exiled.API/Features/Roles/FpcRole.cs

View workflow job for this annotation

GitHub Actions / build

Using directives should be ordered alphabetically by the namespaces. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1210.md)

Check failure on line 12 in Exiled.API/Features/Roles/FpcRole.cs

View workflow job for this annotation

GitHub Actions / build

Using directives should be ordered alphabetically by the namespaces. (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1210.md)
using Exiled.API.Extensions;

using PlayerRoles;
using PlayerRoles.FirstPersonControl;
Expand All @@ -25,6 +26,7 @@ namespace Exiled.API.Features.Roles
public abstract class FpcRole : Role
{
private bool isUsingStamina = true;
private RoleTypeId fakeAppearance;

/// <summary>
/// Initializes a new instance of the <see cref="FpcRole"/> class.
Expand Down Expand Up @@ -218,6 +220,23 @@ public bool IsNoclipEnabled
set => Owner.ReferenceHub.playerStats.GetModule<AdminFlagsStat>().SetFlag(AdminFlags.Noclip, value);
}

/// <summary>
/// Gets or sets a value indicating the fake appearance of the player.
/// </summary>
public RoleTypeId? FakeAppearance
{
get => fakeAppearance;
set
{
fakeAppearance = value;

Check failure on line 231 in Exiled.API/Features/Roles/FpcRole.cs

View workflow job for this annotation

GitHub Actions / build

Cannot implicitly convert type 'PlayerRoles.RoleTypeId?' to 'PlayerRoles.RoleTypeId'. An explicit conversion exists (are you missing a cast?)

Check failure on line 231 in Exiled.API/Features/Roles/FpcRole.cs

View workflow job for this annotation

GitHub Actions / build

Cannot implicitly convert type 'PlayerRoles.RoleTypeId?' to 'PlayerRoles.RoleTypeId'. An explicit conversion exists (are you missing a cast?)

Check failure on line 231 in Exiled.API/Features/Roles/FpcRole.cs

View workflow job for this annotation

GitHub Actions / build

Cannot implicitly convert type 'PlayerRoles.RoleTypeId?' to 'PlayerRoles.RoleTypeId'. An explicit conversion exists (are you missing a cast?)

Check failure on line 231 in Exiled.API/Features/Roles/FpcRole.cs

View workflow job for this annotation

GitHub Actions / build

Cannot implicitly convert type 'PlayerRoles.RoleTypeId?' to 'PlayerRoles.RoleTypeId'. An explicit conversion exists (are you missing a cast?)

Check failure on line 231 in Exiled.API/Features/Roles/FpcRole.cs

View workflow job for this annotation

GitHub Actions / build

Cannot implicitly convert type 'PlayerRoles.RoleTypeId?' to 'PlayerRoles.RoleTypeId'. An explicit conversion exists (are you missing a cast?)

if (value.HasValue)
Owner.ChangeAppearance(value.Value);
else
Owner.ChangeAppearance(Owner.Role.Type, skipJump: true);
}
}

/// <summary>
/// Resets the <see cref="Player"/>'s stamina.
/// </summary>
Expand Down

0 comments on commit 469561b

Please sign in to comment.