mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix error when single light sensor has no sector
This commit is contained in:
parent
d410a429fe
commit
8edc801903
@ -356,9 +356,12 @@ namespace NewHorizons.Builder.Props
|
||||
singleLightSensor._sector.OnSectorOccupantsUpdated -= singleLightSensor.OnSectorOccupantsUpdated;
|
||||
}
|
||||
singleLightSensor._sector = sector;
|
||||
if (singleLightSensor._sector != null)
|
||||
{
|
||||
singleLightSensor._sector.OnSectorOccupantsUpdated += singleLightSensor.OnSectorOccupantsUpdated;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove things that require sectors if the sector is null. Will just keep extending this as things pop up.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user