Skip to content

Commit

Permalink
fix(textui): dynamic importing textui if we using it (RIGHT WAY)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frowmza committed Aug 14, 2024
1 parent 8897bed commit 32bab02
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions data/zones.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@ local stores = {
}

local key = Config.openControl
local textUi = Config.textUi
local control = Config.openControl
local textui = exports.bl_bridge:textui()
local textUi = Config.textUi and exports.bl_bridge:textUi()
local currentZone = nil
local sprites = {}

Expand Down Expand Up @@ -158,14 +157,14 @@ local function setupZones()
elseif currentZone.type == 'surgeon' then
displayText = "Surgeon"
end
textui.showTextUI(prefix .. displayText, 'left')
textUi.showTextUI(prefix .. displayText, 'left')
end
end

function point:onExit()
currentZone = nil
if textUi then
textui.hideTextUI()
textUi.hideTextUI()
end
end

Expand Down

0 comments on commit 32bab02

Please sign in to comment.