Detach zone renderer from item manager

This commit is contained in:
Meta Vens 2026-06-21 20:25:00 +01:00
commit 9dde85a200
3 changed files with 18 additions and 7 deletions

View file

@ -1915,7 +1915,6 @@ public class ActionGameManager : MonoBehaviour
Settings.GameplaySettings,
Debug.Log);
LoadRuntimeLoadoutTemplates(stateBoot.StateFilePath);
ZoneRenderer.ItemManager = ItemManager;
// If hiding minimap asteroids, turn them off to start with
if (!RuntimePlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap)

View file

@ -107,7 +107,6 @@ public class ZoneRenderer : MonoBehaviour
public IReadOnlyDictionary<int, EntityInstance> DaemonEntityInstances => _entityInstancesByDaemonIndex;
public IReadOnlyList<ItemPickup> ActiveLoot => _loot;
public ItemManager ItemManager { get; set; }
public Entity PerspectiveEntity
{
@ -332,7 +331,7 @@ public class ZoneRenderer : MonoBehaviour
var typedHull = FindTypedZoneItem(entity.Hull);
if (typedHull == null || string.IsNullOrWhiteSpace(typedHull.HullPrefab))
{
ItemManager.Log($"Failed to instantiate {entity.Name} with missing typed hull prefab.");
Debug.LogWarning($"Failed to instantiate {entity.Name} with missing typed hull prefab.");
return;
}
@ -342,7 +341,7 @@ public class ZoneRenderer : MonoBehaviour
instance = Instantiate(UnityHelpers.LoadAsset<GameObject>(typedHull.HullPrefab), ZoneRoot).GetComponent<ShipInstance>();
if (instance == null)
{
ItemManager.Log($"Failed to instantiate {typedHull.Name} ship with invalid prefab: no ShipInstance component!");
Debug.LogWarning($"Failed to instantiate {typedHull.Name} ship with invalid prefab: no ShipInstance component!");
return;
}
}
@ -351,7 +350,7 @@ public class ZoneRenderer : MonoBehaviour
instance = Instantiate(UnityHelpers.LoadAsset<GameObject>(typedHull.HullPrefab), ZoneRoot).GetComponent<EntityInstance>();
if (instance == null)
{
ItemManager.Log($"Failed to instantiate {typedHull.Name} entity with invalid prefab: no EntityInstance component!");
Debug.LogWarning($"Failed to instantiate {typedHull.Name} entity with invalid prefab: no EntityInstance component!");
return;
}
if (string.Equals(typedHull.HullType, nameof(HullType.Station), StringComparison.Ordinal))