Пример #1
0
 def oninit(self, adv):
     super().oninit(adv)
     from core.dragonform import DragonForm
     self.adv = adv
     if 'dragonform' in adv.conf:
         name = type(adv).__name__
         dconf = Conf(self.default_dragonform)
         dconf += adv.conf.dragonform
         dconf.gauge_iv = int(self.adv.duration / 12)
         self.adv.dragonform = DragonForm(name, dconf, adv, adv.ds_proc)
     else:
         name = type(self).__name__
         dconf = Conf({**self.default_dragonform, **self.dragonform})
         dconf.gauge_iv = int(self.adv.duration / 12)
         self.adv.dragonform = DragonForm(name, dconf, adv, self.ds_proc)
Пример #2
0
 def oninit(self, adv):
     from core.dragonform import DragonForm
     for dn, dconf in self.dragonform.items():
         if isinstance(dconf, dict):
             adv.hitattr_check(dn, dconf)
     if adv.conf['dragonform']:
         name = self.c.name
         self.dragonform.update(adv.conf['dragonform'])
     else:
         name = self.name
     self.dragonform.update(DragonBase.DEFAULT_DCONF, rebase=True)
     adv.dragonform = DragonForm(name, self.dragonform, adv)
Пример #3
0
    def oninit(self, adv):
        unique_dform = False
        if adv.conf["dragonform"]:
            name = self.c.name
            self.dform = Conf(adv.conf["dragonform"])
            unique_dform = True
        else:
            name = self.name
        self.dform.update(DragonBase.DEFAULT_DCONF, rebase=True)

        if self.c.conf["utp"]:
            from core.dragonform import DragonFormUTP

            adv.dragonform = DragonFormUTP(name, self.dform, adv, self)
        else:
            from core.dragonform import DragonForm

            adv.dragonform = DragonForm(name,
                                        self.dform,
                                        adv,
                                        self,
                                        unique_dform=unique_dform)
        self.adv = adv
        return unique_dform