Only allow telekinesis on host if randomize_perks is off.

This commit is contained in:
IQuant 2024-11-03 11:04:16 +03:00
parent b23618c8c3
commit 6dfb479201
3 changed files with 5 additions and 4 deletions

View file

@ -7,6 +7,7 @@ local function patch_perk_2(perk_id, fn)
end
local function hide_perk(perk_id)
print("Hiding perk", perk_id)
local perk_data = get_perk_with_id(perk_list, perk_id)
perk_data.not_in_default_perk_pool = true
end
@ -55,4 +56,4 @@ if CrossCall ~= nil then
end
for _, perk in ipairs(string_split(s, ',')) do
hide_perk(perk)
end
end

View file

@ -20,9 +20,9 @@ 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")
if not ctx.is_host or not ctx.proxy_opt.randomize_perks then
print("Hiding telekinesis")
ModLuaFileAppend("data/scripts/perks/perk_list.lua", "mods/quant.ew/files/system/perk_patches/append/perks_no_telekinesis.lua")
end
rpc.opts_reliable()