def seeMovePathPanel(): inputS = [] sceneId = CacheContorl.playObject['object']['0']['Position'] mapId = MapHandle.getMapIdForScene(sceneId) mapData = CacheContorl.mapData['MapData'][mapId] movePathInfo = TextLoading.getTextData(TextLoading.messageId, '27') EraPrint.p(movePathInfo) EraPrint.p('\n') pathEdge = mapData['PathEdge'] mapSceneId = str(MapHandle.getMapSceneIdForSceneId(mapId, sceneId)) scenePath = pathEdge[mapSceneId] scenePathList = ValueHandle.dictKeysToList(scenePath) try: scenePathList.remove(mapSceneId) except ValueError: pass if len(scenePathList) > 0: sceneCmd = [] for scene in scenePathList: loadSceneData = MapHandle.getSceneDataForMap(mapId, scene) sceneName = loadSceneData['SceneName'] sceneCmd.append(sceneName) yrn = CmdButtonQueue.optionstr(cmdList=None, cmdListData=sceneCmd, cmdColumn=4, askfor=False, cmdSize='center') inputS = inputS + yrn else: errorMoveText = TextLoading.getTextData(TextLoading.messageId, '28') EraPrint.p(errorMoveText) EraPrint.pline() return {'inputS': inputS, 'scenePathList': scenePathList}
def seeMapPanel(): inputS = [] titleText = TextLoading.getTextData(TextLoading.stageWordId, '78') EraPrint.plt(titleText) sceneId = CacheContorl.playObject['object']['0']['Position'] mapId = MapHandle.getMapIdForScene(sceneId) inputS = inputS + MapHandle.printMap(mapId) return inputS
def playerMove(targetScene): playerPosition = CacheContorl.playObject['object']['0']['Position'] intPlayerPosition = int(playerPosition) intTargetScene = int(targetScene) if intPlayerPosition == intTargetScene: InScene.getInScene_func() else: mapId = MapHandle.getMapIdForScene(playerPosition) nowSceneId = MapHandle.getMapSceneIdForSceneId(mapId, playerPosition) pathData = MapHandle.getPathfinding(mapId, nowSceneId, targetScene) if pathData == 'End': InScene.getInScene_func() else: targetScenePosition = MapHandle.getSceneIdForMapSceneId( mapId, targetScene) timeList = pathData['Time'] MapHandle.playerMoveScene(playerPosition, targetScenePosition, '0') GameTime.setSubMinute(timeList[1]) playerMove(targetScene)