Tutorial: Ship move & whitelists - SonicTHI/SaveOurShip2Experimental GitHub Wiki
When a ship is moving a flag is set that you can use to prevent despawn or spawn effects from triggering:
ShipInteriorMod2.MoveShipFlag
SOS2 has whitelists in ShipInteriorMod2 that can be added to for:
Quest defs that are allowed to trigger in on the player space home map: string[] allowedQuests
WorldObject defs the player can observe with sensors (with no pawns present): string[] allowedToObserve
With harmony you can easily access these like this:
if (ModLister.HasActiveModWithName("Save Our Ship 2"))
{
bool moveShipFlag = Traverse.Create(typeof(ShipInteriorMod2)).Field("MoveShipFlag").GetValue<bool>();
string[] allowedQuests = Traverse.Create(typeof(ShipInteriorMod2)).Field("allowedQuests").GetValue<string[]>();
string[] allowedToObserve = Traverse.Create(typeof(ShipInteriorMod2)).Field("allowedToObserve").GetValue<string[]>();
}