mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2025-05-21 14:21:01 +00:00
Merge pull request #147 from HapaxL/code_formatting
First Cave requirements reformatting
This commit is contained in:
commit
5f99facdd3
|
@ -28,15 +28,22 @@ function firstCave:new(worldGraph)
|
||||||
}
|
}
|
||||||
|
|
||||||
self.requirements = function(self, items)
|
self.requirements = function(self, items)
|
||||||
if self.world:StartPoint() then
|
|
||||||
return true
|
|
||||||
elseif self.world:Arthur() or self.world:Camp() then
|
|
||||||
return _has(items, "flight") and _has(items, "weaponSN") and self.world.regions.mimigaVillage:canAccess(items)
|
return _has(items, "flight") and _has(items, "weaponSN") and self.world.regions.mimigaVillage:canAccess(items)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
self.locations.gunsmith.requirements = function(self, items)
|
self.locations.gunsmith.requirements = function(self, items)
|
||||||
return _has(items, "flight") and _has(items, "polarStar") and _has(items, "eventCore") and self.region.world.regions.mimigaVillage:canAccess(items)
|
return _has(items, "polarStar") and _has(items, "eventCore")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- individual location access requirement overrides
|
||||||
|
self.locations.firstCapsule.canAccess = function(self, items)
|
||||||
|
if self.region.world:StartPoint() then return true end -- TODO remember to add a check for Entrance Rando here
|
||||||
|
return Location.canAccess(self, items)
|
||||||
|
end
|
||||||
|
|
||||||
|
self.locations.gunsmithChest.canAccess = function(self, items)
|
||||||
|
if self.region.world:StartPoint() then return true end -- TODO remember to add a check for Entrance Rando here
|
||||||
|
return Location.canAccess(self, items)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue