mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Get components in children also checks self for components
This commit is contained in:
parent
383be21828
commit
f4f78f5aaa
@ -473,11 +473,11 @@ namespace NewHorizons.Builder.Props
|
|||||||
{
|
{
|
||||||
// These flood toggles are to disable flooded docks on the Stranger
|
// These flood toggles are to disable flooded docks on the Stranger
|
||||||
// Presumably the user isn't making one of those
|
// Presumably the user isn't making one of those
|
||||||
foreach (var toggle in dock.GetComponents<FloodToggle>().Concat(dock.GetComponentsInChildren<FloodToggle>()))
|
foreach (var toggle in dock.GetComponentsInChildren<FloodToggle>())
|
||||||
{
|
{
|
||||||
Component.DestroyImmediate(toggle);
|
Component.DestroyImmediate(toggle);
|
||||||
}
|
}
|
||||||
foreach (var floodSensor in dock.GetComponents<RingRiverFloodSensor>().Concat(dock.GetComponentsInChildren<RingRiverFloodSensor>()))
|
foreach (var floodSensor in dock.GetComponentsInChildren<RingRiverFloodSensor>())
|
||||||
{
|
{
|
||||||
Component.DestroyImmediate(floodSensor);
|
Component.DestroyImmediate(floodSensor);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user