mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Merge branch 'features/ttn' into 'master'
Features/ttn It's ready <3 See merge request !1
This commit is contained in:
commit
21c051ce42
279 changed files with 8397 additions and 5637 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -19,3 +19,8 @@
|
||||||
|
|
||||||
# Local config
|
# Local config
|
||||||
dependencies/config/local.prc
|
dependencies/config/local.prc
|
||||||
|
|
||||||
|
# PyMongo
|
||||||
|
bson
|
||||||
|
gridfs
|
||||||
|
pymongo
|
BIN
dependencies/astron/astrond
vendored
Normal file → Executable file
BIN
dependencies/astron/astrond
vendored
Normal file → Executable file
Binary file not shown.
0
dependencies/astron/astrond.exe
vendored
Normal file → Executable file
0
dependencies/astron/astrond.exe
vendored
Normal file → Executable file
239
dependencies/astron/dclass/stride.dc
vendored
239
dependencies/astron/dclass/stride.dc
vendored
|
@ -27,11 +27,11 @@ dclass Account {
|
||||||
uint32 ACCOUNT_AV_SET[] required db;
|
uint32 ACCOUNT_AV_SET[] required db;
|
||||||
uint32 ESTATE_ID db;
|
uint32 ESTATE_ID db;
|
||||||
AvatarPendingDel ACCOUNT_AV_SET_DEL[] db;
|
AvatarPendingDel ACCOUNT_AV_SET_DEL[] db;
|
||||||
uint64 CREATED db;
|
string CREATED db;
|
||||||
string LAST_LOGIN db;
|
string LAST_LOGIN db;
|
||||||
string ACCOUNT_ID db;
|
string ACCOUNT_ID db;
|
||||||
uint16 ACCESS_LEVEL db;
|
uint16 ACCESS_LEVEL db;
|
||||||
uint64 LAST_LOGIN_TS db;
|
uint32 LAST_LOGIN_TS db;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BarrierData {
|
struct BarrierData {
|
||||||
|
@ -175,12 +175,14 @@ dclass FriendManager : DistributedObject {
|
||||||
friendResponse(int8, int32);
|
friendResponse(int8, int32);
|
||||||
inviteeFriendQuery(int32, string, blob, int32);
|
inviteeFriendQuery(int32, string, blob, int32);
|
||||||
inviteeCancelFriendQuery(int32);
|
inviteeCancelFriendQuery(int32);
|
||||||
|
requestTFCode() airecv clsend;
|
||||||
|
redeemTFCode(string) airecv clsend;
|
||||||
|
tfResponse(uint8, string);
|
||||||
};
|
};
|
||||||
|
|
||||||
from toontown.building import DistributedAnimatedProp/AI
|
from toontown.building import DistributedAnimatedProp/AI
|
||||||
from toontown.toon import DistributedToon/AI/UD
|
from toontown.toon import DistributedToon/AI/UD
|
||||||
from toontown.safezone import DistributedTrolley/AI
|
from toontown.safezone import DistributedTrolley/AI
|
||||||
from toontown.safezone import DistributedPillow/AI
|
|
||||||
from toontown.safezone import DistributedPartyGate/AI
|
from toontown.safezone import DistributedPartyGate/AI
|
||||||
from toontown.suit import DistributedSuitPlanner/AI
|
from toontown.suit import DistributedSuitPlanner/AI
|
||||||
from toontown.suit import DistributedSuitBase/AI
|
from toontown.suit import DistributedSuitBase/AI
|
||||||
|
@ -228,7 +230,6 @@ from toontown.estate import DistributedHouse/AI
|
||||||
from toontown.estate import DistributedHouseInterior/AI
|
from toontown.estate import DistributedHouseInterior/AI
|
||||||
from toontown.estate import DistributedGarden/AI
|
from toontown.estate import DistributedGarden/AI
|
||||||
from toontown.shtiker import DeleteManager/AI
|
from toontown.shtiker import DeleteManager/AI
|
||||||
from toontown.groups import GroupManager/AI/UD
|
|
||||||
from toontown.ai import NewsManager/AI
|
from toontown.ai import NewsManager/AI
|
||||||
from toontown.shtiker import PurchaseManager/AI
|
from toontown.shtiker import PurchaseManager/AI
|
||||||
from toontown.shtiker import NewbiePurchaseManager/AI
|
from toontown.shtiker import NewbiePurchaseManager/AI
|
||||||
|
@ -250,11 +251,10 @@ from toontown.building import DistributedKartShopInterior/AI
|
||||||
from toontown.building import DistributedDoor/AI
|
from toontown.building import DistributedDoor/AI
|
||||||
from toontown.estate import DistributedHouseDoor/AI
|
from toontown.estate import DistributedHouseDoor/AI
|
||||||
from toontown.coghq import DistributedCogHQDoor/AI
|
from toontown.coghq import DistributedCogHQDoor/AI
|
||||||
from toontown.coghq import DistributedCogHQExteriorDoor/AI
|
//from toontown.coghq import DistributedCogHQExteriorDoor/AI
|
||||||
from toontown.coghq import DistributedSellbotHQDoor/AI
|
from toontown.coghq import DistributedSellbotHQDoor/AI
|
||||||
from toontown.toon import DistributedNPCToonBase/AI
|
from toontown.toon import DistributedNPCToonBase/AI
|
||||||
from toontown.toon import DistributedNPCToon/AI
|
from toontown.toon import DistributedNPCToon/AI
|
||||||
from toontown.toon import DistributedSmartNPC/AI
|
|
||||||
from toontown.toon import DistributedNPCSpecialQuestGiver/AI
|
from toontown.toon import DistributedNPCSpecialQuestGiver/AI
|
||||||
from toontown.toon import DistributedNPCFlippyInToonHall/AI
|
from toontown.toon import DistributedNPCFlippyInToonHall/AI
|
||||||
from toontown.toon import DistributedNPCScientist/AI
|
from toontown.toon import DistributedNPCScientist/AI
|
||||||
|
@ -291,6 +291,9 @@ from toontown.estate import DistributedBank/AI
|
||||||
from toontown.estate import DistributedCloset/AI
|
from toontown.estate import DistributedCloset/AI
|
||||||
from toontown.estate import DistributedTrunk/AI
|
from toontown.estate import DistributedTrunk/AI
|
||||||
from toontown.estate import DistributedPhone/AI
|
from toontown.estate import DistributedPhone/AI
|
||||||
|
from toontown.estate import DistributedRewardCrate/AI
|
||||||
|
from toontown.estate import DistributedChair/AI
|
||||||
|
from toontown.estate import DistributedTV/AI
|
||||||
from toontown.effects import DistributedFireworkShow/AI
|
from toontown.effects import DistributedFireworkShow/AI
|
||||||
from toontown.estate import DistributedFireworksCannon/AI
|
from toontown.estate import DistributedFireworksCannon/AI
|
||||||
from toontown.coghq import LobbyManager/AI
|
from toontown.coghq import LobbyManager/AI
|
||||||
|
@ -425,7 +428,7 @@ from toontown.safezone import DistributedChineseCheckers/AI
|
||||||
from toontown.safezone import DistributedCheckers/AI
|
from toontown.safezone import DistributedCheckers/AI
|
||||||
from toontown.safezone import DistributedFindFour/AI
|
from toontown.safezone import DistributedFindFour/AI
|
||||||
from toontown.uberdog.DistributedPartyManager/AI/UD import DistributedPartyManager/AI/UD
|
from toontown.uberdog.DistributedPartyManager/AI/UD import DistributedPartyManager/AI/UD
|
||||||
from toontown.uberdog.DistributedLobbyManager/AI/UD import DistributedLobbyManager/AI/UD
|
//from toontown.uberdog.DistributedLobbyManager/AI/UD import DistributedLobbyManager/AI/UD
|
||||||
from toontown.coderedemption.TTCodeRedemptionMgr/AI import TTCodeRedemptionMgr/AI
|
from toontown.coderedemption.TTCodeRedemptionMgr/AI import TTCodeRedemptionMgr/AI
|
||||||
from toontown.cogdominium import DistributedCogdoInterior/AI
|
from toontown.cogdominium import DistributedCogdoInterior/AI
|
||||||
from toontown.cogdominium import DistributedCogdoBattleBldg/AI
|
from toontown.cogdominium import DistributedCogdoBattleBldg/AI
|
||||||
|
@ -442,14 +445,9 @@ from toontown.cogdominium import DistCogdoCrane/AI
|
||||||
from toontown.cogdominium import DistCogdoCraneMoneyBag/AI
|
from toontown.cogdominium import DistCogdoCraneMoneyBag/AI
|
||||||
from toontown.cogdominium import DistCogdoCraneCog/AI
|
from toontown.cogdominium import DistCogdoCraneCog/AI
|
||||||
from toontown.parties.GlobalPartyManager/AI/UD import GlobalPartyManager/AI/UD
|
from toontown.parties.GlobalPartyManager/AI/UD import GlobalPartyManager/AI/UD
|
||||||
from toontown.uberdog.GlobalLobbyManager/AI/UD import GlobalLobbyManager/AI/UD
|
//from toontown.uberdog.GlobalLobbyManager/AI/UD import GlobalLobbyManager/AI/UD
|
||||||
from toontown.uberdog.ARGManager import ARGManager
|
from toontown.uberdog.ARGManager import ARGManager
|
||||||
|
|
||||||
struct GiftItem {
|
|
||||||
blob Item;
|
|
||||||
string giftTag;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct gardenSpecial {
|
struct gardenSpecial {
|
||||||
uint8 index;
|
uint8 index;
|
||||||
uint8 count;
|
uint8 count;
|
||||||
|
@ -484,10 +482,10 @@ struct activity {
|
||||||
uint8 h;
|
uint8 h;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct lobby {
|
//struct lobby {
|
||||||
uint64 lobbyId;
|
// uint64 lobbyId;
|
||||||
uint32 hostId;
|
// uint32 hostId;
|
||||||
};
|
//};
|
||||||
|
|
||||||
struct party {
|
struct party {
|
||||||
uint64 partyId;
|
uint64 partyId;
|
||||||
|
@ -557,6 +555,7 @@ dclass ToontownDistrictStats : DistributedObject {
|
||||||
setDistrictId(uint32) broadcast required ram;
|
setDistrictId(uint32) broadcast required ram;
|
||||||
setAvatarCount(uint32) broadcast required ram;
|
setAvatarCount(uint32) broadcast required ram;
|
||||||
setInvasionStatus(uint8) broadcast required ram;
|
setInvasionStatus(uint8) broadcast required ram;
|
||||||
|
setGroupAvCount(uint32[]) broadcast required ram;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedAnimatedProp : DistributedObject {
|
dclass DistributedAnimatedProp : DistributedObject {
|
||||||
|
@ -599,7 +598,6 @@ dclass DistributedToon : DistributedPlayer {
|
||||||
setMaxClothes(uint32 = 10) required ownrecv db;
|
setMaxClothes(uint32 = 10) required ownrecv db;
|
||||||
setClothesTopsList(uint8[] = []) required ownrecv db;
|
setClothesTopsList(uint8[] = []) required ownrecv db;
|
||||||
setClothesBottomsList(uint8[] = []) required ownrecv db;
|
setClothesBottomsList(uint8[] = []) required ownrecv db;
|
||||||
setMaxAccessories(uint32 = 0) required ownrecv db;
|
|
||||||
setHatList(uint8[] = []) required ownrecv db;
|
setHatList(uint8[] = []) required ownrecv db;
|
||||||
setGlassesList(uint8[] = []) required ownrecv db;
|
setGlassesList(uint8[] = []) required ownrecv db;
|
||||||
setBackpackList(uint8[] = []) required ownrecv db;
|
setBackpackList(uint8[] = []) required ownrecv db;
|
||||||
|
@ -668,6 +666,7 @@ dclass DistributedToon : DistributedPlayer {
|
||||||
setMaxFishTank(uint8 = 20) required ownrecv db;
|
setMaxFishTank(uint8 = 20) required ownrecv db;
|
||||||
setFishTank(uint8[] = [], uint8[] = [], uint16[] = []) required ownrecv db;
|
setFishTank(uint8[] = [], uint8[] = [], uint16[] = []) required ownrecv db;
|
||||||
setFishingRod(uint8 = 0) required broadcast ownrecv db;
|
setFishingRod(uint8 = 0) required broadcast ownrecv db;
|
||||||
|
setMaxFishingRod(uint8 = 0) required broadcast ownrecv db;
|
||||||
setFishingTrophies(uint8[] = []) required ownrecv db;
|
setFishingTrophies(uint8[] = []) required ownrecv db;
|
||||||
setFlowerCollection(uint8[] = [], uint8[] = []) required ownrecv db;
|
setFlowerCollection(uint8[] = [], uint8[] = []) required ownrecv db;
|
||||||
setFlowerBasket(uint8[] = [], uint8[] = []) required ownrecv db;
|
setFlowerBasket(uint8[] = [], uint8[] = []) required ownrecv db;
|
||||||
|
@ -726,8 +725,9 @@ dclass DistributedToon : DistributedPlayer {
|
||||||
setUnlimitedSwing(uint8) broadcast ownrecv ram;
|
setUnlimitedSwing(uint8) broadcast ownrecv ram;
|
||||||
logSuspiciousEvent(char [0-1024]) ownsend airecv;
|
logSuspiciousEvent(char [0-1024]) ownsend airecv;
|
||||||
forceLogoutWithNotify() ownrecv;
|
forceLogoutWithNotify() ownrecv;
|
||||||
setPinkSlips(uint8 = 0) required ownrecv db;
|
setSpecialInventory(uint8[] = [0, 0]) required ownrecv db;
|
||||||
setNametagStyle(uint8 = 0) required broadcast ownrecv db;
|
setNametagStyle(uint8 = 0) required broadcast ownrecv db;
|
||||||
|
setNametagStyles(uint8[] = [0]) required broadcast ownrecv db;
|
||||||
setMail(simpleMail []) ownrecv;
|
setMail(simpleMail []) ownrecv;
|
||||||
setNumMailItems(uint32) airecv;
|
setNumMailItems(uint32) airecv;
|
||||||
setSimpleMailNotify(uint8) ownrecv airecv;
|
setSimpleMailNotify(uint8) ownrecv airecv;
|
||||||
|
@ -745,8 +745,14 @@ dclass DistributedToon : DistributedPlayer {
|
||||||
setBuffs(uint32[] = []) required ownrecv db;
|
setBuffs(uint32[] = []) required ownrecv db;
|
||||||
setRedeemedCodes(string [] = []) required ownrecv db;
|
setRedeemedCodes(string [] = []) required ownrecv db;
|
||||||
setEmblems(uint32[] = [0, 0]) required ownrecv db;
|
setEmblems(uint32[] = [0, 0]) required ownrecv db;
|
||||||
setTrueFriends(uint32[] = []) required clsend ownrecv db;
|
setTrueFriends(uint32[] = []) required ownrecv db;
|
||||||
setNextKnockHeal(uint32) ram airecv;
|
setNextKnockHeal(uint32) ram airecv;
|
||||||
|
setTFRequest(uint32[] = [0, 0]) ram airecv;
|
||||||
|
setEPP(uint8[] = []) required ownrecv db;
|
||||||
|
setStats(uint32[] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) required ownrecv db;
|
||||||
|
requestNametagStyle(uint8) airecv ownsend;
|
||||||
|
requestFishingRod(uint8) airecv ownsend;
|
||||||
|
wipeStats() airecv ownsend;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedPartyGate : DistributedObject {
|
dclass DistributedPartyGate : DistributedObject {
|
||||||
|
@ -773,9 +779,6 @@ dclass DistributedTrolley : DistributedObject {
|
||||||
setMinigameZone(uint32, uint16);
|
setMinigameZone(uint32, uint16);
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedPillow : DistributedObject {
|
|
||||||
};
|
|
||||||
|
|
||||||
dclass DistributedSuitPlanner : DistributedObject {
|
dclass DistributedSuitPlanner : DistributedObject {
|
||||||
setZoneId(uint32) required broadcast ram;
|
setZoneId(uint32) required broadcast ram;
|
||||||
suitListQuery() airecv clsend;
|
suitListQuery() airecv clsend;
|
||||||
|
@ -830,6 +833,7 @@ dclass DistributedBossCog : DistributedNode {
|
||||||
setToonIds(uint32[], uint32[], uint32[]) broadcast ram;
|
setToonIds(uint32[], uint32[], uint32[]) broadcast ram;
|
||||||
setBattleIds(uint8, uint32, uint32) broadcast ram;
|
setBattleIds(uint8, uint32, uint32) broadcast ram;
|
||||||
setArenaSide(uint8) broadcast ram;
|
setArenaSide(uint8) broadcast ram;
|
||||||
|
setKeyReward(bool) required broadcast ram;
|
||||||
avatarEnter() airecv clsend;
|
avatarEnter() airecv clsend;
|
||||||
avatarExit() airecv clsend;
|
avatarExit() airecv clsend;
|
||||||
avatarNearEnter() airecv clsend;
|
avatarNearEnter() airecv clsend;
|
||||||
|
@ -979,6 +983,7 @@ dclass DistributedBattleTutorial : DistributedBattle {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedLevelBattle : DistributedBattle {
|
dclass DistributedLevelBattle : DistributedBattle {
|
||||||
|
announceCrateReward() broadcast;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedBattleFactory : DistributedLevelBattle {
|
dclass DistributedBattleFactory : DistributedLevelBattle {
|
||||||
|
@ -1216,45 +1221,41 @@ struct decorItem {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct lawnItem {
|
struct lawnItem {
|
||||||
int8 plot;
|
|
||||||
uint8 type;
|
uint8 type;
|
||||||
uint8 species;
|
uint8 hardPoint;
|
||||||
uint8 variety;
|
|
||||||
int8 waterLevel;
|
int8 waterLevel;
|
||||||
int8 growthLevel;
|
int8 growthLevel;
|
||||||
uint16 optional;
|
uint16 optional;
|
||||||
uint64 plantedAt;
|
|
||||||
uint64 wateredAt;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedEstate : DistributedObject {
|
dclass DistributedEstate : DistributedObject {
|
||||||
setEstateReady() broadcast;
|
setEstateReady() broadcast;
|
||||||
setClientReady() airecv clsend;
|
setClientReady() airecv clsend;
|
||||||
|
setEstateType(uint8 type = 0) required broadcast db;
|
||||||
setClosestHouse(uint8) airecv clsend;
|
setClosestHouse(uint8) airecv clsend;
|
||||||
setTreasureIds(uint32[]) broadcast ram;
|
setTreasureIds(uint32[]) broadcast ram;
|
||||||
requestServerTime() airecv clsend;
|
requestServerTime() airecv clsend;
|
||||||
setServerTime(uint32);
|
setServerTime(uint32);
|
||||||
setDawnTime(uint32) required broadcast ram;
|
setDawnTime(uint32) required broadcast ram;
|
||||||
placeOnGround(uint32) broadcast ram;
|
placeOnGround(uint32) broadcast ram;
|
||||||
setDecorData(lawnItem items[] = []) required airecv db;
|
|
||||||
setLastEpochTimeStamp(uint32 timestamp = 0) required airecv db;
|
setLastEpochTimeStamp(uint32 timestamp = 0) required airecv db;
|
||||||
setRentalTimeStamp(uint32 timestamp = 0) required airecv db;
|
setRentalTimeStamp(uint32 timestamp = 0) required airecv db;
|
||||||
setRentalType(uint8 type = 0) required airecv db;
|
setRentalType(uint8 type = 0) required airecv db;
|
||||||
setSlot0ToonId(uint32 toonId = 0) required airecv db;
|
setSlot0ToonId(uint32 toonId = 0) required airecv db;
|
||||||
setSlot0Items(lawnItem items[] = []) required broadcast ownrecv db;
|
setSlot0Garden(blob g) required airecv db;
|
||||||
setSlot1ToonId(uint32 toonId = 0) required airecv db;
|
setSlot1ToonId(uint32 toonId = 0) required airecv db;
|
||||||
setSlot1Items(lawnItem items[] = []) required broadcast ownrecv db;
|
setSlot1Garden(blob g) required airecv db;
|
||||||
setSlot2ToonId(uint32 toonId = 0) required airecv db;
|
setSlot2ToonId(uint32 toonId = 0) required airecv db;
|
||||||
setSlot2Items(lawnItem items[] = []) required broadcast ownrecv db;
|
setSlot2Garden(blob g) required airecv db;
|
||||||
setSlot3ToonId(uint32 toonId = 0) required airecv db;
|
setSlot3ToonId(uint32 toonId = 0) required airecv db;
|
||||||
setSlot3Items(lawnItem items[] = []) required broadcast ownrecv db;
|
setSlot3Garden(blob g) required airecv db;
|
||||||
setSlot4ToonId(uint32 toonId = 0) required airecv db;
|
setSlot4ToonId(uint32 toonId = 0) required airecv db;
|
||||||
setSlot4Items(lawnItem items[] = []) required broadcast ownrecv db;
|
setSlot4Garden(blob g) required airecv db;
|
||||||
setSlot5ToonId(uint32 toonId = 0) required airecv db;
|
setSlot5ToonId(uint32 toonId = 0) required airecv db;
|
||||||
setSlot5Items(lawnItem items[] = []) required broadcast ownrecv db;
|
setSlot5Garden(blob g) required airecv db;
|
||||||
setIdList(uint32 []) broadcast ram;
|
setIdList(uint32 []) broadcast ram;
|
||||||
completeFlowerSale(uint8) airecv clsend;
|
completeFlowerSale(uint8) airecv clsend;
|
||||||
completeFishSale(uint8) airecv clsend;
|
completeFishSale() airecv clsend;
|
||||||
thankSeller(int8, int8, int8);
|
thankSeller(int8, int8, int8);
|
||||||
awardedTrophy(uint32) broadcast;
|
awardedTrophy(uint32) broadcast;
|
||||||
setClouds(uint8) required broadcast ram;
|
setClouds(uint8) required broadcast ram;
|
||||||
|
@ -1269,6 +1270,7 @@ dclass DistributedHouse : DistributedObject {
|
||||||
setAvatarId(uint32 toonId = 0) required broadcast db;
|
setAvatarId(uint32 toonId = 0) required broadcast db;
|
||||||
setName(string toonName = "") required broadcast db;
|
setName(string toonName = "") required broadcast db;
|
||||||
setColor(uint8 colorIndex = 0) required broadcast db;
|
setColor(uint8 colorIndex = 0) required broadcast db;
|
||||||
|
setGender(uint8 = 0) required broadcast db;
|
||||||
setAtticItems(blob = "") required db;
|
setAtticItems(blob = "") required db;
|
||||||
setInteriorItems(blob = "") required db;
|
setInteriorItems(blob = "") required db;
|
||||||
setAtticWallpaper(blob = "") required db;
|
setAtticWallpaper(blob = "") required db;
|
||||||
|
@ -1289,8 +1291,7 @@ dclass DistributedHouseInterior : DistributedObject {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedGarden : DistributedObject {
|
dclass DistributedGarden : DistributedObject {
|
||||||
sendNewProp(uint8, int16/10, int16/10, int16/10) broadcast;
|
sendNewProp(uint8 prop, int16/10 x, int16/10 y, int16/10 z) broadcast;
|
||||||
setProps(uint8[]) airecv clsend;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedParty : DistributedObject {
|
dclass DistributedParty : DistributedObject {
|
||||||
|
@ -1470,23 +1471,6 @@ dclass DeleteManager : DistributedObject {
|
||||||
setInventory(blob) airecv clsend;
|
setInventory(blob) airecv clsend;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass GroupManager : DistributedObject {
|
|
||||||
setChildId() clsend airecv;
|
|
||||||
isPlayerGrouped(uint32);
|
|
||||||
isInGroup(uint32, uint32);
|
|
||||||
updateInfo() clsend airecv;
|
|
||||||
requestInfo() broadcast ram;
|
|
||||||
getTypeFromId(uint32);
|
|
||||||
setGroups(string) broadcast ram;
|
|
||||||
getGroups();
|
|
||||||
setGroupPlayers(string) broadcast ram;
|
|
||||||
getGroupPlayers(uint32);
|
|
||||||
createGroup(uint32, string) clsend airecv;
|
|
||||||
closeGroup(uint32) clsend airecv;
|
|
||||||
addPlayerToGroup(uint32, uint32) clsend airecv;
|
|
||||||
removePlayerFromGroup(uint32, uint32) clsend airecv;
|
|
||||||
};
|
|
||||||
|
|
||||||
dclass NewsManager : DistributedObject {
|
dclass NewsManager : DistributedObject {
|
||||||
startHoliday(uint8) broadcast;
|
startHoliday(uint8) broadcast;
|
||||||
endHoliday(uint8) broadcast;
|
endHoliday(uint8) broadcast;
|
||||||
|
@ -1730,10 +1714,10 @@ dclass DistributedHouseDoor : DistributedDoor {
|
||||||
dclass DistributedCogHQDoor : DistributedDoor {
|
dclass DistributedCogHQDoor : DistributedDoor {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedCogHQExteriorDoor : DistributedCogHQDoor {
|
//dclass DistributedCogHQExteriorDoor : DistributedCogHQDoor {
|
||||||
selectLobby(uint32) broadcast;
|
// selectLobby(uint32) broadcast;
|
||||||
confirmEntrance(uint32, bool) airecv clsend;
|
// confirmEntrance(uint32, bool) airecv clsend;
|
||||||
};
|
//};
|
||||||
|
|
||||||
dclass DistributedSellbotHQDoor : DistributedCogHQDoor {
|
dclass DistributedSellbotHQDoor : DistributedCogHQDoor {
|
||||||
informPlayer(uint8) broadcast ram;
|
informPlayer(uint8) broadcast ram;
|
||||||
|
@ -1760,13 +1744,6 @@ dclass DistributedNPCToon : DistributedNPCToonBase {
|
||||||
chooseTrack(int8) airecv clsend;
|
chooseTrack(int8) airecv clsend;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedSmartNPC : DistributedNPCToonBase {
|
|
||||||
greet(uint32, uint32) broadcast ram;
|
|
||||||
talkMessage(uint32, string) airecv clsend;
|
|
||||||
respond(uint32, string, uint32) broadcast ram;
|
|
||||||
dismiss(uint32, uint16) broadcast ram;
|
|
||||||
};
|
|
||||||
|
|
||||||
dclass DistributedNPCSpecialQuestGiver : DistributedNPCToonBase {
|
dclass DistributedNPCSpecialQuestGiver : DistributedNPCToonBase {
|
||||||
setMovie(uint8, uint32, uint32, uint16[], int16) broadcast ram;
|
setMovie(uint8, uint32, uint32, uint16[], int16) broadcast ram;
|
||||||
setMovieDone() airecv clsend;
|
setMovieDone() airecv clsend;
|
||||||
|
@ -1781,8 +1758,8 @@ dclass DistributedNPCScientist : DistributedNPCToonBase {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedNPCClerk : DistributedNPCToonBase {
|
dclass DistributedNPCClerk : DistributedNPCToonBase {
|
||||||
setMovie(uint8, uint32, uint32, int16) broadcast ram;
|
setState(uint32, uint8) broadcast airecv clsend;
|
||||||
setInventory(blob, int16, uint8) airecv clsend;
|
setInventory(blob, int16) airecv clsend;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedNPCTailor : DistributedNPCToonBase {
|
dclass DistributedNPCTailor : DistributedNPCToonBase {
|
||||||
|
@ -1822,9 +1799,8 @@ dclass DistributedNPCKartClerk : DistributedNPCToonBase {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedNPCLaffRestock : DistributedNPCToonBase {
|
dclass DistributedNPCLaffRestock : DistributedNPCToonBase {
|
||||||
setMovie(uint8, uint32, uint32, uint32[], int16) broadcast ram;
|
restock(uint8) airecv clsend;
|
||||||
restock(uint32, uint16, uint16) airecv clsend;
|
restockResult(uint8) broadcast;
|
||||||
transactionDone() airecv clsend;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedNPCGlove : DistributedNPCToonBase {
|
dclass DistributedNPCGlove : DistributedNPCToonBase {
|
||||||
|
@ -1860,7 +1836,6 @@ dclass DistributedElevator : DistributedObject {
|
||||||
requestExit() airecv clsend;
|
requestExit() airecv clsend;
|
||||||
setElevatorTripId(uint32) required broadcast ram;
|
setElevatorTripId(uint32) required broadcast ram;
|
||||||
setAntiShuffle(uint8) required broadcast ram;
|
setAntiShuffle(uint8) required broadcast ram;
|
||||||
setMinLaff(uint8) required broadcast ram;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedElevatorFSM : DistributedObject {
|
dclass DistributedElevatorFSM : DistributedObject {
|
||||||
|
@ -1887,7 +1862,6 @@ dclass DistributedElevatorFSM : DistributedObject {
|
||||||
requestExit() airecv clsend;
|
requestExit() airecv clsend;
|
||||||
setElevatorTripId(uint32) required broadcast ram;
|
setElevatorTripId(uint32) required broadcast ram;
|
||||||
setAntiShuffle(uint8) required broadcast ram;
|
setAntiShuffle(uint8) required broadcast ram;
|
||||||
setMinLaff(uint8) required broadcast ram;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedElevatorFloor : DistributedElevatorFSM {
|
dclass DistributedElevatorFloor : DistributedElevatorFSM {
|
||||||
|
@ -1963,7 +1937,7 @@ dclass DistributedBoardingParty : DistributedObject {
|
||||||
postSizeReject(uint32, uint32, uint32) broadcast;
|
postSizeReject(uint32, uint32, uint32) broadcast;
|
||||||
postInviteAccepted(uint32) broadcast;
|
postInviteAccepted(uint32) broadcast;
|
||||||
postInviteDelcined(uint32) broadcast;
|
postInviteDelcined(uint32) broadcast;
|
||||||
postInviteNotQualify(uint32, int8, uint32) broadcast;
|
postInviteNotQualify(uint32, int8) broadcast;
|
||||||
postAlreadyInGroup() broadcast;
|
postAlreadyInGroup() broadcast;
|
||||||
postGroupDissolve(uint32, uint32, uint32 [], uint8) broadcast;
|
postGroupDissolve(uint32, uint32, uint32 [], uint8) broadcast;
|
||||||
postMessageAcceptanceFailed(uint32, int8) broadcast;
|
postMessageAcceptanceFailed(uint32, int8) broadcast;
|
||||||
|
@ -2093,6 +2067,25 @@ dclass DistributedPhone : DistributedFurnitureItem {
|
||||||
requestGiftPurchaseMessage(uint16, uint32, blob, int32) airecv clsend;
|
requestGiftPurchaseMessage(uint16, uint32, blob, int32) airecv clsend;
|
||||||
requestGiftPurchaseResponse(uint16, int8);
|
requestGiftPurchaseResponse(uint16, int8);
|
||||||
purchaseItemComplete();
|
purchaseItemComplete();
|
||||||
|
requestGiftAvatar(uint32) airecv clsend;
|
||||||
|
setGiftAvatar(blob);
|
||||||
|
};
|
||||||
|
|
||||||
|
dclass DistributedRewardCrate : DistributedFurnitureItem {
|
||||||
|
requestKeyUsage() airecv clsend;
|
||||||
|
useKeyResponse(uint8, uint32);
|
||||||
|
};
|
||||||
|
|
||||||
|
dclass DistributedChair : DistributedFurnitureItem {
|
||||||
|
setAvId(uint32) broadcast ram;
|
||||||
|
requestSit(uint8) airecv clsend;
|
||||||
|
setStatus(uint8) broadcast ram;
|
||||||
|
};
|
||||||
|
|
||||||
|
dclass DistributedTV : DistributedFurnitureItem {
|
||||||
|
setVideo(string(0-255), uint32) required broadcast ram;
|
||||||
|
requestVideo(string(0-255)) airecv clsend;
|
||||||
|
requestVideoResponse(uint8);
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedFireworkShow : DistributedObject {
|
dclass DistributedFireworkShow : DistributedObject {
|
||||||
|
@ -2560,27 +2553,24 @@ dclass DistributedLawbotChair : DistributedObject {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedLawnDecor : DistributedNode {
|
dclass DistributedLawnDecor : DistributedNode {
|
||||||
setEstate(uint32) required broadcast ram;
|
|
||||||
setPlot(int8) required broadcast ram;
|
setPlot(int8) required broadcast ram;
|
||||||
setHeading(int16/10) required broadcast ram;
|
setHeading(int16/10) required broadcast ram;
|
||||||
setPosition(int16/10, int16/10, int16/10) required broadcast ram;
|
|
||||||
setOwnerIndex(int8) required broadcast ram;
|
setOwnerIndex(int8) required broadcast ram;
|
||||||
|
setPosition(int16/10, int16/10, int16/10) required broadcast ram;
|
||||||
plotEntered() airecv clsend;
|
plotEntered() airecv clsend;
|
||||||
removeItem(uint32) airecv clsend;
|
removeItem() airecv clsend;
|
||||||
setMovie(uint8, uint32) broadcast ram;
|
setMovie(uint8, uint32) broadcast ram;
|
||||||
movieDone() airecv clsend;
|
movieDone() airecv clsend;
|
||||||
interactionDenied(uint32) broadcast ram;
|
interactionDenied(uint32) broadcast ram;
|
||||||
|
setBoxDoId(uint32, uint8) broadcast ram;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedGardenPlot : DistributedLawnDecor {
|
dclass DistributedGardenPlot : DistributedLawnDecor {
|
||||||
plantedItem(uint32) broadcast ram;
|
plantFlower(uint8, uint8) airecv clsend;
|
||||||
finishPlanting(uint32) airecv clsend;
|
plantGagTree(uint8, uint8) airecv clsend;
|
||||||
finishRemoving(uint32) airecv clsend;
|
plantStatuary(uint8) airecv clsend;
|
||||||
plantFlower(uint8, uint8, uint32) airecv clsend;
|
plantToonStatuary(uint8, uint16) airecv clsend;
|
||||||
plantGagTree(uint8, uint8, uint32) airecv clsend;
|
plantNothing(uint8) airecv clsend;
|
||||||
plantStatuary(uint8, uint32) airecv clsend;
|
|
||||||
plantToonStatuary(uint8, uint16, uint32) airecv clsend;
|
|
||||||
plantNothing(uint8, uint32) airecv clsend;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedGardenBox : DistributedLawnDecor {
|
dclass DistributedGardenBox : DistributedLawnDecor {
|
||||||
|
@ -2588,7 +2578,6 @@ dclass DistributedGardenBox : DistributedLawnDecor {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedStatuary : DistributedLawnDecor {
|
dclass DistributedStatuary : DistributedLawnDecor {
|
||||||
setOwnerPlot(uint32) required broadcast ram;
|
|
||||||
setTypeIndex(uint8) required broadcast ram;
|
setTypeIndex(uint8) required broadcast ram;
|
||||||
setWaterLevel(int8) required broadcast ram;
|
setWaterLevel(int8) required broadcast ram;
|
||||||
setGrowthLevel(int8) required broadcast ram;
|
setGrowthLevel(int8) required broadcast ram;
|
||||||
|
@ -2606,11 +2595,10 @@ dclass DistributedChangingStatuary : DistributedStatuary {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedPlantBase : DistributedLawnDecor {
|
dclass DistributedPlantBase : DistributedLawnDecor {
|
||||||
setOwnerPlot(uint32) required broadcast ram;
|
|
||||||
setTypeIndex(uint8) required broadcast ram;
|
setTypeIndex(uint8) required broadcast ram;
|
||||||
setWaterLevel(int8) required broadcast ram;
|
setWaterLevel(int8) required broadcast ram;
|
||||||
setGrowthLevel(int8) required broadcast ram;
|
setGrowthLevel(int8) required broadcast ram;
|
||||||
waterPlant(uint32) airecv clsend;
|
waterPlant() airecv clsend;
|
||||||
waterPlantDone() airecv clsend;
|
waterPlantDone() airecv clsend;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2621,7 +2609,8 @@ dclass DistributedFlower : DistributedPlantBase {
|
||||||
|
|
||||||
dclass DistributedGagTree : DistributedPlantBase {
|
dclass DistributedGagTree : DistributedPlantBase {
|
||||||
setWilted(int8) required broadcast ram;
|
setWilted(int8) required broadcast ram;
|
||||||
requestHarvest(uint32) airecv clsend;
|
setFruiting(bool) required broadcast ram;
|
||||||
|
requestHarvest() airecv clsend;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct golfData {
|
struct golfData {
|
||||||
|
@ -3044,34 +3033,34 @@ dclass DistributedFindFour : DistributedNode {
|
||||||
tie() broadcast;
|
tie() broadcast;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedLobbyManager : DistributedObject {
|
//dclass DistributedLobbyManager : DistributedObject {
|
||||||
addLobby(uint32, uint32, string, string, int8, int8, activity [], decoration [], uint32[], uint16);
|
// addLobby(uint32, uint32, string, string, int8, int8, activity [], decoration [], uint32[], uint16);
|
||||||
addLobbyRequest(uint32) airecv clsend;
|
// addLobbyRequest(uint32) airecv clsend;
|
||||||
addLobbyResponse(uint32, int8);
|
// addLobbyResponse(uint32, int8);
|
||||||
addLobbyResponseUdToAi(uint64, int8, lobby) airecv;
|
// addLobbyResponseUdToAi(uint64, int8, lobby) airecv;
|
||||||
|
|
||||||
getLobbyZone(uint32, uint32, uint8) clsend airecv;
|
// getLobbyZone(uint32, uint32, uint8) clsend airecv;
|
||||||
receiveLobbyZone(uint32, uint64, uint32);
|
// receiveLobbyZone(uint32, uint64, uint32);
|
||||||
freeZoneIdFromCreatedLobby(uint32, uint32) clsend airecv;
|
// freeZoneIdFromCreatedLobby(uint32, uint32) clsend airecv;
|
||||||
|
|
||||||
sendAvToPlayground(uint32, uint8);
|
// sendAvToPlayground(uint32, uint8);
|
||||||
exitParty(uint32) clsend airecv;
|
// exitParty(uint32) clsend airecv;
|
||||||
|
|
||||||
toonHasEnteredPartyAiToUd(uint32);
|
// toonHasEnteredPartyAiToUd(uint32);
|
||||||
toonHasExitedPartyAiToUd(uint32);
|
// toonHasExitedPartyAiToUd(uint32);
|
||||||
|
|
||||||
lobbyManagerAIStartingUp(uint32, uint32);
|
// lobbyManagerAIStartingUp(uint32, uint32);
|
||||||
lobbyManagerAIGoingDown(uint32, uint32);
|
// lobbyManagerAIGoingDown(uint32, uint32);
|
||||||
lobbyHasFinishedUdToAllAi(uint64 lobbyId) airecv;
|
// lobbyHasFinishedUdToAllAi(uint64 lobbyId) airecv;
|
||||||
|
|
||||||
requestShardIdZoneIdForHostId(uint32) clsend airecv;
|
// requestShardIdZoneIdForHostId(uint32) clsend airecv;
|
||||||
sendShardIdZoneIdToAvatar(uint32, uint32);
|
// sendShardIdZoneIdToAvatar(uint32, uint32);
|
||||||
|
|
||||||
lobbyManagerUdStartingUp() airecv;
|
// lobbyManagerUdStartingUp() airecv;
|
||||||
lobbyManagerUdLost() airecv;
|
// lobbyManagerUdLost() airecv;
|
||||||
|
|
||||||
receiveId(uint64 ids[]) airecv;
|
// receiveId(uint64 ids[]) airecv;
|
||||||
};
|
//};
|
||||||
|
|
||||||
dclass DistributedPartyManager : DistributedObject {
|
dclass DistributedPartyManager : DistributedObject {
|
||||||
addParty(uint32, uint32, string, string, int8, int8, activity [], decoration [], uint32[], uint16);
|
addParty(uint32, uint32, string, string, int8, int8, activity [], decoration [], uint32[], uint16);
|
||||||
|
@ -3124,16 +3113,16 @@ dclass DistributedPartyManager : DistributedObject {
|
||||||
receiveId(uint64 ids[]) airecv;
|
receiveId(uint64 ids[]) airecv;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass GlobalLobbyManager : DistributedObjectGlobal {
|
//dclass GlobalLobbyManager : DistributedObjectGlobal {
|
||||||
lobbyManagerAIHello(uint32 channel);
|
// lobbyManagerAIHello(uint32 channel);
|
||||||
queryLobby(uint32 hostId);
|
// queryLobby(uint32 hostId);
|
||||||
addLobby(DoId avId, uint64 lobbyId);
|
// addLobby(DoId avId, uint64 lobbyId);
|
||||||
toonJoinedLobby(uint64 lobbyId, uint32 avId);
|
// toonJoinedLobby(uint64 lobbyId, uint32 avId);
|
||||||
toonLeftLobby(uint64 lobbyId, uint32 avId);
|
// toonLeftLobby(uint64 lobbyId, uint32 avId);
|
||||||
requestLobbySlot(uint64 lobbyId, uint32 avId);
|
// requestLobbySlot(uint64 lobbyId, uint32 avId);
|
||||||
lobbyDone(uint64 lobbyId);
|
// lobbyDone(uint64 lobbyId);
|
||||||
allocIds(uint16 count);
|
// allocIds(uint16 count);
|
||||||
};
|
//};
|
||||||
|
|
||||||
dclass GlobalPartyManager : DistributedObjectGlobal {
|
dclass GlobalPartyManager : DistributedObjectGlobal {
|
||||||
partyManagerAIHello(uint32 channel);
|
partyManagerAIHello(uint32 channel);
|
||||||
|
@ -3188,11 +3177,11 @@ dclass TTCodeRedemptionMgr : DistributedObject {
|
||||||
|
|
||||||
struct Friend
|
struct Friend
|
||||||
{
|
{
|
||||||
uint32 doId;
|
uint32 doId;
|
||||||
string name;
|
string name;
|
||||||
blob dna;
|
blob dna;
|
||||||
uint16 adminAccess;
|
uint16 adminAccess;
|
||||||
uint32 petId;
|
uint32 petId;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass TTSFriendsManager : DistributedObjectGlobal {
|
dclass TTSFriendsManager : DistributedObjectGlobal {
|
||||||
|
|
0
dependencies/astron/libeay32.dll
vendored
Normal file → Executable file
0
dependencies/astron/libeay32.dll
vendored
Normal file → Executable file
0
dependencies/astron/msvcp120.dll
vendored
Normal file → Executable file
0
dependencies/astron/msvcp120.dll
vendored
Normal file → Executable file
0
dependencies/astron/msvcr120.dll
vendored
Normal file → Executable file
0
dependencies/astron/msvcr120.dll
vendored
Normal file → Executable file
0
dependencies/astron/prod/start-ai-server.sh
vendored
Normal file → Executable file
0
dependencies/astron/prod/start-ai-server.sh
vendored
Normal file → Executable file
0
dependencies/astron/prod/start-astron-cluster.sh
vendored
Normal file → Executable file
0
dependencies/astron/prod/start-astron-cluster.sh
vendored
Normal file → Executable file
0
dependencies/astron/prod/start-uberdog-server.sh
vendored
Normal file → Executable file
0
dependencies/astron/prod/start-uberdog-server.sh
vendored
Normal file → Executable file
0
dependencies/astron/ssleay32.dll
vendored
Normal file → Executable file
0
dependencies/astron/ssleay32.dll
vendored
Normal file → Executable file
1
dependencies/config/general.prc
vendored
1
dependencies/config/general.prc
vendored
|
@ -99,7 +99,6 @@ want-cogbuildings #t
|
||||||
# Optional:
|
# Optional:
|
||||||
show-total-population #t
|
show-total-population #t
|
||||||
want-mat-all-tailors #t
|
want-mat-all-tailors #t
|
||||||
want-talkative-tyler #f
|
|
||||||
estate-day-night #t
|
estate-day-night #t
|
||||||
want-garden-game #f
|
want-garden-game #f
|
||||||
want-language-selection #t
|
want-language-selection #t
|
||||||
|
|
12
dependencies/config/release/dev.prc
vendored
12
dependencies/config/release/dev.prc
vendored
|
@ -20,7 +20,7 @@ dc-file dependencies/astron/dclass/stride.dc
|
||||||
|
|
||||||
# Core features:
|
# Core features:
|
||||||
want-pets #t
|
want-pets #t
|
||||||
want-parties #t
|
want-parties #f
|
||||||
want-cogdominiums #t
|
want-cogdominiums #t
|
||||||
want-lawbot-cogdo #t
|
want-lawbot-cogdo #t
|
||||||
want-anim-props #t
|
want-anim-props #t
|
||||||
|
@ -29,6 +29,8 @@ want-find-four #t
|
||||||
want-chinese-checkers #t
|
want-chinese-checkers #t
|
||||||
want-checkers #t
|
want-checkers #t
|
||||||
want-house-types #t
|
want-house-types #t
|
||||||
|
want-gifting #t
|
||||||
|
want-top-toons #f
|
||||||
|
|
||||||
# Chat:
|
# Chat:
|
||||||
want-whitelist #t
|
want-whitelist #t
|
||||||
|
@ -36,6 +38,12 @@ want-whitelist #t
|
||||||
# Developer options:
|
# Developer options:
|
||||||
show-population #t
|
show-population #t
|
||||||
want-instant-parties #t
|
want-instant-parties #t
|
||||||
|
want-instant-delivery #t
|
||||||
cogdo-pop-factor 1.5
|
cogdo-pop-factor 1.5
|
||||||
cogdo-ratio 0.5
|
cogdo-ratio 0.5
|
||||||
default-directnotify-level info
|
default-directnotify-level info
|
||||||
|
|
||||||
|
# Crates:
|
||||||
|
dont-destroy-crate #t
|
||||||
|
get-key-reward-always #t
|
||||||
|
get-crate-reward-always #t
|
0
dependencies/libpandadna.pyd
vendored
Normal file → Executable file
0
dependencies/libpandadna.pyd
vendored
Normal file → Executable file
0
dependencies/libpandadna.so
vendored
Normal file → Executable file
0
dependencies/libpandadna.so
vendored
Normal file → Executable file
0
dev/win32/start-ai-server.bat
Normal file → Executable file
0
dev/win32/start-ai-server.bat
Normal file → Executable file
0
dev/win32/start-astron-cluster.bat
Normal file → Executable file
0
dev/win32/start-astron-cluster.bat
Normal file → Executable file
0
dev/win32/start-game.bat
Normal file → Executable file
0
dev/win32/start-game.bat
Normal file → Executable file
0
dev/win32/start-uberdog-server.bat
Normal file → Executable file
0
dev/win32/start-uberdog-server.bat
Normal file → Executable file
|
@ -17,7 +17,6 @@ from otp.nametag.Nametag import Nametag
|
||||||
from otp.nametag.NametagGroup import NametagGroup
|
from otp.nametag.NametagGroup import NametagGroup
|
||||||
from otp.nametag.NametagConstants import *
|
from otp.nametag.NametagConstants import *
|
||||||
|
|
||||||
|
|
||||||
teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport')
|
teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport')
|
||||||
teleportNotify.showTime = True
|
teleportNotify.showTime = True
|
||||||
if config.GetBool('want-teleport-debug', 1):
|
if config.GetBool('want-teleport-debug', 1):
|
||||||
|
@ -27,24 +26,15 @@ def reconsiderAllUnderstandable():
|
||||||
for av in Avatar.ActiveAvatars:
|
for av in Avatar.ActiveAvatars:
|
||||||
av.considerUnderstandable()
|
av.considerUnderstandable()
|
||||||
|
|
||||||
|
|
||||||
class Avatar(Actor, ShadowCaster):
|
class Avatar(Actor, ShadowCaster):
|
||||||
notify = directNotify.newCategory('Avatar')
|
notify = directNotify.newCategory('Avatar')
|
||||||
ActiveAvatars = []
|
ActiveAvatars = []
|
||||||
ManagesNametagAmbientLightChanged = False
|
|
||||||
|
|
||||||
def __init__(self, other = None):
|
def __init__(self, other = None):
|
||||||
self.name = ''
|
|
||||||
try:
|
|
||||||
self.Avatar_initialized
|
|
||||||
return
|
|
||||||
except:
|
|
||||||
self.Avatar_initialized = 1
|
|
||||||
|
|
||||||
Actor.__init__(self, None, None, other, flattenable=0, setFinal=1)
|
Actor.__init__(self, None, None, other, flattenable=0, setFinal=1)
|
||||||
ShadowCaster.__init__(self)
|
ShadowCaster.__init__(self)
|
||||||
self.__font = OTPGlobals.getInterfaceFont()
|
self.__font = OTPGlobals.getInterfaceFont()
|
||||||
self.__speechFont = OTPGlobals.getInterfaceFont()
|
self.name = ''
|
||||||
self.soundChatBubble = None
|
self.soundChatBubble = None
|
||||||
self.avatarType = ''
|
self.avatarType = ''
|
||||||
self.nametagNodePath = None
|
self.nametagNodePath = None
|
||||||
|
@ -59,18 +49,11 @@ class Avatar(Actor, ShadowCaster):
|
||||||
self.nametag3d = self.attachNewNode('nametag3d')
|
self.nametag3d = self.attachNewNode('nametag3d')
|
||||||
self.nametag3d.setTag('cam', 'nametag')
|
self.nametag3d.setTag('cam', 'nametag')
|
||||||
self.nametag3d.setLightOff()
|
self.nametag3d.setLightOff()
|
||||||
if self.ManagesNametagAmbientLightChanged:
|
|
||||||
self.acceptNametagAmbientLightChange()
|
|
||||||
OTPRender.renderReflection(False, self.nametag3d, 'otp_avatar_nametag', None)
|
|
||||||
self.getGeomNode().showThrough(OTPRender.ShadowCameraBitmask)
|
self.getGeomNode().showThrough(OTPRender.ShadowCameraBitmask)
|
||||||
self.nametag3d.hide(OTPRender.ShadowCameraBitmask)
|
self.nametag3d.hide(OTPRender.ShadowCameraBitmask)
|
||||||
self.collTube = None
|
self.collTube = None
|
||||||
self.battleTube = None
|
|
||||||
self.scale = 1.0
|
self.scale = 1.0
|
||||||
self.nametagScale = 1.0
|
|
||||||
self.height = 0.0
|
self.height = 0.0
|
||||||
self.battleTubeHeight = 0.0
|
|
||||||
self.battleTubeRadius = 0.0
|
|
||||||
self.style = None
|
self.style = None
|
||||||
self.understandable = 1
|
self.understandable = 1
|
||||||
self.setPlayerType(NametagGroup.CCNormal)
|
self.setPlayerType(NametagGroup.CCNormal)
|
||||||
|
@ -91,11 +74,8 @@ class Avatar(Actor, ShadowCaster):
|
||||||
except:
|
except:
|
||||||
self.deleteNametag3d()
|
self.deleteNametag3d()
|
||||||
Actor.cleanup(self)
|
Actor.cleanup(self)
|
||||||
if self.ManagesNametagAmbientLightChanged:
|
|
||||||
self.ignoreNametagAmbientLightChange()
|
|
||||||
self.Avatar_deleted = 1
|
self.Avatar_deleted = 1
|
||||||
del self.__font
|
del self.__font
|
||||||
del self.__speechFont
|
|
||||||
del self.style
|
del self.style
|
||||||
del self.soundChatBubble
|
del self.soundChatBubble
|
||||||
self.nametag.destroy()
|
self.nametag.destroy()
|
||||||
|
@ -104,12 +84,6 @@ class Avatar(Actor, ShadowCaster):
|
||||||
ShadowCaster.delete(self)
|
ShadowCaster.delete(self)
|
||||||
Actor.delete(self)
|
Actor.delete(self)
|
||||||
|
|
||||||
def acceptNametagAmbientLightChange(self):
|
|
||||||
self.accept('nametagAmbientLightChanged', self.nametagAmbientLightChanged)
|
|
||||||
|
|
||||||
def ignoreNametagAmbientLightChange(self):
|
|
||||||
self.ignore('nametagAmbientLightChanged')
|
|
||||||
|
|
||||||
def isLocal(self):
|
def isLocal(self):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -127,7 +101,7 @@ class Avatar(Actor, ShadowCaster):
|
||||||
if self.isUnderstandable():
|
if self.isUnderstandable():
|
||||||
self.nametag.setColorCode(self.playerType)
|
self.nametag.setColorCode(self.playerType)
|
||||||
else:
|
else:
|
||||||
self.nametag.setColorCode(NametagGroup.CCNoChat)
|
self.nametag.setColorCode(NametagGroup.CCNonPlayer)
|
||||||
self.setNametagName()
|
self.setNametagName()
|
||||||
|
|
||||||
def considerUnderstandable(self):
|
def considerUnderstandable(self):
|
||||||
|
@ -136,9 +110,6 @@ class Avatar(Actor, ShadowCaster):
|
||||||
if hasattr(base, 'localAvatar') and (self == base.localAvatar):
|
if hasattr(base, 'localAvatar') and (self == base.localAvatar):
|
||||||
self.understandable = 1
|
self.understandable = 1
|
||||||
self.setPlayerType(NametagGroup.CCNormal)
|
self.setPlayerType(NametagGroup.CCNormal)
|
||||||
elif hasattr(self, 'adminAccess') and self.isAdmin():
|
|
||||||
self.understandable = 2
|
|
||||||
self.setPlayerType(NametagGroup.CCAdmin)
|
|
||||||
elif self.playerType == NametagGroup.CCSuit:
|
elif self.playerType == NametagGroup.CCSuit:
|
||||||
self.understandable = 1
|
self.understandable = 1
|
||||||
self.setPlayerType(NametagGroup.CCSuit)
|
self.setPlayerType(NametagGroup.CCSuit)
|
||||||
|
@ -154,6 +125,8 @@ class Avatar(Actor, ShadowCaster):
|
||||||
else:
|
else:
|
||||||
self.understandable = 0
|
self.understandable = 0
|
||||||
self.setPlayerType(NametagGroup.CCSpeedChat)
|
self.setPlayerType(NametagGroup.CCSpeedChat)
|
||||||
|
if hasattr(self, 'adminAccess') and self.isAdmin():
|
||||||
|
self.understandable = 2
|
||||||
if not hasattr(self, 'nametag'):
|
if not hasattr(self, 'nametag'):
|
||||||
self.notify.warning('no nametag attributed, but would have been used')
|
self.notify.warning('no nametag attributed, but would have been used')
|
||||||
else:
|
else:
|
||||||
|
@ -177,13 +150,6 @@ class Avatar(Actor, ShadowCaster):
|
||||||
self.getGeomNode().setScale(scale)
|
self.getGeomNode().setScale(scale)
|
||||||
self.setHeight(self.height)
|
self.setHeight(self.height)
|
||||||
|
|
||||||
def getNametagScale(self):
|
|
||||||
return self.nametagScale
|
|
||||||
|
|
||||||
def setNametagScale(self, scale):
|
|
||||||
self.nametagScale = scale
|
|
||||||
self.nametag3d.setScale(scale)
|
|
||||||
|
|
||||||
def adjustNametag3d(self, parentScale = 1.0):
|
def adjustNametag3d(self, parentScale = 1.0):
|
||||||
self.nametag3d.setPos(0, 0, self.height + 0.5)
|
self.nametag3d.setPos(0, 0, self.height + 0.5)
|
||||||
|
|
||||||
|
@ -197,8 +163,6 @@ class Avatar(Actor, ShadowCaster):
|
||||||
self.collTube.setPointB(0, 0, height - self.getRadius())
|
self.collTube.setPointB(0, 0, height - self.getRadius())
|
||||||
if self.collNodePath:
|
if self.collNodePath:
|
||||||
self.collNodePath.forceRecomputeBounds()
|
self.collNodePath.forceRecomputeBounds()
|
||||||
if self.battleTube:
|
|
||||||
self.battleTube.setPointB(0, 0, height - self.getRadius())
|
|
||||||
|
|
||||||
def getRadius(self):
|
def getRadius(self):
|
||||||
return OTPGlobals.AvatarDefaultRadius
|
return OTPGlobals.AvatarDefaultRadius
|
||||||
|
@ -245,13 +209,6 @@ class Avatar(Actor, ShadowCaster):
|
||||||
self.__font = font
|
self.__font = font
|
||||||
self.nametag.setFont(font)
|
self.nametag.setFont(font)
|
||||||
|
|
||||||
def getSpeechFont(self):
|
|
||||||
return self.__speechFont
|
|
||||||
|
|
||||||
def setSpeechFont(self, font):
|
|
||||||
self.__speechFont = font
|
|
||||||
self.nametag.setSpeechFont(font)
|
|
||||||
|
|
||||||
def getStyle(self):
|
def getStyle(self):
|
||||||
return self.style
|
return self.style
|
||||||
|
|
||||||
|
@ -349,9 +306,6 @@ class Avatar(Actor, ShadowCaster):
|
||||||
self.nametag.setChat(chatString, chatFlags)
|
self.nametag.setChat(chatString, chatFlags)
|
||||||
self.playCurrentDialogue(dialogue, chatFlags, interrupt)
|
self.playCurrentDialogue(dialogue, chatFlags, interrupt)
|
||||||
|
|
||||||
def setChatMuted(self, chatString, chatFlags, dialogue = None, interrupt = 1, quiet = 0):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def displayTalk(self, chatString):
|
def displayTalk(self, chatString):
|
||||||
if not base.localAvatar.isIgnored(self.doId):
|
if not base.localAvatar.isIgnored(self.doId):
|
||||||
self.clearChat()
|
self.clearChat()
|
||||||
|
@ -364,11 +318,6 @@ class Avatar(Actor, ShadowCaster):
|
||||||
def clearChat(self):
|
def clearChat(self):
|
||||||
self.nametag.clearChat()
|
self.nametag.clearChat()
|
||||||
|
|
||||||
def isInView(self):
|
|
||||||
pos = self.getPos(camera)
|
|
||||||
eyePos = Point3(pos[0], pos[1], pos[2] + self.getHeight())
|
|
||||||
return base.camNode.isInView(eyePos)
|
|
||||||
|
|
||||||
def getNameVisible(self):
|
def getNameVisible(self):
|
||||||
return self.__nameVisible
|
return self.__nameVisible
|
||||||
|
|
||||||
|
@ -539,11 +488,6 @@ class Avatar(Actor, ShadowCaster):
|
||||||
cJoint.clearNetTransforms()
|
cJoint.clearNetTransforms()
|
||||||
cJoint.addNetTransform(nametagNode)
|
cJoint.addNetTransform(nametagNode)
|
||||||
|
|
||||||
def nametagAmbientLightChanged(self, newlight):
|
|
||||||
self.nametag3d.setLightOff()
|
|
||||||
if newlight:
|
|
||||||
self.nametag3d.setLight(newlight)
|
|
||||||
|
|
||||||
def deleteNametag3d(self):
|
def deleteNametag3d(self):
|
||||||
if self.nametagNodePath:
|
if self.nametagNodePath:
|
||||||
self.nametagNodePath.removeNode()
|
self.nametagNodePath.removeNode()
|
||||||
|
@ -615,10 +559,5 @@ def target():
|
||||||
Returns the current Spellbook target.
|
Returns the current Spellbook target.
|
||||||
"""
|
"""
|
||||||
target = spellbook.getTarget()
|
target = spellbook.getTarget()
|
||||||
print 'Called target.'
|
|
||||||
print 'Name: ' + target.getName()
|
return 'Target: %s-%d [%d]' % (target.getName(), int(target.doId), int(target.getAdminAccess()))
|
||||||
doId = str(int(target.doId))
|
|
||||||
print 'doId: ', doId
|
|
||||||
accessLevel = str(int(target.getAdminAccess()))
|
|
||||||
print 'Access Level: ', accessLevel
|
|
||||||
return 'Target: %s-%d [%d]' % (target.getName(), int(target.doId), int(target.getAdminAccess()))
|
|
|
@ -62,6 +62,7 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
||||||
self.sleepFlag = 0
|
self.sleepFlag = 0
|
||||||
self.isDisguised = 0
|
self.isDisguised = 0
|
||||||
self.movingFlag = 0
|
self.movingFlag = 0
|
||||||
|
self.preventCameraDisable = False
|
||||||
self.lastNeedH = None
|
self.lastNeedH = None
|
||||||
self.accept('friendOnline', self.__friendOnline)
|
self.accept('friendOnline', self.__friendOnline)
|
||||||
self.accept('friendOffline', self.__friendOffline)
|
self.accept('friendOffline', self.__friendOffline)
|
||||||
|
@ -73,6 +74,9 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
||||||
self.accept('avatarMoving', self.clearPageUpDown)
|
self.accept('avatarMoving', self.clearPageUpDown)
|
||||||
self.showNametag2d()
|
self.showNametag2d()
|
||||||
self.setPickable(0)
|
self.setPickable(0)
|
||||||
|
|
||||||
|
def setPreventCameraDisable(self, prevent):
|
||||||
|
self.preventCameraDisable = prevent
|
||||||
|
|
||||||
def useSwimControls(self):
|
def useSwimControls(self):
|
||||||
self.controlManager.use('swim', self)
|
self.controlManager.use('swim', self)
|
||||||
|
@ -421,7 +425,7 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
||||||
self.controlManager.setSpeeds(OTPGlobals.ToonForwardSlowSpeed, OTPGlobals.ToonJumpSlowForce, OTPGlobals.ToonReverseSlowSpeed, OTPGlobals.ToonRotateSlowSpeed)
|
self.controlManager.setSpeeds(OTPGlobals.ToonForwardSlowSpeed, OTPGlobals.ToonJumpSlowForce, OTPGlobals.ToonReverseSlowSpeed, OTPGlobals.ToonRotateSlowSpeed)
|
||||||
|
|
||||||
def pageUp(self):
|
def pageUp(self):
|
||||||
if not self.avatarControlsEnabled:
|
if not (self.avatarControlsEnabled or self.preventCameraDisable):
|
||||||
return
|
return
|
||||||
self.wakeUp()
|
self.wakeUp()
|
||||||
if not self.isPageUp:
|
if not self.isPageUp:
|
||||||
|
@ -433,7 +437,7 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
||||||
self.clearPageUpDown()
|
self.clearPageUpDown()
|
||||||
|
|
||||||
def pageDown(self):
|
def pageDown(self):
|
||||||
if not self.avatarControlsEnabled:
|
if not (self.avatarControlsEnabled and self.preventCameraDisable):
|
||||||
return
|
return
|
||||||
self.wakeUp()
|
self.wakeUp()
|
||||||
if not self.isPageDown:
|
if not self.isPageDown:
|
||||||
|
@ -452,7 +456,7 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
||||||
self.setCameraPositionByIndex(self.cameraIndex)
|
self.setCameraPositionByIndex(self.cameraIndex)
|
||||||
|
|
||||||
def nextCameraPos(self, forward):
|
def nextCameraPos(self, forward):
|
||||||
if not self.avatarControlsEnabled:
|
if not (self.avatarControlsEnabled or self.preventCameraDisable):
|
||||||
return
|
return
|
||||||
self.wakeUp()
|
self.wakeUp()
|
||||||
self.__cameraHasBeenMoved = 1
|
self.__cameraHasBeenMoved = 1
|
||||||
|
@ -465,6 +469,10 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
||||||
if self.cameraIndex < 0:
|
if self.cameraIndex < 0:
|
||||||
self.cameraIndex = len(self.cameraPositions) - 1
|
self.cameraIndex = len(self.cameraPositions) - 1
|
||||||
self.setCameraPositionByIndex(self.cameraIndex)
|
self.setCameraPositionByIndex(self.cameraIndex)
|
||||||
|
|
||||||
|
def setCameraPosition(self, index):
|
||||||
|
self.cameraIndex = index
|
||||||
|
self.setCameraPositionByIndex(index)
|
||||||
|
|
||||||
def initCameraPositions(self):
|
def initCameraPositions(self):
|
||||||
camHeight = self.getClampedAvatarHeight()
|
camHeight = self.getClampedAvatarHeight()
|
||||||
|
|
|
@ -1,40 +1,83 @@
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
|
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
|
||||||
|
from direct.distributed.PyDatagram import PyDatagram
|
||||||
|
from direct.distributed.MsgTypes import *
|
||||||
from otp.distributed import OtpDoGlobals
|
from otp.distributed import OtpDoGlobals
|
||||||
|
from toontown.toonbase import TTLocalizer
|
||||||
|
|
||||||
|
BLACKLIST = TTLocalizer.Blacklist
|
||||||
|
OFFENSE_MSGS = ('-- DEV CHAT -- word blocked: %s', 'Watch your language! This is your first offense. You said "%s".',
|
||||||
|
'Watch your language! This is your second offense. Next offense you\'ll get banned for 24 hours. You said "%s".')
|
||||||
|
|
||||||
class ChatAgentUD(DistributedObjectGlobalUD):
|
class ChatAgentUD(DistributedObjectGlobalUD):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory("ChatAgentUD")
|
notify = DirectNotifyGlobal.directNotify.newCategory('ChatAgentUD')
|
||||||
|
WantWhitelist = config.GetBool('want-whitelist', True)
|
||||||
def announceGenerate(self):
|
|
||||||
DistributedObjectGlobalUD.announceGenerate(self)
|
chatMode2channel = {
|
||||||
|
|
||||||
self.chatMode2channel = {
|
|
||||||
1 : OtpDoGlobals.OTP_MOD_CHANNEL,
|
1 : OtpDoGlobals.OTP_MOD_CHANNEL,
|
||||||
2 : OtpDoGlobals.OTP_ADMIN_CHANNEL,
|
2 : OtpDoGlobals.OTP_ADMIN_CHANNEL,
|
||||||
3 : OtpDoGlobals.OTP_SYSADMIN_CHANNEL,
|
3 : OtpDoGlobals.OTP_SYSADMIN_CHANNEL,
|
||||||
}
|
}
|
||||||
self.chatMode2prefix = {
|
chatMode2prefix = {
|
||||||
1 : "[MOD] ",
|
1 : "[MOD] ",
|
||||||
2 : "[ADMIN] ",
|
2 : "[ADMIN] ",
|
||||||
3 : "[SYSADMIN] ",
|
3 : "[SYSADMIN] ",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def announceGenerate(self):
|
||||||
|
DistributedObjectGlobalUD.announceGenerate(self)
|
||||||
|
|
||||||
|
self.offenses = {}
|
||||||
|
|
||||||
def chatMessage(self, message, chatMode):
|
def chatMessage(self, message, chatMode):
|
||||||
sender = self.air.getAvatarIdFromSender()
|
sender = self.air.getAvatarIdFromSender()
|
||||||
|
|
||||||
if sender == 0:
|
if sender == 0:
|
||||||
self.air.writeServerEvent('suspicious', accId=self.air.getAccountIdFromSender(),
|
self.air.writeServerEvent('suspicious', self.air.getAccountIdFromSender(),
|
||||||
issue='Account sent chat without an avatar', message=message)
|
'Account sent chat without an avatar', message)
|
||||||
return
|
return
|
||||||
|
|
||||||
self.air.writeServerEvent('chat-said', avId=sender, chatMode=chatMode, msg=message)
|
if chatMode == 0:
|
||||||
|
if self.detectBadWords(self.air.getMsgSender(), message):
|
||||||
if chatMode != 0:
|
return
|
||||||
if message.startswith('.'):
|
|
||||||
message = '.' + self.chatMode2prefix.get(chatMode, "") + message[1:]
|
self.air.writeServerEvent('chat-said', sender, message)
|
||||||
else:
|
|
||||||
message = self.chatMode2prefix.get(chatMode, "") + message
|
|
||||||
|
|
||||||
DistributedAvatar = self.air.dclassesByName['DistributedAvatarUD']
|
DistributedAvatar = self.air.dclassesByName['DistributedAvatarUD']
|
||||||
dg = DistributedAvatar.aiFormatUpdate('setTalk', sender, self.chatMode2channel.get(chatMode, sender), self.air.ourChannel, [message])
|
dg = DistributedAvatar.aiFormatUpdate('setTalk', sender, sender,
|
||||||
|
self.air.ourChannel,
|
||||||
|
[message])
|
||||||
self.air.send(dg)
|
self.air.send(dg)
|
||||||
|
|
||||||
|
def detectBadWords(self, sender, message):
|
||||||
|
words = message.split()
|
||||||
|
print words
|
||||||
|
for word in words:
|
||||||
|
if word.lower() in BLACKLIST:
|
||||||
|
accountId = (sender >> 32) & 0xFFFFFFFF
|
||||||
|
avId = sender & 0xFFFFFFFF
|
||||||
|
|
||||||
|
if not sender in self.offenses:
|
||||||
|
self.offenses[sender] = 0
|
||||||
|
|
||||||
|
if self.air.friendsManager.getToonAccess(avId) < 300:
|
||||||
|
self.offenses[sender] += 1
|
||||||
|
|
||||||
|
if self.offenses[sender] >= 3:
|
||||||
|
msg = 'Banned'
|
||||||
|
|
||||||
|
else:
|
||||||
|
msg = OFFENSE_MSGS[self.offenses[sender]] % word
|
||||||
|
dclass = self.air.dclassesByName['ClientServicesManagerUD']
|
||||||
|
dg = dclass.aiFormatUpdate('systemMessage',
|
||||||
|
OtpDoGlobals.OTP_DO_ID_CLIENT_SERVICES_MANAGER,
|
||||||
|
sender, 1000000, [msg])
|
||||||
|
self.air.send(dg)
|
||||||
|
#self.air.banManager.ban(sender, 2, 'language')
|
||||||
|
|
||||||
|
self.air.writeServerEvent('chat-offense', accountId, word=word, num=self.offenses[sender], msg=msg)
|
||||||
|
if self.offenses[sender] >= 3:
|
||||||
|
del self.offenses[sender]
|
||||||
|
|
||||||
|
return 1
|
||||||
|
|
||||||
|
return 0
|
|
@ -2886,6 +2886,7 @@ WHITELIST = [
|
||||||
'be',
|
'be',
|
||||||
'be-awesome',
|
'be-awesome',
|
||||||
'be-yoink',
|
'be-yoink',
|
||||||
|
'beach',
|
||||||
'beachcombers',
|
'beachcombers',
|
||||||
'beachead',
|
'beachead',
|
||||||
'beached',
|
'beached',
|
||||||
|
@ -9980,6 +9981,7 @@ WHITELIST = [
|
||||||
'deny',
|
'deny',
|
||||||
'denying',
|
'denying',
|
||||||
'deodorant',
|
'deodorant',
|
||||||
|
'deorro',
|
||||||
'depart',
|
'depart',
|
||||||
'departed',
|
'departed',
|
||||||
'departing',
|
'departing',
|
||||||
|
@ -22308,6 +22310,8 @@ WHITELIST = [
|
||||||
'masterly',
|
'masterly',
|
||||||
'masterpiece',
|
'masterpiece',
|
||||||
'masters',
|
'masters',
|
||||||
|
'mastervoltage',
|
||||||
|
'mastervolty',
|
||||||
'mastery',
|
'mastery',
|
||||||
'mat',
|
'mat',
|
||||||
'matata',
|
'matata',
|
||||||
|
@ -30128,6 +30132,7 @@ WHITELIST = [
|
||||||
'sins',
|
'sins',
|
||||||
'sip',
|
'sip',
|
||||||
'sir',
|
'sir',
|
||||||
|
'sirbiscuit',
|
||||||
'siren',
|
'siren',
|
||||||
"siren's",
|
"siren's",
|
||||||
'sirens',
|
'sirens',
|
||||||
|
@ -34728,6 +34733,7 @@ WHITELIST = [
|
||||||
'volleyball',
|
'volleyball',
|
||||||
'voltage',
|
'voltage',
|
||||||
'voltorn',
|
'voltorn',
|
||||||
|
'volty',
|
||||||
'volume',
|
'volume',
|
||||||
"volume's",
|
"volume's",
|
||||||
'volumed',
|
'volumed',
|
||||||
|
@ -36496,6 +36502,7 @@ WHITELIST = [
|
||||||
'zebra',
|
'zebra',
|
||||||
"zebra's",
|
"zebra's",
|
||||||
'zebras',
|
'zebras',
|
||||||
|
'zedd',
|
||||||
'zeddars',
|
'zeddars',
|
||||||
'zeke',
|
'zeke',
|
||||||
'zelda',
|
'zelda',
|
||||||
|
@ -36862,4 +36869,4 @@ WHITELIST = [
|
||||||
'zyyk',
|
'zyyk',
|
||||||
'zzz',
|
'zzz',
|
||||||
'zzzzzs',
|
'zzzzzs',
|
||||||
]
|
]
|
|
@ -1,6 +1,5 @@
|
||||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||||
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
||||||
from toontown.toonbase import ToontownGlobals
|
|
||||||
|
|
||||||
class DistributedDistrictAI(DistributedObjectAI):
|
class DistributedDistrictAI(DistributedObjectAI):
|
||||||
notify = directNotify.newCategory('DistributedDistrictAI')
|
notify = directNotify.newCategory('DistributedDistrictAI')
|
||||||
|
@ -8,16 +7,6 @@ class DistributedDistrictAI(DistributedObjectAI):
|
||||||
name = 'District'
|
name = 'District'
|
||||||
available = 0
|
available = 0
|
||||||
|
|
||||||
def announceGenerate(self):
|
|
||||||
DistributedObjectAI.announceGenerate(self)
|
|
||||||
doId = self.doId - (self.doId % 100000000 % 1000000)
|
|
||||||
self.air.groupManager.shardGroups[doId] = {
|
|
||||||
ToontownGlobals.SellbotHQ: ['VP Group', []],
|
|
||||||
ToontownGlobals.CashbotHQ: ['CFO Group', []],
|
|
||||||
ToontownGlobals.LawbotHQ: ['CJ Group', []],
|
|
||||||
ToontownGlobals.BossbotHQ: ['CEO Group', []],
|
|
||||||
}
|
|
||||||
|
|
||||||
def setName(self, name):
|
def setName(self, name):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
|
|
|
@ -1071,7 +1071,7 @@ class OTPClientRepository(ClientRepositoryBase):
|
||||||
|
|
||||||
for s in self.activeDistrictMap.values():
|
for s in self.activeDistrictMap.values():
|
||||||
if s.available:
|
if s.available:
|
||||||
list.append((s.doId, s.name, s.avatarCount, s.invasionStatus))
|
list.append((s.doId, s.name, s.avatarCount, s.invasionStatus, s.groupAvCount))
|
||||||
|
|
||||||
return list
|
return list
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ OTP_DO_ID_FRIEND_MANAGER = 4501
|
||||||
OTP_DO_ID_TOONTOWN = 1337
|
OTP_DO_ID_TOONTOWN = 1337
|
||||||
OTP_DO_ID_CLIENT_SERVICES_MANAGER = 4665
|
OTP_DO_ID_CLIENT_SERVICES_MANAGER = 4665
|
||||||
OTP_DO_ID_TTS_FRIENDS_MANAGER = 4666
|
OTP_DO_ID_TTS_FRIENDS_MANAGER = 4666
|
||||||
OPT_DO_ID_GROUP_MANAGER = 4667
|
|
||||||
OTP_DO_ID_GLOBAL_PARTY_MANAGER = 4477
|
OTP_DO_ID_GLOBAL_PARTY_MANAGER = 4477
|
||||||
OTP_DO_ID_GLOBAL_LOBBY_MANAGER = 4478
|
OTP_DO_ID_GLOBAL_LOBBY_MANAGER = 4478
|
||||||
OTP_DO_ID_CHAT_MANAGER = 4681
|
OTP_DO_ID_CHAT_MANAGER = 4681
|
||||||
|
|
|
@ -1,19 +1,11 @@
|
||||||
class PotentialAvatar:
|
class PotentialAvatar:
|
||||||
|
|
||||||
def __init__(self, id, names, dna, position, allowedName, creator = 1, shared = 1, online = 0, wishState = 'CLOSED', wishName = '', defaultShard = 0, lastLogout = 0):
|
def __init__(self, id, names, dna, position, allowedName):
|
||||||
self.id = id
|
self.id = id
|
||||||
self.name = names[0]
|
self.name = names[0]
|
||||||
self.dna = dna
|
self.dna = dna
|
||||||
self.avatarType = None
|
|
||||||
self.position = position
|
self.position = position
|
||||||
self.wantName = names[1]
|
self.wantName = names[1]
|
||||||
self.approvedName = names[2]
|
self.approvedName = names[2]
|
||||||
self.rejectedName = names[3]
|
self.rejectedName = names[3]
|
||||||
self.allowedName = allowedName
|
self.allowedName = allowedName
|
||||||
self.wishState = wishState
|
|
||||||
self.wishName = wishName
|
|
||||||
self.creator = creator
|
|
||||||
self.shared = shared
|
|
||||||
self.online = online
|
|
||||||
self.defaultShard = defaultShard
|
|
||||||
self.lastLogout = lastLogout
|
|
||||||
|
|
|
@ -91,3 +91,14 @@ class FriendManager(DistributedObject.DistributedObject):
|
||||||
self.notify.debug('Client: inviteeCancelFriendQuery(%d)' % context)
|
self.notify.debug('Client: inviteeCancelFriendQuery(%d)' % context)
|
||||||
messenger.send('cancelFriendInvitation', [context])
|
messenger.send('cancelFriendInvitation', [context])
|
||||||
self.up_inviteeAcknowledgeCancel(context)
|
self.up_inviteeAcknowledgeCancel(context)
|
||||||
|
|
||||||
|
def requestTFCode(self, callback):
|
||||||
|
self.tfCallback = callback
|
||||||
|
self.sendUpdate('requestTFCode')
|
||||||
|
|
||||||
|
def redeemTFCode(self, code, callback):
|
||||||
|
self.tfCallback = callback
|
||||||
|
self.sendUpdate('redeemTFCode', [code])
|
||||||
|
|
||||||
|
def tfResponse(self, response, code):
|
||||||
|
self.tfCallback(response, code)
|
|
@ -1,5 +1,58 @@
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
||||||
|
from otp.otpbase import OTPGlobals
|
||||||
|
from toontown.toonbase import ToontownGlobals
|
||||||
|
import datetime, uuid, time, string, random
|
||||||
|
|
||||||
|
AVAILABLE_CHARS = string.ascii_lowercase + string.digits
|
||||||
|
|
||||||
|
class AddTrueFriend:
|
||||||
|
|
||||||
|
def __init__(self, manager, av, targetId, code):
|
||||||
|
self.air = manager.air
|
||||||
|
self.manager = manager
|
||||||
|
self.av = av
|
||||||
|
self.targetId = targetId
|
||||||
|
self.code = code
|
||||||
|
|
||||||
|
def start(self):
|
||||||
|
self.air.dbInterface.queryObject(self.air.dbId, self.targetId, self.__gotAvatar)
|
||||||
|
|
||||||
|
def __gotAvatar(self, dclass, fields):
|
||||||
|
dclasses = self.air.dclassesByName['DistributedToonAI']
|
||||||
|
|
||||||
|
if dclass != dclasses:
|
||||||
|
return
|
||||||
|
|
||||||
|
friendsList = fields['setFriendsList'][0]
|
||||||
|
trueFriendsList = fields['setTrueFriends'][0]
|
||||||
|
name = fields['setName'][0]
|
||||||
|
avId = self.av.doId
|
||||||
|
|
||||||
|
if avId in trueFriendsList:
|
||||||
|
self.manager.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_ALREADY_FRIENDS_NAME, name])
|
||||||
|
return
|
||||||
|
elif avId not in friendsList:
|
||||||
|
if len(friendsList) >= OTPGlobals.MaxFriends:
|
||||||
|
self.manager.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_FRIENDS_LIST_FULL_HIM, name])
|
||||||
|
return
|
||||||
|
|
||||||
|
friendsList.append(avId)
|
||||||
|
|
||||||
|
if self.targetId not in self.av.getFriendsList():
|
||||||
|
self.av.extendFriendsList(self.targetId)
|
||||||
|
|
||||||
|
if hasattr(self.manager, 'data'):
|
||||||
|
del self.manager.data[self.code]
|
||||||
|
else:
|
||||||
|
self.air.dbGlobalCursor.tfCodes.remove({'_id': self.code})
|
||||||
|
|
||||||
|
self.av.addTrueFriend(self.targetId)
|
||||||
|
trueFriendsList.append(avId)
|
||||||
|
self.air.send(dclasses.aiFormatUpdate('setFriendsList', self.targetId, self.targetId, self.air.ourChannel, [friendsList]))
|
||||||
|
self.air.send(dclasses.aiFormatUpdate('setTrueFriends', self.targetId, self.targetId, self.air.ourChannel, [trueFriendsList]))
|
||||||
|
self.manager.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_SUCCESS, name])
|
||||||
|
del self.manager.tfFsms[avId]
|
||||||
|
|
||||||
class FriendManagerAI(DistributedObjectAI):
|
class FriendManagerAI(DistributedObjectAI):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory("FriendManagerAI")
|
notify = DirectNotifyGlobal.directNotify.newCategory("FriendManagerAI")
|
||||||
|
@ -9,6 +62,15 @@ class FriendManagerAI(DistributedObjectAI):
|
||||||
self.air = air
|
self.air = air
|
||||||
self.currentContext = 0
|
self.currentContext = 0
|
||||||
self.requests = {}
|
self.requests = {}
|
||||||
|
self.tfFsms = {}
|
||||||
|
self.connectToDatabase()
|
||||||
|
|
||||||
|
def connectToDatabase(self):
|
||||||
|
if not self.air.dbConn:
|
||||||
|
self.notify.warning('Not using mongodb, true friends will be non-persistent')
|
||||||
|
self.data = {}
|
||||||
|
else:
|
||||||
|
self.air.dbGlobalCursor.tfCodes.ensure_index('date', expireAfterSeconds=ToontownGlobals.TF_EXPIRE_SECS)
|
||||||
|
|
||||||
def friendQuery(self, requested):
|
def friendQuery(self, requested):
|
||||||
avId = self.air.getAvatarIdFromSender()
|
avId = self.air.getAvatarIdFromSender()
|
||||||
|
@ -118,3 +180,81 @@ class FriendManagerAI(DistributedObjectAI):
|
||||||
return
|
return
|
||||||
|
|
||||||
del self.requests[context]
|
del self.requests[context]
|
||||||
|
|
||||||
|
def getRandomCharSequence(self, count):
|
||||||
|
return ''.join(random.choice(AVAILABLE_CHARS) for i in xrange(count))
|
||||||
|
|
||||||
|
def getTFCode(self, tryNumber):
|
||||||
|
if tryNumber == ToontownGlobals.MAX_TF_TRIES:
|
||||||
|
return str(uuid.uuid4())
|
||||||
|
|
||||||
|
code = 'TT %s %s' % (self.getRandomCharSequence(3), self.getRandomCharSequence(3))
|
||||||
|
|
||||||
|
if (hasattr(self, 'data') and code in self.data) or (self.air.dbConn and self.air.dbGlobalCursor.tfCodes.find({'_id': code}).count() > 0):
|
||||||
|
return self.getTFCode(tryNumber + 1)
|
||||||
|
|
||||||
|
return code
|
||||||
|
|
||||||
|
def requestTFCode(self):
|
||||||
|
avId = self.air.getAvatarIdFromSender()
|
||||||
|
av = self.air.doId2do.get(avId)
|
||||||
|
|
||||||
|
if not av:
|
||||||
|
return
|
||||||
|
|
||||||
|
tfRequest = av.getTFRequest()
|
||||||
|
|
||||||
|
if tfRequest[1] >= ToontownGlobals.MAX_TF_TRIES and tfRequest[0] >= time.time():
|
||||||
|
self.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_COOLDOWN, ''])
|
||||||
|
return
|
||||||
|
|
||||||
|
code = self.getTFCode(0)
|
||||||
|
|
||||||
|
if hasattr(self, 'data'):
|
||||||
|
self.data[code] = avId
|
||||||
|
else:
|
||||||
|
self.air.dbGlobalCursor.tfCodes.insert({'_id': code, 'date': datetime.datetime.utcnow(), 'avId': avId})
|
||||||
|
|
||||||
|
av.b_setTFRequest((time.time() + ToontownGlobals.TF_COOLDOWN_SECS, tfRequest[1] + 1))
|
||||||
|
self.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_SUCCESS, code])
|
||||||
|
|
||||||
|
def redeemTFCode(self, code):
|
||||||
|
avId = self.air.getAvatarIdFromSender()
|
||||||
|
|
||||||
|
if avId in self.tfFsms:
|
||||||
|
self.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_TOO_FAST, ''])
|
||||||
|
return
|
||||||
|
|
||||||
|
av = self.air.doId2do.get(avId)
|
||||||
|
|
||||||
|
if not av:
|
||||||
|
return
|
||||||
|
|
||||||
|
if hasattr(self, 'data'):
|
||||||
|
if code not in self.data:
|
||||||
|
self.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_UNKNOWN_SECRET, ''])
|
||||||
|
return
|
||||||
|
|
||||||
|
targetId = self.data[code]
|
||||||
|
else:
|
||||||
|
fields = self.air.dbGlobalCursor.tfCodes.find_one({'_id': code})
|
||||||
|
|
||||||
|
if not fields:
|
||||||
|
self.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_UNKNOWN_SECRET, ''])
|
||||||
|
return
|
||||||
|
|
||||||
|
targetId = fields['avId']
|
||||||
|
|
||||||
|
if avId == targetId:
|
||||||
|
self.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_SELF_SECRET, ''])
|
||||||
|
return
|
||||||
|
elif av.isTrueFriends(targetId):
|
||||||
|
self.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_ALREADY_FRIENDS, ''])
|
||||||
|
return
|
||||||
|
elif targetId not in av.getFriendsList() and len(av.getFriendsList()) >= OTPGlobals.MaxFriends:
|
||||||
|
self.sendUpdateToAvatarId(avId, 'tfResponse', [ToontownGlobals.TF_FRIENDS_LIST_FULL_YOU, ''])
|
||||||
|
return
|
||||||
|
|
||||||
|
tfOperation = AddTrueFriend(self, av, targetId, code)
|
||||||
|
tfOperation.start()
|
||||||
|
self.tfFsms[avId] = tfOperation
|
|
@ -9,15 +9,12 @@ CFThought=2
|
||||||
CFTimeout=8
|
CFTimeout=8
|
||||||
|
|
||||||
CCNormal = 0
|
CCNormal = 0
|
||||||
CCNoChat = 1
|
CCNonPlayer = 1
|
||||||
CCNonPlayer = 2
|
CCSuit = 2
|
||||||
CCSuit = 3
|
CCToonBuilding = 3
|
||||||
CCToonBuilding = 4
|
CCSuitBuilding = 4
|
||||||
CCSuitBuilding = 5
|
CCHouseBuilding = 5
|
||||||
CCHouseBuilding = 6
|
CCSpeedChat = 6
|
||||||
CCSpeedChat = 7
|
|
||||||
CCFreeChat = 8
|
|
||||||
CCAdmin = 9
|
|
||||||
|
|
||||||
NAMETAG_COLORS = {
|
NAMETAG_COLORS = {
|
||||||
CCNormal: (
|
CCNormal: (
|
||||||
|
@ -34,20 +31,6 @@ NAMETAG_COLORS = {
|
||||||
((0.3, 0.3, 0.7, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
((0.3, 0.3, 0.7, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||||
),
|
),
|
||||||
CCNoChat: (
|
|
||||||
# Normal FG BG
|
|
||||||
((0.8, 0.4, 0.0, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
|
||||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
# Click FG BG
|
|
||||||
((1.0, 0.5, 0.5, 1.0), (0.2, 0.2, 0.2, 0.6), # Name
|
|
||||||
(1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
# Hover FG BG
|
|
||||||
((1.0, 0.5, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0), # Name
|
|
||||||
(0.0, 0.6, 0.6, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
# Disable FG BG
|
|
||||||
((0.8, 0.4, 0.0, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
|
||||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
),
|
|
||||||
CCNonPlayer: (
|
CCNonPlayer: (
|
||||||
# Normal FG BG
|
# Normal FG BG
|
||||||
((0.8, 0.4, 0.0, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
((0.8, 0.4, 0.0, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||||
|
@ -131,35 +114,7 @@ NAMETAG_COLORS = {
|
||||||
# Disable FG BG
|
# Disable FG BG
|
||||||
((0.0, 0.6, 0.2, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
((0.0, 0.6, 0.2, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||||
),
|
)
|
||||||
CCFreeChat: (
|
|
||||||
# Normal FG BG
|
|
||||||
((0.3, 0.3, 0.7, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
|
||||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
# Click FG BG
|
|
||||||
((0.2, 0.2, 0.5, 1.0), (0.2, 0.2, 0.2, 0.6), # Name
|
|
||||||
(1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
# Hover FG BG
|
|
||||||
((0.5, 0.5, 1.0, 1.0), (1.0, 1.0, 1.0, 1.0), # Name
|
|
||||||
(0.0, 0.6, 0.6, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
# Disable FG BG
|
|
||||||
((0.3, 0.3, 0.7, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
|
||||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
),
|
|
||||||
CCAdmin: (
|
|
||||||
# Normal FG BG
|
|
||||||
((1.0, 0.35, 0.25, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
|
||||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
# Click FG BG
|
|
||||||
((1.0, 0.35, 0.25, 1.0), (0.2, 0.2, 0.2, 0.6), # Name
|
|
||||||
(1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
# Hover FG BG
|
|
||||||
((1.0, 0.5, 0.56, 1.0), (1.0, 1.0, 1.0, 1.0), # Name
|
|
||||||
(0.0, 0.6, 0.6, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
# Disable FG BG
|
|
||||||
((1.0, 0.35, 0.25, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
|
||||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
|
||||||
),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ARROW_COLORS = {
|
ARROW_COLORS = {
|
||||||
|
@ -168,15 +123,12 @@ ARROW_COLORS = {
|
||||||
|
|
||||||
DEFAULT_WORDWRAPS = {
|
DEFAULT_WORDWRAPS = {
|
||||||
CCNormal: 7.5,
|
CCNormal: 7.5,
|
||||||
CCNoChat: 7.5,
|
|
||||||
CCNonPlayer: 7.5,
|
CCNonPlayer: 7.5,
|
||||||
CCSuit: 7.5,
|
CCSuit: 7.5,
|
||||||
CCToonBuilding: 8.5,
|
CCToonBuilding: 8.5,
|
||||||
CCSuitBuilding: 8.5,
|
CCSuitBuilding: 8.5,
|
||||||
CCHouseBuilding: 10.0,
|
CCHouseBuilding: 10.0,
|
||||||
CCSpeedChat: 7.5,
|
CCSpeedChat: 7.5
|
||||||
CCFreeChat: 7.5,
|
|
||||||
CCAdmin: 7.5
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WTNormal = 0
|
WTNormal = 0
|
||||||
|
@ -195,7 +147,7 @@ WHISPER_COLORS = {
|
||||||
# Hover FG BG
|
# Hover FG BG
|
||||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.9, 0.6)),
|
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.9, 0.6)),
|
||||||
# Disable FG BG
|
# Disable FG BG
|
||||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6)),
|
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6))
|
||||||
),
|
),
|
||||||
WTQuickTalker: (
|
WTQuickTalker: (
|
||||||
# Normal FG BG
|
# Normal FG BG
|
||||||
|
@ -205,7 +157,7 @@ WHISPER_COLORS = {
|
||||||
# Hover FG BG
|
# Hover FG BG
|
||||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.9, 0.6)),
|
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.9, 0.6)),
|
||||||
# Disable FG BG
|
# Disable FG BG
|
||||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6)),
|
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6))
|
||||||
),
|
),
|
||||||
WTSystem: (
|
WTSystem: (
|
||||||
# Normal FG BG
|
# Normal FG BG
|
||||||
|
@ -215,9 +167,18 @@ WHISPER_COLORS = {
|
||||||
# Hover FG BG
|
# Hover FG BG
|
||||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.4, 1.0, 0.6)),
|
((0.0, 0.0, 0.0, 1.0), (0.8, 0.4, 1.0, 0.6)),
|
||||||
# Disable FG BG
|
# Disable FG BG
|
||||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6)),
|
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6))
|
||||||
|
),
|
||||||
|
WTBattleSOS: (
|
||||||
|
# Normal FG BG
|
||||||
|
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6)),
|
||||||
|
# Click FG BG
|
||||||
|
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)),
|
||||||
|
# Hover FG BG
|
||||||
|
((0.0, 0.0, 0.0, 1.0), (0.8, 0.4, 0.0, 0.8)),
|
||||||
|
# Disable FG BG
|
||||||
|
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6))
|
||||||
),
|
),
|
||||||
# TODO: WTBattleSOS
|
|
||||||
WTEmote: (
|
WTEmote: (
|
||||||
# Normal FG BG
|
# Normal FG BG
|
||||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.5, 0.1, 0.6)),
|
((0.0, 0.0, 0.0, 1.0), (0.9, 0.5, 0.1, 0.6)),
|
||||||
|
@ -226,7 +187,19 @@ WHISPER_COLORS = {
|
||||||
# Hover FG BG
|
# Hover FG BG
|
||||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.2, 0.6)),
|
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.2, 0.6)),
|
||||||
# Disable FG BG
|
# Disable FG BG
|
||||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.1, 0.6)),
|
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.1, 0.6))
|
||||||
),
|
),
|
||||||
# TODO: WTToontownBoardingGroup
|
WTToontownBoardingGroup: (
|
||||||
|
# Normal FG BG
|
||||||
|
((0.0, 0.0, 0.0, 1.0), (0.9, 0.5, 0.1, 0.6)),
|
||||||
|
# Click FG BG
|
||||||
|
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)),
|
||||||
|
# Hover FG BG
|
||||||
|
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.2, 0.6)),
|
||||||
|
# Disable FG BG
|
||||||
|
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.1, 0.6))
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def getFriendColor(handle):
|
||||||
|
return CCNormal if settings['trueFriends'] and base.localAvatar.isTrueFriends(handle.doId) else CCSpeedChat
|
|
@ -2,18 +2,16 @@ from pandac.PandaModules import *
|
||||||
from NametagConstants import *
|
from NametagConstants import *
|
||||||
from Nametag3d import *
|
from Nametag3d import *
|
||||||
from Nametag2d import *
|
from Nametag2d import *
|
||||||
|
import subprocess
|
||||||
|
|
||||||
class NametagGroup:
|
class NametagGroup:
|
||||||
CCNormal = CCNormal
|
CCNormal = CCNormal
|
||||||
CCNoChat = CCNoChat
|
|
||||||
CCNonPlayer = CCNonPlayer
|
CCNonPlayer = CCNonPlayer
|
||||||
CCSuit = CCSuit
|
CCSuit = CCSuit
|
||||||
CCToonBuilding = CCToonBuilding
|
CCToonBuilding = CCToonBuilding
|
||||||
CCSuitBuilding = CCSuitBuilding
|
CCSuitBuilding = CCSuitBuilding
|
||||||
CCHouseBuilding = CCHouseBuilding
|
CCHouseBuilding = CCHouseBuilding
|
||||||
CCSpeedChat = CCSpeedChat
|
CCSpeedChat = CCSpeedChat
|
||||||
CCFreeChat = CCFreeChat
|
|
||||||
CCAdmin = CCAdmin
|
|
||||||
|
|
||||||
CHAT_TIMEOUT_MAX = 12.0
|
CHAT_TIMEOUT_MAX = 12.0
|
||||||
CHAT_TIMEOUT_MIN = 4.0
|
CHAT_TIMEOUT_MIN = 4.0
|
||||||
|
@ -244,6 +242,9 @@ class NametagGroup:
|
||||||
tag.chatFlags = self.chatFlags
|
tag.chatFlags = self.chatFlags
|
||||||
tag.avatar = self.avatar
|
tag.avatar = self.avatar
|
||||||
tag.icon = self.icon
|
tag.icon = self.icon
|
||||||
|
|
||||||
|
if settings['talk2speech']:
|
||||||
|
subprocess.Popen('espeak "%s"' % tag.chatString)
|
||||||
|
|
||||||
tag.update()
|
tag.update()
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ import OTPGlobals, OTPRender, math
|
||||||
class OTPBase(ShowBase):
|
class OTPBase(ShowBase):
|
||||||
|
|
||||||
def __init__(self, windowType = None):
|
def __init__(self, windowType = None):
|
||||||
self.wantEnviroDR = False
|
|
||||||
ShowBase.__init__(self, windowType=windowType)
|
ShowBase.__init__(self, windowType=windowType)
|
||||||
self.idTags = config.GetBool('want-id-tags', 0)
|
self.idTags = config.GetBool('want-id-tags', 0)
|
||||||
if not self.idTags:
|
if not self.idTags:
|
||||||
|
@ -15,9 +14,6 @@ class OTPBase(ShowBase):
|
||||||
self.wantNametags = self.config.GetBool('want-nametags', 1)
|
self.wantNametags = self.config.GetBool('want-nametags', 1)
|
||||||
self.wantDynamicShadows = 1
|
self.wantDynamicShadows = 1
|
||||||
self.stereoEnabled = False
|
self.stereoEnabled = False
|
||||||
self.enviroDR = None
|
|
||||||
self.enviroCam = None
|
|
||||||
self.pixelZoomSetup = False
|
|
||||||
self.whiteList = None
|
self.whiteList = None
|
||||||
|
|
||||||
if config.GetBool('want-whitelist', True):
|
if config.GetBool('want-whitelist', True):
|
||||||
|
@ -27,159 +23,12 @@ class OTPBase(ShowBase):
|
||||||
if config.GetBool('want-sequence-list', True):
|
if config.GetBool('want-sequence-list', True):
|
||||||
self.whiteList.setSequenceList(SequenceListData.SEQUENCES)
|
self.whiteList.setSequenceList(SequenceListData.SEQUENCES)
|
||||||
|
|
||||||
if base.cam:
|
base.cam.node().setCameraMask(OTPRender.MainCameraBitmask)
|
||||||
if self.wantEnviroDR:
|
taskMgr.setupTaskChain('net', numThreads=1, frameBudget=0.001, threadPriority=TPLow)
|
||||||
base.cam.node().setCameraMask(OTPRender.MainCameraBitmask)
|
|
||||||
else:
|
|
||||||
base.cam.node().setCameraMask(OTPRender.MainCameraBitmask | OTPRender.EnviroCameraBitmask)
|
|
||||||
taskMgr.setupTaskChain('net')
|
|
||||||
|
|
||||||
def setTaskChainNetThreaded(self):
|
|
||||||
if base.config.GetBool('want-threaded-network', 0):
|
|
||||||
taskMgr.setupTaskChain('net', numThreads=1, frameBudget=0.001, threadPriority=TPLow)
|
|
||||||
|
|
||||||
def setTaskChainNetNonthreaded(self):
|
|
||||||
taskMgr.setupTaskChain('net', numThreads=0, frameBudget=-1)
|
|
||||||
|
|
||||||
def toggleStereo(self):
|
|
||||||
self.stereoEnabled = not self.stereoEnabled
|
|
||||||
if self.stereoEnabled:
|
|
||||||
if not base.win.isStereo():
|
|
||||||
base.win.setRedBlueStereo(True, ColorWriteAttrib.CRed, ColorWriteAttrib.CGreen | ColorWriteAttrib.CBlue)
|
|
||||||
if self.wantEnviroDR:
|
|
||||||
self.setupEnviroCamera()
|
|
||||||
return
|
|
||||||
mainDR = base.camNode.getDisplayRegion(0)
|
|
||||||
if self.stereoEnabled:
|
|
||||||
if not mainDR.isStereo():
|
|
||||||
base.win.removeDisplayRegion(mainDR)
|
|
||||||
mainDR = base.win.makeStereoDisplayRegion()
|
|
||||||
mainDR.getRightEye().setClearDepthActive(True)
|
|
||||||
mainDR.setCamera(base.cam)
|
|
||||||
elif mainDR.isStereo():
|
|
||||||
base.win.removeDisplayRegion(mainDR)
|
|
||||||
mainDR = base.win.makeMonoDisplayRegion()
|
|
||||||
mainDR.setCamera(base.cam)
|
|
||||||
|
|
||||||
def setupEnviroCamera(self):
|
|
||||||
clearColor = VBase4(0, 0, 0, 1)
|
|
||||||
if self.enviroDR:
|
|
||||||
clearColor = self.enviroDR.getClearColor()
|
|
||||||
self.win.removeDisplayRegion(self.enviroDR)
|
|
||||||
if not self.enviroCam:
|
|
||||||
self.enviroCam = self.cam.attachNewNode(Camera('enviroCam'))
|
|
||||||
mainDR = self.camNode.getDisplayRegion(0)
|
|
||||||
if self.stereoEnabled:
|
|
||||||
self.enviroDR = self.win.makeStereoDisplayRegion()
|
|
||||||
if not mainDR.isStereo():
|
|
||||||
self.win.removeDisplayRegion(mainDR)
|
|
||||||
mainDR = self.win.makeStereoDisplayRegion()
|
|
||||||
mainDR.setCamera(self.cam)
|
|
||||||
ml = mainDR.getLeftEye()
|
|
||||||
mr = mainDR.getRightEye()
|
|
||||||
el = self.enviroDR.getLeftEye()
|
|
||||||
er = self.enviroDR.getRightEye()
|
|
||||||
el.setSort(-8)
|
|
||||||
ml.setSort(-6)
|
|
||||||
er.setSort(-4)
|
|
||||||
er.setClearDepthActive(True)
|
|
||||||
mr.setSort(-2)
|
|
||||||
mr.setClearDepthActive(False)
|
|
||||||
else:
|
|
||||||
self.enviroDR = self.win.makeMonoDisplayRegion()
|
|
||||||
if mainDR.isStereo():
|
|
||||||
self.win.removeDisplayRegion(mainDR)
|
|
||||||
mainDR = self.win.makeMonoDisplayRegion()
|
|
||||||
mainDR.setCamera(self.cam)
|
|
||||||
self.enviroDR.setSort(-10)
|
|
||||||
self.enviroDR.setClearColor(clearColor)
|
|
||||||
self.win.setClearColor(clearColor)
|
|
||||||
self.enviroDR.setCamera(self.enviroCam)
|
|
||||||
self.enviroCamNode = self.enviroCam.node()
|
|
||||||
self.enviroCamNode.setLens(self.cam.node().getLens())
|
|
||||||
self.enviroCamNode.setCameraMask(OTPRender.EnviroCameraBitmask)
|
|
||||||
render.hide(OTPRender.EnviroCameraBitmask)
|
|
||||||
self.camList.append(self.enviroCam)
|
|
||||||
self.backgroundDrawable = self.enviroDR
|
|
||||||
self.enviroDR.setTextureReloadPriority(-10)
|
|
||||||
if self.pixelZoomSetup:
|
|
||||||
self.setupAutoPixelZoom()
|
|
||||||
|
|
||||||
def setupAutoPixelZoom(self):
|
|
||||||
self.win.setPixelZoom(1)
|
|
||||||
self.enviroDR.setPixelZoom(1)
|
|
||||||
if not self.stereoEnabled:
|
|
||||||
self.enviroDR.setClearColorActive(True)
|
|
||||||
self.enviroDR.setClearDepthActive(True)
|
|
||||||
self.win.setClearColorActive(False)
|
|
||||||
self.win.setClearDepthActive(False)
|
|
||||||
self.backgroundDrawable = self.enviroDR
|
|
||||||
else:
|
|
||||||
self.enviroDR.setClearColorActive(False)
|
|
||||||
self.enviroDR.setClearDepthActive(False)
|
|
||||||
self.enviroDR.getRightEye().setClearDepthActive(True)
|
|
||||||
self.win.setClearColorActive(True)
|
|
||||||
self.win.setClearDepthActive(True)
|
|
||||||
self.backgroundDrawable = self.win
|
|
||||||
self.pixelZoomSetup = True
|
|
||||||
self.targetPixelZoom = 1.0
|
|
||||||
self.pixelZoomTask = None
|
|
||||||
self.pixelZoomCamHistory = 2.0
|
|
||||||
self.pixelZoomCamMovedList = []
|
|
||||||
self.pixelZoomStarted = None
|
|
||||||
flag = self.config.GetBool('enable-pixel-zoom', True)
|
|
||||||
self.enablePixelZoom(flag)
|
|
||||||
return
|
|
||||||
|
|
||||||
def enablePixelZoom(self, flag):
|
|
||||||
if not self.backgroundDrawable.supportsPixelZoom():
|
|
||||||
flag = False
|
|
||||||
self.pixelZoomEnabled = flag
|
|
||||||
taskMgr.remove('chasePixelZoom')
|
|
||||||
if flag:
|
|
||||||
taskMgr.add(self.__chasePixelZoom, 'chasePixelZoom', priority=-52)
|
|
||||||
else:
|
|
||||||
self.backgroundDrawable.setPixelZoom(1)
|
|
||||||
|
|
||||||
def __chasePixelZoom(self, task):
|
|
||||||
now = globalClock.getFrameTime()
|
|
||||||
pos = base.cam.getNetTransform().getPos()
|
|
||||||
prevPos = base.cam.getNetPrevTransform().getPos()
|
|
||||||
d2 = (pos - prevPos).lengthSquared()
|
|
||||||
if d2:
|
|
||||||
d = math.sqrt(d2)
|
|
||||||
self.pixelZoomCamMovedList.append((now, d))
|
|
||||||
while self.pixelZoomCamMovedList and self.pixelZoomCamMovedList[0][0] < now - self.pixelZoomCamHistory:
|
|
||||||
del self.pixelZoomCamMovedList[0]
|
|
||||||
|
|
||||||
dist = sum(map(lambda pair: pair[1], self.pixelZoomCamMovedList))
|
|
||||||
speed = dist / self.pixelZoomCamHistory
|
|
||||||
if speed < 5:
|
|
||||||
self.backgroundDrawable.setPixelZoom(4)
|
|
||||||
self.pixelZoomStart = None
|
|
||||||
elif speed > 10:
|
|
||||||
if self.pixelZoomStart == None:
|
|
||||||
self.pixelZoomStart = now
|
|
||||||
elapsed = now - self.pixelZoomStart
|
|
||||||
if elapsed > 10:
|
|
||||||
self.backgroundDrawable.setPixelZoom(16)
|
|
||||||
elif elapsed > 5:
|
|
||||||
self.backgroundDrawable.setPixelZoom(8)
|
|
||||||
return task.cont
|
|
||||||
|
|
||||||
def getShardPopLimits(self):
|
|
||||||
return (100, 200, -1)
|
|
||||||
|
|
||||||
def getRepository(self):
|
def getRepository(self):
|
||||||
return self.cr
|
return self.cr
|
||||||
|
|
||||||
def openMainWindow(self, *args, **kw):
|
|
||||||
result = ShowBase.openMainWindow(self, *args, **kw)
|
|
||||||
if result:
|
|
||||||
self.wantEnviroDR = not self.win.getGsg().isHardware() or config.GetBool('want-background-region', 1)
|
|
||||||
self.backgroundDrawable = self.win
|
|
||||||
return result
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
try:
|
||||||
taskMgr.run()
|
taskMgr.run()
|
||||||
|
|
|
@ -132,7 +132,8 @@ CRBootedReasons = {100: 'You have been disconnected because someone else just lo
|
||||||
102: 'You are not authorized to use administrator privileges.',
|
102: 'You are not authorized to use administrator privileges.',
|
||||||
103: 'You were banned by a moderator.\n\nBehave next time!',
|
103: 'You were banned by a moderator.\n\nBehave next time!',
|
||||||
105: 'Toontown Stride is now temporarily closed for maintenance. Everyone who was playing has been disconnected from the game.\n\nFor more information, please visit the Toontown Stride website.',
|
105: 'Toontown Stride is now temporarily closed for maintenance. Everyone who was playing has been disconnected from the game.\n\nFor more information, please visit the Toontown Stride website.',
|
||||||
153: 'The district you were playing on has been reset. Everyone who was playing on that district has been disconnected. However, you should be able to connect again and go right back into the game.'}
|
153: 'The district you were playing on has been reset. Everyone who was playing on that district has been disconnected. However, you should be able to connect again and go right back into the game.',
|
||||||
|
166: 'You were disconnected to prevent a district reset.'}
|
||||||
CRBootedReasonUnknownCode = 'An unexpected problem has occurred (error code %s). Your connection has been lost, but you should be able to connect again and go right back into the game.'
|
CRBootedReasonUnknownCode = 'An unexpected problem has occurred (error code %s). Your connection has been lost, but you should be able to connect again and go right back into the game.'
|
||||||
CRTryConnectAgain = '\n\nTry to connect again?'
|
CRTryConnectAgain = '\n\nTry to connect again?'
|
||||||
CRToontownUnavailable = 'The server appears to be temporarily unavailable, still trying...'
|
CRToontownUnavailable = 'The server appears to be temporarily unavailable, still trying...'
|
||||||
|
@ -233,6 +234,7 @@ FriendInviterConfirmRemove = 'Remove'
|
||||||
FriendInviterYes = lYes
|
FriendInviterYes = lYes
|
||||||
FriendInviterNo = lNo
|
FriendInviterNo = lNo
|
||||||
FriendInviterClickToon = 'Click on the toon you would like to make friends with.'
|
FriendInviterClickToon = 'Click on the toon you would like to make friends with.'
|
||||||
|
FriendInviterTooMany = 'You have too many friends on your list to add another one now. You will have to remove some friends if you want to make friends with %s.'
|
||||||
FriendInviterToonTooMany = 'You have too many toon friends on your list to add another one now. You will have to remove some toon friends if you want to make friends with %s.'
|
FriendInviterToonTooMany = 'You have too many toon friends on your list to add another one now. You will have to remove some toon friends if you want to make friends with %s.'
|
||||||
FriendInviterNotYet = 'Would you like to make friends with %s?'
|
FriendInviterNotYet = 'Would you like to make friends with %s?'
|
||||||
FriendInviterCheckAvailability = 'Seeing if %s is available.'
|
FriendInviterCheckAvailability = 'Seeing if %s is available.'
|
||||||
|
@ -374,7 +376,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?',
|
||||||
'Good, it takes two to mingle.',
|
'Good, it takes two to mingle.',
|
||||||
"Let's mingle.",
|
"Let's mingle.",
|
||||||
'This looks like a good place to mingle.',
|
'This looks like a good place to mingle.',
|
||||||
"Well,isn't this cozy?",
|
"Well, isn't this cozy?",
|
||||||
"You're mingling with defeat.",
|
"You're mingling with defeat.",
|
||||||
"I'm going to mingle in your business.",
|
"I'm going to mingle in your business.",
|
||||||
"Are you sure you're ready to mingle?"],
|
"Are you sure you're ready to mingle?"],
|
||||||
|
@ -518,7 +520,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?',
|
||||||
'Care to take a few turns with me?',
|
'Care to take a few turns with me?',
|
||||||
'I have my own special spin on the subject.'],
|
'I have my own special spin on the subject.'],
|
||||||
'f': ["I'm gonna tell the boss about you!",
|
'f': ["I'm gonna tell the boss about you!",
|
||||||
"I may be just a flunky - But I'm real spunky.",
|
"I may be just a Flunky - But I'm real spunky.",
|
||||||
"I'm using you to step up the corporate ladder.",
|
"I'm using you to step up the corporate ladder.",
|
||||||
"You're not going to like the way I work.",
|
"You're not going to like the way I work.",
|
||||||
'The boss is counting on me to stop you.',
|
'The boss is counting on me to stop you.',
|
||||||
|
@ -541,7 +543,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?',
|
||||||
'Careful, I may leave a mark.'],
|
'Careful, I may leave a mark.'],
|
||||||
'ym': ["I'm positive you're not going to like this.",
|
'ym': ["I'm positive you're not going to like this.",
|
||||||
"I don't know the meaning of no.",
|
"I don't know the meaning of no.",
|
||||||
'Want to meet? I say yes, anytime.',
|
'Want to meet? I say yes, anytime.',
|
||||||
'You need some positive enforcement.',
|
'You need some positive enforcement.',
|
||||||
"I'm going to make a positive impression.",
|
"I'm going to make a positive impression.",
|
||||||
"I haven't been wrong yet.",
|
"I haven't been wrong yet.",
|
||||||
|
@ -590,7 +592,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?',
|
||||||
'Can I interest you in an insurance plan?',
|
'Can I interest you in an insurance plan?',
|
||||||
'You should have missed my call.',
|
'You should have missed my call.',
|
||||||
"You won't be able to get rid of me now.",
|
"You won't be able to get rid of me now.",
|
||||||
'This a bad time? Good.',
|
'This a bad time? Good.',
|
||||||
'I was planning on running into you.',
|
'I was planning on running into you.',
|
||||||
'I will be reversing the charges for this call.',
|
'I will be reversing the charges for this call.',
|
||||||
'I have some costly items for you today.',
|
'I have some costly items for you today.',
|
||||||
|
@ -620,7 +622,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?',
|
||||||
'Would you like some hand-me-downs?',
|
'Would you like some hand-me-downs?',
|
||||||
'Let me show you some of my handiwork.',
|
'Let me show you some of my handiwork.',
|
||||||
'I think the handwriting is on the wall.',
|
'I think the handwriting is on the wall.',
|
||||||
"I'll gladly handle your gags for you"],
|
"I'll gladly handle your gags for you."],
|
||||||
'sc': ['I will make short work of you.',
|
'sc': ['I will make short work of you.',
|
||||||
"You're about to have money trouble.",
|
"You're about to have money trouble.",
|
||||||
"You're about to be overcharged.",
|
"You're about to be overcharged.",
|
||||||
|
@ -642,7 +644,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?',
|
||||||
"I've been asked to pinch-hit.",
|
"I've been asked to pinch-hit.",
|
||||||
"I'll prove you're not dreaming.",
|
"I'll prove you're not dreaming.",
|
||||||
'Heads you lose, tails I win.',
|
'Heads you lose, tails I win.',
|
||||||
'A Penny for your gags.'],
|
'A penny for your gags.'],
|
||||||
'tw': ['Things are about to get very tight.',
|
'tw': ['Things are about to get very tight.',
|
||||||
"That's Mr. Tightwad to you.",
|
"That's Mr. Tightwad to you.",
|
||||||
"I'm going to cut off your funding.",
|
"I'm going to cut off your funding.",
|
||||||
|
@ -2344,4 +2346,4 @@ AccessToString = {
|
||||||
500: '\x01androidGreen\x01Developer\x02',
|
500: '\x01androidGreen\x01Developer\x02',
|
||||||
600: '\x01cobalt\x01Admin\x02',
|
600: '\x01cobalt\x01Admin\x02',
|
||||||
700: '\x01azure\x01System Admin\x02'
|
700: '\x01azure\x01System Admin\x02'
|
||||||
}
|
}
|
|
@ -4,7 +4,6 @@ ReflectionCameraBitmask = BitMask32.bit(1)
|
||||||
ShadowCameraBitmask = BitMask32.bit(2)
|
ShadowCameraBitmask = BitMask32.bit(2)
|
||||||
SkyReflectionCameraBitmask = BitMask32.bit(3)
|
SkyReflectionCameraBitmask = BitMask32.bit(3)
|
||||||
GlowCameraBitmask = BitMask32.bit(4)
|
GlowCameraBitmask = BitMask32.bit(4)
|
||||||
EnviroCameraBitmask = BitMask32.bit(5)
|
|
||||||
|
|
||||||
def setCameraBitmask(default, node_path, camera_bitmask, tag = None, tag_function = None, context = None):
|
def setCameraBitmask(default, node_path, camera_bitmask, tag = None, tag_function = None, context = None):
|
||||||
if node_path:
|
if node_path:
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Settings(collections.MutableMapping):
|
||||||
|
|
||||||
def write(self):
|
def write(self):
|
||||||
with open(self.filename, 'w') as f:
|
with open(self.filename, 'w') as f:
|
||||||
json.dump(self.store, f)
|
json.dump(self.store, f, sort_keys=True, indent=2, separators=(',', ': '))
|
||||||
|
|
||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
self.store[key] = value
|
self.store[key] = value
|
||||||
|
|
|
@ -3,7 +3,8 @@ import random
|
||||||
from otp.ai.MagicWordGlobal import *
|
from otp.ai.MagicWordGlobal import *
|
||||||
from toontown.fishing import FishGlobals
|
from toontown.fishing import FishGlobals
|
||||||
from toontown.fishing.FishBase import FishBase
|
from toontown.fishing.FishBase import FishBase
|
||||||
from toontown.toonbase import TTLocalizer
|
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
||||||
|
from toontown.uberdog import TopToonsGlobals
|
||||||
|
|
||||||
|
|
||||||
class FishManagerAI:
|
class FishManagerAI:
|
||||||
|
@ -50,6 +51,7 @@ class FishManagerAI:
|
||||||
netlist = av.fishTank.getNetLists()
|
netlist = av.fishTank.getNetLists()
|
||||||
av.d_setFishTank(netlist[0], netlist[1], netlist[2])
|
av.d_setFishTank(netlist[0], netlist[1], netlist[2])
|
||||||
del self.requestedFish[av.doId]
|
del self.requestedFish[av.doId]
|
||||||
|
av.addStat(ToontownGlobals.STAT_FISH)
|
||||||
return [itemType, genus, species, weight]
|
return [itemType, genus, species, weight]
|
||||||
if itemType == FishGlobals.FishItem:
|
if itemType == FishGlobals.FishItem:
|
||||||
success, genus, species, weight = FishGlobals.getRandomFishVitals(zoneId, av.getFishingRod())
|
success, genus, species, weight = FishGlobals.getRandomFishVitals(zoneId, av.getFishingRod())
|
||||||
|
@ -66,6 +68,8 @@ class FishManagerAI:
|
||||||
av.fishTank.addFish(fish)
|
av.fishTank.addFish(fish)
|
||||||
netlist = av.fishTank.getNetLists()
|
netlist = av.fishTank.getNetLists()
|
||||||
av.d_setFishTank(netlist[0], netlist[1], netlist[2])
|
av.d_setFishTank(netlist[0], netlist[1], netlist[2])
|
||||||
|
messenger.send('topToonsManager-event', [av.doId, TopToonsGlobals.CAT_FISH, 1])
|
||||||
|
av.addStat(ToontownGlobals.STAT_FISH)
|
||||||
return [itemType, genus, species, weight]
|
return [itemType, genus, species, weight]
|
||||||
elif itemType == FishGlobals.BootItem:
|
elif itemType == FishGlobals.BootItem:
|
||||||
return [itemType, 0, 0, 0]
|
return [itemType, 0, 0, 0]
|
||||||
|
@ -89,6 +93,8 @@ class FishManagerAI:
|
||||||
av.fishTank.addFish(fish)
|
av.fishTank.addFish(fish)
|
||||||
netlist = av.fishTank.getNetLists()
|
netlist = av.fishTank.getNetLists()
|
||||||
av.d_setFishTank(netlist[0], netlist[1], netlist[2])
|
av.d_setFishTank(netlist[0], netlist[1], netlist[2])
|
||||||
|
messenger.send('topToonsManager-event', [av.doId, TopToonsGlobals.CAT_FISH, 1])
|
||||||
|
av.addStat(ToontownGlobals.STAT_FISH)
|
||||||
return [itemType, genus, species, weight]
|
return [itemType, genus, species, weight]
|
||||||
else:
|
else:
|
||||||
money = FishGlobals.Rod2JellybeanDict[av.getFishingRod()]
|
money = FishGlobals.Rod2JellybeanDict[av.getFishingRod()]
|
||||||
|
|
|
@ -9,15 +9,6 @@ CAROLING_REWARD = 100
|
||||||
SCAVENGER_HUNT_LOCATIONS = 6
|
SCAVENGER_HUNT_LOCATIONS = 6
|
||||||
|
|
||||||
Holidays = {
|
Holidays = {
|
||||||
ToontownGlobals.LAUGHING_MAN: {
|
|
||||||
'startMonth': 6,
|
|
||||||
'startDay': 22,
|
|
||||||
'endMonth': 6,
|
|
||||||
'endDay': 22,
|
|
||||||
'startMessage': TTLocalizer.LaughingManHolidayStart,
|
|
||||||
'ongoingMessage': TTLocalizer.LaughingManHolidayOngoing,
|
|
||||||
'endMessage': TTLocalizer.LaughingManHolidayEnd
|
|
||||||
},
|
|
||||||
ToontownGlobals.GRAND_PRIX: {
|
ToontownGlobals.GRAND_PRIX: {
|
||||||
'weekDay': 0,
|
'weekDay': 0,
|
||||||
'startMessage': TTLocalizer.CircuitRaceStart,
|
'startMessage': TTLocalizer.CircuitRaceStart,
|
||||||
|
|
|
@ -52,10 +52,7 @@ class NewsManager(DistributedObject):
|
||||||
self.endSpecialHoliday(id)
|
self.endSpecialHoliday(id)
|
||||||
|
|
||||||
def startSpecialHoliday(self, id):
|
def startSpecialHoliday(self, id):
|
||||||
if id == ToontownGlobals.LAUGHING_MAN:
|
if id == ToontownGlobals.APRIL_TOONS_WEEK:
|
||||||
for toon in base.cr.toons.values():
|
|
||||||
toon.generateLaughingMan()
|
|
||||||
elif id == ToontownGlobals.APRIL_TOONS_WEEK:
|
|
||||||
if isinstance(base.cr.playGame.getPlace(), Estate.Estate):
|
if isinstance(base.cr.playGame.getPlace(), Estate.Estate):
|
||||||
base.localAvatar.startAprilToonsControls()
|
base.localAvatar.startAprilToonsControls()
|
||||||
|
|
||||||
|
@ -68,10 +65,7 @@ class NewsManager(DistributedObject):
|
||||||
base.localAvatar.chatMgr.chatInputSpeedChat.addWinterMenu()
|
base.localAvatar.chatMgr.chatInputSpeedChat.addWinterMenu()
|
||||||
|
|
||||||
def endSpecialHoliday(self, id):
|
def endSpecialHoliday(self, id):
|
||||||
if id == ToontownGlobals.LAUGHING_MAN:
|
if id == ToontownGlobals.APRIL_TOONS_WEEK:
|
||||||
for toon in base.cr.toons.values():
|
|
||||||
toon.swapToonHead(laughingMan=toon.getWantLaughingMan())
|
|
||||||
elif id == ToontownGlobals.APRIL_TOONS_WEEK:
|
|
||||||
if isinstance(base.cr.playGame.getPlace(), Estate.Estate):
|
if isinstance(base.cr.playGame.getPlace(), Estate.Estate):
|
||||||
base.localAvatar.stopAprilToonsControls()
|
base.localAvatar.stopAprilToonsControls()
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,8 @@ from toontown.building import FADoorCodes
|
||||||
from otp.ai.MagicWordGlobal import *
|
from otp.ai.MagicWordGlobal import *
|
||||||
from toontown.hood import ZoneUtil
|
from toontown.hood import ZoneUtil
|
||||||
from toontown.quest import Quests
|
from toontown.quest import Quests
|
||||||
|
from toontown.uberdog import TopToonsGlobals
|
||||||
|
from toontown.toonbase import ToontownGlobals
|
||||||
|
|
||||||
QuestIdIndex = 0
|
QuestIdIndex = 0
|
||||||
QuestFromNpcIdIndex = 1
|
QuestFromNpcIdIndex = 1
|
||||||
|
@ -75,6 +76,7 @@ class QuestManagerAI:
|
||||||
# If they've completed a quest.
|
# If they've completed a quest.
|
||||||
if completeStatus == Quests.COMPLETE:
|
if completeStatus == Quests.COMPLETE:
|
||||||
# ToonUp the toon to max health.
|
# ToonUp the toon to max health.
|
||||||
|
messenger.send('topToonsManager-event', [av.doId, TopToonsGlobals.CAT_TASKS, 1])
|
||||||
av.toonUp(av.maxHp)
|
av.toonUp(av.maxHp)
|
||||||
|
|
||||||
# If it's a TrackChoiceQuest then present their track choices.
|
# If it's a TrackChoiceQuest then present their track choices.
|
||||||
|
@ -91,6 +93,7 @@ class QuestManagerAI:
|
||||||
# The toon has completed this quest. Give them a reward!
|
# The toon has completed this quest. Give them a reward!
|
||||||
npc.completeQuest(avId, questId, rewardId)
|
npc.completeQuest(avId, questId, rewardId)
|
||||||
self.completeQuest(av, questId)
|
self.completeQuest(av, questId)
|
||||||
|
av.addStat(ToontownGlobals.STAT_TASKS)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
# They haven't completed any quests so we have to give them choices.
|
# They haven't completed any quests so we have to give them choices.
|
||||||
|
@ -289,6 +292,17 @@ class QuestManagerAI:
|
||||||
questList.append(questDesc)
|
questList.append(questDesc)
|
||||||
|
|
||||||
av.b_setQuests(questList)
|
av.b_setQuests(questList)
|
||||||
|
|
||||||
|
def toonCalledClarabelle(self, av):
|
||||||
|
avQuests = av.getQuests()
|
||||||
|
questList = []
|
||||||
|
for i in xrange(0, len(avQuests), 5):
|
||||||
|
questDesc = avQuests[i : i + 5]
|
||||||
|
questClass = Quests.getQuest(questDesc[QuestIdIndex])
|
||||||
|
if isinstance(questClass, Quests.PhoneQuest) and questClass.getCompletionStatus(av, questDesc) == Quests.INCOMPLETE:
|
||||||
|
questDesc[QuestProgressIndex] += 1
|
||||||
|
questList.append(questDesc)
|
||||||
|
av.b_setQuests(questList)
|
||||||
|
|
||||||
def toonMadeNPCFriend(self, av, count, method):
|
def toonMadeNPCFriend(self, av, count, method):
|
||||||
avQuests = av.getQuests()
|
avQuests = av.getQuests()
|
||||||
|
@ -437,6 +451,7 @@ class QuestManagerAI:
|
||||||
|
|
||||||
def toonKilledBuilding(self, av, type, difficulty, floors, zoneId, cogdo):
|
def toonKilledBuilding(self, av, type, difficulty, floors, zoneId, cogdo):
|
||||||
# Get the avatars current quests.
|
# Get the avatars current quests.
|
||||||
|
messenger.send('topToonsManager-event', [av.doId, TopToonsGlobals.CAT_BLDG, 1])
|
||||||
avQuests = av.getQuests()
|
avQuests = av.getQuests()
|
||||||
questList = []
|
questList = []
|
||||||
zoneId = ZoneUtil.getBranchZone(zoneId)
|
zoneId = ZoneUtil.getBranchZone(zoneId)
|
||||||
|
@ -491,6 +506,7 @@ class QuestManagerAI:
|
||||||
|
|
||||||
def toonKilledCogs(self, av, suitsKilled, zoneId):
|
def toonKilledCogs(self, av, suitsKilled, zoneId):
|
||||||
# Get the avatar's current quests.
|
# Get the avatar's current quests.
|
||||||
|
messenger.send('topToonsManager-event', [av.doId, TopToonsGlobals.CAT_COGS, len(suitsKilled)])
|
||||||
avQuests = av.getQuests()
|
avQuests = av.getQuests()
|
||||||
questList = []
|
questList = []
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,10 @@ sys.path.append(
|
||||||
)
|
)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import gc
|
||||||
|
|
||||||
|
# Panda3D 1.10.0 is 63.
|
||||||
|
gc.disable()
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('--base-channel', help='The base channel that the server may use.')
|
parser.add_argument('--base-channel', help='The base channel that the server may use.')
|
||||||
|
@ -60,6 +64,7 @@ simbase.air.connect(host, port)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
run()
|
run()
|
||||||
|
gc.enable()
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
raise
|
raise
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
|
@ -46,12 +46,12 @@ from toontown.racing.LeaderboardMgrAI import LeaderboardMgrAI
|
||||||
from toontown.pets.PetManagerAI import PetManagerAI
|
from toontown.pets.PetManagerAI import PetManagerAI
|
||||||
from toontown.safezone.SafeZoneManagerAI import SafeZoneManagerAI
|
from toontown.safezone.SafeZoneManagerAI import SafeZoneManagerAI
|
||||||
from toontown.suit.SuitInvasionManagerAI import SuitInvasionManagerAI
|
from toontown.suit.SuitInvasionManagerAI import SuitInvasionManagerAI
|
||||||
from toontown.groups.GroupManagerAI import GroupManagerAI
|
|
||||||
from toontown.toon import NPCToons
|
from toontown.toon import NPCToons
|
||||||
from toontown.toonbase import ToontownGlobals
|
from toontown.toonbase import ToontownGlobals
|
||||||
from toontown.tutorial.TutorialManagerAI import TutorialManagerAI
|
from toontown.tutorial.TutorialManagerAI import TutorialManagerAI
|
||||||
from toontown.uberdog.DistributedPartyManagerAI import DistributedPartyManagerAI
|
from toontown.uberdog.DistributedPartyManagerAI import DistributedPartyManagerAI
|
||||||
from toontown.uberdog.DistributedLobbyManagerAI import DistributedLobbyManagerAI
|
from toontown.uberdog.TopToonsManagerAI import TopToonsManagerAI
|
||||||
|
#from toontown.uberdog.DistributedLobbyManagerAI import DistributedLobbyManagerAI
|
||||||
|
|
||||||
class ToontownAIRepository(ToontownInternalRepository):
|
class ToontownAIRepository(ToontownInternalRepository):
|
||||||
def __init__(self, baseChannel, stateServerChannel, districtName):
|
def __init__(self, baseChannel, stateServerChannel, districtName):
|
||||||
|
@ -71,7 +71,6 @@ class ToontownAIRepository(ToontownInternalRepository):
|
||||||
self.mintMgr = None
|
self.mintMgr = None
|
||||||
self.lawOfficeMgr = None
|
self.lawOfficeMgr = None
|
||||||
self.countryClubMgr = None
|
self.countryClubMgr = None
|
||||||
self.groupManager = GroupManagerAI(self)
|
|
||||||
|
|
||||||
self.zoneAllocator = UniqueIdAllocator(ToontownGlobals.DynamicZonesBegin,
|
self.zoneAllocator = UniqueIdAllocator(ToontownGlobals.DynamicZonesBegin,
|
||||||
ToontownGlobals.DynamicZonesEnd)
|
ToontownGlobals.DynamicZonesEnd)
|
||||||
|
@ -86,6 +85,7 @@ class ToontownAIRepository(ToontownInternalRepository):
|
||||||
self.wantCogbuildings = self.config.GetBool('want-cogbuildings', True)
|
self.wantCogbuildings = self.config.GetBool('want-cogbuildings', True)
|
||||||
self.wantCogdominiums = self.config.GetBool('want-cogdominiums', True)
|
self.wantCogdominiums = self.config.GetBool('want-cogdominiums', True)
|
||||||
self.wantTrackClsends = self.config.GetBool('want-track-clsends', False)
|
self.wantTrackClsends = self.config.GetBool('want-track-clsends', False)
|
||||||
|
self.wantTopToons = self.config.GetBool('want-top-toons', True)
|
||||||
self.baseXpMultiplier = self.config.GetFloat('base-xp-multiplier', 1.0)
|
self.baseXpMultiplier = self.config.GetFloat('base-xp-multiplier', 1.0)
|
||||||
|
|
||||||
self.cogSuitMessageSent = False
|
self.cogSuitMessageSent = False
|
||||||
|
@ -103,7 +103,7 @@ class ToontownAIRepository(ToontownInternalRepository):
|
||||||
self.tutorialManager.generateWithRequired(2)
|
self.tutorialManager.generateWithRequired(2)
|
||||||
self.friendManager = FriendManagerAI(self)
|
self.friendManager = FriendManagerAI(self)
|
||||||
self.friendManager.generateWithRequired(2)
|
self.friendManager.generateWithRequired(2)
|
||||||
self.questManager = QuestManagerAI(self)
|
self.questManager = QuestManagerAI(self)
|
||||||
self.banManager = BanManagerAI.BanManagerAI(self)
|
self.banManager = BanManagerAI.BanManagerAI(self)
|
||||||
self.suitInvasionManager = SuitInvasionManagerAI(self)
|
self.suitInvasionManager = SuitInvasionManagerAI(self)
|
||||||
self.blackCatMgr = DistributedBlackCatMgrAI(self)
|
self.blackCatMgr = DistributedBlackCatMgrAI(self)
|
||||||
|
@ -119,7 +119,8 @@ class ToontownAIRepository(ToontownInternalRepository):
|
||||||
self.codeRedemptionMgr.generateWithRequired(2)
|
self.codeRedemptionMgr.generateWithRequired(2)
|
||||||
self.buildingQueryMgr = DistributedBuildingQueryMgrAI(self)
|
self.buildingQueryMgr = DistributedBuildingQueryMgrAI(self)
|
||||||
self.buildingQueryMgr.generateWithRequired(2)
|
self.buildingQueryMgr.generateWithRequired(2)
|
||||||
self.groupManager.generateWithRequired(2)
|
if self.wantTopToons:
|
||||||
|
self.topToonsMgr = TopToonsManagerAI(self)
|
||||||
if self.wantKarts:
|
if self.wantKarts:
|
||||||
self.leaderboardMgr = LeaderboardMgrAI(self)
|
self.leaderboardMgr = LeaderboardMgrAI(self)
|
||||||
if self.wantFishing:
|
if self.wantFishing:
|
||||||
|
@ -136,10 +137,10 @@ class ToontownAIRepository(ToontownInternalRepository):
|
||||||
self.partyManager.generateWithRequired(2)
|
self.partyManager.generateWithRequired(2)
|
||||||
self.globalPartyMgr = self.generateGlobalObject(
|
self.globalPartyMgr = self.generateGlobalObject(
|
||||||
OTP_DO_ID_GLOBAL_PARTY_MANAGER, 'GlobalPartyManager')
|
OTP_DO_ID_GLOBAL_PARTY_MANAGER, 'GlobalPartyManager')
|
||||||
self.lobbyManager = DistributedLobbyManagerAI(self)
|
#self.lobbyManager = DistributedLobbyManagerAI(self)
|
||||||
self.lobbyManager.generateWithRequired(2)
|
#self.lobbyManager.generateWithRequired(2)
|
||||||
self.globalLobbyMgr = self.generateGlobalObject(
|
#self.globalLobbyMgr = self.generateGlobalObject(
|
||||||
OTP_DO_ID_GLOBAL_LOBBY_MANAGER, 'GlobalLobbyManager')
|
# OTP_DO_ID_GLOBAL_LOBBY_MANAGER, 'GlobalLobbyManager')
|
||||||
|
|
||||||
def createSafeZones(self):
|
def createSafeZones(self):
|
||||||
NPCToons.generateZone2NpcDict()
|
NPCToons.generateZone2NpcDict()
|
||||||
|
@ -178,6 +179,7 @@ class ToontownAIRepository(ToontownInternalRepository):
|
||||||
self.cogHeadquarters.append(BossbotHQAI.BossbotHQAI(self))
|
self.cogHeadquarters.append(BossbotHQAI.BossbotHQAI(self))
|
||||||
|
|
||||||
def handleConnected(self):
|
def handleConnected(self):
|
||||||
|
ToontownInternalRepository.handleConnected(self)
|
||||||
self.districtId = self.allocateChannel()
|
self.districtId = self.allocateChannel()
|
||||||
self.notify.info('Creating ToontownDistrictAI(%d)...' % self.districtId)
|
self.notify.info('Creating ToontownDistrictAI(%d)...' % self.districtId)
|
||||||
self.distributedDistrict = ToontownDistrictAI(self)
|
self.distributedDistrict = ToontownDistrictAI(self)
|
||||||
|
|
|
@ -721,7 +721,7 @@ class BattleCalculatorAI:
|
||||||
0,
|
0,
|
||||||
0]
|
0]
|
||||||
self.toonSkillPtsGained[id] = expList
|
self.toonSkillPtsGained[id] = expList
|
||||||
expList[trk] = expList[trk] + (lvl + 1) * self.__skillCreditMultiplier
|
expList[trk] = min(ExperienceCap, expList[trk] + (lvl + 1) * self.__skillCreditMultiplier)
|
||||||
return
|
return
|
||||||
|
|
||||||
def __clearTgtDied(self, tgt, lastAtk, currAtk):
|
def __clearTgtDied(self, tgt, lastAtk, currAtk):
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from toontown.toonbase import ToontownBattleGlobals
|
from toontown.toonbase import ToontownBattleGlobals, ToontownGlobals
|
||||||
from toontown.suit import SuitDNA
|
from toontown.suit import SuitDNA
|
||||||
BattleExperienceAINotify = DirectNotifyGlobal.directNotify.newCategory('BattleExprienceAI')
|
BattleExperienceAINotify = DirectNotifyGlobal.directNotify.newCategory('BattleExprienceAI')
|
||||||
|
|
||||||
|
@ -183,9 +183,15 @@ def assignRewards(activeToons, toonSkillPtsGained, suitsKilled, zoneId, helpfulT
|
||||||
if helpfulToons and toon.doId in helpfulToons:
|
if helpfulToons and toon.doId in helpfulToons:
|
||||||
simbase.air.questManager.toonKilledCogs(toon, suitsKilled, zoneId)
|
simbase.air.questManager.toonKilledCogs(toon, suitsKilled, zoneId)
|
||||||
simbase.air.cogPageManager.toonKilledCogs(toon, suitsKilled, zoneId)
|
simbase.air.cogPageManager.toonKilledCogs(toon, suitsKilled, zoneId)
|
||||||
|
addStats(toon, suitsKilled)
|
||||||
else:
|
else:
|
||||||
BattleExperienceAINotify.debug('toon=%d unhelpful not getting killed cog quest credit' % toon.doId)
|
BattleExperienceAINotify.debug('toon=%d unhelpful not getting killed cog quest credit' % toon.doId)
|
||||||
else:
|
else:
|
||||||
simbase.air.questManager.toonKilledCogs(toon, suitsKilled, zoneId)
|
simbase.air.questManager.toonKilledCogs(toon, suitsKilled, zoneId)
|
||||||
simbase.air.cogPageManager.toonKilledCogs(toon, suitsKilled, zoneId)
|
simbase.air.cogPageManager.toonKilledCogs(toon, suitsKilled, zoneId)
|
||||||
return
|
addStats(toon, suitsKilled)
|
||||||
|
|
||||||
|
def addStats(toon, suitsKilled):
|
||||||
|
toon.addStat(ToontownGlobals.STAT_COGS, len(suitsKilled))
|
||||||
|
toon.addStat(ToontownGlobals.STAT_V2, len([suit for suit in suitsKilled if 'hasRevives' in suit and suit['hasRevives']]))
|
||||||
|
toon.addStat(ToontownGlobals.STAT_SKELE, len([suit for suit in suitsKilled if 'isSkelecog' in suit and suit['isSkelecog']]))
|
|
@ -1366,6 +1366,7 @@ class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBas
|
||||||
if check == -1:
|
if check == -1:
|
||||||
self.air.writeServerEvent('suspicious', toonId, 'Toon generating movie for non-existent gag track %s level %s' % (track, level))
|
self.air.writeServerEvent('suspicious', toonId, 'Toon generating movie for non-existent gag track %s level %s' % (track, level))
|
||||||
self.notify.warning('generating movie for non-existent gag track %s level %s! avId: %s' % (track, level, toonId))
|
self.notify.warning('generating movie for non-existent gag track %s level %s! avId: %s' % (track, level, toonId))
|
||||||
|
toon.addStat(ToontownGlobals.STAT_GAGS)
|
||||||
toon.d_setInventory(toon.inventory.makeNetString())
|
toon.d_setInventory(toon.inventory.makeNetString())
|
||||||
hps = attack[TOON_HP_COL]
|
hps = attack[TOON_HP_COL]
|
||||||
if track == SOS:
|
if track == SOS:
|
||||||
|
|
|
@ -338,7 +338,7 @@ class Movie(DirectObject.DirectObject):
|
||||||
|
|
||||||
self.tutorialTom = Toon.Toon()
|
self.tutorialTom = Toon.Toon()
|
||||||
dna = ToonDNA.ToonDNA()
|
dna = ToonDNA.ToonDNA()
|
||||||
dna.newToonFromProperties(*('dls', 'ms', 'm', 'm', 7, 0, 7, 7, 2, 6, 2, 6, 2, 16, 0))
|
dna.newToonFromProperties(*('dls', 'ms', 'm', 'm', 7, 0, 7, 7, 2, 6, 2, 6, 2, 16))
|
||||||
self.tutorialTom.setDNA(dna)
|
self.tutorialTom.setDNA(dna)
|
||||||
self.tutorialTom.setName(TTLocalizer.NPCToonNames[20000])
|
self.tutorialTom.setName(TTLocalizer.NPCToonNames[20000])
|
||||||
self.tutorialTom.setPickable(0)
|
self.tutorialTom.setPickable(0)
|
||||||
|
|
|
@ -11,6 +11,7 @@ from toontown.toonbase import ToontownBattleGlobals
|
||||||
import BattleParticles
|
import BattleParticles
|
||||||
import BattleProps
|
import BattleProps
|
||||||
import MovieNPCSOS
|
import MovieNPCSOS
|
||||||
|
import random
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('MovieLures')
|
notify = DirectNotifyGlobal.directNotify.newCategory('MovieLures')
|
||||||
|
|
||||||
def safeWrtReparentTo(nodePath, parent):
|
def safeWrtReparentTo(nodePath, parent):
|
||||||
|
@ -379,7 +380,7 @@ def __createSuitDamageTrack(battle, suit, hp, lure, trapProp):
|
||||||
explosionTrack = Sequence(Wait(2.3), createTNTExplosionTrack(battle, trapProp=trapProp, relativeTo=parent))
|
explosionTrack = Sequence(Wait(2.3), createTNTExplosionTrack(battle, trapProp=trapProp, relativeTo=parent))
|
||||||
suitTrack = Sequence(ActorInterval(suit, 'flail', duration=0.7), ActorInterval(suit, 'flail', startTime=0.7, endTime=0.0), ActorInterval(suit, 'neutral', duration=0.4), ActorInterval(suit, 'flail', startTime=0.6, endTime=0.7), Wait(0.4), ActorInterval(suit, 'slip-forward', startTime=2.48, duration=0.1), Func(battle.movie.needRestoreColor), Func(suit.setColorScale, Vec4(0.2, 0.2, 0.2, 1)), Func(trapProp.reparentTo, hidden), ActorInterval(suit, 'slip-forward', startTime=2.58), Func(suit.clearColorScale), Func(trapProp.sparksEffect.cleanup), Func(battle.movie.clearRestoreColor))
|
suitTrack = Sequence(ActorInterval(suit, 'flail', duration=0.7), ActorInterval(suit, 'flail', startTime=0.7, endTime=0.0), ActorInterval(suit, 'neutral', duration=0.4), ActorInterval(suit, 'flail', startTime=0.6, endTime=0.7), Wait(0.4), ActorInterval(suit, 'slip-forward', startTime=2.48, duration=0.1), Func(battle.movie.needRestoreColor), Func(suit.setColorScale, Vec4(0.2, 0.2, 0.2, 1)), Func(trapProp.reparentTo, hidden), ActorInterval(suit, 'slip-forward', startTime=2.58), Func(suit.clearColorScale), Func(trapProp.sparksEffect.cleanup), Func(battle.movie.clearRestoreColor))
|
||||||
damageTrack = Sequence(Wait(2.3), Func(suit.showHpText, -hp, openEnded=0), Func(suit.updateHealthBar, hp))
|
damageTrack = Sequence(Wait(2.3), Func(suit.showHpText, -hp, openEnded=0), Func(suit.updateHealthBar, hp))
|
||||||
explosionSound = base.loadSfx('phase_3.5/audio/sfx/ENC_cogfall_apart.ogg')
|
explosionSound = base.loadSfx('phase_3.5/audio/sfx/ENC_cogfall_apart_%s.ogg' % random.randint(1, 6))
|
||||||
soundTrack = Sequence(SoundInterval(globalBattleSoundCache.getSound('TL_dynamite.ogg'), duration=2.0, node=suit), SoundInterval(explosionSound, duration=0.6, node=suit))
|
soundTrack = Sequence(SoundInterval(globalBattleSoundCache.getSound('TL_dynamite.ogg'), duration=2.0, node=suit), SoundInterval(explosionSound, duration=0.6, node=suit))
|
||||||
result.append(Parallel(tntTrack, suitTrack, damageTrack, explosionTrack, soundTrack))
|
result.append(Parallel(tntTrack, suitTrack, damageTrack, explosionTrack, soundTrack))
|
||||||
elif trapName == 'traintrack':
|
elif trapName == 'traintrack':
|
||||||
|
|
|
@ -267,7 +267,7 @@ def createSuitReviveTrack(suit, toon, battle, npcs = []):
|
||||||
suitTrack.append(Func(suit.loop, 'neutral'))
|
suitTrack.append(Func(suit.loop, 'neutral'))
|
||||||
suitTrack.append(Func(messenger.send, suit.uniqueName('hpChange')))
|
suitTrack.append(Func(messenger.send, suit.uniqueName('hpChange')))
|
||||||
spinningSound = base.loadSfx('phase_3.5/audio/sfx/Cog_Death.ogg')
|
spinningSound = base.loadSfx('phase_3.5/audio/sfx/Cog_Death.ogg')
|
||||||
deathSound = base.loadSfx('phase_3.5/audio/sfx/ENC_cogfall_apart.ogg')
|
deathSound = base.loadSfx('phase_3.5/audio/sfx/ENC_cogfall_apart_%s.ogg' % random.randint(1, 6))
|
||||||
deathSoundTrack = Sequence(Wait(0.8), SoundInterval(spinningSound, duration=1.2, startTime=1.5, volume=0.2), SoundInterval(spinningSound, duration=3.0, startTime=0.6, volume=0.8), SoundInterval(deathSound, volume=0.32))
|
deathSoundTrack = Sequence(Wait(0.8), SoundInterval(spinningSound, duration=1.2, startTime=1.5, volume=0.2), SoundInterval(spinningSound, duration=3.0, startTime=0.6, volume=0.8), SoundInterval(deathSound, volume=0.32))
|
||||||
BattleParticles.loadParticles()
|
BattleParticles.loadParticles()
|
||||||
smallGears = BattleParticles.createParticleEffect(file='gearExplosionSmall')
|
smallGears = BattleParticles.createParticleEffect(file='gearExplosionSmall')
|
||||||
|
@ -312,7 +312,7 @@ def createSuitDeathTrack(suit, toon, battle, npcs = []):
|
||||||
suitTrack.append(Func(removeDeathSuit, suit, deathSuit, name='remove-death-suit'))
|
suitTrack.append(Func(removeDeathSuit, suit, deathSuit, name='remove-death-suit'))
|
||||||
suitTrack.append(Func(notify.debug, 'after removeDeathSuit'))
|
suitTrack.append(Func(notify.debug, 'after removeDeathSuit'))
|
||||||
spinningSound = base.loadSfx('phase_3.5/audio/sfx/Cog_Death.ogg')
|
spinningSound = base.loadSfx('phase_3.5/audio/sfx/Cog_Death.ogg')
|
||||||
deathSound = base.loadSfx('phase_3.5/audio/sfx/ENC_cogfall_apart.ogg')
|
deathSound = base.loadSfx('phase_3.5/audio/sfx/ENC_cogfall_apart_%s.ogg' % random.randint(1, 6))
|
||||||
deathSoundTrack = Sequence(Wait(0.8), SoundInterval(spinningSound, duration=1.2, startTime=1.5, volume=0.2), SoundInterval(spinningSound, duration=3.0, startTime=0.6, volume=0.8), SoundInterval(deathSound, volume=0.32))
|
deathSoundTrack = Sequence(Wait(0.8), SoundInterval(spinningSound, duration=1.2, startTime=1.5, volume=0.2), SoundInterval(spinningSound, duration=3.0, startTime=0.6, volume=0.8), SoundInterval(deathSound, volume=0.32))
|
||||||
BattleParticles.loadParticles()
|
BattleParticles.loadParticles()
|
||||||
smallGears = BattleParticles.createParticleEffect(file='gearExplosionSmall')
|
smallGears = BattleParticles.createParticleEffect(file='gearExplosionSmall')
|
||||||
|
|
|
@ -3,14 +3,13 @@ from toontown.toonbase import ToontownGlobals
|
||||||
import copy
|
import copy
|
||||||
BOARDCODE_OKAY = 1
|
BOARDCODE_OKAY = 1
|
||||||
BOARDCODE_MISSING = 0
|
BOARDCODE_MISSING = 0
|
||||||
BOARDCODE_MINLAFF = -1
|
BOARDCODE_PROMOTION = -1
|
||||||
BOARDCODE_PROMOTION = -2
|
BOARDCODE_BATTLE = -2
|
||||||
BOARDCODE_BATTLE = -3
|
BOARDCODE_SPACE = -3
|
||||||
BOARDCODE_SPACE = -4
|
BOARDCODE_DIFF_GROUP = -4
|
||||||
BOARDCODE_DIFF_GROUP = -6
|
BOARDCODE_PENDING_INVITE = -5
|
||||||
BOARDCODE_PENDING_INVITE = -7
|
BOARDCODE_IN_ELEVATOR = -6
|
||||||
BOARDCODE_IN_ELEVATOR = -8
|
BOARDCODE_GROUPS_TOO_LARGE = -7 # JBS
|
||||||
BOARDCODE_GROUPS_TO_LARGE = -9 # JBS
|
|
||||||
INVITE_ACCEPT_FAIL_GROUP_FULL = -1
|
INVITE_ACCEPT_FAIL_GROUP_FULL = -1
|
||||||
|
|
||||||
class BoardingPartyBase:
|
class BoardingPartyBase:
|
||||||
|
|
|
@ -3,7 +3,7 @@ import DistributedBossElevatorAI
|
||||||
|
|
||||||
class DistributedBBElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
class DistributedBBElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, zone, antiShuffle = 0):
|
||||||
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=0)
|
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle)
|
||||||
self.type = ELEVATOR_BB
|
self.type = ELEVATOR_BB
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
|
@ -198,17 +198,10 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
|
||||||
self.groupInviteePanel = None
|
self.groupInviteePanel = None
|
||||||
return
|
return
|
||||||
|
|
||||||
def postInviteNotQualify(self, avId, reason, elevatorId):
|
def postInviteNotQualify(self, avId, reason):
|
||||||
messenger.send('updateGroupStatus')
|
messenger.send('updateGroupStatus')
|
||||||
rejectText = ''
|
rejectText = ''
|
||||||
minLaff = TTLocalizer.BoardingMore
|
|
||||||
if elevatorId:
|
|
||||||
elevator = base.cr.doId2do.get(elevatorId)
|
|
||||||
if elevator:
|
|
||||||
minLaff = elevator.minLaff
|
|
||||||
if avId == localAvatar.doId:
|
if avId == localAvatar.doId:
|
||||||
if reason == BoardingPartyBase.BOARDCODE_MINLAFF:
|
|
||||||
rejectText = TTLocalizer.BoardingInviteMinLaffInviter % minLaff
|
|
||||||
if reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
if reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
||||||
rejectText = TTLocalizer.BoardingInvitePromotionInviter
|
rejectText = TTLocalizer.BoardingInvitePromotionInviter
|
||||||
else:
|
else:
|
||||||
|
@ -217,8 +210,6 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
|
||||||
avatarNameText = avatar.name
|
avatarNameText = avatar.name
|
||||||
else:
|
else:
|
||||||
avatarNameText = ''
|
avatarNameText = ''
|
||||||
if reason == BoardingPartyBase.BOARDCODE_MINLAFF:
|
|
||||||
rejectText = TTLocalizer.BoardingInviteMinLaffInvitee % (avatarNameText, minLaff)
|
|
||||||
if reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
if reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
||||||
rejectText = TTLocalizer.BoardingInvitePromotionInvitee % avatarNameText
|
rejectText = TTLocalizer.BoardingInvitePromotionInvitee % avatarNameText
|
||||||
if reason == BoardingPartyBase.BOARDCODE_BATTLE:
|
if reason == BoardingPartyBase.BOARDCODE_BATTLE:
|
||||||
|
@ -229,8 +220,8 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
|
||||||
rejectText = TTLocalizer.BoardingInviteePendingIvite % avatarNameText
|
rejectText = TTLocalizer.BoardingInviteePendingIvite % avatarNameText
|
||||||
if reason == BoardingPartyBase.BOARDCODE_IN_ELEVATOR:
|
if reason == BoardingPartyBase.BOARDCODE_IN_ELEVATOR:
|
||||||
rejectText = TTLocalizer.BoardingInviteeInElevator % avatarNameText
|
rejectText = TTLocalizer.BoardingInviteeInElevator % avatarNameText
|
||||||
if reason == BoardingPartyBase.BOARDCODE_GROUPS_TO_LARGE: # JBS
|
if reason == BoardingPartyBase.BOARDCODE_GROUPS_TOO_LARGE: # JBS
|
||||||
rejectText = TTLocalizer.BoardingGroupsToLarge % avatarNameText
|
rejectText = TTLocalizer.BoardingGroupsTooLarge % avatarNameText
|
||||||
if self.inviterPanels.isInvitingPanelIdCorrect(avId) or avId == localAvatar.doId:
|
if self.inviterPanels.isInvitingPanelIdCorrect(avId) or avId == localAvatar.doId:
|
||||||
self.inviterPanels.destroyInvitingPanel()
|
self.inviterPanels.destroyInvitingPanel()
|
||||||
self.showMe(rejectText)
|
self.showMe(rejectText)
|
||||||
|
@ -316,23 +307,8 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
|
||||||
|
|
||||||
avatarText += secondLastName + ' ' + TTLocalizer.And + ' ' + lastName
|
avatarText += secondLastName + ' ' + TTLocalizer.And + ' ' + lastName
|
||||||
return avatarText
|
return avatarText
|
||||||
|
|
||||||
if reason == BoardingPartyBase.BOARDCODE_MINLAFF:
|
if reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
||||||
self.notify.debug("%s 's group cannot board because it does not have enough laff points." % leaderId)
|
|
||||||
elevator = base.cr.doId2do.get(elevatorId)
|
|
||||||
if elevator:
|
|
||||||
minLaffPoints = elevator.minLaff
|
|
||||||
else:
|
|
||||||
minLaffPoints = TTLocalizer.BoardingMore
|
|
||||||
if leaderId in avatarsFailingRequirements:
|
|
||||||
rejectText = TTLocalizer.BoardcodeMinLaffLeader % minLaffPoints
|
|
||||||
else:
|
|
||||||
avatarNameText = getAvatarText(avatarsFailingRequirements)
|
|
||||||
if len(avatarsFailingRequirements) == 1:
|
|
||||||
rejectText = TTLocalizer.BoardcodeMinLaffNonLeaderSingular % (avatarNameText, minLaffPoints)
|
|
||||||
else:
|
|
||||||
rejectText = TTLocalizer.BoardcodeMinLaffNonLeaderPlural % (avatarNameText, minLaffPoints)
|
|
||||||
elif reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
|
||||||
self.notify.debug("%s 's group cannot board because it does not have enough promotion merits." % leaderId)
|
self.notify.debug("%s 's group cannot board because it does not have enough promotion merits." % leaderId)
|
||||||
if leaderId in avatarsFailingRequirements:
|
if leaderId in avatarsFailingRequirements:
|
||||||
rejectText = TTLocalizer.BoardcodePromotionLeader
|
rejectText = TTLocalizer.BoardcodePromotionLeader
|
||||||
|
|
|
@ -105,17 +105,17 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
merger = False
|
merger = False
|
||||||
if invitee and invitee.battleId != 0:
|
if invitee and invitee.battleId != 0:
|
||||||
reason = BoardingPartyBase.BOARDCODE_BATTLE
|
reason = BoardingPartyBase.BOARDCODE_BATTLE
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
if self.hasPendingInvite(inviteeId):
|
if self.hasPendingInvite(inviteeId):
|
||||||
reason = BoardingPartyBase.BOARDCODE_PENDING_INVITE
|
reason = BoardingPartyBase.BOARDCODE_PENDING_INVITE
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
if self.__isInElevator(inviteeId):
|
if self.__isInElevator(inviteeId):
|
||||||
reason = BoardingPartyBase.BOARDCODE_IN_ELEVATOR
|
reason = BoardingPartyBase.BOARDCODE_IN_ELEVATOR
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
if self.hasActiveGroup(inviteeId):
|
if self.hasActiveGroup(inviteeId):
|
||||||
|
@ -127,7 +127,7 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
# group merge already requested?
|
# group merge already requested?
|
||||||
if self.hasPendingInvite(inviteeLeaderId):
|
if self.hasPendingInvite(inviteeLeaderId):
|
||||||
reason = BoardingPartyBase.BOARDCODE_PENDING_INVITE
|
reason = BoardingPartyBase.BOARDCODE_PENDING_INVITE
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -137,13 +137,13 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
inviteeId = inviteeLeaderId
|
inviteeId = inviteeLeaderId
|
||||||
merger = True
|
merger = True
|
||||||
else:
|
else:
|
||||||
reason = BoardingPartyBase.BOARDCODE_GROUPS_TO_LARGE
|
reason = BoardingPartyBase.BOARDCODE_GROUPS_TOO_LARGE
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
reason = BoardingPartyBase.BOARDCODE_DIFF_GROUP
|
reason = BoardingPartyBase.BOARDCODE_DIFF_GROUP
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
# Lets see what the invitee is currently doing
|
# Lets see what the invitee is currently doing
|
||||||
|
@ -152,20 +152,16 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
# I know there is an unexpected issue here when we are merging groups... lets think about this really hard..
|
# I know there is an unexpected issue here when we are merging groups... lets think about this really hard..
|
||||||
if len(self.elevatorIdList) == 1:
|
if len(self.elevatorIdList) == 1:
|
||||||
if inviteeOkay:
|
if inviteeOkay:
|
||||||
if inviteeOkay == REJECT_MINLAFF:
|
if inviteeOkay == REJECT_PROMOTION:
|
||||||
reason = BoardingPartyBase.BOARDCODE_MINLAFF
|
|
||||||
elif inviteeOkay == REJECT_PROMOTION:
|
|
||||||
reason = BoardingPartyBase.BOARDCODE_PROMOTION
|
reason = BoardingPartyBase.BOARDCODE_PROMOTION
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, self.elevatorIdList[0]])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
inviterOkay = self.checkBoard(inviterId, self.elevatorIdList[0])
|
inviterOkay = self.checkBoard(inviterId, self.elevatorIdList[0])
|
||||||
if inviterOkay:
|
if inviterOkay:
|
||||||
if inviterOkay == REJECT_MINLAFF:
|
if inviterOkay == REJECT_PROMOTION:
|
||||||
reason = BoardingPartyBase.BOARDCODE_MINLAFF
|
|
||||||
elif inviterOkay == REJECT_PROMOTION:
|
|
||||||
reason = BoardingPartyBase.BOARDCODE_PROMOTION
|
reason = BoardingPartyBase.BOARDCODE_PROMOTION
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviterId, reason, self.elevatorIdList[0]])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviterId, reason])
|
||||||
return
|
return
|
||||||
# Is the inviter already in the avIdDict? It follows they either must be in a group or have a pending invite...
|
# Is the inviter already in the avIdDict? It follows they either must be in a group or have a pending invite...
|
||||||
if inviterId in self.avIdDict:
|
if inviterId in self.avIdDict:
|
||||||
|
@ -277,8 +273,8 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
return
|
return
|
||||||
# Lets make sure we still CAN merge them in
|
# Lets make sure we still CAN merge them in
|
||||||
if ((len(self.getGroupMemberList(leaderId)) + len(self.getGroupMemberList(inviteeId))) > self.maxSize):
|
if ((len(self.getGroupMemberList(leaderId)) + len(self.getGroupMemberList(inviteeId))) > self.maxSize):
|
||||||
reason = BoardingPartyBase.BOARDCODE_GROUPS_TO_LARGE
|
reason = BoardingPartyBase.BOARDCODE_GROUPS_TOO_LARGE
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
group = self.groupListDict.get(leaderId)
|
group = self.groupListDict.get(leaderId)
|
||||||
|
@ -365,9 +361,7 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
avatar = simbase.air.doId2do.get(avId)
|
avatar = simbase.air.doId2do.get(avId)
|
||||||
if avatar:
|
if avatar:
|
||||||
if elevator.checkBoard(avatar) != 0:
|
if elevator.checkBoard(avatar) != 0:
|
||||||
if elevator.checkBoard(avatar) == REJECT_MINLAFF:
|
if elevator.checkBoard(avatar) == REJECT_PROMOTION:
|
||||||
boardOkay = BoardingPartyBase.BOARDCODE_MINLAFF
|
|
||||||
elif elevator.checkBoard(avatar) == REJECT_PROMOTION:
|
|
||||||
boardOkay = BoardingPartyBase.BOARDCODE_PROMOTION
|
boardOkay = BoardingPartyBase.BOARDCODE_PROMOTION
|
||||||
avatarsFailingRequirements.append(avId)
|
avatarsFailingRequirements.append(avId)
|
||||||
elif avatar.battleId != 0:
|
elif avatar.battleId != 0:
|
||||||
|
@ -382,8 +376,6 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
boardOkay = BoardingPartyBase.BOARDCODE_SPACE
|
boardOkay = BoardingPartyBase.BOARDCODE_SPACE
|
||||||
if boardOkay != BoardingPartyBase.BOARDCODE_OKAY:
|
if boardOkay != BoardingPartyBase.BOARDCODE_OKAY:
|
||||||
self.notify.debug('Something is wrong with the group board request')
|
self.notify.debug('Something is wrong with the group board request')
|
||||||
if boardOkay == BoardingPartyBase.BOARDCODE_MINLAFF:
|
|
||||||
self.notify.debug('An avatar did not meet the elevator laff requirements')
|
|
||||||
if boardOkay == BoardingPartyBase.BOARDCODE_PROMOTION:
|
if boardOkay == BoardingPartyBase.BOARDCODE_PROMOTION:
|
||||||
self.notify.debug('An avatar did not meet the elevator promotion requirements')
|
self.notify.debug('An avatar did not meet the elevator promotion requirements')
|
||||||
elif boardOkay == BoardingPartyBase.BOARDCODE_BATTLE:
|
elif boardOkay == BoardingPartyBase.BOARDCODE_BATTLE:
|
||||||
|
|
|
@ -12,8 +12,8 @@ from toontown.suit import DistributedSellbotBossAI
|
||||||
|
|
||||||
class DistributedBossElevatorAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
class DistributedBossElevatorAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, zone, antiShuffle = 0):
|
||||||
DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, numSeats=8, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, numSeats=8, antiShuffle=antiShuffle)
|
||||||
self.zone = zone
|
self.zone = zone
|
||||||
self.type = ELEVATOR_VP
|
self.type = ELEVATOR_VP
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
@ -53,8 +53,6 @@ class DistributedBossElevatorAI(DistributedElevatorExtAI.DistributedElevatorExtA
|
||||||
|
|
||||||
def checkBoard(self, av):
|
def checkBoard(self, av):
|
||||||
dept = ToontownGlobals.cogHQZoneId2deptIndex(self.zone)
|
dept = ToontownGlobals.cogHQZoneId2deptIndex(self.zone)
|
||||||
if av.hp < self.minLaff:
|
|
||||||
return REJECT_MINLAFF
|
|
||||||
if not av.readyForPromotion(dept):
|
if not av.readyForPromotion(dept):
|
||||||
return REJECT_PROMOTION
|
return REJECT_PROMOTION
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -435,7 +435,9 @@ class DistributedBuilding(DistributedObject.DistributedObject):
|
||||||
return
|
return
|
||||||
dnaStore = self.cr.playGame.dnaStore
|
dnaStore = self.cr.playGame.dnaStore
|
||||||
level = int(self.difficulty / 2) + 1
|
level = int(self.difficulty / 2) + 1
|
||||||
suitNP = dnaStore.findNode('suit_landmark_' + chr(self.track) + str(level))
|
if level > 5:
|
||||||
|
self.notify.warning('Level is bigger than 5: %s' % level)
|
||||||
|
suitNP = dnaStore.findNode('suit_landmark_' + chr(self.track) + str(min(level, 5)))
|
||||||
zoneId = dnaStore.getZoneFromBlockNumber(self.block)
|
zoneId = dnaStore.getZoneFromBlockNumber(self.block)
|
||||||
newParentNP = base.cr.playGame.hood.loader.zoneDict[zoneId]
|
newParentNP = base.cr.playGame.hood.loader.zoneDict[zoneId]
|
||||||
suitBuildingNP = suitNP.copyTo(newParentNP)
|
suitBuildingNP = suitNP.copyTo(newParentNP)
|
||||||
|
|
|
@ -23,7 +23,7 @@ from toontown.cogdominium.CogdoLayout import CogdoLayout
|
||||||
from toontown.cogdominium.SuitPlannerCogdoInteriorAI import SuitPlannerCogdoInteriorAI
|
from toontown.cogdominium.SuitPlannerCogdoInteriorAI import SuitPlannerCogdoInteriorAI
|
||||||
from toontown.hood import ZoneUtil
|
from toontown.hood import ZoneUtil
|
||||||
from toontown.toonbase.ToontownGlobals import ToonHall
|
from toontown.toonbase.ToontownGlobals import ToonHall
|
||||||
|
from toontown.toonbase import ToontownGlobals
|
||||||
|
|
||||||
class DistributedBuildingAI(DistributedObjectAI.DistributedObjectAI):
|
class DistributedBuildingAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
def __init__(self, air, blockNumber, zoneId, trophyMgr):
|
def __init__(self, air, blockNumber, zoneId, trophyMgr):
|
||||||
|
@ -292,6 +292,7 @@ class DistributedBuildingAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
self.air.writeServerEvent('buildingDefeated', t, '%s|%s|%s|%s' % (self.track, self.numFloors, self.zoneId, victorList))
|
self.air.writeServerEvent('buildingDefeated', t, '%s|%s|%s|%s' % (self.track, self.numFloors, self.zoneId, victorList))
|
||||||
if toon is not None:
|
if toon is not None:
|
||||||
self.air.questManager.toonKilledBuilding(toon, self.track, self.difficulty, self.numFloors, self.zoneId, 0)
|
self.air.questManager.toonKilledBuilding(toon, self.track, self.difficulty, self.numFloors, self.zoneId, 0)
|
||||||
|
toon.addStat(ToontownGlobals.STAT_BLDG)
|
||||||
for i in xrange(0, 4):
|
for i in xrange(0, 4):
|
||||||
victor = victorList[i]
|
victor = victorList[i]
|
||||||
if (victor is None) or (victor not in self.air.doId2do):
|
if (victor is None) or (victor not in self.air.doId2do):
|
||||||
|
@ -329,6 +330,7 @@ class DistributedBuildingAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
|
|
||||||
if toon != None:
|
if toon != None:
|
||||||
self.air.questManager.toonKilledBuilding(toon, self.track, self.difficulty, 5, self.zoneId, 1)
|
self.air.questManager.toonKilledBuilding(toon, self.track, self.difficulty, 5, self.zoneId, 1)
|
||||||
|
toon.addStat(ToontownGlobals.STAT_COGDO)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
victorList.extend([None, None, None, None])
|
victorList.extend([None, None, None, None])
|
||||||
|
|
|
@ -3,7 +3,7 @@ import DistributedBossElevatorAI
|
||||||
|
|
||||||
class DistributedCFOElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
class DistributedCFOElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, zone, antiShuffle = 0):
|
||||||
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle)
|
||||||
self.type = ELEVATOR_CFO
|
self.type = ELEVATOR_CFO
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
|
|
@ -3,7 +3,7 @@ import DistributedBossElevatorAI
|
||||||
|
|
||||||
class DistributedCJElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
class DistributedCJElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, zone, antiShuffle = 0):
|
||||||
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle)
|
||||||
self.type = ELEVATOR_CJ
|
self.type = ELEVATOR_CJ
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
|
|
@ -41,8 +41,8 @@ class DistributedClubElevatorAI(DistributedElevatorFSMAI.DistributedElevatorFSMA
|
||||||
id = 0
|
id = 0
|
||||||
DoBlockedRoomCheck = simbase.config.GetBool('elevator-blocked-rooms-check', 1)
|
DoBlockedRoomCheck = simbase.config.GetBool('elevator-blocked-rooms-check', 1)
|
||||||
|
|
||||||
def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0):
|
||||||
DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle, minLaff = minLaff)
|
DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle)
|
||||||
FSM.__init__(self, 'ElevatorFloor_%s_FSM' % self.id)
|
FSM.__init__(self, 'ElevatorFloor_%s_FSM' % self.id)
|
||||||
self.type = ElevatorConstants.ELEVATOR_COUNTRY_CLUB
|
self.type = ElevatorConstants.ELEVATOR_COUNTRY_CLUB
|
||||||
self.countdownTime = ElevatorConstants.ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorConstants.ElevatorData[self.type]['countdown']
|
||||||
|
@ -291,8 +291,6 @@ class DistributedClubElevatorAI(DistributedElevatorFSMAI.DistributedElevatorFSMA
|
||||||
return self.latch
|
return self.latch
|
||||||
|
|
||||||
def checkBoard(self, av):
|
def checkBoard(self, av):
|
||||||
if av.hp < self.minLaff:
|
|
||||||
return ElevatorConstants.REJECT_MINLAFF
|
|
||||||
if self.DoBlockedRoomCheck and self.bldg:
|
if self.DoBlockedRoomCheck and self.bldg:
|
||||||
if hasattr(self.bldg, 'blockedRooms'):
|
if hasattr(self.bldg, 'blockedRooms'):
|
||||||
if self.bldg.blockedRooms:
|
if self.bldg.blockedRooms:
|
||||||
|
|
|
@ -344,8 +344,6 @@ class DistributedElevator(DistributedObject.DistributedObject):
|
||||||
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
||||||
if reason == REJECT_SHUFFLE:
|
if reason == REJECT_SHUFFLE:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
||||||
elif reason == REJECT_MINLAFF:
|
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorMinLaff % self.minLaff)
|
|
||||||
elif reason == REJECT_PROMOTION:
|
elif reason == REJECT_PROMOTION:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
||||||
doneStatus = {'where': 'reject'}
|
doneStatus = {'where': 'reject'}
|
||||||
|
@ -496,12 +494,6 @@ class DistributedElevator(DistributedObject.DistributedObject):
|
||||||
def getAntiShuffle(self):
|
def getAntiShuffle(self):
|
||||||
return self.antiShuffle
|
return self.antiShuffle
|
||||||
|
|
||||||
def setMinLaff(self, minLaff):
|
|
||||||
self.minLaff = minLaff
|
|
||||||
|
|
||||||
def getMinLaff(self):
|
|
||||||
return self.minLaff
|
|
||||||
|
|
||||||
def storeToonTrack(self, avId, track):
|
def storeToonTrack(self, avId, track):
|
||||||
self.clearToonTrack(avId)
|
self.clearToonTrack(avId)
|
||||||
self.__toonTracks[avId] = track
|
self.__toonTracks[avId] = track
|
||||||
|
|
|
@ -11,7 +11,7 @@ from direct.directnotify import DirectNotifyGlobal
|
||||||
class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI):
|
class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorAI')
|
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorAI')
|
||||||
|
|
||||||
def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0):
|
||||||
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
||||||
self.type = ELEVATOR_NORMAL
|
self.type = ELEVATOR_NORMAL
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
@ -19,7 +19,6 @@ class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
self.bldgDoId = bldg.getDoId()
|
self.bldgDoId = bldg.getDoId()
|
||||||
self.seats = []
|
self.seats = []
|
||||||
self.setAntiShuffle(antiShuffle)
|
self.setAntiShuffle(antiShuffle)
|
||||||
self.setMinLaff(minLaff)
|
|
||||||
if self.antiShuffle:
|
if self.antiShuffle:
|
||||||
if not hasattr(simbase.air, 'elevatorTripId'):
|
if not hasattr(simbase.air, 'elevatorTripId'):
|
||||||
simbase.air.elevatorTripId = 1
|
simbase.air.elevatorTripId = 1
|
||||||
|
@ -145,11 +144,9 @@ class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
return self.fsm.getCurrentState().getName()
|
return self.fsm.getCurrentState().getName()
|
||||||
|
|
||||||
def avIsOKToBoard(self, av):
|
def avIsOKToBoard(self, av):
|
||||||
return av.hp > self.minLaff and self.accepting
|
return self.accepting
|
||||||
|
|
||||||
def checkBoard(self, av):
|
def checkBoard(self, av):
|
||||||
if av.hp < self.minLaff:
|
|
||||||
return REJECT_MINLAFF
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def requestBoard(self, *args):
|
def requestBoard(self, *args):
|
||||||
|
@ -288,10 +285,4 @@ class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
self.antiShuffle = antiShuffle
|
self.antiShuffle = antiShuffle
|
||||||
|
|
||||||
def getAntiShuffle(self):
|
def getAntiShuffle(self):
|
||||||
return self.antiShuffle
|
return self.antiShuffle
|
||||||
|
|
||||||
def setMinLaff(self, minLaff):
|
|
||||||
self.minLaff = minLaff
|
|
||||||
|
|
||||||
def getMinLaff(self):
|
|
||||||
return self.minLaff
|
|
|
@ -11,8 +11,8 @@ from direct.directnotify import DirectNotifyGlobal
|
||||||
class DistributedElevatorExtAI(DistributedElevatorAI.DistributedElevatorAI):
|
class DistributedElevatorExtAI(DistributedElevatorAI.DistributedElevatorAI):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorExtAI')
|
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorExtAI')
|
||||||
|
|
||||||
def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0):
|
||||||
DistributedElevatorAI.DistributedElevatorAI.__init__(self, air, bldg, numSeats, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedElevatorAI.DistributedElevatorAI.__init__(self, air, bldg, numSeats, antiShuffle=antiShuffle)
|
||||||
self.anyToonsBailed = 0
|
self.anyToonsBailed = 0
|
||||||
self.boardingParty = None
|
self.boardingParty = None
|
||||||
return
|
return
|
||||||
|
|
|
@ -316,8 +316,6 @@ class DistributedElevatorFSM(DistributedObject.DistributedObject, FSM):
|
||||||
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
||||||
if reason == REJECT_SHUFFLE:
|
if reason == REJECT_SHUFFLE:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
||||||
elif reason == REJECT_MINLAFF:
|
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorMinLaff % self.minLaff)
|
|
||||||
elif reason == REJECT_PROMOTION:
|
elif reason == REJECT_PROMOTION:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
||||||
elif reason == REJECT_BLOCKED_ROOM:
|
elif reason == REJECT_BLOCKED_ROOM:
|
||||||
|
@ -475,11 +473,5 @@ class DistributedElevatorFSM(DistributedObject.DistributedObject, FSM):
|
||||||
def getAntiShuffle(self):
|
def getAntiShuffle(self):
|
||||||
return self.antiShuffle
|
return self.antiShuffle
|
||||||
|
|
||||||
def setMinLaff(self, minLaff):
|
|
||||||
self.minLaff = minLaff
|
|
||||||
|
|
||||||
def getMinLaff(self):
|
|
||||||
return self.minLaff
|
|
||||||
|
|
||||||
def getDestName(self):
|
def getDestName(self):
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -38,7 +38,7 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM):
|
||||||
'Opening'] }
|
'Opening'] }
|
||||||
id = 0
|
id = 0
|
||||||
|
|
||||||
def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0):
|
||||||
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
||||||
FSM.__init__(self, 'Elevator_%s_FSM' % self.id)
|
FSM.__init__(self, 'Elevator_%s_FSM' % self.id)
|
||||||
self.type = ELEVATOR_NORMAL
|
self.type = ELEVATOR_NORMAL
|
||||||
|
@ -50,7 +50,6 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM):
|
||||||
self.seats.append(None)
|
self.seats.append(None)
|
||||||
self.accepting = 0
|
self.accepting = 0
|
||||||
self.setAntiShuffle(antiShuffle)
|
self.setAntiShuffle(antiShuffle)
|
||||||
self.setMinLaff(minLaff)
|
|
||||||
if self.antiShuffle:
|
if self.antiShuffle:
|
||||||
if not hasattr(simbase.air, 'elevatorTripId'):
|
if not hasattr(simbase.air, 'elevatorTripId'):
|
||||||
simbase.air.elevatorTripId = 1
|
simbase.air.elevatorTripId = 1
|
||||||
|
@ -146,13 +145,9 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM):
|
||||||
return self.state
|
return self.state
|
||||||
|
|
||||||
def avIsOKToBoard(self, av):
|
def avIsOKToBoard(self, av):
|
||||||
if av.hp > self.minLaff:
|
|
||||||
pass
|
|
||||||
return self.accepting
|
return self.accepting
|
||||||
|
|
||||||
def checkBoard(self, av):
|
def checkBoard(self, av):
|
||||||
if av.hp < self.minLaff:
|
|
||||||
return REJECT_MINLAFF
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def requestBoard(self, *args):
|
def requestBoard(self, *args):
|
||||||
|
@ -274,10 +269,4 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM):
|
||||||
self.antiShuffle = antiShuffle
|
self.antiShuffle = antiShuffle
|
||||||
|
|
||||||
def getAntiShuffle(self):
|
def getAntiShuffle(self):
|
||||||
return self.antiShuffle
|
return self.antiShuffle
|
||||||
|
|
||||||
def setMinLaff(self, minLaff):
|
|
||||||
self.minLaff = minLaff
|
|
||||||
|
|
||||||
def getMinLaff(self):
|
|
||||||
return self.minLaff
|
|
|
@ -40,8 +40,8 @@ class DistributedElevatorFloorAI(DistributedElevatorFSMAI.DistributedElevatorFSM
|
||||||
'Opening'] }
|
'Opening'] }
|
||||||
id = 0
|
id = 0
|
||||||
|
|
||||||
def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0):
|
||||||
DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle, minLaff = minLaff)
|
DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle)
|
||||||
FSM.__init__(self, 'ElevatorFloor_%s_FSM' % self.id)
|
FSM.__init__(self, 'ElevatorFloor_%s_FSM' % self.id)
|
||||||
self.type = ELEVATOR_STAGE
|
self.type = ELEVATOR_STAGE
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
|
|
@ -10,6 +10,7 @@ from direct.distributed import DistributedObject
|
||||||
from direct.fsm import State
|
from direct.fsm import State
|
||||||
from toontown.battle import BattleBase
|
from toontown.battle import BattleBase
|
||||||
from toontown.hood import ZoneUtil
|
from toontown.hood import ZoneUtil
|
||||||
|
from toontown.suit import SuitDNA
|
||||||
|
|
||||||
class DistributedSuitInterior(DistributedObject.DistributedObject):
|
class DistributedSuitInterior(DistributedObject.DistributedObject):
|
||||||
id = 0
|
id = 0
|
||||||
|
@ -249,14 +250,15 @@ class DistributedSuitInterior(DistributedObject.DistributedObject):
|
||||||
def __playElevator(self, ts, name, callback):
|
def __playElevator(self, ts, name, callback):
|
||||||
SuitHs = []
|
SuitHs = []
|
||||||
SuitPositions = []
|
SuitPositions = []
|
||||||
|
DeptName = SuitDNA.suitDeptFilenames[self.suits[0].style.dept]
|
||||||
if self.floorModel:
|
if self.floorModel:
|
||||||
self.floorModel.removeNode()
|
self.floorModel.removeNode()
|
||||||
if self.currentFloor == 0:
|
if self.currentFloor == 0:
|
||||||
self.floorModel = loader.loadModel('phase_7/models/modules/suit_interior')
|
self.floorModel = loader.loadModel('phase_7/models/modules/suit_interior_%s' % DeptName)
|
||||||
SuitHs = self.BottomFloor_SuitHs
|
SuitHs = self.BottomFloor_SuitHs
|
||||||
SuitPositions = self.BottomFloor_SuitPositions
|
SuitPositions = self.BottomFloor_SuitPositions
|
||||||
elif self.currentFloor == self.numFloors - 1:
|
elif self.currentFloor == self.numFloors - 1:
|
||||||
self.floorModel = loader.loadModel('phase_7/models/modules/boss_suit_office')
|
self.floorModel = loader.loadModel('phase_7/models/modules/boss_suit_office_%s' % DeptName)
|
||||||
SuitHs = self.BossOffice_SuitHs
|
SuitHs = self.BossOffice_SuitHs
|
||||||
SuitPositions = self.BossOffice_SuitPositions
|
SuitPositions = self.BossOffice_SuitPositions
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -3,7 +3,7 @@ import DistributedBossElevatorAI
|
||||||
|
|
||||||
class DistributedVPElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
class DistributedVPElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, zone, antiShuffle = 0):
|
||||||
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle)
|
||||||
self.type = ELEVATOR_VP
|
self.type = ELEVATOR_VP
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
|
|
@ -11,11 +11,10 @@ ELEVATOR_COUNTRY_CLUB = 8
|
||||||
ELEVATOR_FIELD = 9
|
ELEVATOR_FIELD = 9
|
||||||
REJECT_NOREASON = 0
|
REJECT_NOREASON = 0
|
||||||
REJECT_SHUFFLE = 1
|
REJECT_SHUFFLE = 1
|
||||||
REJECT_MINLAFF = 2
|
REJECT_NOSEAT = 2
|
||||||
REJECT_NOSEAT = 3
|
REJECT_PROMOTION = 3
|
||||||
REJECT_PROMOTION = 4
|
REJECT_BLOCKED_ROOM = 4
|
||||||
REJECT_BLOCKED_ROOM = 5
|
REJECT_BOARDINGPARTY = 5
|
||||||
REJECT_BOARDINGPARTY = 6
|
|
||||||
MAX_GROUP_BOARDING_TIME = 6.0
|
MAX_GROUP_BOARDING_TIME = 6.0
|
||||||
ElevatorData = {ELEVATOR_NORMAL: {'openTime': 2.0,
|
ElevatorData = {ELEVATOR_NORMAL: {'openTime': 2.0,
|
||||||
'closeTime': 2.0,
|
'closeTime': 2.0,
|
||||||
|
|
|
@ -15,45 +15,6 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
||||||
self.isSpecial = isSpecial
|
self.isSpecial = isSpecial
|
||||||
CatalogItem.CatalogItem.makeNewItem(self)
|
CatalogItem.CatalogItem.makeNewItem(self)
|
||||||
|
|
||||||
def storedInTrunk(self):
|
|
||||||
return 1
|
|
||||||
|
|
||||||
def notOfferedTo(self, avatar):
|
|
||||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
|
||||||
if article in [AHat,
|
|
||||||
AGlasses,
|
|
||||||
ABackpack,
|
|
||||||
AShoes]:
|
|
||||||
return 0
|
|
||||||
forBoys = article in [ABoysHat,
|
|
||||||
ABoysGlasses,
|
|
||||||
ABoysBackpack,
|
|
||||||
ABoysShoes]
|
|
||||||
if avatar.getStyle().getGender() == 'm':
|
|
||||||
return not forBoys
|
|
||||||
else:
|
|
||||||
return forBoys
|
|
||||||
|
|
||||||
def forBoysOnly(self):
|
|
||||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
|
||||||
if article in [ABoysHat,
|
|
||||||
ABoysGlasses,
|
|
||||||
ABoysBackpack,
|
|
||||||
ABoysShoes]:
|
|
||||||
return 1
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def forGirlsOnly(self):
|
|
||||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
|
||||||
if article in [AGirlsHat,
|
|
||||||
AGirlsGlasses,
|
|
||||||
AGirlsBackpack,
|
|
||||||
AGirlsShoes]:
|
|
||||||
return 1
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def getPurchaseLimit(self):
|
def getPurchaseLimit(self):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
@ -64,8 +25,6 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
||||||
return 1
|
return 1
|
||||||
if avatar.mailboxContents.count(self) != 0:
|
if avatar.mailboxContents.count(self) != 0:
|
||||||
return 1
|
return 1
|
||||||
if self in avatar.awardMailboxContents or self in avatar.onAwardOrder:
|
|
||||||
return 1
|
|
||||||
str = AccessoryTypes[self.accessoryType][ATString]
|
str = AccessoryTypes[self.accessoryType][ATString]
|
||||||
if self.isHat():
|
if self.isHat():
|
||||||
defn = ToonDNA.HatStyles[str]
|
defn = ToonDNA.HatStyles[str]
|
||||||
|
@ -122,10 +81,7 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
||||||
|
|
||||||
def recordPurchase(self, avatar, optional):
|
def recordPurchase(self, avatar, optional):
|
||||||
if avatar.isTrunkFull():
|
if avatar.isTrunkFull():
|
||||||
if avatar.getMaxAccessories() == 0:
|
return ToontownGlobals.P_NoRoomForItem
|
||||||
return ToontownGlobals.P_NoTrunk
|
|
||||||
else:
|
|
||||||
return ToontownGlobals.P_NoRoomForItem
|
|
||||||
str = AccessoryTypes[self.accessoryType][ATString]
|
str = AccessoryTypes[self.accessoryType][ATString]
|
||||||
if self.isHat():
|
if self.isHat():
|
||||||
defn = ToonDNA.HatStyles[str]
|
defn = ToonDNA.HatStyles[str]
|
||||||
|
@ -218,6 +174,9 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
||||||
avatar.d_catalogGenAccessories()
|
avatar.d_catalogGenAccessories()
|
||||||
return ToontownGlobals.P_ItemAvailable
|
return ToontownGlobals.P_ItemAvailable
|
||||||
|
|
||||||
|
def getDeliveryTime(self):
|
||||||
|
return 60
|
||||||
|
|
||||||
def getPicture(self, avatar):
|
def getPicture(self, avatar):
|
||||||
model = self.loadModel()
|
model = self.loadModel()
|
||||||
spin = 1
|
spin = 1
|
||||||
|
@ -239,7 +198,6 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
||||||
model.setColorScale(color, 1)
|
model.setColorScale(color, 1)
|
||||||
if needsAlpha:
|
if needsAlpha:
|
||||||
model.setTransparency(1)
|
model.setTransparency(1)
|
||||||
return
|
|
||||||
|
|
||||||
def loadModel(self):
|
def loadModel(self):
|
||||||
modelPath = self.getFilename()
|
modelPath = self.getFilename()
|
||||||
|
@ -264,17 +222,14 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
||||||
from toontown.toontowngui import TTDialog
|
from toontown.toontowngui import TTDialog
|
||||||
avatar = base.localAvatar
|
avatar = base.localAvatar
|
||||||
accessoriesOnOrder = 0
|
accessoriesOnOrder = 0
|
||||||
for item in avatar.onOrder + avatar.mailboxContents:
|
for item in avatar.onOrder + avatar.mailboxContents + avatar.onGiftOrder:
|
||||||
if item.storedInTrunk():
|
if hasattr(item, 'isHat'):
|
||||||
accessoriesOnOrder += 1
|
accessoriesOnOrder += 1
|
||||||
|
|
||||||
if avatar.isTrunkFull(accessoriesOnOrder):
|
if avatar.isTrunkFull(accessoriesOnOrder):
|
||||||
self.requestPurchaseCleanup()
|
self.requestPurchaseCleanup()
|
||||||
buttonCallback = PythonUtil.Functor(self.__handleFullPurchaseDialog, phone, callback)
|
buttonCallback = PythonUtil.Functor(self.__handleFullPurchaseDialog, phone, callback)
|
||||||
if avatar.getMaxAccessories() == 0:
|
text = TTLocalizer.CatalogPurchaseTrunkFull
|
||||||
text = TTLocalizer.CatalogPurchaseNoTrunk
|
|
||||||
else:
|
|
||||||
text = TTLocalizer.CatalogPurchaseTrunkFull
|
|
||||||
self.dialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=text, text_wordwrap=15, command=buttonCallback)
|
self.dialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=text, text_wordwrap=15, command=buttonCallback)
|
||||||
self.dialog.show()
|
self.dialog.show()
|
||||||
else:
|
else:
|
||||||
|
@ -305,25 +260,19 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
||||||
return TTLocalizer.CatalogAcceptShoes
|
return TTLocalizer.CatalogAcceptShoes
|
||||||
elif retcode == ToontownGlobals.P_NoRoomForItem:
|
elif retcode == ToontownGlobals.P_NoRoomForItem:
|
||||||
return TTLocalizer.CatalogAcceptTrunkFull
|
return TTLocalizer.CatalogAcceptTrunkFull
|
||||||
elif retcode == ToontownGlobals.P_NoTrunk:
|
|
||||||
return TTLocalizer.CatalogAcceptNoTrunk
|
|
||||||
return CatalogItem.CatalogItem.getAcceptItemErrorText(self, retcode)
|
return CatalogItem.CatalogItem.getAcceptItemErrorText(self, retcode)
|
||||||
|
|
||||||
def isHat(self):
|
def isHat(self):
|
||||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
return AccessoryTypes[self.accessoryType][ATArticle] == AHat
|
||||||
return article in [AHat, ABoysHat, AGirlsHat]
|
|
||||||
|
|
||||||
def areGlasses(self):
|
def areGlasses(self):
|
||||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
return AccessoryTypes[self.accessoryType][ATArticle] == AGlasses
|
||||||
return article in [AGlasses, ABoysGlasses, AGirlsGlasses]
|
|
||||||
|
|
||||||
def isBackpack(self):
|
def isBackpack(self):
|
||||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
return AccessoryTypes[self.accessoryType][ATArticle] == ABackpack
|
||||||
return article in [ABackpack, ABoysBackpack, AGirlsBackpack]
|
|
||||||
|
|
||||||
def areShoes(self):
|
def areShoes(self):
|
||||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
return AccessoryTypes[self.accessoryType][ATArticle] == AShoes
|
||||||
return article in [AShoes, ABoysShoes, AGirlsShoes]
|
|
||||||
|
|
||||||
def output(self, store = -1):
|
def output(self, store = -1):
|
||||||
return 'CatalogAccessoryItem(%s%s)' % (self.accessoryType, self.formatOptionalData(store))
|
return 'CatalogAccessoryItem(%s%s)' % (self.accessoryType, self.formatOptionalData(store))
|
||||||
|
|
|
@ -7,15 +7,6 @@ AHat = 0
|
||||||
AGlasses = 1
|
AGlasses = 1
|
||||||
ABackpack = 2
|
ABackpack = 2
|
||||||
AShoes = 3
|
AShoes = 3
|
||||||
ABoysHat = 4
|
|
||||||
ABoysGlasses = 5
|
|
||||||
ABoysBackpack = 6
|
|
||||||
ABoysShoes = 7
|
|
||||||
AGirlsHat = 8
|
|
||||||
AGirlsGlasses = 9
|
|
||||||
AGirlsBackpack = 10
|
|
||||||
AGirlsShoes = 11
|
|
||||||
APriceTest = 5
|
|
||||||
APriceBasic = 250
|
APriceBasic = 250
|
||||||
APriceBasicPlus = 400
|
APriceBasicPlus = 400
|
||||||
APriceCool = 800
|
APriceCool = 800
|
||||||
|
@ -28,7 +19,7 @@ AccessoryTypes = {101: (AHat,
|
||||||
'hsf1',
|
'hsf1',
|
||||||
APriceCool,
|
APriceCool,
|
||||||
5),
|
5),
|
||||||
103: (AGirlsHat,
|
103: (AHat,
|
||||||
'hrb1',
|
'hrb1',
|
||||||
APriceBasic,
|
APriceBasic,
|
||||||
1),
|
1),
|
||||||
|
@ -40,11 +31,11 @@ AccessoryTypes = {101: (AHat,
|
||||||
'hsf3',
|
'hsf3',
|
||||||
APriceCool,
|
APriceCool,
|
||||||
0),
|
0),
|
||||||
106: (AGirlsHat,
|
106: (AHat,
|
||||||
'hrb2',
|
'hrb2',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
3),
|
3),
|
||||||
107: (AGirlsHat,
|
107: (AHat,
|
||||||
'hrb3',
|
'hrb3',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
0),
|
0),
|
||||||
|
@ -96,7 +87,7 @@ AccessoryTypes = {101: (AHat,
|
||||||
'hpb1',
|
'hpb1',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
6),
|
6),
|
||||||
120: (ABoysHat,
|
120: (AHat,
|
||||||
'hcr1',
|
'hcr1',
|
||||||
10000,
|
10000,
|
||||||
5),
|
5),
|
||||||
|
@ -132,23 +123,23 @@ AccessoryTypes = {101: (AHat,
|
||||||
'hst1',
|
'hst1',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
1),
|
1),
|
||||||
129: (AGirlsHat,
|
129: (AHat,
|
||||||
'hsu1',
|
'hsu1',
|
||||||
APriceCool,
|
APriceCool,
|
||||||
1),
|
1),
|
||||||
130: (AGirlsHat,
|
130: (AHat,
|
||||||
'hrb4',
|
'hrb4',
|
||||||
APriceBasic,
|
APriceBasic,
|
||||||
1),
|
1),
|
||||||
131: (AGirlsHat,
|
131: (AHat,
|
||||||
'hrb5',
|
'hrb5',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
4),
|
4),
|
||||||
132: (AGirlsHat,
|
132: (AHat,
|
||||||
'hrb6',
|
'hrb6',
|
||||||
APriceBasic,
|
APriceBasic,
|
||||||
2),
|
2),
|
||||||
133: (AGirlsHat,
|
133: (AHat,
|
||||||
'hrb7',
|
'hrb7',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
6),
|
6),
|
||||||
|
@ -156,7 +147,7 @@ AccessoryTypes = {101: (AHat,
|
||||||
'hat1',
|
'hat1',
|
||||||
APriceCool,
|
APriceCool,
|
||||||
2),
|
2),
|
||||||
135: (AGirlsHat,
|
135: (AHat,
|
||||||
'hhd1',
|
'hhd1',
|
||||||
APriceCool,
|
APriceCool,
|
||||||
2),
|
2),
|
||||||
|
@ -188,11 +179,11 @@ AccessoryTypes = {101: (AHat,
|
||||||
'hft2',
|
'hft2',
|
||||||
APriceCool,
|
APriceCool,
|
||||||
6),
|
6),
|
||||||
143: (ABoysHat,
|
143: (AHat,
|
||||||
'hhd2',
|
'hhd2',
|
||||||
APriceCool,
|
APriceCool,
|
||||||
3),
|
3),
|
||||||
144: (AGirlsHat,
|
144: (AHat,
|
||||||
'hpc1',
|
'hpc1',
|
||||||
APriceCool,
|
APriceCool,
|
||||||
5),
|
5),
|
||||||
|
@ -208,7 +199,7 @@ AccessoryTypes = {101: (AHat,
|
||||||
'hat2',
|
'hat2',
|
||||||
APriceCool,
|
APriceCool,
|
||||||
2),
|
2),
|
||||||
148: (AGirlsHat,
|
148: (AHat,
|
||||||
'htr1',
|
'htr1',
|
||||||
10000,
|
10000,
|
||||||
3),
|
3),
|
||||||
|
@ -280,7 +271,7 @@ AccessoryTypes = {101: (AHat,
|
||||||
'hby1',
|
'hby1',
|
||||||
APriceAwesome,
|
APriceAwesome,
|
||||||
5),
|
5),
|
||||||
166: (AGirlsHat,
|
166: (AHat,
|
||||||
'hrb8',
|
'hrb8',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
6),
|
6),
|
||||||
|
@ -292,7 +283,7 @@ AccessoryTypes = {101: (AHat,
|
||||||
'hbb7',
|
'hbb7',
|
||||||
APriceBasic,
|
APriceBasic,
|
||||||
6),
|
6),
|
||||||
169: (AGirlsHat,
|
169: (AHat,
|
||||||
'hrb9',
|
'hrb9',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
6),
|
6),
|
||||||
|
@ -300,7 +291,7 @@ AccessoryTypes = {101: (AHat,
|
||||||
'hwt2',
|
'hwt2',
|
||||||
APriceAwesome,
|
APriceAwesome,
|
||||||
4),
|
4),
|
||||||
171: (AGirlsHat,
|
171: (AHat,
|
||||||
'hhw1',
|
'hhw1',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
7),
|
7),
|
||||||
|
@ -412,11 +403,11 @@ AccessoryTypes = {101: (AHat,
|
||||||
'gsr1',
|
'gsr1',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
5),
|
5),
|
||||||
223: (ABoysGlasses,
|
223: (AGlasses,
|
||||||
'ghw1',
|
'ghw1',
|
||||||
APriceTest,
|
APriceBasic,
|
||||||
0),
|
0),
|
||||||
224: (ABoysGlasses,
|
224: (AGlasses,
|
||||||
'ghw2',
|
'ghw2',
|
||||||
APriceBasic,
|
APriceBasic,
|
||||||
7),
|
7),
|
||||||
|
@ -564,11 +555,11 @@ AccessoryTypes = {101: (AHat,
|
||||||
'scs1',
|
'scs1',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
6),
|
6),
|
||||||
405: (ABoysShoes,
|
405: (AShoes,
|
||||||
'swt1',
|
'swt1',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
1),
|
1),
|
||||||
406: (AGirlsShoes,
|
406: (AShoes,
|
||||||
'smj1',
|
'smj1',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
1),
|
1),
|
||||||
|
@ -604,11 +595,11 @@ AccessoryTypes = {101: (AHat,
|
||||||
'sht1',
|
'sht1',
|
||||||
APriceAwesome,
|
APriceAwesome,
|
||||||
4),
|
4),
|
||||||
415: (AGirlsShoes,
|
415: (AShoes,
|
||||||
'smj2',
|
'smj2',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
3),
|
3),
|
||||||
416: (AGirlsShoes,
|
416: (AShoes,
|
||||||
'smj3',
|
'smj3',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
4),
|
4),
|
||||||
|
@ -664,7 +655,7 @@ AccessoryTypes = {101: (AHat,
|
||||||
'slf1',
|
'slf1',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
3),
|
3),
|
||||||
430: (AGirlsShoes,
|
430: (AShoes,
|
||||||
'smj4',
|
'smj4',
|
||||||
APriceBasicPlus,
|
APriceBasicPlus,
|
||||||
2),
|
2),
|
||||||
|
|
|
@ -16,9 +16,7 @@ class CatalogBeanItem(CatalogItem.CatalogItem):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def reachedPurchaseLimit(self, avatar):
|
def reachedPurchaseLimit(self, avatar):
|
||||||
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or self in avatar.awardMailboxContents or self in avatar.onAwardOrder:
|
return self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def getAcceptItemErrorText(self, retcode):
|
def getAcceptItemErrorText(self, retcode):
|
||||||
if retcode == ToontownGlobals.P_ItemAvailable:
|
if retcode == ToontownGlobals.P_ItemAvailable:
|
||||||
|
|
|
@ -15,9 +15,7 @@ class CatalogChatItem(CatalogItem.CatalogItem):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def reachedPurchaseLimit(self, avatar):
|
def reachedPurchaseLimit(self, avatar):
|
||||||
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or self in avatar.awardMailboxContents or self in avatar.onAwardOrder:
|
return self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or avatar.customMessages.count(self.customIndex) != 0
|
||||||
return 1
|
|
||||||
return avatar.customMessages.count(self.customIndex) != 0
|
|
||||||
|
|
||||||
def getTypeName(self):
|
def getTypeName(self):
|
||||||
return TTLocalizer.ChatTypeName
|
return TTLocalizer.ChatTypeName
|
||||||
|
|
|
@ -291,7 +291,7 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
|
||||||
1818: (AGirlsSkirt, 'sa_gs20', 5000),
|
1818: (AGirlsSkirt, 'sa_gs20', 5000),
|
||||||
1819: (AGirlsSkirt, 'sa_gs21', 5000),
|
1819: (AGirlsSkirt, 'sa_gs21', 5000),
|
||||||
1820: (AShirt, 'sa_ss55', 5000),
|
1820: (AShirt, 'sa_ss55', 5000),
|
||||||
1821: (AShirt, 'weed', 5000)}
|
1821: (AShirt, 'flannel', 300)}
|
||||||
|
|
||||||
class CatalogClothingItem(CatalogItem.CatalogItem):
|
class CatalogClothingItem(CatalogItem.CatalogItem):
|
||||||
|
|
||||||
|
@ -338,8 +338,6 @@ class CatalogClothingItem(CatalogItem.CatalogItem):
|
||||||
return 1
|
return 1
|
||||||
if avatar.mailboxContents.count(self) != 0:
|
if avatar.mailboxContents.count(self) != 0:
|
||||||
return 1
|
return 1
|
||||||
if self in avatar.awardMailboxContents or self in avatar.onAwardOrder:
|
|
||||||
return 1
|
|
||||||
str = ClothingTypes[self.clothingType][CTString]
|
str = ClothingTypes[self.clothingType][CTString]
|
||||||
dna = avatar.getStyle()
|
dna = avatar.getStyle()
|
||||||
if self.isShirt():
|
if self.isShirt():
|
||||||
|
@ -374,7 +372,7 @@ class CatalogClothingItem(CatalogItem.CatalogItem):
|
||||||
return TTLocalizer.ClothingArticleNames[article]
|
return TTLocalizer.ClothingArticleNames[article]
|
||||||
|
|
||||||
def recordPurchase(self, avatar, optional):
|
def recordPurchase(self, avatar, optional):
|
||||||
if avatar.isClosetFull():
|
if avatar.isClosetFull(1):
|
||||||
return ToontownGlobals.P_NoRoomForItem
|
return ToontownGlobals.P_NoRoomForItem
|
||||||
str = ClothingTypes[self.clothingType][CTString]
|
str = ClothingTypes[self.clothingType][CTString]
|
||||||
dna = avatar.getStyle()
|
dna = avatar.getStyle()
|
||||||
|
@ -419,7 +417,7 @@ class CatalogClothingItem(CatalogItem.CatalogItem):
|
||||||
return ToontownGlobals.P_ItemAvailable
|
return ToontownGlobals.P_ItemAvailable
|
||||||
|
|
||||||
def getDeliveryTime(self):
|
def getDeliveryTime(self):
|
||||||
return 1
|
return 60
|
||||||
|
|
||||||
def getPicture(self, avatar):
|
def getPicture(self, avatar):
|
||||||
from toontown.toon import Toon
|
from toontown.toon import Toon
|
||||||
|
|
|
@ -17,7 +17,7 @@ class CatalogEmoteItem(CatalogItem.CatalogItem):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def reachedPurchaseLimit(self, avatar):
|
def reachedPurchaseLimit(self, avatar):
|
||||||
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or self in avatar.awardMailboxContents or self in avatar.onAwardOrder:
|
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder:
|
||||||
return 1
|
return 1
|
||||||
if self.emoteIndex >= len(avatar.emoteAccess):
|
if self.emoteIndex >= len(avatar.emoteAccess):
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -17,11 +17,14 @@ FLRug = 4
|
||||||
FLPainting = 8
|
FLPainting = 8
|
||||||
FLOnTable = 16
|
FLOnTable = 16
|
||||||
FLIsTable = 32
|
FLIsTable = 32
|
||||||
FLPhone = 64
|
FLBillboard = 64
|
||||||
FLBillboard = 128
|
FLPhone = 128
|
||||||
FLTrunk = 256
|
FLCrate = 256
|
||||||
FLBoysOnly = 512
|
FLChair = 512
|
||||||
FLGirlsOnly = 1024
|
FLTV = 1024
|
||||||
|
FLTrunk = 2048
|
||||||
|
FLBoysOnly = 4096
|
||||||
|
FLGirlsOnly = 8192
|
||||||
furnitureColors = [
|
furnitureColors = [
|
||||||
(0.792, 0.353, 0.29, 1.0),
|
(0.792, 0.353, 0.29, 1.0),
|
||||||
(0.176, 0.592, 0.439, 1.0),
|
(0.176, 0.592, 0.439, 1.0),
|
||||||
|
@ -70,20 +73,36 @@ for closetId, maxClothes in ClosetToClothes.items():
|
||||||
ClothesToCloset[maxClothes] += (closetId,)
|
ClothesToCloset[maxClothes] += (closetId,)
|
||||||
|
|
||||||
MaxClosetIds = (508, 518)
|
MaxClosetIds = (508, 518)
|
||||||
MaxTrunkIds = (4000, 4010)
|
|
||||||
|
|
||||||
TvToPosScale = {
|
TvToPosScale = {
|
||||||
1530: ((-1.15, -0.5, 1.1), (2.5, 1.7, 1.4)),
|
1530: ((-1.15, -0.5, 1.1), (2.5, 1.7, 1.4)),
|
||||||
1531: ((-2.3, -0.2, 1.6), (5, 5, 5)),
|
1531: ((-2.3, -0.2, 2.522), (5, 3.75, 3.187)),
|
||||||
1532: ((-7, -0.2, 1.8), (15, 10, 8.5))
|
1532: ((-7, -0.2, 2.8), (15, 10, 7.8))
|
||||||
|
}
|
||||||
|
|
||||||
|
ChairToPosHpr = {
|
||||||
|
100: ((0, -3.9, 0.88), (180, 0, 0), (0, -4.9, 0), -3.0),
|
||||||
|
105: ((0, -3.9, 0.88), (180, 0, 0), (0, -4.9, 0), -3.0),
|
||||||
|
110: ((0, -1.6, 0.5), (180, 0, 0), (0, -2.6, 0), 0.0),
|
||||||
|
120: ((0, -1.6, 0.5), (180, 0, 0), (0, -2.6, 0), 0.0),
|
||||||
|
130: ((0, -2.8, 0.5), (180, 0, 0), (0, -3.8, 0), -2.0),
|
||||||
|
140: ((0, -1.6, 0.5), (180, 0, 0), (0, -2.6, 0), 0.0),
|
||||||
|
145: ((0, -2.1, 0.2), (180, 0, 0), (0, -3.1, 0), 0.0),
|
||||||
|
160: ((-1.7, 0, 0.9), (90, 0, 0), (-2.7, 0, 0), 0.0),
|
||||||
|
170: ((0, 1.8, 0.4), (0, 0, 0), (0, 2.8, 0), 0.0),
|
||||||
|
700: ((0, -1.2, 0.5), (180, 0, 0), (0, -2.2, 0), 0.0),
|
||||||
|
705: ((0, -1.2, 0.5), (180, 0, 0), (0, -2.2, 0), 0.0),
|
||||||
|
710: ((0, -1.1, 0.4), (180, 0, 0), (0, -2.1, 0), 0.0),
|
||||||
|
715: ((0, -1.1, 0.4), (180, 0, 0), (0, -2.1, 0), 0.0),
|
||||||
|
720: ((0, -2.7, 0.2), (180, 0, 0), (0, -3.7, 0), -3.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
FurnitureTypes = {
|
FurnitureTypes = {
|
||||||
100: ('phase_5.5/models/estate/chairA', # Model
|
100: ('phase_5.5/models/estate/chairA', # Model
|
||||||
None, # Color
|
None, # Color
|
||||||
None, # Color Options
|
None, # Color Options
|
||||||
80), # Base Price
|
80, # Base Price
|
||||||
# Flags
|
FLChair), # Flags
|
||||||
# Scale
|
# Scale
|
||||||
105: ('phase_5.5/models/estate/chairAdesat',
|
105: ('phase_5.5/models/estate/chairAdesat',
|
||||||
None,
|
None,
|
||||||
|
@ -93,27 +112,33 @@ FurnitureTypes = {
|
||||||
3: (('**/cushion*', furnitureColors[3]), ('**/arm*', furnitureColors[3])),
|
3: (('**/cushion*', furnitureColors[3]), ('**/arm*', furnitureColors[3])),
|
||||||
4: (('**/cushion*', furnitureColors[4]), ('**/arm*', furnitureColors[4])),
|
4: (('**/cushion*', furnitureColors[4]), ('**/arm*', furnitureColors[4])),
|
||||||
5: (('**/cushion*', furnitureColors[5]), ('**/arm*', furnitureColors[5]))},
|
5: (('**/cushion*', furnitureColors[5]), ('**/arm*', furnitureColors[5]))},
|
||||||
160),
|
160,
|
||||||
|
FLChair),
|
||||||
110: ('phase_3.5/models/modules/chair',
|
110: ('phase_3.5/models/modules/chair',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
40),
|
40,
|
||||||
|
FLChair),
|
||||||
120: ('phase_5.5/models/estate/deskChair',
|
120: ('phase_5.5/models/estate/deskChair',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
60),
|
60,
|
||||||
|
FLChair),
|
||||||
130: ('phase_5.5/models/estate/BugRoomChair',
|
130: ('phase_5.5/models/estate/BugRoomChair',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
160),
|
160,
|
||||||
|
FLChair),
|
||||||
140: ('phase_5.5/models/estate/UWlobsterChair',
|
140: ('phase_5.5/models/estate/UWlobsterChair',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
200),
|
200,
|
||||||
|
FLChair),
|
||||||
145: ('phase_5.5/models/estate/UWlifeSaverChair',
|
145: ('phase_5.5/models/estate/UWlifeSaverChair',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
200),
|
200,
|
||||||
|
FLChair),
|
||||||
150: ('phase_5.5/models/estate/West_saddleStool2',
|
150: ('phase_5.5/models/estate/West_saddleStool2',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
@ -121,11 +146,13 @@ FurnitureTypes = {
|
||||||
160: ('phase_5.5/models/estate/West_nativeChair',
|
160: ('phase_5.5/models/estate/West_nativeChair',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
160),
|
160,
|
||||||
|
FLChair),
|
||||||
170: ('phase_5.5/models/estate/cupcakeChair',
|
170: ('phase_5.5/models/estate/cupcakeChair',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
240),
|
240,
|
||||||
|
FLChair),
|
||||||
200: ('phase_5.5/models/estate/regular_bed',
|
200: ('phase_5.5/models/estate/regular_bed',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
@ -415,7 +442,8 @@ FurnitureTypes = {
|
||||||
700: ('phase_3.5/models/modules/couch_1person',
|
700: ('phase_3.5/models/modules/couch_1person',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
230),
|
230,
|
||||||
|
FLChair),
|
||||||
705: ('phase_5.5/models/estate/couch_1personDesat',
|
705: ('phase_5.5/models/estate/couch_1personDesat',
|
||||||
None,
|
None,
|
||||||
{0: (('**/*couch', furnitureColors[0]),),
|
{0: (('**/*couch', furnitureColors[0]),),
|
||||||
|
@ -424,11 +452,13 @@ FurnitureTypes = {
|
||||||
3: (('**/*couch', furnitureColors[3]),),
|
3: (('**/*couch', furnitureColors[3]),),
|
||||||
4: (('**/*couch', furnitureColors[4]),),
|
4: (('**/*couch', furnitureColors[4]),),
|
||||||
5: (('**/*couch', furnitureColors[5]),)},
|
5: (('**/*couch', furnitureColors[5]),)},
|
||||||
460),
|
460,
|
||||||
|
FLChair),
|
||||||
710: ('phase_3.5/models/modules/couch_2person',
|
710: ('phase_3.5/models/modules/couch_2person',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
230),
|
230,
|
||||||
|
FLChair),
|
||||||
715: ('phase_5.5/models/estate/couch_2personDesat',
|
715: ('phase_5.5/models/estate/couch_2personDesat',
|
||||||
None,
|
None,
|
||||||
{0: (('**/*couch', furnitureColors[0]),),
|
{0: (('**/*couch', furnitureColors[0]),),
|
||||||
|
@ -437,11 +467,13 @@ FurnitureTypes = {
|
||||||
3: (('**/*couch', furnitureColors[3]),),
|
3: (('**/*couch', furnitureColors[3]),),
|
||||||
4: (('**/*couch', furnitureColors[4]),),
|
4: (('**/*couch', furnitureColors[4]),),
|
||||||
5: (('**/*couch', furnitureColors[5]),)},
|
5: (('**/*couch', furnitureColors[5]),)},
|
||||||
460),
|
460,
|
||||||
|
FLChair),
|
||||||
720: ('phase_5.5/models/estate/West_HayCouch',
|
720: ('phase_5.5/models/estate/West_HayCouch',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
420),
|
420,
|
||||||
|
FLChair),
|
||||||
730: ('phase_5.5/models/estate/twinkieCouch',
|
730: ('phase_5.5/models/estate/twinkieCouch',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
@ -721,15 +753,18 @@ FurnitureTypes = {
|
||||||
1530: ('phase_5.5/models/estate/bugRoomTV',
|
1530: ('phase_5.5/models/estate/bugRoomTV',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
675),
|
675,
|
||||||
|
FLTV),
|
||||||
1531: ('phase_5.5/models/estate/bugRoomTV_50inch',
|
1531: ('phase_5.5/models/estate/bugRoomTV_50inch',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
1250),
|
1250,
|
||||||
|
FLTV),
|
||||||
1532: ('phase_5.5/models/estate/bugRoomTV_100inch',
|
1532: ('phase_5.5/models/estate/bugRoomTV_100inch',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
5000),
|
5000,
|
||||||
|
FLTV),
|
||||||
1600: ('phase_5.5/models/estate/vaseA_short',
|
1600: ('phase_5.5/models/estate/vaseA_short',
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
@ -892,7 +927,13 @@ FurnitureTypes = {
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
200,
|
200,
|
||||||
FLPainting)
|
FLPainting),
|
||||||
|
10040: ('phase_10/models/cashbotHQ/CBWoodCrate',
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
0,
|
||||||
|
FLCrate,
|
||||||
|
0.5)
|
||||||
}
|
}
|
||||||
|
|
||||||
class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
|
@ -910,7 +951,7 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def replacesExisting(self):
|
def replacesExisting(self):
|
||||||
return self.getFlags() & (FLCloset | FLBank | FLTrunk) != 0
|
return self.getFlags() & (FLCloset | FLBank) != 0
|
||||||
|
|
||||||
def hasExisting(self):
|
def hasExisting(self):
|
||||||
return 1
|
return 1
|
||||||
|
@ -920,16 +961,14 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
return TTLocalizer.FurnitureYourOldCloset
|
return TTLocalizer.FurnitureYourOldCloset
|
||||||
elif self.getFlags() & FLBank:
|
elif self.getFlags() & FLBank:
|
||||||
return TTLocalizer.FurnitureYourOldBank
|
return TTLocalizer.FurnitureYourOldBank
|
||||||
elif self.getFlags() & FLTrunk:
|
|
||||||
return TTLocalizer.FurnitureYourOldTrunk
|
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def notOfferedTo(self, avatar):
|
def notOfferedTo(self, avatar):
|
||||||
if self.getFlags() & FLCloset or self.getFlags() & FLTrunk:
|
if self.getFlags() & FLCloset:
|
||||||
decade = self.furnitureType - self.furnitureType % 10
|
decade = self.furnitureType - self.furnitureType % 10
|
||||||
forBoys = (decade == 500 or decade == 4000)
|
forBoys = decade == 500
|
||||||
if avatar.getStyle().getGender() == 'm':
|
if avatar.getStyle().getGender() == 'm':
|
||||||
return not forBoys
|
return not forBoys
|
||||||
else:
|
else:
|
||||||
|
@ -955,9 +994,6 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
def isDeletable(self):
|
def isDeletable(self):
|
||||||
return self.getFlags() & (FLBank | FLCloset | FLPhone | FLTrunk) == 0
|
return self.getFlags() & (FLBank | FLCloset | FLPhone | FLTrunk) == 0
|
||||||
|
|
||||||
def getMaxAccessories(self):
|
|
||||||
return ToontownGlobals.MaxAccessories
|
|
||||||
|
|
||||||
def getMaxBankMoney(self):
|
def getMaxBankMoney(self):
|
||||||
return BankToMoney.get(self.furnitureType)
|
return BankToMoney.get(self.furnitureType)
|
||||||
|
|
||||||
|
@ -975,11 +1011,6 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
return 1
|
return 1
|
||||||
if self in avatar.onOrder or self in avatar.mailboxContents:
|
if self in avatar.onOrder or self in avatar.mailboxContents:
|
||||||
return 1
|
return 1
|
||||||
if self.getFlags() & FLTrunk:
|
|
||||||
if self.getMaxAccessories() <= avatar.getMaxAccessories():
|
|
||||||
return 1
|
|
||||||
if self in avatar.onOrder or self in avatar.mailboxContents:
|
|
||||||
return 1
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def getTypeName(self):
|
def getTypeName(self):
|
||||||
|
@ -1007,29 +1038,25 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
def isGift(self):
|
def isGift(self):
|
||||||
if self.getEmblemPrices():
|
if self.getEmblemPrices():
|
||||||
return 0
|
return 0
|
||||||
if self.getFlags() & (FLCloset | FLBank | FLTrunk):
|
if self.getFlags() & (FLCloset | FLBank):
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def recordPurchase(self, avatar, optional):
|
def recordPurchase(self, avatar, optional):
|
||||||
house, retcode = self.getHouseInfo(avatar)
|
house, retcode = self.getHouseInfo(avatar)
|
||||||
self.giftTag = None
|
|
||||||
if retcode >= 0:
|
if retcode >= 0:
|
||||||
if self.getFlags() & FLCloset:
|
if self.getFlags() & FLCloset:
|
||||||
if avatar.getMaxClothes() > self.getMaxClothes():
|
if avatar.getMaxClothes() > self.getMaxClothes():
|
||||||
return ToontownGlobals.P_AlreadyOwnBiggerCloset
|
return ToontownGlobals.P_AlreadyOwnBiggerCloset
|
||||||
avatar.b_setMaxClothes(self.getMaxClothes())
|
avatar.b_setMaxClothes(self.getMaxClothes())
|
||||||
if self.getFlags() & FLTrunk:
|
|
||||||
avatar.b_setMaxAccessories(self.getMaxAccessories())
|
|
||||||
if self.getFlags() & FLBank:
|
if self.getFlags() & FLBank:
|
||||||
avatar.b_setMaxBankMoney(self.getMaxBankMoney())
|
avatar.b_setMaxBankMoney(self.getMaxBankMoney())
|
||||||
return retcode
|
|
||||||
house.addAtticItem(self)
|
house.addAtticItem(self)
|
||||||
return retcode
|
return retcode
|
||||||
|
|
||||||
def getDeliveryTime(self):
|
def getDeliveryTime(self):
|
||||||
return 1
|
return 24 * 60
|
||||||
|
|
||||||
def getPicture(self, avatar):
|
def getPicture(self, avatar):
|
||||||
model = self.loadModel(animate=0)
|
model = self.loadModel(animate=0)
|
||||||
|
@ -1084,38 +1111,7 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
model.setScale(scale)
|
model.setScale(scale)
|
||||||
model.flattenLight()
|
model.flattenLight()
|
||||||
|
|
||||||
if animate and self.furnitureType in TvToPosScale:
|
|
||||||
pos = TvToPosScale[self.furnitureType]
|
|
||||||
screen = NodePath(CardMaker('tv-screen').generate())
|
|
||||||
|
|
||||||
model.find('**/toonTownBugTV_screen').hide()
|
|
||||||
screen.reparentTo(model)
|
|
||||||
screen.setScale(*pos[1])
|
|
||||||
screen.setPos(*pos[0])
|
|
||||||
self.startVideo(screen)
|
|
||||||
|
|
||||||
return model
|
return model
|
||||||
|
|
||||||
def startVideo(self, model, file=None):
|
|
||||||
files = glob.glob('user/videos/*.mp4')
|
|
||||||
|
|
||||||
if not files:
|
|
||||||
model.setTextureOff(TextureStage.getDefault())
|
|
||||||
model.setColor(0.3, 0.3, 0.3, 1.0)
|
|
||||||
return
|
|
||||||
|
|
||||||
if file is None:
|
|
||||||
file = random.randint(0, len(files) - 1)
|
|
||||||
elif file >= len(files):
|
|
||||||
file = 0
|
|
||||||
|
|
||||||
movie = loader.loadTexture(files[file])
|
|
||||||
sound = loader.loadSfx(files[file])
|
|
||||||
movie.synchronizeTo(sound)
|
|
||||||
model.setTexture(movie)
|
|
||||||
model.setTexScale(TextureStage.getDefault(), movie.getTexScale())
|
|
||||||
self.videoSequence = Sequence(SoundInterval(sound, volume=1.0), Func(self.startVideo, model, file + 1))
|
|
||||||
self.videoSequence.start()
|
|
||||||
|
|
||||||
def decodeDatagram(self, di, versionNumber, store):
|
def decodeDatagram(self, di, versionNumber, store):
|
||||||
CatalogAtticItem.CatalogAtticItem.decodeDatagram(self, di, versionNumber, store)
|
CatalogAtticItem.CatalogAtticItem.decodeDatagram(self, di, versionNumber, store)
|
||||||
|
@ -1210,29 +1206,6 @@ def getAllBanks():
|
||||||
|
|
||||||
return list
|
return list
|
||||||
|
|
||||||
def get50ItemTrunk(avatar, duplicateItems):
|
|
||||||
if config.GetBool('want-accessories', 1):
|
|
||||||
if avatar.getStyle().getGender() == 'm':
|
|
||||||
index = 0
|
|
||||||
else:
|
|
||||||
index = 1
|
|
||||||
trunkId = MaxTrunkIds[index]
|
|
||||||
item = CatalogFurnitureItem(trunkId)
|
|
||||||
if item in avatar.onOrder or item in avatar.mailboxContents:
|
|
||||||
return None
|
|
||||||
return item
|
|
||||||
# If we get here, we probably don't want accessories yet.
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def getMaxTrunks():
|
|
||||||
list = []
|
|
||||||
for trunkId in MaxTrunkIds:
|
|
||||||
list.append(CatalogFurnitureItem(trunkId))
|
|
||||||
|
|
||||||
return list
|
|
||||||
|
|
||||||
|
|
||||||
def getAllFurnitures(index):
|
def getAllFurnitures(index):
|
||||||
list = []
|
list = []
|
||||||
colors = FurnitureTypes[index][FTColorOptions]
|
colors = FurnitureTypes[index][FTColorOptions]
|
||||||
|
|
|
@ -22,11 +22,6 @@ class CatalogGardenItem(CatalogItem.CatalogItem):
|
||||||
else:
|
else:
|
||||||
return 100
|
return 100
|
||||||
|
|
||||||
def reachedPurchaseLimit(self, avatar):
|
|
||||||
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or self in avatar.awardMailboxContents or self in avatar.onAwardOrder:
|
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def getAcceptItemErrorText(self, retcode):
|
def getAcceptItemErrorText(self, retcode):
|
||||||
if retcode == ToontownGlobals.P_ItemAvailable:
|
if retcode == ToontownGlobals.P_ItemAvailable:
|
||||||
return TTLocalizer.CatalogAcceptGarden
|
return TTLocalizer.CatalogAcceptGarden
|
||||||
|
@ -39,17 +34,16 @@ class CatalogGardenItem(CatalogItem.CatalogItem):
|
||||||
return TTLocalizer.GardenTypeName
|
return TTLocalizer.GardenTypeName
|
||||||
|
|
||||||
def getName(self):
|
def getName(self):
|
||||||
name = GardenGlobals.Specials[self.gardenIndex]['photoName']
|
return GardenGlobals.Specials[self.gardenIndex]['photoName']
|
||||||
return name
|
|
||||||
|
|
||||||
def recordPurchase(self, avatar, optional):
|
def recordPurchase(self, avatar, optional):
|
||||||
if avatar:
|
if avatar:
|
||||||
avatar.addGardenItem(self.gardenIndex, self.numItems)
|
avatar.addGardenItem(self.gardenIndex, self.numItems)
|
||||||
if 1:
|
return ToontownGlobals.P_ItemAvailable
|
||||||
return ToontownGlobals.P_ItemAvailable
|
|
||||||
|
|
||||||
def getPicture(self, avatar):
|
def getPicture(self, avatar):
|
||||||
photoModel = GardenGlobals.Specials[self.gardenIndex]['photoModel']
|
photoModel = GardenGlobals.Specials[self.gardenIndex]['photoModel']
|
||||||
|
|
||||||
if 'photoAnimation' in GardenGlobals.Specials[self.gardenIndex]:
|
if 'photoAnimation' in GardenGlobals.Specials[self.gardenIndex]:
|
||||||
modelPath = photoModel + GardenGlobals.Specials[self.gardenIndex]['photoAnimation'][0]
|
modelPath = photoModel + GardenGlobals.Specials[self.gardenIndex]['photoAnimation'][0]
|
||||||
animationName = GardenGlobals.Specials[self.gardenIndex]['photoAnimation'][1]
|
animationName = GardenGlobals.Specials[self.gardenIndex]['photoAnimation'][1]
|
||||||
|
@ -75,7 +69,6 @@ class CatalogGardenItem(CatalogItem.CatalogItem):
|
||||||
self.model.setScale(photoScale)
|
self.model.setScale(photoScale)
|
||||||
self.hasPicture = True
|
self.hasPicture = True
|
||||||
return (frame, None)
|
return (frame, None)
|
||||||
return None
|
|
||||||
|
|
||||||
def cleanupPicture(self):
|
def cleanupPicture(self):
|
||||||
CatalogItem.CatalogItem.cleanupPicture(self)
|
CatalogItem.CatalogItem.cleanupPicture(self)
|
||||||
|
@ -126,7 +119,7 @@ class CatalogGardenItem(CatalogItem.CatalogItem):
|
||||||
|
|
||||||
def getDeliveryTime(self):
|
def getDeliveryTime(self):
|
||||||
if self.gardenIndex == GardenGlobals.GardenAcceleratorSpecial:
|
if self.gardenIndex == GardenGlobals.GardenAcceleratorSpecial:
|
||||||
return 1
|
return 24 * 60
|
||||||
else:
|
else:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class CatalogGardenStarterItem(CatalogItem.CatalogItem):
|
||||||
def getPurchaseLimit(self):
|
def getPurchaseLimit(self):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def reachedPurchaseLimit(self, avatar):
|
def reachedPurchaseLimit(self, avatar):
|
||||||
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or self in avatar.awardMailboxContents or self in avatar.onAwardOrder or hasattr(avatar, 'gardenStarted') and avatar.getGardenStarted():
|
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or self in avatar.awardMailboxContents or self in avatar.onAwardOrder or hasattr(avatar, 'gardenStarted') and avatar.getGardenStarted():
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
@ -31,13 +31,13 @@ class CatalogGardenStarterItem(CatalogItem.CatalogItem):
|
||||||
|
|
||||||
def recordPurchase(self, avatar, optional):
|
def recordPurchase(self, avatar, optional):
|
||||||
if avatar:
|
if avatar:
|
||||||
estate = simbase.air.estateManager.toon2estate.get(avatar)
|
self.notify.debug('rental -- has avatar')
|
||||||
|
estate = simbase.air.estateManager._lookupEstate(avatar)
|
||||||
if estate:
|
if estate:
|
||||||
av = simbase.air.doId2do.get(avatar)
|
self.notify.debug('rental -- has estate')
|
||||||
if av:
|
estate.placeStarterGarden(avatar.doId)
|
||||||
av.b_setGardenStarted(True)
|
else:
|
||||||
print('garden saved')
|
self.notify.warning('rental -- something not there')
|
||||||
estate.placeStarterGarden(avatar)
|
|
||||||
return ToontownGlobals.P_ItemAvailable
|
return ToontownGlobals.P_ItemAvailable
|
||||||
|
|
||||||
def getPicture(self, avatar):
|
def getPicture(self, avatar):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
import CatalogItem
|
import CatalogItem
|
||||||
import CatalogItemList
|
import CatalogItemList
|
||||||
from CatalogFurnitureItem import CatalogFurnitureItem, nextAvailableCloset, nextAvailableBank, getAllClosets, get50ItemCloset, getMaxClosets, get50ItemTrunk, getAllBanks
|
from CatalogFurnitureItem import CatalogFurnitureItem, nextAvailableCloset, nextAvailableBank, getAllClosets, get50ItemCloset, getMaxClosets, getAllBanks
|
||||||
from CatalogAnimatedFurnitureItem import CatalogAnimatedFurnitureItem
|
from CatalogAnimatedFurnitureItem import CatalogAnimatedFurnitureItem
|
||||||
from CatalogClothingItem import CatalogClothingItem, getAllClothes
|
from CatalogClothingItem import CatalogClothingItem, getAllClothes
|
||||||
from CatalogChatItem import CatalogChatItem, getChatRange
|
from CatalogChatItem import CatalogChatItem, getChatRange
|
||||||
|
@ -12,8 +12,8 @@ from CatalogMouldingItem import CatalogMouldingItem, getAllMouldings
|
||||||
from CatalogWainscotingItem import CatalogWainscotingItem, getAllWainscotings
|
from CatalogWainscotingItem import CatalogWainscotingItem, getAllWainscotings
|
||||||
from CatalogWindowItem import CatalogWindowItem
|
from CatalogWindowItem import CatalogWindowItem
|
||||||
from CatalogPoleItem import nextAvailablePole, getAllPoles
|
from CatalogPoleItem import nextAvailablePole, getAllPoles
|
||||||
from CatalogTankItem import nextAvailableTank, getAllTanks
|
|
||||||
from CatalogPetTrickItem import CatalogPetTrickItem, getAllPetTricks
|
from CatalogPetTrickItem import CatalogPetTrickItem, getAllPetTricks
|
||||||
|
from CatalogTankItem import nextAvailableTank, getAllTanks
|
||||||
from CatalogGardenItem import CatalogGardenItem
|
from CatalogGardenItem import CatalogGardenItem
|
||||||
from CatalogToonStatueItem import CatalogToonStatueItem
|
from CatalogToonStatueItem import CatalogToonStatueItem
|
||||||
from CatalogRentalItem import CatalogRentalItem
|
from CatalogRentalItem import CatalogRentalItem
|
||||||
|
@ -26,7 +26,7 @@ from toontown.toonbase import ToontownGlobals
|
||||||
import types
|
import types
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
from panda3d.core import *
|
from pandac.PandaModules import *
|
||||||
MetaItems = {100: getAllClothes(101, 102, 103, 104, 105, 106, 107, 108, 109, 109, 111, 115, 201, 202, 203, 204, 205, 206, 207, 208, 209, 209, 211, 215),
|
MetaItems = {100: getAllClothes(101, 102, 103, 104, 105, 106, 107, 108, 109, 109, 111, 115, 201, 202, 203, 204, 205, 206, 207, 208, 209, 209, 211, 215),
|
||||||
300: getAllClothes(301, 302, 303, 304, 305, 308, 401, 403, 404, 405, 407, 451, 452, 453),
|
300: getAllClothes(301, 302, 303, 304, 305, 308, 401, 403, 404, 405, 407, 451, 452, 453),
|
||||||
2000: getChatRange(0, 1999),
|
2000: getChatRange(0, 1999),
|
||||||
|
@ -41,25 +41,20 @@ MetaItems = {100: getAllClothes(101, 102, 103, 104, 105, 106, 107, 108, 109, 109
|
||||||
2921: getChatRange(12050, 12099),
|
2921: getChatRange(12050, 12099),
|
||||||
2930: getChatRange(13000, 13099),
|
2930: getChatRange(13000, 13099),
|
||||||
2940: getChatRange(14000, 14099),
|
2940: getChatRange(14000, 14099),
|
||||||
|
|
||||||
3000: getWallpapers(1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100),
|
3000: getWallpapers(1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100),
|
||||||
3010: getWallpapers(2200, 2300, 2400, 2500, 2600, 2700, 2800),
|
3010: getWallpapers(2200, 2300, 2400, 2500, 2600, 2700, 2800),
|
||||||
3020: getWallpapers(2900, 3000, 3100, 3200, 3300, 3400, 3500, 3600),
|
3020: getWallpapers(2900, 3000, 3100, 3200, 3300, 3400, 3500, 3600),
|
||||||
3030: getWallpapers(3700, 3800, 3900),
|
3030: getWallpapers(3700, 3800, 3900),
|
||||||
|
|
||||||
3500: getAllWainscotings(1000, 1010),
|
3500: getAllWainscotings(1000, 1010),
|
||||||
3510: getAllWainscotings(1020),
|
3510: getAllWainscotings(1020),
|
||||||
3520: getAllWainscotings(1030),
|
3520: getAllWainscotings(1030),
|
||||||
3530: getAllWainscotings(1040),
|
3530: getAllWainscotings(1040),
|
||||||
|
|
||||||
4000: getFloorings(1000, 1010, 1020, 1030, 1040, 1050, 1060, 1070, 1080, 1090, 1100),
|
4000: getFloorings(1000, 1010, 1020, 1030, 1040, 1050, 1060, 1070, 1080, 1090, 1100),
|
||||||
4010: getFloorings(1110, 1120, 1130),
|
4010: getFloorings(1110, 1120, 1130),
|
||||||
4020: getFloorings(1140, 1150, 1160, 1170, 1180, 1190),
|
4020: getFloorings(1140, 1150, 1160, 1170, 1180, 1190),
|
||||||
|
|
||||||
4500: getAllMouldings(1000, 1010),
|
4500: getAllMouldings(1000, 1010),
|
||||||
4510: getAllMouldings(1020, 1030, 1040),
|
4510: getAllMouldings(1020, 1030, 1040),
|
||||||
4520: getAllMouldings(1070),
|
4520: getAllMouldings(1070),
|
||||||
|
|
||||||
5000: getAllPetTricks()}
|
5000: getAllPetTricks()}
|
||||||
MetaItemChatKeysSold = (2000,
|
MetaItemChatKeysSold = (2000,
|
||||||
2010,
|
2010,
|
||||||
|
@ -401,7 +396,29 @@ MonthlySchedule = ((7,
|
||||||
15,
|
15,
|
||||||
8,
|
8,
|
||||||
15,
|
15,
|
||||||
|
2010,
|
||||||
|
2010,
|
||||||
((4, 2940),)),
|
((4, 2940),)),
|
||||||
|
(9,
|
||||||
|
1,
|
||||||
|
9,
|
||||||
|
30,
|
||||||
|
(CatalogGardenItem(135, 1),)),
|
||||||
|
(1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
31,
|
||||||
|
(CatalogGardenItem(135, 1),)),
|
||||||
|
(4,
|
||||||
|
1,
|
||||||
|
4,
|
||||||
|
30,
|
||||||
|
(CatalogGardenItem(135, 1),)),
|
||||||
|
(6,
|
||||||
|
1,
|
||||||
|
6,
|
||||||
|
30,
|
||||||
|
(CatalogGardenItem(135, 1),)),
|
||||||
(6,
|
(6,
|
||||||
26,
|
26,
|
||||||
7,
|
7,
|
||||||
|
@ -460,16 +477,22 @@ MonthlySchedule = ((7,
|
||||||
9,
|
9,
|
||||||
7,
|
7,
|
||||||
15,
|
15,
|
||||||
|
2010,
|
||||||
|
2010,
|
||||||
(CatalogClothingItem(1751, 0),)),
|
(CatalogClothingItem(1751, 0),)),
|
||||||
(6,
|
(6,
|
||||||
14,
|
14,
|
||||||
7,
|
7,
|
||||||
15,
|
15,
|
||||||
|
2010,
|
||||||
|
2010,
|
||||||
(CatalogClothingItem(1754, 0), CatalogClothingItem(1755, 0), CatalogClothingItem(1756, 0))),
|
(CatalogClothingItem(1754, 0), CatalogClothingItem(1755, 0), CatalogClothingItem(1756, 0))),
|
||||||
(7,
|
(7,
|
||||||
21,
|
21,
|
||||||
8,
|
8,
|
||||||
17,
|
17,
|
||||||
|
2010,
|
||||||
|
2010,
|
||||||
(CatalogClothingItem(1749, 0),
|
(CatalogClothingItem(1749, 0),
|
||||||
CatalogClothingItem(1750, 0),
|
CatalogClothingItem(1750, 0),
|
||||||
CatalogClothingItem(1757, 0),
|
CatalogClothingItem(1757, 0),
|
||||||
|
@ -478,6 +501,8 @@ MonthlySchedule = ((7,
|
||||||
25,
|
25,
|
||||||
9,
|
9,
|
||||||
21,
|
21,
|
||||||
|
2010,
|
||||||
|
2010,
|
||||||
(CatalogClothingItem(1763, 0),)),
|
(CatalogClothingItem(1763, 0),)),
|
||||||
(6,
|
(6,
|
||||||
5,
|
5,
|
||||||
|
@ -488,44 +513,49 @@ MonthlySchedule = ((7,
|
||||||
1,
|
1,
|
||||||
12,
|
12,
|
||||||
31,
|
31,
|
||||||
(
|
(CatalogGardenItem(100, 1),
|
||||||
CatalogGardenItem(100, 1),
|
|
||||||
CatalogGardenItem(101, 1),
|
CatalogGardenItem(101, 1),
|
||||||
CatalogGardenItem(103, 1),
|
CatalogGardenItem(103, 1),
|
||||||
CatalogGardenItem(104, 1),
|
CatalogGardenItem(104, 1),
|
||||||
CatalogToonStatueItem(105, endPoseIndex=108),
|
CatalogToonStatueItem(105, endPoseIndex=108),
|
||||||
CatalogRentalItem(1, 2880, 1000),
|
CatalogRentalItem(1, 2880, 1000),
|
||||||
CatalogRentalItem(2, 2890, 1000),
|
|
||||||
CatalogGardenStarterItem(),
|
CatalogGardenStarterItem(),
|
||||||
CatalogNametagItem(0),
|
|
||||||
CatalogFurnitureItem(1530),
|
CatalogFurnitureItem(1530),
|
||||||
CatalogFurnitureItem(1531),
|
CatalogFurnitureItem(1531),
|
||||||
CatalogFurnitureItem(1532),
|
CatalogFurnitureItem(1532),
|
||||||
|
CatalogNametagItem(15),
|
||||||
|
CatalogNametagItem(16),
|
||||||
|
CatalogNametagItem(17),
|
||||||
|
CatalogClothingItem(1608, 0, True),
|
||||||
CatalogClothingItem(1605, 0, True),
|
CatalogClothingItem(1605, 0, True),
|
||||||
CatalogClothingItem(1602, 0, True),
|
CatalogClothingItem(1602, 0, True),
|
||||||
|
CatalogClothingItem(1607, 0, True),
|
||||||
CatalogClothingItem(1604, 0, True),
|
CatalogClothingItem(1604, 0, True),
|
||||||
CatalogClothingItem(1601, 0, True),
|
CatalogClothingItem(1601, 0, True),
|
||||||
|
CatalogClothingItem(1606, 0, True),
|
||||||
CatalogClothingItem(1603, 0, True),
|
CatalogClothingItem(1603, 0, True),
|
||||||
CatalogClothingItem(1600, 0, True),
|
CatalogClothingItem(1600, 0, True),
|
||||||
|
CatalogEmoteItem(25, True),
|
||||||
|
CatalogEmoteItem(26, True),
|
||||||
CatalogEmoteItem(20, True),
|
CatalogEmoteItem(20, True),
|
||||||
CatalogEmoteItem(21, True),
|
CatalogEmoteItem(21, True),
|
||||||
CatalogEmoteItem(22, True),
|
CatalogEmoteItem(22, True),
|
||||||
CatalogEmoteItem(23, True),
|
CatalogEmoteItem(23, True),
|
||||||
CatalogEmoteItem(24, True),
|
CatalogEmoteItem(24, True),
|
||||||
CatalogEmoteItem(25, True),
|
CatalogClothingItem(1821, 0, True))),
|
||||||
CatalogEmoteItem(26, True),
|
|
||||||
CatalogNametagItem(15, True),
|
|
||||||
CatalogNametagItem(16, True),
|
|
||||||
CatalogNametagItem(17, True))),
|
|
||||||
(5,
|
(5,
|
||||||
26,
|
26,
|
||||||
6,
|
6,
|
||||||
30,
|
30,
|
||||||
|
2013,
|
||||||
|
2013,
|
||||||
(CatalogAccessoryItem(175),)),
|
(CatalogAccessoryItem(175),)),
|
||||||
(8,
|
(8,
|
||||||
27,
|
27,
|
||||||
9,
|
9,
|
||||||
5,
|
5,
|
||||||
|
2013,
|
||||||
|
2013,
|
||||||
((3, 2900),
|
((3, 2900),
|
||||||
CatalogChatItem(10003),
|
CatalogChatItem(10003),
|
||||||
CatalogClothingItem(1001, 0),
|
CatalogClothingItem(1001, 0),
|
||||||
|
@ -575,6 +605,8 @@ MonthlySchedule = ((7,
|
||||||
3,
|
3,
|
||||||
9,
|
9,
|
||||||
12,
|
12,
|
||||||
|
2013,
|
||||||
|
2013,
|
||||||
((3, 2910),
|
((3, 2910),
|
||||||
CatalogFurnitureItem(680),
|
CatalogFurnitureItem(680),
|
||||||
CatalogFurnitureItem(681),
|
CatalogFurnitureItem(681),
|
||||||
|
@ -609,6 +641,8 @@ MonthlySchedule = ((7,
|
||||||
20,
|
20,
|
||||||
9,
|
9,
|
||||||
19,
|
19,
|
||||||
|
2013,
|
||||||
|
2013,
|
||||||
(CatalogAccessoryItem(101),
|
(CatalogAccessoryItem(101),
|
||||||
CatalogAccessoryItem(103),
|
CatalogAccessoryItem(103),
|
||||||
CatalogAccessoryItem(117),
|
CatalogAccessoryItem(117),
|
||||||
|
@ -805,11 +839,7 @@ WeeklySchedule = ((100,
|
||||||
4000,
|
4000,
|
||||||
4500,
|
4500,
|
||||||
CatalogFurnitureItem(110),
|
CatalogFurnitureItem(110),
|
||||||
CatalogFurnitureItem(100),
|
CatalogFurnitureItem(100)),
|
||||||
nextAvailablePole,
|
|
||||||
nextAvailableCloset,
|
|
||||||
nextAvailableBank,
|
|
||||||
nextAvailableTank),
|
|
||||||
(100,
|
(100,
|
||||||
(5, 2000),
|
(5, 2000),
|
||||||
CatalogFurnitureItem(1420),
|
CatalogFurnitureItem(1420),
|
||||||
|
@ -830,10 +860,7 @@ WeeklySchedule = ((100,
|
||||||
CatalogAnimatedFurnitureItem(490),
|
CatalogAnimatedFurnitureItem(490),
|
||||||
CatalogFurnitureItem(1000),
|
CatalogFurnitureItem(1000),
|
||||||
CatalogClothingItem(117, 0),
|
CatalogClothingItem(117, 0),
|
||||||
CatalogClothingItem(217, 0),
|
CatalogClothingItem(217, 0)),
|
||||||
nextAvailableCloset,
|
|
||||||
nextAvailableBank,
|
|
||||||
nextAvailableTank),
|
|
||||||
(100,
|
(100,
|
||||||
(5, 2000),
|
(5, 2000),
|
||||||
CatalogFurnitureItem(1430),
|
CatalogFurnitureItem(1430),
|
||||||
|
@ -853,11 +880,7 @@ WeeklySchedule = ((100,
|
||||||
4000,
|
4000,
|
||||||
4500,
|
4500,
|
||||||
CatalogFurnitureItem(1210),
|
CatalogFurnitureItem(1210),
|
||||||
CatalogClothingItem(409, 0),
|
CatalogClothingItem(409, 0)),
|
||||||
nextAvailablePole,
|
|
||||||
nextAvailableCloset,
|
|
||||||
nextAvailableBank,
|
|
||||||
nextAvailableTank),
|
|
||||||
(300,
|
(300,
|
||||||
(5, 2000),
|
(5, 2000),
|
||||||
CatalogEmoteItem(13),
|
CatalogEmoteItem(13),
|
||||||
|
@ -876,10 +899,7 @@ WeeklySchedule = ((100,
|
||||||
CatalogFurnitureItem(910),
|
CatalogFurnitureItem(910),
|
||||||
CatalogFurnitureItem(1600),
|
CatalogFurnitureItem(1600),
|
||||||
CatalogClothingItem(118, 0),
|
CatalogClothingItem(118, 0),
|
||||||
CatalogClothingItem(218, 0),
|
CatalogClothingItem(218, 0)),
|
||||||
nextAvailableCloset,
|
|
||||||
nextAvailableBank,
|
|
||||||
nextAvailableTank),
|
|
||||||
(100,
|
(100,
|
||||||
(5, 2000),
|
(5, 2000),
|
||||||
3000,
|
3000,
|
||||||
|
@ -896,11 +916,7 @@ WeeklySchedule = ((100,
|
||||||
3500,
|
3500,
|
||||||
4000,
|
4000,
|
||||||
4500,
|
4500,
|
||||||
CatalogFurnitureItem(620),
|
CatalogFurnitureItem(620)),
|
||||||
nextAvailablePole,
|
|
||||||
nextAvailableCloset,
|
|
||||||
nextAvailableBank,
|
|
||||||
nextAvailableTank),
|
|
||||||
(300,
|
(300,
|
||||||
(5, 2000),
|
(5, 2000),
|
||||||
3000,
|
3000,
|
||||||
|
@ -920,10 +936,7 @@ WeeklySchedule = ((100,
|
||||||
CatalogFurnitureItem(630),
|
CatalogFurnitureItem(630),
|
||||||
CatalogFurnitureItem(1630),
|
CatalogFurnitureItem(1630),
|
||||||
CatalogEmoteItem(11),
|
CatalogEmoteItem(11),
|
||||||
CatalogNametagItem(11),
|
CatalogNametagItem(11)),
|
||||||
nextAvailableCloset,
|
|
||||||
nextAvailableBank,
|
|
||||||
nextAvailableTank),
|
|
||||||
(100,
|
(100,
|
||||||
(2, 2000),
|
(2, 2000),
|
||||||
(3, 2010),
|
(3, 2010),
|
||||||
|
@ -946,11 +959,7 @@ WeeklySchedule = ((100,
|
||||||
CatalogFurnitureItem(120),
|
CatalogFurnitureItem(120),
|
||||||
CatalogClothingItem(120, 0),
|
CatalogClothingItem(120, 0),
|
||||||
CatalogClothingItem(220, 0),
|
CatalogClothingItem(220, 0),
|
||||||
nextAvailablePole,
|
5000),
|
||||||
5000,
|
|
||||||
nextAvailableCloset,
|
|
||||||
nextAvailableBank,
|
|
||||||
nextAvailableTank),
|
|
||||||
(100,
|
(100,
|
||||||
(2, 2000),
|
(2, 2000),
|
||||||
(3, 2010),
|
(3, 2010),
|
||||||
|
@ -971,10 +980,7 @@ WeeklySchedule = ((100,
|
||||||
CatalogFurnitureItem(1120),
|
CatalogFurnitureItem(1120),
|
||||||
CatalogFurnitureItem(930),
|
CatalogFurnitureItem(930),
|
||||||
CatalogFurnitureItem(1500),
|
CatalogFurnitureItem(1500),
|
||||||
CatalogEmoteItem(6),
|
CatalogEmoteItem(6)),
|
||||||
nextAvailableCloset,
|
|
||||||
nextAvailableBank,
|
|
||||||
nextAvailableTank),
|
|
||||||
(300,
|
(300,
|
||||||
(2, 2000),
|
(2, 2000),
|
||||||
(3, 2010),
|
(3, 2010),
|
||||||
|
@ -997,7 +1003,6 @@ WeeklySchedule = ((100,
|
||||||
CatalogFurnitureItem(940),
|
CatalogFurnitureItem(940),
|
||||||
CatalogClothingItem(121, 0),
|
CatalogClothingItem(121, 0),
|
||||||
CatalogClothingItem(221, 0),
|
CatalogClothingItem(221, 0),
|
||||||
nextAvailablePole,
|
|
||||||
5000),
|
5000),
|
||||||
(100,
|
(100,
|
||||||
(2, 2000),
|
(2, 2000),
|
||||||
|
@ -1038,7 +1043,6 @@ WeeklySchedule = ((100,
|
||||||
4510,
|
4510,
|
||||||
CatalogFurnitureItem(300),
|
CatalogFurnitureItem(300),
|
||||||
CatalogFurnitureItem(1220),
|
CatalogFurnitureItem(1220),
|
||||||
nextAvailablePole,
|
|
||||||
5000),
|
5000),
|
||||||
(300,
|
(300,
|
||||||
(2, 2000),
|
(2, 2000),
|
||||||
|
@ -1096,7 +1100,6 @@ WeeklySchedule = ((100,
|
||||||
CatalogFurnitureItem(145),
|
CatalogFurnitureItem(145),
|
||||||
CatalogClothingItem(123, 0),
|
CatalogClothingItem(123, 0),
|
||||||
CatalogClothingItem(224, 0),
|
CatalogClothingItem(224, 0),
|
||||||
nextAvailablePole,
|
|
||||||
5000),
|
5000),
|
||||||
(100,
|
(100,
|
||||||
(1, 2000),
|
(1, 2000),
|
||||||
|
@ -1137,8 +1140,7 @@ WeeklySchedule = ((100,
|
||||||
4520,
|
4520,
|
||||||
CatalogWindowItem(90),
|
CatalogWindowItem(90),
|
||||||
CatalogClothingItem(124, 0),
|
CatalogClothingItem(124, 0),
|
||||||
CatalogClothingItem(411, 0),
|
CatalogClothingItem(411, 0)),
|
||||||
nextAvailablePole),
|
|
||||||
(100,
|
(100,
|
||||||
(1, 2000),
|
(1, 2000),
|
||||||
(2, 2010),
|
(2, 2010),
|
||||||
|
@ -1184,7 +1186,6 @@ WeeklySchedule = ((100,
|
||||||
4020,
|
4020,
|
||||||
4520,
|
4520,
|
||||||
CatalogFurnitureItem(1910),
|
CatalogFurnitureItem(1910),
|
||||||
nextAvailablePole,
|
|
||||||
CatalogFurnitureItem(1000)),
|
CatalogFurnitureItem(1000)),
|
||||||
(300,
|
(300,
|
||||||
(1, 2000),
|
(1, 2000),
|
||||||
|
@ -1236,7 +1237,6 @@ WeeklySchedule = ((100,
|
||||||
3530,
|
3530,
|
||||||
4020,
|
4020,
|
||||||
4520,
|
4520,
|
||||||
nextAvailablePole,
|
|
||||||
CatalogWallpaperItem(3900),
|
CatalogWallpaperItem(3900),
|
||||||
CatalogFurnitureItem(980),
|
CatalogFurnitureItem(980),
|
||||||
CatalogNametagItem(13)),
|
CatalogNametagItem(13)),
|
||||||
|
@ -1249,7 +1249,8 @@ WeeklySchedule = ((100,
|
||||||
4020,
|
4020,
|
||||||
4520,
|
4520,
|
||||||
CatalogClothingItem(130, 0),
|
CatalogClothingItem(130, 0),
|
||||||
CatalogFurnitureItem(150)),
|
CatalogFurnitureItem(150),
|
||||||
|
CatalogNametagItem(14)),
|
||||||
(100,
|
(100,
|
||||||
(1, 2010),
|
(1, 2010),
|
||||||
(2, 2020),
|
(2, 2020),
|
||||||
|
@ -1281,7 +1282,6 @@ WeeklySchedule = ((100,
|
||||||
3530,
|
3530,
|
||||||
4020,
|
4020,
|
||||||
4520,
|
4520,
|
||||||
nextAvailablePole,
|
|
||||||
CatalogFurnitureItem(1930),
|
CatalogFurnitureItem(1930),
|
||||||
CatalogFurnitureItem(670)),
|
CatalogFurnitureItem(670)),
|
||||||
(300,
|
(300,
|
||||||
|
@ -1324,7 +1324,6 @@ WeeklySchedule = ((100,
|
||||||
3530,
|
3530,
|
||||||
4020,
|
4020,
|
||||||
4520,
|
4520,
|
||||||
nextAvailablePole,
|
|
||||||
CatalogFurnitureItem(1940),
|
CatalogFurnitureItem(1940),
|
||||||
CatalogWindowItem(130)),
|
CatalogWindowItem(130)),
|
||||||
(300,
|
(300,
|
||||||
|
@ -1347,19 +1346,17 @@ WeeklySchedule = ((100,
|
||||||
4020,
|
4020,
|
||||||
4520,
|
4520,
|
||||||
CatalogFurnitureItem(250),
|
CatalogFurnitureItem(250),
|
||||||
CatalogFurnitureItem(1960),
|
CatalogFurnitureItem(1960)),
|
||||||
nextAvailablePole),
|
|
||||||
Sale(CatalogFurnitureItem(210, 0), CatalogFurnitureItem(220, 0), CatalogFurnitureItem(1100), CatalogFurnitureItem(110), CatalogFurnitureItem(100), CatalogFurnitureItem(700), CatalogFurnitureItem(710), CatalogFurnitureItem(410), CatalogAnimatedFurnitureItem(490), CatalogFurnitureItem(1210), CatalogFurnitureItem(1200), CatalogFurnitureItem(800), CatalogFurnitureItem(1110), CatalogFurnitureItem(230), CatalogFurnitureItem(420), CatalogAnimatedFurnitureItem(480), CatalogFurnitureItem(120), CatalogFurnitureItem(1700), CatalogFurnitureItem(1120), CatalogFurnitureItem(430), CatalogAnimatedFurnitureItem(491), CatalogFurnitureItem(1130), CatalogFurnitureItem(130), CatalogFurnitureItem(300), CatalogFurnitureItem(1220), CatalogFurnitureItem(810), CatalogFurnitureItem(1230), CatalogFurnitureItem(310), CatalogFurnitureItem(1240), CatalogFurnitureItem(240), CatalogFurnitureItem(145), CatalogFurnitureItem(1725), CatalogFurnitureItem(140), CatalogFurnitureItem(950), CatalogFurnitureItem(1720)),
|
Sale(CatalogFurnitureItem(210, 0), CatalogFurnitureItem(220, 0), CatalogFurnitureItem(1100), CatalogFurnitureItem(110), CatalogFurnitureItem(100), CatalogFurnitureItem(700), CatalogFurnitureItem(710), CatalogFurnitureItem(410), CatalogAnimatedFurnitureItem(490), CatalogFurnitureItem(1210), CatalogFurnitureItem(1200), CatalogFurnitureItem(800), CatalogFurnitureItem(1110), CatalogFurnitureItem(230), CatalogFurnitureItem(420), CatalogAnimatedFurnitureItem(480), CatalogFurnitureItem(120), CatalogFurnitureItem(1700), CatalogFurnitureItem(1120), CatalogFurnitureItem(430), CatalogAnimatedFurnitureItem(491), CatalogFurnitureItem(1130), CatalogFurnitureItem(130), CatalogFurnitureItem(300), CatalogFurnitureItem(1220), CatalogFurnitureItem(810), CatalogFurnitureItem(1230), CatalogFurnitureItem(310), CatalogFurnitureItem(1240), CatalogFurnitureItem(240), CatalogFurnitureItem(145), CatalogFurnitureItem(1725), CatalogFurnitureItem(140), CatalogFurnitureItem(950), CatalogFurnitureItem(1720)),
|
||||||
Sale(CatalogClothingItem(116, 0), CatalogClothingItem(216, 0), CatalogClothingItem(408, 0), CatalogClothingItem(117, 0), CatalogClothingItem(217, 0), CatalogClothingItem(409, 0), CatalogClothingItem(118, 0), CatalogClothingItem(218, 0), CatalogClothingItem(410, 0), CatalogClothingItem(119, 0), CatalogClothingItem(219, 0), CatalogClothingItem(120, 0), CatalogClothingItem(220, 0), CatalogClothingItem(121, 0), CatalogClothingItem(221, 0), CatalogClothingItem(222, 0), CatalogClothingItem(123, 0), CatalogClothingItem(224, 0), CatalogClothingItem(411, 0), CatalogClothingItem(311, 0), CatalogClothingItem(310, 0)),
|
Sale(CatalogClothingItem(116, 0), CatalogClothingItem(216, 0), CatalogClothingItem(408, 0), CatalogClothingItem(117, 0), CatalogClothingItem(217, 0), CatalogClothingItem(409, 0), CatalogClothingItem(118, 0), CatalogClothingItem(218, 0), CatalogClothingItem(410, 0), CatalogClothingItem(119, 0), CatalogClothingItem(219, 0), CatalogClothingItem(120, 0), CatalogClothingItem(220, 0), CatalogClothingItem(121, 0), CatalogClothingItem(221, 0), CatalogClothingItem(222, 0), CatalogClothingItem(123, 0), CatalogClothingItem(224, 0), CatalogClothingItem(411, 0), CatalogClothingItem(311, 0), CatalogClothingItem(310, 0)),
|
||||||
Sale(CatalogWindowItem(40), CatalogWindowItem(70), CatalogWindowItem(50), CatalogWindowItem(60), CatalogWindowItem(80), CatalogWindowItem(100), CatalogWindowItem(90), CatalogWindowItem(110)),
|
Sale(CatalogWindowItem(40), CatalogWindowItem(70), CatalogWindowItem(50), CatalogWindowItem(60), CatalogWindowItem(80), CatalogWindowItem(100), CatalogWindowItem(90), CatalogWindowItem(110)),
|
||||||
Sale(CatalogEmoteItem(5), CatalogEmoteItem(9), CatalogEmoteItem(13), CatalogEmoteItem(11), CatalogEmoteItem(6), CatalogEmoteItem(8), CatalogNametagItem(10)),
|
Sale(CatalogEmoteItem(5), CatalogEmoteItem(9), CatalogEmoteItem(13), CatalogEmoteItem(11), CatalogEmoteItem(6), CatalogEmoteItem(8), CatalogNametagItem(10)),
|
||||||
Sale(CatalogFurnitureItem(600), CatalogFurnitureItem(610), CatalogFurnitureItem(620), CatalogFurnitureItem(630), CatalogFurnitureItem(640), CatalogFurnitureItem(650), CatalogFurnitureItem(660), CatalogFurnitureItem(900), CatalogFurnitureItem(910), CatalogFurnitureItem(920), CatalogFurnitureItem(930), CatalogFurnitureItem(940), CatalogFurnitureItem(1000), CatalogFurnitureItem(1010), CatalogFurnitureItem(1020), CatalogFurnitureItem(1030), CatalogFurnitureItem(1400), CatalogFurnitureItem(1410), CatalogFurnitureItem(1420), CatalogFurnitureItem(1430), CatalogFurnitureItem(1440), CatalogFurnitureItem(1441), CatalogFurnitureItem(1442), CatalogFurnitureItem(1443), CatalogFurnitureItem(1500), CatalogFurnitureItem(1510), CatalogFurnitureItem(1520), CatalogFurnitureItem(1530), CatalogFurnitureItem(1531), CatalogFurnitureItem(1532), CatalogFurnitureItem(1600), CatalogFurnitureItem(1610), CatalogFurnitureItem(1620), CatalogFurnitureItem(1630), CatalogFurnitureItem(1640), CatalogFurnitureItem(1650), CatalogFurnitureItem(1660), CatalogFurnitureItem(1661), CatalogFurnitureItem(1710), CatalogFurnitureItem(1800), CatalogFurnitureItem(1810), CatalogFurnitureItem(1900), CatalogFurnitureItem(1910)),
|
Sale(CatalogFurnitureItem(600), CatalogFurnitureItem(610), CatalogFurnitureItem(620), CatalogFurnitureItem(630), CatalogFurnitureItem(640), CatalogFurnitureItem(650), CatalogFurnitureItem(660), CatalogFurnitureItem(900), CatalogFurnitureItem(910), CatalogFurnitureItem(920), CatalogFurnitureItem(930), CatalogFurnitureItem(940), CatalogFurnitureItem(1000), CatalogFurnitureItem(1010), CatalogFurnitureItem(1020), CatalogFurnitureItem(1030), CatalogFurnitureItem(1400), CatalogFurnitureItem(1410), CatalogFurnitureItem(1420), CatalogFurnitureItem(1430), CatalogFurnitureItem(1440), CatalogFurnitureItem(1441), CatalogFurnitureItem(1442), CatalogFurnitureItem(1443), CatalogFurnitureItem(1500), CatalogFurnitureItem(1510), CatalogFurnitureItem(1520), CatalogFurnitureItem(1530), CatalogFurnitureItem(1600), CatalogFurnitureItem(1531), CatalogFurnitureItem(1532), CatalogFurnitureItem(1610), CatalogFurnitureItem(1620), CatalogFurnitureItem(1630), CatalogFurnitureItem(1640), CatalogFurnitureItem(1650), CatalogFurnitureItem(1660), CatalogFurnitureItem(1661), CatalogFurnitureItem(1710), CatalogFurnitureItem(1800), CatalogFurnitureItem(1810), CatalogFurnitureItem(1900), CatalogFurnitureItem(1910)),
|
||||||
(300,
|
(300,
|
||||||
(1, 2020),
|
(1, 2020),
|
||||||
(2, 2030),
|
(2, 2030),
|
||||||
(3, 2040),
|
(3, 2040),
|
||||||
CatalogFurnitureItem(730),
|
CatalogFurnitureItem(730)),
|
||||||
nextAvailablePole),
|
|
||||||
(100,
|
(100,
|
||||||
(1, 2020),
|
(1, 2020),
|
||||||
(2, 2030),
|
(2, 2030),
|
||||||
|
@ -1382,8 +1379,7 @@ WeeklySchedule = ((100,
|
||||||
(1, 2020),
|
(1, 2020),
|
||||||
(2, 2030),
|
(2, 2030),
|
||||||
(3, 2040),
|
(3, 2040),
|
||||||
CatalogFurnitureItem(1140),
|
CatalogFurnitureItem(1140)),
|
||||||
nextAvailablePole),
|
|
||||||
(100,
|
(100,
|
||||||
(1, 2020),
|
(1, 2020),
|
||||||
(2, 2030),
|
(2, 2030),
|
||||||
|
@ -1406,8 +1402,7 @@ WeeklySchedule = ((100,
|
||||||
(2, 2040),
|
(2, 2040),
|
||||||
(3, 2050),
|
(3, 2050),
|
||||||
CatalogClothingItem(131, 0),
|
CatalogClothingItem(131, 0),
|
||||||
CatalogClothingItem(225, 0),
|
CatalogClothingItem(225, 0)),
|
||||||
nextAvailablePole),
|
|
||||||
(300,
|
(300,
|
||||||
(1, 2030),
|
(1, 2030),
|
||||||
(2, 2040),
|
(2, 2040),
|
||||||
|
@ -1427,7 +1422,6 @@ WeeklySchedule = ((100,
|
||||||
(1, 2030),
|
(1, 2030),
|
||||||
(2, 2040),
|
(2, 2040),
|
||||||
(3, 2050),
|
(3, 2050),
|
||||||
nextAvailablePole,
|
|
||||||
CatalogEmoteItem(12),
|
CatalogEmoteItem(12),
|
||||||
CatalogNametagItem(5)),
|
CatalogNametagItem(5)),
|
||||||
(300,
|
(300,
|
||||||
|
@ -1451,8 +1445,7 @@ WeeklySchedule = ((100,
|
||||||
(1, 2030),
|
(1, 2030),
|
||||||
(2, 2040),
|
(2, 2040),
|
||||||
(3, 2050),
|
(3, 2050),
|
||||||
CatalogFurnitureItem(1215),
|
CatalogFurnitureItem(1215)),
|
||||||
nextAvailablePole),
|
|
||||||
(300,
|
(300,
|
||||||
(1, 2030),
|
(1, 2030),
|
||||||
(2, 2040),
|
(2, 2040),
|
||||||
|
@ -1472,17 +1465,19 @@ WeeklySchedule = ((100,
|
||||||
(300,
|
(300,
|
||||||
(1, 2030),
|
(1, 2030),
|
||||||
(2, 2040),
|
(2, 2040),
|
||||||
(3, 2050),
|
(3, 2050)))
|
||||||
nextAvailablePole))
|
|
||||||
|
|
||||||
class CatalogGenerator:
|
class CatalogGenerator:
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('CatalogGenerator')
|
notify = DirectNotifyGlobal.directNotify.newCategory('CatalogGenerator')
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__itemLists = {}
|
self.__itemLists = {}
|
||||||
|
self.__releasedItemLists = {}
|
||||||
|
|
||||||
if config.GetBool('save-catalog-schedule', False):
|
def getReleasedCatalogList(self, weekStart):
|
||||||
self.outputSchedule('catalog-schedule.txt')
|
dayNumber = int(weekStart / (24 * 60))
|
||||||
|
itemLists = self.__getReleasedItemLists(dayNumber, weekStart)
|
||||||
|
return itemLists
|
||||||
|
|
||||||
def generateMonthlyCatalog(self, avatar, weekStart):
|
def generateMonthlyCatalog(self, avatar, weekStart):
|
||||||
dayNumber = int(weekStart / (24 * 60))
|
dayNumber = int(weekStart / (24 * 60))
|
||||||
|
@ -1512,25 +1507,24 @@ class CatalogGenerator:
|
||||||
|
|
||||||
if nextAvailableCloset not in schedule:
|
if nextAvailableCloset not in schedule:
|
||||||
weeklyCatalog += self.__selectItem(avatar, nextAvailableCloset, monthlyCatalog, saleItem=0)
|
weeklyCatalog += self.__selectItem(avatar, nextAvailableCloset, monthlyCatalog, saleItem=0)
|
||||||
|
|
||||||
if nextAvailableBank not in schedule:
|
if nextAvailableBank not in schedule:
|
||||||
weeklyCatalog += self.__selectItem(avatar, nextAvailableBank, monthlyCatalog, saleItem=0)
|
weeklyCatalog += self.__selectItem(avatar, nextAvailableBank, monthlyCatalog, saleItem = 0)
|
||||||
|
|
||||||
if nextAvailableTank not in schedule:
|
if nextAvailableTank not in schedule:
|
||||||
weeklyCatalog += self.__selectItem(avatar, nextAvailableTank, monthlyCatalog, saleItem=0)
|
weeklyCatalog += self.__selectItem(avatar, nextAvailableTank, monthlyCatalog, saleItem = 0)
|
||||||
|
if nextAvailablePole not in schedule:
|
||||||
|
weeklyCatalog += self.__selectItem(avatar, nextAvailablePole, monthlyCatalog, saleItem = 0)
|
||||||
|
|
||||||
|
def hasPetTrick(catalog):
|
||||||
|
for item in catalog:
|
||||||
|
if isinstance(item, CatalogPetTrickItem):
|
||||||
|
return 1
|
||||||
|
|
||||||
weeklyCatalog += self.__selectItem(avatar, get50ItemTrunk, monthlyCatalog, saleItem=0)
|
return 0
|
||||||
if True:
|
|
||||||
|
|
||||||
def hasPetTrick(catalog):
|
if not hasPetTrick(weeklyCatalog) and not hasPetTrick(avatar.weeklyCatalog) and not hasPetTrick(avatar.backCatalog):
|
||||||
for item in catalog:
|
self.notify.debug('Artificially adding pet trick to catalog')
|
||||||
if isinstance(item, CatalogPetTrickItem):
|
weeklyCatalog += self.__selectItem(avatar, 5000, monthlyCatalog, saleItem=saleItem)
|
||||||
return 1
|
|
||||||
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if not hasPetTrick(weeklyCatalog) and not hasPetTrick(avatar.weeklyCatalog) and not hasPetTrick(avatar.backCatalog):
|
|
||||||
weeklyCatalog += self.__selectItem(avatar, 5000, monthlyCatalog, saleItem=saleItem)
|
|
||||||
self.notify.debug('Generated catalog: %s' % weeklyCatalog)
|
self.notify.debug('Generated catalog: %s' % weeklyCatalog)
|
||||||
return weeklyCatalog
|
return weeklyCatalog
|
||||||
|
|
||||||
|
@ -1559,12 +1553,45 @@ class CatalogGenerator:
|
||||||
|
|
||||||
return backCatalog
|
return backCatalog
|
||||||
|
|
||||||
|
def __getReleasedItemLists(self, dayNumber, weekStart):
|
||||||
|
itemLists = self.__releasedItemLists.get(dayNumber)
|
||||||
|
if itemLists != None:
|
||||||
|
return itemLists
|
||||||
|
else:
|
||||||
|
self.__releasedItemLists.clear()
|
||||||
|
testDaysAhead = simbase.config.GetInt('test-server-holiday-days-ahead', 0)
|
||||||
|
nowtuple = time.localtime(weekStart * 60 + testDaysAhead * 24 * 60 * 60)
|
||||||
|
year = nowtuple[0]
|
||||||
|
month = nowtuple[1]
|
||||||
|
day = nowtuple[2]
|
||||||
|
itemLists = []
|
||||||
|
for monthlyItems in MonthlySchedule:
|
||||||
|
startMM = monthlyItems[0]
|
||||||
|
startDD = monthlyItems[1]
|
||||||
|
endMM = monthlyItems[2]
|
||||||
|
endDD = monthlyItems[3]
|
||||||
|
if len(monthlyItems) == 7:
|
||||||
|
startYYYY = monthlyItems[4]
|
||||||
|
endYYYY = monthlyItems[5]
|
||||||
|
list = monthlyItems[6]
|
||||||
|
else:
|
||||||
|
startYYYY = 1969
|
||||||
|
endYYYY = year
|
||||||
|
list = monthlyItems[4]
|
||||||
|
pastStart = year > startYYYY or (year == startYYYY and (month > startMM or (month == startMM and day >= startDD)))
|
||||||
|
if pastStart:
|
||||||
|
itemLists.append(list)
|
||||||
|
|
||||||
|
self.__releasedItemLists[dayNumber] = itemLists
|
||||||
|
return itemLists
|
||||||
|
|
||||||
def __getMonthlyItemLists(self, dayNumber, weekStart):
|
def __getMonthlyItemLists(self, dayNumber, weekStart):
|
||||||
itemLists = self.__itemLists.get(dayNumber)
|
itemLists = self.__itemLists.get(dayNumber)
|
||||||
if itemLists != None:
|
if itemLists != None:
|
||||||
return itemLists
|
return itemLists
|
||||||
testDaysAhead = config.GetInt('test-server-holiday-days-ahead', 0)
|
testDaysAhead = simbase.config.GetInt('test-server-holiday-days-ahead', 0)
|
||||||
nowtuple = time.localtime(weekStart * 60 + testDaysAhead * 24 * 60 * 60)
|
nowtuple = time.localtime(weekStart * 60 + testDaysAhead * 24 * 60 * 60)
|
||||||
|
year = nowtuple[0]
|
||||||
month = nowtuple[1]
|
month = nowtuple[1]
|
||||||
day = nowtuple[2]
|
day = nowtuple[2]
|
||||||
self.notify.debug('Generating seasonal itemLists for %s/%s.' % (month, day))
|
self.notify.debug('Generating seasonal itemLists for %s/%s.' % (month, day))
|
||||||
|
@ -1574,9 +1601,16 @@ class CatalogGenerator:
|
||||||
startDD = monthlyItems[1]
|
startDD = monthlyItems[1]
|
||||||
endMM = monthlyItems[2]
|
endMM = monthlyItems[2]
|
||||||
endDD = monthlyItems[3]
|
endDD = monthlyItems[3]
|
||||||
list = monthlyItems[4]
|
if len(monthlyItems) == 7:
|
||||||
pastStart = month > startMM or (month == startMM and day >= startDD)
|
startYYYY = monthlyItems[4]
|
||||||
beforeEnd = month < endMM or (month == endMM and day <= endDD)
|
endYYYY = monthlyItems[5]
|
||||||
|
list = monthlyItems[6]
|
||||||
|
else:
|
||||||
|
startYYYY = 1969
|
||||||
|
endYYYY = year
|
||||||
|
list = monthlyItems[4]
|
||||||
|
pastStart = year >= startYYYY and (month > startMM or (month == startMM and day >= startDD))
|
||||||
|
beforeEnd = year <= endYYYY and (month < endMM or (month == endMM and day <= endDD))
|
||||||
if endMM < startMM:
|
if endMM < startMM:
|
||||||
if pastStart or beforeEnd:
|
if pastStart or beforeEnd:
|
||||||
itemLists.append(list)
|
itemLists.append(list)
|
||||||
|
@ -1707,35 +1741,31 @@ class CatalogGenerator:
|
||||||
def __recordSchedule(self, sched, weekCode, schedule):
|
def __recordSchedule(self, sched, weekCode, schedule):
|
||||||
if isinstance(schedule, Sale):
|
if isinstance(schedule, Sale):
|
||||||
schedule = schedule.args
|
schedule = schedule.args
|
||||||
try:
|
for item in schedule:
|
||||||
for item in list(schedule):
|
if callable(item):
|
||||||
if callable(item):
|
if item == nextAvailablePole:
|
||||||
if item == nextAvailablePole:
|
item = getAllPoles()
|
||||||
item = getAllPoles()
|
elif item == nextAvailableCloset:
|
||||||
elif item == nextAvailableCloset:
|
item = getAllClosets()
|
||||||
item = getAllClosets()
|
elif item == nextAvailableBank:
|
||||||
elif item == nextAvailableBank:
|
item = getAllBanks()
|
||||||
item = getAllBanks()
|
elif item == nextAvailableTank:
|
||||||
elif item == nextAvailableTank:
|
item == getAllTanks()
|
||||||
item = getAllTanks()
|
elif item == get50ItemCloset:
|
||||||
elif item == get50ItemCloset:
|
item = getMaxClosets()
|
||||||
item = getMaxClosets()
|
else:
|
||||||
elif item == get50ItemTrunk:
|
self.notify.warning("Don't know how to interpret function " % repr(name))
|
||||||
item = getMaxTrunks()
|
item = None
|
||||||
else:
|
elif isinstance(item, types.TupleType):
|
||||||
self.notify.warning("Don't know how to interpret function " % repr(name))
|
item = item[1]
|
||||||
item = None
|
if isinstance(item, types.IntType):
|
||||||
elif isinstance(item, types.TupleType):
|
item = MetaItems[item]
|
||||||
item = item[1]
|
if isinstance(item, CatalogItem.CatalogItem):
|
||||||
if isinstance(item, types.IntType):
|
self.__recordScheduleItem(sched, weekCode, None, item)
|
||||||
item = MetaItems[item]
|
elif item != None:
|
||||||
if isinstance(item, CatalogItem.CatalogItem):
|
for i in item:
|
||||||
self.__recordScheduleItem(sched, weekCode, None, item)
|
self.__recordScheduleItem(sched, None, weekCode, i)
|
||||||
elif item != None:
|
|
||||||
for i in item:
|
|
||||||
self.__recordScheduleItem(sched, None, weekCode, i)
|
|
||||||
except:
|
|
||||||
print 'Wrong: %s' % schedule
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def __recordScheduleItem(self, sched, weekCode, maybeWeekCode, item):
|
def __recordScheduleItem(self, sched, weekCode, maybeWeekCode, item):
|
||||||
|
|
|
@ -42,8 +42,8 @@ class CatalogItem:
|
||||||
return
|
return
|
||||||
|
|
||||||
def isAward(self):
|
def isAward(self):
|
||||||
result = self.specialEventId != 0
|
#result = self.specialEventId != 0
|
||||||
return result
|
return False
|
||||||
|
|
||||||
def makeNewItem(self):
|
def makeNewItem(self):
|
||||||
pass
|
pass
|
||||||
|
@ -78,9 +78,6 @@ class CatalogItem:
|
||||||
def storedInCloset(self):
|
def storedInCloset(self):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def storedInTrunk(self):
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def storedInAttic(self):
|
def storedInAttic(self):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -196,6 +193,8 @@ class CatalogItem:
|
||||||
return TTLocalizer.CatalogPurchaseGiftLimitReached
|
return TTLocalizer.CatalogPurchaseGiftLimitReached
|
||||||
elif retcode == ToontownGlobals.P_NotEnoughMoney:
|
elif retcode == ToontownGlobals.P_NotEnoughMoney:
|
||||||
return TTLocalizer.CatalogPurchaseGiftNotEnoughMoney
|
return TTLocalizer.CatalogPurchaseGiftNotEnoughMoney
|
||||||
|
elif retcode == ToontownGlobals.P_TooFast:
|
||||||
|
return TTLocalizer.CatalogPurchaseGiftTooFast
|
||||||
else:
|
else:
|
||||||
return TTLocalizer.CatalogPurchaseGiftGeneralError % {'friend': '%s',
|
return TTLocalizer.CatalogPurchaseGiftGeneralError % {'friend': '%s',
|
||||||
'error': retcode}
|
'error': retcode}
|
||||||
|
@ -277,9 +276,9 @@ class CatalogItem:
|
||||||
x = di.getArg(STInt16, 10)
|
x = di.getArg(STInt16, 10)
|
||||||
y = di.getArg(STInt16, 10)
|
y = di.getArg(STInt16, 10)
|
||||||
z = di.getArg(STInt16, 100)
|
z = di.getArg(STInt16, 100)
|
||||||
h = di.getArg(STInt8, 256.0 / 360.0)
|
h = di.getArg(STInt16, 256.0 / 360.0)
|
||||||
p = di.getArg(STInt8, 256.0 / 360.0)
|
p = di.getArg(STInt16, 256.0 / 360.0)
|
||||||
r = di.getArg(STInt8, 256.0 / 360.0)
|
r = di.getArg(STInt16, 256.0 / 360.0)
|
||||||
self.posHpr = (x,
|
self.posHpr = (x,
|
||||||
y,
|
y,
|
||||||
z,
|
z,
|
||||||
|
@ -287,7 +286,7 @@ class CatalogItem:
|
||||||
p,
|
p,
|
||||||
r)
|
r)
|
||||||
if store & GiftTag:
|
if store & GiftTag:
|
||||||
self.giftTag = di.getString()
|
self.giftTag = di.getUint32()
|
||||||
self.specialEventId = di.getUint8()
|
self.specialEventId = di.getUint8()
|
||||||
|
|
||||||
def encodeDatagram(self, dg, store):
|
def encodeDatagram(self, dg, store):
|
||||||
|
@ -297,9 +296,9 @@ class CatalogItem:
|
||||||
dg.putArg(self.posHpr[0], STInt16, 10)
|
dg.putArg(self.posHpr[0], STInt16, 10)
|
||||||
dg.putArg(self.posHpr[1], STInt16, 10)
|
dg.putArg(self.posHpr[1], STInt16, 10)
|
||||||
dg.putArg(self.posHpr[2], STInt16, 100)
|
dg.putArg(self.posHpr[2], STInt16, 100)
|
||||||
dg.putArg(self.posHpr[3], STInt8, 256.0 / 360.0)
|
dg.putArg(self.posHpr[3], STInt16, 256.0 / 360.0)
|
||||||
dg.putArg(self.posHpr[4], STInt8, 256.0 / 360.0)
|
dg.putArg(self.posHpr[4], STInt16, 256.0 / 360.0)
|
||||||
dg.putArg(self.posHpr[5], STInt8, 256.0 / 360.0)
|
dg.putArg(self.posHpr[5], STInt16, 256.0 / 360.0)
|
||||||
if store & GiftTag:
|
if store & GiftTag:
|
||||||
dg.addString(self.giftTag)
|
dg.addString(self.giftTag)
|
||||||
dg.addUint8(self.specialEventId)
|
dg.addUint8(self.specialEventId)
|
||||||
|
|
|
@ -10,7 +10,6 @@ from CatalogFlooringItem import getAllFloorings
|
||||||
from CatalogMouldingItem import getAllMouldings
|
from CatalogMouldingItem import getAllMouldings
|
||||||
from CatalogWainscotingItem import getAllWainscotings
|
from CatalogWainscotingItem import getAllWainscotings
|
||||||
from CatalogFurnitureItem import getAllFurnitures
|
from CatalogFurnitureItem import getAllFurnitures
|
||||||
from CatalogFurnitureItem import FLTrunk
|
|
||||||
from otp.otpbase import OTPGlobals
|
from otp.otpbase import OTPGlobals
|
||||||
CATALOG_PANEL_WORDWRAP = 10
|
CATALOG_PANEL_WORDWRAP = 10
|
||||||
CATALOG_PANEL_CHAT_WORDWRAP = 9
|
CATALOG_PANEL_CHAT_WORDWRAP = 9
|
||||||
|
@ -292,11 +291,7 @@ class CatalogItemPanel(DirectFrame):
|
||||||
auxText = TTLocalizer.CatalogOnOrderText
|
auxText = TTLocalizer.CatalogOnOrderText
|
||||||
else:
|
else:
|
||||||
auxText = ''
|
auxText = ''
|
||||||
isNameTag = typeCode == CatalogItemTypes.NAMETAG_ITEM
|
if self['item'].reachedPurchaseLimit(base.localAvatar):
|
||||||
if isNameTag and self['item'].nametagStyle == base.localAvatar.getNametagStyle():
|
|
||||||
auxText = TTLocalizer.CatalogCurrent
|
|
||||||
self.buyButton['state'] = DGG.DISABLED
|
|
||||||
elif self['item'].reachedPurchaseLimit(base.localAvatar):
|
|
||||||
max = self['item'].getPurchaseLimit()
|
max = self['item'].getPurchaseLimit()
|
||||||
if max <= 1:
|
if max <= 1:
|
||||||
auxText = TTLocalizer.CatalogPurchasedText
|
auxText = TTLocalizer.CatalogPurchasedText
|
||||||
|
@ -325,13 +320,9 @@ class CatalogItemPanel(DirectFrame):
|
||||||
|
|
||||||
def __handlePurchaseRequest(self):
|
def __handlePurchaseRequest(self):
|
||||||
if self['item'].replacesExisting() and self['item'].hasExisting():
|
if self['item'].replacesExisting() and self['item'].hasExisting():
|
||||||
if self['item'].getFlags() & FLTrunk:
|
message = TTLocalizer.CatalogOnlyOnePurchase % {'old': self['item'].getYourOldDesc(),
|
||||||
message = TTLocalizer.CatalogVerifyPurchase % {'item': self['item'].getName(),
|
'item': self['item'].getName(),
|
||||||
'price': self['item'].getPrice(self['type'])}
|
'price': self['item'].getPrice(self['type'])}
|
||||||
else:
|
|
||||||
message = TTLocalizer.CatalogOnlyOnePurchase % {'old': self['item'].getYourOldDesc(),
|
|
||||||
'item': self['item'].getName(),
|
|
||||||
'price': self['item'].getPrice(self['type'])}
|
|
||||||
elif self['item'].isRental():
|
elif self['item'].isRental():
|
||||||
message = TTLocalizer.CatalogVerifyRent % {'item': self['item'].getName(),
|
message = TTLocalizer.CatalogVerifyRent % {'item': self['item'].getName(),
|
||||||
'price': self['item'].getPrice(self['type'])}
|
'price': self['item'].getPrice(self['type'])}
|
||||||
|
@ -402,14 +393,9 @@ class CatalogItemPanel(DirectFrame):
|
||||||
'item': self['item'].getName(),
|
'item': self['item'].getName(),
|
||||||
'price': self['item'].getPrice(self['type'])}
|
'price': self['item'].getPrice(self['type'])}
|
||||||
else:
|
else:
|
||||||
friendIndex = self.parentCatalogScreen.friendGiftIndex
|
|
||||||
friendText = 'Error'
|
|
||||||
numFriends = len(base.localAvatar.friendsList) + len(base.cr.avList) - 1
|
|
||||||
if numFriends > 0:
|
|
||||||
friendText = self.parentCatalogScreen.receiverName
|
|
||||||
message = TTLocalizer.CatalogVerifyGift % {'item': self['item'].getName(),
|
message = TTLocalizer.CatalogVerifyGift % {'item': self['item'].getName(),
|
||||||
'price': self['item'].getPrice(self['type']),
|
'price': self['item'].getPrice(self['type']),
|
||||||
'friend': friendText}
|
'friend': self.parentCatalogScreen.friendName if self.parentCatalogScreen.friendName else TTLocalizer.CatalogGiftError}
|
||||||
self.verify = TTDialog.TTGlobalDialog(doneEvent='verifyGiftDone', message=message, style=TTDialog.TwoChoice)
|
self.verify = TTDialog.TTGlobalDialog(doneEvent='verifyGiftDone', message=message, style=TTDialog.TwoChoice)
|
||||||
self.verify.show()
|
self.verify.show()
|
||||||
self.accept('verifyGiftDone', self.__handleVerifyGift)
|
self.accept('verifyGiftDone', self.__handleVerifyGift)
|
||||||
|
@ -441,44 +427,38 @@ class CatalogItemPanel(DirectFrame):
|
||||||
def updateGiftButton(self, giftUpdate = 0):
|
def updateGiftButton(self, giftUpdate = 0):
|
||||||
if not self.loaded:
|
if not self.loaded:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.giftButton.show()
|
self.giftButton.show()
|
||||||
|
|
||||||
if giftUpdate == 0:
|
if giftUpdate == 0:
|
||||||
return
|
return
|
||||||
self.auxText['text'] = ' '
|
|
||||||
numFriends = len(base.localAvatar.friendsList) + len(base.cr.avList) - 1
|
self.auxText['text'] = ''
|
||||||
if numFriends > 0:
|
self.giftButton['state'] = DGG.DISABLED
|
||||||
self.giftButton['state'] = DGG.DISABLED
|
self.giftButton.show()
|
||||||
self.giftButton.show()
|
|
||||||
auxText = ' '
|
if self['item'].isGift() <= 0:
|
||||||
if self['item'].isGift() <= 0:
|
self.auxText['text'] = TTLocalizer.CatalogNotAGift
|
||||||
self.giftButton.show()
|
return
|
||||||
self.giftButton['state'] = DGG.DISABLED
|
|
||||||
auxText = TTLocalizer.CatalogNotAGift
|
if not self.parentCatalogScreen.friend:
|
||||||
self.auxText['text'] = auxText
|
return
|
||||||
return
|
|
||||||
elif self.parentCatalogScreen.gotAvatar == 1:
|
avatar = self.parentCatalogScreen.friend
|
||||||
avatar = self.parentCatalogScreen.giftAvatar
|
|
||||||
if self['item'].forBoysOnly() and avatar.getStyle().getGender() == 'f' or self['item'].forGirlsOnly() and avatar.getStyle().getGender() == 'm':
|
if self['item'].forBoysOnly() and avatar.getStyle().getGender() == 'f' or self['item'].forGirlsOnly() and avatar.getStyle().getGender() == 'm':
|
||||||
self.giftButton.show()
|
self.auxText['text'] = TTLocalizer.CatalogNoFit
|
||||||
self.giftButton['state'] = DGG.DISABLED
|
elif self['item'].reachedPurchaseLimit(avatar):
|
||||||
auxText = TTLocalizer.CatalogNoFit
|
self.auxText['text'] = TTLocalizer.CatalogPurchasedGiftText
|
||||||
self.auxText['text'] = auxText
|
elif len(avatar.mailboxContents) + len(avatar.onOrder) + len(avatar.onGiftOrder) + 1 >= ToontownGlobals.MaxMailboxContents:
|
||||||
return
|
self.auxText['text'] = TTLocalizer.CatalogMailboxFull
|
||||||
elif self['item'].reachedPurchaseLimit(avatar):
|
else:
|
||||||
self.giftButton.show()
|
orderCount = avatar.onGiftOrder.count(self['item'])
|
||||||
self.giftButton['state'] = DGG.DISABLED
|
|
||||||
auxText = TTLocalizer.CatalogPurchasedGiftText
|
if orderCount:
|
||||||
self.auxText['text'] = auxText
|
self.auxText['text'] = TTLocalizer.CatalogOnOrderText if orderCount == 1 else '%d %s' % (orderCount, TTLocalizer.CatalogOnOrderText)
|
||||||
return
|
if self['item'].getPrice(self['type']) <= base.localAvatar.getMoney() + base.localAvatar.getBankMoney():
|
||||||
elif len(avatar.mailboxContents) + len(avatar.onGiftOrder) >= ToontownGlobals.MaxMailboxContents:
|
self.giftButton['state'] = DGG.NORMAL
|
||||||
self.giftButton.show()
|
|
||||||
self.giftButton['state'] = DGG.DISABLED
|
|
||||||
auxText = TTLocalizer.CatalogMailboxFull
|
|
||||||
self.auxText['text'] = auxText
|
|
||||||
return
|
|
||||||
elif self['item'].getPrice(self['type']) <= base.localAvatar.getMoney() + base.localAvatar.getBankMoney():
|
|
||||||
self.giftButton['state'] = DGG.NORMAL
|
|
||||||
self.giftButton.show()
|
|
||||||
|
|
||||||
def handleSoundOnButton(self):
|
def handleSoundOnButton(self):
|
||||||
item = self.items[self.itemIndex]
|
item = self.items[self.itemIndex]
|
||||||
|
|
|
@ -17,11 +17,7 @@ class CatalogNametagItem(CatalogItem.CatalogItem):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def reachedPurchaseLimit(self, avatar):
|
def reachedPurchaseLimit(self, avatar):
|
||||||
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or self in avatar.awardMailboxContents or self in avatar.onAwardOrder:
|
return self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or self.nametagStyle in avatar.nametagStyles
|
||||||
return 1
|
|
||||||
if avatar.nametagStyle == self.nametagStyle:
|
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def getAcceptItemErrorText(self, retcode):
|
def getAcceptItemErrorText(self, retcode):
|
||||||
if retcode == ToontownGlobals.P_ItemAvailable:
|
if retcode == ToontownGlobals.P_ItemAvailable:
|
||||||
|
@ -45,6 +41,7 @@ class CatalogNametagItem(CatalogItem.CatalogItem):
|
||||||
def recordPurchase(self, avatar, optional):
|
def recordPurchase(self, avatar, optional):
|
||||||
if avatar:
|
if avatar:
|
||||||
avatar.b_setNametagStyle(self.nametagStyle)
|
avatar.b_setNametagStyle(self.nametagStyle)
|
||||||
|
avatar.addNametagStyle(self.nametagStyle)
|
||||||
return ToontownGlobals.P_ItemAvailable
|
return ToontownGlobals.P_ItemAvailable
|
||||||
|
|
||||||
def getDeliveryTime(self):
|
def getDeliveryTime(self):
|
||||||
|
@ -52,10 +49,7 @@ class CatalogNametagItem(CatalogItem.CatalogItem):
|
||||||
|
|
||||||
def getPicture(self, avatar):
|
def getPicture(self, avatar):
|
||||||
frame = self.makeFrame()
|
frame = self.makeFrame()
|
||||||
if self.nametagStyle == 100:
|
inFont = ToontownGlobals.getNametagFont(self.nametagStyle)
|
||||||
inFont = ToontownGlobals.getToonFont()
|
|
||||||
else:
|
|
||||||
inFont = ToontownGlobals.getNametagFont(self.nametagStyle)
|
|
||||||
nameTagDemo = DirectLabel(parent=frame, relief=None, pos=(0, 0, 0.24), scale=0.5, text=base.localAvatar.getName(), text_fg=(1.0, 1.0, 1.0, 1), text_shadow=(0, 0, 0, 1), text_font=inFont, text_wordwrap=9)
|
nameTagDemo = DirectLabel(parent=frame, relief=None, pos=(0, 0, 0.24), scale=0.5, text=base.localAvatar.getName(), text_fg=(1.0, 1.0, 1.0, 1), text_shadow=(0, 0, 0, 1), text_font=inFont, text_wordwrap=9)
|
||||||
self.hasPicture = True
|
self.hasPicture = True
|
||||||
return (frame, None)
|
return (frame, None)
|
||||||
|
@ -71,16 +65,6 @@ class CatalogNametagItem(CatalogItem.CatalogItem):
|
||||||
|
|
||||||
def getBasePrice(self):
|
def getBasePrice(self):
|
||||||
return 500
|
return 500
|
||||||
cost = 500
|
|
||||||
if self.nametagStyle == 0:
|
|
||||||
cost = 600
|
|
||||||
elif self.nametagStyle == 1:
|
|
||||||
cost = 600
|
|
||||||
elif self.nametagStyle == 2:
|
|
||||||
cost = 600
|
|
||||||
elif self.nametagStyle == 100:
|
|
||||||
cost = 50
|
|
||||||
return cost
|
|
||||||
|
|
||||||
def decodeDatagram(self, di, versionNumber, store):
|
def decodeDatagram(self, di, versionNumber, store):
|
||||||
CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store)
|
CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store)
|
||||||
|
@ -92,9 +76,6 @@ class CatalogNametagItem(CatalogItem.CatalogItem):
|
||||||
dg.addUint16(self.nametagStyle)
|
dg.addUint16(self.nametagStyle)
|
||||||
dg.addBool(self.isSpecial)
|
dg.addBool(self.isSpecial)
|
||||||
|
|
||||||
def isGift(self):
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def getBackSticky(self):
|
def getBackSticky(self):
|
||||||
itemType = 1
|
itemType = 1
|
||||||
numSticky = 4
|
numSticky = 4
|
||||||
|
|
|
@ -17,7 +17,7 @@ class CatalogPetTrickItem(CatalogItem.CatalogItem):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def reachedPurchaseLimit(self, avatar):
|
def reachedPurchaseLimit(self, avatar):
|
||||||
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or self in avatar.awardMailboxContents or self in avatar.onAwardOrder or not hasattr(avatar, 'petTrickPhrases'):
|
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or not hasattr(avatar, 'petTrickPhrases'):
|
||||||
return 1
|
return 1
|
||||||
return self.trickId in avatar.petTrickPhrases
|
return self.trickId in avatar.petTrickPhrases
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ class CatalogPoleItem(CatalogItem.CatalogItem):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def reachedPurchaseLimit(self, avatar):
|
def reachedPurchaseLimit(self, avatar):
|
||||||
return avatar.getFishingRod() >= self.rodId or self in avatar.onOrder or self in avatar.mailboxContents
|
return avatar.getMaxFishingRod() >= self.rodId or self in avatar.onOrder or self in avatar.mailboxContents
|
||||||
|
|
||||||
def saveHistory(self):
|
def saveHistory(self):
|
||||||
return 1
|
return 1
|
||||||
|
@ -31,17 +31,18 @@ class CatalogPoleItem(CatalogItem.CatalogItem):
|
||||||
if self.rodId < 0 or self.rodId > FishGlobals.MaxRodId:
|
if self.rodId < 0 or self.rodId > FishGlobals.MaxRodId:
|
||||||
self.notify.warning('Invalid fishing pole: %s for avatar %s' % (self.rodId, avatar.doId))
|
self.notify.warning('Invalid fishing pole: %s for avatar %s' % (self.rodId, avatar.doId))
|
||||||
return ToontownGlobals.P_InvalidIndex
|
return ToontownGlobals.P_InvalidIndex
|
||||||
if self.rodId < avatar.getFishingRod():
|
if self.rodId < avatar.getMaxFishingRod():
|
||||||
self.notify.warning('Avatar already has pole: %s for avatar %s' % (self.rodId, avatar.doId))
|
self.notify.warning('Avatar already has pole: %s for avatar %s' % (self.rodId, avatar.doId))
|
||||||
return ToontownGlobals.P_ItemUnneeded
|
return ToontownGlobals.P_ItemUnneeded
|
||||||
avatar.b_setFishingRod(self.rodId)
|
avatar.b_setFishingRod(self.rodId)
|
||||||
|
avatar.b_setMaxFishingRod(self.rodId)
|
||||||
return ToontownGlobals.P_ItemAvailable
|
return ToontownGlobals.P_ItemAvailable
|
||||||
|
|
||||||
def isGift(self):
|
def isGift(self):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def getDeliveryTime(self):
|
def getDeliveryTime(self):
|
||||||
return 1
|
return 24 * 60
|
||||||
|
|
||||||
def getPicture(self, avatar):
|
def getPicture(self, avatar):
|
||||||
rodPath = FishGlobals.RodFileDict.get(self.rodId)
|
rodPath = FishGlobals.RodFileDict.get(self.rodId)
|
||||||
|
@ -83,7 +84,6 @@ class CatalogPoleItem(CatalogItem.CatalogItem):
|
||||||
def decodeDatagram(self, di, versionNumber, store):
|
def decodeDatagram(self, di, versionNumber, store):
|
||||||
CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store)
|
CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store)
|
||||||
self.rodId = di.getUint8()
|
self.rodId = di.getUint8()
|
||||||
price = FishGlobals.RodPriceDict[self.rodId]
|
|
||||||
|
|
||||||
def encodeDatagram(self, dg, store):
|
def encodeDatagram(self, dg, store):
|
||||||
CatalogItem.CatalogItem.encodeDatagram(self, dg, store)
|
CatalogItem.CatalogItem.encodeDatagram(self, dg, store)
|
||||||
|
@ -91,7 +91,7 @@ class CatalogPoleItem(CatalogItem.CatalogItem):
|
||||||
|
|
||||||
|
|
||||||
def nextAvailablePole(avatar, duplicateItems):
|
def nextAvailablePole(avatar, duplicateItems):
|
||||||
rodId = avatar.getFishingRod() + 1
|
rodId = avatar.getMaxFishingRod() + 1
|
||||||
if rodId > FishGlobals.MaxRodId:
|
if rodId > FishGlobals.MaxRodId:
|
||||||
return None
|
return None
|
||||||
item = CatalogPoleItem(rodId)
|
item = CatalogPoleItem(rodId)
|
||||||
|
|
|
@ -24,9 +24,7 @@ class CatalogRentalItem(CatalogItem.CatalogItem):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def reachedPurchaseLimit(self, avatar):
|
def reachedPurchaseLimit(self, avatar):
|
||||||
if self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder or self in avatar.awardMailboxContents or self in avatar.onAwardOrder:
|
return self in avatar.onOrder or self in avatar.mailboxContents or self in avatar.onGiftOrder
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def saveHistory(self):
|
def saveHistory(self):
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -15,7 +15,7 @@ import random
|
||||||
from toontown.toon import DistributedToon
|
from toontown.toon import DistributedToon
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from otp.nametag.ChatBalloon import ChatBalloon
|
from otp.nametag.ChatBalloon import ChatBalloon
|
||||||
from otp.nametag import NametagGroup
|
from otp.nametag import NametagGroup, NametagConstants
|
||||||
|
|
||||||
NUM_CATALOG_ROWS = 3
|
NUM_CATALOG_ROWS = 3
|
||||||
NUM_CATALOG_COLS = 2
|
NUM_CATALOG_COLS = 2
|
||||||
|
@ -31,8 +31,10 @@ class CatalogScreen(DirectFrame):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('CatalogScreen')
|
notify = DirectNotifyGlobal.directNotify.newCategory('CatalogScreen')
|
||||||
|
|
||||||
def __init__(self, parent = aspect2d, **kw):
|
def __init__(self, parent = aspect2d, **kw):
|
||||||
|
self.gifting = -1
|
||||||
guiItems = loader.loadModel('phase_5.5/models/gui/catalog_gui')
|
guiItems = loader.loadModel('phase_5.5/models/gui/catalog_gui')
|
||||||
background = guiItems.find('**/catalog_background')
|
background = guiItems.find('**/catalog_background')
|
||||||
|
background.setBin("background", 10)
|
||||||
guiButton = loader.loadModel('phase_3/models/gui/quit_button')
|
guiButton = loader.loadModel('phase_3/models/gui/quit_button')
|
||||||
guiBack = loader.loadModel('phase_5.5/models/gui/package_delivery_panel')
|
guiBack = loader.loadModel('phase_5.5/models/gui/package_delivery_panel')
|
||||||
optiondefs = (('scale', 0.667, None),
|
optiondefs = (('scale', 0.667, None),
|
||||||
|
@ -43,19 +45,11 @@ class CatalogScreen(DirectFrame):
|
||||||
('relief', None, None))
|
('relief', None, None))
|
||||||
self.defineoptions(kw, optiondefs)
|
self.defineoptions(kw, optiondefs)
|
||||||
DirectFrame.__init__(self, parent)
|
DirectFrame.__init__(self, parent)
|
||||||
self.friendGiftIndex = 0
|
self.friend = None
|
||||||
self.friendGiftHandle = None
|
self.friendAvId = None
|
||||||
self.frienddoId = None
|
self.friendName = None
|
||||||
self.receiverName = 'Error Nameless Toon'
|
self.friendList = []
|
||||||
self.friends = {}
|
self.friends = []
|
||||||
self.family = {}
|
|
||||||
self.ffList = []
|
|
||||||
self.textRolloverColor = Vec4(1, 1, 0, 1)
|
|
||||||
self.textDownColor = Vec4(0.5, 0.9, 1, 1)
|
|
||||||
self.textDisabledColor = Vec4(0.4, 0.8, 0.4, 1)
|
|
||||||
self.giftAvatar = None
|
|
||||||
self.gotAvatar = 0
|
|
||||||
self.allowGetDetails = 1
|
|
||||||
self.load(guiItems, guiButton, guiBack)
|
self.load(guiItems, guiButton, guiBack)
|
||||||
self.initialiseoptions(CatalogScreen)
|
self.initialiseoptions(CatalogScreen)
|
||||||
self.enableBackorderCatalogButton()
|
self.enableBackorderCatalogButton()
|
||||||
|
@ -65,10 +59,8 @@ class CatalogScreen(DirectFrame):
|
||||||
self.hide()
|
self.hide()
|
||||||
self.clarabelleChatNP = None
|
self.clarabelleChatNP = None
|
||||||
self.clarabelleChatBalloon = None
|
self.clarabelleChatBalloon = None
|
||||||
self.gifting = -1
|
|
||||||
self.createdGiftGui = None
|
self.createdGiftGui = None
|
||||||
self.viewing = None
|
self.viewing = None
|
||||||
return
|
|
||||||
|
|
||||||
def show(self):
|
def show(self):
|
||||||
self.accept('CatalogItemPurchaseRequest', self.__handlePurchaseRequest)
|
self.accept('CatalogItemPurchaseRequest', self.__handlePurchaseRequest)
|
||||||
|
@ -90,9 +82,6 @@ class CatalogScreen(DirectFrame):
|
||||||
|
|
||||||
taskMgr.doMethodLater(1.0, clarabelleGreeting, 'clarabelleGreeting')
|
taskMgr.doMethodLater(1.0, clarabelleGreeting, 'clarabelleGreeting')
|
||||||
taskMgr.doMethodLater(12.0, clarabelleHelpText1, 'clarabelleHelpText1')
|
taskMgr.doMethodLater(12.0, clarabelleHelpText1, 'clarabelleHelpText1')
|
||||||
if hasattr(self, 'giftToggle'):
|
|
||||||
self.giftToggle['state'] = DGG.NORMAL
|
|
||||||
self.giftToggle['text'] = TTLocalizer.CatalogGiftToggleOn
|
|
||||||
|
|
||||||
def hide(self):
|
def hide(self):
|
||||||
self.ignore('CatalogItemPurchaseRequest')
|
self.ignore('CatalogItemPurchaseRequest')
|
||||||
|
@ -542,15 +531,15 @@ class CatalogScreen(DirectFrame):
|
||||||
-2.0,
|
-2.0,
|
||||||
-1.45), image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, -1.9 + lift), image=backDown, pressEffect=0, command=self.showEmblemItems, text=TTLocalizer.CatalogEmblem, text_font=ToontownGlobals.getSignFont(), text_pos=(1.75, 0.132), text_scale=0.065, text_fg=(0.353, 0.627, 0.627, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0))
|
-1.45), image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, -1.9 + lift), image=backDown, pressEffect=0, command=self.showEmblemItems, text=TTLocalizer.CatalogEmblem, text_font=ToontownGlobals.getSignFont(), text_pos=(1.75, 0.132), text_scale=0.065, text_fg=(0.353, 0.627, 0.627, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0))
|
||||||
self.emblemCatalogButton2.hide()
|
self.emblemCatalogButton2.hide()
|
||||||
self.__makeFFlist()
|
self.__makeFriendList()
|
||||||
if len(self.ffList) > 0:
|
if len(self.friendList) > 0:
|
||||||
if config.GetBool('want-gifting', True):
|
if config.GetBool('want-gifting', True):
|
||||||
self.giftToggle = DirectButton(self.base, relief=None, pressEffect=0, image=(giftToggleUp, giftToggleDown, giftToggleUp), image_scale=(1.0, 1, 0.7), command=self.__giftToggle, text=TTLocalizer.CatalogGiftToggleOff, text_font=ToontownGlobals.getSignFont(), text_pos=TTLocalizer.CSgiftTogglePos, text_scale=TTLocalizer.CSgiftToggle, text_fg=(0.353, 0.627, 0.627, 1.0), text3_fg=(0.15, 0.3, 0.3, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0), image_color=Vec4(1.0, 1.0, 0.2, 1.0), image1_color=Vec4(0.9, 0.85, 0.2, 1.0), image2_color=Vec4(0.9, 0.85, 0.2, 1.0), image3_color=Vec4(0.5, 0.45, 0.2, 1.0))
|
self.giftToggle = DirectButton(self.base, relief=None, pressEffect=0, image=(giftToggleUp, giftToggleDown, giftToggleUp), image_scale=(1.0, 1, 0.7), command=self.__giftToggle, text=TTLocalizer.CatalogGiftToggleOff, text_font=ToontownGlobals.getSignFont(), text_pos=TTLocalizer.CSgiftTogglePos, text_scale=TTLocalizer.CSgiftToggle, text_fg=(0.353, 0.627, 0.627, 1.0), text3_fg=(0.15, 0.3, 0.3, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0), image_color=Vec4(1.0, 1.0, 0.2, 1.0), image1_color=Vec4(0.9, 0.85, 0.2, 1.0), image2_color=Vec4(0.9, 0.85, 0.2, 1.0), image3_color=Vec4(0.5, 0.45, 0.2, 1.0))
|
||||||
self.giftToggle.setPos(0.0, 0, -0.035)
|
self.giftToggle.setPos(0.0, 0, -0.035)
|
||||||
self.giftLabel = DirectLabel(self.base, relief=None, image=giftFriends, image_scale=(1.15, 1, 1.14), text=' ', text_font=ToontownGlobals.getSignFont(), text_pos=(1.2, -0.97), text_scale=0.07, text_fg=(0.392, 0.549, 0.627, 1.0), sortOrder=100, textMayChange=1)
|
self.giftLabel = DirectLabel(self.base, relief=None, image=giftFriends, image_scale=(1.15, 1, 1.14), text=' ', text_font=ToontownGlobals.getSignFont(), text_pos=(1.2, -0.97), text_scale=0.07, text_fg=(0.392, 0.549, 0.627, 1.0), sortOrder=100, textMayChange=1)
|
||||||
self.giftLabel.setPos(-0.15, 0, 0.08)
|
self.giftLabel.setPos(-0.15, 0, 0.08)
|
||||||
self.giftLabel.hide()
|
self.giftLabel.hide()
|
||||||
self.friendLabel = DirectLabel(self.base, relief=None, text='Friend Name', text_font=ToontownGlobals.getSignFont(), text_pos=(-0.25, 0.132), text_scale=0.068, text_align=TextNode.ALeft, text_fg=(0.992, 0.949, 0.327, 1.0), sortOrder=100, textMayChange=1)
|
self.friendLabel = DirectLabel(self.base, relief=None, text=TTLocalizer.CatalogGiftChoose, text_font=ToontownGlobals.getSignFont(), text_pos=(-0.25, 0.132), text_scale=0.068, text_align=TextNode.ALeft, text_fg=(0.992, 0.949, 0.327, 1.0), sortOrder=100, textMayChange=1)
|
||||||
self.friendLabel.setPos(0.5, 0, -0.42)
|
self.friendLabel.setPos(0.5, 0, -0.42)
|
||||||
self.friendLabel.hide()
|
self.friendLabel.hide()
|
||||||
gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui')
|
gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui')
|
||||||
|
@ -569,9 +558,6 @@ class CatalogScreen(DirectFrame):
|
||||||
clipNP = self.scrollList.attachNewNode(clipper)
|
clipNP = self.scrollList.attachNewNode(clipper)
|
||||||
self.scrollList.setClipPlane(clipNP)
|
self.scrollList.setClipPlane(clipNP)
|
||||||
self.__makeScrollList()
|
self.__makeScrollList()
|
||||||
friendId = self.ffList[0]
|
|
||||||
self.__chooseFriend(self.ffList[0][0], self.ffList[0][1])
|
|
||||||
self.update()
|
|
||||||
self.createdGiftGui = 1
|
self.createdGiftGui = 1
|
||||||
for i in xrange(4):
|
for i in xrange(4):
|
||||||
self.newCatalogButton.component('text%d' % i).setR(90)
|
self.newCatalogButton.component('text%d' % i).setR(90)
|
||||||
|
@ -828,8 +814,7 @@ class CatalogScreen(DirectFrame):
|
||||||
taskMgr.remove('clarabelleGreeting')
|
taskMgr.remove('clarabelleGreeting')
|
||||||
taskMgr.remove('clarabelleHelpText1')
|
taskMgr.remove('clarabelleHelpText1')
|
||||||
taskMgr.remove('clarabelleAskAnythingElse')
|
taskMgr.remove('clarabelleAskAnythingElse')
|
||||||
if self.giftAvatar:
|
taskMgr.remove('friendButtonsReady')
|
||||||
base.cr.cancelAvatarDetailsRequest(self.giftAvatar)
|
|
||||||
self.hide()
|
self.hide()
|
||||||
self.hangup.hide()
|
self.hangup.hide()
|
||||||
self.destroy()
|
self.destroy()
|
||||||
|
@ -861,16 +846,12 @@ class CatalogScreen(DirectFrame):
|
||||||
del self.giftLabel
|
del self.giftLabel
|
||||||
del self.friendLabel
|
del self.friendLabel
|
||||||
del self.scrollList
|
del self.scrollList
|
||||||
|
del self.friend
|
||||||
|
del self.friends
|
||||||
self.unloadClarabelle()
|
self.unloadClarabelle()
|
||||||
if self.responseDialog:
|
if self.responseDialog:
|
||||||
self.responseDialog.cleanup()
|
self.responseDialog.cleanup()
|
||||||
self.responseDialog = None
|
self.responseDialog = None
|
||||||
if self.giftAvatar:
|
|
||||||
if hasattr(self.giftAvatar, 'doId'):
|
|
||||||
self.giftAvatar.delete()
|
|
||||||
else:
|
|
||||||
self.giftAvatar = None
|
|
||||||
return
|
|
||||||
|
|
||||||
def unloadClarabelle(self):
|
def unloadClarabelle(self):
|
||||||
base.win.removeDisplayRegion(self.cDr)
|
base.win.removeDisplayRegion(self.cDr)
|
||||||
|
@ -888,8 +869,6 @@ class CatalogScreen(DirectFrame):
|
||||||
del self.clarabelleChatBalloon
|
del self.clarabelleChatBalloon
|
||||||
|
|
||||||
def hangUp(self):
|
def hangUp(self):
|
||||||
if hasattr(self, 'giftAvatar') and self.giftAvatar:
|
|
||||||
self.giftAvatar.disable()
|
|
||||||
self.setClarabelleChat(random.choice(TTLocalizer.CatalogGoodbyeList), type='goodbye')
|
self.setClarabelleChat(random.choice(TTLocalizer.CatalogGoodbyeList), type='goodbye')
|
||||||
self.setPageIndex(-1)
|
self.setPageIndex(-1)
|
||||||
self.showPageItems()
|
self.showPageItems()
|
||||||
|
@ -918,9 +897,8 @@ class CatalogScreen(DirectFrame):
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def update(self, task = None):
|
def update(self, task = None):
|
||||||
if not hasattr(self.giftAvatar, 'doId'):
|
if (not self.friend) and self.gifting == 1:
|
||||||
if self.gifting == 1:
|
self.__giftToggle()
|
||||||
self.__giftToggle()
|
|
||||||
if hasattr(self, 'beanBank'):
|
if hasattr(self, 'beanBank'):
|
||||||
self.beanBank['text'] = str(base.localAvatar.getTotalMoney())
|
self.beanBank['text'] = str(base.localAvatar.getTotalMoney())
|
||||||
for item in self.panelList + self.backPanelList + self.specialPanelList + self.emblemPanelList:
|
for item in self.panelList + self.backPanelList + self.specialPanelList + self.emblemPanelList:
|
||||||
|
@ -932,7 +910,7 @@ class CatalogScreen(DirectFrame):
|
||||||
taskMgr.remove('clarabelleAskAnythingElse')
|
taskMgr.remove('clarabelleAskAnythingElse')
|
||||||
|
|
||||||
def __handleGiftPurchaseRequest(self, item):
|
def __handleGiftPurchaseRequest(self, item):
|
||||||
item.requestGiftPurchase(self['phone'], self.frienddoId, self.__handleGiftPurchaseResponse)
|
item.requestGiftPurchase(self['phone'], self.friendAvId, self.__handleGiftPurchaseResponse)
|
||||||
taskMgr.remove('clarabelleAskAnythingElse')
|
taskMgr.remove('clarabelleAskAnythingElse')
|
||||||
|
|
||||||
def __handlePurchaseResponse(self, retCode, item):
|
def __handlePurchaseResponse(self, retCode, item):
|
||||||
|
@ -951,7 +929,7 @@ class CatalogScreen(DirectFrame):
|
||||||
return
|
return
|
||||||
if self.isEmpty() or self.isHidden():
|
if self.isEmpty() or self.isHidden():
|
||||||
return
|
return
|
||||||
self.setClarabelleChat(item.getRequestGiftPurchaseErrorText(retCode) % self.receiverName)
|
self.setClarabelleChat(item.getRequestGiftPurchaseErrorText(retCode) % self.friendName)
|
||||||
self.__loadFriend()
|
self.__loadFriend()
|
||||||
|
|
||||||
def askAnythingElse(task):
|
def askAnythingElse(task):
|
||||||
|
@ -1007,81 +985,60 @@ class CatalogScreen(DirectFrame):
|
||||||
self.silverLabel.hide()
|
self.silverLabel.hide()
|
||||||
self.goldLabel.hide()
|
self.goldLabel.hide()
|
||||||
|
|
||||||
def checkFamily(self, doId):
|
def __makeFriendList(self):
|
||||||
test = 0
|
for av in base.cr.avList:
|
||||||
for familyMember in base.cr.avList:
|
if av.id != base.localAvatar.doId:
|
||||||
if familyMember.id == doId:
|
self.friendList.append((av.id, av.name, NametagGroup.CCNonPlayer))
|
||||||
test = 1
|
|
||||||
|
|
||||||
return test
|
|
||||||
|
|
||||||
def __makeFFlist(self):
|
|
||||||
for id, handle in base.cr.friendsMap.items():
|
for id, handle in base.cr.friendsMap.items():
|
||||||
if isinstance(handle, FriendHandle.FriendHandle):
|
if isinstance(handle, FriendHandle.FriendHandle):
|
||||||
self.ffList.append((id, handle.getName(), None))#NametagGlobals.getFriendColor(handle)))
|
self.friendList.append((id, handle.getName(), NametagConstants.getFriendColor(handle)))
|
||||||
|
|
||||||
def __makeScrollList(self):
|
def __makeScrollList(self):
|
||||||
for ff in self.ffList:
|
for friend in self.friendList:
|
||||||
ffbutton = self.makeFamilyButton(ff[0], ff[1], ff[2])
|
button = self.makeFriendButton(*friend)
|
||||||
if ffbutton:
|
self.scrollList.addItem(button, refresh=0)
|
||||||
self.scrollList.addItem(ffbutton, refresh=0)
|
self.friends.append(button)
|
||||||
self.friends[ff] = ffbutton
|
|
||||||
|
|
||||||
self.scrollList.refresh()
|
self.scrollList.refresh()
|
||||||
|
|
||||||
def makeFamilyButton(self, familyId, familyName, colorCode):
|
def makeFriendButton(self, avId, name, colorCode):
|
||||||
# fg = NametagGlobals.getNameFg(colorCode, PGButton.SInactive)
|
color = NametagConstants.NAMETAG_COLORS[colorCode]
|
||||||
return DirectButton(
|
|
||||||
relief=None,
|
|
||||||
text=familyName,
|
|
||||||
text_scale=0.04,
|
|
||||||
text_align=TextNode.ALeft,
|
|
||||||
# text_fg=fg,
|
|
||||||
text1_bg=self.textDownColor,
|
|
||||||
text2_bg=self.textRolloverColor,
|
|
||||||
text3_fg=self.textDisabledColor,
|
|
||||||
textMayChange=0,
|
|
||||||
command=self.__chooseFriend,
|
|
||||||
extraArgs=[familyId, familyName]
|
|
||||||
)
|
|
||||||
|
|
||||||
def __chooseFriend(self, friendId, friendName):
|
return DirectButton(relief=None, text=name, text_scale=0.04, text_align=TextNode.ALeft, text_fg=color[0][0], text1_bg=(1, 1, 0, 1),
|
||||||
|
text2_bg=(0.5, 0.9, 1, 1), text3_fg=(0.4, 0.8, 0.4, 1), command=self.__chooseFriend, extraArgs=[avId, name])
|
||||||
|
|
||||||
|
def __chooseFriend(self, avId, name):
|
||||||
messenger.send('wakeup')
|
messenger.send('wakeup')
|
||||||
self.frienddoId = friendId
|
|
||||||
self.receiverName = friendName
|
if self.friendAvId == avId:
|
||||||
self.friendLabel['text'] = TTLocalizer.CatalogGiftTo % self.receiverName
|
return
|
||||||
|
|
||||||
|
self.friendAvId = avId
|
||||||
|
self.friendName = name
|
||||||
self.__loadFriend()
|
self.__loadFriend()
|
||||||
|
|
||||||
def __loadFriend(self):
|
def __loadFriend(self):
|
||||||
if self.allowGetDetails == 0:
|
if not self.friendAvId:
|
||||||
CatalogScreen.notify.warning('smashing requests')
|
|
||||||
if self.frienddoId and self.allowGetDetails:
|
|
||||||
if self.giftAvatar:
|
|
||||||
if hasattr(self.giftAvatar, 'doId'):
|
|
||||||
self.giftAvatar.disable()
|
|
||||||
self.giftAvatar.delete()
|
|
||||||
self.giftAvatar = None
|
|
||||||
self.giftAvatar = DistributedToon.DistributedToon(base.cr)
|
|
||||||
self.giftAvatar.doId = self.frienddoId
|
|
||||||
self.giftAvatar.forceAllowDelayDelete()
|
|
||||||
self.giftAvatar.generate()
|
|
||||||
base.cr.getAvatarDetails(self.giftAvatar, self.__handleAvatarDetails, 'DistributedToon')
|
|
||||||
self.gotAvatar = 0
|
|
||||||
self.allowGetDetails = 0
|
|
||||||
self.scrollList['state'] = DGG.DISABLED
|
|
||||||
return
|
|
||||||
|
|
||||||
def __handleAvatarDetails(self, gotData, avatar, dclass):
|
|
||||||
if self.giftAvatar.doId != avatar.doId or gotData == 0:
|
|
||||||
CatalogScreen.notify.error('Get Gift Avatar Failed')
|
|
||||||
self.gotAvatar = 0
|
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
self.gotAvatar = 1
|
for friendButton in self.friends:
|
||||||
self.giftAvatar = avatar
|
friendButton['state'] = DGG.DISABLED
|
||||||
self.scrollList['state'] = DGG.NORMAL
|
|
||||||
self.allowGetDetails = 1
|
self.friend = None
|
||||||
|
self.friendLabel['text'] = TTLocalizer.CatalogGiftUpdating
|
||||||
|
taskMgr.remove('friendButtonsReady')
|
||||||
|
self['phone'].requestGiftAvatar(self.friendAvId)
|
||||||
|
|
||||||
|
def setFriendReady(self, friend):
|
||||||
|
self.friend = friend
|
||||||
|
self.friendLabel['text'] = TTLocalizer.CatalogGiftTo % self.friendName
|
||||||
|
taskMgr.doMethodLater(1.5, self.setFriendButtonsReady, 'friendButtonsReady')
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
|
def setFriendButtonsReady(self, task=None):
|
||||||
|
for friendButton in self.friends:
|
||||||
|
friendButton['state'] = DGG.NORMAL
|
||||||
|
|
||||||
def __giftToggle(self):
|
def __giftToggle(self):
|
||||||
messenger.send('wakeup')
|
messenger.send('wakeup')
|
||||||
|
@ -1092,12 +1049,16 @@ class CatalogScreen(DirectFrame):
|
||||||
self.scrollList.show()
|
self.scrollList.show()
|
||||||
self.hideEmblems()
|
self.hideEmblems()
|
||||||
self.giftToggle['text'] = TTLocalizer.CatalogGiftToggleOn
|
self.giftToggle['text'] = TTLocalizer.CatalogGiftToggleOn
|
||||||
|
self.friendLabel['text'] = TTLocalizer.CatalogGiftChoose
|
||||||
self.__loadFriend()
|
self.__loadFriend()
|
||||||
else:
|
else:
|
||||||
|
self.friend = None
|
||||||
|
self.friendAvId = 0
|
||||||
|
self.friendName = None
|
||||||
self.gifting = -1
|
self.gifting = -1
|
||||||
self.giftLabel.hide()
|
self.giftLabel.hide()
|
||||||
self.friendLabel.hide()
|
self.friendLabel.hide()
|
||||||
self.scrollList.hide()
|
self.scrollList.hide()
|
||||||
self.showEmblems()
|
self.showEmblems()
|
||||||
self.giftToggle['text'] = TTLocalizer.CatalogGiftToggleOff
|
self.giftToggle['text'] = TTLocalizer.CatalogGiftToggleOff
|
||||||
self.update()
|
self.update()
|
|
@ -24,11 +24,10 @@ class CatalogSurfaceItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def recordPurchase(self, avatar, optional):
|
def recordPurchase(self, avatar, optional):
|
||||||
self.giftTag = None
|
|
||||||
house, retcode = self.getHouseInfo(avatar)
|
house, retcode = self.getHouseInfo(avatar)
|
||||||
if retcode >= 0:
|
if retcode >= 0:
|
||||||
house.addWallpaper(self)
|
house.addWallpaper(self)
|
||||||
return retcode
|
return retcode
|
||||||
|
|
||||||
def getDeliveryTime(self):
|
def getDeliveryTime(self):
|
||||||
return 1
|
return 60
|
||||||
|
|
|
@ -33,13 +33,13 @@ class CatalogTankItem(CatalogItem.CatalogItem):
|
||||||
if self.maxTank <= avatar.getMaxFishTank():
|
if self.maxTank <= avatar.getMaxFishTank():
|
||||||
return ToontownGlobals.P_ItemUnneeded
|
return ToontownGlobals.P_ItemUnneeded
|
||||||
avatar.b_setMaxFishTank(self.maxTank)
|
avatar.b_setMaxFishTank(self.maxTank)
|
||||||
return ToontownGlobals.P_ItemAvailable
|
return ToontownGlobals.P_ItemOnOrder
|
||||||
|
|
||||||
def isGift(self):
|
def isGift(self):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def getDeliveryTime(self):
|
def getDeliveryTime(self):
|
||||||
return 0
|
return 1
|
||||||
|
|
||||||
def getPicture(self, avatar):
|
def getPicture(self, avatar):
|
||||||
gui = loader.loadModel('phase_4/models/gui/fishingGui')
|
gui = loader.loadModel('phase_4/models/gui/fishingGui')
|
||||||
|
|
|
@ -25,6 +25,7 @@ class CatalogToonStatueItem(CatalogGardenItem.CatalogGardenItem):
|
||||||
model, ival = self.makeFrameModel(toonStatuary.toon, 1)
|
model, ival = self.makeFrameModel(toonStatuary.toon, 1)
|
||||||
self.pictureToonStatue = toonStatuary
|
self.pictureToonStatue = toonStatuary
|
||||||
self.hasPicture = True
|
self.hasPicture = True
|
||||||
|
toonStatuary.toon.setBin('gui-popup', 60)
|
||||||
return (model, ival)
|
return (model, ival)
|
||||||
|
|
||||||
def cleanupPicture(self):
|
def cleanupPicture(self):
|
||||||
|
|
|
@ -37,14 +37,13 @@ class CatalogWindowItem(CatalogAtticItem.CatalogAtticItem):
|
||||||
return TTLocalizer.WindowViewNames.get(self.windowType)
|
return TTLocalizer.WindowViewNames.get(self.windowType)
|
||||||
|
|
||||||
def recordPurchase(self, avatar, optional):
|
def recordPurchase(self, avatar, optional):
|
||||||
self.giftTag = None
|
|
||||||
house, retcode = self.getHouseInfo(avatar)
|
house, retcode = self.getHouseInfo(avatar)
|
||||||
if retcode >= 0:
|
if retcode >= 0:
|
||||||
house.addWindow(self)
|
house.addWindow(self)
|
||||||
return retcode
|
return retcode
|
||||||
|
|
||||||
def getDeliveryTime(self):
|
def getDeliveryTime(self):
|
||||||
return 1
|
return 4 * 60
|
||||||
|
|
||||||
def getPicture(self, avatar):
|
def getPicture(self, avatar):
|
||||||
frame = self.makeFrame()
|
frame = self.makeFrame()
|
||||||
|
|
98
toontown/catalog/GiftAvatar.py
Normal file
98
toontown/catalog/GiftAvatar.py
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
from toontown.toon import ToonDNA
|
||||||
|
import CatalogItem, CatalogItemList
|
||||||
|
import json, time
|
||||||
|
|
||||||
|
def createFromJson(jsonData):
|
||||||
|
return createFromFields(json.loads(jsonData))
|
||||||
|
|
||||||
|
def createFromFields(fields):
|
||||||
|
avatar = GiftAvatar()
|
||||||
|
|
||||||
|
for key, value in fields.iteritems():
|
||||||
|
getattr(avatar, key)(value)
|
||||||
|
|
||||||
|
return avatar
|
||||||
|
|
||||||
|
class GiftAvatar:
|
||||||
|
|
||||||
|
def getStyle(self):
|
||||||
|
return self.style
|
||||||
|
|
||||||
|
def getHat(self):
|
||||||
|
return self.hat
|
||||||
|
|
||||||
|
def getGlasses(self):
|
||||||
|
return self.glasses
|
||||||
|
|
||||||
|
def getBackpack(self):
|
||||||
|
return self.backpack
|
||||||
|
|
||||||
|
def getShoes(self):
|
||||||
|
return self.shoes
|
||||||
|
|
||||||
|
def getGiftScheduleBlob(self):
|
||||||
|
return self.onGiftOrder.getBlob(store=CatalogItem.Customization | CatalogItem.DeliveryDate)
|
||||||
|
|
||||||
|
def setDNAString(self, dnaString):
|
||||||
|
self.style = ToonDNA.ToonDNA()
|
||||||
|
self.style.makeFromNetString(dnaString.decode('base64'))
|
||||||
|
|
||||||
|
def setMailboxContents(self, contents):
|
||||||
|
self.mailboxContents = CatalogItemList.CatalogItemList(contents.decode('base64'), store=CatalogItem.Customization)
|
||||||
|
|
||||||
|
def setGiftSchedule(self, onOrder):
|
||||||
|
self.onGiftOrder = CatalogItemList.CatalogItemList(onOrder.decode('base64'), store=CatalogItem.Customization | CatalogItem.DeliveryDate)
|
||||||
|
|
||||||
|
def setDeliverySchedule(self, onOrder):
|
||||||
|
self.onOrder = CatalogItemList.CatalogItemList(onOrder.decode('base64'), store=CatalogItem.Customization | CatalogItem.DeliveryDate)
|
||||||
|
|
||||||
|
def setHat(self, hat):
|
||||||
|
self.hat = hat
|
||||||
|
|
||||||
|
def setGlasses(self, glasses):
|
||||||
|
self.glasses = glasses
|
||||||
|
|
||||||
|
def setBackpack(self, backpack):
|
||||||
|
self.backpack = backpack
|
||||||
|
|
||||||
|
def setShoes(self, shoes):
|
||||||
|
self.shoes = shoes
|
||||||
|
|
||||||
|
def setHatList(self, list):
|
||||||
|
self.hatList = list[0]
|
||||||
|
|
||||||
|
def setGlassesList(self, list):
|
||||||
|
self.glassesList = list[0]
|
||||||
|
|
||||||
|
def setBackpackList(self, list):
|
||||||
|
self.backpackList = list[0]
|
||||||
|
|
||||||
|
def setShoesList(self, list):
|
||||||
|
self.shoesList = list[0]
|
||||||
|
|
||||||
|
def setCustomMessages(self, customMessages):
|
||||||
|
self.customMessages = customMessages[0]
|
||||||
|
|
||||||
|
def setClothesTopsList(self, clothesList):
|
||||||
|
self.clothesTopsList = clothesList[0]
|
||||||
|
|
||||||
|
def setClothesBottomsList(self, clothesList):
|
||||||
|
self.clothesBottomsList = clothesList[0]
|
||||||
|
|
||||||
|
def setEmoteAccess(self, emoteAccess):
|
||||||
|
self.emoteAccess = emoteAccess[0]
|
||||||
|
|
||||||
|
def setPetTrickPhrases(self, tricks):
|
||||||
|
self.petTrickPhrases = tricks[0]
|
||||||
|
|
||||||
|
def setNametagStyles(self, nametagStyles):
|
||||||
|
self.nametagStyles = nametagStyles[0]
|
||||||
|
|
||||||
|
def addToGiftSchedule(self, avId, targetId, item, minutes=0):
|
||||||
|
if config.GetBool('want-instant-delivery', False):
|
||||||
|
minutes = 0
|
||||||
|
|
||||||
|
item.giftTag = avId
|
||||||
|
item.deliveryDate = int(time.time() / 60. + minutes + .5)
|
||||||
|
self.onGiftOrder.append(item)
|
||||||
|
simbase.air.send(simbase.air.dclassesByName['DistributedToonAI'].aiFormatUpdate('setGiftSchedule', targetId, targetId, simbase.air.ourChannel, [self.getGiftScheduleBlob()]))
|
|
@ -31,7 +31,6 @@ class MailboxScreen(DirectObject.DirectObject):
|
||||||
self.dialogBox = None
|
self.dialogBox = None
|
||||||
self.load()
|
self.load()
|
||||||
self.hide()
|
self.hide()
|
||||||
return
|
|
||||||
|
|
||||||
def show(self):
|
def show(self):
|
||||||
self.frame.show()
|
self.frame.show()
|
||||||
|
@ -79,7 +78,7 @@ class MailboxScreen(DirectObject.DirectObject):
|
||||||
self.quitButton = DirectButton(parent=self.frame, relief=None, image=(gui2.find('**/QuitBtn_UP'), gui2.find('**/QuitBtn_DN'), gui2.find('**/QuitBtn_RLVR')), pos=(0.5, 1.0, -0.42), scale=0.9, text=TTLocalizer.MailboxExitButton, text_font=ToontownGlobals.getSignFont(), text0_fg=(0.152, 0.75, 0.258, 1), text1_fg=(0.152, 0.75, 0.258, 1), text2_fg=(0.977, 0.816, 0.133, 1), text_scale=0.045, text_pos=(0, -0.01), command=self.__handleExit)
|
self.quitButton = DirectButton(parent=self.frame, relief=None, image=(gui2.find('**/QuitBtn_UP'), gui2.find('**/QuitBtn_DN'), gui2.find('**/QuitBtn_RLVR')), pos=(0.5, 1.0, -0.42), scale=0.9, text=TTLocalizer.MailboxExitButton, text_font=ToontownGlobals.getSignFont(), text0_fg=(0.152, 0.75, 0.258, 1), text1_fg=(0.152, 0.75, 0.258, 1), text2_fg=(0.977, 0.816, 0.133, 1), text_scale=0.045, text_pos=(0, -0.01), command=self.__handleExit)
|
||||||
self.gettingText = DirectLabel(parent=self.frame, relief=None, text='', text_wordwrap=10, pos=(0.0, 0.0, 0.32), scale=0.09)
|
self.gettingText = DirectLabel(parent=self.frame, relief=None, text='', text_wordwrap=10, pos=(0.0, 0.0, 0.32), scale=0.09)
|
||||||
self.gettingText.hide()
|
self.gettingText.hide()
|
||||||
self.giftTagPanel = DirectLabel(parent=self.frame, relief=None, text='Gift TAG!!', text_wordwrap=16, pos=(0.0, 0.0, 0.01), scale=0.06)
|
self.giftTagPanel = DirectLabel(parent=self.frame, relief=None, text=TTLocalizer.MailboxGiftTag % TTLocalizer.MailboxGiftTagAnonymous, text_wordwrap=16, pos=(0.0, 0.0, 0.01), scale=0.06)
|
||||||
self.giftTagPanel.hide()
|
self.giftTagPanel.hide()
|
||||||
self.itemText = DirectLabel(parent=self.frame, relief=None, text='', text_wordwrap=16, pos=(0.0, 0.0, -0.022), scale=0.07)
|
self.itemText = DirectLabel(parent=self.frame, relief=None, text='', text_wordwrap=16, pos=(0.0, 0.0, -0.022), scale=0.07)
|
||||||
self.itemText.hide()
|
self.itemText.hide()
|
||||||
|
@ -249,10 +248,7 @@ class MailboxScreen(DirectObject.DirectObject):
|
||||||
self.acceptingIndex = None
|
self.acceptingIndex = None
|
||||||
if retcode < 0:
|
if retcode < 0:
|
||||||
self.notify.info('Could not take item %s: retcode %s' % (item, retcode))
|
self.notify.info('Could not take item %s: retcode %s' % (item, retcode))
|
||||||
if retcode == ToontownGlobals.P_NoTrunk:
|
self.dialogBox = TTDialog.TTDialog(style=TTDialog.TwoChoiceCustom, text=item.getAcceptItemErrorText(retcode), text_wordwrap=15, command=self.__handleDiscard, buttonText=[TTLocalizer.MailboxDiscard, TTLocalizer.MailboxLeave])
|
||||||
self.dialogBox = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=TTLocalizer.CatalogAcceptNoTrunk, text_wordwrap=15, command=self.__acceptError)
|
|
||||||
else:
|
|
||||||
self.dialogBox = TTDialog.TTDialog(style=TTDialog.TwoChoiceCustom, text=item.getAcceptItemErrorText(retcode), text_wordwrap=15, command=self.__handleDiscard, buttonText=[TTLocalizer.MailboxDiscard, TTLocalizer.MailboxLeave])
|
|
||||||
self.dialogBox.show()
|
self.dialogBox.show()
|
||||||
elif hasattr(item, 'storedInAttic') and item.storedInAttic():
|
elif hasattr(item, 'storedInAttic') and item.storedInAttic():
|
||||||
self.numAtticAccepted += 1
|
self.numAtticAccepted += 1
|
||||||
|
@ -513,4 +509,11 @@ class MailboxScreen(DirectObject.DirectObject):
|
||||||
def getSenderName(self, avId):
|
def getSenderName(self, avId):
|
||||||
sender = base.cr.identifyFriend(avId)
|
sender = base.cr.identifyFriend(avId)
|
||||||
|
|
||||||
return sender.getName() if sender else TTLocalizer.MailboxGiftTagAnonymous
|
if sender:
|
||||||
|
return sender.getName()
|
||||||
|
|
||||||
|
for av in base.cr.avList:
|
||||||
|
if av.id == avId:
|
||||||
|
return av.name
|
||||||
|
|
||||||
|
return TTLocalizer.MailboxGiftTagAnonymous
|
||||||
|
|
|
@ -23,6 +23,7 @@ RESISTANCE_MONEY = 2
|
||||||
RESISTANCE_TICKETS = 3
|
RESISTANCE_TICKETS = 3
|
||||||
RESISTANCE_MERITS = 4
|
RESISTANCE_MERITS = 4
|
||||||
resistanceMenu = [RESISTANCE_TOONUP, RESISTANCE_RESTOCK, RESISTANCE_MONEY, RESISTANCE_TICKETS, RESISTANCE_MERITS]
|
resistanceMenu = [RESISTANCE_TOONUP, RESISTANCE_RESTOCK, RESISTANCE_MONEY, RESISTANCE_TICKETS, RESISTANCE_MERITS]
|
||||||
|
randomResistanceMenu = [RESISTANCE_TOONUP, RESISTANCE_RESTOCK, RESISTANCE_MONEY, RESISTANCE_TICKETS]
|
||||||
resistanceDict = {
|
resistanceDict = {
|
||||||
RESISTANCE_TOONUP: {
|
RESISTANCE_TOONUP: {
|
||||||
'menuName': TTLocalizer.ResistanceToonupMenu,
|
'menuName': TTLocalizer.ResistanceToonupMenu,
|
||||||
|
@ -138,7 +139,7 @@ def getItemValue(textId):
|
||||||
|
|
||||||
|
|
||||||
def getRandomId():
|
def getRandomId():
|
||||||
menuIndex = random.choice(resistanceMenu)
|
menuIndex = random.choice(randomResistanceMenu)
|
||||||
itemIndex = random.choice(getItems(menuIndex))
|
itemIndex = random.choice(getItems(menuIndex))
|
||||||
return encodeId(menuIndex, itemIndex)
|
return encodeId(menuIndex, itemIndex)
|
||||||
|
|
||||||
|
|
|
@ -43,13 +43,6 @@ only include the comma if there are multiple arguments.
|
||||||
class TTCodeRedemptionMgrAI(DistributedObjectAI):
|
class TTCodeRedemptionMgrAI(DistributedObjectAI):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory("TTCodeRedemptionMgrAI")
|
notify = DirectNotifyGlobal.directNotify.newCategory("TTCodeRedemptionMgrAI")
|
||||||
codes = {
|
codes = {
|
||||||
'weed': {
|
|
||||||
'items': [
|
|
||||||
CatalogClothingItem.CatalogClothingItem(1821, 0)
|
|
||||||
],
|
|
||||||
'month': 4,
|
|
||||||
'day': 20
|
|
||||||
},
|
|
||||||
'gardening': {
|
'gardening': {
|
||||||
'items': [
|
'items': [
|
||||||
CatalogGardenStarterItem.CatalogGardenStarterItem()
|
CatalogGardenStarterItem.CatalogGardenStarterItem()
|
||||||
|
@ -75,15 +68,6 @@ class TTCodeRedemptionMgrAI(DistributedObjectAI):
|
||||||
def announceGenerate(self):
|
def announceGenerate(self):
|
||||||
DistributedObjectAI.announceGenerate(self)
|
DistributedObjectAI.announceGenerate(self)
|
||||||
|
|
||||||
def getMailboxCount(self, items):
|
|
||||||
count = 0
|
|
||||||
|
|
||||||
for item in items:
|
|
||||||
if item.getDeliveryTime() > 0:
|
|
||||||
count += 1
|
|
||||||
|
|
||||||
return count
|
|
||||||
|
|
||||||
def redeemCode(self, code):
|
def redeemCode(self, code):
|
||||||
avId = self.air.getAvatarIdFromSender()
|
avId = self.air.getAvatarIdFromSender()
|
||||||
av = self.air.doId2do.get(avId)
|
av = self.air.doId2do.get(avId)
|
||||||
|
@ -119,9 +103,7 @@ class TTCodeRedemptionMgrAI(DistributedObjectAI):
|
||||||
self.air.writeServerEvent('suspicious', avId, 'Toon tried to redeem non-existent code %s' % code)
|
self.air.writeServerEvent('suspicious', avId, 'Toon tried to redeem non-existent code %s' % code)
|
||||||
|
|
||||||
def requestCodeRedeem(self, avId, av, items):
|
def requestCodeRedeem(self, avId, av, items):
|
||||||
count = self.getMailboxCount(items)
|
if len(av.mailboxContents) + len(av.onOrder) + len(av.onGiftOrder) + len(items) >= ToontownGlobals.MaxMailboxContents:
|
||||||
|
|
||||||
if len(av.onOrder) + count > 5 or len(av.mailboxContents) + len(av.onOrder) + count >= ToontownGlobals.MaxMailboxContents:
|
|
||||||
self.sendUpdateToAvatarId(avId, 'redeemCodeResult', [3])
|
self.sendUpdateToAvatarId(avId, 'redeemCodeResult', [3])
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -129,8 +111,7 @@ class TTCodeRedemptionMgrAI(DistributedObjectAI):
|
||||||
if item in av.onOrder:
|
if item in av.onOrder:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
item.deliveryDate = int(time.time() / 60) + 0.01
|
av.addToDeliverySchedule(item)
|
||||||
av.onOrder.append(item)
|
|
||||||
|
|
||||||
av.b_setDeliverySchedule(av.onOrder)
|
av.b_setDeliverySchedule(av.onOrder)
|
||||||
self.sendUpdateToAvatarId(avId, 'redeemCodeResult', [0])
|
self.sendUpdateToAvatarId(avId, 'redeemCodeResult', [0])
|
||||||
|
|
|
@ -67,7 +67,7 @@ class CogdoBarrelRoomIntro(CogdoGameMovie):
|
||||||
self.frame.hide()
|
self.frame.hide()
|
||||||
backgroundGui.removeNode()
|
backgroundGui.removeNode()
|
||||||
self.toonDNA = ToonDNA.ToonDNA()
|
self.toonDNA = ToonDNA.ToonDNA()
|
||||||
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
|
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14)
|
||||||
self.toonHead = Toon.Toon()
|
self.toonHead = Toon.Toon()
|
||||||
self.toonHead.setDNA(self.toonDNA)
|
self.toonHead.setDNA(self.toonDNA)
|
||||||
self.makeSuit('sc')
|
self.makeSuit('sc')
|
||||||
|
|
|
@ -67,7 +67,7 @@ class CogdoElevatorMovie(CogdoGameMovie):
|
||||||
self.frame.hide()
|
self.frame.hide()
|
||||||
backgroundGui.removeNode()
|
backgroundGui.removeNode()
|
||||||
self.toonDNA = ToonDNA.ToonDNA()
|
self.toonDNA = ToonDNA.ToonDNA()
|
||||||
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
|
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14)
|
||||||
self.toonHead = Toon.Toon()
|
self.toonHead = Toon.Toon()
|
||||||
self.toonHead.setDNA(self.toonDNA)
|
self.toonHead.setDNA(self.toonDNA)
|
||||||
self.makeSuit('sc')
|
self.makeSuit('sc')
|
||||||
|
|
|
@ -71,7 +71,7 @@ class CogdoExecutiveSuiteIntro(CogdoGameMovie):
|
||||||
self.frame.hide()
|
self.frame.hide()
|
||||||
backgroundGui.removeNode()
|
backgroundGui.removeNode()
|
||||||
self.toonDNA = ToonDNA.ToonDNA()
|
self.toonDNA = ToonDNA.ToonDNA()
|
||||||
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
|
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14)
|
||||||
self.toonHead = Toon.Toon()
|
self.toonHead = Toon.Toon()
|
||||||
self.toonHead.setDNA(self.toonDNA)
|
self.toonHead.setDNA(self.toonDNA)
|
||||||
self.makeSuit('sc')
|
self.makeSuit('sc')
|
||||||
|
|
|
@ -53,7 +53,7 @@ class CogdoFlyingGameIntro(CogdoGameMovie):
|
||||||
def load(self):
|
def load(self):
|
||||||
CogdoGameMovie.load(self)
|
CogdoGameMovie.load(self)
|
||||||
self.toonDNA = ToonDNA.ToonDNA()
|
self.toonDNA = ToonDNA.ToonDNA()
|
||||||
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
|
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14)
|
||||||
self.toonHead = Toon.Toon()
|
self.toonHead = Toon.Toon()
|
||||||
self.toonHead.setDNA(self.toonDNA)
|
self.toonHead.setDNA(self.toonDNA)
|
||||||
self.makeSuit('sc')
|
self.makeSuit('sc')
|
||||||
|
|
|
@ -180,7 +180,7 @@ SfxFiles = {'toonHitByDrop': 'phase_5/audio/sfx/tt_s_ara_cmg_toonHit.ogg',
|
||||||
'throw': 'phase_3.5/audio/sfx/AA_pie_throw_only.ogg',
|
'throw': 'phase_3.5/audio/sfx/AA_pie_throw_only.ogg',
|
||||||
'splat': 'phase_5/audio/sfx/SA_watercooler_spray_only.ogg',
|
'splat': 'phase_5/audio/sfx/SA_watercooler_spray_only.ogg',
|
||||||
'cogSpin': 'phase_3.5/audio/sfx/Cog_Death.ogg',
|
'cogSpin': 'phase_3.5/audio/sfx/Cog_Death.ogg',
|
||||||
'cogDeath': 'phase_3.5/audio/sfx/ENC_cogfall_apart.ogg',
|
'cogDeath': 'phase_3.5/audio/sfx/ENC_cogfall_apart_1.ogg',
|
||||||
'bossCogAngry': 'phase_5/audio/sfx/tt_s_ara_cmg_bossCogAngry.ogg',
|
'bossCogAngry': 'phase_5/audio/sfx/tt_s_ara_cmg_bossCogAngry.ogg',
|
||||||
'cogStomp': 'phase_5/audio/sfx/tt_s_ara_cmg_cogStomp.ogg',
|
'cogStomp': 'phase_5/audio/sfx/tt_s_ara_cmg_cogStomp.ogg',
|
||||||
'quake': 'phase_5/audio/sfx/tt_s_ara_cmg_groundquake.ogg',
|
'quake': 'phase_5/audio/sfx/tt_s_ara_cmg_groundquake.ogg',
|
||||||
|
|
|
@ -56,7 +56,7 @@ class CogdoMazeGameIntro(CogdoGameMovie):
|
||||||
def load(self):
|
def load(self):
|
||||||
CogdoGameMovie.load(self)
|
CogdoGameMovie.load(self)
|
||||||
self.toonDNA = ToonDNA.ToonDNA()
|
self.toonDNA = ToonDNA.ToonDNA()
|
||||||
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
|
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14)
|
||||||
self.toonHead = Toon.Toon()
|
self.toonHead = Toon.Toon()
|
||||||
self.toonHead.setDNA(self.toonDNA)
|
self.toonHead.setDNA(self.toonDNA)
|
||||||
self.makeSuit('sc')
|
self.makeSuit('sc')
|
||||||
|
|
|
@ -374,7 +374,7 @@ class DistributedBanquetTable(DistributedObject.DistributedObject, FSM.FSM, Banq
|
||||||
deathSuit = diner.getLoseActor()
|
deathSuit = diner.getLoseActor()
|
||||||
ival = Sequence(Func(self.notify.debug, 'before actorinterval sit-lose'), ActorInterval(diner, 'sit-lose'), Func(self.notify.debug, 'before deathSuit.setHpr'), Func(deathSuit.setHpr, diner.getHpr()), Func(self.notify.debug, 'before diner.hide'), Func(diner.hide), Func(self.notify.debug, 'before deathSuit.reparentTo'), Func(deathSuit.reparentTo, self.chairLocators[chairIndex]), Func(self.notify.debug, 'befor ActorInterval lose'), ActorInterval(deathSuit, 'lose', duration=MovieUtil.SUIT_LOSE_DURATION), Func(self.notify.debug, 'before remove deathsuit'), Func(removeDeathSuit, diner, deathSuit, name='remove-death-suit-%d-%d' % (chairIndex, self.index)), Func(self.notify.debug, 'diner.stash'), Func(diner.stash))
|
ival = Sequence(Func(self.notify.debug, 'before actorinterval sit-lose'), ActorInterval(diner, 'sit-lose'), Func(self.notify.debug, 'before deathSuit.setHpr'), Func(deathSuit.setHpr, diner.getHpr()), Func(self.notify.debug, 'before diner.hide'), Func(diner.hide), Func(self.notify.debug, 'before deathSuit.reparentTo'), Func(deathSuit.reparentTo, self.chairLocators[chairIndex]), Func(self.notify.debug, 'befor ActorInterval lose'), ActorInterval(deathSuit, 'lose', duration=MovieUtil.SUIT_LOSE_DURATION), Func(self.notify.debug, 'before remove deathsuit'), Func(removeDeathSuit, diner, deathSuit, name='remove-death-suit-%d-%d' % (chairIndex, self.index)), Func(self.notify.debug, 'diner.stash'), Func(diner.stash))
|
||||||
spinningSound = base.loadSfx('phase_3.5/audio/sfx/Cog_Death.ogg')
|
spinningSound = base.loadSfx('phase_3.5/audio/sfx/Cog_Death.ogg')
|
||||||
deathSound = base.loadSfx('phase_3.5/audio/sfx/ENC_cogfall_apart.ogg')
|
deathSound = base.loadSfx('phase_3.5/audio/sfx/ENC_cogfall_apart_%s.ogg' % random.randint(1, 6))
|
||||||
deathSoundTrack = Sequence(Wait(0.8), SoundInterval(spinningSound, duration=1.2, startTime=1.5, volume=0.2, node=deathSuit), SoundInterval(spinningSound, duration=3.0, startTime=0.6, volume=0.8, node=deathSuit), SoundInterval(deathSound, volume=0.32, node=deathSuit))
|
deathSoundTrack = Sequence(Wait(0.8), SoundInterval(spinningSound, duration=1.2, startTime=1.5, volume=0.2, node=deathSuit), SoundInterval(spinningSound, duration=3.0, startTime=0.6, volume=0.8, node=deathSuit), SoundInterval(deathSound, volume=0.32, node=deathSuit))
|
||||||
intervalName = 'dinerDie-%d-%d' % (self.index, chairIndex)
|
intervalName = 'dinerDie-%d-%d' % (self.index, chairIndex)
|
||||||
deathIval = Parallel(ival, deathSoundTrack)
|
deathIval = Parallel(ival, deathSoundTrack)
|
||||||
|
|
|
@ -22,6 +22,7 @@ class DistributedBattleFactoryAI(DistributedLevelBattleAI.DistributedLevelBattle
|
||||||
return self.level.factoryId
|
return self.level.factoryId
|
||||||
|
|
||||||
def handleToonsWon(self, toons):
|
def handleToonsWon(self, toons):
|
||||||
|
self.handleCrateReward(toons)
|
||||||
for toon in toons:
|
for toon in toons:
|
||||||
recovered, notRecovered = self.air.questManager.recoverItems(toon, self.suitsKilled, self.getTaskZoneId())
|
recovered, notRecovered = self.air.questManager.recoverItems(toon, self.suitsKilled, self.getTaskZoneId())
|
||||||
self.toonItems[toon.doId][0].extend(recovered)
|
self.toonItems[toon.doId][0].extend(recovered)
|
||||||
|
|
|
@ -355,8 +355,6 @@ class DistributedCogKart(DistributedElevatorExt.DistributedElevatorExt):
|
||||||
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
||||||
if reason == ElevatorConstants.REJECT_SHUFFLE:
|
if reason == ElevatorConstants.REJECT_SHUFFLE:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
||||||
elif reason == ElevatorConstants.REJECT_MINLAFF:
|
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.KartMinLaff % self.minLaff)
|
|
||||||
elif reason == ElevatorConstants.REJECT_PROMOTION:
|
elif reason == ElevatorConstants.REJECT_PROMOTION:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
||||||
doneStatus = {'where': 'reject'}
|
doneStatus = {'where': 'reject'}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue