From 58dc7efac012c113f5e51428b0c1723cdddb2860 Mon Sep 17 00:00:00 2001 From: RMROC451 Date: Sun, 16 Feb 2025 09:41:58 -0600 Subject: [PATCH] adjusting CarIdsInRect -> CarIdsInRadius --- Assembly.version | 2 +- TweaksAndThings/Definition.json | 8 ++++++-- TweaksAndThings/Extensions/Car_Extensions.cs | 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Assembly.version b/Assembly.version index 889103d..e57fa04 100644 --- a/Assembly.version +++ b/Assembly.version @@ -2,6 +2,6 @@ 1 2 - 1 + 2 \ No newline at end of file diff --git a/TweaksAndThings/Definition.json b/TweaksAndThings/Definition.json index a633033..a29b876 100644 --- a/TweaksAndThings/Definition.json +++ b/TweaksAndThings/Definition.json @@ -4,13 +4,17 @@ "name": "RMROC451's Tweaks and Things", "version": "$(AssemblyVersion)", "requires": [ + { + "id": "railroader", + "notBefore": "2024.6" + }, { "id": "railloader", - "notBefore": "1.9.6.8" + "notBefore": "1.9.6.14" }, { "id": "Zamu.StrangeCustoms", - "notBefore": "1.10.24358.413" + "notBefore": "1.10.25017.313" } ], "assemblies": [ "RMROC451.TweaksAndThings" ], diff --git a/TweaksAndThings/Extensions/Car_Extensions.cs b/TweaksAndThings/Extensions/Car_Extensions.cs index 009bc87..2fb2a63 100644 --- a/TweaksAndThings/Extensions/Car_Extensions.cs +++ b/TweaksAndThings/Extensions/Car_Extensions.cs @@ -109,8 +109,7 @@ public static class Car_Extensions { Vector3 position = car.GetMotionSnapshot().Position; Vector3 center = WorldTransformer.WorldToGame(position); - Rect rect = new Rect(new Vector2(center.x - 30f, center.z - 30f), Vector2.one * 30f * 2f); - var cars = tc.CarIdsInRect(rect); + var cars = tc.CarIdsInRadius(center, 60f); Log.Information($"{nameof(HuntingForCabeeseNearCar)} => {cars.Count()}"); List<(string carId, float distance)> source = cars