Exemplo n.º 1
0
    def createBlankGarden(self):
        gardenData = PyDatagram()

        plots = GardenGlobals.getGardenPlots(self.house.housePos)
        gardenData.addUint8(len(plots))

        for i, plotData in enumerate(plots):
            gardenData.addUint8(GardenGlobals.EmptyPlot)
            gardenData.addUint8(i)

        self.house.b_setGardenData(gardenData.getMessage())
        self.loadGarden()
Exemplo n.º 2
0
    def createBlankGarden(self):
        gardenData = PyDatagram()

        plots = GardenGlobals.getGardenPlots(self.house.housePos)
        gardenData.addUint8(len(plots))

        for i, plotData in enumerate(plots):
            gardenData.addUint8(GardenGlobals.EmptyPlot)
            gardenData.addUint8(i)

        self.house.b_setGardenData(gardenData.getMessage())
        self.loadGarden()
Exemplo n.º 3
0
    def createBlankGarden(self):
        data = []

        plots = GardenGlobals.getGardenPlots(self.house.housePos)

        for i, plotData in enumerate(plots):
            holdingList = []
            holdingList.append(GardenGlobals.EmptyPlot)
            holdingList.append(i)
            data.append(holdingList)

        myPickledGarden = pickle.dumps(data)

        # Sends gatden data to clients
        self.house.b_setGardenData(myPickledGarden)
        self.loadGarden()
Exemplo n.º 4
0
    def createBlankGarden(self):
        gardenData = PyDatagram()

        # NF
        plots = GardenGlobals.getGardenPlots(self.house.housePos)
        boxes = GardenGlobals.getBoxPlots(self.house.housePos)

        tester = plots + boxes

        length_p_b = len(plots) + len(boxes)

        gardenData.addUint8(length_p_b)

        for i, plotData in enumerate(tester):

            if i != 6:
                gardenData.addUint8(GardenGlobals.EmptyPlot)
            else:
                gardenData.addUint8(GardenGlobals.PlanterBox)

            gardenData.addUint8(i)

        self.house.b_setGardenData(gardenData.getMessage())
        self.loadGarden()