home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce spawn points.
[plomrogue2]
/
plomrogue
/
game.py
diff --git
a/plomrogue/game.py
b/plomrogue/game.py
index d7be311f3d54dc02535fa1471c510d2e8db03263..64ae6898a9f9c11d56506d37f114d3e997585af0 100755
(executable)
--- a/
plomrogue/game.py
+++ b/
plomrogue/game.py
@@
-123,6
+123,7
@@
class Game(GameBase):
self.map_controls = {}
self.map_control_passwords = {}
self.annotations = {}
self.map_controls = {}
self.map_control_passwords = {}
self.annotations = {}
+ self.spawn_point = YX(0,0), YX(0,0)
self.portals = {}
self.player_chars = string.digits + string.ascii_letters
self.player_char_i = -1
self.portals = {}
self.player_chars = string.digits + string.ascii_letters
self.player_char_i = -1
@@
-334,6
+335,8
@@
class Game(GameBase):
t.position[1], t.type_, t.id_))
if hasattr(t, 'name'):
write(f, 'THING_NAME %s %s' % (t.id_, quote(t.name)))
t.position[1], t.type_, t.id_))
if hasattr(t, 'name'):
write(f, 'THING_NAME %s %s' % (t.id_, quote(t.name)))
+ write(f, 'SPAWN_POINT %s %s' % (self.spawn_point[0],
+ self.spawn_point[1]))
def get_map(self, big_yx, type_='normal'):
if type_ == 'normal':
def get_map(self, big_yx, type_='normal'):
if type_ == 'normal':
@@
-352,6
+355,7
@@
class Game(GameBase):
self.annotations = {}
self.portals = {}
self.admin_passwords = []
self.annotations = {}
self.portals = {}
self.admin_passwords = []
+ self.spawn_point = YX(0,0), YX(0,0)
self.map_geometry = map_geometry
self.map_control_passwords = {'X': 'secret'}
self.get_map(YX(0,0))
self.map_geometry = map_geometry
self.map_control_passwords = {'X': 'secret'}
self.get_map(YX(0,0))