From 65cd5a1d8bb1ba9514f6f003b1988c6e22c8a3a6 Mon Sep 17 00:00:00 2001 From: HapaxL Date: Tue, 2 Mar 2021 11:10:55 +0100 Subject: [PATCH 1/2] reformatting first cave access requirements in prevision of entrance rando, and also to remove redundancies --- src/database/world_graph.lua | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/database/world_graph.lua b/src/database/world_graph.lua index f9c85be..2be3707 100644 --- a/src/database/world_graph.lua +++ b/src/database/world_graph.lua @@ -28,15 +28,22 @@ function firstCave:new(worldGraph) } 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) - end + return _has(items, "flight") and _has(items, "weaponSN") and self.world.regions.mimigaVillage:canAccess(items) end 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 + return Location.canAccess(self, items) + end + + self.locations.gunsmithChest.canAccess = function(self, items) + if self.region.world:StartPoint() then return true end + return Location.canAccess(self, items) end end From 061a9ce57c26a68376edd5da5e7b8804187b2a91 Mon Sep 17 00:00:00 2001 From: HapaxL Date: Tue, 2 Mar 2021 11:17:43 +0100 Subject: [PATCH 2/2] added comments to not forget DO NOT FORGET --- src/database/world_graph.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/database/world_graph.lua b/src/database/world_graph.lua index 2be3707..2a5e74b 100644 --- a/src/database/world_graph.lua +++ b/src/database/world_graph.lua @@ -37,12 +37,12 @@ function firstCave:new(worldGraph) -- individual location access requirement overrides self.locations.firstCapsule.canAccess = function(self, items) - if self.region.world:StartPoint() then return true end + 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 + 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