Refactor ocarina requirements.
MODIFY
app/Support/ItemCollection.php
app/Support/ItemCollection.php
@@ -395,11 +395,14 @@ class ItemCollection extends Collection {
* @return bool
*/
public function canFly() {
- if ($this->world instanceof World\Inverted
- && !($this->has('MoonPearl') && $this->world->getRegion('North West Light World')->canEnter([], $this))) {
- return $this->has('OcarinaActive');
+ return $this->has('OcarinaActive') || $this->has('OcarinaInactive') && $this->canActivateOcarina();
}
- return $this->has('OcarinaActive') || $this->has('OcarinaInactive');
+
+ private function canActivateOcarina() {
+ if ($this->world instanceof World\Inverted) {
+ return $this->has('MoonPearl') && $this->world->getRegion('North West Light World')->canEnter([], $this);
+ }
+ return true;
}
/**

Refactor ocarina requirements.