0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00

Fix BTR Paid service Erroring when choosing a location to drive to. Remove unused Player from Ammo patch. Reworked Getting Component of a gameobject in DisablePvePatch (!129)

Fixes :)
Reviewed-on: SPT/Modules#129
This commit is contained in:
Kaeno 2024-05-21 20:00:01 +00:00
parent 4a452876ff
commit c59aacf3ee
3 changed files with 3 additions and 9 deletions

View File

@ -278,7 +278,7 @@ namespace SPT.Custom.BTR
break;
case ETraderServiceType.PlayerTaxi:
btrController.BtrVehicle.IsPaid = true;
btrController.BtrVehicle.MoveToDestination(subserviceId);
btrController.BtrVehicle.MoveToDestination(subserviceId.Split('/')[1]); // TODO: Look into fixing the main cause of this issue.
break;
}
}

View File

@ -1,12 +1,9 @@
using SPT.Common.Http;
using SPT.Reflection.Patching;
using SPT.Reflection.Patching;
using System.Reflection;
using EFT;
using EFT.UI;
using HarmonyLib;
using UnityEngine;
using TMPro;
using System.Linq;
namespace SPT.Custom.Patches
{
@ -21,8 +18,7 @@ namespace SPT.Custom.Patches
private static bool PatchPrefix(ESessionMode sessionMode, Profile profile, ref GameObject ____notAvailableState)
{
____notAvailableState.SetActive(true);
Object.FindObjectsOfType<HoverTooltipArea>().Where(o => o.name == "Locked").SingleOrDefault()?.SetMessageText("<color=#51c6db>SPT</color> is already PvE.");
____notAvailableState.GetComponent<HoverTooltipArea>().SetMessageText("<color=#51c6db>SPT</color> is already PvE.");
return false;
}
}

View File

@ -7,8 +7,6 @@ namespace SPT.SinglePlayer.Patches.MainMenu
{
public class AmmoUsedCounterPatch : ModulePatch
{
private static Player player;
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(Player), nameof(Player.OnMakingShot));