mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Destroy flood sensors on docks (#1075)
## Bug fixes - Make docks not vanish when the dam breaks (maybe, needs testing)
This commit is contained in:
commit
a9ada39f0d
@ -473,10 +473,14 @@ 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>())
|
foreach (var toggle in dock.GetComponents<FloodToggle>().Concat(dock.GetComponentsInChildren<FloodToggle>()))
|
||||||
{
|
{
|
||||||
Component.DestroyImmediate(toggle);
|
Component.DestroyImmediate(toggle);
|
||||||
}
|
}
|
||||||
|
foreach (var floodSensor in dock.GetComponents<RingRiverFloodSensor>().Concat(dock.GetComponentsInChildren<RingRiverFloodSensor>()))
|
||||||
|
{
|
||||||
|
Component.DestroyImmediate(floodSensor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user