mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Fix game crashing now?
This commit is contained in:
parent
aa99dab28d
commit
4a12f647ee
2 changed files with 5 additions and 3 deletions
|
@ -197,7 +197,7 @@ class DistributedBuildingMgrAI:
|
||||||
if not self.air.dbConn:
|
if not self.air.dbConn:
|
||||||
simbase.backups.save('block-info', (self.air.districtId, self.branchId), backups)
|
simbase.backups.save('block-info', (self.air.districtId, self.branchId), backups)
|
||||||
else:
|
else:
|
||||||
street = {'district': self.air.districtId, 'branch': self.branchID}
|
street = {'district': self.air.districtId, 'branch': self.branchId}
|
||||||
try:
|
try:
|
||||||
self.air.dbGlobalCursor.blockInfo.update(street, {'$setOnInsert': street, '$set': {'buildings': backups}}, upsert=True)
|
self.air.dbGlobalCursor.blockInfo.update(street, {'$setOnInsert': street, '$set': {'buildings': backups}}, upsert=True)
|
||||||
except AutoReconnect:
|
except AutoReconnect:
|
||||||
|
@ -209,7 +209,7 @@ class DistributedBuildingMgrAI:
|
||||||
blocks = simbase.backups.load('block-info', (self.air.districtId, self.branchId), default={})
|
blocks = simbase.backups.load('block-info', (self.air.districtId, self.branchId), default={})
|
||||||
return blocks
|
return blocks
|
||||||
self.air.dbGlobalCursor.blockInfo.ensure_index([('district', 1), ('branch', 1)])
|
self.air.dbGlobalCursor.blockInfo.ensure_index([('district', 1), ('branch', 1)])
|
||||||
street = {'district': self.air.districtId, 'branch': self.branchID}
|
street = {'district': self.air.districtId, 'branch': self.branchId}
|
||||||
try:
|
try:
|
||||||
doc = self.air.dbGlobalCursor.blockInfo.find_one(street)
|
doc = self.air.dbGlobalCursor.blockInfo.find_one(street)
|
||||||
except AutoReconnect:
|
except AutoReconnect:
|
||||||
|
|
|
@ -182,7 +182,7 @@ class DeveloperAccountDB(AccountDB):
|
||||||
'notAfter': 0},
|
'notAfter': 0},
|
||||||
callback)
|
callback)
|
||||||
|
|
||||||
class RemoteAccountDB(AccountDB):
|
class RemoteAccountDB:
|
||||||
# TO DO FOR NAMES:
|
# TO DO FOR NAMES:
|
||||||
# CURRENTLY IT MAKES n REQUESTS FOR EACH AVATAR
|
# CURRENTLY IT MAKES n REQUESTS FOR EACH AVATAR
|
||||||
# IN THE FUTURE, MAKE ONLY 1 REQUEST
|
# IN THE FUTURE, MAKE ONLY 1 REQUEST
|
||||||
|
@ -190,6 +190,8 @@ class RemoteAccountDB(AccountDB):
|
||||||
# ^ done, check before removing todo note
|
# ^ done, check before removing todo note
|
||||||
notify = directNotify.newCategory('RemoteAccountDB')
|
notify = directNotify.newCategory('RemoteAccountDB')
|
||||||
|
|
||||||
|
def __init__(self, csm):
|
||||||
|
self.csm = csm
|
||||||
|
|
||||||
def addNameRequest(self, avId, name, accountID = None):
|
def addNameRequest(self, avId, name, accountID = None):
|
||||||
username = avId
|
username = avId
|
||||||
|
|
Loading…
Reference in a new issue