// PORT: AVA2-style display options (ENABLE_GRAPHIC_ON_OFF effect level, HIDE_OBJECTS tree/cloud parts), // client-only. The effect level is systemSetting.SetEffectLevel (CInstanceBase::__UpdateEffectShown deactivates // attached effects); trees and clouds use the original background.SetVisiblePart; names and damage numbers // are shortcuts to the original game options. See docs/AVA2-DISPLAY.md. static const char c_szDisplayScript[] = R"PY(# -*- coding: utf-8 -*- import background import game import grp import systemSetting import ui import weakref from mt_biolog import Action, Text, L from mt_wiki import B g_window=None g_entry=None CONFIG='mt_display.cfg' LEVELS=(u'全部特效',u'只看怪物特效',u'只看玩家特效',u'只看自己特效',u'关闭全部特效') LEVEL_HINTS=('显示所有角色的特效','隐藏其他玩家和NPC的特效,保留自己和怪物的','隐藏怪物和NPC的特效,保留玩家的', '只保留自己的特效','连自己的特效也隐藏') class Options(object): def __init__(self):self.effect=0;self.tree=True;self.cloud=True;self.shopRange=0;self.npcNames=True def Load(self,text): words=text.split() if len(words) not in (3,5) or not all(w.isdigit() and len(w)==1 for w in words):return effect,tree,cloud=[int(w) for w in words[:3]] shop,names=[int(w) for w in words[3:]] if len(words)==5 else (0,1) if effect