forked from Exiled-Team/Common-Utils
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* changes * more changes * indents I think * mainly event handler changes * more handler changes * updated bug template * fuck off stylecop * custom item and custom role support for input and output of 914 custom recipes, name consistency changes * mostly readme * better naming * possible fix * work on some errors * asd * tested spawn inventories, removed unncecessary shit * readded api methods as yamato suggested, slightly changed project structure * requested changes * forgot these two lol * I did indeed forgot about the second handler * brainfart moment * revert breaking config changes * disabled most configs by default * v bumpo * the point of not removing this was to not break shit lol
- Loading branch information
Showing
19 changed files
with
962 additions
and
934 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
namespace Common_Utilities | ||
{ | ||
using System.Collections.Generic; | ||
|
||
using Exiled.API.Features; | ||
using PlayerRoles; | ||
|
||
public static class API | ||
{ | ||
public static List<ItemType> GetStartItems(RoleTypeId role) => Main.Instance.PlayerHandlers.StartItems(role); | ||
|
||
public static List<ItemType> GetStartItems(RoleTypeId role, Player player) => Main.Instance.PlayerHandlers.StartItems(role, player); | ||
|
||
public static float GetHealthOnKill(RoleTypeId role) => Main.Instance.Config.HealthOnKill?.ContainsKey(role) ?? false ? Main.Instance.Config.HealthOnKill[role] : 0f; | ||
} | ||
namespace Common_Utilities.API; | ||
|
||
using System.Collections.Generic; | ||
using Exiled.API.Features; | ||
using PlayerRoles; | ||
|
||
public static class API | ||
{ | ||
// API methods for potential use by other plugins, not sure if anyone actually uses this | ||
public static float GetHealthOnKill(RoleTypeId role) => Plugin.Instance.Config.HealthOnKill?.ContainsKey(role) ?? false ? Plugin.Instance.Config.HealthOnKill[role] : 0f; | ||
|
||
public static List<ItemType> GetStartItems(RoleTypeId role, Player player = null) => Plugin.Instance.playerHandlers.GetStartingInventory(role, player); | ||
} |
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 |
---|---|---|
@@ -1,17 +1,16 @@ | ||
namespace Common_Utilities.ConfigObjects; | ||
|
||
public class ItemChance | ||
public class ItemChance : IChanceObject | ||
{ | ||
public string ItemName { get; set; } = ItemType.None.ToString(); | ||
|
||
public double Chance { get; set; } | ||
|
||
public string Group { get; set; } = "none"; | ||
|
||
public void Deconstruct(out string name, out double i, out string groupKey) | ||
public void Deconstruct(out string name, out double i) | ||
{ | ||
name = ItemName; | ||
i = Chance; | ||
groupKey = Group; | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,32 +1,30 @@ | ||
namespace Common_Utilities.ConfigObjects; | ||
|
||
using System.Collections.Generic; | ||
using Exiled.API.Enums; | ||
using UnityEngine; | ||
|
||
namespace Common_Utilities.ConfigObjects | ||
public class Scp914TeleportChance : IChanceObject | ||
{ | ||
using Exiled.API.Enums; | ||
using UnityEngine; | ||
public ZoneType Zone { get; set; } = ZoneType.Unspecified; | ||
|
||
public class Scp914TeleportChance | ||
{ | ||
public ZoneType Zone { get; set; } = ZoneType.Unspecified; | ||
|
||
public List<RoomType> IgnoredRooms { get; set; } | ||
public List<RoomType> IgnoredRooms { get; set; } = new(); | ||
|
||
public RoomType Room { get; set; } | ||
public RoomType Room { get; set; } = RoomType.Unknown; | ||
|
||
public Vector3 Offset { get; set; } = Vector3.zero; | ||
public Vector3 Offset { get; set; } = Vector3.zero; | ||
|
||
public double Chance { get; set; } | ||
public double Chance { get; set; } | ||
|
||
public float Damage { get; set; } = 0f; | ||
public float Damage { get; set; } = 0f; | ||
|
||
public void Deconstruct(out RoomType room, out List<RoomType> ignoredRooms, out Vector3 offset, out double chance, out float damage, out ZoneType zone) | ||
{ | ||
room = Room; | ||
ignoredRooms = IgnoredRooms; | ||
offset = Offset; | ||
chance = Chance; | ||
damage = Damage; | ||
zone = Zone; | ||
} | ||
public void Deconstruct(out RoomType room, out List<RoomType> ignoredRooms, out Vector3 offset, out double chance, out float damage, out ZoneType zone) | ||
{ | ||
room = Room; | ||
ignoredRooms = IgnoredRooms; | ||
offset = Offset; | ||
chance = Chance; | ||
damage = Damage; | ||
zone = Zone; | ||
} | ||
} |
Oops, something went wrong.