This commit is contained in:
Daniel 2015-03-07 00:19:55 +02:00
commit 375996d34c
7 changed files with 700 additions and 467 deletions

1
save.dat Normal file
View file

@ -0,0 +1 @@


View file

@ -74,6 +74,7 @@ class DistributedEstate(DistributedObject.DistributedObject):
self.loadFlowerSellBox()
self.oldClear = base.win.getClearColor()
base.win.setClearColor(Vec4(0.09, 0.55, 0.21, 1.0))
self.startGame()
def unload(self):
self.ignoreAll()
@ -100,6 +101,7 @@ class DistributedEstate(DistributedObject.DistributedObject):
self.flowerSellBox.removeNode()
del self.flowerSellBox
self.flowerSellBox = None
GardenDropGame.GardenDropGame().endGame()
return
def announceGenerate(self):
@ -107,7 +109,7 @@ class DistributedEstate(DistributedObject.DistributedObject):
self.accept('gardenGame', self.startGame)
def startGame(self):
self.game = GardenDropGame.GardenDropGame()
self.game = GardenDropGame.GardenDropGame().playGardenDrop()
def loadAirplane(self):
self.airplane = loader.loadModel('phase_4/models/props/airplane.bam')

View file

@ -34,8 +34,8 @@ class DistributedFurnitureManager(DistributedObject.DistributedObject):
if self.ownerId == base.localAvatar.doId:
self.cr.furnitureManager = self
if self.cr.objectManager == None:
import HouseDesign
self.cr.objectManager = HouseDesign.ObjectManager()
import houseDesign
self.cr.objectManager = houseDesign.ObjectManager()
return
def setOwnerName(self, name):

View file

@ -1,14 +1,30 @@
########################## TOONTOWN ADVENTURE ##########################
# Filename: GameSprite.py
# Created by: sillypeppymacspeed
# Date: March 28th, 2014
####
# Description:
#
# This codes the sprites for the Garden Drop estate game.
####
### DEFINITELY NOT COPIED FROM TOONTOWN HOUSE
import math
class GameSprite:
colorRed = (1, 0, 0, 1)
colorBlue = (0, 0, 1, 1)
colorGreen = (0, 1, 0, 1)
colorYellow = (1, 1, 0, 1)
colorPurple = (1, 0, 1, 1)
colorGhostRed = (1, 0, 0, 0.5)
colorGhostBlue = (0, 0, 1, 0.5)
colorGhostGreen = (0, 1, 0, 0.5)
colorGhostYellow = (1, 1, 0, 0.5)
colorGhostPurple = (1, 0, 1, 0.5)
colorWhite = (1, 1, 1, 1)
colorBlack = (0, 0, 0, 1.0)
colorBlack = (0.5, 0.5, 0.5, 1.0)
colorShadow = (0, 0, 0, 0.5)
def __init__(self, nodeObj, colorType = 0, foundation = 0):
@ -29,12 +45,20 @@ class GameSprite:
self.setColor(GameSprite.colorGhostBlue)
elif colorType == 2:
self.setColor(GameSprite.colorGhostGreen)
elif colorType == 3:
self.setColor(GameSprite.colorGhostYellow)
elif colorType == 4:
self.setColor(GameSprite.colorGhostPurple)
elif colorType == 0:
self.setColor(GameSprite.colorRed)
elif colorType == 1:
self.setColor(GameSprite.colorBlue)
elif colorType == 2:
self.setColor(GameSprite.colorGreen)
elif colorType == 3:
self.setColor(GameSprite.colorYellow)
elif colorType == 4:
self.setColor(GameSprite.colorPurple)
self.markedForDeath = 0
def delete(self):

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,36 @@
acceptErrorDialog = 0
doneEvent = 'game Done'
colorRed = (1, 0, 0, 1)
colorBlue = (0, 0, 1, 1)
colorGreen = (0, 1, 0, 1)
colorGhostRed = (1, 0, 0, 0.5)
colorGhostGreen = (0, 1, 0, 0.5)
colorWhite = (1, 1, 1, 1)
colorBlack = (0.5, 0.5, 0.5, 1.0)
colorShadow = (0, 0, 0, 0.5)
running = 0
maxX = 0.46999999999999997
minX = -0.46999999999999997
maxZ = 0.75000000000000002
minZ = -0.00000000000000001
newBallX = 0.0
newBallZ = 0.69999999999999998
rangeX = (maxX - minX)
rangeZ = (maxZ - minZ)
size = 0.085000000000000006
sizeZ = (size * 0.80000000000000004)
gX = int((rangeX / size))
gZ = int((rangeZ / sizeZ))
maxX = (minX + (gX * size))
maxZ = (minZ + (gZ * sizeZ))
controlOffsetX = 0.0
controlOffsetZ = 0.0
queExtent = 3
gridDimX = gX
gridDimZ = gZ
gridBrick = False
newBallTime = 1.0
newBallCountUp = 0.0
cogX = 0
cogZ = 0
controlSprite = None

View file

@ -9606,6 +9606,16 @@ CheckersObserver = 'You are Observing'
RegularCheckers = 'Checkers.'
RegularCheckersGameOf = ' has just won a game of '
RegularCheckersYouWon = 'You just won a game of Checkers!'
GardenDropTitle = 'Garden Drop'
GardenDropExitGame = 'Exit Mini Game'
GardenDropHelpTitle = 'Instructions:'
GardenDropInstructions = "Match the ghost balls with the normal balls! But beware of the cog ball, it will try to block you off!"
GardenDropBackToGame = "Back to Game"
GardenDropButtonTitle = 'Garden\nDrop'
GardenDropCongradulations = 'Super Congratulations!!'
GardenDropProgressLevels = "Click 'Next' to go to the next level!"
GardenDropWinGame = 'You have won the Garden Drop Game!'
GardenDropExit = 'Exit'
MailNotifyNewItems = "You've got mail!"
MailNewMailButton = 'Mail'
MailSimpleMail = 'Note'