NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

composites.py (1385B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\behaviors\registry\composites.py
      2 from behaviors.registry.registrator import register_composite
      3 from fsd import attributes
      4 register_composite('behaviors.composites.Sequence', short_description='Execute each child task in a sequence.', detailed_description='Execute each child task in a sequence. If the first child task succeeds it proceeds to the next child task while they keep succeeding.  If all child task succeed the Sequence succeeds. If any child task fails the Sequence will fail and iteration stops.')
      5 register_composite('behaviors.composites.PrioritySelector', short_description='Execute child task until the one succeeds.', detailed_description='Execute child task from the first to last until one succeeds.  If a task succeeds we stop iterating and return success. If all child tasks fail the PrioritySelector fails. The order of the child tasks controls the priority of child tasks.')
      6 register_composite('behaviors.composites.weighted.WeightedSelector', dict(subTaskWeights=attributes.FloatListAttribute(index=0, field_kwargs={'ascending': None})), short_description='Return a weighted choice from the child tasks', detailed_description='Will return a single randomly chosen child task based on weight parameters. The WeightedSelector succeeds or fails based on the chosen child task.')