public override void ExtractInterests(ChallengeStage stage) { ItemDatabase itemDatabase = null; bool extractionSuccess = false; base.ExtractInterests(stage); stageComponent = stage; if (stage != null) { itemDatabase = stage.GetItemDatabase(); if (itemDatabase != null) { itemModel = itemDatabase.GetItemModel(itemCode); if ((itemModel != null) && stage.GetNodeStructurePosition(placementNodeID, ref itemPosition)) { itemPosition += offsetWithinNode; extractionSuccess = true; } } } if (!extractionSuccess) { stage = null; itemModel = null; itemPosition = Vector2.zero; } }