Skip to content

Instantly share code, notes, and snippets.

@Deco
Created November 2, 2013 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Deco/7279355 to your computer and use it in GitHub Desktop.
Save Deco/7279355 to your computer and use it in GitHub Desktop.
Lucas's Balance Mod Example
modEntry = [[
Server: lua/LBAL_Server.lua,
Priority: -1
]]
--[[ ]]
function SetLocal(func, name, value)
local index = 1
local foundIndex = nil
while true do
local n, v = debug.getupvalue(func, index)
if not n then
break
end
if n == name then
debug.setupvalue(func, index, value)
return true
end
index = index+1
end
return false
end
kWhipCost = 15
SetLocal(Fade.GetMass, "kMass", 75)
function Fade:GetAirFriction()
return self:GetIsBlinking() and 0 or (0.1 - (GetHasCelerityUpgrade(self) and GetSpurLevel(self:GetTeamNumber()) or 0) * 0.01)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment