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

Commit

Permalink
run 2to3 fixer 'print'
Browse files Browse the repository at this point in the history
  • Loading branch information
aqua-uru committed Mar 15, 2020
1 parent f8eedbe commit de64083
Show file tree
Hide file tree
Showing 165 changed files with 2,156 additions and 2,156 deletions.
28 changes: 14 additions & 14 deletions Python/Ahnonay.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,60 +100,60 @@ def OnServerInitComplete(self):
chron = ageDataChild.upcastToChronicleNode()
if chron and chron.getName() == "AhnonayLink":
linkid = chron
print "Ahnonay.OnServerInitComplete(): Link Chron already exists: %s" % (linkid.getValue())
print("Ahnonay.OnServerInitComplete(): Link Chron already exists: %s" % (linkid.getValue()))
elif chron and chron.getName() == "AhnonayLocked":
locked = chron
print "Ahnonay.OnServerInitComplete(): Locked Chron already exists: %s" % (locked.getValue())
print("Ahnonay.OnServerInitComplete(): Locked Chron already exists: %s" % (locked.getValue()))
elif chron and chron.getName() == "AhnonayVolatile":
volatile = chron
print "Ahnonay.OnServerInitComplete(): Volatile Chron already exists: %s" % (volatile.getValue())
print("Ahnonay.OnServerInitComplete(): Volatile Chron already exists: %s" % (volatile.getValue()))
elif chron and chron.getName() == "AhnonaySpawnPoints":
spawn = chron
print "Ahnonay.OnServerInitComplete(): Spawn Chron already exists: %s" % (spawn.getValue())
print("Ahnonay.OnServerInitComplete(): Spawn Chron already exists: %s" % (spawn.getValue()))
elif chron and chron.getName() == "AhnonayOwner":
owner = chron
break

if owner == None:
print "I am not the age owner, and I don't have my own Ahnonay"
print("I am not the age owner, and I don't have my own Ahnonay")
elif owner.getValue() == myID:
if linkid == None:
print "Ahnonay.OnServerInitComplete(): Link Chron not found, creating"
print("Ahnonay.OnServerInitComplete(): Link Chron not found, creating")
newNode = ptVaultChronicleNode(0)
newNode.chronicleSetName("AhnonayLink")
newNode.chronicleSetValue(guid)
ageDataFolder.addNode(newNode)

if locked == None:
print "Ahnonay.OnServerInitComplete(): Locked Chron not found, creating"
print("Ahnonay.OnServerInitComplete(): Locked Chron not found, creating")
newNode = ptVaultChronicleNode(0)
newNode.chronicleSetName("AhnonayLocked")
newNode.chronicleSetValue("1")
ageDataFolder.addNode(newNode)

if volatile == None:
print "Ahnonay.OnServerInitComplete(): Volatile Chron not found, creating"
print("Ahnonay.OnServerInitComplete(): Volatile Chron not found, creating")
newNode = ptVaultChronicleNode(0)
newNode.chronicleSetName("AhnonayVolatile")
newNode.chronicleSetValue("0")
ageDataFolder.addNode(newNode)

if spawn == None:
print "Ahnonay.OnServerInitComplete(): Spawn Chron not found, creating"
print("Ahnonay.OnServerInitComplete(): Spawn Chron not found, creating")
newNode = ptVaultChronicleNode(0)
newNode.chronicleSetName("AhnonaySpawnPoints")
newNode.chronicleSetValue("Default,LinkInPointDefault")
ageDataFolder.addNode(newNode)

if volatile and linkid:
if volatile.getValue() == "1" and guid != linkid.getValue():
print "Ahnonay.OnServerInitComplete(): In a new instance of Ahnonay so setting new vars"
print("Ahnonay.OnServerInitComplete(): In a new instance of Ahnonay so setting new vars")
linkid.setValue(guid)
locked.setValue("1")
volatile.setValue("0")
spawn.setValue("Default,LinkInPointDefault")
else:
print "I am not the age owner, but I do have my own Ahnonay"
print("I am not the age owner, but I do have my own Ahnonay")


ageSDL = PtGetAgeSDL()
Expand All @@ -172,11 +172,11 @@ def OnServerInitComplete(self):

if spTitle == "SCSavePoint":
if spName == "SaveClothPoint7" or spName == "SaveClothPoint8":
print "linking to hub or hut"
print("linking to hub or hut")
newSphere = 4
else:
offset = str(ageSDL["ahnyCurrentOffset"][0])
print "Ahnonay.OnPageLoad(): Sphere0%s loaded with offset:%s" % (sphere, offset)
print("Ahnonay.OnPageLoad(): Sphere0%s loaded with offset:%s" % (sphere, offset))
newSphere = (int(sphere) - int(offset)) % 4
if newSphere == 0:
newSphere = 4
Expand Down Expand Up @@ -221,7 +221,7 @@ def OnPageLoad(self,what,who):

if spTitle == "SCSavePoint":
if spName == "SaveClothPoint7" or spName == "SaveClothPoint8":
print "linking to hub or hut"
print("linking to hub or hut")
newSphere = 4
else:
newSphere = (int(sphere) - int(offset)) % 4
Expand Down
2 changes: 1 addition & 1 deletion Python/AhnonayCathedral.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def OnServerInitComplete(self):
owner = chron
break
if owner == None and vault.amOwnerOfCurrentAge():
print "I own this Cathedral, but I haven't set myself as Ahnonay owner yet."
print("I own this Cathedral, but I haven't set myself as Ahnonay owner yet.")
newNode = ptVaultChronicleNode(0)
newNode.chronicleSetName("AhnonayOwner")
newNode.chronicleSetValue(str(PtGetClientIDFromAvatarKey(PtGetLocalAvatar().getKey())))
Expand Down
12 changes: 6 additions & 6 deletions Python/AhnyVogondolaRide.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,28 @@ def OnNotify(self,state,id,events):
if (id == click.id and state):
avatar = PtFindAvatar(events)
climb.run(avatar)
print"clicked on chair"
print("clicked on chair")
return

if (id == hutChairClickable.id and state):
theAvatar = PtFindAvatar(events)
theAvatar.physics.warpObj(dummy.value.getKey())
PtAttachObject(theAvatar.getKey(),dummy.value.getKey())
theAvatar.avatar.enterSubWorld(subworld.value)
print"pinned avatar"
print("pinned avatar")
beginHutRide.run(self.key,avatar=theAvatar)

if (id == climb.id):
for event in events:
if event[0] == kMultiStageEvent and event[1] == 0 and event[2] == kEnterStage:
lower.run(self.key,avatar=PtGetLocalAvatar())
print"finished smart-seek"
print("finished smart-seek")
elif event[0] == kMultiStageEvent and event[1] == 0 and event[2] == kAdvanceNextStage:
theAvatar=PtGetLocalAvatar()
theAvatar.physics.warpObj(dummy.value.getKey())
PtAttachObject(theAvatar.getKey(),dummy.value.getKey())
theAvatar.avatar.enterSubWorld(subworld.value)
print"pinned avatar"
print("pinned avatar")
ride.run(self.key,avatar=theAvatar)

if (id == eject1.id and state):
Expand All @@ -117,14 +117,14 @@ def OnNotify(self,state,id,events):
PtDetachObject(theAvatar.getKey(),dummy.value.getKey())
theAvatar.avatar.exitSubWorld()
theAvatar.physics.warpObj(ejectPt1.value.getKey())
print"ejecting at the hub"
print("ejecting at the hub")

if (id == ejectResp2.id and state):
theAvatar=PtGetLocalAvatar()
PtDetachObject(theAvatar.getKey(),dummy.value.getKey())
theAvatar.avatar.exitSubWorld()
theAvatar.physics.warpObj(ejectPt2.value.getKey())
print"ejecting at the hut"
print("ejecting at the hut")



10 changes: 5 additions & 5 deletions Python/Cleft.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ def __init__(self):
pages += ["ZandiJC04aFace","ZandiJC04bFace","ZandiJC05aFace","ZandiJC05bFace","ZandiJC06aFace","ZandiJC06bFace"]
pages += ["ZandiJC07aFace","ZandiJC07bFace"]
else:
print "Zandi seems to have stepped away from the Airstream. Hmmm..."
print("Zandi seems to have stepped away from the Airstream. Hmmm...")
if loadBook:
pages += ["clftYeeshaBookVis","FemaleGetPersonalBook","MaleGetPersonalBook"]
else:
print "Zandi seems to have stepped away from the Airstream. Hmmm..."
print("Zandi seems to have stepped away from the Airstream. Hmmm...")

# Put in all the common pages
pages += ["BookRoom","clftAtrusNote"]
Expand Down Expand Up @@ -221,7 +221,7 @@ def OnServerInitComplete(self):
try:
avatar = PtGetLocalAvatar()
except:
print"failed to get local avatar"
print("failed to get local avatar")
return
avatar.avatar.registerForBehaviorNotify(self.key)
cam = ptCamera()
Expand Down Expand Up @@ -258,7 +258,7 @@ def OnNotify(self,state,id,events):
global fissureDrop

if (id == respFissureDropMain.id):
print "FISSUREDROP.OnNotify: respFissureDropMain.id callback"
print("FISSUREDROP.OnNotify: respFissureDropMain.id callback")
if fissureDrop:
cam = ptCamera()
cam.enableFirstPersonOverride()
Expand All @@ -274,7 +274,7 @@ def OnBehaviorNotify(self,type,id,state):

#PtDebugPrint("Cleft.OnBehaviorNotify(): %d" % (type))
if type == PtBehaviorTypes.kBehaviorTypeLinkIn and not state:
print "FISSUREDROP.OnBehaviorNotify: fissureDrop = %d" % (fissureDrop)
print("FISSUREDROP.OnBehaviorNotify: fissureDrop = %d" % (fissureDrop))
if fissureDrop:
PtDebugPrint("Cleft.OnBehaviorNotify(): will run respFissureDropMain now.")
respFissureDropMain.run(self.key,avatar=PtGetLocalAvatar())
44 changes: 22 additions & 22 deletions Python/ErcanaCitySilo.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def OnServerInitComplete(self):
try:
ageSDL = PtGetAgeSDL()
except:
print "ErcanaCitySilo.OnServerInitComplete():\tERROR---Cannot find the ErcanaCitySilo Age SDL"
print("ErcanaCitySilo.OnServerInitComplete():\tERROR---Cannot find the ErcanaCitySilo Age SDL")
ageSDL[SDLGotPellet.value] = (0,)

ageSDL.setNotify(self.key,SDLGotPellet.value,0.0)
Expand All @@ -141,17 +141,17 @@ def OnBehaviorNotify(self,type,id,state):
cam.undoFirstPerson()
elif type == PtBehaviorTypes.kBehaviorTypeLinkIn and not state:
if self._gotTurd:
print "ErcanaCitySilo.OnBehaviorNotify: Will now call IDoMeter."
print("ErcanaCitySilo.OnBehaviorNotify: Will now call IDoMeter.")
self.IDoMeter()
else:
print "Says we don't have a turd. Shouldn't be possible, I'm in OnBehaviorNotify."
print("Says we don't have a turd. Shouldn't be possible, I'm in OnBehaviorNotify.")
avatar = PtGetLocalAvatar()
avatar.avatar.unRegisterForBehaviorNotify(self.key)


def IDoMeter(self):
levelMeter = self.IEvalPellet()
print "ErcanaCitySilo.IDoMeter(): pellet is level: ",levelMeter
print("ErcanaCitySilo.IDoMeter(): pellet is level: ",levelMeter)
if levelMeter == 1.0:
RespScanMeter.run(self.key,state="Level1")
PtAtTimeCallback(self.key,6.3,2)
Expand Down Expand Up @@ -243,8 +243,8 @@ def IDoScores(self):
self._lakePoints = self._pellet
self._kiPoints = int(round(self._kiPoints * ((xRandom.randint(1,25) / 100.0) + 4.75)))
self._lakePoints = int(round(self._lakePoints))
print "ErcanaCitySilo.IDoScores(): this pellet drop is worth %d KI points!" % (self._kiPoints)
print "ErcanaCitySilo.IDoScores(): and %d lake points!" % (self._lakePoints)
print("ErcanaCitySilo.IDoScores(): this pellet drop is worth %d KI points!" % (self._kiPoints))
print("ErcanaCitySilo.IDoScores(): and %d lake points!" % (self._lakePoints))

# Try to find the needed scores...
# The magic will happen in OnGameScoreMsg()
Expand All @@ -255,7 +255,7 @@ def IDoScores(self):

def OnNotify(self,state,id,events):
if (id == RespScanMeter.id and self._gotTurd):
print "ErcanaCitySilo.OnNotify: Received callback from RespScanMeter, will now call IDropPellet."
print("ErcanaCitySilo.OnNotify: Received callback from RespScanMeter, will now call IDropPellet.")
self.IDropPellet()

elif (id == RespDropPellet.id and self._gotTurd):
Expand Down Expand Up @@ -304,45 +304,45 @@ def IEvalPellet(self):

def IPlayPellet(self,level):
if level > 0.0:
print "ErcanaCitySilo.IPlayPellet(): and the pellet anim is..."
print("ErcanaCitySilo.IPlayPellet(): and the pellet anim is...")
if level == 1.0:
print "steam & bubbles - HIGH"
print("steam & bubbles - HIGH")
RespPlaySteam.run(self.key,state="Hi")
RespPlayBubbles.run(self.key,state="Hi")
elif level == 2.0:
print "steam & bubbles - MEDIUM"
print("steam & bubbles - MEDIUM")
RespPlaySteam.run(self.key,state="Med")
RespPlayBubbles.run(self.key,state="Med")
elif level == 3.1:
print "steam & bubbles - LOW"
print("steam & bubbles - LOW")
RespPlaySteam.run(self.key,state="Low")
RespPlayBubbles.run(self.key,state="Low")
elif level == 3.2:
print "dud"
print("dud")
RespPlayDud.run(self.key)
elif level == 4.0:
print "orange glow - LOW"
print("orange glow - LOW")
RespPlayOrangeGlow.run(self.key,state="Low")
elif level == 5.0:
print "orange glow - MEDIUM"
print("orange glow - MEDIUM")
RespPlayOrangeGlow.run(self.key,state="Med")
elif level == 6.0:
print "orange glow - HIGH"
print("orange glow - HIGH")
RespPlayOrangeGlow.run(self.key,state="Hi")
elif level == 7.0:
print "white glow"
print("white glow")
RespPlayWhiteGlow.run(self.key)
elif level == 8.0:
print "explosion - LOW"
print("explosion - LOW")
RespPlayBoom.run(self.key,state="Low")
elif level == 9.0:
print "explosion - MEDIUM"
print("explosion - MEDIUM")
RespPlayBoom.run(self.key,state="Med")
elif level == 10.0:
print "explosion - HIGH"
print("explosion - HIGH")
RespPlayBoom.run(self.key,state="Hi")
else:
print "ErcanaCitySilo.IPlayPellet(): ERROR. Level must be greater than 0"
print("ErcanaCitySilo.IPlayPellet(): ERROR. Level must be greater than 0")


def OnBackdoorMsg(self,target,param):
Expand All @@ -351,10 +351,10 @@ def OnBackdoorMsg(self,target,param):
#print "param = ",param
if param > 0.0 and param <= 10.0:
if param == 3.0:
print "can't use 3.0, must be either 3.1 or 3.2"
print("can't use 3.0, must be either 3.1 or 3.2")
return
else:
self.IPlayPellet(param)
else:
print "must be between 0.0 and 10.0"
print("must be between 0.0 and 10.0")

Loading

1 comment on commit de64083

@Hoikas
Copy link
Member

@Hoikas Hoikas commented on de64083 Mar 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing from __future__ import print_function for this to work on Python 2.7

Please sign in to comment.