Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Everyone is an Explorer (again...) #113

Merged
merged 2 commits into from
Feb 13, 2020
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
21 changes: 6 additions & 15 deletions Python/xDialogStartUp.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@

#====================================
# Globals
gIsExplorer = 0
gPlayerList = None
gSelectedSlot = 0
gClickedWrongSlot = 0
Expand Down Expand Up @@ -188,7 +187,6 @@ def __init__(self):

###########################
def OnServerInitComplete(self):
global gIsExplorer
global gExp_HotSpot
global gExp_TxtBox
global gExp_HiLite
Expand Down Expand Up @@ -328,10 +326,7 @@ def OnGUINotify(self,id,control,event):

elif tagID == k6BackID: ## Back To Player Select ##
PtHideDialog("GUIDialog06")
if gIsExplorer:
PtShowDialog("GUIDialog04b")
else:
PtShowDialog("GUIDialog04a")
PtShowDialog("GUIDialog04b")

elif tagID == k6PlayID: ## Play ##
playerName = ptGUIControlEditBox(GUIDiag6.dialog.getControlFromTag(k6NameID)).getString() # <---
Expand All @@ -356,18 +351,12 @@ def OnGUINotify(self,id,control,event):
errorString = "Error, you must enter a Name."
ptGUIControlTextBox(GUIDiag4d.dialog.getControlFromTag(k4dTextID)).setString(errorString)
PtShowDialog("GUIDialog04d")
if gIsExplorer:
self.ToggleColor(GUIDiag4b, k4bPlayer03)
else:
self.ToggleColor(GUIDiag4a, k4aPlayer03)
self.ToggleColor(GUIDiag4b, k4bPlayer03)
elif playerGender == "":
errorString = "Error, you must select a gender."
ptGUIControlTextBox(GUIDiag4d.dialog.getControlFromTag(k4dTextID)).setString(errorString)
PtShowDialog("GUIDialog04d")
if gIsExplorer:
self.ToggleColor(GUIDiag4b, k4bPlayer03)
else:
self.ToggleColor(GUIDiag4a, k4aPlayer03)
self.ToggleColor(GUIDiag4b, k4bPlayer03)
else:
fixedPlayerName = playerName.strip()
(fixedPlayerName, whitespacefixedcount) = re.subn("\s{2,}|[\t\n\r\f\v]", " ", fixedPlayerName)
Expand Down Expand Up @@ -399,7 +388,6 @@ def OnGUINotify(self,id,control,event):

###########################
def OnAccountUpdate(self, opType, result, playerInt):
global gIsExplorer
global gExp_HotSpot
global gExp_TxtBox
global gVis_TxtBox
Expand Down Expand Up @@ -588,6 +576,9 @@ def PlayerListNotify(self,dlgObj,listHotSpot,toggle):
print "xDialogStartUp.PlayerListNotify: setting gSelectedSlot (%d) to not Interesting" % (gSelectedSlot)
ptGUIControlButton(dlgObj.dialog.getControlFromTag(gSelectedSlot)).setNotifyOnInteresting(0)

# Everyone is an explorer, so disable the button for visiting.
btn = ptGUIControlButton(dlgObj.dialog.getControlFromTag(listHotSpot[0])).disable()

###########################
def id_comp(elem1, elem2):
return cmp(elem1[1], elem2[1])