mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 12:12:36 -06:00
GroupManager updates
This commit is contained in:
parent
4b5c0e29be
commit
eec533a48b
3 changed files with 16 additions and 16 deletions
|
@ -12,10 +12,10 @@ class GroupManager(DistributedObject.DistributedObject):
|
||||||
self.shardGroups = {}
|
self.shardGroups = {}
|
||||||
self.groupPlayers = {}
|
self.groupPlayers = {}
|
||||||
self.id2type = {
|
self.id2type = {
|
||||||
SellbotHQ: 'VP Group',
|
SellbotHQ: 'VP',
|
||||||
CashbotHQ: 'CFO Group',
|
CashbotHQ: 'CFO',
|
||||||
LawbotHQ: 'CJ Group',
|
LawbotHQ: 'CJ',
|
||||||
BossbotHQ: 'CEO Group',
|
BossbotHQ: 'CEO',
|
||||||
}
|
}
|
||||||
|
|
||||||
def announceGenerate(self):
|
def announceGenerate(self):
|
||||||
|
|
|
@ -10,10 +10,10 @@ class GroupManagerAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
|
|
||||||
def __init__(self, air):
|
def __init__(self, air):
|
||||||
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
||||||
self.sellGroup = GlobalGroup('VP Group', SellbotHQ)
|
self.sellGroup = GlobalGroup('VP', SellbotHQ)
|
||||||
self.cashGroup = GlobalGroup('CFO Group', CashbotHQ)
|
self.cashGroup = GlobalGroup('CFO', CashbotHQ)
|
||||||
self.lawGroup = GlobalGroup('CJ Group', LawbotHQ)
|
self.lawGroup = GlobalGroup('CJ', LawbotHQ)
|
||||||
self.bossGroup = GlobalGroup('CEO Group', BossbotHQ)
|
self.bossGroup = GlobalGroup('CEO', BossbotHQ)
|
||||||
self.shardGroups = {
|
self.shardGroups = {
|
||||||
SellbotHQ: self.sellGroup,
|
SellbotHQ: self.sellGroup,
|
||||||
CashbotHQ: self.cashGroup,
|
CashbotHQ: self.cashGroup,
|
||||||
|
@ -27,10 +27,10 @@ class GroupManagerAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
BossbotHQ: [],
|
BossbotHQ: [],
|
||||||
}
|
}
|
||||||
self.id2type = {
|
self.id2type = {
|
||||||
SellbotHQ: 'VP Group',
|
SellbotHQ: 'VP',
|
||||||
CashbotHQ: 'CFO Group',
|
CashbotHQ: 'CFO',
|
||||||
LawbotHQ: 'CJ Group',
|
LawbotHQ: 'CJ',
|
||||||
BossbotHQ: 'CEO Group',
|
BossbotHQ: 'CEO',
|
||||||
}
|
}
|
||||||
self.childId = None
|
self.childId = None
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class GroupManagerAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
for groupId, group in self.groupPlayers.items():
|
for groupId, group in self.groupPlayers.items():
|
||||||
for player in group:
|
for player in group:
|
||||||
toon = simbase.air.doId2do.get(player)
|
toon = simbase.air.doId2do.get(player)
|
||||||
if toon.zoneId != groupId:
|
if (toon.zoneId != groupId) or (toon.zoneId + 100 != groupId):
|
||||||
self.removePlayerFromGroup(groupId, player)
|
self.removePlayerFromGroup(groupId, player)
|
||||||
return task.again
|
return task.again
|
||||||
|
|
||||||
|
|
|
@ -365,9 +365,9 @@ class ShardPage(ShtikerPage.ShtikerPage):
|
||||||
if base.cr.groupManager.isInGroup(base.localAvatar.doId, gid):
|
if base.cr.groupManager.isInGroup(base.localAvatar.doId, gid):
|
||||||
self.rejectGroup(4)
|
self.rejectGroup(4)
|
||||||
return
|
return
|
||||||
if len(base.cr.groupManager.getGroupPlayers(groupId)) >= 8:
|
#if len(base.cr.groupManager.getGroupPlayers(groupId)) >= 8:
|
||||||
self.rejectGroup(3)
|
# self.rejectGroup(3)
|
||||||
return
|
# return
|
||||||
suitIdx = -1
|
suitIdx = -1
|
||||||
gids = {10000:0, 11000:1, 12000:2, 13000:3}
|
gids = {10000:0, 11000:1, 12000:2, 13000:3}
|
||||||
suitIdx = gids.get(groupId)
|
suitIdx = gids.get(groupId)
|
||||||
|
|
Loading…
Reference in a new issue