Properly handle no DLC props

This commit is contained in:
xen-42 2024-10-07 19:02:35 -04:00
parent 3855d26f39
commit 1754303208

View File

@ -271,6 +271,14 @@ namespace NewHorizons.Builder.Props
} }
if (!detail.keepLoaded) GroupsBuilder.Make(prop, sector); if (!detail.keepLoaded) GroupsBuilder.Make(prop, sector);
// For DLC related props
// Make sure to do this before its set active
if (detail.path.ToLowerInvariant().StartsWith("ringworld") || detail.path.ToLowerInvariant().StartsWith("dreamworld"))
{
prop.AddComponent<DestroyOnDLC>()._destroyOnDLCNotOwned = true;
}
prop.SetActive(true); prop.SetActive(true);
if (detail.hasPhysics) if (detail.hasPhysics)