forked from Exiled-Team/Common-Utils
-
Notifications
You must be signed in to change notification settings - Fork 5
Rework #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Rework #1
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
4409e71
changes
Mikihero 52455c5
more changes
Mikihero 11a1922
indents I think
Mikihero 83d083a
mainly event handler changes
Mikihero d5a2a17
more handler changes
Mikihero 1e53390
updated bug template
Mikihero 5f178a8
fuck off stylecop
Mikihero 7e7ee2f
custom item and custom role support for input and output of 914 custo…
Mikihero 20d1777
mostly readme
Mikihero cb7698c
better naming
Mikihero 3757cac
possible fix
Mikihero 2e53040
work on some errors
Mikihero 08df36f
asd
Mikihero a49d703
tested spawn inventories, removed unncecessary shit
Mikihero 9d5b3bd
readded api methods as yamato suggested, slightly changed project str…
Mikihero e99d2f0
requested changes
Mikihero 84bce8f
forgot these two lol
Mikihero c690328
I did indeed forgot about the second handler
Mikihero 27c19fc
brainfart moment
Mikihero 937f310
revert breaking config changes
Mikihero c64056c
disabled most configs by default
Mikihero bb61f35
v bumpo
Mikihero 4652081
the point of not removing this was to not break shit lol
Mikihero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.