mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-09-13 22:44:00 +02:00
Merge branch 'main' into refactor_rename
# Conflicts: # marl_factory_grid/environment/entity/entity.py # marl_factory_grid/modules/destinations/entitites.py # marl_factory_grid/modules/doors/entitites.py # marl_factory_grid/modules/items/groups.py
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from marl_factory_grid.environment.entity.entity import Entity
|
||||
from marl_factory_grid.utils.render import RenderEntity
|
||||
from ...utils.utility_classes import RenderEntity
|
||||
from marl_factory_grid.environment import constants as c
|
||||
from marl_factory_grid.utils.results import TickResult
|
||||
|
||||
|
@@ -13,8 +13,8 @@ class MachineRule(Rule):
|
||||
self.n_machines = n_machines
|
||||
|
||||
def on_init(self, state, lvl_map):
|
||||
empty_tiles = state[c.FLOORS].empty_tiles[:self.n_machines]
|
||||
state[m.MACHINES].add_items(Machine(tile) for tile in empty_tiles)
|
||||
# TODO Move to spawn!!!
|
||||
state[m.MACHINES].add_items(Machine(pos) for pos in state.entities.empty_positions())
|
||||
|
||||
def tick_pre_step(self, state) -> List[TickResult]:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user