Skip to content

Instantly share code, notes, and snippets.

@boq
Created October 31, 2012 23:53
Show Gist options
  • Save boq/3990726 to your computer and use it in GitHub Desktop.
Save boq/3990726 to your computer and use it in GitHub Desktop.
def SetSDL(varName, newval):
import Plasma
ageSDL = Plasma.PtGetAgeSDL()
oldval = ageSDL[varName][0]
if newval == oldval:
print "xCheat.SetSDL(): won't change, %s is already = %d" % (varName,newval)
return
ageName = Plasma.PtGetAgeName()
if ageName == "Personal":
vault = Plasma.ptVault()
psnlSDL = vault.getPsnlAgeSDL()
FoundValue = psnlSDL.findVar(varName)
FoundValue.setInt(newval)
vault.updatePsnlAgeSDL(psnlSDL)
else:
ageSDL.setFlags(varName,1,1)
ageSDL.sendToClients(varName)
#ageSDL.setNotify(self.key,varName,0.0)
ageSDL[varName] = (newval,)
print "xCheat.SetSDL(): changing %s to %d" % (varName,newval)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment