From af452157f64723cf88ce09eb1d4b1f7d9432d2ca Mon Sep 17 00:00:00 2001 From: Resxt <55228336+Resxt@users.noreply.github.com> Date: Sat, 20 Sep 2025 15:03:58 +0200 Subject: [PATCH] chat_commands 1.1.7 Updated GetAvailablePerks util function Instead of returning perks from the vending machine, it will now return all perks from the wunderfizz if the map has wunderfizz machine(s). If not then it will use the regular perks machines just like before (fixed Origins returning 5 perks instead of the 9 available) --- chat_commands/chat_commands.gsc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/chat_commands/chat_commands.gsc b/chat_commands/chat_commands.gsc index d4a4239..f78407e 100644 --- a/chat_commands/chat_commands.gsc +++ b/chat_commands/chat_commands.gsc @@ -780,14 +780,21 @@ GetAvailablePerks() { perks = []; - foreach (machine in GetEntArray( "zombie_vending", "targetname" )) + if (GetEntArray("random_perk_machine", "targetname").size == 0) { - if (machine.script_noteworthy != "specialty_weapupgrade") + foreach (machine in GetEntArray( "zombie_vending", "targetname" )) { - perks = AddElementToArray(perks, machine.script_noteworthy); + if (machine.script_noteworthy != "specialty_weapupgrade") + { + perks = AddElementToArray(perks, machine.script_noteworthy); + } } } - Print("perkssize: " + perks.size); + else + { + perks = level._random_perk_machine_perk_list; + } + return perks; }