Exemple #1
0
 def __init__(self):
     map_file = 'objecttest.map'
     lower_tile_image = tileset_path('town2.png')
     lower_bnd_file = tileset_path('town2.bnd')
     upper_tile_image = tileset_path('world_upper.png')
     upper_bnd_file = tileset_path('world_upper.bnd')
     MapModel.__init__(self, map_file,
                       (lower_tile_image, lower_bnd_file),
                       [(upper_tile_image, upper_bnd_file), ])
Exemple #2
0
 def __init__(self):
     MapModel.__init__(self, 'bouldertest.map',
                       (tileset_path('city_lower.png'),
                        tileset_path('city_lower.bnd')),
                       [(tileset_path('world_upper.png'),
                         tileset_path('world_upper.bnd'))])
Exemple #3
0
 def get_icon_location(self):
     return (tileset_path('world_upper.png'), 2)
Exemple #4
0
 def get_icon_location(self):
     return (tileset_path('city_upper.png'), 63)
Exemple #5
0
from librpg.world import WorldMap
from librpg.mapobject import ScenarioMapObject, MapObject
from librpg.maparea import RectangleArea, MapArea
from librpg.util import Position
from librpg.movement import Face, Wait
from librpg.dialog import MessageDialog
from librpg.locals import RIGHT, DOWN, LEFT, UP
from librpg.path import tileset_path, charset_path
from librpg.collection.maparea import RelativeTeleportArea

SAVE_FILE = 'save'
LOWER_TILESET = (tileset_path('city_lower.png'),
                 tileset_path('city_lower.bnd'))
UPPER_TILESET = [(tileset_path('world_upper.png'),
                  tileset_path('world_upper.bnd'))]

class SavePoint(ScenarioMapObject):

    def __init__(self, map):
        ScenarioMapObject.__init__(self, map, 0, 1)

    def activate(self, party_avatar, direction):
        self.map.schedule_message(MessageDialog('You game will be saved to %s.'
                                  % SAVE_FILE, block_movement=True))
        self.map.save_world(SAVE_FILE)
        self.map.schedule_message(MessageDialog('Game saved.',
                                                block_movement=True))


class Chest(MapObject):
Exemple #6
0
 def __init__(self):
     MapModel.__init__(
         self, 'itempersisttest.map',
         (tileset_path('city_lower.png'), tileset_path('city_lower.bnd')),
         [(tileset_path('world_upper.png'), tileset_path('world_upper.bnd'))
          ])
Exemple #7
0
 def get_icon_location(self):
     return (tileset_path('world_upper.png'), 2)
Exemple #8
0
 def get_icon_location(self):
     return (tileset_path('city_upper.png'), 63)