Skip to content

Commit

Permalink
Fix AllowCave option
Browse files Browse the repository at this point in the history
  • Loading branch information
RestoreMonarchy committed Sep 6, 2024
1 parent 980802b commit 4147e4e
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 40 deletions.
39 changes: 2 additions & 37 deletions Teleportation/Teleportation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,11 @@
<TargetFramework>net48</TargetFramework>
<LangVersion>latest</LangVersion>
<RootNamespace>RestoreMonarchy.Teleportation</RootNamespace>
<Version>1.7.0</Version>
<Version>1.8.0</Version>
</PropertyGroup>

<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\lib\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="com.rlabrecque.steamworks.net">
<HintPath>..\lib\com.rlabrecque.steamworks.net.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\lib\Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.API">
<HintPath>..\lib\Rocket.API.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.Core">
<HintPath>..\lib\Rocket.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.Unturned">
<HintPath>..\lib\Rocket.Unturned.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SDG.NetTransport">
<HintPath>..\lib\SDG.NetTransport.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\lib\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\lib\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<PackageReference Include="RestoreMonarchy.RocketRedist" Version="3.24.5.1" ExcludeAssets="runtime" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions Teleportation/TeleportationConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public void LoadDefaults()
CombatDuration = 20;
UseUnsafeTeleport = false;
CancelOnMove = true;
MoveMaxDistance = 0.5f;
}
}
}
6 changes: 4 additions & 2 deletions Teleportation/Utils/TeleportationPluginExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,14 @@ public static bool IsPlayerInCave(this TeleportationPlugin plugin, UnturnedPlaye
if (!plugin.Configuration.Instance.AllowCave)
{
Vector3 point = Vector3.zero;
UndergroundAllowlist.AdjustPosition(ref point, 0.5f, 1f);
if (point != player.Position)

float height = LevelGround.getHeight(point);
if (height > point.y)
{
return true;
}
}

return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Teleportation/Utils/TeleportationRequestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static void AcceptTPARequest(this TeleportationPlugin plugin, UnturnedPla
return;
}

UnturnedChat.Say(caller, plugin.Translate("TPAAccepted", request.SenderPlayer.CharacterName, plugin.MessageColor));
UnturnedChat.Say(caller, plugin.Translate("TPAAccepted", request.SenderPlayer.CharacterName), plugin.MessageColor);
request.Execute(plugin.Configuration.Instance.TPADelay);
plugin.TPRequests.Remove(request);
}
Expand Down
Binary file removed lib/Assembly-CSharp.dll
Binary file not shown.
Binary file removed lib/Newtonsoft.Json.dll
Binary file not shown.
Binary file removed lib/Rocket.API.dll
Binary file not shown.
Binary file removed lib/Rocket.Core.dll
Binary file not shown.
Binary file removed lib/Rocket.Unturned.dll
Binary file not shown.
Binary file removed lib/SDG.NetTransport.dll
Binary file not shown.
Binary file removed lib/UnityEngine.CoreModule.dll
Binary file not shown.
Binary file removed lib/UnityEngine.PhysicsModule.dll
Binary file not shown.
Binary file removed lib/UnityEngine.dll
Binary file not shown.
Binary file removed lib/com.rlabrecque.steamworks.net.dll
Binary file not shown.

0 comments on commit 4147e4e

Please sign in to comment.