Skip to content

Commit

Permalink
add scp-008 recontain-by-valve feature
Browse files Browse the repository at this point in the history
  • Loading branch information
JustMarfix committed Oct 19, 2024
1 parent 52849d4 commit 220684b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Commands/Recontain008.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Linq;
using CommandSystem;
using Exiled.API.Enums;
using Exiled.API.Features;
Expand All @@ -8,12 +9,12 @@

namespace VeryUsualDay.Commands
{
[CommandHandler(typeof(ClientCommandHandler))]
[CommandHandler(typeof(RemoteAdminCommandHandler))]
public class Recontain008 : ICommand
{
public string Command => "recontain008";
public string[] Aliases => new string[] { };
public string Description => "Восстанавливает ОУС SCP-008. Использовать только в К.С. SCP-008.";
public string Description => "Восстанавливает ОУС SCP-008 от имени игрока. Исп: recontain008 <ID>";

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
Expand All @@ -22,7 +23,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
response = "ОУС SCP-008 не нарушены!";
return false;
}
var playerSender = Player.Get(sender);
var playerSender = Player.Get(arguments.ToArray()[0]);
if (playerSender.CurrentRoom.Type != RoomType.Hcz106)
{
response = "Вы не находитесь в К.С. SCP-008.";
Expand Down
4 changes: 2 additions & 2 deletions VeryUsualDay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class VeryUsualDay : Plugin<Config>
public override string Author => "JustMarfix";
public override string Name => "VeryUsualDay (FX Version)";

public override Version Version => new Version(5, 2, 1);
public override Version Version => new Version(5, 2, 3);

public bool IsEnabledInRound { get; set; }
public bool IsLunchtimeActive { get; set; }
Expand Down Expand Up @@ -467,7 +467,7 @@ public void RoleDistribution()
{
foreach (var player in Exiled.API.Features.Player.Get(RoleTypeId.Tutorial))
{
if (player.TryGetSessionVariable("isInPrison", out bool prisonState) && prisonState && (player.CustomInfo == "Человек" || player.CustomInfo is null))
if ((!player.TryGetSessionVariable("isInPrison", out bool prisonState) || !prisonState) && (player.CustomInfo == "Человек" || player.CustomInfo is null))
{
SetUserRole(player);
}
Expand Down

0 comments on commit 220684b

Please sign in to comment.