Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go me pub new nexus #2

Merged
merged 2 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Scripts/Python/islmRegisterNexusLink.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,20 @@ def OnNotify(self,state,id,events):
vault.addChronicleEntry("GotLinkToKveerPublic",1,"yes")
PtDebugPrint("islmRegisterNexusLink.OnNotify(): Chronicle entry 'GotLinkToKveerPublic' not present, adding entry and setting to 'yes'")
PtSendKIMessage(kKILocalChatStatusMsg,PtGetLocalizedString("KI.Messages.NexusLinkAdded"))
# Hacking away for GoMe Pub
if stationName.value == "GoMePubNew":
entryName = "GotLinkToGoMePublic"
entry = vault.findChronicleEntry(entryName)
if entry is not None:
entryValue = entry.chronicleGetValue()
if entryValue != "yes":
entry.chronicleSetValue("yes")
entry.save()
PtDebugPrint("islmRegisterNexusLink.OnNotify(): Chronicle entry 'GotLinkToGoMePublic' already added, setting to 'yes'")
else:
vault.addChronicleEntry("GotLinkToGoMePublic",1,"yes")
PtDebugPrint("islmRegisterNexusLink.OnNotify(): Chronicle entry 'GotLinkToGoMePublic' not present, adding entry and setting to 'yes'")
PtSendKIMessage(kKILocalChatStatusMsg,PtGetLocalizedString("KI.Messages.NexusLinkAdded"))
else:
# just business-as-usual here
self.avatar = 0
Expand Down
22 changes: 19 additions & 3 deletions Scripts/Python/nxusBookMachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@
}


kHiddenPersonalAges = ["Personal", "Nexus", "Neighborhood", "city", "AvatarCustomization", "Cleft", "BaronCityOffice", "BahroCave", "PelletBahroCave", "Kveer", "Myst", "LiveBahroCaves", "LiveBahroCave", "Tiam"]
kHiddenPersonalAges = ["Personal", "Nexus", "Neighborhood", "city", "AvatarCustomization", "Cleft", "BaronCityOffice", "BahroCave", "PelletBahroCave", "Kveer", "Myst", "LiveBahroCaves", "LiveBahroCave"]
kHiddenCityLinks = ["islmPalaceBalcony03", "KadishGallery", "islmPalaceBalcony02", "islmDakotahRoof", ]
kHiddenAgesIfInvited = ["BahroCave", "PelletBahroCave", "Pellet Cave", "LiveBahroCave", "LiveBahroCaves", "Myst", "Tiam"]
kHiddenAgesIfInvited = ["BahroCave", "PelletBahroCave", "Pellet Cave", "LiveBahroCave", "LiveBahroCaves", "Myst"]

#public ages SDL variables to be read from Vault on start (max. population, is link visible)
kAgeSdlVariables = {
Expand All @@ -214,6 +214,7 @@
'guildPub' : ('MaxGuildPubPop', None),
'Neighborhood02' : ('MaxKirelPop', 'nxusShowKirel'),
'Kveer' : ('MaxKveerPublicPop', None),
'GoMePubNew' : ('MaxKirelPop', None),
}

kGuildPubs = ["Cartographers", "Greeters", "Maintainers", "Messengers", "Writers"]
Expand All @@ -224,7 +225,8 @@
"GuildPub-Maintainers" : "e8306311-56d3-4954-a32d-3da01712e9b5",
"GuildPub-Messengers" : "9420324e-11f8-41f9-b30b-c896171a8712",
"GuildPub-Writers" : "5cf4f457-d546-47dc-80eb-a07cdfefa95d",
"Kveer" : "68e219e0-ee25-4df0-b855-0435584e29e2"}
"Kveer" : "68e219e0-ee25-4df0-b855-0435584e29e2",
"GoMePubNew" : "d002da26-db26-53f1-bdc0-a05a84274d5c"}

#id for ages descriptions
kPublicAgesDescription = {
Expand All @@ -236,6 +238,7 @@
'GuildPub-Maintainers' : ("Nexus.Messages.GuildPubFull", "Nexus.Messages.GuildPubPopulation"),
'GuildPub-Messengers' : ("Nexus.Messages.GuildPubFull", "Nexus.Messages.GuildPubPopulation"),
'GuildPub-Writers' : ("Nexus.Messages.GuildPubFull", "Nexus.Messages.GuildPubPopulation"),
'GoMePubNew' : ("Nexus.Messages.GoMePubNewFull", "Nexus.Messages.GoMePubNewPopulation"),
}

# hood sorting vars
Expand Down Expand Up @@ -344,6 +347,7 @@ def __init__(self):
'guildPub' : AgeData(ageFilename = '', defaultMaxPop = 0, linkVisible = 0),
'Neighborhood02' : AgeData(ageFilename = 'Neighborhood02', defaultMaxPop = 100, linkVisible = 0),
'Kveer' : AgeData(ageFilename = 'Kveer', defaultMaxPop = 100, linkVisible = 0),
'GoMePubNew' : AgeData(ageFilename = 'GoMePubNew', defaultMaxPop = 100, linkVisible = 0),
}

self.categoryLinksList = {
Expand Down Expand Up @@ -438,6 +442,15 @@ def OnServerInitComplete(self):
self.publicAges['Kveer'].linkVisible = True
else:
PtDebugPrint("nxusBookMachine.OnServerInitComplete(): chron says no link to public Kveer yet, so sorry")
# copy pasta for the Pub
entrygmpn = vault.findChronicleEntry("GotLinkToGoMePublic")
if entrygmpn is not None:
entryValue02 = entrygmpn.chronicleGetValue()
if entryValue02 == "yes":
PtDebugPrint("nxusBookMachine.OnServerInitComplete(): chron says you have the link to public GoMePub, hooray!")
self.publicAges['GoMePubNew'].linkVisible = True
else:
PtDebugPrint("nxusBookMachine.OnServerInitComplete(): chron says no link to public GoMePub yet, so go to Chiso!")


def __del__(self):
Expand Down Expand Up @@ -1297,6 +1310,9 @@ def IUpdateCityLinksList(self):
#special case: and another one for GuildPub name
elif hasattr(ageData, 'guild'):
displayName = "The %s' Pub" % (ageData.guild)
#another special case for the new GoMe Pub
elif ageData.ageFilename == 'GoMePubNew':
displayName = "New Messengers Pub"
else:
displayName = selectedInfo.getDisplayName()

Expand Down