本文整理汇总了Python中room.Room.mobsAllowed方法的典型用法代码示例。如果您正苦于以下问题:Python Room.mobsAllowed方法的具体用法?Python Room.mobsAllowed怎么用?Python Room.mobsAllowed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类room.Room
的用法示例。
在下文中一共展示了Room.mobsAllowed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Room
# 需要导入模块: from room import Room [as 别名]
# 或者: from room.Room import mobsAllowed [as 别名]
from room import Room
r = Room()
r.roomname = 'dormroom'
r.mobsAllowed = False
r.exits = {'door': 'hallway', 'window': 'window'}
r.hide_exits = ['window']
r.hide_looktargets = ['under bed']
r.roomdesc = """
Your home away from home, its small but familiar.
Your unmade bed lies askew, one corner pulled slightly
away from the wall. Your hated alarm clock and favorite
book sit on your night stand by by the foot of your bed.
across the room is your dresser containing your clothes
and various knickknacks. the only other objects in the
room are your trunk containing your school things which
sits next to the door, and your computer which is
resting on a flimsy desk, located by a very inviting window.
"""
r.looktargets = {
'alarm clock': 'its black and noisy \n\n',
'bed': 'your bed, cover by a black blanket with the white letters spelling NAPPING ADVOCATE #1\n\n',
'behind bed': 'so thats where my pocket knife went! \n\n',
'book': '1984 phew good thing this will never happen\n\n',
'computer': 'good times, good times!!\n\n',
'door': 'gate way to the outside world\n\n',
'dresser': 'cloths in all the drawers but the top\n\n',
'favorite book': '1984 phew good thing this will never happen\n\n',
'night stand': 'a sturdy little table \n\n',
'top drawer': 'Lock is stuck as usual if only I could find somthing to to jimmy the lock.\n\n',
'trunk': 'so many books!\n\n',