From 1020bf4e9830497767138986a80d5180ee3e7dbf Mon Sep 17 00:00:00 2001 From: IQuant Date: Sat, 2 Nov 2024 19:51:36 +0300 Subject: [PATCH] Allow telekinetic kick on host. --- quant.ew/files/core/perk_fns.lua | 1 + quant.ew/files/system/perk_patches/append/perks_client.lua | 6 ++++++ quant.ew/files/system/perk_patches/append/perks_common.lua | 1 - quant.ew/files/system/perk_patches/perk_patches.lua | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 quant.ew/files/system/perk_patches/append/perks_client.lua diff --git a/quant.ew/files/core/perk_fns.lua b/quant.ew/files/core/perk_fns.lua index 7e0fa21b..59054770 100644 --- a/quant.ew/files/core/perk_fns.lua +++ b/quant.ew/files/core/perk_fns.lua @@ -17,6 +17,7 @@ local perks_to_ignore = { EXTRA_PERK = true, FASTER_WANDS = true, EXTRA_MANA = true, + TELEKINESIS = true, } function perk_fns.get_my_perks() diff --git a/quant.ew/files/system/perk_patches/append/perks_client.lua b/quant.ew/files/system/perk_patches/append/perks_client.lua new file mode 100644 index 00000000..017b27f6 --- /dev/null +++ b/quant.ew/files/system/perk_patches/append/perks_client.lua @@ -0,0 +1,6 @@ +local function hide_perk(perk_id) + local perk_data = get_perk_with_id(perk_list, perk_id) + perk_data.not_in_default_perk_pool = true +end + +hide_perk("TELEKINESIS") 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 5e220399..d936c14c 100644 --- a/quant.ew/files/system/perk_patches/append/perks_common.lua +++ b/quant.ew/files/system/perk_patches/append/perks_common.lua @@ -12,7 +12,6 @@ local function hide_perk(perk_id) end hide_perk("ABILITY_ACTIONS_MATERIALIZED") -hide_perk("TELEKINESIS") hide_perk("HOMUNCULUS") patch_perk_2("SHIELD", function(entity_perk_item, entity_who_picked, item_name, pickup_count, orig_fn) diff --git a/quant.ew/files/system/perk_patches/perk_patches.lua b/quant.ew/files/system/perk_patches/perk_patches.lua index 52b571bb..cea962ea 100644 --- a/quant.ew/files/system/perk_patches/perk_patches.lua +++ b/quant.ew/files/system/perk_patches/perk_patches.lua @@ -20,6 +20,11 @@ else ModLuaFileAppend("data/scripts/perks/perk_list.lua", "mods/quant.ew/files/system/perk_patches/append/perks_local.lua") end +if not ctx.is_host then + print("Also loading perk patches for clients") + ModLuaFileAppend("data/scripts/perks/perk_list.lua", "mods/quant.ew/files/system/perk_patches/append/perks_client.lua") +end + rpc.opts_reliable() rpc.opts_everywhere() function rpc.modify_max_hp(percent_amount, do_heal)