Skip to content

Commit 2161753

Browse files
authored
certain lines in code.lua break if G.GAME is uninitialized, this patches that (#798)
* fsr you have to do this if paperback is installed * Update code.lua
1 parent ebe471f commit 2161753

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

items/code.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3068,14 +3068,14 @@ local declare = {
30683068
local localize_ref = localize
30693069
function localize(first, second, ...)
30703070
if second == "poker_hands" then
3071-
if G and G.GAME and G.GAME.hands[first] and G.GAME.hands[first].declare_name then
3071+
if G then if G.GAME then if G.GAME.hands then if G.GAME.hands[first] then if G.GAME.hands[first].declare_name then
30723072
return G.GAME.hands[first].declare_name
3073-
end
3073+
end end end end end
30743074
end
30753075
if second == "poker_hand_descriptions" then
3076-
if G and G.GAME and G.GAME.hands[first] and G.GAME.hands[first].suitless then
3076+
if G then if G.GAME then if G.GAME.hands then if G.GAME.hands[first] then if G.GAME.hands[first].suitless then
30773077
return localize_ref(first .. "_suitless", second, ...)
3078-
end
3078+
end end end end end
30793079
end
30803080
return localize_ref(first, second, ...)
30813081
end

0 commit comments

Comments
 (0)