Skip to content

Commit 9de82c6

Browse files
authored
Text visibility fix (#811)
* Bugfix: Proper access of cryptid localization files in order for tutorial text to appear * Fixed tutorial text overlay not showing With this fix both the vanilla tutorial and the Cryptid mod tutorial will show up
1 parent 7de67bf commit 9de82c6

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

lib/gameset.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -429,15 +429,15 @@ function Cryptid.intro_info(args)
429429
G.OVERLAY_TUTORIAL.button_listen = args.button_listen
430430
end
431431
if not args.no_button then
432-
G.OVERLAY_TUTORIAL.Jimbo:add_button(
433-
button.button,
434-
button.func,
435-
button.colour,
436-
button.update_func,
437-
true
438-
)
439-
end
440-
G.OVERLAY_TUTORIAL.Jimbo:say_stuff(2 * #(G.localization.misc.tutorial[args.text_key] or {}) + 1)
432+
G.OVERLAY_TUTORIAL.Jimbo:add_button(
433+
button.button,
434+
button.func,
435+
button.colour,
436+
button.update_func,
437+
true
438+
)
439+
end
440+
G.OVERLAY_TUTORIAL.Jimbo:say_stuff(2 * #(Cryptid.safe_get(G, "localization", "misc", "tutorial", args.text_key) or {}) + 1)
441441
if args.snap_to then
442442
G.E_MANAGER:add_event(
443443
Event({

lib/misc.lua

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,11 +1465,6 @@ function Card_Character:say_stuff(n, not_first, quip_key)
14651465
if quip then
14661466
return say_stuff_ref(self, n, not_first, quip_key)
14671467
end
1468-
end
1469-
1470-
function Cryptid.is_number(x)
1471-
return type(x) == "number" or (type(x) == "table" and is_number(x)) or (is_big and is_big(x))
1472-
end
1473-
function Cryptid.is_big(x)
1474-
return (type(x) == "table" and is_number(x)) or (is_big and is_big(x))
1468+
-- Always call the original function if no custom quip exists (fixes bug where Jimbo would not say anything)
1469+
return say_stuff_ref(self, n, not_first, quip_key)
14751470
end

0 commit comments

Comments
 (0)