本文整理汇总了Python中models.Room.open方法的典型用法代码示例。如果您正苦于以下问题:Python Room.open方法的具体用法?Python Room.open怎么用?Python Room.open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Room
的用法示例。
在下文中一共展示了Room.open方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: look
# 需要导入模块: from models import Room [as 别名]
# 或者: from models.Room import open [as 别名]
def look(self, room_id):
from bprintf import buff
logger.debug("lookin(%d)", room_id)
dead = False
w = self.loadw()
self.save(w)
if self.blind:
buff.bprintf("You are blind... you can't see a thing!\n")
if self.person.level > 9:
logger.debug("showname(%d)", room_id)
room = Room.open(room_id)
if self.is_dark(room):
buff.bprintf("It is dark\n")
w = self.loadw()
self.onlook()
return
if room.deathroom:
self.blind = False
if self.person.level > 9:
buff.bprintf("<DEATH ROOM>\n")
else:
dead = True
if room.nobr:
buff.brmode = 0
if not self.blind and buff.brmode == 0:
buff.bprintf(room.description)
if dead:
# self.loseme()
# crapup("bye bye.....\n")
pass
w = self.loadw()
if not self.blind:
pass
# lisobs()
if self.curmode == 1:
pass
# lispeople()
buff.bprintf("\n")
self.onlook()