Skip to content
This repository has been archived by the owner on Sep 12, 2020. It is now read-only.

Commit

Permalink
Update to GameVersion 10.0.1 and Synapse Version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
moelrobi committed Aug 3, 2020
1 parent bbde190 commit 483c218
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Synapse/Api/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public static Vector3 GetDoorPos(string doorName)
vector.x -= 1f;
}

if (FallDamage.CheckUnsafePosition(vector)) break;
if (FallDamage.CheckUnsafePosition(vector, false)) break;
if (b == 20) vector = Vector3.zero;
}

Expand Down Expand Up @@ -222,6 +222,6 @@ public static bool IsGroupAllowed(string group, string permission)
/// </summary>
/// <param name="duration"></param>
/// <param name="onlyHeavy"></param>
public static void TurnOffAllLights(float duration, bool onlyHeavy = false) => Generator079.Generators[0].RpcCustomOverchargeForOurBeautifulModCreators(duration, onlyHeavy);
public static void TurnOffAllLights(float duration, bool onlyHeavy = false) => Generator079.Generators[0].ServerOvercharge(duration, onlyHeavy);
}
}
2 changes: 1 addition & 1 deletion Synapse/Events/EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static void OnDoorInteract(DoorInteractEvent ev)
if (gameitem.permissions == null || gameitem.permissions.Length == 0) continue;

ev.Allow = gameitem.permissions.Any(p =>
ev.Door.backwardsCompatPermissions.TryGetValue(p, out var flag) &&
Door.backwardsCompatPermissions.TryGetValue(p, out var flag) &&
ev.Door.PermissionLevels.HasPermission(flag));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static bool Prefix(PlayerInteract __instance, GameObject doorId)
{
var itemPerms = __instance._inv.GetItemByID(__instance._inv.curItem).permissions;
allowTheAccess = itemPerms.Any(p =>
door.backwardsCompatPermissions.TryGetValue(p, out var flag) &&
Door.backwardsCompatPermissions.TryGetValue(p, out var flag) &&
door.PermissionLevels.HasPermission(flag));
}
else allowTheAccess = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace Synapse.Events.Patches
{
/**
[HarmonyPatch(typeof(Generator079), nameof(Generator079.Interact))]
public static class GeneratorTabletPatches
{
Expand Down Expand Up @@ -56,7 +57,7 @@ public static bool Prefix(Generator079 __instance, GameObject person, string com
return true;
}
}
}
}*/

[HarmonyPatch(typeof(Generator079), nameof(Generator079.OpenClose))]
public static class GeneratorDoorPatches
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Linq;
using Harmony;
using Mirror;
using NorthwoodLib.Pools;
using Synapse.Api;
using UnityEngine;

Expand All @@ -24,7 +25,7 @@ public static bool Prefix(CharacterClassManager __instance, RoleType classid, Ga

if (lite) return false;
var inv = ply.GetPlayer().Inventory;
var list = ListPool<Inventory.SyncItemInfo>.Rent();
var list = ListPool<Inventory.SyncItemInfo>.Shared.Rent();

if (escape && __instance.KeepItemsAfterEscaping)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using Harmony;
using NorthwoodLib.Pools;
using Respawning;
using Synapse.Api;
using UnityEngine;
Expand Down Expand Up @@ -42,7 +43,7 @@ public static bool Prefix(Respawning.RespawnManager __instance)
list.RemoveAt(list.Count - 1);
}
list.ShuffleList<ReferenceHub>();
List<ReferenceHub> list2 = ListPool<ReferenceHub>.Rent();
List<ReferenceHub> list2 = ListPool<ReferenceHub>.Shared.Rent();

var Playerlist = new List<Player>();
foreach (ReferenceHub hub in list)
Expand Down
2 changes: 1 addition & 1 deletion Synapse/Synapse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class Synapse
#region Version
private const int MajorVersion = 1;
private const int MinorVerion = 1;
private const int Patch = 0;
private const int Patch = 1;

public static int VersionNumber => MajorVersion * 100 + MinorVerion * 10 + Patch;
public static string Version => $"{MajorVersion}.{MinorVerion}.{Patch}";
Expand Down
3 changes: 3 additions & 0 deletions Synapse/Synapse.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
<Reference Include="Mirror, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\Synapse_Dependencies\Mirror.dll</HintPath>
</Reference>
<Reference Include="NorthwoodLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\Synapse_Dependencies\NorthwoodLib.dll</HintPath>
</Reference>
<Reference Include="SynapseModLoader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\SynapseModLoader\bin\Debug\SynapseModLoader.dll</HintPath>
</Reference>
Expand Down

0 comments on commit 483c218

Please sign in to comment.