From 471494a4f97114a765f80f3b4c228a997fb92ce9 Mon Sep 17 00:00:00 2001 From: Edmond Mondor Date: Thu, 10 Aug 2023 11:25:40 -0700 Subject: [PATCH] add pellet upload check Sets up the an SDL variable so you can set individual pellet uploads to everyone/member only/off --- Scripts/Python/xSimpleImager.py | 16 +++- Scripts/SDL/Neighborhood.sdl | 130 ++++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+), 1 deletion(-) diff --git a/Scripts/Python/xSimpleImager.py b/Scripts/Python/xSimpleImager.py index 2715c2e0a1..7635118ada 100644 --- a/Scripts/Python/xSimpleImager.py +++ b/Scripts/Python/xSimpleImager.py @@ -77,6 +77,7 @@ ImagerClueObject = ptAttribSceneobject(11, "Imager Object (for puzzle clue)") ImagerClueTime = ptAttribInt(12, "Number of seconds until clue image shows",default=870) ImagerRandomTime = ptAttribInt(13, "Random number added to make timer more variable",default=0) +ImagerPelletCheckVariable = ptAttribString(14,"Pellet upload SDL variable (optional)") #---------- # globals #---------- @@ -298,7 +299,7 @@ def OnNotify(self,state,id,events): for event in events: if event[0] == kCollisionEvent: kiLevel = PtDetermineKILevel() - if (kiLevel < kNormalKI): + if (kiLevel < kNormalKI or not self.PelletUploadCheck()): return if ImagerPelletUpload.value: messagetoki = str(ImagerName.value) + "

" @@ -522,6 +523,19 @@ def OnSDLNotify(self,VARname,SDLname,playerID,tag): else: ageVault.setDeviceInbox(ImagerName.value, ageSDL[ImagerInboxVariable.value][0], self, kSettingDeviceInbox) + def PelletUploadCheck(self): + """Age SDL Check to prevent unwanted pellet drops""" + ageSDL = PtGetAgeSDL() + pelletCheck = 0 + if ImagerPelletCheckVariable.value: + pelletCheck = ageSDL[ImagerPelletCheckVariable.value][0] + if pelletCheck >= 2: # Locked for everyone + return False + elif pelletCheck == 1 and ptVault().amOwnerOfCurrentAge(): #Hood members only + return True + elif pelletCheck <= 0: # Anyone + return True + def OnBackdoorMsg(self, target, param): if target == "imager" and param == "refresh" and ImagerName.value == "D'ni Imager Right": PtDebugPrint("Manual refresh requested", level=kWarningLevel) diff --git a/Scripts/SDL/Neighborhood.sdl b/Scripts/SDL/Neighborhood.sdl index 774798e0df..337425810e 100644 --- a/Scripts/SDL/Neighborhood.sdl +++ b/Scripts/SDL/Neighborhood.sdl @@ -1966,3 +1966,133 @@ STATEDESC Neighborhood VAR BOOL nb01BahroBoatsProximity[1] DEFAULT=0 DEFAULTOPTION=VAULT } + +STATEDESC Neighborhood +{ + VERSION 35 + +## DEFAULTOPTION=VAULT Content ## + + VAR AGETIMEOFDAY nb01TimeOfDay[1] + +# Boolean variables + VAR BOOL nb01AyhoheekAccountingFunc[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01BulletinBoardVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CityLightsBlueVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CityLightsConstruction01Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CityLightsConstruction02Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CityLightsConstruction03Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CityLightsConstruction04Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CityLightsGreatZeroVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CityLightsHarborVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CityLightsMoving01Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CityLightsMoving02Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CityLightsMoving03Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01ClockFunc[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01CommunityAreaConstructionVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01ConesVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01DniPaperVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01FansFunc[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01FireMarbles1Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01FireMarbles2Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01FountainWaterVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01GardenBugsVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01GardenLightsFunc[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01JourneyCloth1Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01JourneyCloth2Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01LinkBookEderVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01LinkBookEderToggle[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01LinkBookGarrisonVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01LinkBookTeledahnVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01LinkBookGZVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01LinkRoomDoorFunc[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01RatCreatureVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01TelescopeVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01WaterfallVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01DRCInfoBoardsVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01YeeshaPage07Vis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01PlayerImagerVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01DRCImagerVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01HappyNewYearVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01WebCamVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01HoodInfoImagerVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01ThanksgivingVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01LinkBookNexusVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01Poetry1JournalVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01KiNexusJournalVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01BahroStonePedestalVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01BahroPedestalShoutRun[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01ReaderBoardVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + + VAR STRING32 nb01DRCImagerInbox[1] DEFAULTOPTION=VAULT + +# Performance variables + VAR BOOL nb01BahroBoatsRun[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01CallSoundChance[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01DarkShapeSwimsRun[1] DEFAULT=0 DEFAULTOPTION=VAULT + +# State variables + VAR BYTE nb01Ayhoheek5Man1State[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01CommunityAreaState[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01CityLightsArchState[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01LakeLightState[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01PrivateRoomsState[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01PuzzleWallState[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01PelletUploadState[1] DEFAULT=0 + VAR BYTE nb01CmnRmSpeech[1] DEFAULT=0 + +## Age Mechanisms ## + + VAR BOOL nb01BlueLightOn[1] DEFAULT=0 + VAR BOOL nb01GreenLightOn[1] DEFAULT=0 + VAR BOOL nb01OrangeLightOn[1] DEFAULT=0 + VAR BOOL nb01LinkRoomDoor01Closed[1] DEFAULT=1 + VAR BOOL nb01LinkRoomDoor02Closed[1] DEFAULT=1 + VAR BOOL nb01ClassroomDoorClosed[1] DEFAULT=1 + VAR BOOL nb01PrivateRoomsOuterDoorClosed[1] DEFAULT=1 + VAR BOOL nb01PrivateRoomsOuterDoorEnabled[1] DEFAULT=0 + VAR BOOL nb01PrivateRoom01Closed[1] DEFAULT=0 + VAR BOOL nb01PrivateRoom02Closed[1] DEFAULT=0 + VAR BOOL nb01PrivateRoom03Closed[1] DEFAULT=0 + VAR BOOL nb01PrivateRoom04Closed[1] DEFAULT=0 + VAR BOOL nb01PrivateRoom05Closed[1] DEFAULT=0 + VAR BOOL nb01FireworksOnBalcony[1] DEFAULT=0 + VAR BOOL nb01FireworksOnBanner[1] DEFAULT=0 + VAR BOOL nb01FireworksOnFountain[1] DEFAULT=0 + VAR STRING32 nb01PelletImagerScores[50] DEFAULT="" + +# Neighborhood Customization options # + + VAR BOOL nb01BeachBallVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01ClockVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01GardenFungusVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01GardenLightsVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01DestructionCracksVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01LanternsVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01LampOption01Vis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01OldImager01Vis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01OldImager02Vis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01WaterfallTorchesVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + VAR BOOL nb01ResidenceAdditionsVis[1] DEFAULT=1 DEFAULTOPTION=VAULT + + VAR BYTE nb01StainedWindowOption[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01StainedGlassEders[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01StainedGlassGZ[1] DEFAULT=0 DEFAULTOPTION=VAULT + +#GZ Marker visibility + VAR BOOL nb01GZMarkerVis[1] DEFAULT=0 DEFAULTOPTION=VAULT + +# Randomized object appear/disappear + VAR BOOL nb01YeeshaPage07Enabled[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01YeeshaPage07Chance[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01YeeshaPage07Proximity[1] DEFAULT=0 DEFAULTOPTION=VAULT + + VAR BOOL nb01DarkShapeSwimsEnabled[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01DarkShapeSwimsChance[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01DarkShapeSwimsProximity[1] DEFAULT=0 DEFAULTOPTION=VAULT + + VAR BOOL nb01BahroBoatsEnabled[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BYTE nb01BahroBoatsChance[1] DEFAULT=0 DEFAULTOPTION=VAULT + VAR BOOL nb01BahroBoatsProximity[1] DEFAULT=0 DEFAULTOPTION=VAULT + +}