Merge pull request #1370 from AverageConsumer/codex/mod-field-action-busy

This commit is contained in:
bryanthaboi
2026-08-15 20:20:12 -04:00
committed by GitHub
4 changed files with 24 additions and 5 deletions
+4 -2
View File
@@ -95,8 +95,10 @@ end
-- are listed; callers receive copied labels and never inspect world internals.
function WorldAPI:availableFieldActions()
local game, ow, out = self.game, self:overworld(), {}
if not (game and game.save and ow and ow.map and ow.player)
or not acceptsMenuInput(game, ow) then return out end
if not (game and game.save and ow and ow.map and ow.player) then
return out, NO_OVERWORLD
end
if not acceptsMenuInput(game, ow) then return out, "world is busy" end
local save, inventory = game.save, game.save.inventory or {}
local items = game.data and game.data.items or {}
+4 -2
View File
@@ -78,8 +78,10 @@ end
-- collision and fishing rules.
function WorldAPI:availableFieldActions()
local world, game, out = self:overworld(), self.game, {}
if not (world and game and game.save and world.map and world.player)
or not world:acceptsMenuInput() then return out end
if not (world and game and game.save and world.map and world.player) then
return out, NO_OVERWORLD
end
if not world:acceptsMenuInput() then return out, "world is busy" end
local inventory = game.save.inventory or {}
if (inventory.BICYCLE or 0) > 0 then