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), ])
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'))])
def get_icon_location(self): return (tileset_path('world_upper.png'), 2)
def get_icon_location(self): return (tileset_path('city_upper.png'), 63)
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):
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')) ])