tinyecs 0.5.3__tar.gz → 0.5.3a0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tinyecs
3
- Version: 0.5.3
3
+ Version: 0.5.3a0
4
4
  Summary: The teeniest, tiniest ECS system
5
5
  Author-email: Michael Lamertz <michael.lamertz@gmail.com>
6
6
  License-Expression: MIT
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "tinyecs"
3
3
  description = "The teeniest, tiniest ECS system"
4
- version = "0.5.3"
4
+ version = "0.5.3a"
5
5
  readme = "README.rst"
6
6
 
7
7
  authors = [
@@ -353,7 +353,7 @@ def remove_system(fn: SystemFunction) -> None:
353
353
  pass
354
354
 
355
355
 
356
- def add_system_to_domain(domain: DomainID, system: SystemFunction, after=None) -> None:
356
+ def add_system_to_domain(domain: DomainID, *system: SystemFunction, after=None) -> None:
357
357
  """Create or extend a domain with the given system.
358
358
 
359
359
  :param system: The system function
@@ -365,15 +365,16 @@ def add_system_to_domain(domain: DomainID, system: SystemFunction, after=None) -
365
365
  .. important:: The system must first be registered with add_system.
366
366
  """
367
367
 
368
- if system not in sidx:
369
- raise UnknownSystemError(f'system {system} is not registered')
370
- if domain not in didx:
371
- didx[domain] = []
368
+ for s in system:
369
+ if s not in sidx:
370
+ raise UnknownSystemError(f'system {s} is not registered')
371
+ if domain not in didx:
372
+ didx[domain] = []
372
373
 
373
- try:
374
- didx[domain].insert(didx[domain].index(after) + 1, system)
375
- except ValueError:
376
- didx[domain].append(system)
374
+ try:
375
+ didx[domain].insert(didx[domain].index(after) + 1, s)
376
+ except ValueError:
377
+ didx[domain].append(s)
377
378
 
378
379
 
379
380
  def remove_system_from_domain(domain: DomainID, system: SystemFunction) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tinyecs
3
- Version: 0.5.3
3
+ Version: 0.5.3a0
4
4
  Summary: The teeniest, tiniest ECS system
5
5
  Author-email: Michael Lamertz <michael.lamertz@gmail.com>
6
6
  License-Expression: MIT
@@ -340,8 +340,7 @@ def test_stable_domain_order():
340
340
  ecs.add_system(dummy_system2b, 'dummy_comp')
341
341
  ecs.add_system(dummy_system3, 'dummy_comp')
342
342
 
343
- ecs.add_system_to_domain('ze_domain', dummy_system1a)
344
- ecs.add_system_to_domain('ze_domain', dummy_system2a)
343
+ ecs.add_system_to_domain('ze_domain', dummy_system1a, dummy_system2a)
345
344
  assert ecs.didx['ze_domain'] == [dummy_system1a, dummy_system2a]
346
345
 
347
346
  ecs.add_system_to_domain('ze_domain', dummy_system1b, after=dummy_system1a)
File without changes
File without changes
File without changes