mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-08 21:33:28 +08:00
Logistics Panel Info fix again again
This commit is contained in:
@@ -795,7 +795,9 @@ public static class LogisticsPatch
|
|||||||
|
|
||||||
public static void OnGameBegin()
|
public static void OnGameBegin()
|
||||||
{
|
{
|
||||||
|
RecycleStationTips();
|
||||||
_lastPlanetId = 0;
|
_lastPlanetId = 0;
|
||||||
|
_stationTipsRoot.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void OnDataLoaded()
|
public static void OnDataLoaded()
|
||||||
@@ -1083,6 +1085,7 @@ public static class LogisticsPatch
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_stationTipsRoot.SetActive(true);
|
||||||
if (UpdateStorageMax())
|
if (UpdateStorageMax())
|
||||||
{
|
{
|
||||||
foreach (var tip in _stationTips)
|
foreach (var tip in _stationTips)
|
||||||
@@ -1091,7 +1094,6 @@ public static class LogisticsPatch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_stationTipsRoot.SetActive(true);
|
|
||||||
var localPosition = GameCamera.main.transform.localPosition;
|
var localPosition = GameCamera.main.transform.localPosition;
|
||||||
var forward = GameCamera.main.transform.forward;
|
var forward = GameCamera.main.transform.forward;
|
||||||
var realRadius = localPlanet.realRadius;
|
var realRadius = localPlanet.realRadius;
|
||||||
@@ -1124,6 +1126,13 @@ public static class LogisticsPatch
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var stationTip = _stationTips[i];
|
||||||
|
if (!stationTip)
|
||||||
|
{
|
||||||
|
stationTip = AllocateStationTip();
|
||||||
|
_stationTips[i] = stationTip;
|
||||||
|
}
|
||||||
|
|
||||||
var position = factory.entityPool[stationComponent.entityId].pos.normalized;
|
var position = factory.entityPool[stationComponent.entityId].pos.normalized;
|
||||||
var radius = realRadius;
|
var radius = realRadius;
|
||||||
if (stationComponent.isCollector)
|
if (stationComponent.isCollector)
|
||||||
@@ -1155,17 +1164,10 @@ public static class LogisticsPatch
|
|||||||
|| Phys.RayCastSphere(localPosition, vec / magnitude, magnitude, Vector3.zero, realRadius, out _)
|
|| Phys.RayCastSphere(localPosition, vec / magnitude, magnitude, Vector3.zero, realRadius, out _)
|
||||||
|| storageArray.Select(x => x.itemId).All(x => x == 0))
|
|| storageArray.Select(x => x.itemId).All(x => x == 0))
|
||||||
{
|
{
|
||||||
_stationTips[i]?.gameObject.SetActive(false);
|
stationTip.gameObject.SetActive(false);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var stationTip = _stationTips[i];
|
|
||||||
if (!stationTip)
|
|
||||||
{
|
|
||||||
stationTip = AllocateStationTip();
|
|
||||||
_stationTips[i] = stationTip;
|
|
||||||
}
|
|
||||||
|
|
||||||
stationTip.gameObject.SetActive(true);
|
stationTip.gameObject.SetActive(true);
|
||||||
|
|
||||||
var localScaleMultiple = magnitude switch
|
var localScaleMultiple = magnitude switch
|
||||||
|
|||||||
Reference in New Issue
Block a user