A collection of scripts to balance garrysmod tools.
Scripts should be added to lua/tool_balance/tools/<category>/scriptname.lua
e.g. lua/tool_balance/tools/wire/turret.lua
-
Takes a function and a list of min max values, returning a new function that when called clamps each argument before calling the original function. If a table with no min and max keys is used the argument will not be clamped.
example:
cfcToolBalance.clampFunction( func, { {min=0, max=10}, {}, {min=10, max=20} })
-
Does the same thing as clampFunction but ignores the first argument. Used to ignore self in methods
-
returns a new function that calls
afterFunc
after callingfunc
. The new function will return the value returned byfunc
clamps the damage blastradius and reloadtime on the gmod_wire_explosive
Clamps the damage, firerate, spread, force and number of bullets on the gmod_wire_turret
clamps the numgears
value on the simfphys gear editor. Using a high number of gears would crash the server.
Clamps the delay between emitter activates
Clamps the damage, firerate, spread, force and number of bullets on the gmod_turret