本文整理汇总了Python中UI.pick_list_crew方法的典型用法代码示例。如果您正苦于以下问题:Python UI.pick_list_crew方法的具体用法?Python UI.pick_list_crew怎么用?Python UI.pick_list_crew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI
的用法示例。
在下文中一共展示了UI.pick_list_crew方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: euthanize
# 需要导入模块: import UI [as 别名]
# 或者: from UI import pick_list_crew [as 别名]
def euthanize(s):
answer = UI.pick_list_crew(s.crew)
if answer == -1:
return
s.crew[answer].alive = False
s.crew.remove(s.crew[answer])
s.happiness_penalty += 500
示例2: assign_job
# 需要导入模块: import UI [as 别名]
# 或者: from UI import pick_list_crew [as 别名]
def assign_job(s):
mate = UI.pick_list_crew(s.crew)
if mate == -1:
return
colorful_jobs = map(UI.color_code, Jobs)
for quest in quest_list:
colorful_jobs.append(quest.description+" "+str(quest.quest_id))
job = UI.list_options(colorful_jobs, UI.inline_print(s.crew[mate]))
if job < len(Jobs):
s.crew[mate].job = Jobs[job]
else:
index = job - len(Jobs)
s.crew[mate].job = quest_list[index].description+" "+str(quest_list[index].quest_id)
示例3: sterilize
# 需要导入模块: import UI [as 别名]
# 或者: from UI import pick_list_crew [as 别名]
def sterilize(s):
answer = UI.pick_list_crew(s.crew)
if answer == -1:
return
s.crew[answer].sterile = True
s.happiness_penalty += 50
示例4: inspect_crew
# 需要导入模块: import UI [as 别名]
# 或者: from UI import pick_list_crew [as 别名]
def inspect_crew(s):
answer = UI.pick_list_crew(s.crew)
if answer == -1:
return
UI.full_info(s.crew[answer])