mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-12 08:21:02 +02:00
Merge remote-tracking branch 'origin/dev' into fix1038
# Conflicts: # docs/modding.md
This commit is contained in:
@@ -74,6 +74,9 @@ local function battleWith(fx, sprites)
|
||||
growInScale = function() return nil end,
|
||||
drawBallRow = function() end,
|
||||
statusLabel = function() return "" end,
|
||||
statusHUDVisible = function() return true end,
|
||||
bottomUIVisible = function() return true end,
|
||||
caughtMarkerVisible = function() return false end,
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ local Stats = require("src.pokemon.Stats")
|
||||
local Zoom = require("src.render.Zoom")
|
||||
local ListMenu = require("src.ui.ListMenu")
|
||||
local NamingScreen = require("src.ui.NamingScreen")
|
||||
local TextBox = require("src.render.TextBox")
|
||||
local Player = require("src.world.Player")
|
||||
local Music = require("src.core.Music")
|
||||
|
||||
@@ -161,6 +162,36 @@ do
|
||||
unsub()
|
||||
end
|
||||
|
||||
-- ------- battle UI visibility (companion / alternate renderers)
|
||||
|
||||
do
|
||||
local BattleState = require("src.battle.BattleState")
|
||||
check(BattleState.bottomUIVisible({ phase = "menu" }),
|
||||
"battle bottom UI is visible without a mod")
|
||||
local seen
|
||||
local unsub = wrap("battle.bottom_ui_visible", function(_, state)
|
||||
seen = state
|
||||
return false
|
||||
end)
|
||||
check(not BattleState.bottomUIVisible({ phase = "messages" }),
|
||||
"a mod can hide the battle text and menu layer")
|
||||
local text = setmetatable({}, TextBox)
|
||||
text:draw()
|
||||
check(seen == text, "pushed text boxes use the same visibility hook")
|
||||
unsub()
|
||||
check(BattleState.bottomUIVisible({ phase = "moveSelect" }),
|
||||
"battle bottom UI returns when the hook is removed")
|
||||
|
||||
check(BattleState.statusHUDVisible({}),
|
||||
"battle status HUD is visible without a mod")
|
||||
unsub = wrap("battle.status_hud_visible", function() return false end)
|
||||
check(not BattleState.statusHUDVisible({}),
|
||||
"a mod can hide the battle status HUD")
|
||||
unsub()
|
||||
check(BattleState.statusHUDVisible({}),
|
||||
"battle status HUD returns when the hook is removed")
|
||||
end
|
||||
|
||||
-- ------- music.volume (distance / indoor muffling)
|
||||
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user