Skip to content

Commit

Permalink
more Requested Changes
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Johnson <[email protected]>
  • Loading branch information
Hazado and Hoikas committed Aug 11, 2023
1 parent 59bd9af commit f388c53
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Scripts/Python/nb01RPSGame.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def OnSDLNotify(self, VARname, SDLname, playerID, tag):
raise RuntimeError("Got an SDL notify for {}, but no CB".format(VARname))

def OnControlKeyEvent(self, controlKey, activeFlag):
"""Captures movement keys and prompt a yes/no dialog during a game or standup animation otherwise"""
#Captures movement keys and prompt a yes/no dialog during a game or standup animation otherwise
if controlKey in [PlasmaControlKeys.kKeyMoveBackward, PlasmaControlKeys.kKeyRotateLeft, PlasmaControlKeys.kKeyRotateRight, PlasmaControlKeys.kKeyExitMode] and activeFlag:
if self._round_played:
PtLocalizedYesNoDialog(self.key, "Heek.Messages.Quit")
Expand Down Expand Up @@ -456,10 +456,10 @@ def _OnSitDown(self, state, seat, events):
# Manage game state if standing up
if state:
if PtWasLocallyNotified(self.key):
"""Disable Yeesha Book to prevent linking out
Enable control keys to capture button presses or mouse movements
Disable all movement keys so sit modifier wont trigger before we want it to
Enable the mouse movement so we can move the camera and use the sides of the screen to trigger a movement"""
#Disable Yeesha Book to prevent linking out
#Enable control keys to capture button presses or mouse movements
#Disable all movement keys so sit modifier wont trigger before we want it to
#Enable the mouse movement so we can move the camera and use the sides of the screen to trigger a movement
PtSendKIMessage(kDisableEntireYeeshaBook, 0)
PtEnableControlKeyEvents(self.key)
PtDisableMovementKeys()
Expand Down Expand Up @@ -733,10 +733,10 @@ def _SendLocalStatusMsg(self, msg):
PtSendKIMessage(kKILocalChatStatusMsg, msg)

def _QuitGame(self, YesNo):
"""Performs the standup animation when sitting down
Disable control key events
Enables the disabled movement keys
PtAvatarExitAFK() is actually just performing a GoToStage 2 which for the sit brain is the standup animation - https://github.com/H-uru/Plasma/blob/9956967363f383d91f43162d116ad3477148adb2/Sources/Plasma/FeatureLib/pfPython/cyAvatar.cpp#L1970"""
#Performs the standup animation when sitting down
#Disable control key events
#Enables the disabled movement keys
#PtAvatarExitAFK() is just doing IExitTopmostGenericMode()
if YesNo:
PtDisableControlKeyEvents(self.key)
PtEnableMovementKeys()
Expand Down

0 comments on commit f388c53

Please sign in to comment.