Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Johnson <[email protected]>
  • Loading branch information
Hazado and Hoikas authored Aug 13, 2023
1 parent f388c53 commit 14a281a
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 just doing IExitTopmostGenericMode()
# 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 14a281a

Please sign in to comment.