mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
New version number.
This commit is contained in:
parent
f784a15e1d
commit
8d33330192
9 changed files with 18 additions and 65 deletions
|
@ -382,10 +382,7 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
|||
def decodeDatagram(self, di, versionNumber, store):
|
||||
CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store)
|
||||
self.accessoryType = di.getUint16()
|
||||
if versionNumber >= 6:
|
||||
self.isSpecial = di.getBool()
|
||||
else:
|
||||
self.isSpecial = False
|
||||
str = AccessoryTypes[self.accessoryType][ATString]
|
||||
if self.isHat():
|
||||
defn = ToonDNA.HatStyles[str]
|
||||
|
|
|
@ -556,10 +556,7 @@ class CatalogClothingItem(CatalogItem.CatalogItem):
|
|||
CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store)
|
||||
self.clothingType = di.getUint16()
|
||||
self.colorIndex = di.getUint8()
|
||||
if versionNumber >= 6:
|
||||
self.isSpecial = di.getBool()
|
||||
else:
|
||||
self.isSpecial = False
|
||||
str = ClothingTypes[self.clothingType][CTString]
|
||||
if self.isShirt():
|
||||
color = ToonDNA.ShirtStyles[str][2][self.colorIndex]
|
||||
|
|
|
@ -114,10 +114,7 @@ class CatalogEmoteItem(CatalogItem.CatalogItem):
|
|||
def decodeDatagram(self, di, versionNumber, store):
|
||||
CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store)
|
||||
self.emoteIndex = di.getUint8()
|
||||
if versionNumber >= 6:
|
||||
self.isSpecial = di.getBool()
|
||||
else:
|
||||
self.isSpecial = False
|
||||
if self.emoteIndex > len(OTPLocalizer.EmoteList):
|
||||
raise ValueError
|
||||
|
||||
|
|
|
@ -108,11 +108,8 @@ class CatalogFlooringItem(CatalogSurfaceItem):
|
|||
|
||||
def decodeDatagram(self, di, versionNumber, store):
|
||||
CatalogAtticItem.CatalogAtticItem.decodeDatagram(self, di, versionNumber, store)
|
||||
if versionNumber < 3:
|
||||
self.patternIndex = di.getUint8()
|
||||
else:
|
||||
self.patternIndex = di.getUint16()
|
||||
if versionNumber < 4 or store & CatalogItem.Customization:
|
||||
if store & CatalogItem.Customization:
|
||||
self.colorIndex = di.getUint8()
|
||||
else:
|
||||
self.colorIndex = 0
|
||||
|
|
|
@ -8,7 +8,7 @@ from direct.distributed.PyDatagramIterator import PyDatagramIterator
|
|||
import types
|
||||
import sys
|
||||
CatalogReverseType = None
|
||||
CatalogItemVersion = 8
|
||||
CatalogItemVersion = 0
|
||||
CatalogBackorderMarkup = 1.2
|
||||
CatalogSaleMarkdown = 0.75
|
||||
Customization = 1
|
||||
|
@ -274,19 +274,6 @@ class CatalogItem:
|
|||
x = di.getArg(STInt16, 10)
|
||||
y = di.getArg(STInt16, 10)
|
||||
z = di.getArg(STInt16, 100)
|
||||
if versionNumber < 2:
|
||||
h = di.getArg(STInt16, 10)
|
||||
p = 0.0
|
||||
r = 0.0
|
||||
elif versionNumber < 5:
|
||||
h = di.getArg(STInt8, 256.0 / 360.0)
|
||||
p = di.getArg(STInt8, 256.0 / 360.0)
|
||||
r = di.getArg(STInt8, 256.0 / 360.0)
|
||||
hpr = oldToNewHpr(VBase3(h, p, r))
|
||||
h = hpr[0]
|
||||
p = hpr[1]
|
||||
r = hpr[2]
|
||||
else:
|
||||
h = di.getArg(STInt8, 256.0 / 360.0)
|
||||
p = di.getArg(STInt8, 256.0 / 360.0)
|
||||
r = di.getArg(STInt8, 256.0 / 360.0)
|
||||
|
@ -298,10 +285,7 @@ class CatalogItem:
|
|||
r)
|
||||
if store & GiftTag:
|
||||
self.giftTag = di.getString()
|
||||
if versionNumber >= 8:
|
||||
self.specialEventId = di.getUint8()
|
||||
else:
|
||||
self.specialEventId = 0
|
||||
|
||||
def encodeDatagram(self, dg, store):
|
||||
if store & DeliveryDate:
|
||||
|
|
|
@ -93,9 +93,6 @@ class CatalogMouldingItem(CatalogSurfaceItem):
|
|||
|
||||
def decodeDatagram(self, di, versionNumber, store):
|
||||
CatalogAtticItem.CatalogAtticItem.decodeDatagram(self, di, versionNumber, store)
|
||||
if versionNumber < 3:
|
||||
self.patternIndex = di.getUint8()
|
||||
else:
|
||||
self.patternIndex = di.getUint16()
|
||||
self.colorIndex = di.getUint8()
|
||||
wtype = MouldingTypes[self.patternIndex]
|
||||
|
|
|
@ -92,10 +92,7 @@ class CatalogRentalItem(CatalogItem.CatalogItem):
|
|||
|
||||
def decodeDatagram(self, di, versionNumber, store):
|
||||
CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store)
|
||||
if versionNumber >= 7:
|
||||
self.cost = di.getUint16()
|
||||
else:
|
||||
self.cost = 1000
|
||||
self.duration = di.getUint16()
|
||||
self.typeIndex = di.getUint16()
|
||||
|
||||
|
|
|
@ -84,9 +84,6 @@ class CatalogWainscotingItem(CatalogSurfaceItem):
|
|||
|
||||
def decodeDatagram(self, di, versionNumber, store):
|
||||
CatalogAtticItem.CatalogAtticItem.decodeDatagram(self, di, versionNumber, store)
|
||||
if versionNumber < 3:
|
||||
self.patternIndex = di.getUint8()
|
||||
else:
|
||||
self.patternIndex = di.getUint16()
|
||||
self.colorIndex = di.getUint8()
|
||||
wtype = WainscotingTypes[self.patternIndex]
|
||||
|
|
|
@ -665,18 +665,8 @@ class CatalogWallpaperItem(CatalogSurfaceItem):
|
|||
def decodeDatagram(self, di, versionNumber, store):
|
||||
CatalogAtticItem.CatalogAtticItem.decodeDatagram(self, di, versionNumber, store)
|
||||
self.colorIndex = 0
|
||||
if store & CatalogItem.Customization:
|
||||
self.borderIndex = 0
|
||||
else:
|
||||
self.borderIndex = 0
|
||||
self.borderColorIndex = 0
|
||||
if versionNumber < 3:
|
||||
self.patternIndex = di.getUint8()
|
||||
self.colorIndex = di.getUint8()
|
||||
elif versionNumber == 3:
|
||||
self.patternIndex = di.getUint16()
|
||||
self.colorIndex = di.getUint8()
|
||||
else:
|
||||
self.patternIndex = di.getUint16()
|
||||
if store & CatalogItem.Customization:
|
||||
self.colorIndex = di.getUint8()
|
||||
|
|
Loading…
Reference in a new issue