From c838047f332892c52fc9952c4fef7c1b6af00cc4 Mon Sep 17 00:00:00 2001 From: bgkillas Date: Sat, 2 Nov 2024 21:36:12 -0400 Subject: [PATCH] maybe fix perk ban list --- quant.ew/files/system/perk_patches/append/perks_common.lua | 7 ++++++- quant.ew/files/system/perk_patches/perk_patches.lua | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/quant.ew/files/system/perk_patches/append/perks_common.lua b/quant.ew/files/system/perk_patches/append/perks_common.lua index e8443916..fa61075e 100644 --- a/quant.ew/files/system/perk_patches/append/perks_common.lua +++ b/quant.ew/files/system/perk_patches/append/perks_common.lua @@ -48,6 +48,11 @@ local function string_split( s, splitter ) return words; end -for _, perk in ipairs(string_split(CrossCall("ew_perk_ban_list"), ',')) do +--this crosscall check may break it but idc enough to test +local s = "" +if CrossCall ~= nil then + s = CrossCall("ew_perk_ban_list") +end +for _, perk in ipairs(string_split(s, ',')) do hide_perk(perk) end \ No newline at end of file diff --git a/quant.ew/files/system/perk_patches/perk_patches.lua b/quant.ew/files/system/perk_patches/perk_patches.lua index 77067654..e0ca64e9 100644 --- a/quant.ew/files/system/perk_patches/perk_patches.lua +++ b/quant.ew/files/system/perk_patches/perk_patches.lua @@ -45,7 +45,9 @@ end np.CrossCallAdd("ew_perks_modify_max_hp", rpc.modify_max_hp) -np.CrossCallAdd("ew_perk_ban_list", ctx.proxy_opt.perk_ban_list) +np.CrossCallAdd("ew_perk_ban_list", function() + return ctx.proxy_opt.perk_ban_list +end) rpc.opts_everywhere() function rpc.sync_perk_amount(items, genome)