RedColonyConfiguration.py 875B

1234567891011121314151617181920212223242526
  1. from intelligine.synergy.ColonyConfiguration import ColonyConfiguration
  2. from intelligine.sandbox.colored.RedAnt import RedAnt
  3. from intelligine.synergy.object.ant.Egg import Egg
  4. from intelligine.cst import COLONY
  5. class RedColonyConfiguration(ColonyConfiguration):
  6. _start_position = (0, 20, 70)
  7. _ant_class = RedAnt
  8. def get_start_objects(self, collection, context):
  9. objects = super().get_start_objects(collection, context)
  10. for x in range(50):
  11. for y in range(1, 50):
  12. if x % 3 == 0 and y % 3 == 0:
  13. egg = Egg(context)
  14. egg.set_position((0, 1+x, 50+y))
  15. # TODO: Ce COLONY doit devenir un truc automatise au niveau de la collection (qd get_object)
  16. context.metas.value.set(COLONY, egg.get_id(), collection.get_id())
  17. objects.append(egg)
  18. return objects