From 9033861dfb67def9c87c16d110df9f3afb307851 Mon Sep 17 00:00:00 2001 From: Zach Date: Mon, 1 Jun 2015 16:14:34 -0500 Subject: [PATCH] pillow gravity --- toontown/safezone/DistributedPillow.py | 3 ++- toontown/toon/DistributedToonAI.py | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/toontown/safezone/DistributedPillow.py b/toontown/safezone/DistributedPillow.py index b4677d0b..104111f8 100644 --- a/toontown/safezone/DistributedPillow.py +++ b/toontown/safezone/DistributedPillow.py @@ -56,7 +56,8 @@ class DistributedPillow(DistributedObject): polyNode.setFromCollideMask(OTPGlobals.FloorBitmask) polyNodePath = self.np.attachNewNode(polyNode) self.npaths.append(polyNodePath) - self.accept("enterFloorPoly-%d" % n, self.gravityLow) + self.accept("enterFloorPoly-%d" % n, self.gravityHigh) + self.accept("enterdonalds_dreamland", self.gravityLow) for wall in DistributedPillow.walls: ab = DistributedPillow.points[wall[0]] bb = DistributedPillow.points[wall[1]] diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index 08c497f8..44108ee4 100755 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -4387,6 +4387,14 @@ def name(name=''): else: return "%s's name is now empty!" % _name +@magicWord(category=CATEGORY_SYSTEM_ADMINISTRATOR, types=[int]) +def squish(laff): + """ + Squish a toon. + """ + target = spellbook.getTarget() + target.squish(laff) + @magicWord(category=CATEGORY_CREATIVE, types=[int, int]) def hat(hatIndex, hatTex=0): """ @@ -4397,6 +4405,10 @@ def hat(hatIndex, hatTex=0): if not 0 <= hatTex < len(ToonDNA.HatTextures): return 'Invalid hat texture.' invoker = spellbook.getInvoker() + target = spellbook.getTarget() + if target != invoker: + target.b_setHat(hatIndex, hatTex, 0) + return "Set %s's hat to %d, %d!" % (target.getName(), hatIndex, hatTex) invoker.b_setHat(hatIndex, hatTex, 0) return "Set %s's hat to %d, %d!" % (invoker.getName(), hatIndex, hatTex) @@ -4410,6 +4422,10 @@ def glasses(glassesIndex, glassesTex=0): if not 0 <= glassesTex < len(ToonDNA.GlassesTextures): return 'Invalid glasses texture.' invoker = spellbook.getInvoker() + target = spellbook.getTarget() + if target != invoker: + target.b_setGlasses(glassesIndex, glassesTex, 0) + return "Set %s's glasses to %d, %d!" % (target.getName(), glassesIndex, glassesTex) invoker.b_setGlasses(glassesIndex, glassesTex, 0) return "Set %s's glasses to %d, %d!" % (invoker.getName(), glassesIndex, glassesTex) @@ -4436,6 +4452,10 @@ def shoes(shoesIndex, shoesTex=0): if not 0 <= shoesTex < len(ToonDNA.ShoesTextures): return 'Invalid shoes texture.' invoker = spellbook.getInvoker() + target = spellbook.getTarget() + if target != invoker: + target.b_setShoes(shoesIndex, shoesTex, 0) + return "Set %s's shoes to %d, %d!" % (target.getName(), shoesIndex, shoesTex) invoker.b_setShoes(shoesIndex, shoesTex, 0) return "Set %s's shoes to %d, %d!" % (invoker.getName(), shoesIndex, shoesTex)