Skip to content

Commit 369ad0b

Browse files
SnivyFilmsMikihero
andauthored
Exiled 9.6.0 Beta Update (#1)
* Rework (#1) * 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 * updated readme, exiled package, added roledamagereceived multiplier * remove breaking change * small config name change * fixed a possible nre if the config was fucked up * bump * update Plugin.props * fixed 914 player upgrade not working and throwing nre, improved debug logging to be more verbose * severely improved debug logs and minor tweaks * bump * fixed a possible nre * bump * changed package * updated to exiled 9 * fix for some 914 upgrade items getting stuck in the ground * v bump * fixed onplayerverified nre * Exiled 9.6 Update * removed usings --------- Co-authored-by: Miki_hero <[email protected]>
1 parent 16fd390 commit 369ad0b

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

Common Utilities/Common Utilities.csproj

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,33 @@
2323
</ItemGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="ExMod.Exiled" Version="9.1.1" />
26+
<PackageReference Include="ExMod.Exiled" Version="9.6.0-beta8" />
2727
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
2828
</ItemGroup>
2929

3030
<ItemGroup>
31-
<Reference Include="Assembly-CSharp-firstpass" HintPath="$(EXILED_REFERENCES)\Assembly-CSharp-firstpass.dll" Private="false" />
32-
<Reference Include="Mirror" HintPath="$(EXILED_REFERENCES)\Mirror.dll" Private="false" />
33-
<Reference Include="UnityEngine" HintPath="$(EXILED_REFERENCES)\UnityEngine.dll" Private="false" />
34-
<Reference Include="UnityEngine.CoreModule" HintPath="$(EXILED_REFERENCES)\UnityEngine.CoreModule.dll" Private="false" />
35-
<Reference Include="UnityEngine.PhysicsModule" HintPath="$(EXILED_REFERENCES)\UnityEngine.PhysicsModule.dll" Private="false" />
36-
<Reference Include="YamlDotNet" HintPath="$(EXILED_REFERENCES)\YamlDotNet.dll" Private="false" />
31+
<Reference Include="Assembly-CSharp-firstpass">
32+
<HintPath Condition="'$(OS)' == 'Windows_NT'">$(EXILED_REFERENCES)\Assembly-CSharp-firstpass.dll</HintPath>
33+
<HintPath Condition="'$(OS)' != 'Windows_NT'">..\..\..\Exiled_Resources\Assembly-CSharp-firstpass.dll</HintPath>
34+
</Reference>
35+
<Reference Include="Mirror">
36+
<HintPath Condition="'$(OS)' == 'Windows_NT'">$(EXILED_REFERENCES)\Mirror.dll</HintPath>
37+
<HintPath Condition="'$(OS)' != 'Windows_NT'">..\..\..\Exiled_Resources\Mirror.dll</HintPath>
38+
</Reference>
39+
<Reference Include="UnityEngine">
40+
<HintPath Condition="'$(OS)' == 'Windows_NT'">$(EXILED_REFERENCES)\UnityEngine.dll</HintPath>
41+
<HintPath Condition="'$(OS)' != 'Windows_NT'">..\..\..\Exiled_Resources\UnityEngine.dll</HintPath>
42+
</Reference>
43+
<Reference Include="UnityEngine.CoreModule">
44+
<HintPath Condition="'$(OS)' == 'Windows_NT'">$(EXILED_REFERENCES)\UnityEngine.CoreModule.dll</HintPath>
45+
<HintPath Condition="'$(OS)' != 'Windows_NT'">..\..\..\Exiled_Resources\UnityEngine.CoreModule.dll</HintPath>
46+
</Reference>
47+
<Reference Include="UnityEngine.PhysicsModule">
48+
<HintPath Condition="'$(OS)' == 'Windows_NT'">$(EXILED_REFERENCES)/UnityEngine.PhysicsModule.dll</HintPath>
49+
<HintPath Condition="'$(OS)' != 'Windows_NT'">..\..\..\Exiled_Resources\UnityEngine.PhysicsModule.dll</HintPath>
50+
</Reference>
51+
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
52+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta8\lib\net48\YamlDotNet.dll</HintPath>
53+
</Reference>
3754
</ItemGroup>
3855
</Project>

Common Utilities/EventHandlers/PlayerHandlers.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public void OnChangingRole(ChangingRoleEventArgs ev)
5454
if (config.StartingInventories[ev.NewRole].Ammo == null || config.StartingInventories[ev.NewRole].Ammo.Count <= 0)
5555
return;
5656

57-
if (config.StartingInventories[ev.NewRole].Ammo.Any(s => string.IsNullOrEmpty(s.Group) || s.Group == "none" || (ServerStatic.PermissionsHandler._groups.TryGetValue(s.Group, out UserGroup userGroup) && userGroup == ev.Player.Group)))
57+
if (config.StartingInventories[ev.NewRole].Ammo.Any(s => string.IsNullOrEmpty(s.Group) || s.Group == "none" || s.Group == ev.Player.Group.Name))
5858
{
5959
ev.Ammo.Clear();
6060
foreach ((ItemType type, ushort amount, string group) in config.StartingInventories[ev.NewRole].Ammo)
6161
{
62-
if (string.IsNullOrEmpty(group) || group == "none" || (ServerStatic.PermissionsHandler._groups.TryGetValue(group, out UserGroup userGroup) && userGroup == ev.Player.Group))
62+
if (string.IsNullOrEmpty(group) || group == "none" || group == ev.Player.Group.Name)
6363
{
6464
ev.Ammo.Add(type, amount);
6565
}
@@ -164,7 +164,7 @@ public List<ItemType> GetStartingInventory(RoleTypeId role, Player player = null
164164
player == null
165165
|| string.IsNullOrEmpty(x.Group)
166166
|| x.Group == "none"
167-
|| (ServerStatic.PermissionsHandler._groups.TryGetValue(x.Group, out var group) && group == player.Group))
167+
|| x.Group == player.Group.Name)
168168
.ToList();
169169

170170
Log.Debug($"{nameof(GetStartingInventory)} Finished checking groups, found {itemChances.Count} valid itemChances.");

0 commit comments

Comments
 (0)