本文整理匯總了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()