-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from UncomplicatedCustomServer/dev-main
Version v3.0.0 - Candidate I
- Loading branch information
Showing
30 changed files
with
914 additions
and
407 deletions.
There are no files selected for viewing
This file contains 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 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 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,58 @@ | ||
<div align="center"><a href="https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/releases/latest"><img src="https://img.shields.io/github/v/release/UncomplicatedCustomServer/UncomplicatedCustomRoles"></a> <a href="https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/releases/latest"><img src="https://img.shields.io/github/downloads/UncomplicatedCustomServer/UncomplicatedCustomRoles/total"></a> <a href="https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/pulls"><img src="https://img.shields.io/github/issues-pr/UncomplicatedCustomServer/UncomplicatedCustomRoles"></a> <a href="https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/pulls"><img src="https://img.shields.io/github/issues-pr-closed/UncomplicatedCustomServer/UncomplicatedCustomRoles"></a> <a href="https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/commits/main/"><img src="https://badgen.net/github/commits/UncomplicatedCustomServer/UncomplicatedCustomRoles/main"></a> <img src="https://img.shields.io/badge/Verified_Exiled_Plugin-ss"> | ||
|
||
<h1>UncomplicatedCustomRoles</h1> | ||
<i>Простые, полностью конфигурируемые и настраиваемые пользовательские роли для вашего сервера SCP:SL!</i> | ||
|
||
<br><br> | ||
<img src="https://ucs.fcosma.it/api/v2/ucr/graph/black"> | ||
<br><br> | ||
<a href='https://discord.gg/5StRGu8EJV'><img src='https://www.allkpop.com/upload/2021/01/content/262046/1611711962-discord-button.png' height="100"></a> | ||
<br><br> | ||
</div> | ||
|
||
**EXILED** >= `v8.9.6` | ||
<br><br> | ||
|
||
## Локализованные README | ||
- [Оригинальное (Английское)](https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles) | ||
- [Французское](https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/blob/main/Localization/README-FR.md) | ||
- [Итальянское](https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/blob/main/Localization/README-IT.md) | ||
|
||
## Что такое UncomplicatedCustomRoles | ||
**UncomplicatedCustomRoles** или **UCR** - это плагин для [EXILED](https://github.com/Exiled-Team/EXILED), который позволяет создавать полностью конфигурируемые и настраиваемые пользовательские роли с помощью YAML.\ | ||
Вы сможете настроить <ins>роль</ins>, <ins>здоровье</ins>, <ins>роль после побега</ins> и многое другое. | ||
|
||
## Особенности | ||
**UCR** имеет множество возможностей, таких как: | ||
- Неограниченное количество пользовательских ролей | ||
- Конфиги находятся в отдельном файле, а не в файле EXILED по умолчанию | ||
- Исчерпывающая [вики](https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/wiki) | ||
- Не требуется никаких зависимостей | ||
- Активное сообщество в **Discord** | ||
- __Особые привилегии и предварительный просмотр__ для проверенных владельцев серверов | ||
- Внутриигровые команды для работы с плагином и ролями | ||
|
||
## Установка | ||
Скачайте `UncomplicatedCustomRoles.dll` с [последних релизов](https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/releases/latest) и поместите его в папку `EXILED/Plugins`. | ||
|
||
## Разработчики | ||
UncomplicatedCustomRoles имеет простую и быструю систему API для разработчиков, чтобы они могли использовать наш плагин. | ||
Мы сделали множество примеров в [вики для разработчиков](https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/wiki/Developers-World)! | ||
|
||
## Есть проблемы с пониманием? | ||
Прочитайте [ВИКИ](https://github.com/UncomplicatedCustomServer/UncomplicatedCustomRoles/wiki) и если вы все еще не можете решить проблему, вы можете спросить у сообщества на нашем [Discord сервере](https://discord.gg/5StRGu8EJV)! | ||
|
||
## Контакты | ||
### UncomplicatedCustomRoles | ||
**Discord:** [https://discord.gg/5StRGu8EJV](https://discord.gg/5StRGu8EJV) | ||
|
||
### FoxWorn3365 | ||
**Discord:** `@foxworn`\ | ||
**Email:** `[email protected]` | ||
### Dr.Agenda | ||
**Discord:** `dr.agenda` | ||
|
||
## Перевод на другие языки | ||
**Французский:** `@robocnop`\ | ||
**Итальянский:** `@foxworn` \ | ||
**Русский:** `@naxefir` |
This file contains 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
25 changes: 25 additions & 0 deletions
25
UncomplicatedCustomRoles/API/Features/Behaviour/AhpBehaviour.cs
This file contains 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 Exiled.API.Features; | ||
|
||
namespace UncomplicatedCustomRoles.API.Features.Behaviour | ||
{ | ||
public class AhpBehaviour | ||
{ | ||
public float Amount { get; set; } = 0; | ||
|
||
public float Limit { get; set; } = 75; | ||
|
||
public float Decay { get; set; } = 1.2f; | ||
|
||
public float Efficacy { get; set; } = 0.7f; | ||
|
||
public float Sustain { get; set; } = 0f; | ||
|
||
public bool Persistant { get; set; } = false; | ||
|
||
public void Apply(Player player) | ||
{ | ||
if (Amount > 0) | ||
player.AddAhp(Amount, Limit, Decay, Efficacy, Sustain, Persistant); | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
UncomplicatedCustomRoles/API/Features/Behaviour/HealthBehaviour.cs
This file contains 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,22 @@ | ||
using Exiled.API.Features; | ||
|
||
namespace UncomplicatedCustomRoles.API.Features.Behaviour | ||
{ | ||
public class HealthBehaviour | ||
{ | ||
public float Amount { get; set; } = 100; | ||
|
||
public float Maximum { get; set; } = 100; | ||
|
||
public float HumeShield { get; set; } = 0; | ||
|
||
public void Apply(Player player) | ||
{ | ||
player.Health = Amount; | ||
player.MaxHealth = Maximum; | ||
|
||
if (HumeShield > 0) | ||
player.HumeShield = HumeShield; | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
UncomplicatedCustomRoles/API/Features/Behaviour/SpawnBehaviour.cs
This file contains 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,48 @@ | ||
using Exiled.API.Enums; | ||
using PlayerRoles; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
namespace UncomplicatedCustomRoles.API.Features.Behaviour | ||
{ | ||
#nullable enable | ||
public class SpawnBehaviour | ||
{ | ||
// Spawn Behaviour for the plugin (global) | ||
public static bool DoHandleWave { get; internal set; } = true; | ||
|
||
// Spawn Behaviour for the roles (role-based) | ||
public List<RoleTypeId> CanReplaceRoles { get; set; } = new() | ||
{ | ||
RoleTypeId.ClassD | ||
}; | ||
|
||
public int MaxPlayers { get; set; } = 10; | ||
|
||
public int MinPlayers { get; set; } = 1; | ||
|
||
public int SpawnChance { get; set; } = 60; | ||
|
||
public SpawnLocationType Spawn { get; set; } = SpawnLocationType.RoomsSpawn; | ||
|
||
public List<ZoneType> SpawnZones { get; set; } = new(); | ||
|
||
public List<RoomType> SpawnRooms { get; set; } = new() | ||
{ | ||
RoomType.LczClassDSpawn | ||
}; | ||
|
||
public Vector3 SpawnPosition { get; set; } = new(); | ||
|
||
public Vector3 SpawnOffset { get; set; } = new(); | ||
|
||
public string? RequiredPermission { get; set; } = string.Empty; | ||
|
||
// You can use this class to handle the RespawnWave like to disable it | ||
public static void DisableSpawnWave() | ||
{ | ||
DoHandleWave = false; | ||
Plugin.RoleSpawnQueue.Clear(); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
UncomplicatedCustomRoles/API/Features/Behaviour/StaminaBehaviour.cs
This file contains 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 Exiled.API.Features; | ||
using Exiled.API.Features.Roles; | ||
|
||
namespace UncomplicatedCustomRoles.API.Features.Behaviour | ||
{ | ||
public class StaminaBehaviour | ||
{ | ||
public float RegenMultiplier { get; set; } = 1; | ||
|
||
public float UsageMultiplier { get; set; } = 1; | ||
|
||
public bool Infinite { get; set; } = false; | ||
|
||
public void Apply(Player player) | ||
{ | ||
if (player.Role is FpcRole Fpc) | ||
{ | ||
Fpc.StaminaRegenMultiplier = RegenMultiplier; | ||
Fpc.StaminaUsageMultiplier = UsageMultiplier; | ||
} | ||
|
||
player.IsUsingStamina = !Infinite; | ||
} | ||
} | ||
} |
This file contains 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 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 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.