Holocausted Laughing Man

This commit is contained in:
John 2015-08-04 16:26:11 +03:00
parent 1f4783607d
commit 3ff51a9b14
19 changed files with 41 additions and 146 deletions

View file

@ -9,15 +9,6 @@ CAROLING_REWARD = 100
SCAVENGER_HUNT_LOCATIONS = 6
Holidays = {
ToontownGlobals.LAUGHING_MAN: {
'startMonth': 6,
'startDay': 22,
'endMonth': 6,
'endDay': 22,
'startMessage': TTLocalizer.LaughingManHolidayStart,
'ongoingMessage': TTLocalizer.LaughingManHolidayOngoing,
'endMessage': TTLocalizer.LaughingManHolidayEnd
},
ToontownGlobals.GRAND_PRIX: {
'weekDay': 0,
'startMessage': TTLocalizer.CircuitRaceStart,

View file

@ -52,10 +52,7 @@ class NewsManager(DistributedObject):
self.endSpecialHoliday(id)
def startSpecialHoliday(self, id):
if id == ToontownGlobals.LAUGHING_MAN:
for toon in base.cr.toons.values():
toon.generateLaughingMan()
elif id == ToontownGlobals.APRIL_TOONS_WEEK:
if id == ToontownGlobals.APRIL_TOONS_WEEK:
if isinstance(base.cr.playGame.getPlace(), Estate.Estate):
base.localAvatar.startAprilToonsControls()
@ -68,10 +65,7 @@ class NewsManager(DistributedObject):
base.localAvatar.chatMgr.chatInputSpeedChat.addWinterMenu()
def endSpecialHoliday(self, id):
if id == ToontownGlobals.LAUGHING_MAN:
for toon in base.cr.toons.values():
toon.swapToonHead(laughingMan=toon.getWantLaughingMan())
elif id == ToontownGlobals.APRIL_TOONS_WEEK:
if id == ToontownGlobals.APRIL_TOONS_WEEK:
if isinstance(base.cr.playGame.getPlace(), Estate.Estate):
base.localAvatar.stopAprilToonsControls()

View file

@ -338,7 +338,7 @@ class Movie(DirectObject.DirectObject):
self.tutorialTom = Toon.Toon()
dna = ToonDNA.ToonDNA()
dna.newToonFromProperties(*('dls', 'ms', 'm', 'm', 7, 0, 7, 7, 2, 6, 2, 6, 2, 16, 0))
dna.newToonFromProperties(*('dls', 'ms', 'm', 'm', 7, 0, 7, 7, 2, 6, 2, 6, 2, 16))
self.tutorialTom.setDNA(dna)
self.tutorialTom.setName(TTLocalizer.NPCToonNames[20000])
self.tutorialTom.setPickable(0)

View file

@ -67,7 +67,7 @@ class CogdoBarrelRoomIntro(CogdoGameMovie):
self.frame.hide()
backgroundGui.removeNode()
self.toonDNA = ToonDNA.ToonDNA()
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14)
self.toonHead = Toon.Toon()
self.toonHead.setDNA(self.toonDNA)
self.makeSuit('sc')

View file

@ -67,7 +67,7 @@ class CogdoElevatorMovie(CogdoGameMovie):
self.frame.hide()
backgroundGui.removeNode()
self.toonDNA = ToonDNA.ToonDNA()
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14)
self.toonHead = Toon.Toon()
self.toonHead.setDNA(self.toonDNA)
self.makeSuit('sc')

View file

@ -71,7 +71,7 @@ class CogdoExecutiveSuiteIntro(CogdoGameMovie):
self.frame.hide()
backgroundGui.removeNode()
self.toonDNA = ToonDNA.ToonDNA()
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14)
self.toonHead = Toon.Toon()
self.toonHead.setDNA(self.toonDNA)
self.makeSuit('sc')

View file

@ -53,7 +53,7 @@ class CogdoFlyingGameIntro(CogdoGameMovie):
def load(self):
CogdoGameMovie.load(self)
self.toonDNA = ToonDNA.ToonDNA()
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14)
self.toonHead = Toon.Toon()
self.toonHead.setDNA(self.toonDNA)
self.makeSuit('sc')

View file

@ -56,7 +56,7 @@ class CogdoMazeGameIntro(CogdoGameMovie):
def load(self):
CogdoGameMovie.load(self)
self.toonDNA = ToonDNA.ToonDNA()
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14)
self.toonHead = Toon.Toon()
self.toonHead.setDNA(self.toonDNA)
self.makeSuit('sc')

View file

@ -46,7 +46,7 @@ class DistributedToonStatuary(DistributedStatuary.DistributedStatuary):
self.model.setScale(self.worldScale * 1.5, self.worldScale * 1.5, self.worldScale)
self.getToonPropertiesFromOptional()
dna = ToonDNA.ToonDNA()
dna.newToonFromProperties(self.headType, self.torsoType, self.legType, self.gender, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
dna.newToonFromProperties(self.headType, self.torsoType, self.legType, self.gender, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
self.setupStoneToon(dna)
self.poseToonFromTypeIndex(self.typeIndex)
self.toon.reparentTo(self.model)

View file

@ -2,8 +2,6 @@ from toontown.hood import HoodAI
from toontown.safezone import ButterflyGlobals
from toontown.safezone import DistributedButterflyAI
from toontown.safezone import DistributedTrolleyAI
from toontown.toon import NPCToons
from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownGlobals
from toontown.ai import DistributedEffectMgrAI
@ -25,11 +23,6 @@ class TTHoodAI(HoodAI.HoodAI):
if simbase.config.GetBool('want-butterflies', True):
self.createButterflies()
NPCToons.createNPC(
simbase.air, 2021,
(ToontownGlobals.ToontownCentral, TTLocalizer.NPCToonNames[2021], ('dss', 'ls', 's', 'm', 13, 41, 13, 13, 1, 6, 1, 6, 0, 18, 0), 'm', 1, NPCToons.NPC_GLOVE),
ToontownGlobals.ToontownCentral, posIndex=0)
self.trickOrTreatMgr = DistributedEffectMgrAI.DistributedEffectMgrAI(self.air, ToontownGlobals.HALLOWEEN, 12)
self.trickOrTreatMgr.generateWithRequired(2649) # All Fun and Games Shop, Silly Street

View file

@ -56,7 +56,6 @@ class DistributedNPCToonBase(DistributedToon.DistributedToon):
self.parentToonParts()
self.rescaleToon()
self.resetHeight()
self.generateLaughingMan()
self.rightHands = []
self.leftHands = []
self.headParts = []

View file

@ -4842,16 +4842,6 @@ def dna(part, value):
invoker.b_setDNAString(dna.makeNetString())
return 'Bottom texture color index set to: ' + str(dna.botTexColor)
if part == 'laughingman':
if not value.isdigit():
return 'Laughing Man can only be 0 or 1.'
value = int(value)
if value != 0 and value != 1:
return 'Laughing Man can only be 0 or 1.'
dna.laughingMan = value
invoker.b_setDNAString(dna.makeNetString())
return 'Laughing Man set to: ' + str(dna.laughingMan)
if part == 'show':
return dna.asTuple()
if part == 'showrandom':

View file

@ -1,43 +0,0 @@
from panda3d.core import *
def makeCard(book=False):
cardMaker = CardMaker('king-jake-cm')
cardMaker.setHasUvs(1)
cardMaker.setFrame(-0.5, 0.5, -0.5, 0.5)
nodePath = NodePath('king-jake')
nodePath.setBillboardPointEye()
lmBase = nodePath.attachNewNode(cardMaker.generate())
lmBase.setTexture(loader.loadTexture('phase_3/maps/kj_base.png'))
lmBase.setY(-0.3)
lmBase.setScale(0.845)
lmBase.setTransparency(True)
lmText = nodePath.attachNewNode(cardMaker.generate())
lmText.setTexture(loader.loadTexture('phase_3/maps/kj_text.png'))
lmText.setY(-0.301)
lmText.setScale(0.845)
lmText.setTransparency(True)
lmText.hprInterval(10, (0, 0, -360)).loop()
lmFace = nodePath.attachNewNode(cardMaker.generate())
lmFace.setTexture(loader.loadTexture('phase_3/maps/lm_face.rgba'))
lmFace.setY(-0.302)
lmFace.setTransparency(True)
return nodePath
def addHeadEffect(head, book=False):
card = makeCard(book=book)
card.setScale(1.45 if book else 2.5)
card.setZ(0.05 if book else 0.5)
for nodePath in head.getChildren():
nodePath.hide()
card.instanceTo(head)
def addToonEffect(toon):
for lod in toon.getLODNames():
addHeadEffect(toon.getPart('head', lod))

View file

@ -642,6 +642,25 @@ NPCToonDict = {20000: (-1,
'm',
1,
NPC_SCIENTIST),
2021: (2000,
lnames[2021],
('dss',
'ls',
's',
'm',
13,
0,
13,
13,
1,
6,
1,
6,
0,
18),
'm',
1,
NPC_GLOVE),
2101: (2601,
lnames[2101],
('rll',
@ -11156,8 +11175,7 @@ NPCToonDict = {20000: (-1,
5,
21,
8,
26,
0),
26),
'f',
0,
NPC_REGULAR),
@ -11182,8 +11200,7 @@ NPCToonDict = {20000: (-1,
10,
10,
3,
19,
0),
19),
'm',
0,
NPC_REGULAR),
@ -11226,8 +11243,7 @@ NPCToonDict = {20000: (-1,
8,
4,
7,
4,
0),
4),
'm',
0,
NPC_REGULAR),
@ -11252,8 +11268,7 @@ NPCToonDict = {20000: (-1,
0,
7,
1,
11,
0),
11),
'm',
0,
NPC_REGULAR),
@ -11302,8 +11317,7 @@ NPCToonDict = {20000: (-1,
7,
4,
8,
11,
0),
11),
'f',
0,
NPC_REGULAR),
@ -11328,8 +11342,7 @@ NPCToonDict = {20000: (-1,
5,
11,
5,
11,
0),
11),
'm',
0,
NPC_REGULAR),
@ -11354,8 +11367,7 @@ NPCToonDict = {20000: (-1,
4,
1,
2,
16,
0),
16),
'm',
0,
NPC_REGULAR),

View file

@ -28,7 +28,6 @@ from otp.nametag.NametagGroup import *
from toontown.suit import SuitDNA
from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownGlobals
from toontown.toon import LaughingManGlobals
def teleportDebug(requestStatus, msg, onlyIfToAv = True):
if teleportNotify.getDebug():
@ -564,8 +563,8 @@ class Toon(Avatar.Avatar, ToonHead):
def updateToonDNA(self, newDNA, fForce = 0):
self.style.gender = newDNA.getGender()
oldDNA = self.style
if fForce or newDNA.head != oldDNA.head or newDNA.laughingMan != oldDNA.laughingMan:
self.swapToonHead(newDNA.head, newDNA.laughingMan)
if fForce or newDNA.head != oldDNA.head:
self.swapToonHead(newDNA.head)
if fForce or newDNA.torso != oldDNA.torso:
self.swapToonTorso(newDNA.torso, genClothes=0)
self.loop('neutral')
@ -644,7 +643,6 @@ class Toon(Avatar.Avatar, ToonHead):
self.rescaleToon()
self.resetHeight()
self.setupToonNodes()
self.generateLaughingMan()
def setupToonNodes(self):
rightHand = NodePath('rightHand')
@ -829,7 +827,7 @@ class Toon(Avatar.Avatar, ToonHead):
self.loadAnims(HeadAnimDict[self.style.head], 'head', '500')
self.loadAnims(HeadAnimDict[self.style.head], 'head', '250')
def swapToonHead(self, headStyle=-1, laughingMan=0, copy = 1):
def swapToonHead(self, headStyle=-1, copy = 1):
self.stopLookAroundNow()
self.eyelids.request('open')
self.unparentToonParts()
@ -848,8 +846,6 @@ class Toon(Avatar.Avatar, ToonHead):
self.resetHeight()
self.eyelids.request('open')
self.startLookAround()
if laughingMan or self.getWantLaughingMan():
LaughingManGlobals.addToonEffect(self)
def generateToonColor(self):
ToonHead.generateToonColor(self, self.style)
@ -983,10 +979,6 @@ class Toon(Avatar.Avatar, ToonHead):
return swappedTorso
def generateLaughingMan(self):
if self.getWantLaughingMan():
self.swapToonHead(laughingMan=True)
def generateHat(self, fromRTM = False):
hat = self.getHat()
if hat[0] >= len(ToonDNA.HatModels):
@ -1160,12 +1152,6 @@ class Toon(Avatar.Avatar, ToonHead):
def getHat(self):
return self.hat
def getWantLaughingMan(self):
return self.style.laughingMan or self.getWantLaughingManHoliday()
def getWantLaughingManHoliday(self):
return base.cr.newsManager and base.cr.newsManager.isHolidayRunning(ToontownGlobals.LAUGHING_MAN)
def setGlasses(self, glassesIdx, textureIdx, colorIdx, fromRTM = False):
self.glasses = (glassesIdx, textureIdx, colorIdx)
self.generateGlasses(fromRTM=fromRTM)

View file

@ -2427,7 +2427,6 @@ class ToonDNA:
string = string + 'sleeve texture color = %d\n' % self.sleeveTexColor
string = string + 'bottom texture = %d\n' % self.botTex
string = string + 'bottom texture color = %d\n' % self.botTexColor
string = string + 'laughing man = %d\n' % self.laughingMan
return string
def clone(self):
@ -2459,19 +2458,12 @@ class ToonDNA:
dg.addUint8(self.gloveColor)
dg.addUint8(self.legColor)
dg.addUint8(self.headColor)
dg.addUint8(self.laughingMan)
elif self.type == 'u':
notify.error('undefined avatar')
else:
notify.error('unknown avatar type: ', self.type)
return dg.getMessage()
def getDatagramWithFallback(self, dgi, fallback=0):
try:
return dgi.getUint8()
except:
return fallback
def isValidNetString(self, string):
dg = PyDatagram(string)
dgi = PyDatagramIterator(dg)
@ -2504,7 +2496,6 @@ class ToonDNA:
gloveColor = dgi.getUint8()
legColor = dgi.getUint8()
headColor = dgi.getUint8()
laughingMan = self.getDatagramWithFallback(dgi, 0)
if topTex >= len(Shirts):
return False
if topTexColor >= len(ClothesColors):
@ -2523,8 +2514,6 @@ class ToonDNA:
return False
if headColor >= len(allColorsList):
return False
if laughingMan != 0 and laughingMan != 1:
return False
return True
def makeFromNetString(self, string):
@ -2553,7 +2542,6 @@ class ToonDNA:
self.gloveColor = dgi.getUint8()
self.legColor = dgi.getUint8()
self.headColor = dgi.getUint8()
self.laughingMan = self.getDatagramWithFallback(dgi, 0)
else:
notify.error('unknown avatar type: ', self.type)
return None
@ -2587,12 +2575,11 @@ class ToonDNA:
self.legColor = color
self.headColor = color
self.gloveColor = 0
self.laughingMan = 0
else:
notify.error("tuple must be in format ('%s', '%s', '%s', '%s')")
return
def newToonFromProperties(self, head, torso, legs, gender, armColor, gloveColor, legColor, headColor, topTexture, topTextureColor, sleeveTexture, sleeveTextureColor, bottomTexture, bottomTextureColor, laughingMan=0):
def newToonFromProperties(self, head, torso, legs, gender, armColor, gloveColor, legColor, headColor, topTexture, topTextureColor, sleeveTexture, sleeveTextureColor, bottomTexture, bottomTextureColor):
self.type = 't'
self.head = head
self.torso = torso
@ -2608,9 +2595,8 @@ class ToonDNA:
self.sleeveTexColor = sleeveTextureColor
self.botTex = bottomTexture
self.botTexColor = bottomTextureColor
self.laughingMan = laughingMan
def updateToonProperties(self, head = None, torso = None, legs = None, gender = None, armColor = None, gloveColor = None, legColor = None, headColor = None, topTexture = None, topTextureColor = None, sleeveTexture = None, sleeveTextureColor = None, bottomTexture = None, bottomTextureColor = None, shirt = None, bottom = None, laughingMan = False):
def updateToonProperties(self, head = None, torso = None, legs = None, gender = None, armColor = None, gloveColor = None, legColor = None, headColor = None, topTexture = None, topTextureColor = None, sleeveTexture = None, sleeveTextureColor = None, bottomTexture = None, bottomTextureColor = None, shirt = None, bottom = None):
if head:
self.head = head
if torso:
@ -2639,7 +2625,6 @@ class ToonDNA:
self.botTex = bottomTexture
if bottomTextureColor:
self.botTexColor = bottomTextureColor
self.laughingMan = laughingMan
if shirt:
str, colorIndex = shirt
defn = ShirtStyles[str]
@ -2700,7 +2685,6 @@ class ToonDNA:
self.legColor = color
self.headColor = color
self.gloveColor = 0
self.laughingMan = 0
def asTuple(self):
return (self.head,
@ -2716,8 +2700,7 @@ class ToonDNA:
self.sleeveTex,
self.sleeveTexColor,
self.botTex,
self.botTexColor,
self.laughingMan)
self.botTexColor)
def getType(self):
if self.type == 't':
@ -2830,9 +2813,6 @@ class ToonDNA:
def getWhiteColor(self):
return allColorsList[0]
def isLaughingMan(self):
return self.laughingMan
def setTemporary(self, newHead, newArmColor, newLegColor, newHeadColor):
if not self.cache and self.getArmColor != newArmColor:
self.cache = (self.head,

View file

@ -8,7 +8,6 @@ from direct.interval.IntervalGlobal import *
from direct.fsm.ClassicFSM import ClassicFSM
from direct.fsm.State import State
from direct.directnotify import DirectNotifyGlobal
from toontown.toon import LaughingManGlobals
if not base.config.GetBool('want-new-anims', 1):
HeadDict = {'dls': '/models/char/dogMM_Shorts-head-',
@ -196,8 +195,6 @@ class ToonHead(Actor.Actor):
self.getGeomNode().setDepthTest(1)
if dna.getAnimal() == 'dog':
self.loop('neutral')
if dna.laughingMan:
LaughingManGlobals.addHeadEffect(self.getGeomNode(), book=forGui)
def fitAndCenterHead(self, maxDim, forGui = 0):
p1 = Point3()

View file

@ -8031,9 +8031,6 @@ SpookyPropsHolidayStart = 'Silly Meter spins Toontown into spooky mode!'
BlackCatHolidayStart = 'Create a Black Cat - today only!'
BlackCatHolidayEnd = 'Black Cat day has ended!'
SpookyBlackCatHolidayStart = 'Friday 13th means a Black Cat blast!'
LaughingManHolidayStart = 'Today is the day of the Laughing Man!'
LaughingManHolidayOngoing = 'Welcome! The day of the Laughing Man is currently in progress.'
LaughingManHolidayEnd = 'The day of the Laughing Man has ended. Hope you had fun!'
TopToonsMarathonStart = "The Top Toons New Year's Day Marathon has begun!"
TopToonsMarathonEnd = "The Top Toons New Year's Day Marathon has ended."
WinterDecorationsStart = "It's Winter Holiday time in Toontown!"

View file

@ -941,7 +941,6 @@ JELLYBEAN_TROLLEY_HOLIDAY_MONTH = 113
JELLYBEAN_FISHING_HOLIDAY_MONTH = 114
JELLYBEAN_PARTIES_HOLIDAY_MONTH = 115
SILLYMETER_EXT_HOLIDAY = 116
LAUGHING_MAN = 123
TOT_REWARD_JELLYBEAN_AMOUNT = 100
TOT_REWARD_END_OFFSET_AMOUNT = 0
LawbotBossMaxDamage = 2700