Skip to content
Merged
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
26 changes: 18 additions & 8 deletions Scripts/Python/xAgeSDLIntStartStopResp.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
boolStopFF = ptAttribBoolean(6,"Fast forward on stop",1)
intDefault = ptAttribInt(7,"Default setting",0)
boolFFOnInit = ptAttribBoolean(8, "F-Forward on Init", 0)

# This was added long after this file was used in game, so default to false for compatibility
boolVaultManagerFF = ptAttribBoolean(9, "F-Forward on VM notifications", 0)

class xAgeSDLIntStartStopResp(ptResponder):
def __init__(self):
Expand Down Expand Up @@ -108,12 +109,21 @@ def OnSDLNotify(self,VARname,SDLname,PlayerID,tag):
ageSDL = PtGetAgeSDL()
SDLvalue = ageSDL[stringSDLVarName.value][0]

PtDebugPrint("DEBUG: xAgeSDLIntStartStopResp.OnSDLNotify received: %s = %d" % (VARname, SDLvalue))

if SDLvalue in self.enabledStateList:
PtDebugPrint("DEBUG: xAgeSDLIntStartStopResp.OnSDLNotify: running start responder")
respStart.run(self.key,avatar=None,fastforward=boolStartFF.value)
PtDebugPrint(f"xAgeSDLIntStartStopResp.OnSDLNotify(): {VARname=} {SDLvalue=}", level=kDebugDumpLevel)

if PlayerID:
objAvatar = ptSceneobject(PtGetAvatarKeyFromClientID(PlayerID), self.key)
fastforward = False
else:
objAvatar = None
fastforward = boolVaultManagerFF.value

if SDLvalue in self.enabledStateList:
PtDebugPrint(f"xAgeSDLIntStartStopResp.OnSDLNotify(): Running start responder", level=kWarningLevel)
fastforward |= boolStartFF.value
respStart.run(self.key, avatar=objAvatar, fastforward=fastforward)
else:
PtDebugPrint("DEBUG: xAgeSDLIntStartStopResp.OnSDLNotify: running stop responder")
respStop.run(self.key,avatar=None,fastforward=boolStopFF.value)
PtDebugPrint(f"xAgeSDLIntStartStopResp.OnSDLNotify(): Running stop responder", level=kWarningLevel)
fastforward |= boolStopFF.value
respStop.run(self.key, avatar=objAvatar, fastforward=fastforward)

Loading