projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor fix to game load code.
[super-star-trek.git]
/
sst.py
diff --git
a/sst.py
b/sst.py
index 35d1433b7b5b036afac60481ff79ee22f6625519..691eff84dbb4e2f179528a3ecbce5becc9cc9795 100755
(executable)
--- a/
sst.py
+++ b/
sst.py
@@
-13,7
+13,7
@@
on how to modify (and how not to modify!) this code.
"""
import os, sys, math, curses, time, readline, cPickle, random, copy, gettext, getpass
"""
import os, sys, math, curses, time, readline, cPickle, random, copy, gettext, getpass
-version="2.
0
"
+version="2.
1
"
docpath = (".", "../doc", "/usr/share/doc/sst")
docpath = (".", "../doc", "/usr/share/doc/sst")
@@
-3530,7
+3530,7
@@
def imove(icourse=None, noattack=False):
if icourse.origin.quadrant() != icourse.location.quadrant():
newquadrant(noattack)
break
if icourse.origin.quadrant() != icourse.location.quadrant():
newquadrant(noattack)
break
- elif check_collision(
icourse,
w):
+ elif check_collision(w):
print "Collision detected"
break
else:
print "Collision detected"
break
else:
@@
-3901,7
+3901,7
@@
def warp(wcourse, involuntary):
twarp = False
wcourse.reset()
# Activate Warp Engines and pay the cost
twarp = False
wcourse.reset()
# Activate Warp Engines and pay the cost
- imove(course, noattack=False)
+ imove(
w
course, noattack=False)
if game.alldone:
return
game.energy -= wcourse.power(game.warpfac)
if game.alldone:
return
game.energy -= wcourse.power(game.warpfac)
@@
-5203,7
+5203,6
@@
def freeze(boss):
if key != "IHALPHA":
huh()
return
if key != "IHALPHA":
huh()
return
- scanner.chew()
if '.' not in scanner.token:
scanner.token += ".trk"
try:
if '.' not in scanner.token:
scanner.token += ".trk"
try:
@@
-5213,11
+5212,12
@@
def freeze(boss):
return
cPickle.dump(game, fp)
fp.close()
return
cPickle.dump(game, fp)
fp.close()
+ scanner.chew()
def thaw():
"Retrieve saved game."
global game
def thaw():
"Retrieve saved game."
global game
- game.passwd
[0] = '\0'
+ game.passwd
= None
key = scanner.next()
if key == "IHEOL":
proutn(_("File name: "))
key = scanner.next()
if key == "IHEOL":
proutn(_("File name: "))
@@
-5225,7
+5225,6
@@
def thaw():
if key != "IHALPHA":
huh()
return True
if key != "IHALPHA":
huh()
return True
- scanner.chew()
if '.' not in scanner.token:
scanner.token += ".trk"
try:
if '.' not in scanner.token:
scanner.token += ".trk"
try:
@@
-5235,6
+5234,7
@@
def thaw():
return
game = cPickle.load(fp)
fp.close()
return
game = cPickle.load(fp)
fp.close()
+ scanner.chew()
return False
# I used <http://www.memory-alpha.org> to find planets
return False
# I used <http://www.memory-alpha.org> to find planets
@@
-5549,7
+5549,7
@@
def choose():
return True
if scanner.sees("regular"):
break
return True
if scanner.sees("regular"):
break
- proutn(_("What is \"%s\"?") % scanner.token)
+ proutn(_("What is \"%s\"?
") % scanner.token)
scanner.chew()
while game.length==0 or game.skill==SKILL_NONE:
if scanner.next() == "IHALPHA":
scanner.chew()
while game.length==0 or game.skill==SKILL_NONE:
if scanner.next() == "IHALPHA":
@@
-6369,3
+6369,5
@@
if __name__ == '__main__':
if logfp:
logfp.close()
print ""
if logfp:
logfp.close()
print ""
+
+# End.